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>2009-01-04 17:14:06 +0300
committerTon Roosendaal <ton@blender.org>2009-01-04 17:14:06 +0300
commitf7cb86df3a9ceccc4d649e42735732a608169157 (patch)
tree558a9ba43708a2213b1afa8f46d79f5daa140bc6 /source/blender/blenloader
parent74f9e98c828c17910405092785633373d4ae88e8 (diff)
2.5
Think global, act local! The old favorite G.scene gone! Man... that took almost 2 days. Also removed G.curscreen and G.edbo. Not everything could get solved; here's some notes. - modifiers now store current scene in ModifierData. This is not meant for permanent, but it can probably stick there until we cleaned the anim system and depsgraph to cope better with timing issues. - Game engine G.scene should become an argument for staring it. Didn't solve this yet. - Texture nodes should get scene cfra, but the current implementation is too tightly wrapped to do it easily.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
-rw-r--r--source/blender/blenloader/intern/writefile.c9
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 843c769b92e..205e80ece7a 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3169,6 +3169,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
for (md=lb->first; md; md=md->next) {
md->error = NULL;
+ md->scene = NULL;
/* if modifiers disappear, or for upward compatibility */
if(NULL==modifierType_getInfo(md->type))
@@ -8436,6 +8437,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if (main->versionfile < 250) {
bScreen *screen;
+ Scene *scene;
Material *ma;
Scene *sce;
Tex *tx;
@@ -8443,6 +8445,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for(screen= main->screen.first; screen; screen= screen->id.next)
do_versions_windowmanager_2_50(screen);
+ /* struct audio data moved to renderdata */
+ for(scene= main->scene.first; scene; scene= scene->id.next)
+ scene->r.audio = scene->audio;
+
/* shader, composit and texture node trees have id.name empty, put something in
* to have them show in RNA viewer and accessible otherwise.
*/
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index c4b02febe10..a34c3cc88a5 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -522,11 +522,11 @@ static void write_renderinfo(WriteData *wd, Main *mainvar) /* for renderdeamon
Scene *sce;
int data[8];
+ /* XXX in future, handle multiple windows with multiple screnes? */
current_screen_compat(mainvar, &curscreen);
- sce= mainvar->scene.first;
- while(sce) {
- if(sce->id.lib==0 && ( sce==G.scene || (sce->r.scemode & R_BG_RENDER)) ) {
+ for(sce= mainvar->scene.first; sce; sce= sce->id.next) {
+ if(sce->id.lib==NULL && ( sce==curscreen->scene || (sce->r.scemode & R_BG_RENDER)) ) {
data[0]= sce->r.sfra;
data[1]= sce->r.efra;
@@ -535,7 +535,6 @@ static void write_renderinfo(WriteData *wd, Main *mainvar) /* for renderdeamon
writedata(wd, REND, 32, data);
}
- sce= sce->id.next;
}
}
@@ -2068,7 +2067,7 @@ static void write_global(WriteData *wd, Main *mainvar)
/* XXX still remap G */
fg.curscreen= screen;
- fg.curscene= G.scene;
+ fg.curscene= screen->scene;
fg.displaymode= G.displaymode;
fg.winpos= G.winpos;
fg.fileflags= (G.fileflags & ~G_FILE_NO_UI); // prevent to save this, is not good convention, and feature with concerns...