(new in Rev4.64)
MQBoneManager class accesses to the BoneDeformer plugin (BoneDeformer.dll).
In Rev4.70, MQBoneManager has been changed significantly without a compatibility.
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.
bool MQBoneManager::VRMMeta_Get(VRM_META& meta);
bool MQBoneManager::VRMMeta_Set(const VRM_META& meta);
bool MQBoneManager::VRM0xMeta_Get(VRM0x_META& meta);
bool MQBoneManager::VRM0xMeta_Set(const VRM0x_META& meta);
bool MQBoneManager::VRM0x_GetFlipZ();
void MQBoneManager::VRM0x_SetFlipZ(bool flag);
Handles VRM meta information.
bool MQBoneManager::VRMHumanoid_Get(UINT bone_id, std::wstring& humanoid);
void MQBoneManager::VRMHumanoid_Set(UINT bone_id, const wchar_t *humanoid);
bool MQBoneManager::VRMHumanoid_GetTemplate(std::vector<VRM_HUMANOID_TEMPLATE>& humanoid, OPERATION_MODE mode = OPERATION_MODE::DEFAULT, bool acquire_bone_id = true);
Handles VRM humanoid information.
UINT MQBoneManager::VRMFirstPerson_NewMeshAnnotation(UINT obj_id, const VRM_MESH_ANNOTATION& anno);
bool MQBoneManager::VRMFirstPerson_DeleteMeshAnnotation(UINT annotation_id);
bool MQBoneManager::VRMFirstPerson_Enumerate(std::vector<UINT>& annotation_ids);
bool MQBoneManager::VRMFirstPerson_GetMeshAnnotation(UINT annotation_id, UINT& obj_id, VRM_MESH_ANNOTATION& anno);
bool MQBoneManager::VRMFirstPerson_SetMeshAnnotation(UINT annotation_id, const VRM_MESH_ANNOTATION& anno);
Handles VRM FirstPerson information.
bool MQBoneManager::VRMLookAt_Get(VRM_LOOKAT_PARAM& param);
bool MQBoneManager::VRMLookAt_Set(const VRM_LOOKAT_PARAM& param);
Handles VRM LookAt information.
UINT MQBoneManager::VRMCollider_New(UINT bone_id);
bool MQBoneManager::VRMCollider_Delete(UINT collider_id);
bool MQBoneManager::VRMCollider_Enumerate(std::vector<UINT>& collider_ids);
bool MQBoneManager::VRMCollider_GetParam(UINT collider_id, UINT& bone_id, VRM_COLLIDER_PARAM& param);
bool MQBoneManager::VRMCollider_SetParam(UINT collider_id, const VRM_COLLIDER_PARAM& param);
UINT MQBoneManager::VRMColliderGroup_New(const std::wstring& name, std::vector<UINT> collders = std::vector<UINT>());
bool MQBoneManager::VRMColliderGroup_Delete(UINT group_id);
bool MQBoneManager::VRMColliderGroup_Enumerate(std::vector<UINT>& group_ids);
bool MQBoneManager::VRMColliderGroup_GetName(UINT group_id, std::wstring& name);
bool MQBoneManager::VRMColliderGroup_SetName(UINT group_id, const std::wstring& name);
bool MQBoneManager::VRMColliderGroup_GetColliders(UINT group_id, std::vector<UINT>& collider_ids);
bool MQBoneManager::VRMColliderGroup_SetColliders(UINT group_id, std::vector<UINT> collider_ids);
Handles VRM colliders.
UINT MQBoneManager::VRMSpringBone_New(const std::wstring& name);
bool MQBoneManager::VRMSpringBone_Delete(UINT spring_id);
bool MQBoneManager::VRMSpringBone_Enumerate(std::vector<UINT>& spring_ids);
bool MQBoneManager::VRMSpringBone_GetName(UINT spring_id, std::wstring& name);
bool MQBoneManager::VRMSpringBone_SetName(UINT spring_id, const std::wstring& name);
int VRMSpringBone_GetJointNum(UINT spring_id);
bool MQBoneManager::VRMSpringBone_AddJoint(UINT spring_id, UINT bone_id, const VRM_SPRING_JOINT& joint);
bool MQBoneManager::VRMSpringBone_DeleteJoint(UINT spring_id, int index);
bool MQBoneManager::VRMSpringBone_GetJoint(UINT spring_id, int index, UINT& bone_id, VRM_SPRING_JOINT& joint);
bool MQBoneManager::VRMSpringBone_SetJoint(UINT spring_id, int index, const VRM_SPRING_JOINT& joint);
bool MQBoneManager::VRMSpringBone_GetColliderGroups(UINT spring_id, std::vector<UINT>& group_ids);
bool MQBoneManager::VRMSpringBone_SetColliderGroups(UINT spring_id, std::vector<UINT> group_ids);
bool MQBoneManager::VRMSpringBone_GetCenterBone(UINT spring_id, UINT& center_bone_id);
bool MQBoneManager::VRMSpringBone_SetCenterBone(UINT spring_id, UINT center_bone_id);
Handles VRM spring bones.
UINT MQBoneManager::VRMNodeConstraint_New(UINT bone_id);
bool MQBoneManager::VRMNodeConstraint_Delete(UINT nc_id);
bool MQBoneManager::VRMNodeConstraint_Enumerate(std::vector<UINT>& nc_ids);
bool MQBoneManager::VRMNodeConstraint_Get(UINT nc_id, UINT& bone_id, VRM_NODE_CONSTRAINT& param);
bool MQBoneManager::VRMNodeConstraint_Set(UINT nc_id, const VRM_NODE_CONSTRAINT& param);
Handles VRM node constraints.