Geometry Nodes: Hide node operators behind experimental option for now

Until the traits (#109526) and the redo panel (#109975) are added,
this is non-functional and confusing enough that it's worth hiding.
This commit is contained in:
Hans Goudey 2023-07-11 11:43:40 -04:00
parent 8e780e9415
commit c8e0c69c73
5 changed files with 16 additions and 5 deletions

@ -139,7 +139,8 @@ class NODE_HT_header(Header):
layout.prop(snode_id, "use_nodes")
elif snode.tree_type == 'GeometryNodeTree':
layout.prop(snode, "geometry_nodes_type", text="")
if context.preferences.experimental.use_node_group_operators:
layout.prop(snode, "geometry_nodes_type", text="")
NODE_MT_editor_menus.draw_collapsible(context, layout)
layout.separator_spacer()

@ -2419,6 +2419,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
({"property": "use_new_volume_nodes"}, ("blender/blender/issues/103248", "#103248")),
({"property": "use_node_panels"}, ("blender/blender/issues/105248", "#105248")),
({"property": "use_rotation_socket"}, ("/blender/blender/issues/92967", "#92967")),
({"property": "use_node_group_operators"}, ("/blender/blender/issues/101778", "#101778")),
),
)

@ -682,7 +682,8 @@ typedef struct UserDef_Experimental {
char use_new_volume_nodes;
char use_node_panels;
char use_rotation_socket;
char _pad[2];
char use_node_group_operators;
char _pad[1];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;

@ -738,13 +738,17 @@ static void rna_uiLayout_template_node_operator_asset_menu_items(uiLayout *layou
bContext *C,
const char *catalog_path)
{
blender::ed::geometry::ui_template_node_operator_asset_menu_items(
*layout, *C, blender::StringRef(catalog_path));
if (U.experimental.use_node_group_operators) {
blender::ed::geometry::ui_template_node_operator_asset_menu_items(
*layout, *C, blender::StringRef(catalog_path));
}
}
static void rna_uiLayout_template_node_operator_root_items(uiLayout *layout, bContext *C)
{
blender::ed::geometry::ui_template_node_operator_asset_root_items(*layout, *C);
if (U.experimental.use_node_group_operators) {
blender::ed::geometry::ui_template_node_operator_asset_root_items(*layout, *C);
}
}
static int rna_ui_get_rnaptr_icon(bContext *C, PointerRNA *ptr_icon)

@ -6744,6 +6744,10 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_rotation_socket", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Rotation Socket", "Enable the new rotation node socket type");
prop = RNA_def_property(srna, "use_node_group_operators", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(
prop, "Node Group Operators", "Enable using geometry nodes as edit operators");
}
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)