Fix #112580: Limit Constraint with 'Affect Transform' not working properly in 'World Space' #112601

Merged
Germano Cavalcante merged 4 commits from mano-wii/blender:fix_112580 into main 2023-10-06 17:14:36 +02:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 139c6f4655 - Show all commits

View File

@ -292,7 +292,7 @@ void constraintTransLim(const TransInfo *t, const TransDataContainer *tc, TransD
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
mul_m3_v3(td->mtx, cob.matrix[3]);
if (tc->use_local_mat) {
mul_m4_v3(tc->mat, cob.matrix[3]);
add_v3_v3(cob.matrix[3], tc->mat[3]);
}
}
else if (con->ownspace != CONSTRAINT_SPACE_LOCAL) {
@ -312,7 +312,7 @@ void constraintTransLim(const TransInfo *t, const TransDataContainer *tc, TransD
/* convert spaces again */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
if (tc->use_local_mat) {
mul_m4_v3(tc->imat, cob.matrix[3]);
sub_v3_v3(cob.matrix[3], tc->mat[3]);
}
mul_m3_v3(td->smtx, cob.matrix[3]);
}