THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/04/2007 at 00:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.6
Platform:
Language(s) : C++ ;
---------
I need the Texturename (and path) from the colorchannel in a material.
Following the examples I found here, thats my code:
BaseMaterial* mat = P406Exporter.doc->GetFirstMaterial();
BaseChannel* pChannel = mat->GetChannel(CHANNEL_COLOR);
if (pChannel)
{
// Extract full image file path
Filename suggestedFolder = pChannel->GetData().GetFilename(BASECHANNEL_SUGGESTEDFOLDER);
String map = pChannel->GetData().GetString(BASECHANNEL_TEXTURE);
Filename fullpath = suggestedFolder + Filename(map);
}
But the filename is always empty.
GenerateTexturePath(P406Exporter.doc->GetDocumentPath(), Filename(pChannel->GetData().GetString(BASECHANNEL_TEXTURE)), Filename(), &path;) ;
This one returns an empty filename too.
I had no problems accessing other values in the different channels, but this seems to be stored different than the other values.
I find it a little confusing how the values are stored and I somehow never now how to access them (getParameter, getContainer, getData, getDataInstance)
Any suggestions are welcome