alexeyvanzhula
Hi all. I have 2 questions:
1.

Maya documentation of scriptJob attributeChange event quote:

Quote:
Run the script when the named attribute changes value. The string must identify both the dependency node and the particular attribute. If the dependency node is deleted, this job is killed (even if the deletion is undoable).

But when i delete node scriptJob does not deleted. Why???

2. At now, I delete my scriptJob with MNodeMessage.addNodePreRemovalCallback(). I works good, and if i delete my node scriptJob deleted too. But maybe i want undo deletion of node. So i need auto-recreate scriptJob again. Bu how??? I simple want to undo deletion of scriptJob with deletion of node

Reply 0 0
pshipkov
1. works for me for.

2. Where do you call MNodeMessage.addNodePreRemovalCallback() from ? Node or command ? If from node - that does not update the undo stack. If from command make sure you do the undo/redo thing properly. If from script - then we have to take a closer look.

Reply 0 0
alexeyvanzhula

1. Its very strange.

For example, I do steps, like:

1. Create simple polyCube with name pCube1

2. Now the scriptjob: mc.scriptJob( ac=['pCube1.tx',SomeCallback] )

It works when i change pCube1.tx attr.

3. I delete pCube1.

4. Show my scriptJobs list: mc.scriptJob(lj=1)

And i see that my scriptJob does not deleted with node 'pCube1'


I tried this in my Maya 2012SAP for Linux.

Reply 0 0
pshipkov
Aww, you are right. It does not do it.
I am going to report that as a bug.
Reply 0 0
Reply