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:
authorJoshua Leung <aligorith@gmail.com>2007-04-07 07:32:57 +0400
committerJoshua Leung <aligorith@gmail.com>2007-04-07 07:32:57 +0400
commit655f9a61dee5a308a93c2ac83cba31dbfe0cb062 (patch)
treef706ca179a7cbdca8a7a39106e0c652a1e055668 /source/blender/makesdna
parent999e405543690e08283ef940873af3d660b3bfe2 (diff)
== Clamp-To Constraint (was Patch #4818) ==
This (new) constraint limits the location of an object/bone to the range of locations on a given curve. It works by comparing the location of the owner on one axis, to the extents of the curve's bounding-box on the same axis, to find the location on the curve. Usage Notes: * 'Ob:' field must point to a valid curve object * This curve should have 'Path' turned on in order for this constraint to work. You don't really need to do this as it will be taken care of by the code. * 'Auto' toggle automically determines which axis should be used for the distance estimations/calculations. It is the default option, but may not work that well for some cases. * X/Y/Z toggles can be used to select the axis to use for these calculations. Try to choose the axis along which the curve stretches out for most. Python Notes: Python API access for this constraint is not included in this commit. Will be coming soon.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 6cf1403b803..bb4065605e7 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -216,6 +216,13 @@ typedef struct bRigidBodyJointConstraint{
short pad2;
} bRigidBodyJointConstraint;
+/* ClampTo Constraint */
+typedef struct bClampToConstraint {
+ Object *tar; /* 'target' must be a curve */
+ int flag; /* which plane to find object on */
+ int pad;
+} bClampToConstraint;
+
/* bConstraint.type */
#define CONSTRAINT_TYPE_NULL 0
#define CONSTRAINT_TYPE_CHILDOF 1 /* Unimplemented */
@@ -235,6 +242,7 @@ typedef struct bRigidBodyJointConstraint{
#define CONSTRAINT_TYPE_STRETCHTO 15 /* claiming this to be mine :) is in tuhopuu bjornmose */
#define CONSTRAINT_TYPE_MINMAX 16 /* floor constraint */
#define CONSTRAINT_TYPE_RIGIDBODYJOINT 17 /* rigidbody constraint */
+#define CONSTRAINT_TYPE_CLAMPTO 18 /* clampto constraint */
/* bConstraint.flag */
/* expand for UI */
@@ -310,6 +318,11 @@ typedef struct bRigidBodyJointConstraint{
#define PLANE_Y 0x01
#define PLANE_Z 0x02
+#define CLAMPTO_AUTO 0
+#define CLAMPTO_X 1
+#define CLAMPTO_Y 2
+#define CLAMPTO_Z 3
+
/* bKinematicConstraint->flag */
#define CONSTRAINT_IK_TIP 1
#define CONSTRAINT_IK_ROT 2