View Full Version : listing scene info

09 September 2005, 01:05 PM
Anyone know if there is a script that will list all the info of a scene file into a text file. I am looking for polycounts, all the filetextures used in the scene , maybe file size, things like that. Can anyone point me in the right direction for something like that. The big thing I am looking for is the listing of all the textures.

09 September 2005, 02:01 PM
Look for a script at highend3D called fileTextureManager and learn from the code.

EXTREMELY simplified:
string $allText[] = `ls -textures`;
for ($eachTexture in $allText)
print $eachTexture;

09 September 2005, 02:17 PM
Thanks that at least gets me started. Is it possible to list each texture and the path. Because I dont name the textures in Maya it just lists file1, file2 .... I would like it to do someting like, c\textures\wall01.tga, someting like that. I use Filetexture Manager and thats great for relocating the textures but it wont list each one.

10 October 2005, 07:16 PM
I found out this is the command that I need to list the texture path

getAttr file1.fileTextureName ;

now what I dont understand is how do I make that file1 a variable and then loop it so it goes thru all the textures in the scene. I hope I explained that OK, I still am pretty clueless when trying to do anything using Mel

10 October 2005, 08:00 PM
This will dump all the file texture nodes to a file on C:\ named "".

//open file for writing
int $fileId = `fopen "C:/" "w"`;

string $files[] = `ls -type "file"`;
for($cur in $files)
string $texInfo = `getAttr ($cur+".fileTextureName")`;
fprint $fileId ($texInfo+"\n");

//close the file
fclose $fileId;

Hopefully, this will get you on your way.

10 October 2005, 11:29 AM
Awsome, thanks. That is exactly what I was looking for. That is going to save me a lot of cutting and pasting. :applause: :bounce: :applause:

CGTalk Moderation
10 October 2005, 11:29 AM
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.