Page MenuHome

Transform Orientation Refactor
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Apr 19 2020, 12:37 AM.

Details

Summary

In trying to correct T66142 I realized how confusing the orientation
system is handled within the transform operator.

In my opinion, what was most confusing is which matrix was saved in the
"orient_matrix" parameter.

Sometimes it was "t->con.mtx", other times it was "t->spacemtx" and
other times it was the own "t->orient_matrix".

Orient matrix is always set to Redo so in the Redo panel the
orientation is always V3D_ORIENT_CUSTOM_MATRIX.

But this caused T66142 as the contraint callbacks are different between
the original V3D_ORIENT_NORMAL and` V3D_ORIENT_CUSTOM_MATRIX`.

To solve the confusion and the bug this patch proposes:

  • Use t->spacemtx as the final orientation matrix (instead t->orient_matrix).
  • Unify constraint behavior between modal and non-modal.
  • Simplify code to remove old workarounds and unused members.

Diff Detail

Repository
rB Blender
Branch
transform_orient_refactor (branched from master)
Build Status
Buildable 7633
Build 7633: arc lint + arc unit

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.Apr 19 2020, 12:38 AM
  • Use orient_matrix for contraints on redo
This revision was not accepted when it landed; it landed in state Needs Review.Apr 29 2020, 1:09 PM
This revision was automatically updated to reflect the committed changes.