Tool System: split UI label from tool identifiers

Prepare for exposing tool registration to the Python API.

- Generated tools can use their own prefix so naming collisions
  won't happen between hard coded & generated tools.
- Add-on authors can use the add-on name as a prefix.

Currently the names match, renaming will happen next.
This commit is contained in:
2019-03-15 12:45:41 +11:00
parent 388ff003e2
commit 3400fe3ece
14 changed files with 340 additions and 212 deletions

View File

@@ -255,7 +255,9 @@ class VIEW3D_HT_header(Header):
)
if object_mode == 'PAINT_GPENCIL':
if context.workspace.tools.from_space_view3d_mode(object_mode).name == "Draw":
# FIXME: this is bad practice!
# Tool options are to be displayed in the topbar.
if context.workspace.tools.from_space_view3d_mode(object_mode).idname == "Draw":
settings = tool_settings.gpencil_sculpt.guide
row = layout.row(align=True)
row.prop(settings, "use_guide", text="", icon='GRID')