Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Dick <weasel>2020-12-03 12:42:29 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-12-03 13:20:21 +0300
commita6c4e39876d8a0765290312f6d8c0175274114cd (patch)
tree98568a07fb46bb643cee07ea0ac08991f4f4db2e /source/blender/makesdna
parent899dcc5f60667a54d9628fcb5656f7e9db642068 (diff)
Add Custom Object Space to Constraints
Add Custom Space to the list of space conversions for constraints. Constraints can use World Space, Local Space, Pose Space, Local with Parent, and now also 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. Reviewed By: #animation_rigging, sybren, Severin, angavrilov Differential Revision: https://developer.blender.org/D7437
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 70d33d9ff94..ddc1b3bd9d7 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -61,12 +61,17 @@ typedef struct bConstraint {
/** Space that target should be evaluated in (only used if 1 target). */
char tarspace;
- /** Constraint name, MAX_NAME. */
- char name[64];
-
/* An "expand" bit for each of the constraint's (sub)panels (uiPanelDataExpansion). */
short ui_expand_flag;
+ /** Object to use as target for Custom Space of owner. */
+ struct Object *space_object;
+ /** Subtarget for Custom Space of owner - pchan or vgroup name, MAX_ID_NAME-2. */
+ char space_subtarget[64];
+
+ /** Constraint name, MAX_NAME. */
+ char name[64];
+
/** Amount of influence exherted by constraint (0.0-1.0). */
float enforce;
/** Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail. */
@@ -722,6 +727,8 @@ typedef enum eBConstraint_Flags {
typedef enum eBConstraint_SpaceTypes {
/** Default for all - worldspace. */
CONSTRAINT_SPACE_WORLD = 0,
+ /** For all - custom space. */
+ CONSTRAINT_SPACE_CUSTOM = 5,
/**
* For objects (relative to parent/without parent influence),
* for bones (along normals of bone, without parent/rest-positions).