a
a
gets/sets the alpha color channel of the vertex
Type: float
Range: 0.0 to 1.0
Sample
Code
###### get the vertex alpha color channel
# get controller
controller = GameLogic.getCurrentController()
# get object the controller is attached to
obj = controller.owner
# get the 1st mesh
mesh = obj.meshes[0]
# get the first vertex of the first material
vert = mesh.getVertex( 0, 0)
# get the alpha color channel (RGBA)
aColor = vert.a
###### set the vertex alpha color channel
# get controller
controller = GameLogic.getCurrentController()
# get object the controller is attached to
obj = controller.owner
# get the 1st mesh
mesh = obj.meshes[0]
# get the first vertex of the first material
vert = mesh.getVertex( 0, 0)
# set the alpha color channel (RGBA)
vert.a = 1.0
|