was using wrong global flag for python script disabling in recent commit.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Feb 2010 12:01:10 +0000 (12:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Feb 2010 12:01:10 +0000 (12:01 +0000)
source/blender/python/intern/bpy_driver.c
source/blender/python/intern/bpy_interface.c
source/blender/windowmanager/intern/wm_operators.c

index a4a28ec53d2fd02c33dfcbcb154b5ddf12b39386..f628e7e8569388d37647f7c1601242424bbe32b5 100644 (file)
@@ -166,7 +166,7 @@ float BPY_pydriver_eval (ChannelDriver *driver)
        if ((expr == NULL) || (expr[0]=='\0'))
                return result;
 
-       if(!(G.fileflags & G_SCRIPT_AUTOEXEC)) {
+       if(!(G.f & G_SCRIPT_AUTOEXEC)) {
                printf("skipping driver '%s', automatic scripts are disabled\n", driver->expression);
                return result;
        }
index db31bd01a7a9f3fd6365543bf3a2c11a27407f33..ec43118d9fc2617535becbfdd47bde145de8b1d5 100644 (file)
@@ -631,7 +631,7 @@ void BPY_load_user_modules(bContext *C)
 
        for(text=CTX_data_main(C)->text.first; text; text= text->id.next) {
                if(text->flags & TXT_ISSCRIPT && BLI_testextensie(text->id.name+2, ".py")) {
-                       if(!(G.fileflags & G_SCRIPT_AUTOEXEC)) {
+                       if(!(G.f & G_SCRIPT_AUTOEXEC)) {
                                printf("scripts disabled for \"%s\", skipping '%s'\n", bmain->name, text->id.name+2);
                        }
                        else {
index 3d8152ce76afff32f9b3e1ef2ba2c2c6a0ed145c..0938c583d2e2ed2e28bd524c437aa2c7f279784e 100644 (file)
@@ -1357,9 +1357,9 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op)
                G.fileflags |= G_FILE_NO_UI;
                
        if(RNA_boolean_get(op->ptr, "use_scripts"))
-               G.fileflags |= G_SCRIPT_AUTOEXEC;
+               G.f |= G_SCRIPT_AUTOEXEC;
        else
-               G.fileflags &= ~G_SCRIPT_AUTOEXEC;
+               G.f &= ~G_SCRIPT_AUTOEXEC;
        
        // XXX wm in context is not set correctly after WM_read_file -> crash
        // do it before for now, but is this correct with multiple windows?