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:
authorHans Goudey <h.goudey@me.com>2022-04-26 18:17:53 +0300
committerHans Goudey <h.goudey@me.com>2022-04-26 18:18:30 +0300
commit3e7ee3f3bcd61a1fb1395683ba7ecc430c9932db (patch)
tree9751d8d412a97259bc4e9056b74825e5a5589bd6
parentae94e36cfb2f3bc9a99b638782092d9c71d4b3c7 (diff)
Geometry Nodes: Move named attribute nodes out of experimental
Remove the experimental option for named attributes nodes show they are always available. Ref T91742
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--release/scripts/startup/nodeitems_builtins.py11
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc5
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc13
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc5
7 files changed, 7 insertions, 37 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index eaa0fd87bce..e0abb3a8d89 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2263,7 +2263,6 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
({"property": "use_sculpt_texture_paint"}, "T96225"),
({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")),
({"property": "use_override_templates"}, ("T73318", "Milestone 4")),
- ({"property": "use_named_attribute_nodes"}, ("T91742")),
),
)
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index 42e4650365b..4f94184f006 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -178,8 +178,7 @@ def geometry_input_node_items(context):
yield NodeItemCustom(draw=lambda self, layout, context: layout.separator())
yield NodeItem("GeometryNodeInputID")
yield NodeItem("GeometryNodeInputIndex")
- if named_attribute_poll(context):
- yield NodeItem("GeometryNodeInputNamedAttribute")
+ yield NodeItem("GeometryNodeInputNamedAttribute")
yield NodeItem("GeometryNodeInputNormal")
yield NodeItem("GeometryNodeInputPosition")
yield NodeItem("GeometryNodeInputRadius")
@@ -317,10 +316,6 @@ def object_eevee_cycles_shader_nodes_poll(context):
eevee_cycles_shader_nodes_poll(context))
-def named_attribute_poll(context):
- return context.preferences.experimental.use_named_attribute_nodes
-
-
# All standard node categories currently used in nodes.
shader_node_categories = [
@@ -627,8 +622,8 @@ geometry_node_categories = [
NodeItem("GeometryNodeAttributeDomainSize"),
NodeItem("GeometryNodeAttributeStatistic"),
NodeItem("GeometryNodeAttributeTransfer"),
- NodeItem("GeometryNodeRemoveAttribute", poll=named_attribute_poll),
- NodeItem("GeometryNodeStoreNamedAttribute", poll=named_attribute_poll),
+ NodeItem("GeometryNodeRemoveAttribute"),
+ NodeItem("GeometryNodeStoreNamedAttribute"),
]),
GeometryNodeCategory("GEO_COLOR", "Color", items=[
NodeItem("ShaderNodeMixRGB"),
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 619f4c05875..3de6453bbaa 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -648,10 +648,9 @@ typedef struct UserDef_Experimental {
char use_sculpt_tools_tilt;
char use_extended_asset_browser;
char use_override_templates;
- char use_named_attribute_nodes;
char enable_eevee_next;
char use_sculpt_texture_paint;
- char _pad0[1];
+ char _pad0[2];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 5ddc8e97e45..1a2017f2dbb 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -6434,12 +6434,6 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Override Templates", "Enable library override template in the python API");
- prop = RNA_def_property(srna, "use_named_attribute_nodes", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "use_named_attribute_nodes", 1);
- RNA_def_property_ui_text(prop,
- "Named Attribute Nodes",
- "Enable named attribute nodes in the geometry nodes add menu");
-
prop = RNA_def_property(srna, "enable_eevee_next", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "enable_eevee_next", 1);
RNA_def_property_ui_text(prop, "EEVEE Next", "Enable the new EEVEE codebase, requires restart");
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
index 6cb9ca642ef..72dfff7cb39 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
@@ -54,9 +54,6 @@ static void node_update(bNodeTree *ntree, bNode *node)
static void node_gather_link_searches(GatherLinkSearchOpParams &params)
{
- if (U.experimental.use_named_attribute_nodes == 0) {
- return;
- }
const NodeDeclaration &declaration = *params.node_type().fixed_declaration;
search_link_ops_for_declarations(params, declaration.inputs());
@@ -81,7 +78,7 @@ static void node_geo_exec(GeoNodeExecParams params)
const std::string name = params.extract_input<std::string>("Name");
- if (!U.experimental.use_named_attribute_nodes || name.empty()) {
+ if (name.empty()) {
params.set_default_remaining_outputs();
return;
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
index 98b66dda24d..effeac5a37f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
@@ -13,21 +13,11 @@ static void node_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Geometry>(N_("Geometry"));
}
-static void node_gather_link_searches(GatherLinkSearchOpParams &params)
-{
- if (U.experimental.use_named_attribute_nodes == 0) {
- return;
- }
- const NodeDeclaration &declaration = *params.node_type().fixed_declaration;
- search_link_ops_for_declarations(params, declaration.inputs());
- search_link_ops_for_declarations(params, declaration.outputs());
-}
-
static void node_geo_exec(GeoNodeExecParams params)
{
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
const std::string name = params.extract_input<std::string>("Name");
- if (name.empty() || !U.experimental.use_named_attribute_nodes) {
+ if (name.empty()) {
params.set_output("Geometry", std::move(geometry_set));
return;
}
@@ -88,6 +78,5 @@ void register_node_type_geo_remove_attribute()
ntype.declare = file_ns::node_declare;
node_type_size(&ntype, 170, 100, 700);
ntype.geometry_node_execute = file_ns::node_geo_exec;
- ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
index b51fc063ab8..de206be5367 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
@@ -65,9 +65,6 @@ static void node_update(bNodeTree *ntree, bNode *node)
static void node_gather_link_searches(GatherLinkSearchOpParams &params)
{
- if (U.experimental.use_named_attribute_nodes == 0) {
- return;
- }
const NodeDeclaration &declaration = *params.node_type().fixed_declaration;
search_link_ops_for_declarations(params, declaration.inputs().take_front(2));
@@ -130,7 +127,7 @@ static void node_geo_exec(GeoNodeExecParams params)
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
std::string name = params.extract_input<std::string>("Name");
- if (!U.experimental.use_named_attribute_nodes || name.empty()) {
+ if (name.empty()) {
params.set_output("Geometry", std::move(geometry_set));
return;
}