By adamwade
#386818
Hey JD,

I've had trouble using the old code you wrote for randomizing Object ID colors. I'm in Rhino 5 (64bit) now and I can't seam to create a button that functions properly. Can you assist please (or anyone else)?

Thanks

Here is the original code you wrote that worked in Rhino 4:

_NoEcho
-_RunScript (
Dim obj, key, r, g, b
key = "MWR_OBJIDCOLOR"
obj = Rhino.FirstObject
While Not IsNull(obj)
r = "255:" & Cstr(Int(Rnd * 256))
g = ":" & Cstr(Int(Rnd * 256))
b = ":" & Cstr(Int(Rnd * 256))
Rhino.SetUserText obj, key, r & g & b
obj = Rhino.NextObject(obj)
Wend
Rhino.Print "Done Randomizing Maxwell Object IDs."
)

no sss? I had this kind of stripes with sss. […]

Daydreamer

Thanks everyone! I didn't want to use volumetrics […]

opening V5 files in v6

just installed latest version for Rhino V6 when I[…]

I hope someone can help me! This is almost certain[…]