Cleanup: Use 'r_' prefix for return value

Make it obvious which values are written to.
This commit is contained in:
Germano Cavalcante 2020-09-14 15:42:17 -03:00
parent f1e34ee7fa
commit 273bf53e80
3 changed files with 12 additions and 12 deletions

View File

@ -130,8 +130,8 @@ bool BIF_createTransformOrientation(struct bContext *C,
void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *target);
void ED_getTransformOrientationMatrix(const struct bContext *C,
float orientation_mat[3][3],
const short around);
const short around,
float r_orientation_mat[3][3]);
int BIF_countTransformOrientation(const struct bContext *C);

View File

@ -3950,7 +3950,7 @@ static int view_axis_exec(bContext *C, wmOperator *op)
if (obact != NULL) {
float twmat[3][3];
/* same as transform gizmo when normal is set */
ED_getTransformOrientationMatrix(C, twmat, V3D_AROUND_ACTIVE);
ED_getTransformOrientationMatrix(C, V3D_AROUND_ACTIVE, twmat);
align_quat = align_quat_buf;
mat3_to_quat(align_quat, twmat);
invert_qt_normalized(align_quat);

View File

@ -475,7 +475,7 @@ short ED_transform_calc_orientation_from_type_ex(const bContext *C,
}
case V3D_ORIENT_NORMAL: {
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
ED_getTransformOrientationMatrix(C, r_mat, pivot_point);
ED_getTransformOrientationMatrix(C, pivot_point, r_mat);
return V3D_ORIENT_NORMAL;
}
/* no break we define 'normal' as 'local' in Object mode */
@ -488,7 +488,7 @@ short ED_transform_calc_orientation_from_type_ex(const bContext *C,
* use the active pones axis for display [#33575], this works as expected on a single
* bone and users who select many bones will understand what's going on and what local
* means when they start transforming */
ED_getTransformOrientationMatrix(C, r_mat, pivot_point);
ED_getTransformOrientationMatrix(C, pivot_point, r_mat);
}
else {
copy_m3_m4(r_mat, ob->obmat);
@ -1225,8 +1225,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3])
}
void ED_getTransformOrientationMatrix(const bContext *C,
float orientation_mat[3][3],
const short around)
const short around,
float r_orientation_mat[3][3])
{
float normal[3] = {0.0, 0.0, 0.0};
float plane[3] = {0.0, 0.0, 0.0};
@ -1242,22 +1242,22 @@ void ED_getTransformOrientationMatrix(const bContext *C,
switch (type) {
case ORIENTATION_NORMAL:
if (createSpaceNormalTangent(orientation_mat, normal, plane) == 0) {
if (createSpaceNormalTangent(r_orientation_mat, normal, plane) == 0) {
type = ORIENTATION_NONE;
}
break;
case ORIENTATION_VERT:
if (createSpaceNormal(orientation_mat, normal) == 0) {
if (createSpaceNormal(r_orientation_mat, normal) == 0) {
type = ORIENTATION_NONE;
}
break;
case ORIENTATION_EDGE:
if (createSpaceNormalTangent(orientation_mat, normal, plane) == 0) {
if (createSpaceNormalTangent(r_orientation_mat, normal, plane) == 0) {
type = ORIENTATION_NONE;
}
break;
case ORIENTATION_FACE:
if (createSpaceNormalTangent(orientation_mat, normal, plane) == 0) {
if (createSpaceNormalTangent(r_orientation_mat, normal, plane) == 0) {
type = ORIENTATION_NONE;
}
break;
@ -1267,6 +1267,6 @@ void ED_getTransformOrientationMatrix(const bContext *C,
}
if (type == ORIENTATION_NONE) {
unit_m3(orientation_mat);
unit_m3(r_orientation_mat);
}
}