Page MenuHome

Fix T60971 apply visual transform not working
ClosedPublic

Authored by Pelle Johnsen (pjohnsen) on Jun 4 2019, 11:34 AM.

Diff Detail

Repository
rB Blender

Event Timeline

Sergey Sharybin (sergey) requested changes to this revision.Jun 4 2019, 12:35 PM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/object/object_transform.c
821

If the dependency graph is evaluated, then you don't need this. If it is not evaluated yet (i.e. on redo) this is not enough.

It should be enough to replace CTX_data_depsgraph with CTX_data_evaluated_depsgraph few lines above and remove this manual copy.

824

It is unreliable to use BKE_object_where_is_calc on original object: it might depend on constraints which needs final geometry which does not exist in an original domain.

Not sure why this is even needed. Is it for applying transform when both children and parent are selected?
In any case, seems you should do BKE_object_transform_copy(ob, ob_eval); here.

This revision now requires changes to proceed.Jun 4 2019, 12:35 PM

Okay I tried updating with comments from @Sergey Sharybin (sergey). Hope I understood it right - at least my use case still works :)

source/blender/editors/object/object_transform.c
822

Think this should be BKE_object_apply_mat4(ob_eval, ob_eval->obmat, true, true);

Made some more fixes from comments. This at least makes a bit more sense to me.

This revision is now accepted and ready to land.Jun 4 2019, 3:22 PM
This revision was automatically updated to reflect the committed changes.