THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/07/2005 at 09:07, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.503
Platform:
Language(s) : C++ ;
---------
Hello all, here is my problem:
I am sampling the channel of a material. It's working perfectly except when the channel has an image file specified (with a relative path) and that image file is in the document path.
So for example, if I have an scene here: "c: est\untitled 1.c4d" and an image here: "c: est\image1.jpg", if I load "image1.jpg" into the color channel of a material with a relative path "image1.jpg" it will not work.
If I manualy specify an absolute path "c: est\image1.jpg" it works fine.
Here's my code:
InitRenderStruct irs;
irs.version = GetC4DVersion();
irs.fps = cdoc->GetFps();
irs.time = cdoc->GetTime();
irs.doc = cdoc;
irs.docpath = const_cast<Filename*>(&cdoc-;>GetDocumentPath());
irs.flags = INITRENDERFLAG_TEXTURES;
if (basechan->InitTexture(&irs;) == LOAD_OK) {
...
sample = basechan->Sample(NULL, &uvw;, &dlt;, &nn;, sec, 0, 0.0, 0.0);
}
InitTexture is returning LOAD_OK
Any ideas?
-Chris