[Bf-python] Texture API- first "sketch"

alex mole nal at blueyonder.co.uk
Wed Nov 12 16:38:56 CET 2003


OK, so Texture.flags and Texture.imageFlags will return the bitfields 
directly, and there will be constant dicts called Texture.Flags and 
Texture.ImageFlags for getting information out of these. There will also 
be functions setFlags() and setImageFlags() which work on strings.


What about the stype member though? This stores a number that means 
different things depending on what type of texture it is [if it is an 
envmap texture, stype=0 means something totally different than if it's a 
cloud texture]. Should there just be a constant dict which contains all 
the possible values, with names like 'ENV_ANIM' or 'CLD_COLOR', and 
leave figuring out the proper ones to use to the scripter? This seems 
like the most reasonable option....


Alex



Willian Padovani Germano wrote:
> 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/
> 
> 
> Looks pretty good, congratulations : )!  This will be a great addition to
> bpython : ).  Hint: people at the www.elysiun.com and www.blender.org python
> forums will appreciate knowing that you're making this requested module
> available.
> 
> 
>>To replicate Blender's internals perfectly, the above functions should
>>deal with MTex structures linked to Texture objects.
> 
> 
> Texture is a big module.  Looking at DNA_texture_types.h, as Michel said:
> tex should be internal to mtex and envmap and color band internal to tex.
> Armature/Bones is an example of how to do this, as in NMesh.  It's easy to
> add support for Ipo and Image, since those are already written.
> 
> Forgot to write in the previous email: you can leave the member variables
> that require constant dicts and bitfields for you or someone else to include
> later.  Then do the get/set methods using the strings.
> 
> Congratulations again, Alex.
> 
> --
> Willian, wgermano at ig.com.br
> 
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://www.blender.org/mailman/listinfo/bf-python
> 



________________________________________________________________________
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