Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemigiusz Fiedler <migius@gmx.net>2010-06-08 15:09:20 +0400
committerRemigiusz Fiedler <migius@gmx.net>2010-06-08 15:09:20 +0400
commitf0b048bf3c5aec68bc470f4214b6ee93bdde2c5b (patch)
tree9f56cf852472dbb10ecbae800118881af2db2b3f
parent5a70fc904555db52210bc376fd2e21ff2227a11e (diff)
tiny correction for PyAPI Background Image: Windows.SetBgImage(image)
function call activates background-image-mode if disabled
-rw-r--r--source/blender/python/api2_2x/Window.c1
-rw-r--r--source/blender/python/api2_2x/doc/Window.py8
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):