+ def execute(self, context):#{
+ return internal_listdel_execute(self,context,'ent_list','entities')
+ #}
+#}
+
+class SR_OBJECT_ENT_LIST_ENTRY(bpy.types.PropertyGroup):
+#{
+ target: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name='target' )
+#}
+
+class SR_UL_ENT_LIST(bpy.types.UIList):#{
+ bl_idname = 'SR_UL_ENT_LIST'
+
+ def draw_item(_,context,layout,data,item,icon,active_data,active_propname):#{
+ layout.prop( item, 'target', text='', emboss=False )
+ #}
+#}
+
+class SR_OBJECT_ENT_LIST(bpy.types.PropertyGroup):#{
+ entities: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_LIST_ENTRY)
+ entities_index: bpy.props.IntProperty()
+
+ @staticmethod
+ def sr_inspector( layout, data ):#{
+ layout.label( text='Entities' )
+ layout.template_list('SR_UL_ENT_LIST', 'Entities', \
+ data[0], 'entities', data[0], \
+ 'entities_index', rows=5)
+
+ row = layout.row()
+ row.operator( 'skaterift.ent_list_new_entry', text='Add' )
+ row.operator( 'skaterift.ent_list_del_entry', text='Remove' )
+ #}
+#}
+
+class SR_OBJECT_ENT_GLIDER(bpy.types.PropertyGroup):#{
+ nothing: bpy.props.StringProperty()
+#}
+
+class SR_OBJECT_ENT_NPC(bpy.types.PropertyGroup):#{
+ au: bpy.props.IntProperty()
+ context: bpy.props.IntProperty()
+ cam: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Viewpoint", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_camera']))
+#}
+
+class SR_OBJECT_ENT_VOLUME(bpy.types.PropertyGroup):#{
+ subtype: bpy.props.EnumProperty(
+ name="Subtype",
+ items=[('0','Trigger',''),
+ ('1','Particles (0.1s)','')]
+ )
+
+ target: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Target", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ target_event: bpy.props.IntProperty( name="Enter Ev" )
+ target_event_leave: bpy.props.IntProperty( name="Leave Ev", default=-1 )
+
+ @staticmethod
+ def inspect_target( layout, data, propname, evs = ['_event'] ):#{
+ box = layout.box()
+ box.prop( data[0], propname )
+
+ for evname in evs:#{
+ row = box.row()
+ row.prop( data[0], propname + evname )
+
+ target = getattr( data[0], propname )
+ if target:#{
+ tipo = target.SR_data.ent_type
+ cls = globals()[ tipo ]
+
+ table = getattr( cls, 'sr_functions', None )
+ if table:#{
+ index = getattr( data[0], propname + evname )
+ if index in table:
+ row.label( text=table[index] )
+ else:
+ row.label( text="undefined function" )
+ #}
+ #}
+ else:#{
+ row.label( text="..." )
+ row.enabled=False
+ #}
+ #}
+ #}
+
+ @staticmethod
+ def sr_inspector( layout, data ):#{
+ layout.prop( data[0], 'subtype' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target', \
+ ['_event','_event_leave'] )
+ #}
+#}
+
+class SR_OBJECT_ENT_AUDIO(bpy.types.PropertyGroup):
+#{
+ files: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_AUDIO_FILE_ENTRY)
+ files_index: bpy.props.IntProperty()
+
+ flag_3d: bpy.props.BoolProperty( name="3D audio",default=True )
+ flag_loop: bpy.props.BoolProperty( name="Loop",default=False )
+ flag_auto: bpy.props.BoolProperty( name="Play at start",default=False )
+ flag_nodoppler: bpy.props.BoolProperty( name="No Doppler",default=False )
+
+ group: bpy.props.IntProperty( name="Group ID", default=0 )
+ formato: bpy.props.EnumProperty(
+ name="Format",
+ items=[('0','Uncompressed Mono',''),
+ ('1','Compressed Vorbis',''),
+ ('2','[vg] Bird Synthesis','')]
+ )
+ probability_curve: bpy.props.EnumProperty(
+ name="Probability Curve",
+ items=[('0','Constant',''),
+ ('1','Wildlife Daytime',''),
+ ('2','Wildlife Nighttime','')])
+ channel_behaviour: bpy.props.EnumProperty(
+ name="Channel Behaviour",
+ items=[('0','Unlimited',''),
+ ('1','Discard if group full', ''),
+ ('2','Crossfade if group full','')])
+
+ transition_duration: bpy.props.FloatProperty(name="Transition Time",\
+ default=0.2)
+
+ max_channels: bpy.props.IntProperty( name="Max Channels", default=1 )
+ volume: bpy.props.FloatProperty( name="Volume",default=1.0 )
+
+ @staticmethod
+ def sr_inspector( layout, data ):
+ #{
+ layout.prop( data[0], 'formato' )
+ layout.prop( data[0], 'volume' )
+
+ box = layout.box()
+ box.label( text='Channels' )
+ split = box.split(factor=0.3)
+ c = split.column()
+ c.prop( data[0], 'max_channels' )
+ c = split.column()
+ c.prop( data[0], 'channel_behaviour', text='Behaviour' )
+ if data[0].channel_behaviour >= '1':
+ box.prop( data[0], 'group' )
+ if data[0].channel_behaviour == '2':
+ box.prop( data[0], 'transition_duration' )
+
+ box = layout.box()
+ box.label( text='Flags' )
+ box.prop( data[0], 'flag_3d' )
+ if data[0].flag_3d: box.prop( data[0], 'flag_nodoppler' )
+
+ box.prop( data[0], 'flag_loop' )
+ box.prop( data[0], 'flag_auto' )
+
+ layout.prop( data[0], 'probability_curve' )
+
+ split = layout.split(factor=0.7)
+ c = split.column()
+ c.label( text='Filepath' )
+ c = split.column()
+ c.label( text='Chance' )
+ layout.template_list('SR_UL_AUDIO_LIST', 'Files', \
+ data[0], 'files', data[0], 'files_index', rows=5)
+
+ row = layout.row()
+ row.operator( 'skaterift.al_new_entry', text='Add' )
+ row.operator( 'skaterift.al_del_entry', text='Remove' )
+ #}
+#}
+
+class SR_OBJECT_ENT_MARKER(bpy.types.PropertyGroup):
+#{
+ alias: bpy.props.StringProperty()
+ flags: bpy.props.IntProperty()
+#}
+
+class SR_OBJECT_ENT_GLYPH(bpy.types.PropertyGroup):
+#{
+ mini: bpy.props.FloatVectorProperty(size=2)
+ maxi: bpy.props.FloatVectorProperty(size=2)
+ utf32: bpy.props.IntProperty()
+#}
+
+class SR_OBJECT_ENT_GLYPH_ENTRY(bpy.types.PropertyGroup):
+#{
+ bounds: bpy.props.FloatVectorProperty(size=4,subtype='NONE')
+ utf32: bpy.props.IntProperty()
+#}
+
+class SR_OBJECT_ENT_FONT_VARIANT(bpy.types.PropertyGroup):
+#{
+ mesh: bpy.props.PointerProperty(type=bpy.types.Object)
+ tipo: bpy.props.StringProperty()
+#}
+
+class SR_OBJECT_ENT_FONT(bpy.types.PropertyGroup):
+#{
+ variants: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_FONT_VARIANT)
+ glyphs: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_GLYPH_ENTRY)
+ alias: bpy.props.StringProperty()
+
+ glyphs_index: bpy.props.IntProperty()
+ variants_index: bpy.props.IntProperty()
+
+ @staticmethod
+ def sr_inspector( layout, data ):
+ #{
+ layout.prop( data[0], 'alias' )
+
+ layout.label( text='Variants' )
+ layout.template_list('SR_UL_FONT_VARIANT_LIST', 'Variants', \
+ data[0], 'variants', data[0], 'variants_index',\
+ rows=5 )
+ row = layout.row()
+ row.operator( 'skaterift.fv_new_entry', text='Add' )
+ row.operator( 'skaterift.fv_del_entry', text='Remove' )
+
+ layout.label( text='ASCII Glyphs' )
+ layout.template_list('SR_UL_FONT_GLYPH_LIST', 'Glyphs', \
+ data[0], 'glyphs', data[0], 'glyphs_index', rows=5)
+
+ row = layout.row()
+ row.operator( 'skaterift.gl_new_entry', text='Add' )
+ row.operator( 'skaterift.gl_del_entry', text='Remove' )
+ row.operator( 'skaterift.gl_move_item', text='^' ).direction='UP'
+ row.operator( 'skaterift.gl_move_item', text='v' ).direction='DOWN'
+ #}
+#}
+
+class SR_OBJECT_ENT_TRAFFIC(bpy.types.PropertyGroup):
+#{
+ speed: bpy.props.FloatProperty(default=1.0)
+#}
+
+class SR_OBJECT_ENT_SKATESHOP(bpy.types.PropertyGroup):
+#{
+ tipo: bpy.props.EnumProperty( name='Type',
+ items=[('0','boards',''),
+ ('1','character',''),
+ ('2','world',''),
+ ('4','server','')] )
+ mark_rack: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Board Rack", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_marker']))
+ mark_display: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Selected Board Display", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_marker']))
+ mark_info: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Selected Board Info", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,\
+ ['ent_marker','ent_prop']))
+ cam: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Viewpoint", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_camera']))
+#}
+
+class SR_OBJECT_ENT_WORKSHOP_PREVIEW(bpy.types.PropertyGroup):
+#{
+ mark_display: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Board Display", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_marker']))
+ mark_display1: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Board Display (other side)", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_marker']))
+ cam: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Viewpoint", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_camera']))
+#}
+
+class SR_OBJECT_ENT_MENU_ITEM(bpy.types.PropertyGroup):
+#{
+ link0: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Link 0", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_menuitem']))
+ link1: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Link 1", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_menuitem']))
+ link2: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Link 2", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_menuitem']))
+ link3: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Link 3", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_menuitem']))
+
+ newloc: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="New location", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_menuitem']))
+ stack_behaviour: bpy.props.EnumProperty( name='Stack Behaviour',
+ items=[('0','append',''),
+ ('1','replace','')])
+
+ camera: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Camera", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_camera']))
+
+ slider_minloc: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Slider min", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_marker']))
+ slider_maxloc: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Slider max", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_marker']))
+ slider_handle: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Slider handle", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_menuitem']))
+
+ checkmark: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Checked", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_menuitem']))
+
+ font_variant: bpy.props.IntProperty( name="Font Variant" )
+
+ string: bpy.props.StringProperty( name="String" )
+ tipo: bpy.props.EnumProperty( name='Type',
+ items=[('0','visual',''),
+ ('1','event button',''),
+ ('2','page button',''),
+ ('3','toggle', ''),
+ ('4','slider',''),
+ ('5','page',''),
+ ('6','binding',''),
+ ('7','visual(no colourize)','')])
+
+ @staticmethod
+ def sr_inspector( layout, data ):
+ #{
+ data = data[0]
+ box = layout.box()
+ box.prop( data, 'tipo' )
+
+ if data.tipo == '0' or data.tipo == '7':#{
+ box.prop( data, 'string', text='Name' )
+ return
+ #}
+ elif data.tipo == '1':#{
+ box.prop( data, 'string', text='Event' )
+ #}
+ elif data.tipo == '2':#{
+ box.prop( data, 'string', text='Page' )
+ box.prop( data, 'stack_behaviour' )
+ #}
+ elif data.tipo == '3':#{
+ box.prop( data, 'string', text='Data (i32)' )
+ box.prop( data, 'checkmark' )
+ #}
+ elif data.tipo == '4':#{
+ box.prop( data, 'string', text='Data (f32)' )
+ box.prop( data, 'slider_minloc' )
+ box.prop( data, 'slider_maxloc' )
+ box.prop( data, 'slider_handle' )
+ box = box.box()
+ box.label( text="Links" )
+ box.prop( data, 'link0', text='v0' )
+ box.prop( data, 'link1', text='v1' )
+ return
+ #}
+ elif data.tipo == '5':#{
+ box.prop( data, 'string', text='Page Name' )
+ box.prop( data, 'newloc', text='Entry Point' )
+ box.prop( data, 'camera', text='Viewpoint' )
+ return
+ #}
+ elif data.tipo == '6':#{
+ box.prop( data, 'string', text='ID' )
+ box.prop( data, 'font_variant' )
+ return
+ #}
+
+ box = box.box()
+ box.label( text="Links" )
+ box.prop( data, 'link0' )
+ box.prop( data, 'link1' )
+ box.prop( data, 'link2' )
+ box.prop( data, 'link3' )
+ #}
+#}
+
+class SR_OBJECT_ENT_WORLD_INFO(bpy.types.PropertyGroup):
+#{
+ name: bpy.props.StringProperty(name="Name")
+ desc: bpy.props.StringProperty(name="Description")
+ author: bpy.props.StringProperty(name="Author")
+ skybox: bpy.props.StringProperty(name="Skybox")
+
+ fix_time: bpy.props.BoolProperty(name="Fix Time")
+ timezone: bpy.props.FloatProperty(name="Timezone(hrs) (UTC0 +hrs)")
+ fixed_time: bpy.props.FloatProperty(name="Fixed Time (0-1)")
+
+ @staticmethod
+ def sr_inspector( layout, data ):#{
+ layout.prop( data[0], 'name' )
+ layout.prop( data[0], 'desc' )
+ layout.prop( data[0], 'author' )
+
+ layout.prop( data[0], 'fix_time' )
+ if data[0].fix_time:
+ layout.prop( data[0], 'fixed_time' )
+ else:
+ layout.prop( data[0], 'timezone' )
+ #}
+#}
+
+class SR_OBJECT_ENT_CCMD(bpy.types.PropertyGroup):
+#{
+ command: bpy.props.StringProperty(name="Command Line")
+#}
+
+class SR_OBJECT_ENT_OBJECTIVE(bpy.types.PropertyGroup):#{
+ proxima: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Next", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_objective']))
+ target: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Win", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ target_event: bpy.props.IntProperty( name="Event/Method" )
+ time_limit: bpy.props.FloatProperty( name="Time Limit", default=1.0 )
+ filtrar: bpy.props.EnumProperty( name='Filter',\
+ items=[('0','none',''),
+ (str(0x1),'trick_shuvit',''),
+ (str(0x2),'trick_kickflip',''),
+ (str(0x4),'trick_treflip',''),
+ (str(0x1|0x2|0x4),'trick_any',''),
+ (str(0x8),'flip_back',''),
+ (str(0x10),'flip_front',''),
+ (str(0x8|0x10),'flip_any',''),
+ (str(0x20),'grind_truck_any',''),
+ (str(0x40),'grind_board_any',''),
+ (str(0x20|0x40),'grind_any',''),
+ (str(0x80),'footplant',''),
+ (str(0x100),'passthrough',''),
+ ])
+
+ @staticmethod
+ def sr_inspector( layout, data ):#{
+ layout.prop( data[0], 'proxima' )
+ layout.prop( data[0], 'time_limit' )
+ layout.prop( data[0], 'filtrar' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target' )
+ #}
+#}
+
+class SR_OBJECT_ENT_CHALLENGE(bpy.types.PropertyGroup):#{
+ alias: bpy.props.StringProperty( name="Alias" )
+
+ target: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="On Complete", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ target_event: bpy.props.IntProperty( name="Event/Method" )
+ reset: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="On Reset", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ reset_event: bpy.props.IntProperty( name="Event/Method" )
+
+ time_limit: bpy.props.BoolProperty( name="Time Limit" )
+
+ first: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="First Objective", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_objective']))
+
+ camera: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Camera", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_camera']))
+
+
+ @staticmethod
+ def sr_inspector( layout, data ):#{
+ layout.prop( data[0], 'alias' )
+ layout.prop( data[0], 'camera' )
+ layout.prop( data[0], 'first' )
+ layout.prop( data[0], 'time_limit' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'reset' )
+ #}
+#}
+
+class SR_OBJECT_ENT_REGION(bpy.types.PropertyGroup):#{
+ title: bpy.props.StringProperty( name="Title" )
+ zone_volume: bpy.props.PointerProperty(
+ type=bpy.types.Object, name="Zone Volume", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_volume']))
+
+ target0: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Triger on unlock", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ target0_event: bpy.props.IntProperty( name="Event/Method" )
+
+ @staticmethod
+ def sr_inspector( layout, data ):#{
+ layout.prop( data[0], 'title' )
+ layout.prop( data[0], 'zone_volume' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target0' )
+ #}
+#}
+
+class SR_OBJECT_ENT_RELAY(bpy.types.PropertyGroup):#{
+ target0: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Target 0", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ target1: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Target 1", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ target2: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Target 2", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+ target3: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Target 3", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
+
+ target0_event: bpy.props.IntProperty( name="Event" )
+ target1_event: bpy.props.IntProperty( name="Event" )
+ target2_event: bpy.props.IntProperty( name="Event" )
+ target3_event: bpy.props.IntProperty( name="Event" )
+
+ @staticmethod
+ def sr_inspector( layout, data ):#{
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target0' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target1' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target2' )
+ SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target3' )
+ #}
+#}
+
+class SR_OBJECT_PROPERTIES(bpy.types.PropertyGroup):
+#{
+ ent_gate: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_GATE)
+ ent_spawn: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_SPAWN)
+ ent_route: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_ROUTE)
+ ent_volume: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_VOLUME)
+ ent_audio: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_AUDIO)
+ ent_marker: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_MARKER)
+ ent_prop: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_MARKER)
+ ent_glyph: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_GLYPH)
+ ent_font: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_FONT)
+ ent_traffic: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_TRAFFIC)
+ ent_skateshop: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_SKATESHOP)
+ ent_swspreview: \
+ bpy.props.CollectionProperty(type=SR_OBJECT_ENT_WORKSHOP_PREVIEW)
+ ent_menuitem: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_MENU_ITEM)
+ ent_worldinfo: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_WORLD_INFO)
+ ent_ccmd: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_CCMD)
+ ent_objective: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_OBJECTIVE)
+ ent_challenge: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_CHALLENGE)
+ ent_region: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_REGION)
+ ent_relay: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_RELAY)
+ ent_miniworld: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_MINIWORLD)
+ ent_list: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_LIST)
+ ent_glider: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_GLIDER)
+ ent_npc: bpy.props.CollectionProperty(type=SR_OBJECT_ENT_NPC)
+
+ ent_type: bpy.props.EnumProperty(
+ name="Type",
+ items=sr_entity_list,
+ update=sr_on_type_change
+ )
+#}
+
+class SR_MESH_PROPERTIES(bpy.types.PropertyGroup):
+#{
+ ent_gate: bpy.props.CollectionProperty(type=SR_MESH_ENT_GATE)
+#}
+
+class SR_LIGHT_PROPERTIES(bpy.types.PropertyGroup):
+#{
+ daytime: bpy.props.BoolProperty( name='Daytime' )
+#}
+
+class SR_BONE_PROPERTIES(bpy.types.PropertyGroup):
+#{
+ collider: bpy.props.EnumProperty( name='Collider Type',
+ items=[('0','none',''),
+ ('1','box',''),
+ ('2','capsule','')])
+
+ collider_min: bpy.props.FloatVectorProperty( name='Collider Min', size=3 )
+ collider_max: bpy.props.FloatVectorProperty( name='Collider Max', size=3 )
+
+ cone_constraint: bpy.props.BoolProperty( name='Cone constraint' )
+
+ conevx: bpy.props.FloatVectorProperty( name='vx' )
+ conevy: bpy.props.FloatVectorProperty( name='vy' )
+ coneva: bpy.props.FloatVectorProperty( name='va' )
+ conet: bpy.props.FloatProperty( name='t' )
+
+ @staticmethod
+ def sr_inspector( layout, data ):
+ #{
+ data = data[0]
+ box = layout.box()
+ box.prop( data, 'collider' )
+
+ if int(data.collider)>0:#{
+ row = box.row()
+ row.prop( data, 'collider_min' )
+ row = box.row()
+ row.prop( data, 'collider_max' )
+ #}
+
+ box = layout.box()
+ box.prop( data, 'cone_constraint' )
+ if data.cone_constraint:#{
+ row = box.row()
+ row.prop( data, 'conevx' )
+ row = box.row()
+ row.prop( data, 'conevy' )
+ row = box.row()
+ row.prop( data, 'coneva' )
+ box.prop( data, 'conet' )
+ #}
+ #}
+#}
+
+class SR_MATERIAL_PROPERTIES(bpy.types.PropertyGroup):
+#{
+ shader: bpy.props.EnumProperty(
+ name="Format",
+ items = [
+ ('standard',"standard",''),
+ ('standard_cutout', "standard_cutout", ''),
+ ('terrain_blend', "terrain_blend", ''),
+ ('vertex_blend', "vertex_blend", ''),
+ ('water',"water",''),
+ ('invisible','Invisible',''),
+ ('boundary','Boundary',''),
+ ('fxglow','FX Glow',''),
+ ('cubemap','Cubemap',''),
+ ('walking','Walking',''),
+ ('foliage','Foliage','')
+ ])