Fix T80982: Crash using custom orientations beside the first
Regression in f7829787da
This commit is contained in:
parent
84653f015a
commit
f470a02afa
Notes:
blender-bot
2023-02-14 04:24:05 +01:00
Referenced by issue #80994, Blender 2.91 Alpha make crash guide still Referenced by issue #80982, Crash when using any custom transform orientation besides the first one created
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue