Parse and create traits

This commit is contained in:
Lubos Lenco 2015-11-24 22:48:31 +01:00
parent 9bc2817a14
commit 95cbafbd6c
3 changed files with 13 additions and 3 deletions

View file

@ -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"

View file

@ -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:

View file

@ -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"