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:
authorLeon Schittek <leon.schittek@gmx.net>2022-03-29 23:28:02 +0300
committerLeon Schittek <leon.schittek@gmx.net>2022-03-29 23:30:51 +0300
commit08b4b657b64fe8632f532e732cebdaec73264d66 (patch)
tree55e3d83fc8388cdbc20451544d73601edf25d56b /source/blender/editors/object/object_modifier.c
parent4eb4c90cf6fbce9f94d130f15f417b37b17d80c7 (diff)
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
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c3
1 files changed, 0 insertions, 3 deletions
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);