How to query soundfileon TimeSlider ?

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Display Modes
  02 February 2011
How to query soundfileon TimeSlider ?

Hi everyone,
I am not a coder,just an artist who is looking through MEL to learn a few basics.
I have made a button for making playblasts using the following code , which I got from a MEL script...

//get just the name and extenstion
string $theFile = `file -q -sn -shn`;

//minus the extension
string $theFileName = `basenameEx($theFile)`;

//Make the playblast MOV
playblast -format qt -filename ($theFileName) -forceOverwrite -sequenceTime 0 -clearCache 1 -viewer 1 -showOrnaments 1 -fp 4 -percent 100 -compression "mjpa" -quality 100;

Now I know about the -sound "string" command,but I dont know how to query the sound file currently displayed on the TimeSlider.

Could anyone help please.
 
  02 February 2011
You need to use the timeControl command and give it the global timeControl objectUI. So normally it's:

global string $gPlayBackSlider;
timeControl -q -sound $gPlayBackSlider;

where $gPlayBackSlider is Maya's default timeline, this gets setup at boot so as long as you pass it in, it'll return the currently active audio.
__________________
Founder & CEO : Red9Consultancy
Red9 StudioPack : Red9 StudioPack GitHub
Author: Autodesk Masterclass 2011 - 'Live Animation Binding'
 
  03 March 2011
Thumbs up

That works like a charm , thanks a lot. I checked your website , a lot of useful info over there , keep it coming.

I am putting together a collection of scripts and buttons to help me work faster. Should be useful for animators so will share it soon.Had this problem for a while , but now its solved.

Thanks again.
 
  03 March 2011
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 06:20 PM.


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