Hi
I'm quite new to scripting and wonder if its possible to write a function that will search through multiple nested vray blend materials.
For example
myBall has a blendMaterial and within this is another BlendMaterial and within this another.
At the moment I can use a for loop to keep goin through each array but this gets messy as the number of blendMaterials increases.
e.g
for i in 1 to ($.material.coatMtl.count) where classof $.material.coatMtl[i] == vrayBlendMtl do
(
for j in 1 to ($.material.coatMtl[i].coatMtl.count) where classof $.material.coatMtl[i].coatMtl[j] == vrayBlendMtl do
(
for h in 1 to ($.material.coatMtl[i].coatMtl[j].coatMtl.count) where classof $.material.coatMtl[i].coatMtl[j].coatMtl[h] == VrayBlendMtl do
"keep goin for all existing nested BlendMaterials"
)
)
I want to be able to search through and access all the vray materials that may populate these slots and for any given number of BlendMaterials that may exist.
if anyone could shed some light or point me in the right direction i'd appreciate it cheers
Graph · 2012-08-05