Is there a way to reset the VertCols from a Python script?
At the moment I do this by hand to get fresh VertCols for a mesh:
1. VertCol: Delete
2. Set Solid
3. Set Smooth
4. VertCol: Make
If I only do Delete and then Make the VertCols again theay aren't really deleted. The "Make" is more like an "Undo" to the "Delete" action but I want to reset them completly like I would make the VertCols for the first time on a mesh.
Any ideas to do this from a Python script?
And is there a way to determine if there are already VertCols available for the mesh?
BTW: I use Blender 2.36 (Windows)
Make VertCol from Python script?
Moderators: jesterKing, stiv
-
- Posts: 0
- Joined: Thu Jul 31, 2003 10:34 am
- Contact:
It can be done - check here:
http://www.blender.org/modules/document ... texColours
http://www.blender.org/modules/document ... texColours
Code: Select all
import Blender
from Blender import Object
obj = Object.GetSelected()[0]
dat = obj.getData()
# Remove vert col...
dat.hasVertexColours(0)
print dat.hasVertexColours() # FALSE
# Enable vert col...
dat.hasVertexColours(1)
print dat.hasVertexColours() # TRUE