ScriptJob problems


So i’m having a problem with a scriptjob that don’t want to be killed.

I have a scriptJob (letts call it deleteJob) that runs a procedure when my custom node is deleted.

That procedure then deletes a scriptNode that runs another procedur when deleted.

That procedure is supposed to kill all scriptjobs that was connected to the custom node.

Everything works fine up until the point when it’s time to delete the scripjob called deleteJob. For some reason Maya thinks it’s still being used and prints out: Error: A scriptJob cannot be killed while it is running.

So i was wondering if anybody know why Maya does this and if there is a solution to my problem. l


try deleting the scriptJob via evalDeffered(), i assume the problem is because the scriptJob is trying to kill itself. By deffering evaluation of the delete command, maya will wait till the script job has finished before attempting to delete it.


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.