What I'm trying to do is write a ui for an export script to export multiple selected actions of the selected armature(s) to multiple files.
I can't seem to find an example to define an operator for use in a layout.box()
instance which can be selected like the layout.template_list()
widget.
Of course, I'm working with a python list of gathered actions, so that widget is out of the question, since Blender has no internal support for this.
So, how do I define an operator which can be "selected" from a box widget?
Mockup of what I'm working with:
definitely draw(this, context ):
# not typing the gathering code.
box = layout.box()
for action in gathered_actions:
row = box.row()
row.label( text=action.name, translate=False, icon="ACTION" ) # what I currently have.
I want to replace the label with an operator, but don't know how to build the operator.
Might I note, I'm not experienced with blender, just python, so I'm delving into a new area with this.
layout.box()
only gives a visible variation from the surrounding panel, anything inside the box works the same as any other item you place in a panel. $\endgroup$template_list
instead ofbox
, which doesn't work with python lists... I'm currently throwing labels inside the box which works like I want, except I can't "select" them, so how do I design an operator to replace the label? $\endgroup$list()
containing the actions gathered from the selected armature(s). $\endgroup$