diff options
author | Dalai Felinto <dalai@blender.org> | 2022-10-13 21:06:20 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2022-10-13 21:06:20 +0300 |
commit | 6beeba1ef5ae406805ed4947c04f8f3af1c667ff (patch) | |
tree | 80ab17a8bc44f09bc07bfb9899f355d0212ecc7e /source/blender/makesrna | |
parent | a5d3b648e3e2d68c99d6f7d9dad466ff4e302f34 (diff) |
Nodes: Duplicate Linked operator + User Preference option for Node Tree
This operator (Alt + D) allows users to explicitly create a linked copy
of a group node (same current behaviour for the Duplicate operator).
The duplicate operator (Shift + D) now takes the new User Preference
duplicate data option for Node Tree into account. It is by default
disabled, leading to no functional change for users.
Although we could make in the future make this option "on" by default,
to make it consistent with the rest of Blender we do not at the time.
Differential Revision: https://developer.blender.org/D16210
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 92739f40db0..e22ae205b0a 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5232,6 +5232,12 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Duplicate Volume", "Causes volume data to be duplicated with the object"); + prop = RNA_def_property(srna, "use_duplicate_node_tree", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_NTREE); + RNA_def_property_ui_text(prop, + "Duplicate Node Tree", + "Make copies of node groups when duplicating nodes in the node editor"); + /* Currently only used for insert offset (aka auto-offset), * maybe also be useful for later stuff though. */ prop = RNA_def_property(srna, "node_margin", PROP_INT, PROP_PIXEL); |