[Bf-blender-cvs] [685419d6beb] master: UI: Object "Make Links" sub-menu overhaul

William Reynish noreply at git.blender.org
Wed Jan 20 10:52:15 CET 2021


Commit: 685419d6bebfec1542ecbe8c3542baba88132604
Author: William Reynish
Date:   Wed Jan 20 20:48:14 2021 +1100
Branches: master
https://developer.blender.org/rB685419d6bebfec1542ecbe8c3542baba88132604

UI: Object "Make Links" sub-menu overhaul

- Rename to "Link/Transfer Data".
- Move Mesh Data Transfer operators here from the Relations sub-menu.
- Clarify which operations links to, copies or transfers/projects
  data using Link, Copy and Transfer leading text.
- Re-order contents to fit each category and add separators.
- Add enum tool-tips.

Reviewed By: Blendify, campbellbarton pablovazquez, mont29

Ref D10090

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/object/object_relations.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 55cb110177f..28d0b59590a 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2236,11 +2236,6 @@ class VIEW3D_MT_object_relations(Menu):
         layout.operator_menu_enum("object.make_local", "type", text="Make Local...")
         layout.menu("VIEW3D_MT_make_single_user")
 
-        layout.separator()
-
-        layout.operator("object.data_transfer")
-        layout.operator("object.datalayout_transfer")
-
 
 class VIEW3D_MT_object(Menu):
     bl_context = "objectmode"
@@ -2274,7 +2269,7 @@ class VIEW3D_MT_object(Menu):
         layout.menu("VIEW3D_MT_object_relations")
         layout.menu("VIEW3D_MT_object_constraints")
         layout.menu("VIEW3D_MT_object_track")
-        layout.menu("VIEW3D_MT_make_links", text="Make Links")
+        layout.menu("VIEW3D_MT_make_links")
 
         layout.separator()
 
@@ -2787,7 +2782,7 @@ class VIEW3D_MT_make_single_user(Menu):
 
 
 class VIEW3D_MT_make_links(Menu):
-    bl_label = "Make Links"
+    bl_label = "Link/Transfer Data"
 
     def draw(self, _context):
         layout = self.layout
@@ -2795,10 +2790,10 @@ class VIEW3D_MT_make_links(Menu):
 
         if len(bpy.data.scenes) > 10:
             layout.operator_context = 'INVOKE_REGION_WIN'
-            layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
+            layout.operator("object.make_links_scene", text="Link Objects to Scene...", icon='OUTLINER_OB_EMPTY')
         else:
             layout.operator_context = 'EXEC_REGION_WIN'
-            layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene")
+            layout.operator_menu_enum("object.make_links_scene", "scene", text="Link Objects to Scene")
 
         layout.separator()
 
@@ -2806,7 +2801,12 @@ class VIEW3D_MT_make_links(Menu):
 
         layout.operator_enum("object.make_links_data", "type")  # inline
 
-        layout.operator("object.join_uvs")  # stupid place to add this!
+        layout.operator("object.join_uvs", text="Copy UV Maps")
+
+        layout.separator()
+
+        layout.operator("object.data_transfer")
+        layout.operator("object.datalayout_transfer")
 
 
 class VIEW3D_MT_brush_paint_modes(Menu):
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index acad1b43cbb..e4d06dca8cf 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1790,20 +1790,33 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
 void OBJECT_OT_make_links_data(wmOperatorType *ot)
 {
   static const EnumPropertyItem make_links_items[] = {
-      {MAKE_LINKS_OBDATA, "OBDATA", 0, "Object Data", ""},
-      {MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Materials", ""},
-      {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, "Animation Data", ""},
-      {MAKE_LINKS_GROUP, "GROUPS", 0, "Collection", ""},
-      {MAKE_LINKS_DUPLICOLLECTION, "DUPLICOLLECTION", 0, "Instance Collection", ""},
-      {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Modifiers", ""},
-      {MAKE_LINKS_FONTS, "FONTS", 0, "Fonts", ""},
-      {MAKE_LINKS_SHADERFX, "EFFECTS", 0, "Effects", ""},
+      {MAKE_LINKS_OBDATA, "OBDATA", 0, "Link Object Data", "Replace assigned Object Data"},
+      {MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Link Materials", "Replace assigned Materials"},
+      {MAKE_LINKS_ANIMDATA,
+       "ANIMATION",
+       0,
+       "Link Animation Data",
+       "Replace assigned Animation Data"},
+      {MAKE_LINKS_GROUP, "GROUPS", 0, "Link Collections", "Replace assigned Collections"},
+      {MAKE_LINKS_DUPLICOLLECTION,
+       "DUPLICOLLECTION",
+       0,
+       "Link Instance Collection",
+       "Replace assigned Collection Instance"},
+      {MAKE_LINKS_FONTS, "FONTS", 0, "Link Fonts to Text", "Replace Text object Fonts"},
+      {0, "", 0, NULL, NULL},
+      {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Copy Modifiers", "Replace Modifiers"},
+      {MAKE_LINKS_SHADERFX,
+       "EFFECTS",
+       0,
+       "Copy Grease Pencil Effects",
+       "Replace Grease Pencil Effects"},
       {0, NULL, 0, NULL, NULL},
   };
 
   /* identifiers */
-  ot->name = "Link Data";
-  ot->description = "Apply active object links to other selected objects";
+  ot->name = "Link/Transfer Data";
+  ot->description = "Transfer data from active object to selected objects";
   ot->idname = "OBJECT_OT_make_links_data";
 
   /* api callbacks */



More information about the Bf-blender-cvs mailing list