Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/ED_transform.h
| Show First 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | |||||
| #define P_VIEW2D_EDGE_PAN (1 << 16) | #define P_VIEW2D_EDGE_PAN (1 << 16) | ||||
| /* For properties performed when confirming the transformation. */ | /* For properties performed when confirming the transformation. */ | ||||
| #define P_POST_TRANSFORM (1 << 19) | #define P_POST_TRANSFORM (1 << 19) | ||||
| void Transform_Properties(struct wmOperatorType *ot, int flags); | void Transform_Properties(struct wmOperatorType *ot, int flags); | ||||
| /* *** transform_orientations.c *** */ | /* *** transform_orientations.c *** */ | ||||
| void ED_transform_calc_orientation_from_type(const struct bContext *C, float r_mat[3][3]); | void ED_transform_calc_orientation_from_type(const struct bContext *C, float r_mat[3][3]); | ||||
| /** | |||||
| * \note The resulting matrix may not be orthogonal, | |||||
| * callers that depend on `r_mat` to be orthogonal should use #orthogonalize_m3. | |||||
| * | |||||
| * A non orthogonal matrix may be returned when: | |||||
| * - #V3D_ORIENT_GIMBAL the result won't be orthogonal unless the object has no rotation. | |||||
| * - #V3D_ORIENT_LOCAL may contain shear from non-uniform scale in parent/child relationships. | |||||
| * - #V3D_ORIENT_CUSTOM may have been created from #V3D_ORIENT_LOCAL. | |||||
| */ | |||||
| short ED_transform_calc_orientation_from_type_ex(const struct Scene *scene, | short ED_transform_calc_orientation_from_type_ex(const struct Scene *scene, | ||||
| struct ViewLayer *view_layer, | struct ViewLayer *view_layer, | ||||
| const struct View3D *v3d, | const struct View3D *v3d, | ||||
| const struct RegionView3D *rv3d, | const struct RegionView3D *rv3d, | ||||
| struct Object *ob, | struct Object *ob, | ||||
| struct Object *obedit, | struct Object *obedit, | ||||
| const short orientation_index, | const short orientation_index, | ||||
| const int pivot_point, | const int pivot_point, | ||||
| float r_mat[3][3]); | float r_mat[3][3]); | ||||
| /* transform gizmos */ | /* transform gizmos */ | ||||
| void VIEW3D_GGT_xform_gizmo(struct wmGizmoGroupType *gzgt); | void VIEW3D_GGT_xform_gizmo(struct wmGizmoGroupType *gzgt); | ||||
| /** | |||||
| * Only poll, flag & gzmap_params differ. | |||||
| */ | |||||
| void VIEW3D_GGT_xform_gizmo_context(struct wmGizmoGroupType *gzgt); | void VIEW3D_GGT_xform_gizmo_context(struct wmGizmoGroupType *gzgt); | ||||
| void VIEW3D_GGT_xform_cage(struct wmGizmoGroupType *gzgt); | void VIEW3D_GGT_xform_cage(struct wmGizmoGroupType *gzgt); | ||||
| void VIEW3D_GGT_xform_shear(struct wmGizmoGroupType *gzgt); | void VIEW3D_GGT_xform_shear(struct wmGizmoGroupType *gzgt); | ||||
| /* *** transform_gizmo_extrude_3d.c *** */ | /* *** transform_gizmo_extrude_3d.c *** */ | ||||
| void VIEW3D_GGT_xform_extrude(struct wmGizmoGroupType *gzgt); | void VIEW3D_GGT_xform_extrude(struct wmGizmoGroupType *gzgt); | ||||
| /* Generic 2D transform gizmo callback assignment. */ | /* Generic 2D transform gizmo callback assignment. */ | ||||
| Show All 21 Lines | |||||
| }; | }; | ||||
| struct TransformCalcParams { | struct TransformCalcParams { | ||||
| uint use_only_center : 1; | uint use_only_center : 1; | ||||
| uint use_local_axis : 1; | uint use_local_axis : 1; | ||||
| /* Use 'Scene.orientation_type' when zero, otherwise subtract one and use. */ | /* Use 'Scene.orientation_type' when zero, otherwise subtract one and use. */ | ||||
| ushort orientation_index; | ushort orientation_index; | ||||
| }; | }; | ||||
| /** | |||||
| * Centroid, bound-box, of selection. | |||||
| * | |||||
| * Returns total items selected. | |||||
| */ | |||||
| int ED_transform_calc_gizmo_stats(const struct bContext *C, | int ED_transform_calc_gizmo_stats(const struct bContext *C, | ||||
| const struct TransformCalcParams *params, | const struct TransformCalcParams *params, | ||||
| struct TransformBounds *tbounds); | struct TransformBounds *tbounds); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||