CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-23-2012, 07:34 PM   #1
Horganovski
Freelance Animator/Rigger
 
Horganovski's Avatar
portfolio
Brian Horgan
Graphite9
Dublin, Ireland
 
Join Date: Apr 2007
Posts: 4,845
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 :

Code:
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-23-2012 at 07:37 PM.
 
Old 10-23-2012, 09:04 PM   #2
Faux
Expert
portfolio
Dee Mae
Salis, GB
 
Join Date: Jun 2008
Posts: 367
The doJiggle script uses the deformer command which has a flag for naming.

Code:
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?
 
Old 10-23-2012, 09:27 PM   #3
Horganovski
Freelance Animator/Rigger
 
Horganovski's Avatar
portfolio
Brian Horgan
Graphite9
Dublin, Ireland
 
Join Date: Apr 2007
Posts: 4,845
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
 
Old 10-23-2012, 10:11 PM   #4
Horganovski
Freelance Animator/Rigger
 
Horganovski's Avatar
portfolio
Brian Horgan
Graphite9
Dublin, Ireland
 
Join Date: Apr 2007
Posts: 4,845
Here's what I was working on BTW - https://vimeo.com/52036788

Cheers,
Brian
 
Old 10-23-2012, 10:31 PM   #5
Faux
Expert
portfolio
Dee Mae
Salis, GB
 
Join Date: Jun 2008
Posts: 367
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
 
Old 10-23-2012, 10:42 PM   #6
Horganovski
Freelance Animator/Rigger
 
Horganovski's Avatar
portfolio
Brian Horgan
Graphite9
Dublin, Ireland
 
Join Date: Apr 2007
Posts: 4,845
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
 
Old 10-23-2012, 10:42 PM   #7
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:15 AM.


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