On 06/01/2017 at 10:37, xxxxxxxx wrote:
Hi I ran into another problem and I couldn't find a solution, it seems that C4D will try to load any file which path is passed as an argument.
For example :
"/Applications/MAXON/CINEMA 4D R17/Commandline.app/Contents/MacOS/Commandline" -ExportFBX -src "[absolute path]/testScene.c4d" -dst "[absolute path]/testScene.fbx"
crashes C4D, apparently because it's trying to load the fbx.
"/Applications/MAXON/CINEMA 4D R17/Commandline.app/Contents/MacOS/Commandline" "[absolute path]/testScene.fbx"
crashes it too.
I tried to "consume" arguments in sys.arg in pluginMessage(id=C4DPL_COMMANDLINEARGS) but the crash occurs before that.
So far, the only way I found arround that is to omit the file extension in the paths provided as arguments
For example :
"/Applications/MAXON/CINEMA 4D R17/Commandline.app/Contents/MacOS/Commandline" -ExportFBX -src "[absolute path]/testScene" -dst "[absolute path]/testScene"
Then i can append the file extensions in the script but I have to assume the file extension is lower case, Is there a better way ?
Thanks.