import bpy from bpy.types import Menu, Panel, UIList class View3DPanel(): bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' class OpenStudioAddRigPanel(View3DPanel, Panel): bl_label = "Test" bl_context = "objectmode" bl_category = "Test" def draw(self, context): layout = self.layout ob = context.object layout.operator_menu_enum("object.modifier_add", "type") for md in ob.modifiers: box = layout.template_modifier(md) if box: # match enum type to our functions, avoids a lookup table. getattr(self, md.type)(box, ob, md) def register(): bpy.utils.register_module(__name__) def unregister(): bpy.utils.unregister_module(__name__) if __name__ == "__main__": register() print("Add Rig loaded")
So I try to learn how I could move the modifier stack into the tool shelve so I can work full screen without the need of the button menu.
I am totaly new at UI scripting and scripting in general with Blender, so I am looking for some guidance and tips what to do. I managed to make some modifier related stuff appear in the tool shelve but it does not list all added modifiers and such.
So I looked into: "properties_data_modifier.py" This defines for example a boolean modifier operation but I fail to see how I could also get this running in the tool shelve. Sad me ;)
def BOOLEAN(self, layout, ob, md): split = layout.split() col = split.column() col.label(text="Operation:") col.prop(md, "operation", text="") col = split.column() col.label(text="Object:") col.prop(md, "object", text="")
So to sum it up: what I try to look for is the ability to list all added modifiers in the 3D view port tool panel and in addition enable you to edit them.
I did a quick hack and edited the modifier py script and it all can be displayed in the tool panel - so technically this is possible. Can somebody tell me how one could include this as a class in a new script?