I’m creating a tool that is an operator that runs modaly. I’d like the user to be able to change attributes of my tool while it’s running, so I’d like to be able to create a Panel that shows properties of my tool and lets users set them. (My tool runs in the View3D in edit mode).
So far I’ve created one Panel that sits in the tools window and has a button that launches my tool:
class NormalToolPanel(bpy.types.Panel): """Panel for the Normal Tool on tool shelf""" bl_label = "Normal Tool Panel" bl_idname = "3D_VIEW_PT_normal_tool" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_context = "edit" def draw(self, context): layout = self.layout obj = context.object row = layout.row() row.operator("kitfox.normal_tool")
This is fine for just getting my operator to run, but I’d also like to be able to display and set things (like a ‘strength’ property that varies from 0 to 1). Also, since 2.8 the TOOLS window seems to be only intended for storing an icon for starting your operator. I’ve tried creating a second panel and setting its
bl_region_type = 'TOOL_PROPS', but I have no idea where this shows up in the UI (if it is showing up).
Where should I place my panel that lists my tool’s properties? Also, how would I have my panel adjust my operator’s properties, since my operator is a completely separate object?