fixes for auto script execution, changing the user preference also updates the global...
[blender.git] / source / blender / windowmanager / intern / wm_operators.c
index 0938c583d2e2ed2e28bd524c437aa2c7f279784e..29359b1ddb93afe5241ca750cd8727efc29f6b37 100644 (file)
@@ -1329,7 +1329,7 @@ static void open_set_load_ui(wmOperator *op)
 static void open_set_use_scripts(wmOperator *op)
 {
        if(!RNA_property_is_set(op->ptr, "use_scripts"))
-               RNA_boolean_set(op->ptr, "use_scripts", (U.flag & USER_SCRIPT_AUTOEXEC_DISABLE));
+               RNA_boolean_set(op->ptr, "use_scripts", !(U.flag & USER_SCRIPT_AUTOEXEC_DISABLE));
 }
 
 static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)