Blender Git Loki

Git Commits -> Revision f1190ff

Revision f1190ff by Henrik Dick
December 1, 2020, 18:31 (GMT)
Add Custom Space to Constraints

Constraints can currently only use World Space, Local Space, Pose Space, Local with Parent.
This patch adds Custom Space with a custom object to define the evaluation space.

The Custom Space option uses the Local Space of an other object/bone/vertex group.
If selected on owner or target it will show a box for object selection.
If an armature is selected, then it will also show a box for bone selection.
If a mesh object is selected it will show the option for using the local space of a vertex group.

It looks like this in the UI:
{F8731291}

The motivation for this patch is the following situation.
If you have a copy location constraint in your armature you are already limited when you want to use a specific axis. It can be done, but its unneccessarily difficult (as far as I know). But the situation is close to impossible as soon as you have a root bone in your armature (which I was told you always want). I need to only copy the location along a custom axis for a lot of things. The same goes for copy rotation/scale and all the limit constraints because I need to make that axis relative to the root bone transform.

Here is a demo video:
{F8498960}
This is the file of that video:
{F8647541}

This is the file for the tests included in this patch:
{F8699677}

File intended for acceptance test:
{F8879818}

Reviewed By: #animation_rigging, sybren, Severin, angavrilov

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

Commit Details:

Full Hash: f1190ff6c5ef5a74adab0efcc7631771d96eb4ed
Parent Commit: 1176591
Committed By: Alexander Gavrilov
Lines Changed: +398, -95

9 Modified Paths:

/release/scripts/startup/bl_ui/properties_constraint.py (+16, -7) (Diff)
/source/blender/blenkernel/BKE_constraint.h (+4, -0) (Diff)
/source/blender/blenkernel/intern/constraint.c (+228, -76) (Diff)
/source/blender/blenkernel/intern/fcurve_driver.c (+4, -4) (Diff)
/source/blender/editors/armature/armature_add.c (+13, -4) (Diff)
/source/blender/makesdna/DNA_constraint_types.h (+10, -3) (Diff)
/source/blender/makesrna/intern/rna_constraint.c (+29, -0) (Diff)
/source/blender/makesrna/intern/rna_object_api.c (+20, -1) (Diff)
/tests/python/bl_constraints.py (+74, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021