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-06-21 06:54:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-21 07:10:14 +0300
commitb7669ac1c672a92f31735ae9f92b369f9ba30eb1 (patch)
tree1747e45bcc61cd4c2fc02dd3f006f49b4a18ca2b /source/blender/editors/mesh/editmesh_bisect.c
parent5b51dcacbc81df6283518317c274bf897010e967 (diff)
Manipulators: move settings to ID properties
This makes manipulator access closer to operators, and allows Python access. This adds RNA for manipulators, but not Python registration yet. - Split draw style into 2x settings: `draw_style` (enum) & `draw_options` (enum-flag) - Rename wmManipulator.properties -> properties_edit, Use wmManipulator.properties for ID-properties. Note that this area of the API will need further work since manipulators now have 2 kinds of properties & API's to access them.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_bisect.c')
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 7c55f0033a3..34644bb7fd6 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -448,8 +448,9 @@ static void manipulator_mesh_bisect_update_from_op(ManipulatorGroup *man)
cross_v3_v3v3(plane_no_cross, plane_no, man->data.rotate_axis);
WM_manipulator_set_matrix_offset_rotation_from_yz_axis(man->rotate_c, plane_no_cross, man->data.rotate_axis);
- ED_manipulator_dial3d_set_use_start_y_axis(man->rotate_c, true);
- ED_manipulator_dial3d_set_use_double_helper(man->rotate_c, true);
+ RNA_enum_set(man->rotate_c->ptr, "draw_options",
+ ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_MIRROR |
+ ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_START_Y);
}
}
@@ -606,13 +607,12 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup
const wmManipulatorType *wt_grab = WM_manipulatortype_find("MANIPULATOR_WT_grab_3d", true);
const wmManipulatorType *wt_dial = WM_manipulatortype_find("MANIPULATOR_WT_dial_3d", true);
- man->translate_z = WM_manipulator_new_ptr(wt_arrow, mgroup, "translate_z");
- man->translate_c = WM_manipulator_new_ptr(wt_grab, mgroup, "translate_c");
- man->rotate_c = WM_manipulator_new_ptr(wt_dial, mgroup, "rotate_c");
+ man->translate_z = WM_manipulator_new_ptr(wt_arrow, mgroup, "translate_z", NULL);
+ man->translate_c = WM_manipulator_new_ptr(wt_grab, mgroup, "translate_c", NULL);
+ man->rotate_c = WM_manipulator_new_ptr(wt_dial, mgroup, "rotate_c", NULL);
- ED_manipulator_arrow3d_set_style(man->translate_z, ED_MANIPULATOR_ARROW_STYLE_NORMAL);
- ED_manipulator_grab3d_set_style(man->translate_c, ED_MANIPULATOR_GRAB_STYLE_RING);
- ED_manipulator_dial3d_set_style(man->rotate_c, ED_MANIPULATOR_DIAL_STYLE_RING);
+ 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);
WM_manipulator_set_flag(man->translate_c, WM_MANIPULATOR_DRAW_VALUE, true);
WM_manipulator_set_flag(man->rotate_c, WM_MANIPULATOR_DRAW_VALUE, true);