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-10-30 00:08:25 +0400
committerTon Roosendaal <ton@blender.org>2005-10-30 00:08:25 +0400
commit4ad59e30a05f10355cf88d8e94dfd51bfbc66ca5 (patch)
tree8d46097ebf547b82ac91be22370fa5799cd6c010 /source/blender/makesdna
parent872b2a03e3ec88016675c1f1fc06a273d387013b (diff)
New: Write Protection for transform values.
You now can set, in NKEY Transform Properties Panel, per XYZ rot/loc/size, a protection for Transform tools to not change these values anymore. This now works for Objects or for Bones in PoseMode. Usage is especially for character animation, to give Bones in a Pose defaults for rotation axes, so you don't have to worry about the correct limitations (or setup complex IK limits). Of course, this feature doesn't influence the animation system. As an extra also the Transform Widgets then draw less handles. Note this is based on the actual locked value, and depends still on Manipulator orientation whether it can be used really. Implementation warning: I had to remove the 'return' in the middle of the editobject.c compatible_eul() call. It now makes nice compatible eulers when they're simple (single axis rotations). Unfortunately there was no note in the code why it was ever removed... ALso: fix for crash in using Crease Transform and Mirror modifier.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_action_types.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h15
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h2
3 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 06066200ead..edc961be779 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -49,6 +49,8 @@ typedef struct bPoseChannel {
short constflag; /* for quick detecting which constraints affect this channel */
short ikflag; /* settings for IK bones */
short pathlen; /* for drawing paths, the amount of frames */
+ short protectflag;/* protect channels from being transformed */
+ short pad, pad1, pad2;
struct Bone *bone; /* set on read file or rebuild pose */
struct bPoseChannel *parent; /* set on read file or rebuild pose */
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 187aeb51dfe..86bcbbf791a 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -119,8 +119,8 @@ typedef struct Object {
short transflag, ipoflag; /* transformation and ipo settings */
short trackflag, upflag;
- short nlaflag, pad;
- short ipowin, scaflag; /* ipowin: blocktype last ipowindow */
+ short nlaflag, protectflag; /* nlaflag defines NLA override, protectflag is bits to lock transform */
+ short ipowin, scaflag; /* ipowin: blocktype last ipowindow */
short scavisflag, boundtype;
short dupon, dupoff, dupsta, dupend;
@@ -387,6 +387,17 @@ extern Object workob;
/* ob->nlaflag */
#define OB_NLA_OVERRIDE 1
+/* ob->protectflag */
+#define OB_LOCK_LOCX 1
+#define OB_LOCK_LOCY 2
+#define OB_LOCK_LOCZ 4
+#define OB_LOCK_ROTX 8
+#define OB_LOCK_ROTY 16
+#define OB_LOCK_ROTZ 32
+#define OB_LOCK_SIZEX 64
+#define OB_LOCK_SIZEY 128
+#define OB_LOCK_SIZEZ 256
+
/* ob->softflag in DNA_object_force.h */
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index f0fe608035a..b745a1f59e0 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -121,7 +121,7 @@ typedef struct View3D {
short modeselect, menunr, texnr;
/* transform widget info */
- short twtype, twmode, twflag, twpad;
+ short twtype, twmode, twflag, twdrawflag;
float twmat[4][4];
/* user defined clipping planes */