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.
Showing only changes of commit 90f57ca1ca - Show all commits

View File

@ -86,8 +86,7 @@ struct Dial3dParams {
float arc_inner_factor; float arc_inner_factor;
float *clip_plane; float *clip_plane;
}; };
static void dial_3d_draw_util(const float matrix_basis[4][4], static void dial_3d_draw_util(const float matrix_final[4][4],
const float matrix_final[4][4],
const float line_width, const float line_width,
const float color[4], const float color[4],
const bool select, const bool select,
@ -96,7 +95,7 @@ static void dial_3d_draw_util(const float matrix_basis[4][4],
static void dial_geom_draw(const float color[4], static void dial_geom_draw(const float color[4],
const float line_width, const float line_width,
const bool select, const bool select,
const float axis_modal_mat[4][4], const float clip_plane_mat[4][4],
const float clip_plane[4], const float clip_plane[4],
const float arc_partial_angle, const float arc_partial_angle,
const float arc_inner_factor, const float arc_inner_factor,
@ -118,7 +117,7 @@ static void dial_geom_draw(const float color[4],
immBindBuiltinProgram(filled ? GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR : immBindBuiltinProgram(filled ? GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR :
GPU_SHADER_3D_POLYLINE_CLIPPED_UNIFORM_COLOR); GPU_SHADER_3D_POLYLINE_CLIPPED_UNIFORM_COLOR);
immUniform4fv("ClipPlane", clip_plane); immUniform4fv("ClipPlane", clip_plane);
immUniformMatrix4fv("ModelMatrix", axis_modal_mat); immUniformMatrix4fv("ModelMatrix", clip_plane_mat);
} }
else { else {
immBindBuiltinProgram(filled ? GPU_SHADER_3D_UNIFORM_COLOR : immBindBuiltinProgram(filled ? GPU_SHADER_3D_UNIFORM_COLOR :
@ -432,8 +431,7 @@ static void dial_draw_intern(
} }
} }
dial_3d_draw_util(gz->matrix_basis, dial_3d_draw_util(matrix_final,
matrix_final,
gz->line_width, gz->line_width,
color, color,
select, select,
@ -613,8 +611,7 @@ static int gizmo_dial_invoke(bContext *UNUSED(C), wmGizmo *gz, const wmEvent *ev
/** \name Dial Gizmo API /** \name Dial Gizmo API
* \{ */ * \{ */
static void dial_3d_draw_util(const float matrix_basis[4][4], static void dial_3d_draw_util(const float matrix_final[4][4],
const float matrix_final[4][4],
const float line_width, const float line_width,
const float color[4], const float color[4],
const bool select, const bool select,
@ -650,7 +647,7 @@ static void dial_3d_draw_util(const float matrix_basis[4][4],
dial_geom_draw(color, dial_geom_draw(color,
line_width, line_width,
select, select,
matrix_basis, matrix_final,
params->clip_plane, params->clip_plane,
params->arc_partial_angle, params->arc_partial_angle,
params->arc_inner_factor, params->arc_inner_factor,