Geometry Nodes: add implicit input for Instance Transform

`instance_transform` is the basic transformation attribute of instances.
This will be used in separate patches.

Pull Request: https://projects.blender.org/blender/blender/pulls/120340
This commit is contained in:
Iliya Katueshenock
2024-05-06 17:22:24 +02:00
committed by Jacques Lucke
parent 05e9d95e52
commit 8249c09f3a
2 changed files with 7 additions and 0 deletions

View File

@@ -580,6 +580,7 @@ void position(const bNode &node, void *r_value);
void normal(const bNode &node, void *r_value);
void index(const bNode &node, void *r_value);
void id_or_index(const bNode &node, void *r_value);
void instance_transform(const bNode &node, void *r_value);
} // namespace implicit_field_inputs
void build_node_declaration(const bNodeType &typeinfo,

View File

@@ -842,6 +842,12 @@ void id_or_index(const bNode & /*node*/, void *r_value)
bke::SocketValueVariant(fn::Field<int>(std::make_shared<bke::IDAttributeFieldInput>()));
}
void instance_transform(const bNode & /*node*/, void *r_value)
{
new (r_value)
bke::SocketValueVariant(bke::AttributeFieldInput::Create<float4x4>("instance_transform"));
}
} // namespace implicit_field_inputs
} // namespace blender::nodes