Morph 3D MCS API
MORPH3D.M3DCharacterManager Class Reference
Inheritance diagram for MORPH3D.M3DCharacterManager:

Public Member Functions

delegate void M3DCMBlendshapeValueChange ()
 
void InitBlendshapeModel ()
 
void DetectAttachmentPoints ()
 Detects all CIattachmentpoints that are present and children of specific bones on the main skeleton of the figure. More...
 
void DetectAttachedClothing ()
 Detects all CIclothing that are present, visible and children of the root Character Manager game object When unattached clothing is found it is attached and registerd with the character manager. More...
 
void DetectAttachedProps ()
 Detects CIprops that are present, visible and children of registered attachment points. When detected the props are registered with the character manager. More...
 
void DetectAttachedHair ()
 Detects CIhair that is present, visible and a child of the root character manager game object. When detected the CIhair will be registered with the character manager. More...
 
CIclothing AttachCIClothing (CIclothing clothing, bool clone_item)
 Clones and binds clothing to a figure/character manager and returns a reference to the new instance of CIclothing. More...
 
CIhair AttachCIHair (CIhair hair, bool clone_item)
 
CIprop AttachCIProp (CIprop prop, bool clone_item)
 
void SetLODLevel (float level)
 Sets the LOD level on all character associated sub-geometries. More...
 
void AddContentPack (ContentPack content_pack)
 
void AddContentPackToModel (ContentPack content_pack)
 
void RemoveContentPackFromModel (GameObject obj, bool and_all_instances=false)
 
List< ContentPackGetAllContentPacks ()
 
GameObject LoadContentPackToFigure (ContentPack content_pack)
 
void UnloadContentPackFromFigure (ContentPack content_pack)
 
GameObject LoadClothingFromContentPackToFigure (CIclothing clothing)
 
GameObject LoadHairFromContentPackToFigure (CIhair hair)
 
GameObject LoadPropFromContentPackToFigure (CIprop prop)
 
void SetBlendshapeValue (string blendshape_id, float val)
 Sets a blendshape's value in the blendshapeModel by name. More...
 
CoreBlendshape GetBlendshapeByID (string blendshape_id)
 Gets the blendshape by name. More...
 
List< CoreBlendshapeGetActiveBlendShapes ()
 Returns a List of CoreBlendshape objects that have a non-zero currentValue. More...
 
List< CoreBlendshapeGetAllBlendshapes ()
 Returns a hashset of all CoreBlendshape objects currently associated with the character model. More...
 
List< CoreBlendshapeGetBlendshapesByFunction (BLENDSHAPE_TYPE blendshape_type)
 Returns a List of CoreBlendshapes of a given type. E.g. Returns all FHM (Full Head Morph) CoreBlendshapes. More...
 
CoreBlendshapeGroup CreateBlendshapeGroup (string group_id)
 Creates a new blendshape group for the given name, or returns an exisiting group of the same name if available. More...
 
CoreBlendshapeGroup CreateBlendshapeGroup (string group_id, List< CoreBlendshape > set)
 Creates a new blendshape group for the given name, or returns an exisiting group of the same name if available. More...
 
List< CoreBlendshapeGroupGetAllBlendshapeGroups ()
 Returns a list of all of the CoreBlendshapeGroups associated with a character model. More...
 
void SetBlendshapeGroupValue (string group_id, float value)
 Sets the group value. More...
 
List< CIclothingGetAllClothing ()
 Returns a list of all CIclothings loaded into the character manager. More...
 
CIclothing GetClothingByID (string id)
 Returns a specific CIclothing loaded into the manager. More...
 
List< CIclothingGetVisibleClothing ()
 Returns a list of all CIclothing in the character manager that are visible. More...
 
void SetClothingVisibility (string id, bool visibility)
 Sets a CIclothing items visibility by name. More...
 
void ReloadHairFromFigure ()
 Using DetectAttachedHair() reloads CIhair that currently visible. More...
 
List< CIhairGetAllHair ()
 Returns a list of all CIhair currently loaded into the character manager. More...
 
CIhair GetHairByID (string hair_id)
 Gets a CIhair (currently loaded into the character manager), by name. More...
 
List< CIhairGetVisibleHair ()
 Returns a list of all CIhair items that are currently set to visible. More...
 
List< CIpropGetAllLoadedProps ()
 Sets the visibility on a CIhair item. More...
 
