Vizard 7 » Command Index » Vizard objects » node3d » <node3d:avatar>.setFace
7.6

<node3d:avatar>.setFace

Replace the avatars face with a Vizard face

<node3d:avatar>.setFace(  
face  
head = 'skel_Head'  
neck = 'skel_Neck'  
)  
face
A Vizard face object
head = 'skel_Head'
The name of the avatars head bone
neck = 'skel_Neck'
The name of the avatars neck bone. This will be used to clamp the neck vertices of the face to the neck of the avatar.

Remarks

This will attach a Vizard face to the avatar. If a face already exists on the avatar, Vizard will detach it. If the face is invalid, Vizard will detach any existing face and restore the original head of the avatar.

When you set the face, Vizard will look inside the avatars cfg file for a value named head_mesh. Vizard will use this value to show/hide the head of the avatar. If you are using a custom avatar, make sure to set this value in your cfg file.

Example:

head_mesh = NameOfHeadMesh.cmf

Return Value

None

Example

myface = viz.add('myface.vzf')

male = viz.add('vcc_male.cfg')

male.setFace(myface)