View Full Version : display vertex colors

02 February 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.


02 February 2007, 04:04 PM
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.


02 February 2007, 06:20 PM
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
-- ---

CGTalk Moderation
02 February 2007, 06:20 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.