ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
I get Map instead of Diffuse(I have there collor corect then texture in diffuse)
I want DIFFUSE/COLOR CORRECT/
Except this, I want all this info without the word
(
local bitmaps = getClassInstances BitmapTexture
fn capitalizeFirst str =
(
str[1] = toUpper str[1]
str
)
fn getTopMats sub =
for item in refs.dependents sub
where isKindOf item Material collect item
fn recurseMats mats map previous:#() =
for mat in mats dofor i = 1 to (getNumSubTexmaps mat)
where getSubTexmap mat i == map do(
local topMats = getTopMats mat
if topMats.count > 0 then
recurseMats topMats mat previous:(join #(capitalizeFirst ((classOf mat) as string) + "/" + getSubTexmapSlotName mat i) previous)else(format"\tSlot name: %"(substituteString (getSubTexmapSlotName mat i)" map""")for each in previous doformat"/%" each
format"\n"))for bmp in bitmaps do(
local mats = getTopMats bmp
format"\nTexture: %\n" bmp.name
recurseMats mats bmp
))
(
local bitmaps = getClassInstances BitmapTexture
for bmp in bitmaps do(
local mats = for item in refs.dependents bmp where isKindOf item Material collect item
format"\nTexture: %\n" bmp.name
for mat in mats dofor i = 1 to (getNumSubTexmaps mat)
where getSubTexmap mat i == bmp doformat"\tSlot name: %\n"(getSubTexmapSlotName mat i)))
SubTexmap methods work both for materials and maps, yet it is quite likely that some info will be missing - anything that will be missing in getClassInstances/refs.dependents calls.
Comments
THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU!
IT's working very well, the only thing is that when I use it I get
Slot name: Map 1
Slot name: Mask
Slot name: Radius
Slot name: Occluded
Slot name: Diffuse map
Slot name: Bump map
Slot name: Refl. gloss.
Slot name: Reflect map
Slot name: Bump map
Slot name: Refl. gloss.
Slot name: Diffuse map
Slot name: Reflect map
Slot name: Bump map
Slot name: Refl. gloss.
Slot name: Bump map
I get Map instead of Diffuse(I have there collor corect then texture in diffuse)
I want DIFFUSE/COLOR CORRECT/
Except this, I want all this info without the word
map
for example - not BUMP MAP but BUMP.
In this case
Slot name: Map 1
Slot name: Mask
Slot name: Radius
Slot name: Occluded
Slot name: Map 2
Map1 and Map2 are located in Diffuse Slot/Fallof then - Map1 and Map2!
I would like to list tem like:
Difuse/Fallof/Map1
Difuse/Fallof/Map2
Thank you in advance!
( local bitmaps =
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters
This will work in some
This will work in some cases:
SubTexmap methods work both for materials and maps, yet it is quite likely that some info will be missing - anything that will be missing in getClassInstances/refs.dependents calls.
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters