[Bf-committers] mat_nr confusion

Chris Burt desoto at blender.spaceisbig.com
Sun Jul 31 20:33:42 CEST 2005


To rewards Daniel for his vigilance I shall translate:

Note that some keys on my keyboard are not
working, so I'll be using an ' for the s
and w keys. ;)

- What is ob->actcol *exactly*?

actcol is the index of the active material, as
determined by the interface. this index is
one-based (users like one-based).

- What is ob->totcol *exactly*?

the total number of material indices on the object.

- What are things like nu->mat_nr? It seems they're the material
index _-1_ ? How does this work if no material indices exist?
Is it -1 then?

they are indices into the material array (which may
be on the object or the object data (nurbs in this case).
Generally for meshes it is zero for no mat. indices, but
nurb code may have a different convention. check code.

- What is this ob->colbits business?

colbits is a mask that indicates which materials are on the
object and which are on the object data. If colbit&(1<<index)
is true then material _index_ should be read from the object
material array.

Hope that helps a bit.

Daniel Dunbar



'now 's 'tral'ietd <-- says Dan

Regards,
--Chris


More information about the Bf-committers mailing list