I’m working with a collection property for the first time - here’s my code:
class ssCamAnglesPG(bpy.types.PropertyGroup):
toggle_still = bpy.props.BoolProperty(name="Still",description="Render still frame based on angle",default=False)
toggle_turn = bpy.props.BoolProperty(name="Turn",description="Render turntable based on angle",default=False)
tl_controls = bpy.props.StringProperty(default="toggle_still:toggle_turn", options={"HIDDEN"})
def register():
bpy.utils.register_module(__name__)
bpy.types.Scene.ss_camAngles = bpy.props.CollectionProperty(type=ssCamAnglesPG)
bpy.types.Scene.ss_camAngles_index = bpy.props.IntProperty()
pass
class OBJECT_PT_sceneToolboxPanel(bpy.types.Panel):
bl_idname = "OBJECT_PT_scene_toolbox"
bl_label = "Katie Tools"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_context = "objectmode"
def draw(self, context):
kt = bpy.context.window_manager.katietools
engine = bpy.context.scene.render.engine
layout = self.layout
scn = bpy.context.scene
#RENDER
col = layout.column(align=False)
if kt.display_render == True:
col.prop(kt, 'display_render', icon='RIGHTARROW')
else:
col.prop(kt, 'display_render', icon='DOWNARROW_HLT')
col = layout.column(align=True)
row = layout.row(align=True)
row.prop(kt,"ren_type", expand=True) #Engine selector
col = layout.column(align=True)
row = layout.row(align=True)
col.label(text="Snapshot:")
col.template_list(scn, "ss_camAngles", scn, "ss_camAngles_index", prop_list="tl_controls", rows=5)
Attached image #1 is my UI with each element for the 3 items is spaced out evenly. I want to manipulate the layout for the items to allow more room for the item name (“Angle.001”) via shrinking the area of the two toggles (“Still” and “Turn”). I assume this is possible based on Shape Key UI in attached image #2.
Any insight into how this is accomplished is very appreciated! 