Parse and create traits
This commit is contained in:
parent
9bc2817a14
commit
95cbafbd6c
|
@ -10,7 +10,7 @@ import webbrowser
|
|||
|
||||
def defaultSettings():
|
||||
wrd = bpy.data.worlds[0]
|
||||
wrd['TargetVersion'] = "15.10.0"
|
||||
wrd['TargetVersion'] = "15.11.0"
|
||||
wrd['TargetEnum'] = 3
|
||||
wrd['TargetRenderer'] = 0
|
||||
wrd['TargetProjectName'] = "myproject"
|
||||
|
|
|
@ -1271,8 +1271,18 @@ class LueExporter(bpy.types.Operator, ExportHelper):
|
|||
else:
|
||||
parento.nodes.append(o)
|
||||
|
||||
# Export traits
|
||||
# TODO: export only for geometry nodes and nodes
|
||||
o.traits = []
|
||||
|
||||
for t in node.my_traitlist:
|
||||
if t.enabled_prop == False:
|
||||
continue
|
||||
x = Object()
|
||||
x.type = t.type_prop
|
||||
x.class_name = t.class_name_prop
|
||||
o.traits.append(x)
|
||||
|
||||
o.traits = [] # TODO: export only for geometry nodes and nodes
|
||||
if not hasattr(o, 'nodes'):
|
||||
o.nodes = []
|
||||
for subnode in node.children:
|
||||
|
|
|
@ -232,7 +232,7 @@ class LIST_OT_TraitMoveItem(bpy.types.Operator):
|
|||
|
||||
# Menu in tools region
|
||||
class ToolsTraitsPanel(bpy.types.Panel):
|
||||
bl_label = "cycles_traits"
|
||||
bl_label = "Cycles Traits"
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "object"
|
||||
|
|
Loading…
Reference in a new issue