Page MenuHome

Constraints: apply small fixes for custom space handling.
ClosedPublic

Authored by Alexander Gavrilov (angavrilov) on Dec 3 2020, 12:14 PM.

Details

Summary

Constraints: add missing calls to initialize custom space.

Add calls to a few locations that look like they may need to
initialize the Custom Space matrix, i.e. generally any place
that computes target matrices.


Constraints: add checks to specially handle the custom space target.

  • The custom space target never needs B-Bone data (used by depsgraph).
  • When drawing the relationship lines use the space matrix directly.
  • Don't use the custom target to control the target space type dropdown.

Diff Detail

Repository
rB Blender
Branch
temp-angavrilov-custom-space-refactor (branched from master)
Build Status
Buildable 22790
Build 22790: arc lint + arc unit

Event Timeline

Alexander Gavrilov (angavrilov) requested review of this revision.Dec 3 2020, 12:14 PM
Alexander Gavrilov (angavrilov) created this revision.
Alexander Gavrilov (angavrilov) retitled this revision from Constraints: refactor the D7437 patch adding Custom Space for constraints. to Constraints: refactor the D7437 patch that added Custom Space for constraints..Dec 17 2020, 1:03 PM
Alexander Gavrilov (angavrilov) edited the summary of this revision. (Show Details)
Sybren A. Stüvel (sybren) requested changes to this revision.Jan 6 2022, 12:16 PM

First, instead of modifying all the get_constraint_targets and flush_constraint_targets callbacks, introduce wrapper functions for accessing constraint targets, convert all code to use them, and handle the new reference there uniformly for all constraints.

This sounds like a nice non-functional change.

This incidentally revealed a place in the Collada exporter that didn't clean up after retrieving the targets and fixed it.

Good find :) Fixing this should be done in a different patch, though.

Also, tag the special target with a flag so other code can handle it appropriately where necessary. This for instance allows dependency graph to know that the Use B-Bone Shape option doesn't affect this specific target.

This seems to be a functional change, and thus should be done in a separate patch.

Finally, rename and simplify the function for initializing the custom space, and make sure it is called everywhere necessary.

This is yet another change, and should thus be done in yet another patch.

This revision now requires changes to proceed.Jan 6 2022, 12:16 PM
Alexander Gavrilov (angavrilov) edited the summary of this revision. (Show Details)

Rebased after commit of D15168 and internally split into two commits.

Alexander Gavrilov (angavrilov) retitled this revision from Constraints: refactor the D7437 patch that added Custom Space for constraints. to Constraints: rename and refactor custom space initialization..Jun 18 2022, 6:25 PM
Alexander Gavrilov (angavrilov) edited the summary of this revision. (Show Details)
Alexander Gavrilov (angavrilov) retitled this revision from Constraints: rename and refactor custom space initialization. to Constraints: apply small fixes for custom space handling..Jun 30 2022, 4:19 PM
Alexander Gavrilov (angavrilov) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jul 19 2022, 4:30 PM