(new in Rev4.64)
MQBoneManager class accesses to the BoneDeformer plugin (BoneDeformer.dll).
In Rev4.70, MQBoneManager has been changed significantly without a compatibility.
Class | |
MQBoneManager | Constructor |
Member functions | |
Verified | Available or not |
BeginImport | Begin importing |
EndImport | End importing |
AddBone | Add a bone |
DeleteBone | Delete a bone |
GetBoneNum | Get a number of bones |
EnumBoneID | Enumerate bone IDs |
EnumSelectedBoneID | Enumerate selected bone IDs |
Update | Update |
GetName | Get a bone name |
SetName | Set a bone name |
GetParent | Get a parent bone |
SetParent | Set a parent bone |
GetChildNum | Get a number of child bones |
GetChildren | Get child bones |
GetBasePos | Get a position of a bone |
SetBasePos | Set a position of a bone |
GetBaseMatrix | Get a transformation matrix of a bone |
GetUpVector | Get an up vector of a bone |
SetUpVector | Set an up vector of a bone |
GetForwardAxis | Get a forward axis of a bone |
SetForwardAxis | Set a forward axis of a bone |
GetDeformPos | Get a deformed position of a bone |
GetDeformMatrix | Get a deformed transformation matrix of a bone |
GetDeformScale | Get a deformed scaling of a bone |
SetDeformScale | Set a deformed scaling of a bone |
GetDeformRotate | Get a deformed rotation angle of a bone |
SetDeformRotate | Set a deformed rotation angle of a bone |
GetDeformTranslate | Get a deformed translation of a bone |
SetDeformTranslate | Set a deformed translation of a bone |
GetRotationMatrix | Get a rotation matrix |
GetAngleMin | Get a minimum rotation angle |
SetAngleMin | Set a minimum rotation angle |
GetAngleMax | Get a maximum rotation angle |
SetAngleMax | Set a maximum rotation angle |
GetVisible | Get a visilibity of a bone |
SetVisible | Set a visilibity of a bone |
GetLock | Get a lock of a bone |
SetLock | Set a lock of a bone |
GetDummy | Get a dummy setting of a bone |
SetDummy | Set a dummy setting of a bone |
GetIKChain | Get a IK chain setting of a bone |
SetIKChain | Set a IK chain setting of a bone |
GetMovable | Get a movable setting of a bone |
SetMovable | Set a movable setting of a bone |
GetSkinObjectNum | Get a number of skin objects |
EnumSkinObjectID | Enumerate skin objects |
AddSkinObject | Add a skin object |
DeleteSkinObject | Delete a skin object |
GetVertexWeightArray | Get bones and weights a vertex |
SetVertexWeight | Set a weight |
GetWeightedVertexArray | Enumerate vertices that a bone affects |
NormalizeVertexWeight | Normalize weights for a vertex |
GetIKName GetIKParent GetLink GetGroupID SetIKName SetIKParent SetLink SetGroupID EnumGroups AddGroup GetGroupName |
Functions for PMD |
GetEffectLimitNum | Get a number of limited bones |
DeformObject | Apply a deformation |
MQBoneManager::MQBoneManager(MQBasePlugin *plugin, MQDocument doc);
It is a constructor.
static DWORD MQBoneManager::GetProductID();
It returns a product ID of BoneDeformer plugin.
static DWORD MQBoneManager::GetPluginID();
It returns a plugin ID of BoneDeformer plugin.
bool MQBoneManager::Verified();
It returns whether the BoneDeformer plugin is available.
void MQBoneManager::BeginImport();
It begins an importing.
This method must be called before you add skin objects and bones in an Import plugin.
void MQBoneManager::EndImport();
It finishes an importing.
This method must be called after calling BeginImport() and adding skin objects and bones.
UINT MQBoneManager::AddBone(const ADD_BONE_PARAM& param);
It adds a bone.
bool MQBoneManager::DeleteBone(UINT bone_id);
It deletes a bone.
bool MQBoneManager::AddBrother(UINT bone_id, UINT brother_bone_id);
It registers a bone as a brother.
Obsolete in Rev4.70
int MQBoneManager::GetBoneNum();
It returns a number of bones.
int MQBoneManager::EnumBoneID(std::vector<UINT>& bone_id_array);
It enumerates bone IDs.
int MQBoneManager::EnumSelectedBoneID(std::vector<UINT>& bone_id_array);
It enumerates selected bone IDs.
int MQBoneManager::Update();
It applies modifications of bones and weights to the display.
If you have made any changes to the bones or weights from the station/command plug-in, call this function at the end. And, also call MQBasePlugin::UpdateUndo() to update the undo.
bool MQBoneManager::GetName(UINT bone_id, std::wstring& name);
void MQBoneManager::SetName(UINT bone_id, const wchar_t *name);
It gets or sets bone's name.
bool MQBoneManager::GetTipName(UINT bone_id, std::wstring& name);
void MQBoneManager::SetTipName(UINT bone_id, const wchar_t *tip_name);
It gets or sets bone's tip name.
Obsolete in Rev4.70
bool MQBoneManager::GetParent(UINT bone_id, UINT& parent_id);
void MQBoneManager::SetParent(UINT bone_id, UINT parent_id);
It gets or sets an ID of a parent bone.
bool MQBoneManager::GetChildNum(UINT bone_id, int& child_num);
It returns a number of child bones.
bool MQBoneManager::GetChildren(UINT bone_id, std::vector<UINT>& children);
It returns an array of IDs of child bones.
bool MQBoneManager::GetBrothers(UINT bone_id, std::vector<UINT>& brothers);
It returns an array of IDs of brother bones.
Obsolete in Rev4.70
bool MQBoneManager::GetBaseRootPos(UINT bone_id, MQPoint& pos);
void MQBoneManager::SetBaseRootPos(UINT bone_id, const MQPoint& pos);
It gets or sets a position of a root of a bone before deforming.
Obsolete in Rev4.70, and replaced with GetBasePos().
bool MQBoneManager::GetBaseTipPos(UINT bone_id, MQPoint& pos);
void MQBoneManager::SetBaseTipPos(UINT bone_id, const MQPoint& pos);
It gets or sets a position of a tip of a bone before deforming.
Obsolete in Rev4.70, and replaced with GetBasePos().
bool MQBoneManager::GetBasePos(UINT bone_id, MQPoint& pos);
void MQBoneManager::SetBasePos(UINT bone_id, const MQPoint& pos);
It gets or sets a position of a bone before deforming.
bool MQBoneManager::GetBaseMatrix(UINT bone_id, MQMatrix& matrix);
It returns a transformation matrix of a bone before deforming.
bool MQBoneManager::GetUpVector(UINT bone_id, MQMatrix& matrix);
void MQBoneManager::SetUpVector(UINT bone_id, const MQMatrix matrix);
It gets or sets an up vector of a bone.
bool MQBoneManager::GetForwardAxis(UINT bone_id, int& axis);
void MQBoneManager::SetForwardAxis(UINT bone_id, int axis);
It gets or sets a forward axis.
bool MQBoneManager::GetDeformRootPos(UINT bone_id, MQPoint& pos);
It returns a deformed position of a root of a bone.
Obsolete in Rev4.70, and replaced with GetDeformPos().
bool MQBoneManager::GetDeformTipPos(UINT bone_id, MQPoint& pos);
It returns a deformed position of a tip of a bone.
Obsolete in Rev4.70, and replaced with GetDeformPos().
bool MQBoneManager::GetDeformPos(UINT bone_id, MQPoint& pos);
It returns a deformed position of a bone.
bool MQBoneManager::GetDeformMatrix(UINT bone_id, MQMatrix& matrix);
It returns a deformed transformation matrix of a bone.
bool MQBoneManager::GetDeformScale(UINT bone_id, MQPoint& scale);
void MQBoneManager::SetDeformScale(UINT bone_id, const MQPoint& scale);
It gets or sets a deformed scaling of a bone.
bool MQBoneManager::GetDeformRotate(UINT bone_id, MQAngle& angle);
void MQBoneManager::SetDeformRotate(UINT bone_id, const MQAngle& angle);
It gets or sets a deformed rotation angle of a bone.
bool MQBoneManager::GetDeformTranslate(UINT bone_id, MQPoint& translate);
void MQBoneManager::SetDeformTranslate(UINT bone_id, const MQPoint& translate);
It gets or sets a deformed translation of a bone.
bool MQBoneManager::GetRotationMatrix(UINT bone_id, MQMatrix& matrix);
It returns a rotation matrix of a bone.
bool MQBoneManager::GetAngleMin(UINT bone_id, MQAngle& angle);
void MQBoneManager::SetAngleMin(UINT bone_id, const MQAngle& angle);
It gets or sets a minimum limited rotation angle a bone.
bool MQBoneManager::GetAngleMax(UINT bone_id, MQAngle& angle);
void MQBoneManager::SetAngleMax(UINT bone_id, const MQAngle& angle);
It gets or sets a maximum limited rotation angle a bone.
bool MQBoneManager::GetVisible(UINT bone_id, bool& visible);
void MQBoneManager::SetVisible(UINT bone_id, bool visible);
It gets or sets a setting of a visibility of a bone.
bool MQBoneManager::GetLock(UINT bone_id, bool& lock);
void MQBoneManager::SetLock(UINT bone_id, bool lock);
It gets or sets a setting of a locking of a bone.
bool MQBoneManager::GetDummy(UINT bone_id, bool& dummy);
void MQBoneManager::SetDummy(UINT bone_id, bool dummy);
It gets or sets a setting of a dummy of a bone.
bool MQBoneManager::GetIKChain(UINT bone_id, int& chain);
void MQBoneManager::SetIKChain(UINT bone_id, int chain);
It gets or sets a setting of an IK chain of a bone.
The definition of the chain value has been changed in Rev4.70. 0 means without IK chain, and 1 or larger means a hierarchy to the root bone.
bool MQBoneManager::GetEndPoint(UINT bone_id, bool& end_point);
void MQBoneManager::SetEndPoint(UINT bone_id, bool end_point);
It gets or sets a setting of an end node of a bone.
Obsolete in Rev4.70
bool MQBoneManager::GetMovable(UINT bone_id, bool& movable);
void MQBoneManager::SetMovable(UINT bone_id, bool movable);
It gets or sets a setting of a moveable root of a bone.
int MQBoneManager::GetSkinObjectNum();
It returns a number of skin objects.
int MQBoneManager::EnumSkinObjectID(std::vector<UINT>& obj_id_array);
It returns an unique ID of a skin object.
bool MQBoneManager::AddSkinObject(MQObject obj);
It adds a skin object.
bool MQBoneManager::DeleteSkinObject(MQObject obj);
It removes a skin object.
int MQBoneManager::GetVertexWeightArray(MQObject obj, UINT vertex_id, int array_num, UINT *bone_ids, float *weights);
It returns bones and weight values that influence the specified vertex.
'array_num' means a length of 'bone_ids' and 'weights' arrays. If a number of actual influencing bones exceeds 'array_num', smaller weight values are ignored. To store all weight values, 'array_num' must be equal to the return value of GetBoneNum().
A pair of a bone and a weight value is stored to 'bone_ids' and 'weights' in descending order.
bool MQBoneManager::SetVertexWeight(MQObject obj, UINT vertex_id, UINT bone_id, float weight);
It sets a weight value of a bone to the specified vertex.
int MQBoneManager::GetWeightedVertexArray(UINT bone_id, MQObject obj, std::vector<UINT>& vertex_ids, std::vector<float>& weights);
It returns vertices and weight values that the specified bone influences.
bool MQBoneManager::NormalizeVertexWeight(MQObject obj, UINT vertex_id);
It normalizes weights of bones that affects to the specified vertex.
bool MQBoneManager::GetTipBone(UINT bone_id, UINT& tip_bone_id);
bool MQBoneManager::GetIKName(UINT bone_id, std::wstring& ik_name, std::wstring& ik_tip_name);
bool MQBoneManager::GetIKParent(UINT bone_id, UINT& ik_parent_bone_id, bool& isIK);
bool MQBoneManager::GetLink(UINT bone_id, LINK_PARAM& param);
bool MQBoneManager::GetGroupID(UINT bone_id, UINT& group_id);
void MQBoneManager::SetTipBone(UINT bone_id, UINT tip_bone_id);
void MQBoneManager::SetIKName(UINT bone_id, const wchar_t *ik_name, const wchar_t *ik_tip_name);
void MQBoneManager::SetIKParent(UINT bone_id, UINT ik_parent_bone_id, bool isIK);
void MQBoneManager::SetLink(UINT bone_id, const LINK_PARAM& param);
void MQBoneManager::SetGroupID(UINT bone_id, UINT group_id);
int MQBoneManager::EnumGroups(std::vector<UINT>& group_ids);
UINT MQBoneManager::AddGroup(const wchar_t *name);
bool MQBoneManager::GetGroupName(UINT group_id, std::wstring& name);
These are functions for PMD.
int MQBoneManager::GetEffectLimitNum();
It returns a maximum number of bones affect each vertex. When the value is 0, the number of bones is not limited.
MQBoneManager::LIST_MODE MQBoneManager::GetListMode();
It returns a mode of a bone list.
Obsolete in Rev4.70
void MQBoneManager::SetListMode(LIST_MODE mode);
It specifies a mode of a bone list.
Obsolete in Rev4.70
bool MQBoneManager::DeformObject(MQObject obj, MQObject target);
It deforms a clone of the skin object by the bone information. It cannot deform a skin object directly.