[Bf-committers] RE: [Bf-python] New Python Function - Patch

Austin Benesh doccoaster at msn.com
Tue Feb 22 04:42:26 CET 2005


Ok, here is the patch for the documentation. The way this function works:

getPixelColor(x,y)

X,Y are (obviously) the coordinates of the pixel you want to know the color
of. It returns 4 floats in the range of 0-1 (not 0-255) in the form of
[r,g,b,a]. I am going to start working on a setPixelColor(x,y) as well.

-----Original Message-----
From: Austin Benesh [mailto:doccoaster at msn.com] 
Sent: Monday, February 21, 2005 8:23 PM
To: 'Blender Foundation Python list'
Subject: RE: [Bf-python] New Python Function - Patch

Ok, I will submit that patch as well.

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Stephen Swaney
Sent: Monday, February 21, 2005 7:33 PM
To: Blender Foundation Python list
Subject: Re: [Bf-python] New Python Function - Patch

On Mon, Feb 21, 2005 at 07:21:55PM -0700, Austin Benesh wrote:
> I guess I just meant if the patch was written wrong please tell me.

Ok.

There is nothing that says what the new method does in Image.c
 and you did not add your method to api2_2/doc/Image.py

-- 
Stephen Swaney			
sswaney at centurytel.net

_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python
-------------- next part --------------
Index: source/blender/python/api2_2x/doc/Image.py
================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/Image.py,v
retrieving 1.94
diff -u -p -r1.94Image.py
+++source/blender/python/api2_2x/Image.py 21 Feb 2005 20:35:50 -0700
@@+71,1@@
+ at cvar getPixelColor: The color [r,g,b,a] of a specified pixel (x,y).
+  """

@@+181,1@@
+def getPixelColor(x,y)
+    """
+    Pixel Color: retrieves the color of a pixel.
+    @type x: int, y: int
+    @param x: The coordinate of the pixel along the x-axis.
+    @param y: The coordinate of the pixel along the y-axis.
+    @returns: list 4 floats (min 0 - max 1) [r,g,b,a]
+    """


More information about the Bf-committers mailing list