Page Menu
Home
Search
Configure Global Search
Log In
Paste
P1909
(An Untitled Masterwork)
Active
Public
Actions
Authored by
Jacques Lucke (JacquesLucke)
on Jan 25 2021, 5:06 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
diff --git a/source/blender/nodes/geometry/nodes/node_geo_object_info.cc b/source/blender/nodes/geometry/nodes/node_geo_object_info.cc
index fe0303a5f1c..ee261c849ed 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_object_info.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_object_info.cc
@@ -69,33 +69,13 @@ static void geo_node_object_info_exec(GeoNodeExecParams params)
quat_to_eul(rotation, quaternion);
if (object != self_object) {
- if (object->type == OB_MESH) {
- Mesh *mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(object, false);
- if (mesh != nullptr) {
- BKE_mesh_wrapper_ensure_mdata(mesh);
-
- /* Make a copy because the life time of the other mesh might be shorter. */
- Mesh *copied_mesh = BKE_mesh_copy_for_eval(mesh, false);
-
- if (transform_space_relative) {
- /* Transform into the local space of the object that is being modified. */
- BKE_mesh_transform(copied_mesh, transform, true);
- }
-
- MeshComponent &mesh_component = geometry_set.get_component_for_write<MeshComponent>();
- mesh_component.replace(copied_mesh);
- mesh_component.copy_vertex_group_names_from_object(*object);
- }
+ InstancesComponent &instances = geometry_set.get_component_for_write<InstancesComponent>();
+
+ if (transform_space_relative) {
+ instances.add_instance(object, location, rotation, scale);
}
- if (object->type == OB_VOLUME) {
- InstancesComponent &instances = geometry_set.get_component_for_write<InstancesComponent>();
-
- if (transform_space_relative) {
- instances.add_instance(object, location, rotation, scale);
- }
- else {
- instances.add_instance(object, {0, 0, 0});
- }
+ else {
+ instances.add_instance(object, {0, 0, 0});
}
}
}
Event Timeline
Jacques Lucke (JacquesLucke)
created this paste.
Jan 25 2021, 5:06 PM
Jacques Lucke (JacquesLucke)
mentioned this in
T85049: Geometry Nodes: How to handle instances with shear?
.
Jan 25 2021, 5:26 PM
Log In to Comment