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:
authorCampbell Barton <ideasman42@gmail.com>2020-09-20 08:56:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-20 08:59:22 +0300
commitf470a02afaea0d56ffaef976fd149edfb68c2c34 (patch)
treec5b5bbb2038c648d1cd70e296484f0bc4befbfce /source/blender/editors/transform
parent84653f015ad96af794473dff2188a523cc568a27 (diff)
Fix T80982: Crash using custom orientations beside the first
Regression in f7829787da5c64b3fa715a042c2a45ecd4314676
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.h2
-rw-r--r--source/blender/editors/transform/transform_orientations.c8
2 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 0e141b542cf..ef206973e3b 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -693,7 +693,7 @@ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot);
/*********************** Transform Orientations ******************************/
short transform_orientation_matrix_get(struct bContext *C,
TransInfo *t,
- const short orientation,
+ short orientation,
const float custom[3][3],
float r_spacemtx[3][3]);
const char *transform_orientations_spacename_get(TransInfo *t, const short orient_type);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 5a90b59b505..276d9381a0b 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -533,11 +533,8 @@ short ED_transform_calc_orientation_from_type_ex(const bContext *C,
/* Sets the matrix of the specified space orientation.
* If the matrix cannot be obtained, an orientation different from the one
* informed is returned */
-short transform_orientation_matrix_get(bContext *C,
- TransInfo *t,
- const short orientation,
- const float custom[3][3],
- float r_spacemtx[3][3])
+short transform_orientation_matrix_get(
+ bContext *C, TransInfo *t, short orientation, const float custom[3][3], float r_spacemtx[3][3])
{
Object *ob = NULL;
Object *obedit = NULL;
@@ -552,6 +549,7 @@ short transform_orientation_matrix_get(bContext *C,
if (orientation >= V3D_ORIENT_CUSTOM) {
orientation_index_custom = orientation - V3D_ORIENT_CUSTOM;
+ orientation = V3D_ORIENT_CUSTOM;
}
switch (orientation) {
case V3D_ORIENT_GIMBAL: