View Full Version : scriptJob onEvent mould?

10 October 2007, 03:41 AM
Hey, I've been working on a script to work along side with the sculpting geometry tools; I was looking into the scriptJob command and can't seem to get on event mould to work in any form. I was wondering if there was a way through scriptJob to run my script when you sculpt something with the sculpt geometry tools.

I'm thinking that I'll just have the script jump to the paint select tool if I can't get a scriptJob to work when you sculpt something. But I'd rather have the script run with a sculpt.

Basically the script will take the verts moved and run through a function I wrote to act like the pinch and the bulge tools in mudbox. I've also made a freeze much like the freeze mask in mudbox, but as of right now, it runs through EVERY vert in the object to see if the verts were moved to move the vert back (which would be easy with paint select, but again, I'd rather the sculpt tool). This is why I'd rather make an array of all the verts in the sculpt to check it against that list rather than EVERY vert, because the script gets really slow on high poly count objects.

And no, I'm not settling with using mudbox, because another part of my script does stuff mudbox and every single other 3d aplication I've ever used, cannot do. I've mentioned this script on previous threads, that it adds geometry into the object after the sculpt moves the geometry out too far.

So if anyone knows how to do this, I would be greatly appreciative.

10 October 2007, 03:00 AM
This is messy, but you could always try triggering on the Idle event, but this is dangerous and can lead to really bad performance since your scriptjob is run every single time maya declares itself idle. Its also unpredictable in that you never know when maya will decide to fire this event.

10 October 2007, 07:09 AM
hmm, well, since this thread has been open for some time without anyone posting bysides you Soviut; I guess I'm going to have to do it via paint select tool. But would there be a way to apply a push, pull, smooth, or relax on a selected ammount of verts without being in the sculpt tool?

CGTalk Moderation
10 October 2007, 07:09 AM
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.