Refresh layout in pymel automatically

2

I'm doing a plugin for Maya (programmed in pymel), in which I need my panel to automatically refresh my list of objects that I have on the screen.

I have it done with a button that, when I give it, refreshes the list of objects, but I want it to be automatically:

I have read that these lines are the ones that do it automatically (they call my function refreshPlugin )

cmds.scriptJob(event=["DagObjectCreated", refreshPlugin], parent=(window))
cmds.scriptJob(event=["Undo",refreshPlugin], parent =(window))
cmds.scriptJob(event=["Redo",refreshPlugin], parent =(window))
cmds.scriptJob(event=["NameChanged", refreshPlugin], parent =(window))

But instead of creating a new object list again, they make me stop showing everything. Any idea of what is failing me?

    
asked by Belen March 24.11.2016 в 10:55
source

0 answers