Improve object and action socket parse
This commit is contained in:
parent
f5e1dbe986
commit
034a832bf9
|
@ -6,7 +6,7 @@ bl_info = {
|
|||
"location": "Properties -> Render -> Armory Player",
|
||||
"description": "3D game engine for Blender",
|
||||
"author": "Armory3D.org",
|
||||
"version": (11, 4, 1),
|
||||
"version": (11, 5, 0),
|
||||
"blender": (2, 79, 0),
|
||||
"wiki_url": "http://armory3d.org/manual",
|
||||
"tracker_url": "https://github.com/armory3d/armory/issues"
|
||||
|
@ -183,7 +183,7 @@ class ArmAddonUpdateButton(bpy.types.Operator):
|
|||
self.report({"ERROR"}, "Configure SDK path first")
|
||||
return {"CANCELLED"}
|
||||
self.report({'INFO'}, 'Updating, check console for details. Please restart Blender after successful SDK update.')
|
||||
print('Armory: Cloning [armory, iron, haxebullet, haxerecast, zui] repositories')
|
||||
print('Armory (add-on v' + str(bl_info['version']) + '): Cloning [armory, iron, haxebullet, haxerecast, zui] repositories')
|
||||
os.chdir(p)
|
||||
update_repo(p, 'armory')
|
||||
update_repo(p, 'iron')
|
||||
|
|
|
@ -44,6 +44,8 @@ class ArmObjectSocket(bpy.types.NodeSocket):
|
|||
def get_default_value(self):
|
||||
if self.default_value == '':
|
||||
return ''
|
||||
if self.default_value not in bpy.data.objects:
|
||||
return self.default_value
|
||||
return arm.utils.asset_name(bpy.data.objects[self.default_value])
|
||||
|
||||
def __init__(self):
|
||||
|
@ -85,6 +87,10 @@ class ArmAnimActionSocket(bpy.types.NodeSocket):
|
|||
default_value = StringProperty(name='Action', default='')
|
||||
|
||||
def get_default_value(self):
|
||||
if self.default_value == '':
|
||||
return ''
|
||||
if self.default_value not in bpy.data.actions:
|
||||
return self.default_value
|
||||
name = arm.utils.asset_name(bpy.data.actions[self.default_value])
|
||||
return arm.utils.safestr(name)
|
||||
|
||||
|
|
Loading…
Reference in a new issue