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-03-14 19:48:11 +0300
committerHans Goudey <h.goudey@me.com>2022-03-14 19:48:11 +0300
commitd4e46c13cc92e01489a031a6afe6bafb5af5ca18 (patch)
tree5c6294d006044d4100500f9e92bce8fea36c8841 /release
parenta5578351c38e2b2bb45d940a2fc57354e5fe3a5e (diff)
Geometry Nodes: Add named attribute nodes behind experimental flag
This commit adds three nodes: - `Remove Attribute`: Removes an attribute with the given name - `Named Attribute`: A field input node - `Store Named Attribute`: Puts results of a field in a named attribute They are added behind a new experimental feature flag, because further development of attribute search and name dependency visualization will happen as separate steps. Ref T91742 Differential Revision: https://developer.blender.org/D12685
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--release/scripts/startup/nodeitems_builtins.py8
2 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index f80ad378b3c..09716c77917 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2262,6 +2262,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
({"property": "use_sculpt_tools_tilt"}, "T82877"),
({"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 a0205a2bcb1..705b98c4d11 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -201,6 +201,8 @@ def geometry_input_node_items(context):
yield NodeItem("ShaderNodeValue")
yield NodeItem("FunctionNodeInputVector")
yield NodeItemCustom(draw=lambda self, layout, context: layout.separator())
+ if named_attribute_poll(context):
+ yield NodeItem("GeometryNodeInputNamedAttribute")
yield NodeItem("GeometryNodeInputID")
yield NodeItem("GeometryNodeInputIndex")
yield NodeItem("GeometryNodeInputNormal")
@@ -358,6 +360,10 @@ def geometry_nodes_legacy_poll(context):
return context.preferences.experimental.use_geometry_nodes_legacy
+def named_attribute_poll(context):
+ return context.preferences.experimental.use_named_attribute_nodes
+
+
# All standard node categories currently used in nodes.
shader_node_categories = [
@@ -683,6 +689,8 @@ geometry_node_categories = [
NodeItem("GeometryNodeAttributeDomainSize"),
NodeItem("GeometryNodeAttributeStatistic"),
NodeItem("GeometryNodeAttributeTransfer"),
+ NodeItem("GeometryNodeStoreNamedAttribute", poll=named_attribute_poll),
+ NodeItem("GeometryNodeRemoveAttribute", poll=named_attribute_poll),
]),
GeometryNodeCategory("GEO_COLOR", "Color", items=[
NodeItem("ShaderNodeMixRGB"),