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-30 18:38:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-30 19:00:16 +0300
commit00ba48a6997d5421a899101b696e5f86c0bdef0a (patch)
tree8f54f9cd478f88134bea37bb2143e73f83d9a19a /source/blender/editors/transform
parentb448b025c70ab4e6966d3469dc71a5318d3ef731 (diff)
Manipulator: replace old cage2d manipulator
Mostly internal changes, keeping both manipulators could have worked but there was no point long term. There are still some glitches to resolve, will work on those next.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_manipulator2d.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_manipulator2d.c b/source/blender/editors/transform/transform_manipulator2d.c
index 9846dfbeee8..94f425eb9f0 100644
--- a/source/blender/editors/transform/transform_manipulator2d.c
+++ b/source/blender/editors/transform/transform_manipulator2d.c
@@ -136,7 +136,7 @@ static void manipulator2d_get_axis_color(const int axis_idx, float *r_col, float
static ManipulatorGroup2D *manipulatorgroup2d_init(wmManipulatorGroup *mgroup)
{
const wmManipulatorType *wt_arrow = WM_manipulatortype_find("MANIPULATOR_WT_arrow_2d", true);
- const wmManipulatorType *wt_cage = WM_manipulatortype_find("MANIPULATOR_WT_cage_2d_rotate", true);
+ const wmManipulatorType *wt_cage = WM_manipulatortype_find("MANIPULATOR_WT_cage_2d", true);
ManipulatorGroup2D *man = MEM_callocN(sizeof(ManipulatorGroup2D), __func__);
@@ -144,9 +144,6 @@ static ManipulatorGroup2D *manipulatorgroup2d_init(wmManipulatorGroup *mgroup)
man->translate_y = WM_manipulator_new_ptr(wt_arrow, mgroup, NULL);
man->cage = WM_manipulator_new_ptr(wt_cage, mgroup, NULL);
- /* Workaround for missing refresh while interacting with the bound-box. */
- man->cage->flag &= ~WM_MANIPULATOR_DRAW_MODAL;
-
RNA_enum_set(man->cage->ptr, "transform",
ED_MANIPULATOR_CAGE2D_XFORM_FLAG_TRANSLATE |
ED_MANIPULATOR_CAGE2D_XFORM_FLAG_SCALE |
@@ -346,8 +343,8 @@ void ED_widgetgroup_manipulator2d_draw_prepare(const bContext *C, wmManipulatorG
UI_view2d_view_to_region_m4(&ar->v2d, man->cage->matrix_space);
WM_manipulator_set_matrix_offset_location(man->cage, origin_aa);
- man->cage->matrix_offset[0][0] = (man->max[0] - man->min[0]) / 2.0f;
- man->cage->matrix_offset[1][1] = (man->max[1] - man->min[1]) / 2.0f;
+ man->cage->matrix_offset[0][0] = (man->max[0] - man->min[0]);
+ man->cage->matrix_offset[1][1] = (man->max[1] - man->min[1]);
}
/* TODO (Julian)