|
void | Freeze () |
| Prevents the RigItem from automatically triggering Sync in the Update loop, manual calls to Sync will still work. Freezing a RigItem is useful when batching many manual changes to morphables where you don't need update to the avatar's rig during this window. When your changes are done you must trigger Thaw to start allowing the RigItem to Sync again. More...
|
|
void | Thaw () |
| Allows a RigItem to start automatically syncing again after being frozen via Freeze, does nothing otherwise. More...
|
|
void | PauseSync () |
| Pause all Sync operations, even manual operations. This is used internally when batching many operations such as loading multiple MorphableItems. Effectively this means that when Sync is called it will immediately return. More...
|
|
void | UnpauseSync () |
| Unpause all sync operations More...
|
|
void | GatherBones () |
| Find all BoneItems on this RigItem starting from RootBoneGO and add them to the skeleton
|
|
void | AppendBone (BoneItem bi) |
| Add an additional bone to this RigItem's skeleton More...
|
|
void | AppendBones (BoneItem[] bis) |
|
BoneItem | GetBoneItemByGuid (string _gid) |
| Finds the BoneItem for the given id More...
|
|
BoneItem | GetBoneItemByName (string _str) |
| Finds the BoneItem for the given name More...
|
|
BoneItem | GetBoneItemByMecanimName (string mecanimName) |
| Retrieves the bone item that matches the mecanim name, eg: Hips will return the hip bone item NOTE: this may return null if there is no mapping defined SEE: https://docs.unity3d.com/ScriptReference/HumanBodyBones.html More...
|
|
int | GetIndexByTransform (Transform _tran) |
|
int | GetIndexByName (string boneName) |
| Get the index of the bone with this name More...
|
|
int | GetIndexByGuid (string boneGuid) |
| Get the index of the bone with this guid More...
|
|
bool | TryGetBoneItemAndIndexByGuid (string boneGuid, out BoneItem boneItem, out int index) |
|
GameObject[] | GetBoneArray () |
| Retrieve the list of bones as an array
|
|
Transform[] | GetBoneArrayTransforms () |
| Get all the transforms for the bones attached to this RigItem's skeleton
|
|
delegate void | PostLoadMorphedRig (RigManager.MorphedRig morphedRig) |
|
delegate void | ImmediateSyncCallback () |
|
ApiJobNoResult | Sync (ImmediateSyncCallback callback=null, int parentJobId=Job.kNoParentJobId) |
| Triggers a recalculation of the rig and bone positions based on the original rig and any morphs attached. This is automatically handled for you when a MorphableItem has a RigTarget (the morph has different bones from the original rig). This is unnecessary to trigger yourself unless you are manipulating the rig directly or using the pause of freeze system. More...
|
|
Vector3 | GetRootBonePosition () |
| This is used to locate the translation of the root bone (usually a hip bone) when all morphs are driven at their specified value This is used to work around an issue with unity's mecanim system when we reapply it the character will sink or rise in Y translation. By forcing their root bone to be in this location (local) it will keep the avatar from shifting around.
|
|
void | AttachSupplementalRig (RigItem other, bool destroyOther=false) |
| Takes another RigItem and marries it to this one by finding matching bones and ignore them and finding "new" bones (on other) and adding them to the hierachy Does nothing if already in the set More...
|
|
void | SetInBindPose () |
| Places the rig in to it's rest or bind position This is the default position of the rig when first loaded Note: this
|
|
void | SnapshotPose () |
| Generates a temporary PoseItem with the current pose of the avatar This only generates a PoseItem if there isn't a snapshot pose already as such this will replace a current snapshot of the character if there is one
|
|
bool | RestoreSnapshotPose () |
| Restores the bone rotations to where they were in a snapshot More...
|
|
bool | SyncTest () |
|
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...
|
|
|
GameObject | RootBoneGO |
| This is a reference that points to the top most skeleton node, frequently called "root" or "hips"
|
|
ItemDict | Skeleton = new ItemDict() |
| Dictionary of the BoneItems that make up this RigItem's skeleton
|
|
bool | DrawBones = true |
| Whether to draw the bones in the scene
|
|
string | SourceRigId = null |
| If not null, this means this rig is compatible with another one, this is common on supplemental rigs such as hairs like ponytails that have extra bone chains NOTE: similar bones will have identical guids between the two, but not the supplemental bones
|
|
SerializableDictionarySS | boneIdToMecanimId = null |
| A dictionary that has a lookup between our local astra guid and the mecanim id, eg: "123-456" => "Hips"
|
|
SerializableDictionarySS | mecanimIdToBoneId = null |
| A dictionary that has a lookup between the mecanim id and our local astra guid, eg: "Hips" => "123-456"
|
|
SerializableDictionarySRigItem | SupplementalRigItems = new SerializableDictionarySRigItem() |
| A list of active rigs that are "merged" into this one
|
|
SerializableDictionarySMorphableItem | morphableItems = new SerializableDictionarySMorphableItem() |
| If a morphable has a rig target, it will link itself into this dictionary, the key is the morphable guid
|
|
RigTarget | rigTarget |
| RigTarget for this RigItem
|
|
RigManager.MorphedRig | morphedRig = null |
| contains the current data for the last bone adjustment/sync
|
|
bool | isModified = false |
| Tells you if the rig is customized, meaning a morphable with a Rig Target has been applied. This is necessary for performance reasons since we can no longer share a mesh without the same bindposes, which a rig target will dynamically modify based on the values.
|
|
|
override McsSdk20.Primitives.AstraPrimitiveType | PrimitiveType [get] |
|
int | BoneCount [get] |
| Number of bones in this skeleton
|
|
AvatarItem | avatarItem [getset] |
| AvatarItem this RigItem is attached to
|
|
bool | IsSyncPaused [get] |
| Whether all sync operations should be paused. Manual sync operations will be ignored if true. More...
|
|
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] |
|
RigItem is an element item that wraps the bone GameObjects of a SkinnedMeshRenderer it's primary purpose is to facilitate skinning operations, animation opertations and tracking of individual bones. In Unity the RigItem allows the astra core system to interact with Unity's Humanoid Avatar definition more precisely than Mecanim's automated skeleton retargeting system. This aspect of RigItem will allow for the use of arbitrary bone chains useful in dynamics. RigItems serialize into a protocol buffer and are a primary building block for all skinned meshes and compound items.
void Astra.Asset.RigItem.Freeze |
( |
| ) |
|
|
inline |
Prevents the RigItem from automatically triggering Sync in the Update loop, manual calls to Sync will still work. Freezing a RigItem is useful when batching many manual changes to morphables where you don't need update to the avatar's rig during this window. When your changes are done you must trigger Thaw to start allowing the RigItem to Sync again.
You should never need to call this yourself unless you are directly manipulating the raw data of MorphableItems with RigTargets in them.
- See also
- PauseSync
PauseSync is the more extreme version of freezing
void Astra.Asset.RigItem.PauseSync |
( |
| ) |
|
|
inline |
Pause all Sync operations, even manual operations. This is used internally when batching many operations such as loading multiple MorphableItems. Effectively this means that when Sync is called it will immediately return.
You should never need to call this yourself unless you are directly manipulating the raw data of MorphableItems with RigTargets in them.
- See also
- Freeze
Freeze is the more lesser version of pausing