Notifications
Clear all
[Closed] checking for a condition
Jan 11, 2011 11:42 am
hello, this is probably a noob question so here goes.
I’m writing a script that would change the diffuse maps of materials, so I’m checking to see if the material type is standard material so I wrote
if classof (o.material) == standardMaterial() then
the o is for the loop, obviously there’s something wrong, the code runs with no errors but it does nothing, I suspect that the condition is not met so I’d like to know how to rectify this.
thanks in advance.
2 Replies
Jan 11, 2011 11:42 am
Hi,
these will work…
if classof (o.material) == standardMaterial then
Jan 11, 2011 11:42 am
hmm…this is embarrassing, I was pretty sure I tried this and failed. it worked
thanks for the fast reply.