I’m having problems passing objects to mental ray. I’ve used the
technique explained in the SDK (http://softimage.wiki.avid.com/sdkdocs/bf454745.htm#Rbf14868)
but for every object I add to the list, when I call:
mi_query(miQ_INST_ITEM,
NULL, objects[ k ], &objtag)
…objtag never
equals miNULLTAG which makes the shader continue to the next item when it
shouldn’t…
/* No primitive? Check the next one then */
if (objtag != miNULLTAG)
continue;
…so I figured
it was an error with the example and that the doc meant to say:
/* No primitive? Check the next one then */
if (objtag == miNULLTAG)
continue;
…but now,
when the shader calls:
/* Get the label id of the primitive */
if( !mi_query(miQ_OBJ_LABEL, NULL, objtag, &objlabel ) )
continue;
…my objlabel
always has a value of 0. I just don’t understand!! Anyone has any idea why it
does that? What am I doing wrong?
Mathieu
Leclaire
R&D
Programmer
Hybride
Technologies