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>2017-08-10 02:44:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-10 02:44:42 +0300
commit7cb65cc03833f1bda969a55f68983c542691be02 (patch)
tree2e95689bba614cdbc537007387cf82a5a06d4cb9 /source/blender/editors/manipulator_library
parent5fac99ca7a1943260bbb293b926ede7deb7f039c (diff)
Manipulator: rename grab enum
We'll want some 3D shapes, so name existing shapes 2D
Diffstat (limited to 'source/blender/editors/manipulator_library')
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
index 7b17a67c9f3..e39b26078c9 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
@@ -106,7 +106,7 @@ static void grab_geom_draw(
immUniformColor4fv(col);
- if (draw_style == ED_MANIPULATOR_GRAB_STYLE_RING) {
+ if (draw_style == ED_MANIPULATOR_GRAB_STYLE_RING_2D) {
if (filled) {
imm_draw_circle_fill(pos, 0, 0, 1.0f, DIAL_RESOLUTION);
}
@@ -114,7 +114,7 @@ static void grab_geom_draw(
imm_draw_circle_wire(pos, 0, 0, 1.0f, DIAL_RESOLUTION);
}
}
- else if (draw_style == ED_MANIPULATOR_GRAB_STYLE_CROSS) {
+ else if (draw_style == ED_MANIPULATOR_GRAB_STYLE_CROSS_2D) {
immBegin(GWN_PRIM_LINES, 4);
immVertex2f(pos, 1.0f, 1.0f);
immVertex2f(pos, -1.0f, -1.0f);
@@ -123,6 +123,9 @@ static void grab_geom_draw(
immVertex2f(pos, 1.0f, -1.0f);
immEnd();
}
+ else {
+ BLI_assert(0);
+ }
immUnbindProgram();
@@ -304,7 +307,8 @@ static void MANIPULATOR_WT_grab_3d(wmManipulatorType *wt)
/* rna */
static EnumPropertyItem rna_enum_draw_style[] = {
- {ED_MANIPULATOR_GRAB_STYLE_RING, "RING", 0, "Ring", ""},
+ {ED_MANIPULATOR_GRAB_STYLE_RING_2D, "RING_2D", 0, "Ring", ""},
+ {ED_MANIPULATOR_GRAB_STYLE_CROSS_2D, "CROSS_2D", 0, "Ring", ""},
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem rna_enum_draw_options[] = {
@@ -312,7 +316,7 @@ static void MANIPULATOR_WT_grab_3d(wmManipulatorType *wt)
{0, NULL, 0, NULL, NULL}
};
- RNA_def_enum(wt->srna, "draw_style", rna_enum_draw_style, ED_MANIPULATOR_GRAB_STYLE_RING, "Draw Style", "");
+ RNA_def_enum(wt->srna, "draw_style", rna_enum_draw_style, ED_MANIPULATOR_GRAB_STYLE_RING_2D, "Draw Style", "");
RNA_def_enum_flag(wt->srna, "draw_options", rna_enum_draw_options, 0, "Draw Options", "");
WM_manipulatortype_target_property_def(wt, "offset", PROP_FLOAT, 3);