From 08b4b657b64fe8632f532e732cebdaec73264d66 Mon Sep 17 00:00:00 2001 From: Leon Schittek Date: Tue, 29 Mar 2022 22:28:02 +0200 Subject: Geometry Nodes: Don't create node tree when adding nodes modifier Don't always create a new geometry nodes node tree when adding a geometry nodes modifier. This avoids files getting cluttered with empty and unused geometry node trees that are created every time a nodes modifier is added to an object - even if only to apply an already existing. This is also more consistent with other modifiers that also don't automatically create new data blocks. The new modifier still automatically gets populated with a new node tree when adding it via the "New" button in the header of the geometry nodes editor. Reviewed By: Hans Goudey, Dalai Felinto, Pablo Vazquez Differential Revision: D14458 --- source/blender/editors/object/object_modifier.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'source/blender/editors/object/object_modifier.c') diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 9039556ea93..0e09fbb7ea4 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -219,9 +219,6 @@ ModifierData *ED_object_modifier_add( /* ensure skin-node customdata exists */ BKE_mesh_ensure_skin_customdata(ob->data); } - else if (type == eModifierType_Nodes) { - MOD_nodes_init(bmain, (NodesModifierData *)new_md); - } } BKE_object_modifier_set_active(ob, new_md); -- cgit v1.2.3