[Bf-python] UV mapping, mirror image and Python
Christian Monfort
monfort.c at gmail.com
Thu Jan 10 23:26:43 CET 2008
Toni Alatalo a écrit :
> Carsten Wartmann kirjoitti:
>
>> Christian Monfort schrieb:
>>
>>
>>> When using "UV/Image Editor" in Blender UI, you can mirror image along X
>>> and/or Y axis by pressing M-KEY.
>>>
>>>
>> 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).
>>
>>
>
>
Thanks a lot, it's working.
I had to make some more operations (UV-coords translations) because I
must have the UV coords between 0.0 and 1.0. Blender can deal with
UV-coords outside this range, but not the application that will use the
model.
> just mentioning for completeness,
>
> that i suppose another possibility is to add the func to the api,
> especially if it already is a clean separate function on the c side it's
> simple to add such things,
>
>
That was my first idea... But a quick look in the code made my thing it
was not easy task; it seems to me the C function that makes the job is
well mixed with UI code, but maybe I'm wrong on this - that was really a
"quick look".
> but as the op is so simple, and the data is not much (hence c speed not
> needed), it might not be necessary at all. but just for info
>
>
>> Carsten
>>
>
> single-handedly yours (baby in other hand :)
> ~Toni
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>
>
More information about the Bf-python
mailing list