[Bf-python] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/python/api2_2x Mesh.c
Yann Vernier
yann at donkey.dyndns.org
Fri Dec 30 21:24:08 CET 2005
On Fri, Dec 30, 2005 at 09:06:18AM -0800, Martin Poirier wrote:
> BPy doesn't take into account the bitfield that
> specifies if the material comes from the object or
> from the obdata, it always assumes obdata. Making it
> work correctly would need some good changes in how we
> handle material lists since the bitfield is per
> object, specifying for each slot where to take the
> material.
> Technically, there is two "real" material lists (ob
> and obdata) and the effective material list
> (intersection of the two based on the bitfield).
Aren't both lists accessible from python (in object and its data) as
well as the bitmask itself? I've had an importer script which relies on
making material lists in obdata with holes so some materials could be
chosen per object. I had to add the support for None as those holes,
however.
http://www.blender.org/modules/documentation/240PythonDoc/Object.Object-class.html#getMaterials
http://www.blender.org/modules/documentation/240PythonDoc/Object.Object-class.html#colbits
http://www.blender.org/modules/documentation/240PythonDoc/NMesh.NMesh-class.html#getMaterials
--
PGP fingerprint = 9242 DC15 2502 FEAB E15F 84C6 D538 EC09 5380 5746
More information about the Bf-python
mailing list