|
|
|
|
@ -292,39 +292,38 @@ class LNX_PT_TilesheetPanel(bpy.types.Panel):
|
|
|
|
|
bl_label = "Leenkx Tilesheet"
|
|
|
|
|
bl_space_type = "PROPERTIES"
|
|
|
|
|
bl_region_type = "WINDOW"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_context = "object"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.object is not None and context.object.type == 'MESH'
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
obj = context.object
|
|
|
|
|
self.layout.prop(obj, "lnx_tilesheet_enabled", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
obj = context.object
|
|
|
|
|
|
|
|
|
|
layout.enabled = obj.lnx_tilesheet_enabled
|
|
|
|
|
layout.prop(obj, "lnx_tilesheet_enabled", text="Enable Tilesheet")
|
|
|
|
|
|
|
|
|
|
body = layout.column()
|
|
|
|
|
body.enabled = obj.lnx_tilesheet_enabled
|
|
|
|
|
|
|
|
|
|
# Start action dropdown
|
|
|
|
|
layout.prop_search(obj, "lnx_tilesheet_default_action", obj, "lnx_tilesheet_actionlist", text="Start Action")
|
|
|
|
|
body.prop_search(obj, "lnx_tilesheet_default_action", obj, "lnx_tilesheet_actionlist", text="Start Action")
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row = body.row()
|
|
|
|
|
row.prop(obj, "lnx_tilesheet_flipx")
|
|
|
|
|
row.prop(obj, "lnx_tilesheet_flipy")
|
|
|
|
|
|
|
|
|
|
# Actions list
|
|
|
|
|
layout.separator()
|
|
|
|
|
layout.label(text="Actions")
|
|
|
|
|
body.separator()
|
|
|
|
|
body.label(text="Actions")
|
|
|
|
|
rows = 2
|
|
|
|
|
if len(obj.lnx_tilesheet_actionlist) > 1:
|
|
|
|
|
rows = 4
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row = body.row()
|
|
|
|
|
row.template_list("LNX_UL_TilesheetActionList", "The_List", obj, "lnx_tilesheet_actionlist", obj, "lnx_tilesheet_actionlist_index", rows=rows)
|
|
|
|
|
col = row.column(align=True)
|
|
|
|
|
col.operator("lnx_tilesheetactionlist.new_item", icon='ADD', text="")
|
|
|
|
|
@ -340,7 +339,7 @@ class LNX_PT_TilesheetPanel(bpy.types.Panel):
|
|
|
|
|
# Selected action details (per-action properties)
|
|
|
|
|
if obj.lnx_tilesheet_actionlist_index >= 0 and len(obj.lnx_tilesheet_actionlist) > 0:
|
|
|
|
|
adat = obj.lnx_tilesheet_actionlist[obj.lnx_tilesheet_actionlist_index]
|
|
|
|
|
box = layout.box()
|
|
|
|
|
box = body.box()
|
|
|
|
|
# Grid dimensions
|
|
|
|
|
row = box.row()
|
|
|
|
|
row.use_property_split = False
|
|
|
|
|
|