Fix flag on wrong object being modified

The intention was to disable constraints prior evaluation of
the object.

Spotted by Campbell, thanks!
This commit is contained in:
Sergey Sharybin
2019-03-01 10:00:14 +01:00
parent 1915b5338b
commit 0451043045

View File

@@ -5815,9 +5815,9 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
* object matrix via td->ob->obmat. */
Object *object_eval = DEG_get_evaluated_object(t->depsgraph, ob);
if (skip_invert == false && constinv == false) {
ob->transflag |= OB_NO_CONSTRAINTS; /* BKE_object_where_is_calc checks this */
object_eval->transflag |= OB_NO_CONSTRAINTS; /* BKE_object_where_is_calc checks this */
BKE_object_where_is_calc(t->depsgraph, t->scene, object_eval);
ob->transflag &= ~OB_NO_CONSTRAINTS;
object_eval->transflag &= ~OB_NO_CONSTRAINTS;
}
else {
BKE_object_where_is_calc(t->depsgraph, t->scene, object_eval);