Fix #29030: render operator only used scene property if layers was used, now it
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 26 Oct 2011 14:05:01 +0000 (14:05 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 26 Oct 2011 14:05:01 +0000 (14:05 +0000)
is possible to specify the scene without the layer too.

source/blender/blenkernel/intern/object.c
source/blender/blenloader/intern/readfile.c
source/blender/imbuf/intern/allocimbuf.c
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index 1e5b69d..6e09aef 100644 (file)
@@ -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;
index 9ac0fab..45ab4a5 100644 (file)
@@ -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! */
index 98828c5..1d82c86 100644 (file)
@@ -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);
                }
        }
index 140dbad..b1781f1 100644 (file)
@@ -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