diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-13 18:08:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-13 18:08:53 +0400 |
commit | af5d994b155650ef390635030bb5e9b528637695 (patch) | |
tree | 33157b82bbe9f0b78783babbacdee5d639d659e6 /source/blender/editors/transform/transform.h | |
parent | 5eb2070fc7920706ffc9b06220f5d698fc91f015 (diff) |
add new vertex slide transform operator, different from the existing vertex slide tool based on user feedback.
- no 2-step select edge, then slide. Instead you can slide and select the edge at the same time.
- ability to slide multiple verts at one.
supports proportional option for vertex slide and flipping, both matching edge slide functionality.
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r-- | source/blender/editors/transform/transform.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 59ed1abe2c4..5eb9bc19cd3 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -224,6 +224,31 @@ typedef struct EdgeSlideData { int curr_sv_index; } EdgeSlideData; + +typedef struct TransDataVertSlideVert { + BMVert *v; + float co_orig_3d[3]; + 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; + +typedef struct VertSlideData { + TransDataVertSlideVert *sv; + int totsv; + + struct BMEditMesh *em; + + float perc; + + int is_proportional; + int flipped_vtx; + + int curr_sv_index; +} VertSlideData; + typedef struct TransData { float dist; /* Distance needed to affect element (for Proportionnal Editing) */ float rdist; /* Distance to the nearest element (for Proportionnal Editing) */ @@ -530,6 +555,10 @@ void initEdgeSlide(TransInfo *t); int handleEventEdgeSlide(TransInfo *t, struct wmEvent *event); int EdgeSlide(TransInfo *t, const int mval[2]); +void initVertSlide(TransInfo *t); +int handleEventVertSlide(TransInfo *t, struct wmEvent *event); +int VertSlide(TransInfo *t, const int mval[2]); + void initTimeTranslate(TransInfo *t); int TimeTranslate(TransInfo *t, const int mval[2]); @@ -672,8 +701,6 @@ void resetTransRestrictions(TransInfo *t); void drawLine(TransInfo *t, const float center[3], const float dir[3], char axis, short options); -void drawNonPropEdge(const struct bContext *C, TransInfo *t); - /* DRAWLINE options flags */ #define DRAWLIGHT 1 @@ -719,4 +746,6 @@ void freeEdgeSlideTempFaces(EdgeSlideData *sld); void freeEdgeSlideVerts(TransInfo *t); void projectEdgeSlideData(TransInfo *t, bool is_final); +void freeVertSlideVerts(TransInfo *t); + #endif |