Blender Git Loki

Git Commits -> Revision 5abdc50

Revision 5abdc50 by Alexander Gavrilov
October 6, 2021, 09:49 (GMT)
Constraints: refactor the D7437 patch adding Custom Space for constraints.

As mentioned in the comments to that patch, I had an idea for
a different way to do some technical aspects, but it was too
complicated to force changes in the original patch. Thus I submit
this follow up patch.

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 incidentally revealed a place in the Collada exporter that
didn't clean up after retrieving the targets.

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.

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

Differential Revision: https://developer.blender.org/D9732

Commit Details:

Full Hash: 5abdc5082e4753b78d6b91825c5f4125b3d8c984
Parent Commit: 332b9ee
Lines Changed: +185, -229

17 Modified Paths:

/source/blender/blenkernel/BKE_constraint.h (+3, -1) (Diff)
/source/blender/blenkernel/intern/action.c (+2, -7) (Diff)
/source/blender/blenkernel/intern/armature.c (+2, -7) (Diff)
/source/blender/blenkernel/intern/constraint.c (+120, -104) (Diff)
/source/blender/blenkernel/intern/object.c (+4, -13) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_relations.cc (+3, -6) (Diff)
/source/blender/draw/engines/overlay/overlay_extra.c (+8, -7) (Diff)
/source/blender/editors/armature/armature_add.c (+5, -10) (Diff)
/source/blender/editors/armature/armature_naming.c (+2, -7) (Diff)
/source/blender/editors/armature/armature_relations.c (+6, -21) (Diff)
/source/blender/editors/armature/pose_select.c (+2, -7) (Diff)
/source/blender/editors/object/object_constraint.c (+9, -17) (Diff)
/source/blender/editors/transform/transform_mode.c (+3, -0) (Diff)
/source/blender/io/collada/BCAnimationSampler.cpp (+7, -5) (Diff)
/source/blender/io/collada/SceneExporter.cpp (+3, -8) (Diff)
/source/blender/makesdna/DNA_constraint_types.h (+3, -1) (Diff)
/source/blender/makesrna/intern/rna_constraint.c (+3, -8) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021