On 22/12/2015 at 01:38, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;
I have a very simple scene (1 cube) with 1 textured material.
When i render it using the commandline.exe and -render as parameter, the texture is missing.
So i add some prints to check the texture path and document name and i see that when it is run from command line, the project name is Untitled, document path empty and the texture path empty as well.
I check the texture path using the GenerateTexturePath.
When you create a new project, the document name is untitled and the document path empty.
Why does my project have these characteristics ?
Do i have to handle my project differently when run from command line ?
Here is the command i am using:
commandline.exe -render "E:\scenes\simple.c4d" -frame 38 38 -take "Main" -oimage "E:\scenes\Renderings\Prefix"
and here is how i check the document path:
BaseDocument* doc = GetActiveDocument(); String doc_name = doc->GetDocumentName().GetFileString(); String doc_path = doc->GetDocumentPath().GetString(); //full path Filename texture_file; GenerateTexturePath(doc->GetDocumentPath(), Filename("any_texture.jpg"), Filename() , &texture_file);
Thank you for your time.