+
+class SR_OT_ENT_LIST_NEW_ITEM(bpy.types.Operator):#{
+ bl_idname = "skaterift.ent_list_new_entry"
+ bl_label = "Add entity"
+
+ def execute(self, context):#{
+ return internal_listadd_execute(self,context,'ent_list','entities')
+ #}
+#}
+
+class SR_OT_ENT_LIST_DEL_ITEM(bpy.types.Operator):#{
+ bl_idname = "skaterift.ent_list_del_entry"
+ bl_label = "Remove entity"
+
+ @classmethod
+ def poll(cls, context):#{
+ active_object = context.active_object
+ if obj_ent_type(active_object) == 'ent_list':#{
+ return active_object.SR_data.ent_list[0].entities
+ #}
+ else: return False
+ #}
+
+ 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']))
+#}
+