add nodes for uid

This commit is contained in:
t3du 2021-10-18 17:53:09 -03:00 committed by GitHub
parent 67d511568f
commit d3b006c873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import bpy
from arm.logicnode.arm_nodes import *
class GetObjectByUidNode(ArmLogicTreeNode):
"""Searches for a object that with this uid in the current active scene and returns it."""
bl_idname = 'LNGetObjectByUidNode'
bl_label = 'Get Object By Uid'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmIntSocket', 'Uid')
self.add_output('ArmNodeSocketObject', 'Object')

View file

@ -0,0 +1,13 @@
from arm.logicnode.arm_nodes import *
class GetUidNode(ArmLogicTreeNode):
"""Returns the uid of the given object."""
bl_idname = 'LNGetUidNode'
bl_label = 'Get Object Uid'
arm_section = 'props'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmNodeSocketObject', 'Object')
self.add_output('ArmIntSocket', 'Uid')