diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-26 18:05:01 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-26 18:05:01 +0400 |
commit | ba0ef7a592ace7d6baa5c5f1342706de4e70b2e8 (patch) | |
tree | 2bfb462aac626a4e9bfd868b046722a14cdb959d /source | |
parent | f09d36d6bce6f2fb9f618f9bf57a91a3502ba3eb (diff) |
Fix #29030: render operator only used scene property if layers was used, now it
is possible to specify the scene without the layer too.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 17 | ||||
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 2 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 18 |
4 files changed, 34 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 1e5b69dc4ee..6e09aefeea2 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1083,6 +1083,7 @@ Object *add_only_object(int type, const char *name) /* ob->pad3 == Contact Processing Threshold */ ob->m_contactProcessingThreshold = 1.; ob->obstacleRad = 1.; + ob->col_group = ob->col_mask = 1; /* NT fluid sim defaults */ ob->fluidsimFlag = 0; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 9ac0fab3b81..45ab4a5cdaf 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10464,7 +10464,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) sce->gm.dome.warptext = sce->r.dometext; //Stand Alone - sce->gm.fullscreen = sce->r.fullscreen; sce->gm.xplay = sce->r.xplay; sce->gm.yplay = sce->r.yplay; sce->gm.freqplay = sce->r.freqplay; @@ -12191,6 +12190,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + + { + /* Initialize BGE exit key to esc key */ + Scene *scene; + for(scene= main->scene.first; scene; scene= scene->id.next) { + if (!scene->gm.exitkey) + scene->gm.exitkey = 218; //218 is the Blender key code for ESC + } + } + + { + /* Initialize default values for collision masks */ + Object *ob; + for(ob=main->object.first; ob; ob=ob->id.next) + ob->col_group = ob->col_mask = 1; + } } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index 98828c58511..1d82c862dbd 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -165,6 +165,8 @@ void IMB_freeImBuf(ImBuf *ibuf) IMB_freezbuffloatImBuf(ibuf); freeencodedbufferImBuf(ibuf); IMB_metadata_free(ibuf); + if (ibuf->dds_data.data != NULL) + free(ibuf->dds_data.data); MEM_freeN(ibuf); } } diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 140dbadee60..b1781f1703e 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -365,6 +365,7 @@ int main(int argc, char** argv) GHOST_TEmbedderWindowID parentWindow = 0; bool isBlenderPlayer = false; int validArguments=0; + bool samplesParFound = false; GHOST_TUns16 aasamples = 0; #ifdef __linux__ @@ -406,6 +407,8 @@ int main(int argc, char** argv) initglobals(); + // Blender's VBOs cause odd problems with modifiers (we have our own vbo code) + U.gameflags |= USER_DISABLE_VBO; // We load our own G.main, so free the one that initglobals() gives us free_main(G.main); G.main = NULL; @@ -581,8 +584,14 @@ int main(int argc, char** argv) break; case 'm': i++; + samplesParFound = true; if ((i+1) <= validArguments ) - aasamples = atoi(argv[i++]); + aasamples = atoi(argv[i++]); + else + { + error = true; + printf("error: No argument supplied for -m"); + } break; case 'c': i++; @@ -818,7 +827,7 @@ int main(int argc, char** argv) if ((!fullScreenParFound) && (!windowParFound)) { // Only use file settings when command line did not override - if (scene->gm.fullscreen) { + if ((scene->gm.playerflag & GAME_PLAYER_FULLSCREEN)) { //printf("fullscreen option found in Blender file\n"); fullScreen = true; fullScreenWidth= scene->gm.xplay; @@ -847,6 +856,9 @@ int main(int argc, char** argv) else scene->gm.stereoflag = STEREO_ENABLED; + if (!samplesParFound) + aasamples = scene->gm.aasamples; + if (stereoFlag == STEREO_DOME){ stereomode = RAS_IRasterizer::RAS_STEREO_DOME; scene->gm.stereoflag = STEREO_DOME; @@ -892,7 +904,7 @@ int main(int argc, char** argv) #endif { app.startFullScreen(fullScreenWidth, fullScreenHeight, fullScreenBpp, fullScreenFrequency, - stereoWindow, stereomode, aasamples); + stereoWindow, stereomode, aasamples, (scene->gm.playerflag & GAME_PLAYER_DESKTOP_RESOLUTION)); } } else |