View Full Version : Getting the file texture
chips__ 06-24-2003, 09:43 PM 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
|
|
mark_wilkins
06-24-2003, 11:06 PM
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
chips__
06-25-2003, 05:26 AM
ah, ok. i'll give it a go!
thanks Mark
Marcel
12-02-2003, 08:43 AM
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.
larryvm
12-05-2003, 07:40 PM
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
CGTalk Moderation
01-15-2006, 12:00 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.