Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_object_info.cc
| Show All 39 Lines | static void node_geo_exec(GeoNodeExecParams params) | ||||
| Object *object = params.get_input<Object *>("Object"); | Object *object = params.get_input<Object *>("Object"); | ||||
| const Object *self_object = params.self_object(); | const Object *self_object = params.self_object(); | ||||
| if (object == nullptr) { | if (object == nullptr) { | ||||
| params.set_default_remaining_outputs(); | params.set_default_remaining_outputs(); | ||||
| return; | return; | ||||
| } | } | ||||
| const float4x4 &object_matrix = object->obmat; | const float4x4 &object_matrix = object->object_to_world; | ||||
| const float4x4 transform = float4x4(self_object->imat) * object_matrix; | const float4x4 transform = float4x4(self_object->imat) * object_matrix; | ||||
| if (transform_space_relative) { | if (transform_space_relative) { | ||||
| params.set_output("Location", transform.translation()); | params.set_output("Location", transform.translation()); | ||||
| params.set_output("Rotation", transform.to_euler()); | params.set_output("Rotation", transform.to_euler()); | ||||
| params.set_output("Scale", transform.scale()); | params.set_output("Scale", transform.scale()); | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines | |||||