THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/04/2011 at 06:12, xxxxxxxx wrote:
It seems like threading does not work in cinema 4d. Is this right or am I doing something wrong ?
Cinema 4D still stops doing anything until the thread has finished.
from threading import Thread
from time import sleep
class mythread(Thread) :
def __init__(self) :
def run(self) :
t = mythread()
Calling a Process from the multiprocessing module does even raise an error.
On 27/04/2011 at 12:35, xxxxxxxx wrote:
The script manager executes the Python script in the main thread.
That means it sure blocks C4D until t.join() returns.You can use
one or more custom threads in scripts but they all need to be finished
at the end of the script. Threads in Plugins do offer more advantages here.