Cleanup: rename cage2d draw style (RECTANGLE -> BOX_TRANSFORM)
This commit is contained in:
@@ -725,7 +725,7 @@ static void gizmo_cage2d_draw_intern(wmGizmo *gz,
|
||||
|
||||
float outline_line_width = gz->line_width + 3.0f;
|
||||
|
||||
if (draw_style == ED_GIZMO_CAGE2D_STYLE_RECTANGLE) {
|
||||
if (draw_style == ED_GIZMO_CAGE2D_STYLE_BOX_TRANSFORM) {
|
||||
cage2d_draw_rect_wire(&r, margin, black, transform_flag, draw_options, outline_line_width);
|
||||
cage2d_draw_rect_wire(&r, margin, color, transform_flag, draw_options, gz->line_width);
|
||||
|
||||
@@ -1223,7 +1223,7 @@ static void GIZMO_GT_cage_2d(wmGizmoType *gzt)
|
||||
/* rna */
|
||||
static EnumPropertyItem rna_enum_draw_style[] = {
|
||||
{ED_GIZMO_CAGE2D_STYLE_BOX, "BOX", 0, "Box", ""},
|
||||
{ED_GIZMO_CAGE2D_STYLE_RECTANGLE, "RECTANGLE", 0, "Rectangle", ""},
|
||||
{ED_GIZMO_CAGE2D_STYLE_BOX_TRANSFORM, "BOX_TRANSFORM", 0, "Box Transform", ""},
|
||||
{ED_GIZMO_CAGE2D_STYLE_CIRCLE, "CIRCLE", 0, "Circle", ""},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
@@ -1245,7 +1245,7 @@ static void GIZMO_GT_cage_2d(wmGizmoType *gzt)
|
||||
RNA_def_enum(gzt->srna,
|
||||
"draw_style",
|
||||
rna_enum_draw_style,
|
||||
ED_GIZMO_CAGE2D_STYLE_RECTANGLE,
|
||||
ED_GIZMO_CAGE2D_STYLE_BOX_TRANSFORM,
|
||||
"Draw Style",
|
||||
"");
|
||||
RNA_def_enum_flag(gzt->srna,
|
||||
|
||||
@@ -106,16 +106,18 @@ enum {
|
||||
|
||||
/* draw_style */
|
||||
enum {
|
||||
/** Display the hover region (edge or corner) of the underlying rectangle. */
|
||||
/* Display the hover region (edge or corner) of the underlying bounding box. */
|
||||
ED_GIZMO_CAGE2D_STYLE_BOX = 0,
|
||||
/** Display a rectangular wire plus dots on four corners while hovering. */
|
||||
ED_GIZMO_CAGE2D_STYLE_RECTANGLE,
|
||||
/** Display a circular wire while hovering. */
|
||||
/* Display the bounding box plus dots on four corners while hovering, usually used for
|
||||
transforming a 2D shape. */
|
||||
ED_GIZMO_CAGE2D_STYLE_BOX_TRANSFORM,
|
||||
/* Display the bounding circle while hovering. */
|
||||
ED_GIZMO_CAGE2D_STYLE_CIRCLE,
|
||||
};
|
||||
|
||||
enum {
|
||||
ED_GIZMO_CAGE3D_STYLE_BOX = 0,
|
||||
/* TODO: rename */
|
||||
ED_GIZMO_CAGE3D_STYLE_CIRCLE = 1,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user