[Bf-python] UV mapping, mirror image and Python

Carsten Wartmann cw at blenderbuch.de
Thu Jan 10 11:49:20 CET 2008


Christian Monfort schrieb:
> Hi,
> 
> When using "UV/Image Editor" in Blender UI, you can mirror image along X 
> and/or Y axis by pressing M-KEY.
> I need to do the same from within a Python script (I've done the UV 
> mapping, and now I need to mirror the image), but I have found nothing 
> about it in Blender Python API documentation.
> 
> 
> Is it possible to do this directly with Python?

You need to do it directly in python. It is not just a call to the API, 
instead you iterate over your UV-Coordinates and multiply every 
Coordinate with -1 (of course only the wanted axis).

How you access the uv coordinates should be clear if your script already 
did the mapping.

Regards,
Carsten

-- 
Carsten Wartmann: Autor - Dozent - 3D - Grafik
Homepage:         http://blenderbuch.de/
Das Blender-Buch: http://blenderbuch.de/redirect.html



More information about the Bf-python mailing list