Getting the file texture

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
  06 June 2003
Getting the file texture

does anyone have any clues as to how to get the filetexture from the selected object? i can't seem to figure it out :(

take care
__________________
Peter Hartwig
vfx sup at duckling
www.duckling.dk

me: www.idiotbarn.com
 
  06 June 2003
It would take a little more time than I have right now to come up with the precise commands, but it comes down to this:

* Get a list of the shading groups using ls -type

* Find the shading group that contains the object by testing set membership

* Find the shader that is assoicated with the shading group

* Use listConnections to find file textures connected to the shader, and to determine to what attributes they're connected.

-- Mark
__________________
Mark R. Wilkins
author of MEL Scripting for Maya Animators
 
  06 June 2003
ah, ok. i'll give it a go!

thanks Mark
__________________
Peter Hartwig
vfx sup at duckling
www.duckling.dk

me: www.idiotbarn.com
 
  12 December 2003
Here are some How-to's that might be helpfull:

http://www.ewertb.com/maya/mel/mel_a43.html

Also search the help file on 'shadingEngine', you will find a example script which finds unshaded objects.

Last edited by Marcel : 12 December 2003 at 09:58 AM.
 
  12 December 2003
if you only want to get the file name from the color channel from the selected object, i think these script can do the thing




{
$object=`ls -sl`;
string $shape[];
$shape=`listRelatives -s $object[0]`;
$SG=`listConnections ($shape[0]+".instObjGroups[0]")`;
$material=`listConnections ($SG[0]+".surfaceShader")`;
$name=`listConnections ($material[0]+".color")`;
print $name[0];
}


only work with one selected object and in the color channel, but i think this can be a good point to start
__________________
larry@larryvizoso3d.com
 
  01 January 2006
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 11:54 PM.


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