Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Reynish <billreynish>2021-01-25 09:49:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-25 09:49:02 +0300
commit5a1cef2e763f70230259433423cd33a644e46218 (patch)
tree45051bcbebcfa26d9fb15a83322bf3256ac181c4 /release
parentbf329d37dae35103d1f68b1c599d1391864f3f3e (diff)
UI: move 'Trace Image to Grease Pencil' to 'Convert' sub-menu
This operator is very specific, and may not warrant being placed in such a prominent place. Move it together with other convert operators. Ref D10188
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 28d0b59590a..10606889ece 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2287,16 +2287,7 @@ class VIEW3D_MT_object(Menu):
layout.separator()
- ob = context.active_object
- if ob and ob.type == 'GPENCIL' and context.gpencil_data:
- layout.operator_menu_enum("gpencil.convert", "type", text="Convert To")
- else:
- layout.operator_menu_enum("object.convert", "target")
-
- # Potrace lib dependency
- if bpy.app.build_options.potrace:
- layout.separator()
- layout.operator("gpencil.trace_image")
+ layout.menu("VIEW3D_MT_object_convert")
layout.separator()
@@ -2781,6 +2772,23 @@ class VIEW3D_MT_make_single_user(Menu):
props.object = props.obdata = props.material = False
+class VIEW3D_MT_object_convert(Menu):
+ bl_label = "Convert"
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.active_object
+
+ if ob and ob.type == 'GPENCIL' and context.gpencil_data:
+ layout.operator_enum("gpencil.convert", "type")
+ else:
+ layout.operator_enum("object.convert", "target")
+
+ # Potrace lib dependency.
+ if bpy.app.build_options.potrace:
+ layout.operator("gpencil.trace_image", icon='OUTLINER_OB_GREASEPENCIL')
+
+
class VIEW3D_MT_make_links(Menu):
bl_label = "Link/Transfer Data"
@@ -7525,6 +7533,7 @@ classes = (
VIEW3D_MT_object_rigid_body,
VIEW3D_MT_object_clear,
VIEW3D_MT_object_context_menu,
+ VIEW3D_MT_object_convert,
VIEW3D_MT_object_shading,
VIEW3D_MT_object_apply,
VIEW3D_MT_object_relations,