Fix T99070: Apply transform fails to clear delta transform values
Clear delta transform value after applying transform. Include delta location while applying transform. Use `copy_v3_fl` for resetting object scale Reviewed By: mano-wii Maniphest Tasks: T99070 Differential Revision: https://developer.blender.org/D15270
This commit is contained in:
parent
83c2cbb880
commit
279e7dac7d
@ -855,7 +855,7 @@ static int apply_objects_internal(bContext *C,
|
||||
|
||||
/* calculate translation */
|
||||
if (apply_loc) {
|
||||
copy_v3_v3(mat[3], ob->loc);
|
||||
add_v3_v3v3(mat[3], ob->loc, ob->dloc);
|
||||
|
||||
if (!(apply_scale && apply_rot)) {
|
||||
float tmat[3][3];
|
||||
@ -1023,12 +1023,15 @@ static int apply_objects_internal(bContext *C,
|
||||
else {
|
||||
if (apply_loc) {
|
||||
zero_v3(ob->loc);
|
||||
zero_v3(ob->dloc);
|
||||
}
|
||||
if (apply_scale) {
|
||||
ob->scale[0] = ob->scale[1] = ob->scale[2] = 1.0f;
|
||||
copy_v3_fl(ob->scale, 1.0f);
|
||||
copy_v3_fl(ob->dscale, 1.0f);
|
||||
}
|
||||
if (apply_rot) {
|
||||
zero_v3(ob->rot);
|
||||
zero_v3(ob->drot);
|
||||
unit_qt(ob->quat);
|
||||
unit_axis_angle(ob->rotAxis, &ob->rotAngle);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user