[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29338] branches/blender2.4/source/blender /python/api2_2x: tiny correction for PyAPI Background Image: Windows. SetBgImage(image)

Remigiusz Fiedler migius at gmx.net
Tue Jun 8 13:09:22 CEST 2010


Revision: 29338
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29338
Author:   migius
Date:     2010-06-08 13:09:20 +0200 (Tue, 08 Jun 2010)

Log Message:
-----------
tiny correction for PyAPI Background Image: Windows.SetBgImage(image)
function call activates background-image-mode if disabled

Modified Paths:
--------------
    branches/blender2.4/source/blender/python/api2_2x/Window.c
    branches/blender2.4/source/blender/python/api2_2x/doc/Window.py

Modified: branches/blender2.4/source/blender/python/api2_2x/Window.c
===================================================================
--- branches/blender2.4/source/blender/python/api2_2x/Window.c	2010-06-08 10:56:59 UTC (rev 29337)
+++ branches/blender2.4/source/blender/python/api2_2x/Window.c	2010-06-08 11:09:20 UTC (rev 29338)
@@ -725,6 +725,7 @@
 	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 );
 

Modified: branches/blender2.4/source/blender/python/api2_2x/doc/Window.py
===================================================================
--- branches/blender2.4/source/blender/python/api2_2x/doc/Window.py	2010-06-08 10:56:59 UTC (rev 29337)
+++ branches/blender2.4/source/blender/python/api2_2x/doc/Window.py	2010-06-08 11:09:20 UTC (rev 29338)
@@ -226,16 +226,16 @@
 
 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):





More information about the Bf-blender-cvs mailing list