I’m playing with Blender python scripts for the first time. I did the tuts on jmsoler, and searched the knowledge base and google … but I’m wondering how to do the following:
Take a mesh that I have created in Blender and color faces on it. Should be simple, but …
Just to keep it really simple, lets assume that the mesh is a plane with 9 vertices and 4 square faces:
v1 ---- v2 ---- v3
| face 1 | face 2 |
v4 ---- v5 ---- v6
| face 3 | face 4 |
v7 ---- v8 ---- v9
Before the script runs, I want the mesh to be entirely white. At the beginning of the script, I want to set a color variable for each face to red or white. After the script runs the faces are colored according to this variable.
Does anybody know of a tut that explains this? Maybe somebody could do a quick example? I’d really appreciate it.
I got the code to work by adding me.update(). As far as the rest goes … I’m still working on it. I will post the complete solution when I figure it out in case someone else is interested.