diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 20:03:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 20:03:57 +0400 |
commit | 1dccd4c98a4909383b9c11f7c2ee987e22833dad (patch) | |
tree | 3d127436243536d6ceaba4cb884249156ba215cd /source/gameengine/Converter | |
parent | ff4ff9c8a429d9869e7056417bc7acd47a545eb2 (diff) |
code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
Diffstat (limited to 'source/gameengine/Converter')
5 files changed, 17 insertions, 17 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 61379209151..9869dfb9424 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -370,10 +370,10 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* value) obj->GetPose(&m_pose); /* Get the underlying pose from the armature */ } - // get_pose_channel accounts for NULL pose, run on both in case one exists but + // BKE_pose_channel_find_name accounts for NULL pose, run on both in case one exists but // the channel doesnt - if ( !(pchan=get_pose_channel(m_userpose, string)) && - !(pchan=get_pose_channel(m_pose, string)) ) + if ( !(pchan=BKE_pose_channel_find_name(m_userpose, string)) && + !(pchan=BKE_pose_channel_find_name(m_pose, string)) ) { PyErr_SetString(PyExc_ValueError, "channel doesnt exist"); return NULL; @@ -457,8 +457,8 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel, obj->GetPose(&m_pose); /* Get the underlying pose from the armature */ game_copy_pose(&m_userpose, m_pose, 0); } - // pchan= verify_pose_channel(m_userpose, string); // adds the channel if its not there. - pchan= get_pose_channel(m_userpose, string); // adds the channel if its not there. + // pchan= BKE_pose_channel_verify(m_userpose, string); // adds the channel if its not there. + pchan= BKE_pose_channel_find_name(m_userpose, string); // adds the channel if its not there. if (pchan) { copy_v3_v3(pchan->loc, matrix[3]); @@ -480,8 +480,8 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel, obj->GetPose(&m_pose); /* Get the underlying pose from the armature */ game_copy_pose(&m_userpose, m_pose, 0); } - // pchan= verify_pose_channel(m_userpose, string); - pchan= get_pose_channel(m_userpose, string); // adds the channel if its not there. + // pchan= BKE_pose_channel_verify(m_userpose, string); + pchan= BKE_pose_channel_find_name(m_userpose, string); // adds the channel if its not there. // for some reason loc.setValue(pchan->loc) fails if (pchan) { diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index f9ddc258cfe..f38782a9405 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -61,7 +61,7 @@ /** * Move here pose function for game engine so that we can mix with GE objects * Principle is as follow: - * Use Blender structures so that where_is_pose can be used unchanged + * Use Blender structures so that BKE_pose_where_is can be used unchanged * Copy the constraint so that they can be enabled/disabled/added/removed at runtime * Don't copy the constraints for the pose used by the Action actuator, it does not need them. * Scan the constraint structures so that the KX equivalent of target objects are identified and @@ -84,7 +84,7 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint) return; } else if (*dst==src) { - printf("copy_pose source and target are the same\n"); + printf("BKE_pose_copy_data source and target are the same\n"); *dst=NULL; return; } @@ -129,7 +129,7 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint) BLI_ghash_free(ghash, NULL, NULL); // set acceleration structure for channel lookup - make_pose_channels_hash(out); + BKE_pose_channels_hash_make(out); *dst=out; } @@ -200,7 +200,7 @@ void game_free_pose(bPose *pose) { if (pose) { /* free pose-channels and constraints */ - free_pose_channels(pose); + BKE_pose_channels_free(pose); /* free IK solver state */ BIK_clear_data(pose); @@ -225,7 +225,7 @@ BL_ArmatureObject::BL_ArmatureObject( m_poseChannels(), m_objArma(armature), m_framePose(NULL), - m_scene(scene), // maybe remove later. needed for where_is_pose + m_scene(scene), // maybe remove later. needed for BKE_pose_where_is m_lastframe(0.0), m_timestep(0.040), m_activeAct(NULL), @@ -477,7 +477,7 @@ void BL_ArmatureObject::ApplyPose() } // update ourself UpdateBlenderObjectMatrix(m_objArma); - where_is_pose(m_scene, m_objArma); // XXX + BKE_pose_where_is(m_scene, m_objArma); // XXX // restore ourself memcpy(m_objArma->obmat, m_obmat, sizeof(m_obmat)); // restore active targets @@ -590,7 +590,7 @@ bool BL_ArmatureObject::GetBoneMatrix(Bone* bone, MT_Matrix4x4& matrix) bPoseChannel *pchan; ApplyPose(); - pchan = get_pose_channel(m_objArma->pose, bone->name); + pchan = BKE_pose_channel_find_name(m_objArma->pose, bone->name); if (pchan) matrix.setValue(&pchan->pose_mat[0][0]); RestorePose(); diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h index a6848cf57df..ced6b94e6fd 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.h +++ b/source/gameengine/Converter/BL_ArmatureObject.h @@ -132,7 +132,7 @@ protected: struct bPose *m_pose; struct bPose *m_armpose; struct bPose *m_framePose; - struct Scene *m_scene; // need for where_is_pose + struct Scene *m_scene; // need for BKE_pose_where_is double m_lastframe; double m_timestep; // delta since last pose evaluation. class BL_ActionActuator *m_activeAct; diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 6659f137057..14362cd8f06 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2613,7 +2613,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, case PARBONE: { // parent this to a bone - Bone *parent_bone = get_named_bone( (bArmature *)(blenderchild->parent)->data, blenderchild->parsubstr); + Bone *parent_bone = BKE_armature_find_bone_name( (bArmature *)(blenderchild->parent)->data, blenderchild->parsubstr); if (parent_bone) { KX_BoneParentRelation *bone_parent_relation = KX_BoneParentRelation::New(parent_bone); diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index 2aa97370330..ab275fa773a 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -230,7 +230,7 @@ void BL_SkinDeformer::BGEDeformVerts() dg; ++i, dg=(bDeformGroup*)dg->next) { - m_dfnrToPC[i] = get_pose_channel(par_arma->pose, dg->name); + m_dfnrToPC[i] = BKE_pose_channel_find_name(par_arma->pose, dg->name); if (m_dfnrToPC[i] && m_dfnrToPC[i]->bone->flag & BONE_NO_DEFORM) m_dfnrToPC[i] = NULL; |