Notifications
Clear all
[Closed] List Raytrace's maps
Sep 13, 2006 6:16 am
Hello,
I’m trying to list all maps in raytrace material. It isn’t as easier as in standard mat, because there is no predefined maps array.
So I try this way :
fn rtMat myMat = --myMat is a raytrace material
(
raytraceMaps = #("ambientMap","bumpMap","diffuseMap","displacementMap","reflectionMap","refractionMap","glossinessMap","specularLevelMap","luminosityMap","transparencyMap","environmentMap","transEnvMap","iorMap","translucencyMap","extraLightingMap","fluorescenceMap","colorDensityMap","fogColorMap","diffusionMap","specularMap")
for i=1 to raytraceMaps.count do
(
classof myMat.raytraceMaps[i] -- doesn't work here
)
)
Someone’s got an idea on how to do to interprete a var value as an other variable ?
Thx
1 Reply
Sep 13, 2006 6:16 am
Hi Psyco. try this
fn rtMat myMat = --myMat is a raytrace material
(
raytraceMaps = #("ambientMap","bumpMap","diffuseMap","displacementMap","reflectionMap","glossinessMap","specularLevelMap","luminosityMap","transparencyMap","environmentMap","transEnvMap","iorMap","translucencyMap","extraLightingMap","fluorescenceMap","colorDensityMap","fogColorMap","diffusionMap","specularMap")
for i=1 to raytraceMaps.count do
(
myMat2 = mymat
execute ("mapClass = myMat2." + raytraceMaps[i])
class_str = classof mapClass
print class_str
)
)
don´t know why but the execute doesn´t understands the parameters from the function call, so i had to put the mymat on another varialble to this thing work. another thing is that was a refractionmap on your array which doesn´t appears on showproperties in a raytrace material. sorry my bad english and if i not made myself clear.
Gustavo