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:
authorTon Roosendaal <ton@blender.org>2005-08-25 00:18:03 +0400
committerTon Roosendaal <ton@blender.org>2005-08-25 00:18:03 +0400
commitdfb654ba60154e6aad52047e6f44da37d1782952 (patch)
tree946ff8717a14dcb5f67576a53745f1eb8384310b /source/blender/makesdna/DNA_constraint_types.h
parentbc3f228bc9ccae8382c0a01d626301e604819088 (diff)
Huge commit, but not much features... had to shuffle a lot of code around.
Main target was cleanup of editconstraint.c and removal of the ugly ob->activecon (active constraint channel), which was set by the "Show" button in the Constraint Panel. Better is to introduce an 'Active Constraint' itself, which stores in the Constraint itself. By using this setting, and by checking the active Bone, the UI can update reliably now. This only shows now in IpoWindow btw (for constraint ipos). The active Constraint is drawn in the Buttons with a slightly brighter backdrop. Any action in that Panel selects a constraint now (even click in backdrop). So now we have pose channels & constraint channels nicely behaving. Now the darn Action channels... :) Further in this commit: - interface.c: Button ROUNDBOX now does button callback too. Button NUMSLI didn't do the callback on a click only - Cleaned up include files in yafray, got annoyed it compiled over all the time. - removed unused variables from Constraint struct
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h75
1 files changed, 37 insertions, 38 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 95c1053ba8e..7a1c899edb5 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -40,6 +40,7 @@
struct Action;
+/* channels reside in Object or Action (ListBase) constraintChannels */
typedef struct bConstraintChannel{
struct bConstraintChannel *next, *prev;
Ipo *ipo;
@@ -50,17 +51,12 @@ typedef struct bConstraintChannel{
typedef struct bConstraint{
struct bConstraint *next, *prev;
void *data; /* Constraint data (a valid constraint type) */
- char type; /* Constraint type */
- char otype; /* Old type - for menu callbacks */
+ short type; /* Constraint type */
short flag; /* Flag */
short reserved1;
char name[30]; /* Constraint name */
float enforce;
- float time;
- float offset[3]; /* Target location offset */
- float orient[3]; /* Target orientation offset */
- float roll[3]; /* Target roll offset (needed?) */
} bConstraint;
/* Single-target subobject constraints */
@@ -173,44 +169,47 @@ typedef struct bStretchToConstraint{
/* bConstraint.flag */
-#define CONSTRAINT_EXPAND 0x00000001
-#define CONSTRAINT_DONE 0x00000002
-#define CONSTRAINT_DISABLE 0x00000004
-#define CONSTRAINT_LOOPTESTED 0x00000008
+ /* expand for UI */
+#define CONSTRAINT_EXPAND 0x01
+ /* pre-check for illegal object name or bone name */
+#define CONSTRAINT_DISABLE 0x04
+ /* flags 0x2 and 0x8 were used in past, skip this */
+ /* to indicate which Ipo should be shown, maybe for 3d access later too */
+#define CONSTRAINT_ACTIVE 0x10
/* bConstraintChannel.flag */
-#define CONSTRAINT_CHANNEL_SELECT 0x00000001
+#define CONSTRAINT_CHANNEL_SELECT 0x01
/* bLocateLikeConstraint.flag */
-#define LOCLIKE_X 0x00000001
-#define LOCLIKE_Y 0x00000002
-#define LOCLIKE_Z 0x00000004
-#define LOCSPACE 0x00000008
+#define LOCLIKE_X 0x01
+#define LOCLIKE_Y 0x02
+#define LOCLIKE_Z 0x04
+#define LOCSPACE 0x08
/* Axis 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
-
-#define VOLUME_XZ 0x00000000
-#define VOLUME_X 0x00000001
-#define VOLUME_Z 0x00000002
-#define NO_VOLUME 0x00000003
-
-#define PLANE_X 0x00000000
-#define PLANE_Y 0x00000001
-#define PLANE_Z 0x00000002
+#define LOCK_X 0x00
+#define LOCK_Y 0x01
+#define LOCK_Z 0x02
+
+#define UP_X 0x00
+#define UP_Y 0x01
+#define UP_Z 0x02
+
+#define TRACK_X 0x00
+#define TRACK_Y 0x01
+#define TRACK_Z 0x02
+#define TRACK_nX 0x03
+#define TRACK_nY 0x04
+#define TRACK_nZ 0x05
+
+#define VOLUME_XZ 0x00
+#define VOLUME_X 0x01
+#define VOLUME_Z 0x02
+#define NO_VOLUME 0x03
+
+#define PLANE_X 0x00
+#define PLANE_Y 0x01
+#define PLANE_Z 0x02
/* bKinematicConstraint->flag */
#define CONSTRAINT_IK_TIP 1