[Bf-blender-cvs] [9beb5e38a9c] master: Geometry Nodes: output Index from ID node if the geometry has no id

Jacques Lucke noreply at git.blender.org
Wed Oct 27 15:57:32 CEST 2021


Commit: 9beb5e38a9ca69b36022f75b61df09bc2522b490
Author: Jacques Lucke
Date:   Wed Oct 27 15:56:26 2021 +0200
Branches: master
https://developer.blender.org/rB9beb5e38a9ca69b36022f75b61df09bc2522b490

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.

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_input_id.cc

===================================================================

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



More information about the Bf-blender-cvs mailing list