On 30/01/2017 at 08:13, xxxxxxxx wrote:
Hi there,
i am very new to this topic and i am testing a script that should give me an output in the CLI.
I am just running the CommandLine:
"C:\Program Files\MAXON\Cinema 4D R18\Commandline.exe" %userprofile%\Desktop est.c4d
and it ends up printing out:
Print Test successful! #2
Print Test successful! #3
I expect that it should also show me: "Print Test successful! #1" but it doesnt...
what am i doing wrong?
Script:
------------------------------------------------------------------------
import c4d
from c4d import plugins
Be sure to use a unique ID obtained from www.plugincafe.com
PLUGIN_ID = 5678901
Command Plugin
class PrintTestData(c4d.plugins.CommandData) :
def Execute(self, doc) :
print "Print Test successful! #1"
return True
if __name__ == "__main__":
plugins.RegisterCommandPlugin(id=PLUGIN_ID, str="Py-PrintTest",
help="Py - Print Test", info=0,
dat=PrintTestData(), icon=None)
print "Print Test successful! #2"
print "Print Test successful! #3"
------------------------------------------------------------------------