CGTalk > Software Specific Forums > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 04-05-2006, 06:25 PM   #1
FiendishVegan
Frequenter
 
FiendishVegan's Avatar
XXX
USA
 
Join Date: Feb 2004
Posts: 109
query referenced mayaBinary files

hi eveyone,

Does anyone out there know the proper command to query all referenced mb files in a scene.

Code:
file -q -l -type "mayaBinary"
still returns ALL referenced files.

Thanks in advance.
__________________
"The secret to creativity is knowing how to hide your sources." -- Albert Einstein
 
Old 04-05-2006, 08:01 PM   #2
scottiedoo
Computers Own My Life
 
scottiedoo's Avatar
portfolio
Scott Englert
Character TD
Sony Pictures Imageworks
Los Angeles, USA
 
Join Date: Feb 2003
Posts: 278
Send a message via AIM to scottiedoo
thats a good question, the query command doesn't work if you give it a type to query even with:

file -q -r -type "mayaBinary";

it doesn't want to do it

so here is what I did. This will do the same thing just a work around. this will only print out the maya binary files that are referenced. if you want the entire file list including the current scene, then you can change the -r flag to the -l flag

Code:
string $fileList[]; $fileList = `file -q -r`; for($file in $fileList){ string $fileExt = `match "[^\.]*$" $file`; if(tolower($fileExt) == "mb"){ print ($file + " is a maya binary \n"); } }


so do what you want inside the if statement for that maya binary

if anyone else has a better plan, i'd like to know as well

Goodl luck!
-Scott
__________________
http://www.scottenglert.com <- personal website
 
Old 04-06-2006, 02:11 AM   #3
FiendishVegan
Frequenter
 
FiendishVegan's Avatar
XXX
USA
 
Join Date: Feb 2004
Posts: 109
Thanks Scott,

That should work nicely. It's unfortunate however that the -type flag doesn't want to behave.
__________________
"The secret to creativity is knowing how to hide your sources." -- Albert Einstein
 
Old 04-06-2006, 02:11 AM   #4
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 07:04 AM.


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