Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-09-14 21:42:17 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-09-14 21:55:40 +0300
commit273bf53e8013085eb61738fae73d026e3fb67be9 (patch)
treeae3046f14e775e520d88d4d77eb1437422ed5918 /source/blender
parentf1e34ee7faabeaebf857435e8422a68fb520e283 (diff)
Cleanup: Use 'r_' prefix for return value
Make it obvious which values are written to.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/include/ED_transform.h4
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c18
3 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index b53740a531f..d6af119dae0 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -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);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 8b9f0fdb972..b643885ca62 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -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);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index e805743e6bb..f7462464683 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -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);
}
}