diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-03 08:15:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-03 08:19:33 +0300 |
commit | 51aba69b89372f13ace4a278d9a23999dfd755d9 (patch) | |
tree | 1084e659481ae93f0692f7bf84076baa11d33291 /source/blender/editors/include/ED_transform.h | |
parent | f5cb96704bcdbd94cc7dacfef51c8028c28f4c4d (diff) |
Transform: expose 3D center/axis calculation
This is needed for other manipulator placement.
Diffstat (limited to 'source/blender/editors/include/ED_transform.h')
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index a6bed6c1ee6..a974b6cfe9e 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -194,4 +194,22 @@ bool snapNodesTransform( /* return args */ float r_loc[2], float *r_dist_px, char *r_node_border); + +#define USE_AXIS_BOUNDS + +struct TransformBounds { + float center[3]; /* Center for transform widget. */ + float min[3], max[3]; /* Boundbox of selection for transform widget. */ + +#ifdef USE_AXIS_BOUNDS + /* Normalized axis */ + float axis[3][3]; + float axis_min[3], axis_max[3]; +#endif +}; + +int ED_transform_calc_manipulator_stats( + const struct bContext *C, bool use_only_center, + struct TransformBounds *tbounds); + #endif /* __ED_TRANSFORM_H__ */ |