Ofacecapture
Attributes
-
ENGLISH NAME : FaceCapture
-
NAME : Ofacecapture
-
INCLUDE : Obase
-
PATH : interop/description/ofacecapture.res
-
PLUGIN : interop
-
MAXON online help (may not exist): OFACECAPTURE
Elements
Example Code
The following code does not use the correct values when setting the data. You should check directly in C4D for the correct values that you should use in place of the ones that are shown.
This code is just to show you how to access the values for getting and setting the parameters.
Python
import c4d
from c4d import gui
def main():
obj = c4d.BaseObject(c4d.Ofacecapture)
doc.InsertObject(obj)
c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
#You can set parameters two different ways.
#First way
obj[c4d.FACECAPTURE_FILENAME] = "c:\\SomeFile.txt"
obj[c4d.FACECAPTURE_PLAYSOUND] = True
obj[c4d.FACECAPTURE_USESINGLETEXTURE] = True
obj[c4d.FACECAPTURE_FRAMETEXTURE] = 1
obj[c4d.FACECAPTURE_STARTFRAME] = 1
obj[c4d.FACECAPTURE_RANGELENGTH] = 1
obj[c4d.FACECAPTURE_ROTATION] = True
obj[c4d.FACECAPTURE_OFFSET] = True
obj[c4d.FACECAPTURE_ORIENTATION] = c4d.FACECAPTURE_ORIENTATION_Z_POS
obj[c4d.FACECAPTURE_FLIP_LEFTRIGHT] = True
obj[c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_BLINK] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKDOWN] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKIN] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKOUT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKUP] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_SQUINT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_WIDE] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_BLINK] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKDOWN] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKIN] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKOUT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKUP] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_SQUINT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_WIDE] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_JAW_FORWARD] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_JAW_LEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_JAW_RIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_JAW_OPEN] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_CLOSE] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_FUNNEL] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_PUCKER] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_LEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_RIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SMILELEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SMILERIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_FROWNLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_FROWNRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLELEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLERIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_ROLLLOWER] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_ROLLUPPER] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGLOWER] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGUPPER] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_PRESSLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_PRESSRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_BROW_DOWNLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_BROW_DOWNRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_BROW_INNERUP] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_BROW_OUTERUPLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_BROW_OUTERUPRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_CHEEK_PUFF] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_NOSE_SNEERLEFT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_NOSE_SNEERRIGHT] = 0.1
obj[c4d.FACECAPTURE_BLENDSHAPE_TONGUE_OUT] = 0.1
obj[c4d.FACECAPTURE_EYETRACKING_LEFTEYE_POSITION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_EYETRACKING_LEFTEYE_ROTATION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_EYETRACKING_RIGHTEYE_POSITION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_EYETRACKING_RIGHTEYE_ROTATION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_EYETRACKING_LOOKATPOINT] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_LIGHT_DIRECTION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_LIGHT_INTENSITY] = 0.1
obj[c4d.FACECAPTURE_MATRIX_FACE_POSITION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_MATRIX_FACE_ROTATION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_MATRIX_CAMERA_POSITION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_MATRIX_CAMERA_ROTATION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_MATRIX_NEUTRALFRAME_POSITION] = c4d.Vector(1.0,1.0,1.0)
obj[c4d.FACECAPTURE_MATRIX_NEUTRALFRAME_ROTATION] = c4d.Vector(1.0,1.0,1.0)
#Second way, using the base container.
bc = obj.GetDataInstance()
bc.SetFileName(c4d.FACECAPTURE_FILENAME,"c:\\SomeFile.txt")
bc.SetBool(c4d.FACECAPTURE_PLAYSOUND,True)
bc.SetBool(c4d.FACECAPTURE_USESINGLETEXTURE,True)
bc.SetInt32(c4d.FACECAPTURE_FRAMETEXTURE,1)
bc.SetInt32(c4d.FACECAPTURE_STARTFRAME,1)
bc.SetInt32(c4d.FACECAPTURE_RANGELENGTH,1)
bc.SetBool(c4d.FACECAPTURE_ROTATION,True)
bc.SetBool(c4d.FACECAPTURE_OFFSET,True)
bc.SetInt32(c4d.FACECAPTURE_ORIENTATION,c4d.FACECAPTURE_ORIENTATION_Z_POS)
bc.SetBool(c4d.FACECAPTURE_FLIP_LEFTRIGHT,True)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_BLINK,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKDOWN,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKIN,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKOUT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKUP,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_SQUINT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_LEFTEYE_WIDE,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_BLINK,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKDOWN,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKIN,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKOUT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKUP,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_SQUINT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_RIGHTEYE_WIDE,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_JAW_FORWARD,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_JAW_LEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_JAW_RIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_JAW_OPEN,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_CLOSE,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_FUNNEL,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_PUCKER,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_LEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_RIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SMILELEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SMILERIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_FROWNLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_FROWNRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLELEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLERIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_ROLLLOWER,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_ROLLUPPER,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGLOWER,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGUPPER,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_PRESSLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_PRESSRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_BROW_DOWNLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_BROW_DOWNRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_BROW_INNERUP,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_BROW_OUTERUPLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_BROW_OUTERUPRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_CHEEK_PUFF,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_NOSE_SNEERLEFT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_NOSE_SNEERRIGHT,0.1)
bc.SetFloat(c4d.FACECAPTURE_BLENDSHAPE_TONGUE_OUT,0.1)
bc.SetVector(c4d.FACECAPTURE_EYETRACKING_LEFTEYE_POSITION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_EYETRACKING_LEFTEYE_ROTATION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_EYETRACKING_RIGHTEYE_POSITION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_EYETRACKING_RIGHTEYE_ROTATION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_EYETRACKING_LOOKATPOINT, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_LIGHT_DIRECTION, c4d.Vector(1.0,1.0,1.0)
bc.SetFloat(c4d.FACECAPTURE_LIGHT_INTENSITY,0.1)
bc.SetVector(c4d.FACECAPTURE_MATRIX_FACE_POSITION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_MATRIX_FACE_ROTATION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_MATRIX_CAMERA_POSITION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_MATRIX_CAMERA_ROTATION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_MATRIX_NEUTRALFRAME_POSITION, c4d.Vector(1.0,1.0,1.0)
bc.SetVector(c4d.FACECAPTURE_MATRIX_NEUTRALFRAME_ROTATION, c4d.Vector(1.0,1.0,1.0)
if __name__=='__main__':
main()
C++
#include "c4d.h"
#include "../interop/description/ofacecapture.h"
void SampleFunction()
{
BaseDocument *pDoc = GetActiveDocument();
BaseObject *pObject = BaseObject::Alloc(Ofacecapture);
pDoc->InsertObject(pObject);
pDoc->StartUndo();
pDoc->AddUndo(UNDO_NEW,pObject);
pDoc->EndUndo();
EventAdd(EVENT_FORCEREDRAW);
//You can set parameters two different ways.
//First way
//Some objects do not store all their data in the container. You need to use GetParameter()/SetParameter() instead.
DESCFLAGS_SET flags = DESCFLAGS_SET_PARAM_SET;
pObject->SetParameter(DescID(FACECAPTURE_FILENAME),GeData(Filename("c:\\SomeFile.txt"),flags);
pObject->SetParameter(DescID(FACECAPTURE_PLAYSOUND),GeData(true),flags);
pObject->SetParameter(DescID(FACECAPTURE_USESINGLETEXTURE),GeData(true),flags);
pObject->SetParameter(DescID(FACECAPTURE_FRAMETEXTURE),GeData(1),flags);
pObject->SetParameter(DescID(FACECAPTURE_STARTFRAME),GeData(1),flags);
pObject->SetParameter(DescID(FACECAPTURE_RANGELENGTH),GeData(1),flags);
pObject->SetParameter(DescID(FACECAPTURE_ROTATION),GeData(true),flags);
pObject->SetParameter(DescID(FACECAPTURE_OFFSET),GeData(true),flags);
pObject->SetParameter(DescID(FACECAPTURE_ORIENTATION),GeData(FACECAPTURE_ORIENTATION_Z_POS),flags);
pObject->SetParameter(DescID(FACECAPTURE_FLIP_LEFTRIGHT),GeData(true),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_LEFTEYE_BLINK),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKDOWN),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKIN),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKOUT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKUP),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_LEFTEYE_SQUINT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_LEFTEYE_WIDE),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_RIGHTEYE_BLINK),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKDOWN),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKIN),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKOUT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKUP),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_RIGHTEYE_SQUINT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_RIGHTEYE_WIDE),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_JAW_FORWARD),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_JAW_LEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_JAW_RIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_JAW_OPEN),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_CLOSE),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_FUNNEL),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_PUCKER),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_LEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_RIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_SMILELEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_SMILERIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_FROWNLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_FROWNRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLELEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLERIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_ROLLLOWER),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_ROLLUPPER),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGLOWER),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGUPPER),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_PRESSLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_PRESSRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_BROW_DOWNLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_BROW_DOWNRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_BROW_INNERUP),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_BROW_OUTERUPLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_BROW_OUTERUPRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_CHEEK_PUFF),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_NOSE_SNEERLEFT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_NOSE_SNEERRIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_BLENDSHAPE_TONGUE_OUT),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_EYETRACKING_LEFTEYE_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_EYETRACKING_LEFTEYE_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_EYETRACKING_RIGHTEYE_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_EYETRACKING_RIGHTEYE_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_EYETRACKING_LOOKATPOINT),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_LIGHT_DIRECTION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_LIGHT_INTENSITY),GeData(0.1),flags);
pObject->SetParameter(DescID(FACECAPTURE_MATRIX_FACE_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_MATRIX_FACE_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_MATRIX_CAMERA_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_MATRIX_CAMERA_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_MATRIX_NEUTRALFRAME_POSITION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->SetParameter(DescID(FACECAPTURE_MATRIX_NEUTRALFRAME_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
pObject->Message(MSG_UPDATE);
//Second way, using the base container.
BaseContainer *bc = pObject->GetDataInstance();
bc->SetFileName(FACECAPTURE_FILENAME,"c:\\SomeFile.txt");
bc->SetBool(FACECAPTURE_PLAYSOUND,true);
bc->SetBool(FACECAPTURE_USESINGLETEXTURE,true);
bc->SetInt32(FACECAPTURE_FRAMETEXTURE,1);
bc->SetInt32(FACECAPTURE_STARTFRAME,1);
bc->SetInt32(FACECAPTURE_RANGELENGTH,1);
bc->SetBool(FACECAPTURE_ROTATION,true);
bc->SetBool(FACECAPTURE_OFFSET,true);
bc->SetInt32(FACECAPTURE_ORIENTATION,FACECAPTURE_ORIENTATION_Z_POS);
bc->SetBool(FACECAPTURE_FLIP_LEFTRIGHT,true);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_LEFTEYE_BLINK,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKDOWN,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKIN,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKOUT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_LEFTEYE_LOOKUP,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_LEFTEYE_SQUINT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_LEFTEYE_WIDE,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_RIGHTEYE_BLINK,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKDOWN,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKIN,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKOUT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_RIGHTEYE_LOOKUP,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_RIGHTEYE_SQUINT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_RIGHTEYE_WIDE,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_JAW_FORWARD,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_JAW_LEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_JAW_RIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_JAW_OPEN,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_CLOSE,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_FUNNEL,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_PUCKER,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_LEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_RIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_SMILELEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_SMILERIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_FROWNLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_FROWNRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLELEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_DIMPLERIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_STRETCHRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_ROLLLOWER,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_ROLLUPPER,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGLOWER,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_SHRUGUPPER,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_PRESSLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_PRESSRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_LOWERDOWNRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_MOUTH_UPPERUPRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_BROW_DOWNLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_BROW_DOWNRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_BROW_INNERUP,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_BROW_OUTERUPLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_BROW_OUTERUPRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_CHEEK_PUFF,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_CHEEK_SQUINTRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_NOSE_SNEERLEFT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_NOSE_SNEERRIGHT,0.1);
bc->SetFloat(FACECAPTURE_BLENDSHAPE_TONGUE_OUT,0.1);
bc->SetVector(FACECAPTURE_EYETRACKING_LEFTEYE_POSITION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_EYETRACKING_LEFTEYE_ROTATION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_EYETRACKING_RIGHTEYE_POSITION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_EYETRACKING_RIGHTEYE_ROTATION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_EYETRACKING_LOOKATPOINT, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_LIGHT_DIRECTION, c4d.Vector(1.0,1.0,1.0);
bc->SetFloat(FACECAPTURE_LIGHT_INTENSITY,0.1);
bc->SetVector(FACECAPTURE_MATRIX_FACE_POSITION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_MATRIX_FACE_ROTATION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_MATRIX_CAMERA_POSITION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_MATRIX_CAMERA_ROTATION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_MATRIX_NEUTRALFRAME_POSITION, c4d.Vector(1.0,1.0,1.0);
bc->SetVector(FACECAPTURE_MATRIX_NEUTRALFRAME_ROTATION, c4d.Vector(1.0,1.0,1.0);
pObject->Message(MSG_UPDATE);
}
Buttons
This node has buttons. Buttons can manually be executed by calling the following code
Python
c4d.CallButton(obj,c4d.FACECAPTURE_FACEMESH_ADD)
c4d.CallButton(obj,c4d.FACECAPTURE_FACEMESH_QUADMESH)
c4d.CallButton(obj,c4d.FACECAPTURE_SETTIMELINE)
c4d.CallButton(obj,c4d.FACECAPTURE_SETNEUTRALFRAME)
c4d.CallButton(obj,c4d.FACECAPTURE_CLEARNEUTRALFRAME)
c4d.CallButton(obj,c4d.FACECAPTURE_ADDEYES)
c4d.CallButton(obj,c4d.FACECAPTURE_SETDEFAULTUVS)
c4d.CallButton(obj,c4d.FACECAPTURE_ADDCAMERA)
c4d.CallButton(obj,c4d.FACECAPTURE_CACHEOPENGL)
c4d.CallButton(obj,c4d.FACECAPTURE_CACHECANCEL)
c4d.CallButton(obj,c4d.FACECAPTURE_COPYFILESTOPROJECT)
c4d.CallButton(obj,c4d.FACECAPTURE_CREATEPOSTMORPH)
C++
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_FACEMESH_ADD);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_FACEMESH_QUADMESH);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_SETTIMELINE);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_SETNEUTRALFRAME);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_CLEARNEUTRALFRAME);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_ADDEYES);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_SETDEFAULTUVS);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_ADDCAMERA);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_CACHEOPENGL);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_CACHECANCEL);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_COPYFILESTOPROJECT);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(FACECAPTURE_CREATEPOSTMORPH);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);