flaiver
08-15-2008, 05:39 PM
Hello
I try to use the MRenderUtil::renderObjectItem but I don't understand, how to use this function. I access the objectId while softwareRendering with this code:
--initialize--
aObjectId=nAttr.create("objectId","oi",MFnNumericData::kInt,0.0,&stat);
--compute--
MDataHandle aObjectIdHandle=data.inputValue(aObjectId,&stat);
I use kInt, cause the docs tell us:
objectId (oi) int unique ID for the object being shaded, may not be the same ID across frames
now, I want to get access to the corresponding MObject to my object Id. For this, i want to use MRenderUtil::renderObjectItem but unfortunately, this function doesn't expect a int value as objectId, but a const void* parameter. In fact, I have no idea, what type of parameter this function expects. Any ideas?
Best
fllaiver
I try to use the MRenderUtil::renderObjectItem but I don't understand, how to use this function. I access the objectId while softwareRendering with this code:
--initialize--
aObjectId=nAttr.create("objectId","oi",MFnNumericData::kInt,0.0,&stat);
--compute--
MDataHandle aObjectIdHandle=data.inputValue(aObjectId,&stat);
I use kInt, cause the docs tell us:
objectId (oi) int unique ID for the object being shaded, may not be the same ID across frames
now, I want to get access to the corresponding MObject to my object Id. For this, i want to use MRenderUtil::renderObjectItem but unfortunately, this function doesn't expect a int value as objectId, but a const void* parameter. In fact, I have no idea, what type of parameter this function expects. Any ideas?
Best
fllaiver
