UI: initial dynamically generated sculpt tools
Lots more work needed, this just lists sculpt tools in the toolbar.
This commit is contained in:
parent
6e76a35f07
commit
76282a986d
|
@ -402,6 +402,23 @@ class _defs_edit_curve:
|
|||
)
|
||||
|
||||
|
||||
class _defs_sculpt:
|
||||
|
||||
@staticmethod
|
||||
def generate_from_brushes(context):
|
||||
for brush in context.blend_data.brushes:
|
||||
name = brush.name
|
||||
yield type(
|
||||
"DynToolDef",
|
||||
(ToolDef,),
|
||||
dict(
|
||||
text=name,
|
||||
icon="none",
|
||||
data_block=name,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'TOOLS'
|
||||
|
@ -527,6 +544,9 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
|
|||
_defs_edit_curve.draw,
|
||||
_defs_edit_curve.extrude_cursor,
|
||||
],
|
||||
'SCULPT': [
|
||||
_defs_sculpt.generate_from_brushes,
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue