Geometry Nodes: Move named attribute nodes out of experimental
Remove the experimental option for named attributes nodes show they are always available. Ref T91742
This commit is contained in:
parent
ae94e36cfb
commit
3e7ee3f3bc
Notes:
blender-bot
2023-02-14 05:37:19 +01:00
Referenced by issue #91742, Named Attribute Nodes
|
@ -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")),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -54,9 +54,6 @@ static void node_update(bNodeTree *ntree, bNode *node)
|
|||
|
||||
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -13,21 +13,11 @@ static void node_declare(NodeDeclarationBuilder &b)
|
|||
b.add_output<decl::Geometry>(N_("Geometry"));
|
||||
}
|
||||
|
||||
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -65,9 +65,6 @@ static void node_update(bNodeTree *ntree, bNode *node)
|
|||
|
||||
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue