From aee5cb776223ad007f2e1340907d9f2f4937f054 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 17 Mar 2008 18:01:59 +0000 Subject: - [#8589] Scripts which use file selector not working correctly Fix for another bug I introduced with persistent python windows. also removed unused var. --- source/blender/python/api2_2x/Window.c | 11 +++++++++-- source/blender/src/seqeffects.c | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index 22e19c9f54a..b4a14cc6ac8 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -535,10 +535,17 @@ static void getSelectedFile( char *name ) fprintf(stderr, "BPy error: Callback call failed!\n"); } else Py_DECREF(result); - + + + if (script->py_browsercallback == pycallback) { - SCRIPT_SET_NULL(script); + if (script->flags & SCRIPT_GUI) { + script->py_browsercallback = NULL; + } else { + SCRIPT_SET_NULL(script); + } } + /* else another call to selector was made inside pycallback */ Py_DECREF(pycallback); diff --git a/source/blender/src/seqeffects.c b/source/blender/src/seqeffects.c index ae5b8342535..85693546789 100644 --- a/source/blender/src/seqeffects.c +++ b/source/blender/src/seqeffects.c @@ -986,7 +986,7 @@ static void do_gammacross_effect_float(float facf0, float facf1, float *rect1, float *rect2, float *out) { - float fac1, fac2, col; + float fac1, fac2; int xo; float *rt1, *rt2, *rt; -- cgit v1.2.3