Fix redo regression w/ transform constraints

Adjusting a constrained transform would always use global space.
This commit is contained in:
Campbell Barton 2019-02-21 17:51:02 +11:00
parent 941c03e2bf
commit f4d9e49f28
Notes: blender-bot 2023-02-14 04:24:05 +01:00
Referenced by issue #61796, Linking a collection with instances inside will place the instanced object in the scene
Referenced by issue #61787, Duplicating a collection instance does not duplicate the dupli_group
1 changed files with 7 additions and 1 deletions

View File

@ -2183,7 +2183,13 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
BLI_assert(orientation >= V3D_ORIENT_CUSTOM);
}
RNA_float_set_array(op->ptr, "constraint_matrix", &t->spacemtx[0][0]);
if (t->con.mode & CON_APPLY) {
RNA_float_set_array(op->ptr, "constraint_matrix", &t->con.mtx[0][0]);
}
else {
RNA_float_set_array(op->ptr, "constraint_matrix", &t->spacemtx[0][0]);
}
/* Use 'constraint_matrix' instead. */
if (orientation != V3D_ORIENT_CUSTOM_MATRIX) {