Fix #100993: Snap Selection to Active fails to snap to active parent

The Selection to Active operator failed when the selected object was
parented to the active object. Fix by allowing child objects to move to
the active object unless "Offset" is enabled.

Ref !147204
This commit is contained in:
tariqsulley
2025-10-09 23:34:44 +00:00
committed by Campbell Barton
parent 2f0d433592
commit 5a9f88faee

View File

@@ -570,8 +570,12 @@ static bool snap_selected_to_location_rotation(bContext *C,
}
for (Object *ob : objects) {
if (ob->parent && BKE_object_flag_test_recursive(ob->parent, OB_DONE)) {
continue;
/* With offset enabled, skip child objects whose parents are also transformed
* to avoid double transform. */
if (use_offset) {
if (ob->parent && BKE_object_flag_test_recursive(ob->parent, OB_DONE)) {
continue;
}
}
blender::float3 target_loc_local; /* parent-relative */