From f0b048bf3c5aec68bc470f4214b6ee93bdde2c5b Mon Sep 17 00:00:00 2001 From: Remigiusz Fiedler Date: Tue, 8 Jun 2010 11:09:20 +0000 Subject: tiny correction for PyAPI Background Image: Windows.SetBgImage(image) function call activates background-image-mode if disabled --- source/blender/python/api2_2x/Window.c | 1 + source/blender/python/api2_2x/doc/Window.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index c932772f94c..5614cb77e84 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -725,6 +725,7 @@ static PyObject *M_Window_SetBgImage ( PyObject * self , PyObject * args) blimg = Image_FromPyObject( value ); G.vd->bgpic->ima = blimg; + G.vd->flag = V3D_DISPBGPIC|G.vd->flag; BKE_image_signal(blimg, &G.vd->bgpic->iuser, IMA_SIGNAL_RELOAD ); id_us_plus( &blimg->id ); diff --git a/source/blender/python/api2_2x/doc/Window.py b/source/blender/python/api2_2x/doc/Window.py index 293a34631bf..11077881bb3 100644 --- a/source/blender/python/api2_2x/doc/Window.py +++ b/source/blender/python/api2_2x/doc/Window.py @@ -226,16 +226,16 @@ def SetPivot (pivot): def GetBgImage(): """ - Get the Background Image from current 3D-View (or None). + Get Background Image from current 3D-View (or None). @return: Blender Image or None """ def SetBgImage(image): """ - Set the Image as Background Image of current 3D-View. - @param image: The new Image. + Set the Image as Background Image in current 3D-View and turn it on. + @param image: the new Image. @type image: Blender Image or None. - @None resets/turn off Background Image. + @None removes current Background Image. """ def WaitCursor (bool): -- cgit v1.2.3