Morphables are items which contain data to allow a scaled change to a rig or mesh that they are attached to (including the character skin mesh). They range from basic things like adjusting an ear shape to something that alters the entire appearance of the AvatarItem, such as a zombie transformation. This class provides the ability to adjust the morphable. Typically, you adjust a MorphableItem using the AvatarItem.MorphableManager.DriveMorph function, which cascades the changes appropriately to other items attached to the AvatarItem.
More...
|
bool | PairedMeshExists (MeshItem[] meshItems=null, AvatarItem ai=null) |
| Whether the paired mesh id is attached to this AvatarItem More...
|
|
bool | PairedTagExists () |
| Whether there is an item that this Morphable is paired with currently attached to the AvatarItem
|
|
void | SetProjectionDirty () |
| Indicates that we need to project again
|
|
void | Freeze () |
| When frozen, ensures we don't keep syncing this morphable
|
|
void | Thaw () |
| Allows the morphable to be synced again
|
|
ApiJobNoResult | Remove (bool syncRig=true, bool destroy=false, int parentJobId=Job.kNoParentJobId) |
| Provides the cleanest and fastest way to remove the morph More...
|
|
ApiJobNoResult | RefreshComponents (int parentJobId=Job.kNoParentJobId) |
| Call this anytime anything changes regarding the node structure of the gameObject This rescans for things like MeshItems, so there is a cost here Do not call this to update the values, call this only for hierarchy changes, use Sync instead More...
|
|
ApiJobNoResult | Sync (bool refresh=false, int parentJobId=Job.kNoParentJobId) |
| Updates the values for blendshapes and bones Only updates if it's marked as dirty or forced More...
|
|
InjectJob | Inject (int parentJobId=Job.kNoParentJobId) |
| Drives other components on this AvatarItem with this MorphableItem such as blendshapes, bones, and decals More...
|
|
virtual CompoundItem | FindParentCompound () |
| Find the parent CompoundItem which this Item is attached to, if it exists, otherwise null
|
|
virtual AvatarItem | FindAvatarItem () |
| Returns the AvatarItem this item is attached to (if found, note may return null)
|
|
virtual RigItem | FindRigItem () |
| Finds the current RigItem associated on this Avatar Hierarchy More...
|
|
|
MorphableItemData | SourceData |
| A copy of the "Source" data in unity format, this is basically a PrimitiveMorphable but in a nice serializable native format
|
|
SerializableDictionarySMorphableItemChildData | ChildData = new SerializableDictionarySMorphableItemChildData() |
| Tracks our morph datas keyed on guid of mesh item and value is the source or projected morph data
|
|
string | SourceMeshId |
| This is the origin mesh id for which the base morph was created for, this is almost always the figure mesh id
|
|
string | SourceMaskId = null |
| If not null will use a mask when doing projection, this is typically used for things like preventing ears from affecting projection
|
|
string | PairedMeshId |
| If this is a "mesh to mesh" morphable this pairing will be the other mesh that triggers this one to happen eg: if you have a hat and hair and the hat trips a distortion of the hair, this morph will be on the hair and the hat's mesh id will be this value
|
|
SerializableDictionarySMeshItem | meshItems = new SerializableDictionarySMeshItem() |
| Tracks out mesh items we want to listen to, key is the guid of the meshItem
|
|
SerializableDictionarySI | blendshapeIndexes = new SerializableDictionarySI() |
| key is the mesh guid, value is the blendshape slot
|
|
SerializableDictionarySDecalItem | decalItems = new SerializableDictionarySDecalItem() |
| tracks our decals, the key is the guid of the MeshItem.AstraGuid
|
|
MuscleRange[] | muscleRanges |
| Custom muscle value overrides for this Morphable
|
|
RigTarget | rigTarget |
| Where should the bones be when driven to 100%
|
|
bool | ignoreEyeProjection = false |
| If true, means that when we go to project this morph we should
|
|
bool | ignoreMouthPartProjection = false |
| If true, this morph won't affect PartItems like teeth, tongue, etc
|
|
bool | ignoreIndirectProjection = false |
| If true, this morph won't affect any non-direct children, ie: FigureItem morph would apply to eyes, mouth, etc but not clothing
|
|
bool | ignoreAllProjection = false |
| If true, this morph won't affect any child meshes, it will only apply it's own MeshTarget (if set)
|
|
float | projectionWeight = 1.0f |
| When driving the projection blendshapes to dependent meshes this is the multipler used to feather the projected blendshape
|
|
List< string > | CategoriesRegions = new List<string>() |
| List of region tags attached to this morphable
|
|
bool | IsRigCoupled = true |
| If we drive a blendshape and we have bone translations, will the blendshape move even w/o the bones being moved (this is on by default)
|
|
bool | HasRigTargets = false |
| if true, this morphable moves bones
|
|
bool | HasMeshTargets = false |
| if true, this morphable moves vertices of the mesh target
|
|
bool | HasMaterialTargets = false |
| if true, this morphable has materials that get blended onto the target using decals
|
|
bool | InjectedMeshTargets = false |
| true if the morph has been installed into the smr
|
|
bool | InjectedRig = false |
| true if the RigItem has been fused with the MorphableItem
|
|
bool | DriveVertices = true |
| If true when injecting a blendshape the vertices data will be used
|
|
bool | DriveNormals = true |
| If true when injecting a blendshape the normals data will be used
|
|
bool | DriveTangents = false |
| If true when injecting a blendshape the tangents data will be used
|
|
bool | allowProjection = true |
| Set to false to disable any projection
|
|
bool | Refresh = false |
| Do we want to force a recalculation of projection data on the next frame?
|
|
|
void | Discover () |
| Finds all child nodes that match various targets (eg: MeshItem) and binds them to this MorphableItem.
|
|
void | SyncBlendshapes () |
|
ApiJobNoResult | SyncRig (RigItem.ImmediateSyncCallback callback=null, int parentJobId=Job.kNoParentJobId) |
|
void | SyncDecal (bool refresh=false) |
|
bool | NeedsInjection () |
| Let's us know if we need to inject a RigTarget, MeshTarget, or MaterialTarget More...
|
|
bool? | InjectJobFunc (Job job) |
|
bool | NeedsProjection () |
|
int | GetProjectionKey (string morphId, string sourceMeshId, string targetMeshId, string sourceMaskId) |
|
Job | Project (int parentJobId=Job.kNoParentJobId) |
| Projects source mesh against ALL target meshes NOTE: There is both local cache in C#/Unity and C++ for these projections, see GetProjectionKey / _projected More...
|
|
void | InjectBlendshapes () |
| Pushes the blendshape into all mesh items under this object This assumes you already have all morph data in the containers variable. This will block the thread while it performs this function.
|
|
void | InjectRig () |
|
void | InjectDecal () |
| Finds or Adds a DecalItem for this MorphableItem if necessary, only applies one if we have at least one MaterialTarget
|
|
void | TrackId (string id) |
|
void | UntrackIds () |
|
|
override McsSdk20.Primitives.AstraPrimitiveType | PrimitiveType [get] |
|
override McsSdk20.Primitives.SchematicType | SchematicType [get] |
|
bool | IsPairedMorphable [get] |
| Whether there is a Paired mesh id.
|
|
bool | IsPairedTagMorphable [get] |
| Whether this morphable is tagged to have attached items via the mesh to tag system
|
|
bool | InjectedDecals [get] |
| true if a DecalItem has been added for this morph
|
|
float | Value [getset] |
| Range 0->100, 0 being 0% and 100 being 100%, TODO: normalize to 0->1
|
|
virtual McsSdk20.Primitives.AstraPrimitiveType | PrimitiveType [get] |
| Retrieve the primitive type for this item
|
|
virtual McsSdk20.Primitives.SchematicType | SchematicType [get] |
| Retrieve the schematic type for this item
|
|
string | AstraGuid [getset] |
| Guid for this item to identify it in the Astra Service
|
|
string | AstraName [getset] |
| Display name for this item
|
|
string | AstraInstanceId [getset] |
| Guid representing an instance of this item
|
|
string | AstraGuid [getset] |
|
string | AstraName [getset] |
|
string | AstraInstanceId [getset] |
|
Morphables are items which contain data to allow a scaled change to a rig or mesh that they are attached to (including the character skin mesh). They range from basic things like adjusting an ear shape to something that alters the entire appearance of the AvatarItem, such as a zombie transformation. This class provides the ability to adjust the morphable. Typically, you adjust a MorphableItem using the AvatarItem.MorphableManager.DriveMorph function, which cascades the changes appropriately to other items attached to the AvatarItem.