[Bf-committers] mat_nr confusion

Daniel Dunbar evilzr at yahoo.com
Sun Jul 31 19:16:11 CEST 2005


Note that 'ome key' on my keyboard are not
'orking, 'o I'll be u'ing an ' for the '
and ' key'. ;)

>   - What is ob->actcol *exactly*?

actcol i' the inde' of the active material, a'
determined by the interface. thi' inde' i'
one-ba'ed (u'er' like one-ba'ed).

>   - What is ob->totcol *exactly*?

the total number of material indice' 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 indice' into the material array ('hich may
be on the object or the object data (nurb' in thi' ca'e).
Generally for me'he' it i' zero for no mat. indice', but
nurb code may have a different convention. check code.

>   - What is this ob->colbits business?

colbit' i' a ma'k that indicate' 'hich material' are on the
object and 'hich are on the object data. If colbit&(1<<inde')
i' true then material _inde'_ 'hould be read from the object
material array.

Hope that help' a bit.


daniel dunbar


More information about the Bf-committers mailing list