how to use the "collect "command?

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
  09 September 2013
maybe if i describe the situation

I have an mxs tool that compiles the textures of single mesh and converts them for game use.

imagine a max file for a game character, a knight.
with meshes for : body , sword, shield, bow, cloak
there's a material for the body, another for the cloak, but all 3 weapon accessories share a third material

I only need to pass 3 of the 5 meshes to my tool to get all the materials converted,
so how to narrow the available number to only unique materials?

(yes there is a smarter way to do this but now I'm curious)
 
  09 September 2013
Originally Posted by Mambo4: maybe if i describe the situation

I have an mxs tool that compiles the textures of single mesh and converts them for game use.

imagine a max file for a game character, a knight.
with meshes for : body , sword, shield, bow, cloak
there's a material for the body, another for the cloak, but all 3 weapon accessories share a third material

I only need to pass 3 of the 5 meshes to my tool to get all the materials converted,
so how to narrow the available number to only unique materials?

(yes there is a smarter way to do this but now I'm curious)

if objects have the same material you have to search them by material instead of by texture...
 
  09 September 2013
Originally Posted by denisT: if objects have the same material you have to search them by material instead of by texture...

something like this:
nodes = #() 
for mat in scenematerials where (node = refs.dependentnodes mat firstOnly:on) != undefined do appendifunique nodes node
nodes
 
  09 September 2013
i don't know in what order refs.dependentnodes returns dependent nodes... maybe you have to get them all and sort the list (by anim handle, or inode handle, or name... orwhatever you like) to define which one you want to see the first.

Last edited by denisT : 09 September 2013 at 11:37 PM.
 
  09 September 2013
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 07:06 PM.


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