diff options
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 442ad662813..3cb35c48f39 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -127,7 +127,8 @@ void BIF_createTransformOrientation(bContext *C, ReportList *reports, char *name } } -TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(reports), char *name, int overwrite) { +TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(reports), char *name, int overwrite) +{ Base *base = CTX_data_active_base(C); Object *ob; float mat[3][3]; @@ -150,7 +151,8 @@ TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(reports) return addMatrixSpace(C, mat, name, overwrite); } -TransformOrientation *createBoneSpace(bContext *C, ReportList *reports, char *name, int overwrite) { +TransformOrientation *createBoneSpace(bContext *C, ReportList *reports, char *name, int overwrite) +{ float mat[3][3]; float normal[3], plane[3]; @@ -169,7 +171,8 @@ TransformOrientation *createBoneSpace(bContext *C, ReportList *reports, char *na return addMatrixSpace(C, mat, name, overwrite); } -TransformOrientation *createMeshSpace(bContext *C, ReportList *reports, char *name, int overwrite) { +TransformOrientation *createMeshSpace(bContext *C, ReportList *reports, char *name, int overwrite) +{ float mat[3][3]; float normal[3], plane[3]; int type; @@ -267,7 +270,8 @@ int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]) return 1; } -TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], int overwrite) { +TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], int overwrite) +{ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts = NULL; @@ -294,7 +298,8 @@ TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], return ts; } -void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) { +void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) +{ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts; int i; @@ -321,7 +326,8 @@ void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) { } } -void BIF_removeTransformOrientationIndex(bContext *C, int index) { +void BIF_removeTransformOrientationIndex(bContext *C, int index) +{ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts= BLI_findlink(transform_spaces, index); @@ -344,7 +350,8 @@ void BIF_removeTransformOrientationIndex(bContext *C, int index) { } } -void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) { +void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) +{ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; View3D *v3d = CTX_wm_view3d(C); TransformOrientation *ts; @@ -358,7 +365,8 @@ void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) { } } -void BIF_selectTransformOrientationValue(bContext *C, int orientation) { +void BIF_selectTransformOrientationValue(bContext *C, int orientation) +{ View3D *v3d = CTX_wm_view3d(C); if(v3d) /* currently using generic poll */ v3d->twmode = orientation; @@ -407,7 +415,8 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C) return item; } -const char * BIF_menustringTransformOrientation(const bContext *C, const char *title) { +const char * BIF_menustringTransformOrientation(const bContext *C, const char *title) +{ const char* menu = IFACE_("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3"); ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts; @@ -429,7 +438,8 @@ const char * BIF_menustringTransformOrientation(const bContext *C, const char *t return str_menu; } -int BIF_countTransformOrientation(const bContext *C) { +int BIF_countTransformOrientation(const bContext *C) +{ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts; int count = 0; @@ -441,7 +451,8 @@ int BIF_countTransformOrientation(const bContext *C) { return count; } -void applyTransformOrientation(const bContext *C, float mat[3][3], char *name) { +void applyTransformOrientation(const bContext *C, float mat[3][3], char *name) +{ TransformOrientation *ts; View3D *v3d = CTX_wm_view3d(C); int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM); |