From 6beeba1ef5ae406805ed4947c04f8f3af1c667ff Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 13 Oct 2022 20:06:20 +0200 Subject: 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 --- source/blender/makesrna/intern/rna_userdef.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/makesrna/intern') 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); -- cgit v1.2.3