Home Technical Talk

Maxscript Assign Vertex colours issue

polycounter lvl 13
Offline / Send Message
ImSlightlyBored polycounter lvl 13
Hi guys
I read this thread here:
http://www.polycount.com/forum/showthread.php?t=65348
and I'm mostly using rick's maxscript, just testing things out. I'd like to assign a material's diffuse to vertex colours, and running this script:
modPanel.addModToSelection (VertexPaint ()) ui:on
$.modifiers[#VertexPaint].lightingModel = 3
$.modifiers[#VertexPaint].useMaps = on
$.modifiers[#VertexPaint].colorBy = 1
AssignVertexColors.ApplyNodes $ vertexPaint:$.modifiers[#VertexPaint]
update $
Does everything I theoretically want - but will only assign a single colour to the mesh.
Pressing the ASSIGN button maanually, within the same stack generated via maxscript - will apply the bitmap colours just fine.

So it seems like a problem with how I'm executing the apply colours but I don't know how to fix that.
Anyone know?

I've attached a screenshot - on the left is the script assigned colours, on the right is what i get (and what i'd like) after just manually pressing the assign button.
Sign In or Register to comment.