Help with Filename
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2009 at 08:46, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform: Windows ;
Language(s) : C++ ;---------
So currently I insert a filename in to my shader with this method. It works great.Filename earthCloudMap = GeGetPluginPath()+Filename("presets")+Filename("earth")+Filename("Cloud_Map.jpg"); cloudData->SetFilename(BITMAPSHADER_FILENAME, earthCloudMap); cloudMap->Message(MSG_UPDATE);Now I would like to insert a file in to this shader that the user has selected via a TEXTURE description element.
The SDK says :
Texture elements represent a STRING (description element) entry for bitmap entries. It has an additional preview window for the selected bitmap file. Use GenerateTexturePath() to get the filename of the bitmap:
String name = cp->GetString(PRIM_RELIEF_TEXTURE);
Filename texture;
GenerateTexturePath(doc->GetDocumentPath() + doc->GetDocumentName(), Filename(name), &texture;);I am not sure what I would put in the "Filename(name)" part o fit.. I assume that the &texture; would be the constant of the description element but I am not sure.
Could someone please explain to me how I would do this?
Thanks,
~Shawn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2009 at 09:07, xxxxxxxx wrote:
Figured it out. Did it with ... Filename earthCloudMap = Filename(data->GetString(CLOUD_MAP,"No Image Chosen"));