void DetachAndUnloadProp (CIprop prop, bool and_all_instances=false)
 Removes a specific prop from all attachment points and unloads it from the character manager. More...
 
CIprop GetLoadedPropByName (string name)
 Returns a CIprop item by name, if the item isn't loaded into the character manager returns a null. More...
 
List< CIpropGetAllAttachedProps ()
 Returns a list of all props currently attached via the attachment point system. Note, this method only returns attachment point props, to get a list of props loaded into the character manager use GetAllLoadedProps(). More...
 
CIattachmentPoint CreateAttachmentPointFromGameObject (GameObject target)
 If passed a game object this method adds and registers an attachment point. In order for this method to work correctly the attachment point will need to be a child of the MCS figures skeleton. More...
 
CIattachmentPoint CreateAttachmentPointOnBone (string bone_name, APLayout layout=null)
 Creates and registers an attachment point on a specific bone in an MCS figure. More...
 
void DeleteAttachmentPoint (string name)
 Removes a specific attachment point, by name, from the character manager. All props attached to the attachment point will be garbage collected. More...
 
CIattachmentPoint[] GetAllAttachmentPoints ()
 Returns an array of all CIattachmentPoints on a given character manager. More...
 
CIattachmentPoint GetAttachmentPointByName (string name)
 Returns a specific CIattachementPoint when requested by name. Null if the attachment point doesn't exist. More...
 
void AttachPropToAttachmentPoint (string propName, string attachmentPointName)
 Attachs a CIprop, by name, to an attachment point, also by name. More...
 
void DetachPropFromAttachmentPoint (string propName, string attachmentPointName)
 Removes CIprop, by name, from a specific attachment point, also by name. More...
 
Transform GetBoneByName (string name)
 Returns a bone from an MCS figure's skeleton. More...
 
string[] GetAllBonesNames ()
 Returns an array of all bone names contained in an MCS figure's skeleton. More...
 

Public Attributes

M3DBlendshapeModel blendshapeModel
 
float currentLODLevel = 1f
 

Static Public Attributes

static float Version = 1.0f
 
static int Revision = 2
 

Properties

string VersionInfo [get]
 

Events

M3DCMBlendshapeValueChange OnM3DCMBlendshapeValueChange
 

Member Function Documentation

void MORPH3D.M3DCharacterManager.AddContentPack ( ContentPack  content_pack)
void MORPH3D.M3DCharacterManager.AddContentPackToModel ( ContentPack  content_pack)
CIclothing MORPH3D.M3DCharacterManager.AttachCIClothing ( CIclothing  clothing,
bool  clone_item 
)

Clones and binds clothing to a figure/character manager and returns a reference to the new instance of CIclothing.

If called while in editor mode, changes to the character manager are permanent (and serialized). Changes made during runtime are only effective till termination of runtime.

Returns
The CI clothing.
Parameters
clothingClothing.
clone_itemIf set to true clone_item.
CIhair MORPH3D.M3DCharacterManager.AttachCIHair ( CIhair  hair,
bool  clone_item 
)
CIprop MORPH3D.M3DCharacterManager.AttachCIProp ( CIprop  prop,
bool  clone_item 
)
void MORPH3D.M3DCharacterManager.AttachPropToAttachmentPoint ( string  propName,
string  attachmentPointName 
)

Attachs a CIprop, by name, to an attachment point, also by name.

Parameters
propNameProperty name.
attachmentPointNameAttachment point name.
CIattachmentPoint MORPH3D.M3DCharacterManager.CreateAttachmentPointFromGameObject ( GameObject  target)

If passed a game object this method adds and registers an attachment point. In order for this method to work correctly the attachment point will need to be a child of the MCS figures skeleton.

Returns
The attachment point from game object.
Parameters
targetTarget.
CIattachmentPoint MORPH3D.M3DCharacterManager.CreateAttachmentPointOnBone ( string  bone_name,
APLayout  layout = null 
)

Creates and registers an attachment point on a specific bone in an MCS figure.

Returns
The attachment point on bone.
Parameters
bone_nameBone_name.
layoutLayout.
CoreBlendshapeGroup MORPH3D.M3DCharacterManager.CreateBlendshapeGroup ( string  group_id)

Creates a new blendshape group for the given name, or returns an exisiting group of the same name if available.

