#}
elif ent_type == 'ent_gate': #{
gate = ent_gate()
- gate.type = 0
obj_data = obj.SR_data.ent_gate[0]
mesh_data = obj.data.SR_data.ent_gate[0]
- if obj_data.target:#{
- gate.target = sr_compile.entity_ids[obj_data.target.name]
- gate.type = 1
+
+ if obj_data.tipo == 'default':#{
+ if obj_data.target:#{
+ gate.target = sr_compile.entity_ids[obj_data.target.name]
+ gate.type = 1
+ #}
+ #}
+ elif obj_data.tipo == 'nonlocal':#{
+ gate.target = sr_compile_string(obj_data.key)
+ gate.type = 2
#}
+ else: gate.type = 0
+
gate.dimensions[0] = mesh_data.dimensions[0]
gate.dimensions[1] = mesh_data.dimensions[1]
gate.dimensions[2] = mesh_data.dimensions[2]
target: bpy.props.PointerProperty( \
type=bpy.types.Object, name="destination", \
poll=lambda self,obj: sr_filter_ent_type(obj,['ent_gate']))
+
+ key: bpy.props.StringProperty()
+ tipo: bpy.props.EnumProperty(items=(('default', 'Default', ""),
+ ('nonlocal', 'Non-Local', ""),))
+
+ @staticmethod
+ def sr_inspector( layout, data ):
+ #{
+ box = layout.box()
+ box.prop( data[0], 'tipo', text="subtype" )
+
+ if data[0].tipo == 'default': box.prop( data[0], 'target' )
+ elif data[0].tipo == 'nonlocal': box.prop( data[0], 'key' )
+ #}
#}
class SR_MESH_ENT_GATE(bpy.types.PropertyGroup):