How to change DzMaterial image map in the property
GenerationX
Posts: 56
It seems there is no such function for the "setMap" like the scripting!
DzNode *node = dzScene->findNodeByLabel(nodeName); if (!node)return;
DzObject *obj = node->getObject(); if (!obj)return;
int numShapes = obj->getNumShapes();
for (int s = 0; s < numShapes; s++) {
DzShape *shape = obj->getShape(s); if (!shape)break;
DzMaterial *mat = shape->findMaterial(matName); if (!mat)break;
DzProperty *prop = mat->findProperty(propName); if (!prop)break;
prop->setMap(texturePath); //<---= How to change DzMaterial image map!!!!
}
Post edited by GenerationX on
Comments
Although the syntax is slightly different, the API is the same.
In script, where you would use...
... in C++, you would use...
-Rob
Forgot about the DzNumericProperty... Its working now :)....
Thanks
Dare
Some how when rendering in a Image-Series, the suface shaders do not update and a white texture is rendered, the veiw-port is updated ok! Any way of turning the surfaces image update back on?