THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/10/2006 at 01:52, xxxxxxxx wrote:
hmm, i've found out that my current code:
**
// Extract full image file path
String map = pChannel- >GetData().GetString(BASECHANNEL_TEXTURE);
if (map.GetLength() == 0) return FALSE;
Filename suggestedFolder = pChannel->GetData().GetFilename(BASECHANNEL_SUGGESTEDFOLDER);
if (suggestedFolder.GetString().GetLength() == 0)
// same as the document
suggestedFolder = pDoc->GetDocumentPath();
Filename fullpath = suggestedFolder + Filename(map);
**
fails to retrieve the right path when the map is located within a subfolder of the main scene location (i.e. on c4d samples, textures are usually located in a 'tex' subfolder).
This code nevertheless is working fine:
**
Filename path;
GenerateTexturePath(pDoc- >GetDocumentPath(), Filename(pChannel->GetData().GetString(BASECHANNEL_TEXTURE)),
Filename(), &path;)
**
cheers