[Bf-blender-cvs] [254f2e7390b] master: Tool System: add annotation tool to image editor
Campbell Barton
noreply at git.blender.org
Thu Mar 7 04:19:26 CET 2019
Commit: 254f2e7390b37dddc034c9c8c2a4d5bb875bb4f5
Author: Campbell Barton
Date: Thu Mar 7 14:03:59 2019 +1100
Branches: master
https://developer.blender.org/rB254f2e7390b37dddc034c9c8c2a4d5bb875bb4f5
Tool System: add annotation tool to image editor
Also add place-holder measure tool.
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index ed86c355392..99195873d11 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1013,6 +1013,19 @@ class _defs_image_generic:
keymap=(),
)
+ # Currently a place holder so we can switch away from the annotation tool.
+ # Falls back to default image editor action.
+ @ToolDef.from_fn
+ def measure():
+ return dict(
+ text="Measure",
+ description=(
+ "Measure pixel values under the cursor"
+ ),
+ icon="ops.view3d.ruler", # XXX, needs own icon.
+ keymap=(),
+ )
+
class _defs_image_uv_transform:
@@ -1413,6 +1426,8 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel):
# for all modes
],
'VIEW': [
+ _defs_image_generic.measure,
+ *_tools_annotate,
],
'UV': [
*_tools_select,
More information about the Bf-blender-cvs
mailing list