displaced
02-04-2009, 02:00 PM
I've been using a script to collect material filename via subanims like below
fn getSubAnims theParent = (
for i = 1 to theParent.numsubs do (
append theMats theParent[i]
try(getSubAnims theParent[i].object)catch(getSubAnims theParent[i])
)
)
theMats = for o in selection where o.material != undefined collect o.material
for m in theMats do getSubAnims m
global theTextures = #()
for o in theMats where
hasProperty o "filename" and findItem theTextures o.filename == 0 do
append theTextures o.filename
but i want a little more control over it now. I would like to be able to select what map types to collect, so i could select Diffuse maps or bump maps etc.
Ive come up with this
for o in themats where hasproperty o "filename" do print o.name
but cant work out how to use the information provided to seperate the different mat types into different arrays.
any help would be great cheers
fn getSubAnims theParent = (
for i = 1 to theParent.numsubs do (
append theMats theParent[i]
try(getSubAnims theParent[i].object)catch(getSubAnims theParent[i])
)
)
theMats = for o in selection where o.material != undefined collect o.material
for m in theMats do getSubAnims m
global theTextures = #()
for o in theMats where
hasProperty o "filename" and findItem theTextures o.filename == 0 do
append theTextures o.filename
but i want a little more control over it now. I would like to be able to select what map types to collect, so i could select Diffuse maps or bump maps etc.
Ive come up with this
for o in themats where hasproperty o "filename" do print o.name
but cant work out how to use the information provided to seperate the different mat types into different arrays.
any help would be great cheers
