diff options
author | Martin Poirier <theeth@yahoo.com> | 2006-08-13 18:18:15 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2006-08-13 18:18:15 +0400 |
commit | e341a4e1f45d8d3ba47dadc6ee72e94897369098 (patch) | |
tree | c856a30e057d743f82e751fe07376335b91392b6 /source/blender/makesdna/DNA_constraint_types.h | |
parent | cf1964cf9cea690d3800d9852567f01653b7b207 (diff) |
Patch: Constraints to Limit Transforms (#4662) by Joshua Leung (aligorith)
This adds three new constraints to limit the range of location, rotation and scaling values.
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 21380bdcdab..ce351baa4f3 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -170,6 +170,30 @@ typedef struct bStretchToConstraint{ char subtarget[32]; } bStretchToConstraint; +/* transform limiting constraints - zero target */ +typedef struct bLocLimitConstraint{ + float xmin, xmax; + float ymin, ymax; + float zmin, zmax; + short flag; + short flag2; +} bLocLimitConstraint; + +typedef struct bRotLimitConstraint{ + float xmin, xmax; + float ymin, ymax; + float zmin, zmax; + short flag; + short pad1; +} bRotLimitConstraint; + +typedef struct bSizeLimitConstraint{ + float xmin, xmax; + float ymin, ymax; + float zmin, zmax; + short flag; + short pad1; +} bSizeLimitConstraint; /* bConstraint.type */ #define CONSTRAINT_TYPE_NULL 0 @@ -177,9 +201,9 @@ typedef struct bStretchToConstraint{ #define CONSTRAINT_TYPE_TRACKTO 2 #define CONSTRAINT_TYPE_KINEMATIC 3 #define CONSTRAINT_TYPE_FOLLOWPATH 4 -#define CONSTRAINT_TYPE_ROTLIMIT 5 /* Unimplemented */ -#define CONSTRAINT_TYPE_LOCLIMIT 6 /* Unimplemented */ -#define CONSTRAINT_TYPE_SIZELIMIT 7 /* Unimplemented */ +#define CONSTRAINT_TYPE_ROTLIMIT 5 /* Unimplemented no longer :) - Aligorith */ +#define CONSTRAINT_TYPE_LOCLIMIT 6 /* Unimplemented no longer :) - Aligorith */ +#define CONSTRAINT_TYPE_SIZELIMIT 7 /* Unimplemented no longer :) - Aligorith */ #define CONSTRAINT_TYPE_ROTLIKE 8 #define CONSTRAINT_TYPE_LOCLIKE 9 #define CONSTRAINT_TYPE_SIZELIKE 10 @@ -254,5 +278,19 @@ typedef struct bStretchToConstraint{ #define CONSTRAINT_IK_AUTO 4 #define CONSTRAINT_IK_TEMP 8 +/* transform limiting constraints -> flag */ +#define LIMIT_XMIN 0x01 +#define LIMIT_XMAX 0x02 +#define LIMIT_YMIN 0x04 +#define LIMIT_YMAX 0x08 +#define LIMIT_ZMIN 0x10 +#define LIMIT_ZMAX 0x20 + +#define LIMIT_XROT 0x01 +#define LIMIT_YROT 0x02 +#define LIMIT_ZROT 0x04 + +#define LIMIT_NOPARENT 0x01 + #endif |