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>2004-01-01 22:21:06 +0300
committerMartin Poirier <theeth@yahoo.com>2004-01-01 22:21:06 +0300
commit7f9097334409201a9534d214570d9b1a55ac9f16 (patch)
tree4c9f40eacd8ecfed514135a92f30d8d7f5be55c5 /source/blender/src
parent4b6bc29bf27c49f3545eac13d922d1ef03c655a7 (diff)
Fix a problem that has been bugging me for a while. Tracking axis by default are different for Lamp and Camera than for the rest. For the constraint, it wasn't using the correct ones for them, so obviously, it didn't track correctly by default.
Fixed by checking the object type and changing the up and track axis accordingly. Also added some comments in the DNA file (recompiling makedna because of comments is fun!)
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/editobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 6db681d9d9f..71b3c4ec844 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -288,6 +288,12 @@ void make_track(void)
data = con->data;
data->tar = BASACT->object;
+ /* Lamp and Camera track differently by default */
+ if (base->object->type == OB_LAMP || base->object->type == OB_CAMERA) {
+ data->reserved1 = TRACK_nZ;
+ data->reserved2 = UP_Y;
+ }
+
add_constraint_to_object(con, base->object);
}
}