Returns
The blendshape group.
Parameters
nameName.
CoreBlendshapeGroup MORPH3D.M3DCharacterManager.CreateBlendshapeGroup ( string  group_id,
List< CoreBlendshape set 
)

Creates a new blendshape group for the given name, or returns an exisiting group of the same name if available.

Returns
The blendshape group.
Parameters
nameName.
void MORPH3D.M3DCharacterManager.DeleteAttachmentPoint ( string  name)

Removes a specific attachment point, by name, from the character manager. All props attached to the attachment point will be garbage collected.

Parameters
nameName.
void MORPH3D.M3DCharacterManager.DetachAndUnloadProp ( CIprop  prop,
bool  and_all_instances = false 
)

Removes a specific prop from all attachment points and unloads it from the character manager.

Parameters
propProperty.
and_all_instancesIf set to true and_all_instances.
void MORPH3D.M3DCharacterManager.DetachPropFromAttachmentPoint ( string  propName,
string  attachmentPointName 
)

Removes CIprop, by name, from a specific attachment point, also by name.

Parameters
propNameProperty name.
attachmentPointNameAttachment point name.
void MORPH3D.M3DCharacterManager.DetectAttachedClothing ( )

Detects all CIclothing that are present, visible and children of the root Character Manager game object When unattached clothing is found it is attached and registerd with the character manager.

void MORPH3D.M3DCharacterManager.DetectAttachedHair ( )

Detects CIhair that is present, visible and a child of the root character manager game object. When detected the CIhair will be registered with the character manager.

void MORPH3D.M3DCharacterManager.DetectAttachedProps ( )

Detects CIprops that are present, visible and children of registered attachment points. When detected the props are registered with the character manager.

void MORPH3D.M3DCharacterManager.DetectAttachmentPoints ( )

Detects all CIattachmentpoints that are present and children of specific bones on the main skeleton of the figure.

List<CoreBlendshape> MORPH3D.M3DCharacterManager.GetActiveBlendShapes ( )

Returns a List of CoreBlendshape objects that have a non-zero currentValue.

Returns
Hashset of active CoreBlendshape objects.
List<CIprop> MORPH3D.M3DCharacterManager.GetAllAttachedProps ( )

Returns a list of all props currently attached via the attachment point system. Note, this method only returns attachment point props, to get a list of props loaded into the character manager use GetAllLoadedProps().

Returns
The all attached properties.
CIattachmentPoint [] MORPH3D.M3DCharacterManager.GetAllAttachmentPoints ( )

Returns an array of all CIattachmentPoints on a given character manager.

Returns
The all attachment points.
List<CoreBlendshapeGroup> MORPH3D.M3DCharacterManager.GetAllBlendshapeGroups ( )

Returns a list of all of the CoreBlendshapeGroups associated with a character model.

Returns
The all blendshape groups.
List<CoreBlendshape> MORPH3D.M3DCharacterManager.GetAllBlendshapes ( )

Returns a hashset of all CoreBlendshape objects currently associated with the character model.

Returns
Hashset of CoreBlendshape objects.
string [] MORPH3D.M3DCharacterManager.GetAllBonesNames ( )

Returns an array of all bone names contained in an MCS figure's skeleton.

Returns
The all bones names.
List<CIclothing> MORPH3D.M3DCharacterManager.GetAllClothing ( )

Returns a list of all CIclothings loaded into the character manager.

Returns
The all loaded clothing items.
List<ContentPack> MORPH3D.M3DCharacterManager.GetAllContentPacks ( )
List<CIhair> MORPH3D.M3DCharacterManager.GetAllHair ( )

Returns a list of all CIhair currently loaded into the character manager.

Returns
The all hair items.
List<CIprop> MORPH3D.M3DCharacterManager.GetAllLoadedProps ( )

Sets the visibility on a CIhair item.

Parameters
nameName.
new_visIf set to true new_vis.

Returns a list of all CIprops loaded into the character manager. Note, props attached to attachment points will not be included in this list (use GetAllAttachedProps() instead).

Returns
The all loaded properties.
CIattachmentPoint MORPH3D.M3DCharacterManager.GetAttachmentPointByName ( string  name)

Returns a specific CIattachementPoint when requested by name. Null if the attachment point doesn't exist.

Returns
The attachment point by name.
Parameters
nameName.
CoreBlendshape MORPH3D.M3DCharacterManager.GetBlendshapeByID ( string  blendshape_id)

