On 16/02/2014 at 20:49, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 14
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Using Melange SDK, I am able to run through the list of shader's for each material and get the filename for shader type Xbitmap using the code as below:
BaseMaterial* mat = C4Ddoc->GetFirstMaterial();
while(mat)
{
BaseShader* shader=mat->GetFirstShader();
while (shader)
{
if (shader->GetType() == Xbitmap)
{
Filename filename = shader->GetFileName();
}
shader = shader->GetNext();
}
mat = mat->GetNext();
}
The above code only works with textures with absolute or relative path such as blah.png or //folder/blah.png.
If you have a preset texture path such as "preset://blah.lib4d/folder/blah.png", the above code does not work.
Appreciate if anyone could help or provide pointers on solving this problem.