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:
authorJacques Lucke <jacques@blender.org>2021-10-27 16:56:26 +0300
committerJacques Lucke <jacques@blender.org>2021-10-27 16:57:19 +0300
commit9beb5e38a9ca69b36022f75b61df09bc2522b490 (patch)
tree4d1b5ee9f8d7065d221d0f8b2d852dfd1bad6893 /source/blender
parent212b02b5488982e83083a033150d11384181aa49 (diff)
Geometry Nodes: output Index from ID node if the geometry has no id
This is consistent with all the other places where we use the id attribute: If it does not exist, use the index instead.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_id.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_id.cc b/source/blender/nodes/geometry/nodes/node_geo_input_id.cc
index 049dbf06d80..d267325c26b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_id.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_id.cc
@@ -25,7 +25,7 @@ static void geo_node_input_id_declare(NodeDeclarationBuilder &b)
static void geo_node_input_id_exec(GeoNodeExecParams params)
{
- Field<int> position_field{AttributeFieldInput::Create<int>("id")};
+ Field<int> position_field{std::make_shared<bke::IDAttributeFieldInput>()};
params.set_output("ID", std::move(position_field));
}