View Full Version : checking for a condition

01 January 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.

01 January 2011, 11:56 AM
these will work..
if classof (o.material) == standardMaterial then

01 January 2011, 12:28 PM
hmm..this is embarrassing, I was pretty sure I tried this and failed. it worked :)

thanks for the fast reply.

CGTalk Moderation
01 January 2011, 12:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.