Geometry Nodes: Operator to wrap a modifier's node group

As described in #104171, add an operator that creates a new node group
that contain the current node group and named attribute nodes to deal
with the outputs. This saves manual work when moving a high-level
modifier to the node editor for better procedural control.

Pull Request #104546
This commit is contained in:
Hans Goudey
2023-02-14 18:21:50 +01:00
parent c9f02569c7
commit 5ca65001ea
2 changed files with 172 additions and 9 deletions

View File

@@ -274,6 +274,17 @@ static void modifier_ops_extra_draw(bContext *C, uiLayout *layout, void *md_v)
if (!md->next) {
uiLayoutSetEnabled(row, false);
}
if (md->type == eModifierType_Nodes) {
uiItemFullO(layout,
"OBJECT_OT_geometry_nodes_move_to_nodes",
NULL,
ICON_NONE,
NULL,
WM_OP_INVOKE_DEFAULT,
0,
&op_ptr);
}
}
static void modifier_panel_header(const bContext *C, Panel *panel)