In Rhino 5, imported a set of meshes from DAZ3D
They render with the vertex color
I check and uncheck that box in appearances, no affect
I ran the sample Rhino.MeshVertexCount
and it does make them random colors
I would like to remove them (vertex colors) so it will shade correctly
When I use Null in the function, MeshVertexCount,
Rhino.MeshVertexColors strObject, myNull
it says ‘error, array required’
I tried making a myNull by cancelling a call and setting to set a variable to Null, still no luck
Any ideas?
Hi @mwe4ol,
This simple RhinoScript should clear any mesh vertex colors:
Sub RemoveMeshVertexColors
Dim strMesh
strMesh = Rhino.GetObject("Select mesh", 32)
If Not IsNull(strMesh) Then
Call Rhino.MeshVertexColors(strMesh, Null)
End If
End Sub
– Dale
Thanks, that runs and works fine, sort of
Strange, but I think that is what I was doing
I cut and pasted the example from the help section, and typed Null where the array of colors was, and when I tried to run it, it said array required
And the first time I run yours, it work, then it gives me the same error (array required) on the same object as it worked on
Now, maybe a new / separate issue, but seems related
The meshes look black in a ‘rendered’ view, with default lighting
with no lighting they are the material color I give them, but flat of course
Also, I am running this by dragging and dropping on the Rhino window, maybe I should make a button for it?
Other, non imported meshes, screen render fine
solved, more or less
Rhino doesn’t like the mesh normals that came with the imported mesh
the rebuild normals fixed it