[Closed] UVW Map Co-ords
I will do a test for you in a couple of minutes, currently rendering odd how we both sent a message near enoguh same time i added my previous comment without knowing you replied spooky 😈 .
Nope didnt work because some dummys have a material applied which is annoying, I only need the script to work on geometry.
i tried the following with unsuccessful results:
for n in getClassInstances bitmapTexture do print (classof (refs.dependentNodes n))
I was trying to return the value of n after the refs.dependentNodes so I could do something like…
for n in getClassInstances bitmapTexture where classof (refs.dependentNodes n) == GeometryClass do...
But it wouldnt work, I am off to luncha nd will play with it shortly. I will also try if there are no dummys in the scene would it work.
Thanks
Alan
It WORKS!! when i removed the dummy’s from the scene (or removed the material assigned to the dummies was in this case easier to remove the dummy’s) it works.
Because in this file someone has assigned materials to dummy’s I need to take this into account and put some code in their to stop it.
ok I have added another for loop:
nodeArrTemp = #()
nodeArr = #()
noDummyArr = #()
-- Get all nodes with a texture applied (no problems with what kind of material)
for n in getClassInstances bitmapTexture do
(
join nodeArrTemp (refs.dependentNodes n)
)
--Remove any dummy's and add to a new array.
for i in nodeArrTemp where classof i != Dummy do
(
append noDummyArr i
)
-- Get unique nodes without mapping channel 1
for n in noDummyArr where not meshop.getMapSupport n.mesh 1 do appendIfUnique nodeArr n
format "%
" nodeArr
I tried to do it without adding another for loop – but I couldnt get it to work with my current knowledge. as mentioned above I tried to access the ‘classof’ of ‘refs.dependentNodes n’ but got either Value or Array, rather than the result of ‘n’ AFTER ‘refs.dependentNodes n’ was calculated (which is the node iteself i dont fully understand why it wasnt giving me the node name as i was wanting the classof n after it had ‘refs.dependentNodes n’ which should have been the node. Any ideas?
Thanks again Johan