diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-21 06:54:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-21 07:10:14 +0300 |
commit | b7669ac1c672a92f31735ae9f92b369f9ba30eb1 (patch) | |
tree | 1747e45bcc61cd4c2fc02dd3f006f49b4a18ca2b /source/blender/editors/include/ED_manipulator_library.h | |
parent | 5b51dcacbc81df6283518317c274bf897010e967 (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/include/ED_manipulator_library.h')
-rw-r--r-- | source/blender/editors/include/ED_manipulator_library.h | 60 |
1 files changed, 24 insertions, 36 deletions
diff --git a/source/blender/editors/include/ED_manipulator_library.h b/source/blender/editors/include/ED_manipulator_library.h index 421fdbf1212..b1970a7bab3 100644 --- a/source/blender/editors/include/ED_manipulator_library.h +++ b/source/blender/editors/include/ED_manipulator_library.h @@ -64,70 +64,61 @@ void ED_manipulator_draw_preset_facemap( /* 3D Arrow Manipulator */ enum { - ED_MANIPULATOR_ARROW_STYLE_NORMAL = 1, - ED_MANIPULATOR_ARROW_STYLE_NO_AXIS = (1 << 1), - ED_MANIPULATOR_ARROW_STYLE_CROSS = (1 << 2), + ED_MANIPULATOR_ARROW_STYLE_NORMAL = 0, + ED_MANIPULATOR_ARROW_STYLE_CROSS = 1, + ED_MANIPULATOR_ARROW_STYLE_BOX = 2, + ED_MANIPULATOR_ARROW_STYLE_CONE = 3, +}; + +enum { /* inverted offset during interaction - if set it also sets constrained below */ ED_MANIPULATOR_ARROW_STYLE_INVERTED = (1 << 3), /* clamp arrow interaction to property width */ ED_MANIPULATOR_ARROW_STYLE_CONSTRAINED = (1 << 4), - /* use a box for the arrowhead */ - ED_MANIPULATOR_ARROW_STYLE_BOX = (1 << 5), - ED_MANIPULATOR_ARROW_STYLE_CONE = (1 << 6), }; -void ED_manipulator_arrow3d_set_style(struct wmManipulator *mpr, int style); -void ED_manipulator_arrow3d_set_line_len(struct wmManipulator *mpr, const float len); void ED_manipulator_arrow3d_set_ui_range(struct wmManipulator *mpr, const float min, const float max); void ED_manipulator_arrow3d_set_range_fac(struct wmManipulator *mpr, const float range_fac); -void ED_manipulator_arrow3d_cone_set_aspect(struct wmManipulator *mpr, const float aspect[2]); - /* -------------------------------------------------------------------- */ /* 2D Arrow Manipulator */ -void ED_manipulator_arrow2d_set_angle(struct wmManipulator *mpr, const float rot_fac); -void ED_manipulator_arrow2d_set_line_len(struct wmManipulator *mpr, const float len); - +/* none */ /* -------------------------------------------------------------------- */ /* Cage Manipulator */ enum { - ED_MANIPULATOR_RECT_TRANSFORM_STYLE_TRANSLATE = 1, /* Manipulator translates */ - ED_MANIPULATOR_RECT_TRANSFORM_STYLE_ROTATE = (1 << 1), /* Manipulator rotates */ - ED_MANIPULATOR_RECT_TRANSFORM_STYLE_SCALE = (1 << 2), /* Manipulator scales */ - ED_MANIPULATOR_RECT_TRANSFORM_STYLE_SCALE_UNIFORM = (1 << 3), /* Manipulator scales uniformly */ + ED_MANIPULATOR_RECT_TRANSFORM_FLAG_TRANSLATE = (1 << 0), /* Manipulator translates */ + ED_MANIPULATOR_RECT_TRANSFORM_FLAG_ROTATE = (1 << 1), /* Manipulator rotates */ + ED_MANIPULATOR_RECT_TRANSFORM_FLAG_SCALE = (1 << 2), /* Manipulator scales */ + ED_MANIPULATOR_RECT_TRANSFORM_FLAG_SCALE_UNIFORM = (1 << 3), /* Manipulator scales uniformly */ }; -void ED_manipulator_cage2d_transform_set_style(struct wmManipulator *mpr, int style); -void ED_manipulator_cage2d_transform_set_dims( - struct wmManipulator *mpr, const float width, const float height); - - /* -------------------------------------------------------------------- */ /* Dial Manipulator */ +/* draw_options */ enum { - ED_MANIPULATOR_DIAL_STYLE_RING = 0, - ED_MANIPULATOR_DIAL_STYLE_RING_CLIPPED = 1, - ED_MANIPULATOR_DIAL_STYLE_RING_FILLED = 2, + ED_MANIPULATOR_DIAL_DRAW_FLAG_NOP = 0, + ED_MANIPULATOR_DIAL_DRAW_FLAG_CLIP = (1 << 0), + ED_MANIPULATOR_DIAL_DRAW_FLAG_FILL = (1 << 1), + ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_MIRROR = (1 << 2), + ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_START_Y = (1 << 3), }; -void ED_manipulator_dial3d_set_style(struct wmManipulator *mpr, int style); -void ED_manipulator_dial3d_set_use_start_y_axis( - struct wmManipulator *mpr, const bool enabled); -void ED_manipulator_dial3d_set_use_double_helper( - struct wmManipulator *mpr, const bool enabled); - /* -------------------------------------------------------------------- */ /* Grab Manipulator */ +/* draw_options */ enum { - ED_MANIPULATOR_GRAB_STYLE_RING = 0, + ED_MANIPULATOR_GRAB_DRAW_FLAG_NOP = 0, + ED_MANIPULATOR_GRAB_DRAW_FLAG_FILL = (1 << 0), }; -void ED_manipulator_grab3d_set_style(struct wmManipulator *mpr, int style); +enum { + ED_MANIPULATOR_GRAB_STYLE_RING = 0, +}; /* -------------------------------------------------------------------- */ @@ -137,7 +128,4 @@ enum { ED_MANIPULATOR_PRIMITIVE_STYLE_PLANE = 0, }; -void ED_manipulator_primitive3d_set_style(struct wmManipulator *mpr, int style); - - #endif /* __ED_MANIPULATOR_LIBRARY_H__ */ |