WIP: uv-simple-select #1

Closed
Chris Blackbourn wants to merge 182 commits from uv-simple-select into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 13 additions and 9 deletions
Showing only changes of commit 19b1957f8f - Show all commits

View File

@ -211,6 +211,12 @@ typedef enum {
HLP_TRACKBALL = 6,
} eTHelpline;
typedef enum {
O_DEFAULT = 0,
O_SCENE,
O_SET,
} eTOType;
/** \} */
/* -------------------------------------------------------------------- */
@ -607,11 +613,7 @@ typedef struct TransInfo {
float matrix[3][3];
} orient[3];
enum {
O_DEFAULT = 0,
O_SCENE,
O_SET,
} orient_curr;
eTOType orient_curr;
/**
* All values from `TransInfo.orient[].type` converted into a flag

View File

@ -2776,15 +2776,17 @@ void transform_gizmo_3d_model_from_constraint_and_mode_set(TransInfo *t)
wmGizmo *gizmo_modal_current = WM_gizmomap_get_modal(t->region->gizmo_map);
if (axis_idx != -1) {
RegionView3D *rv3d = static_cast<RegionView3D *>(t->region->regiondata);
bool update_orientation = !(equals_v3v3(rv3d->twmat[0], t->spacemtx[0]) &&
equals_v3v3(rv3d->twmat[1], t->spacemtx[1]) &&
equals_v3v3(rv3d->twmat[2], t->spacemtx[2]));
float(*mat_cmp)[3] = t->orient[t->orient_curr != O_DEFAULT ? t->orient_curr : O_SCENE].matrix;
bool update_orientation = !(equals_v3v3(rv3d->twmat[0], mat_cmp[0]) &&
equals_v3v3(rv3d->twmat[1], mat_cmp[1]) &&
equals_v3v3(rv3d->twmat[2], mat_cmp[2]));
GizmoGroup *ggd = static_cast<GizmoGroup *>(gzgroup_xform->customdata);
wmGizmo *gizmo_expected = ggd->gizmos[axis_idx];
if (update_orientation || gizmo_modal_current != gizmo_expected) {
if (update_orientation) {
copy_m4_m3(rv3d->twmat, t->spacemtx);
copy_m4_m3(rv3d->twmat, mat_cmp);
copy_v3_v3(rv3d->twmat[3], t->center_global);
}