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
parent5fac99ca7a1943260bbb293b926ede7deb7f039c (diff)
Manipulator: rename grab enum
We'll want some 3D shapes, so name existing shapes 2D
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_manipulator_library.h4
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c12
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c2
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c2
-rw-r--r--source/blender/editors/space_node/node_manipulators.c2
5 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/editors/include/ED_manipulator_library.h b/source/blender/editors/include/ED_manipulator_library.h
index 5d0f1526050..a713202fc4b 100644
--- a/source/blender/editors/include/ED_manipulator_library.h
+++ b/source/blender/editors/include/ED_manipulator_library.h
@@ -119,8 +119,8 @@ enum {
};
enum {
- ED_MANIPULATOR_GRAB_STYLE_RING = 0,
- ED_MANIPULATOR_GRAB_STYLE_CROSS = 1,
+ ED_MANIPULATOR_GRAB_STYLE_RING_2D = 0,
+ ED_MANIPULATOR_GRAB_STYLE_CROSS_2D = 1,
};
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);
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 9f011140e49..5f50ce1f37b 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -626,7 +626,7 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup
UI_GetThemeColor3fv(TH_MANIPULATOR_SECONDARY, man->rotate_c->color);
RNA_enum_set(man->translate_z->ptr, "draw_style", ED_MANIPULATOR_ARROW_STYLE_NORMAL);
- RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING);
+ RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING_2D);
WM_manipulator_set_flag(man->translate_c, WM_MANIPULATOR_DRAW_VALUE, true);
WM_manipulator_set_flag(man->rotate_c, WM_MANIPULATOR_DRAW_VALUE, true);
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 4be16d73757..aa1d18b18c9 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -1092,7 +1092,7 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
RNA_enum_set(man->translate_z->ptr, "draw_style", ED_MANIPULATOR_ARROW_STYLE_NORMAL);
- RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING);
+ RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING_2D);
WM_manipulator_set_flag(man->translate_c, WM_MANIPULATOR_DRAW_VALUE, true);
WM_manipulator_set_flag(man->rotate_c, WM_MANIPULATOR_DRAW_VALUE, true);
diff --git a/source/blender/editors/space_node/node_manipulators.c b/source/blender/editors/space_node/node_manipulators.c
index 0435e109922..2064de11c51 100644
--- a/source/blender/editors/space_node/node_manipulators.c
+++ b/source/blender/editors/space_node/node_manipulators.c
@@ -413,7 +413,7 @@ static void WIDGETGROUP_node_sbeam_setup(const bContext *UNUSED(C), wmManipulato
sbeam_group->manipulator = WM_manipulator_new("MANIPULATOR_WT_grab_3d", mgroup, NULL);
wmManipulator *mpr = sbeam_group->manipulator;
- RNA_enum_set(mpr->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_CROSS);
+ RNA_enum_set(mpr->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_CROSS_2D);
mpr->scale_basis = 0.05f;