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:
authorJulian Eisel <julian@blender.org>2020-12-27 17:50:26 +0300
committerJulian Eisel <julian@blender.org>2020-12-27 17:55:58 +0300
commit960a0b892c096965696bbd93d0782001d53c869e (patch)
treeba5ca66923b7fce8c24bcb19dfb567112b8b7820
parente56fe477489e190cc43f3128088f2b402068b108 (diff)
Fix T84101: Duplicate operator not available for some data-block selectors
In some operators that previously allowed duplicating the selected data-block, the operator would not be available now. 2250b5cefee7 split the "new" operators into "new" and "delete" to allow clearly differentiating between the two. But I apparently didn't amend all affected data-block selectors to use the added "duplicate" operators. I went over all operators that were split now and made sure all affected data-block selectors are updated.
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py2
-rw-r--r--release/scripts/startup/bl_ui/space_node.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 8b404c4a306..80e5b49f4fe 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -592,7 +592,7 @@ class GreasePencilMaterialsPanel:
if show_full_ui:
row = layout.row()
- row.template_ID(ob, "active_material", new="material.new", live_icon=True)
+ row.template_ID(ob, "active_material", new="material.new", duplicate="material.duplicate", live_icon=True)
slot = context.material_slot
if slot:
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index e6af83b61f4..0177579c5c2 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -93,10 +93,10 @@ class NODE_HT_header(Header):
# Show material.new when no active ID/slot exists
if not id_from and ob_type in types_that_support_material:
- row.template_ID(ob, "active_material", new="material.new")
+ row.template_ID(ob, "active_material", new="material.new", duplicate="material.duplicate")
# Material ID, but not for Lights
if id_from and ob_type != 'LIGHT':
- row.template_ID(id_from, "active_material", new="material.new")
+ row.template_ID(id_from, "active_material", new="material.new", duplicate="material.duplicate")
if snode.shader_type == 'WORLD':
NODE_MT_editor_menus.draw_collapsible(context, layout)
@@ -109,7 +109,7 @@ class NODE_HT_header(Header):
row = layout.row()
row.enabled = not snode.pin
- row.template_ID(scene, "world", new="world.new")
+ row.template_ID(scene, "world", new="world.new", duplicate="world.duplicate")
if snode.shader_type == 'LINESTYLE':
view_layer = context.view_layer