[Bf-python] Texture API- first "sketch"
alex mole
nal at blueyonder.co.uk
Wed Nov 12 02:29:11 CET 2003
Hi
I'm creating the Texture.py docfile first, as it should provide a good
description of the Texture API. I've epydoc'd it and put it here:
http://www.geocities.com/lordbosh/Texture/
This first sketch should give an idea of what I'm aiming at. There are
still several other classes I need to plan: MTex, EnvMap and ColorBand.
Also, the Texture class is missing any reference to the flags, imaflags
and stype fields of the Blender Tex struct. This is because I am waiting
on your advice [see my earlier post ;)] before I decide how to implement
these.
As well as creating this new module, I plan on adding the following
functions to Material.Material:
getTextures()- returns the 8 texture channels as an 8-tuple with None
for empty channels and Texture objects in the rest
setTexture(num,tex)- set channel _num_ to texture _tex_
clearTexture(num)- remove a texture from channel _num_
To replicate Blender's internals perfectly, the above functions should
deal with MTex structures linked to Texture objects. However, I think
that there should also be versions to deal with Texture objects
directly, as these will probably be needed more often. Perhaps variants
getMTextures() and setMTexture(num,mtex) could be supplied for dealing
with MTex objects?
Let me know what you think!
[BTW, some parts of this are already implemented. If anyone wants to
play with them, I can send you a diff or something....]
Alex
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
More information about the Bf-python
mailing list