On 23/11/2017 at 07:57, xxxxxxxx wrote:
Hi,
I am doing some Python Effector Experiments and would like to ask a few questions:
This is the simplest code to increment a variable inside the Effeector:
\> import c4d
\> from c4d.modules import mograph as mo
\> #Welcome to the world of Python
\> **num = False**
\> def main() :
\> global num
\>
\> if doc.GetTime() == doc.GetMinTime() :
\> num = 0
\>
\> num +=1
\> print (num)
\>
return True
the num=false, is there so that if I save the scene with the play head is NOT on frame 0, and reload, I don't get an error.
1. What exactly does num=false mean?
2. In the context of the Python Effector, what happens to anything outside the main function? When is it evaluated?
Thanks