Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.ShapeGroup Class Reference

Public Member Functions

 ShapeGroup (int[] idArray)
 The default Constructor. More...
 
void SetTimelineOverride (int keyID, int intensity, ref Dictionary< int, float > blendshapeValueDict)
 
void SetTimelineOverride (int keyID_A, int intensityA, int keyID_B, int intensityB, ref Dictionary< int, float > blendshapeValueDict)
 
void ReleaseTimelineOverride ()
 
int GetActiveKeyID ()
 Gets the ID number of the active blendshape. More...
 
float GetActiveKeyValue ()
 Gets the intended value of the active blendshape. More...
 
void SetActive (int _ID, float _intensity, float _changeTime=0f, MoveMethod _moveMethod=MoveMethod.Linear, AnimationCurve _timeCurve=null)
 Sets a blendshape as the "active" one, causing all others to be disabled. More...
 
void SetActive (string _label, float _intensity, float _changeTime=0f, MoveMethod _moveMethod=MoveMethod.Linear, AnimationCurve _timeCurve=null)
 Sets a blendshape as the "active" one, causing all others to be disabled. More...
 
void UpdateKeys (ref Dictionary< int, float > blendshapeValueDic)
 

Public Attributes

string label = ""
 
int ID = 0
 
List< ShapeKeyshapeKeys = new List<ShapeKey>()
 

Protected Attributes

ShapeKey activeKey = null
 
float startTime
 
float changeTime
 
AnimationCurve timeCurve
 
MoveMethod moveMethod
 
bool isTimelineOverride
 

Detailed Description

A data container for a group of blendshapes on a SkinnedMeshRenderer. By grouping blendshapes, we can make one "active" and have all others disable

Constructor & Destructor Documentation

◆ ShapeGroup()

AC.ShapeGroup.ShapeGroup ( int[]  idArray)

The default Constructor.

Parameters
idArrayAn array of existing ShapeGroup ID numbers, to ensure that the groups's identifier is unique

Member Function Documentation

◆ GetActiveKeyID()

int AC.ShapeGroup.GetActiveKeyID ( )

Gets the ID number of the active blendshape.

Returns
The ID number of the active blendshape.

◆ GetActiveKeyValue()

float AC.ShapeGroup.GetActiveKeyValue ( )

Gets the intended value of the active blendshape.

Returns
The intended value of the active blendshape

◆ SetActive() [1/2]

void AC.ShapeGroup.SetActive ( int  _ID,
float  _intensity,
float  _changeTime = 0f,
MoveMethod  _moveMethod = MoveMethod.Linear,
AnimationCurve  _timeCurve = null 
)

Sets a blendshape as the "active" one, causing all others to be disabled.

Parameters
_IDThe unique identifier of the blendshape to affect
_intensityThe intensity (value) to set the active blendshape
_changeTimeThe duration, in seconds, that the group's blendshapes should be affected
_moveMethodThe interpolation method by which the blendshapes are affected (Linear, Smooth, Curved, EaseIn, EaseOut, CustomCurve)
_timeCurveIf _moveMethod = MoveMethod.CustomCurve, then the transition speed will be follow the shape of the supplied AnimationCurve. This curve can exceed "1" in the Y-scale, allowing for overshoot effects.

◆ SetActive() [2/2]

void AC.ShapeGroup.SetActive ( string  _label,
float  _intensity,
float  _changeTime = 0f,
MoveMethod  _moveMethod = MoveMethod.Linear,
AnimationCurve  _timeCurve = null 
)

Sets a blendshape as the "active" one, causing all others to be disabled.

Parameters
_labelThe name of the blendshape to affect
_intensityThe inensity (value) to set the active blendshape
_changeTimeThe duration, in seconds, that the group's blendshapes should be affected
_moveMethodThe interpolation method by which the blendshapes are affected (Linear, Smooth, Curved, EaseIn, EaseOut, CustomCurve)
_timeCurveIf _moveMethod = MoveMethod.CustomCurve, then the transition speed will be follow the shape of the supplied AnimationCurve. This curve can exceed "1" in the Y-scale, allowing for overshoot effects.

◆ UpdateKeys()

void AC.ShapeGroup.UpdateKeys ( ref Dictionary< int, float >  blendshapeValueDic)

Updates the values of all blendshapes within the group.

Member Data Documentation

◆ ID

int AC.ShapeGroup.ID = 0

A unique identifier

◆ label

string AC.ShapeGroup.label = ""

The editor-friendly name of the group

◆ shapeKeys

List<ShapeKey> AC.ShapeGroup.shapeKeys = new List<ShapeKey>()

A list of ShapeKey instances - each ShapeKey representing a blendshape