THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/09/2008 at 23:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform: Windows ;
Language(s) : C++ ;
---------
I want to get full path of texture but follow code fn.GetString() can't get full path.
this is my snippet code:
void getTextureFileName(string& strOutFileName)
{
string g_sBaseDir;
BaseContainer ctr = GetActiveDocument()->GetAllTextures();
BrowseContainer bc(&ctr);
LONG id;
GeData *dat;
while (bc.GetNext(&id, &dat))
{
Filename fn = dat->GetFilename();
String strFilePath;
String strFileName( fn.GetString());
strFilePath = strFileName;
LONG iLen = strFilePath.GetCStringLen(St8bit)+1;
char* pName = bNew CHAR[iLen];
memset(pName,0, sizeof(CHAR)*iLen);
strFilePath.GetCString( pName,iLen, St8bit);
string strOutName(pName);
bDelete(pName);
pName = NULL;
strOutFileName += strOutName ;
strOutFileName += "|";
}
}