Reference Scripts?

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
Old 10 October 2010   #1
Reference Scripts?

Hello,

Is anyone familiar if there is an existing script that allows me to select a target directory and have it reference every maya file inside that folder?

In the File Texture Manager script on Creative Crash it allows the user to target directories to allow users to repath textures! I was hoping there might be something similiar to this... I have an asset that is scanned into many different files and it's a pain to always have to reference each file one at a time...

Would be nice if I could tell it to march through a folder while I take a break!

Cheers,

Andrew
 
Old 10 October 2010   #2
you could do this very easily with only a couple of lines of MEL. use the `getFileList` command to get your files, then iterate through them with a for..loop using the `file -r` command to reference them in. in fact, it's so simple here it is:

string $folder = "M:/work/naughty/projectX/models/";
string $files[] = `getFileList -folder $folder -filespec "*.m?"`;
// the *.m? wildcard lets getFileList grab ANY maya file (*.ma or *.mb) you could extend this even further...
for ($file in $files)
	file -r ($folder+$file);
 
It could do with some additional functionality sure, and a UI where you browse for a folder would be good, but this is essentially all it requires.
:nathaN

Last edited by NaughtyNathan : 10 October 2010 at 09:51 AM. Reason: Added MEL code
 
Old 10 October 2010   #3
Thank you, Nathan!
 
Old 10 October 2010   #4
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 04:13 AM.


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