Capturing the name of a deformer created by a MEL script?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2012
Capturing the name of a deformer created by a MEL script?

Something I'm trying to figure out here, if I create a regular object and capture it in a variable I can then access it's properties, but if I try it in this case it doesn't work :


 string $jigDeform[]=`doJiggle 1 { "0.5", "0.5", "1", "0", "0", "default", "" }`;
 


When I query the '$jigDeform' variable after doing this it seems to be empty?

Doing a 'whatIs' on the 'doJiggle' command shows me that it's a script rather than a built-in command but I'm not sure what to do with that information. How can I capture the name of the new deformer that gets created so that I can access its parameters via MEL ?

Any ideas appreciated!

Cheers,
Brian

Last edited by Horganovski : 10 October 2012 at 07:37 PM.
 
  10 October 2012
The doJiggle script uses the deformer command which has a flag for naming.

deformer - name "myJiggler" -type jiggle;


Kinda looks like that on its own. So that could come in handy maybe for knowing/setting names.
Either that or traverse the connections after running the doJiggle.

Food for thought?
 
  10 October 2012
Many thanks, that's something that might work, I'll check it out.

In the meantime I had continued to experiment here and I found that if I go through the history on the object with the deformer I was able to access it that way, so I guess that's what you meant by your second suggestion. So far that seems to work fine here, even if I run the script on several objects in the same Maya session.

Appreciate it, thanks again.

Cheers,
Brian
 
  10 October 2012
Here's what I was working on BTW - https://vimeo.com/52036788

Cheers,
Brian
 
  10 October 2012
Haha, I was gonna ask what you were making. Vid explains all.

Remember seeing a guy working on something similar, he hooked it into a motiontrail 'painter' so you could re-time along a curve after the fact.
Well that's how it looked at a quick glance.

Glad you got it sorted, nice work
 
  10 October 2012
Thanks, that sounds like an interesting setup. What my script is doing really is creating a tiny curve and connecting a locator to one of the EP points on it, then the Jiggle deformer deforms the curve and whatever is constrained to that locator gets the springy motion on a transform level. I could connect the object directly of course but I like being able to add offsets via parent constraints if needed.

Cheers,
Brian
 
  10 October 2012
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:12 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.