On 21/01/2013 at 07:50, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I adapted LittleDevils code like this:
def PluginMessage(id, data) :
if id == c4d.C4DPL_COMMANDLINEARGS:
print sys.argv
print 'Program started'
main()
return True
return False
def main() :
gui.MessageDialog('Hello 3rd party program!')
if __name__=='__main__':
main()
main() is executed twice. Do you really want that?
Also implementing main() isn't necessary if you only want to parse the arguments from the command line.
Originally posted by xxxxxxxx
I tried the following call in the windows link: "<path>\CINEMA 4D 64 Bit.exe" -Test
This causes an exception on startup.
Does CINEMA crashes? Or are you just getting "Warning: Unknown arguments: -Test"?
Is 'Test' argument printed to the console?
Originally posted by xxxxxxxx
So I searched for the allowed arguments and found this: http://www.maxoncomputer.com/faq_detail.asp?idnum=1977
This page was done for R9.5 so it's outdated. CINEMA 4D command line arguments are documented in CINEMA help manual (see "Starting CINEMA 4D via the Command Line").
Originally posted by xxxxxxxx
I doubt that these are all allowed arguments, so I tried "<path>\CINEMA 4D 64 Bit.exe" -help what opens a Command window on startup which closes itself immediately with the Message "Warning: Unknown arguments: -help"
You don't have to worry about this warning, ignore it.