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:
authorJoerg Mueller <nexyon@gmail.com>2011-08-01 15:44:20 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-08-01 15:44:20 +0400
commit3e85ec432ef050563d75488eca3049b77497153d (patch)
tree147c765f8b099b0d525c5e55ccc6a70995632509 /source/blender/editors/object/object_relations.c
parentf3c867c3dbde6919653e7cc712099e48b7508715 (diff)
3D Audio GSoC:
Adds new speaker object type. Notes: * Needs some nice icons * Quickily review by Joshua Leung (5 mins) * Properties UI updated (with help of Thomans Dinges) * Speakers have their own theme color * No real audio functionality yet. * Minor bug regarding lamps/lattices fixed in interface_templates.c I personality tested: * Creation, Deletion, Duplication * Saving, Loading * Library linking (incl. make local) * Tracking * Dope Sheet, Outliner * Animation * Drawing (incl. Theme)
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index f21241b6e7a..ab9c69988fe 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -45,6 +45,7 @@
#include "DNA_meta_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
+#include "DNA_speaker_types.h"
#include "DNA_world_types.h"
#include "DNA_object_types.h"
@@ -971,8 +972,8 @@ static int track_set_exec(bContext *C, wmOperator *op)
data->tar = obact;
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
- /* Lamp and Camera track differently by default */
- if (ob->type == OB_LAMP || ob->type == OB_CAMERA)
+ /* Lamp, Camera and Speaker track differently by default */
+ if (ob->type == OB_LAMP || ob->type == OB_CAMERA || ob->type == OB_SPEAKER)
data->trackflag = TRACK_nZ;
}
}
@@ -990,8 +991,8 @@ static int track_set_exec(bContext *C, wmOperator *op)
data->tar = obact;
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
- /* Lamp and Camera track differently by default */
- if (ob->type == OB_LAMP || ob->type == OB_CAMERA) {
+ /* Lamp, Camera and Speaker track differently by default */
+ if (ob->type == OB_LAMP || ob->type == OB_CAMERA || ob->type == OB_SPEAKER) {
data->reserved1 = TRACK_nZ;
data->reserved2 = UP_Y;
}
@@ -1011,8 +1012,8 @@ static int track_set_exec(bContext *C, wmOperator *op)
data->tar = obact;
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
- /* Lamp and Camera track differently by default */
- if (ob->type == OB_LAMP || ob->type == OB_CAMERA) {
+ /* Lamp, Camera and Speaker track differently by default */
+ if (ob->type == OB_LAMP || ob->type == OB_CAMERA || ob->type == OB_SPEAKER) {
data->trackflag = TRACK_nZ;
data->lockflag = LOCK_Y;
}
@@ -1481,6 +1482,9 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
ob->data= copy_armature(ob->data);
armature_rebuild_pose(ob, ob->data);
break;
+ case OB_SPEAKER:
+ ob->data= copy_speaker(ob->data);
+ break;
default:
if (G.f & G_DEBUG)
printf("ERROR single_obdata_users: can't copy %s\n", id->name);