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-17 03:01:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-17 03:02:54 +0300
commit8c22d31dccd47102d618dce605c6d5f490575b91 (patch)
treee939f22bc412891a0ced6ca471fe4f89eabce75d /source/blender/editors/include
parent71b70b23b36008b4ac03001b7e691a0189b4d158 (diff)
Manipulator: remove type specific 'new' functions
Instead use generic 'WM_manipulator_new', adding a new 'setup' callback (like wmManipulatorGroup.setup) used to initialize type vars. This moves conventions closer to wmOperator and simplifies exposing to Python.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_manipulator_library.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/source/blender/editors/include/ED_manipulator_library.h b/source/blender/editors/include/ED_manipulator_library.h
index 692d6cbdcd8..924ba7bf792 100644
--- a/source/blender/editors/include/ED_manipulator_library.h
+++ b/source/blender/editors/include/ED_manipulator_library.h
@@ -76,8 +76,7 @@ enum {
ED_MANIPULATOR_ARROW_STYLE_CONE = (1 << 6),
};
-struct wmManipulator *ED_manipulator_arrow3d_new(
- struct wmManipulatorGroup *mgroup, const char *name, const int style);
+void ED_manipulator_arrow3d_set_style(struct wmManipulator *mpr, int style);
void ED_manipulator_arrow3d_set_direction(struct wmManipulator *mpr, const float direction[3]);
void ED_manipulator_arrow3d_set_up_vector(struct wmManipulator *mpr, const float direction[3]);
void ED_manipulator_arrow3d_set_line_len(struct wmManipulator *mpr, const float len);
@@ -89,7 +88,6 @@ void ED_manipulator_arrow3d_cone_set_aspect(struct wmManipulator *mpr, const flo
/* -------------------------------------------------------------------- */
/* 2D Arrow Manipulator */
-struct wmManipulator *ED_manipulator_arrow2d_new(struct wmManipulatorGroup *mgroup, const char *name);
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);
@@ -104,9 +102,8 @@ enum {
ED_MANIPULATOR_RECT_TRANSFORM_STYLE_SCALE_UNIFORM = (1 << 3), /* Manipulator scales uniformly */
};
-struct wmManipulator *ED_manipulator_rect_transform_new(
- struct wmManipulatorGroup *mgroup, const char *name, const int style);
-void ED_manipulator_rect_transform_set_dimensions(
+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);
@@ -119,8 +116,7 @@ enum {
ED_MANIPULATOR_DIAL_STYLE_RING_FILLED = 2,
};
-struct wmManipulator *ED_manipulator_dial3d_new(
- struct wmManipulatorGroup *mgroup, const char *name, const int style);
+void ED_manipulator_dial3d_set_style(struct wmManipulator *mpr, int style);
void ED_manipulator_dial3d_set_up_vector(
struct wmManipulator *mpr, const float direction[3]);
@@ -128,17 +124,17 @@ void ED_manipulator_dial3d_set_up_vector(
/* -------------------------------------------------------------------- */
/* Grab Manipulator */
-struct wmManipulator *ED_manipulator_grab3d_new(
- struct wmManipulatorGroup *mgroup, const char *name, const int style);
+enum {
+ ED_MANIPULATOR_GRAB_STYLE_RING = 0,
+};
+
+void ED_manipulator_grab3d_set_style(struct wmManipulator *mpr, int style);
void ED_manipulator_grab3d_set_up_vector(
struct wmManipulator *mpr, const float direction[3]);
/* -------------------------------------------------------------------- */
/* Facemap Manipulator */
-struct wmManipulator *ED_manipulator_facemap_new(
- struct wmManipulatorGroup *mgroup, const char *name, const int style,
- struct Object *ob, const int facemap);
struct bFaceMap *ED_manipulator_facemap_get_fmap(struct wmManipulator *mpr);
@@ -149,9 +145,9 @@ enum {
ED_MANIPULATOR_PRIMITIVE_STYLE_PLANE = 0,
};
-struct wmManipulator *ED_manipulator_primitive3d_new(
- struct wmManipulatorGroup *mgroup, const char *name, const int style);
+void ED_manipulator_primitive3d_set_style(struct wmManipulator *mpr, int style);
void ED_manipulator_primitive3d_set_direction(struct wmManipulator *mpr, const float direction[3]);
void ED_manipulator_primitive3d_set_up_vector(struct wmManipulator *mpr, const float direction[3]);
+
#endif /* __ED_MANIPULATOR_LIBRARY_H__ */