diff options
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r-- | source/blender/editors/transform/transform.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 97cc6dd9dd1..8863d337cff 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -39,9 +39,6 @@ #include "DNA_listBase.h" -#include "BLI_smallhash.h" -#include "BKE_editmesh.h" - /* ************************** Types ***************************** */ struct TransInfo; @@ -107,8 +104,6 @@ typedef struct TransCon { float mtx[3][3]; /* Matrix of the Constraint space */ float imtx[3][3]; /* Inverse Matrix of the Constraint space */ float pmtx[3][3]; /* Projection Constraint Matrix (same as imtx with some axis == 0) */ - float center[3]; /* transformation center to define where to draw the view widget - * ALWAYS in global space. Unlike the transformation center */ int imval[2]; /* initial mouse value for visual calculation */ /* the one in TransInfo is not garanty to stay the same (Rotates change it) */ int mode; /* Mode flags of the Constraint */ @@ -216,10 +211,10 @@ typedef struct TransDataEdgeSlideVert { float edge_len; - struct BMVert *v_a, *v_b; + struct BMVert *v_side[2]; /* add origvert.co to get the original locations */ - float dir_a[3], dir_b[3]; + float dir_side[2][3]; int loop_nr; } TransDataEdgeSlideVert; @@ -256,19 +251,20 @@ typedef struct EdgeSlideData { bool flipped_vtx; int curr_sv_index; + + /** when un-clamped - use this index: #TransDataEdgeSlideVert.dir_side */ + int curr_side_unclamp; } EdgeSlideData; typedef struct TransDataVertSlideVert { /* TransDataGenericSlideVert */ - BMVert *v; + struct BMVert *v; struct LinkNode **cd_loop_groups; float co_orig_3d[3]; /* end generic */ - float co_orig_2d[2]; float (*co_link_orig_3d)[3]; - float (*co_link_orig_2d)[2]; int co_link_tot; int co_link_curr; } TransDataVertSlideVert; @@ -287,6 +283,9 @@ typedef struct VertSlideData { bool flipped_vtx; int curr_sv_index; + + /* result of ED_view3d_ob_project_mat_get */ + float proj_mat[4][4]; } VertSlideData; typedef struct BoneInitData { @@ -356,7 +355,10 @@ typedef struct TransInfo { eRedrawFlag redraw; /* redraw flag */ float prop_size; /* proportional circle radius */ char proptext[20]; /* proportional falloff text */ - float center[3]; /* center of transformation */ + float aspect[3]; /* spaces using non 1:1 aspect, (uv's, f-curve, movie-clip... etc) + * use for conversion and snapping. */ + float center[3]; /* center of transformation (in local-space) */ + float center_global[3]; /* center of transformation (in global-space) */ float center2d[2]; /* center in screen coordinates */ int imval[2]; /* initial mouse position */ short event_type; /* event->type used to invoke transform */ @@ -541,6 +543,7 @@ void transformApply(struct bContext *C, TransInfo *t); int transformEnd(struct bContext *C, TransInfo *t); void setTransformViewMatrices(TransInfo *t); +void setTransformViewAspect(TransInfo *t, float r_aspect[3]); void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy); void projectIntViewEx(TransInfo *t, const float vec[3], int adr[2], const eV3DProjTest flag); void projectIntView(TransInfo *t, const float vec[3], int adr[2]); @@ -690,6 +693,7 @@ void restoreTransObjects(TransInfo *t); void recalcData(TransInfo *t); void calculateCenter2D(TransInfo *t); +void calculateCenterGlobal(TransInfo *t); void calculateCenter(TransInfo *t); |