Docs: add doc-string for BMFace.mat_nr struct member

This commit is contained in:
Campbell Barton 2022-05-05 17:15:36 +10:00
parent ddbac88c08
commit 0f567ada9d
1 changed files with 14 additions and 2 deletions

View File

@ -265,8 +265,20 @@ typedef struct BMFace {
* (the length of #BMFace.l_first circular linked list).
*/
int len;
float no[3]; /* face normal */
short mat_nr; /* material index */
/**
* Face normal, see #BM_face_calc_normal.
*/
float no[3];
/**
* Material index, typically >= 0 and < #Mesh.totcol although this isn't enforced
* Python for e.g. can set this to any positive value since scripts may create
* mesh data first and setup material slots later.
*
* When using to index into a material array it's range should be checked first,
* values exceeding the range should be ignored or treated as zero
* (if a material slot needs to be used - when drawing for e.g.)
*/
short mat_nr;
// short _pad[3];
} BMFace;