View Full Version : object to execute a script?
12 December 2003, 05:35 AM
is there any way to execute a mel script or a command whenever i select an object ?
12 December 2003, 08:23 AM
I think scriptJob may be what you want, but it's better if you look it up in the docs. It's a bit of a thicket to explain.
12 December 2003, 09:52 AM
awesome ,thanks a lot , i ll check it out asap
12 December 2003, 07:28 PM
Yes, a scriptjob is the way to do this, however you should know that they can slow down everything in the environment. You should try it to see whether you notice, but if it's bad, consider whether there might be another alternative.
12 December 2003, 06:31 AM
I just recently ended up using one, here's the code I used. I know of the issues, but I did it anyway. Just make sure you attach it to something so it's not running when your not using it (like kill with scene or with a window)
int $pfSimpleScriptJobNum = `scriptJob -killWithScene -e "SelectionChanged" "checkSimpleSelection()"`;
global proc checkSimpleSelection()
string $sel=`ls -sl`;
12 December 2003, 03:35 AM
i see , im gonna try it , thank you very much you all
01 January 2006, 08:00 PM
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.