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>2015-12-02 10:08:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-02 10:08:48 +0300
commita5c0964c70cc4c12e574ef7e51fcf6c0b5f38680 (patch)
tree294c583784a171dcc4cff46ea1a3e034f61960df /source/blender/editors/include/ED_transform.h
parent8d8bc24dd501511a1a8adfb011cd3dc447ff77e4 (diff)
Cleanup: transform snap arguments
This was getting very hard to follow, - mixing input/output args. - mixing arg order between functions. - arg names (mode, snap_mode) rename to (snap_to, snap_select)
Diffstat (limited to 'source/blender/editors/include/ED_transform.h')
-rw-r--r--source/blender/editors/include/ED_transform.h61
1 files changed, 42 insertions, 19 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index b0866a564e5..874c6934f6d 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -168,30 +168,53 @@ typedef struct DepthPeel {
struct ListBase;
-typedef enum SnapMode {
+typedef enum SnapSelect {
SNAP_ALL = 0,
SNAP_NOT_SELECTED = 1,
SNAP_NOT_OBEDIT = 2
-} SnapMode;
+} SnapSelect;
#define SNAP_MIN_DISTANCE 30
#define TRANSFORM_DIST_MAX_RAY (FLT_MAX / 2.0f)
-bool peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
-bool peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
-bool snapObjectsTransform(struct TransInfo *t, const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode);
-bool snapObjectsContext(struct bContext *C, const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode);
+bool peelObjectsTransForm(
+ struct TransInfo *t, const float mval[2], SnapSelect snap_select,
+ /* return args */
+ struct ListBase *r_depth_peels);
+bool peelObjectsContext(
+ struct bContext *C, const float mval[2], SnapSelect snap_select,
+ /* return args */
+ struct ListBase *r_depth_peels);
+bool snapObjectsTransform(
+ struct TransInfo *t, const float mval[2], SnapSelect snap_select,
+ /* return args */
+ float r_loc[3], float r_no[3], float *r_dist_px);
+bool snapObjectsContext(
+ struct bContext *C, const float mval[2], SnapSelect snap_select,
+ /* return args */
+ float r_loc[3], float r_no[3], float *r_dist_px);
/* taks args for all settings */
-bool snapObjectsEx(struct Scene *scene, struct Base *base_act, struct View3D *v3d, struct ARegion *ar, struct Object *obedit, short snap_mode,
- const float mval[2], float *r_dist_px,
- float r_loc[3], float r_no[3], float *r_ray_dist, SnapMode mode);
-bool snapObjectsRayEx(struct Scene *scene, struct Base *base_act, struct View3D *v3d, struct ARegion *ar, struct Object *obedit, short snap_mode,
- struct Object **r_ob, float r_obmat[4][4],
- const float ray_start[3], const float ray_normal[3], float *r_ray_dist,
- const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode);
-
-bool snapNodesTransform(struct TransInfo *t, const int mval[2], float *r_dist_px, float r_loc[2], char *r_node_border, SnapMode mode);
-bool snapNodesContext(struct bContext *C, const int mval[2], float *r_dist_px, float r_loc[2], char *r_node_border, SnapMode mode);
-
-#endif
-
+bool snapObjectsEx(
+ struct Scene *scene, struct View3D *v3d, struct ARegion *ar, struct Base *base_act, struct Object *obedit,
+ const float mval[2], SnapSelect snap_select, short snap_mode,
+ float *ray_depth,
+ /* return args */
+ float r_loc[3], float r_no[3], float *r_dist_px);
+bool snapObjectsRayEx(
+ struct Scene *scene, struct View3D *v3d, struct ARegion *ar, struct Base *base_act, struct Object *obedit,
+ const float mval[2], SnapSelect snap_select, short snap_mode,
+ const float ray_start[3], const float ray_normal[3], float *ray_depth,
+ /* return args */
+ float r_loc[3], float r_no[3], float *r_dist_px,
+ struct Object **r_ob, float r_obmat[4][4]);
+
+bool snapNodesTransform(
+ struct TransInfo *t, const int mval[2], SnapSelect snap_select,
+ /* return args */
+ float r_loc[2], float *r_dist_px, char *r_node_border);
+bool snapNodesContext(
+ struct bContext *C, const int mval[2], SnapSelect snap_select,
+ /* return args */
+ float r_loc[2], float *r_dist_px, char *r_node_border);
+
+#endif /* __ED_TRANSFORM_H__ */