diff options
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_object_info.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_object_info.cc | 11 |
1 files changed, 11 insertions, 0 deletions
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 ab5e4f8964a..fe0303a5f1c 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_object_info.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_object_info.cc @@ -19,6 +19,7 @@ #include "BKE_mesh.h" #include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" +#include "BKE_volume.h" #include "BLI_math_matrix.h" @@ -86,6 +87,16 @@ static void geo_node_object_info_exec(GeoNodeExecParams params) mesh_component.copy_vertex_group_names_from_object(*object); } } + 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}); + } + } } } |