View Full Version : object to execute a script?
stickyblue 12-01-2003, 04:35 AM hey
is there any way to execute a mel script or a command whenever i select an object ?
|
|
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.
stickyblue
12-01-2003, 08:52 AM
awesome ,thanks a lot , i ll check it out asap
mark_wilkins
12-01-2003, 06: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.
-- Mark
Doogie
12-02-2003, 05: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`;
if(!strcmp($sel[0], "polyChar"))
{
print "workin\n";
pfCharGUI();
}
}
stickyblue
12-03-2003, 02:35 AM
i see , im gonna try it , thank you very much you all
CGTalk Moderation
01-16-2006, 07: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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.