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:
parent
212b02b548
commit
9beb5e38a9
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue