· 7 years ago · Feb 12, 2019, 08:54 PM
1
2/*
3/ Script: Vertex color to Poly face material ID
4/ Author: Panteleev Sergey
5/ Year: 2019
6/ Contacts: fatbbc @ gmail.com
7*/
8
9for fraction = 0 to 255 by step = 35 do
10(
11 local clr = white * (fraction / 255.0)
12 local vsel = polyop.getVertsByColor $ clr step step step
13 local faces = polyop.getFacesUsingVert $ vsel
14
15 polyop.setFaceMatID $ faces (1 + fraction/step)
16
17)
18redrawViews()