Fix #118395: use copy instead of new for geometry nodes in modifiers list

Now it behaves the same as the materials list UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/118420
This commit is contained in:
bonj
2024-02-20 18:43:40 +01:00
committed by Jacques Lucke
parent 6b79f60885
commit fcc8a11370

View File

@@ -2293,16 +2293,9 @@ static void panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropDecorate(layout, false);
if (!(nmd->flag & NODES_MODIFIER_HIDE_DATABLOCK_SELECTOR)) {
uiTemplateID(layout,
C,
ptr,
"node_group",
"node.new_geometry_node_group_assign",
nullptr,
nullptr,
0,
false,
nullptr);
const char *newop = (nmd->node_group == nullptr) ? "node.new_geometry_node_group_assign" :
"object.geometry_node_tree_copy_assign";
uiTemplateID(layout, C, ptr, "node_group", newop, nullptr, nullptr, 0, false, nullptr);
}
if (nmd->node_group != nullptr && nmd->settings.properties != nullptr) {