diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 16:55:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 17:14:10 +0300 |
commit | 61776befc3f88c373e47ccbdf8c75e2ca0f4e987 (patch) | |
tree | 0214b7c5146300d41b7bcbe99f87c92599608e7f /source/blender/editors/transform/transform.h | |
parent | 8f1997975dc60bc1c18992458603ecd58dfded6d (diff) |
Cleanup: move public doc-strings into headers for 'editors'
Ref T92709
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r-- | source/blender/editors/transform/transform.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 380df739876..3a8155ce9f7 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -687,11 +687,19 @@ typedef struct TransInfo { /** \name Public Transform API * \{ */ +/** + * \note caller needs to free `t` on a 0 return + * \warning \a event might be NULL (when tweaking from redo panel) + * \see #saveTransform which writes these values back. + */ bool initTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op, const struct wmEvent *event, int mode); +/** + * \see #initTransform which reads values from the operator. + */ void saveTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op); int transformEvent(TransInfo *t, const struct wmEvent *event); void transformApply(struct bContext *C, TransInfo *t); @@ -708,6 +716,9 @@ void projectFloatView(TransInfo *t, const float vec[3], float adr[2]); void applyAspectRatio(TransInfo *t, float vec[2]); void removeAspectRatio(TransInfo *t, float vec[2]); +/** + * Called in transform_ops.c, on each regeneration of key-maps. + */ struct wmKeyMap *transform_modal_keymap(struct wmKeyConfig *keyconf); /** \} */ @@ -772,12 +783,28 @@ void setInputPostFct(MouseInput *mi, void (*post)(struct TransInfo *t, float val /** \name Generics * \{ */ +/** + * Setup internal data, mouse, vectors + * + * \note \a op and \a event can be NULL + * + * \see #saveTransform does the reverse. + */ void initTransInfo(struct bContext *C, TransInfo *t, struct wmOperator *op, const struct wmEvent *event); +/** + * Needed for mode switching. + */ void freeTransCustomDataForMode(TransInfo *t); +/** + * Here I would suggest only #TransInfo related issues, like free data & reset vars. Not redraws. + */ void postTrans(struct bContext *C, TransInfo *t); +/** + * Free data before switching to another mode. + */ void resetTransModal(TransInfo *t); void resetTransRestrictions(TransInfo *t); @@ -800,17 +827,25 @@ void calculateCenterMedian(TransInfo *t, float r_center[3]); void calculateCenterCursor(TransInfo *t, float r_center[3]); void calculateCenterCursor2D(TransInfo *t, float r_center[2]); void calculateCenterCursorGraph2D(TransInfo *t, float r_center[2]); +/** + * \param select_only: only get active center from data being transformed. + */ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3]); void calculatePropRatio(TransInfo *t); +/** + * Rotate an element, low level code, ignore protected channels. + * (use for objects or pose-bones) + * Similar to #ElementRotation. + */ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot); struct Object *transform_object_deform_pose_armature_get(const TransInfo *t, struct Object *ob); void freeCustomNormalArray(TransInfo *t, TransDataContainer *tc, TransCustomData *custom_data); -/* TODO: `transform_query.c`. */ +/* TODO: move to: `transform_query.c`. */ bool checkUseAxisMatrix(TransInfo *t); #define TRANSFORM_SNAP_MAX_PX 100.0f |