Merging trunk up to r39145.
[blender-staging.git] / source / blender / blenloader / intern / writefile.c
index 7d65248c0e92ce4963438b210a9d0188bc25ef7e..5099b52a988a7de6561809ff0732b956ef3b91c3 100644 (file)
@@ -123,6 +123,7 @@ Any case: direct data is ALWAYS after the lib block
 #include "DNA_smoke_types.h"
 #include "DNA_space_types.h"
 #include "DNA_screen_types.h"
+#include "DNA_speaker_types.h"
 #include "DNA_sound_types.h"
 #include "DNA_text_types.h"
 #include "DNA_view3d_types.h"
@@ -1918,6 +1919,9 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
                                                case SEQ_TRANSFORM:
                                                        writestruct(wd, DATA, "TransformVars", 1, seq->effectdata);
                                                        break;
+                                               case SEQ_TITLECARD:
+                                                       writestruct(wd, DATA, "TitleCardVars", 1, seq->effectdata);
+                                                       break;
                                                }
                                        }
                                        
@@ -2340,6 +2344,23 @@ static void write_texts(WriteData *wd, ListBase *idbase)
        mywrite(wd, MYWRITE_FLUSH, 0);
 }
 
+static void write_speakers(WriteData *wd, ListBase *idbase)
+{
+       Speaker *spk;
+
+       spk= idbase->first;
+       while(spk) {
+               if(spk->id.us>0 || wd->current) {
+                       /* write LibData */
+                       writestruct(wd, ID_SPK, "Speaker", 1, spk);
+                       if (spk->id.properties) IDP_WriteProperty(spk->id.properties, wd);
+
+                       if (spk->adt) write_animdata(wd, spk->adt);
+               }
+               spk= spk->id.next;
+       }
+}
+
 static void write_sounds(WriteData *wd, ListBase *idbase)
 {
        bSound *sound;
@@ -2518,6 +2539,7 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil
        write_keys     (wd, &mainvar->key);
        write_worlds   (wd, &mainvar->world);
        write_texts    (wd, &mainvar->text);
+       write_speakers (wd, &mainvar->speaker);
        write_sounds   (wd, &mainvar->sound);
        write_groups   (wd, &mainvar->group);
        write_armatures(wd, &mainvar->armature);