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:
authorMartin Poirier <theeth@yahoo.com>2003-10-21 17:22:07 +0400
committerMartin Poirier <theeth@yahoo.com>2003-10-21 17:22:07 +0400
commit4efdabfbbc3f4f79328241e8b59002d869ae247a (patch)
tree5d3dae23f261a779e552520c4224a147090dabe4 /source/blender/makesdna
parent2da9cb5db284e16d95ff7e65dda9174c6b668950 (diff)
Constraint stuff from tuhopuu including (but probably not limited too):
Axis options for TrackTo LockTrack FollowPath Auto creation of TrackTo constraint from Ctrl-T (old track still an option) Auto creation of FollowPath when parenting to path (Normal parent still an option) Backward compatibility stuff to convert the per object axis settings to per constraint when a Track constraint is present. Function to convert old track to constraint (commented out) Revamped the constraints interface with Matt's work from tuhopuu and the stuff we were discussing earlier. -------------------- For coders: unique_constraint_name and *new_constraint_data moved to the kernel (constraint.c) new Projf function in arithb gives the projection of a vector on another vector add_new_constraint now takes a constraint type (int) parameter add_constraint_to_object(bConstraint *con, Object *ob) to link a constraint to an object add_constraint_to_client(bConstraint *con) to link constraint to current client (object or bone) add_influence_key_to_constraint (bConstraint *con) to (eventually) add a keyframe to the influence IPO of a constraint
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 02199b9aa01..7cd0272a8cb 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -109,9 +109,21 @@ typedef struct bActionConstraint{
char subtarget[32];
} bActionConstraint;
-/* Single-target object constraints */
+/* Locked Axis Tracking constraint */
+typedef struct bLockTrackConstraint{
+ Object *tar;
+ int trackflag;
+ int lockflag;
+ char subtarget[32];
+} bLockTrackConstraint;
+
+/* Follow Path constraints */
typedef struct bFollowPathConstraint{
Object *tar; /* Must be path object */
+ float offset; /* Offset in time on the path (in frame) */
+ int followflag;
+ int trackflag;
+ int upflag;
} bFollowPathConstraint;
/* Zero-target constraints */
@@ -126,7 +138,7 @@ typedef struct bRotationConstraint{
#define CONSTRAINT_TYPE_CHILDOF 1 /* Unimplemented */
#define CONSTRAINT_TYPE_TRACKTO 2
#define CONSTRAINT_TYPE_KINEMATIC 3
-#define CONSTRAINT_TYPE_FOLLOWPATH 4 /* Unimplemented */
+#define CONSTRAINT_TYPE_FOLLOWPATH 4
#define CONSTRAINT_TYPE_ROTLIMIT 5 /* Unimplemented */
#define CONSTRAINT_TYPE_LOCLIMIT 6 /* Unimplemented */
#define CONSTRAINT_TYPE_SIZELIMIT 7 /* Unimplemented */
@@ -135,6 +147,7 @@ typedef struct bRotationConstraint{
#define CONSTRAINT_TYPE_SIZELIKE 10 /* Unimplemented */
#define CONSTRAINT_TYPE_PYTHON 11 /* Unimplemented */
#define CONSTRAINT_TYPE_ACTION 12
+#define CONSTRAINT_TYPE_LOCKTRACK 13 /* New Tracking constraint that locks an axis in place - theeth */
/* bConstraint.flag */
#define CONSTRAINT_EXPAND 0x00000001
@@ -154,5 +167,21 @@ typedef struct bRotationConstraint{
#define LOCLIKE_Y 0x00000002
#define LOCLIKE_Z 0x00000004
+/* Tracking flags */
+#define LOCK_X 0x00000000
+#define LOCK_Y 0x00000001
+#define LOCK_Z 0x00000002
+
+#define UP_X 0x00000000
+#define UP_Y 0x00000001
+#define UP_Z 0x00000002
+
+#define TRACK_X 0x00000000
+#define TRACK_Y 0x00000001
+#define TRACK_Z 0x00000002
+#define TRACK_nX 0x00000003
+#define TRACK_nY 0x00000004
+#define TRACK_nZ 0x00000005
+
#endif