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:
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 225e6e73563..e9418ca9f9f 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"
@@ -75,6 +76,7 @@
#include "BKE_report.h"
#include "BKE_sca.h"
#include "BKE_scene.h"
+#include "BKE_speaker.h"
#include "BKE_texture.h"
#include "WM_api.h"
@@ -971,8 +973,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 +992,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 +1013,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;
}
@@ -1495,6 +1497,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);