Refactor: make bPoseChannel* parameter const in some functions

For some "get … from pose channel" functions, make its `bPoseChannel*`
parameter `const` as it's not being modified.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/138590
This commit is contained in:
Sybren A. Stüvel
2025-05-08 12:07:43 +02:00
parent 9249beb83f
commit 23f720da68
2 changed files with 12 additions and 8 deletions

View File

@@ -313,7 +313,7 @@ void BKE_armature_loc_world_to_pose(Object *ob, const float inloc[3], float outl
* \note this cannot be used to convert to pose-space transforms of the supplied
* pose-channel into its local space (i.e. *visual*-keyframing).
*/
void BKE_armature_mat_pose_to_bone(bPoseChannel *pchan,
void BKE_armature_mat_pose_to_bone(const bPoseChannel *pchan,
const float inmat[4][4],
float outmat[4][4]);
/**
@@ -321,11 +321,13 @@ void BKE_armature_mat_pose_to_bone(bPoseChannel *pchan,
* \note this cannot be used to convert to pose-space location of the supplied
* pose-channel into its local space (i.e. *visual*-keyframing).
*/
void BKE_armature_loc_pose_to_bone(bPoseChannel *pchan, const float inloc[3], float outloc[3]);
void BKE_armature_loc_pose_to_bone(const bPoseChannel *pchan,
const float inloc[3],
float outloc[3]);
/**
* Convert Bone-Space Matrix to Pose-Space Matrix.
*/
void BKE_armature_mat_bone_to_pose(bPoseChannel *pchan,
void BKE_armature_mat_bone_to_pose(const bPoseChannel *pchan,
const float inmat[4][4],
float outmat[4][4]);
/**
@@ -339,7 +341,7 @@ void BKE_armature_mat_pose_to_delta(float delta_mat[4][4],
void BKE_armature_mat_pose_to_bone_ex(Depsgraph *depsgraph,
Object *ob,
bPoseChannel *pchan,
const bPoseChannel *pchan,
const float inmat[4][4],
float outmat[4][4]);

View File

@@ -2238,7 +2238,7 @@ void BKE_bone_parent_transform_apply(const BoneParentTransform *bpt,
rescale_m4(outmat, bpt->post_scale);
}
void BKE_armature_mat_pose_to_bone(bPoseChannel *pchan,
void BKE_armature_mat_pose_to_bone(const bPoseChannel *pchan,
const float inmat[4][4],
float outmat[4][4])
{
@@ -2249,7 +2249,7 @@ void BKE_armature_mat_pose_to_bone(bPoseChannel *pchan,
BKE_bone_parent_transform_apply(&bpt, inmat, outmat);
}
void BKE_armature_mat_bone_to_pose(bPoseChannel *pchan,
void BKE_armature_mat_bone_to_pose(const bPoseChannel *pchan,
const float inmat[4][4],
float outmat[4][4])
{
@@ -2259,7 +2259,9 @@ void BKE_armature_mat_bone_to_pose(bPoseChannel *pchan,
BKE_bone_parent_transform_apply(&bpt, inmat, outmat);
}
void BKE_armature_loc_pose_to_bone(bPoseChannel *pchan, const float inloc[3], float outloc[3])
void BKE_armature_loc_pose_to_bone(const bPoseChannel *pchan,
const float inloc[3],
float outloc[3])
{
float xLocMat[4][4];
float nLocMat[4][4];
@@ -2283,7 +2285,7 @@ void BKE_armature_loc_pose_to_bone(bPoseChannel *pchan, const float inloc[3], fl
void BKE_armature_mat_pose_to_bone_ex(Depsgraph *depsgraph,
Object *ob,
bPoseChannel *pchan,
const bPoseChannel *pchan,
const float inmat[4][4],
float outmat[4][4])
{