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.
This commit is contained in:
Jacques Lucke 2021-10-27 15:56:26 +02:00
parent 212b02b548
commit 9beb5e38a9
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}