[Bf-python] New Python Function - Patch

Austin Benesh doccoaster at msn.com
Tue Feb 22 06:15:44 CET 2005


Ya, I'm going to start on setPixelColor, save_to_imbuf and/or save_image.
Thanks for the feedback!

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Campbell Barton
Sent: Tuesday, February 22, 2005 9:16 AM
To: Blender Foundation Python list
Subject: Re: [Bf-python] New Python Function - Patch

Hi, just want to let you knbow that I think what your doing is realy 
awesome!
Its opens so many ways of doing image tricks, even if its at python speed-
There are times I have needed this (I write a bake AO back into mesh 
script a while back) - It would be much then re-rendering a new file and 
reloading it.

Eventually there will need to be the option to save the image back to 
the file, probably just wrapping the kind of functionality Texture paint 
alredy uses.

Keep up the good work,
- Cam

Austin Benesh wrote:

>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
>
>  
>
>------------------------------------------------------------------------
>
>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]
>+    """
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Bf-python mailing list
>Bf-python at projects.blender.org
>http://projects.blender.org/mailman/listinfo/bf-python
>  
>


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241

_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list