Gets the blendshape by name.

Returns
The blendshape by name.
Parameters
bs_nameBlendshape name.
List<CoreBlendshape> MORPH3D.M3DCharacterManager.GetBlendshapesByFunction ( BLENDSHAPE_TYPE  blendshape_type)

Returns a List of CoreBlendshapes of a given type. E.g. Returns all FHM (Full Head Morph) CoreBlendshapes.

Returns
HashSet of CoreBlendshape objects by function
Parameters
bstEnum blendshape type bst
Transform MORPH3D.M3DCharacterManager.GetBoneByName ( string  name)

Returns a bone from an MCS figure's skeleton.

Returns
The bone by name.
Parameters
nameName.
CIclothing MORPH3D.M3DCharacterManager.GetClothingByID ( string  id)

Returns a specific CIclothing loaded into the manager.

Returns
The clothing item by name.
Parameters
IDDisplay name.
CIhair MORPH3D.M3DCharacterManager.GetHairByID ( string  hair_id)

Gets a CIhair (currently loaded into the character manager), by name.

Returns
The hair item by name.
Parameters
nameName.
CIprop MORPH3D.M3DCharacterManager.GetLoadedPropByName ( string  name)

Returns a CIprop item by name, if the item isn't loaded into the character manager returns a null.

Returns
The loaded property by name.
Parameters
nameName.
List<CIclothing> MORPH3D.M3DCharacterManager.GetVisibleClothing ( )

Returns a list of all CIclothing in the character manager that are visible.

Returns
The visible clothing.
List<CIhair> MORPH3D.M3DCharacterManager.GetVisibleHair ( )

Returns a list of all CIhair items that are currently set to visible.

Returns
The all visible hair.
void MORPH3D.M3DCharacterManager.InitBlendshapeModel ( )
GameObject MORPH3D.M3DCharacterManager.LoadClothingFromContentPackToFigure ( CIclothing  clothing)
GameObject MORPH3D.M3DCharacterManager.LoadContentPackToFigure ( ContentPack  content_pack)
GameObject MORPH3D.M3DCharacterManager.LoadHairFromContentPackToFigure ( CIhair  hair)
GameObject MORPH3D.M3DCharacterManager.LoadPropFromContentPackToFigure ( CIprop  prop)
delegate void MORPH3D.M3DCharacterManager.M3DCMBlendshapeValueChange ( )
void MORPH3D.M3DCharacterManager.ReloadHairFromFigure ( )

Using DetectAttachedHair() reloads CIhair that currently visible.

void MORPH3D.M3DCharacterManager.RemoveContentPackFromModel ( GameObject  obj,
bool  and_all_instances = false 
)
void MORPH3D.M3DCharacterManager.SetBlendshapeGroupValue ( string  group_id,
float  value 
)

Sets the group value.

THIS METHOD'S NAME NEED TO CHANGE TO SetBlendshapeGroupValue()

Parameters
groupNameGroup name.
valueValue.
void MORPH3D.M3DCharacterManager.SetBlendshapeValue ( string  blendshape_id,
float  val 
)

Sets a blendshape's value in the blendshapeModel by name.

Parameters
blendshapeNameBlendshape Name.
valueValue.
void MORPH3D.M3DCharacterManager.SetClothingVisibility ( string  id,
bool  visibility 
)

Sets a CIclothing items visibility by name.

Parameters
nameName.
visibilityIf set to true visibility.
void MORPH3D.M3DCharacterManager.SetLODLevel ( float  level)

Sets the LOD level on all character associated sub-geometries.

Parameters
levelLevel.
void MORPH3D.M3DCharacterManager.UnloadContentPackFromFigure ( ContentPack  content_pack)

Member Data Documentation

M3DBlendshapeModel MORPH3D.M3DCharacterManager.blendshapeModel
float MORPH3D.M3DCharacterManager.currentLODLevel = 1f
int MORPH3D.M3DCharacterManager.Revision = 2
static
float MORPH3D.M3DCharacterManager.Version = 1.0f
static

Property Documentation

string MORPH3D.M3DCharacterManager.VersionInfo
get

Event Documentation

M3DCMBlendshapeValueChange MORPH3D.M3DCharacterManager.OnM3DCMBlendshapeValueChange

The documentation for this class was generated from the following file: