View Full Version : display vertex colors
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
|
|
jonlauf
02-05-2007, 03: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.
--Jon
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()
CGTalk Moderation
02-05-2007, 05: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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.