Notifications
Clear all
[Closed] display vertex colors
Feb 05, 2007 10:46 am
How to display vertex colors in the viewport with max script?
b = box()
convertToPoly b
addModifier b (vertexpaint())
I found no way to toggle the “vertex color display – shaded button” …
But there is maybe onther way.
thank you.
Georg
2 Replies
Feb 05, 2007 10:46 am
If you are just trying to show the vertex colors in the viewport you can use:
setCVertMode <node> <boolean>
You’ll have to force a viewport refresh afterwards.
–Jon
Feb 05, 2007 10:46 am
Node Common Properties, hm.
-- create a box and convert it to poly
b = box()
convertToPoly b
-- apply shades of gray
for i = 1 to polyOp.getNumFaces b do (
val = (random 0 255)
polyOp.setFaceColor b 0 #{i} (color 0 (255-val) val)
)
-- instance a standardmaterial with vertexColor in diffuse and apply
m = standard()
m.diffusemap = vertex_color()
b.material = m
-- set the display modes to display vertex colors
setCVertMode b true
setShadeCVerts b true
-- required
select b
redrawViews()
-- ---
clearSelection()