[Bf-python] material lists

Willian Padovani Germano wgermano at ig.com.br
Wed Jul 21 05:36:14 CEST 2004


Hi all, yet another email from me...

Based on the patch and info sent by Yann I've added get/setMaterials methods
to NMesh, like the ones in Object, but updated both get methods to accept an
optional parameter:

.getMaterials() is like the old way, only existing materials are returned;
.getMaterials(1) returns also empty material slots, as None entries.

and both setMaterials and the nmesh.materials attribute accept None in the
mat lists.  Once you call nmesh.getMaterials, nmesh.materials is updated to
reflect your choice (only existing mats or also None's).

I've made some tests, but the more the better, please report any problem you
guys find.  Thanks again for the explanations, bug-hunting and patch, Yann.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list