diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-08 16:58:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-08 16:58:28 +0400 |
commit | e4aff350207a436a1814f2c91829004b3d287ff7 (patch) | |
tree | b03fa7ab96f328c26bea42d284976f3239d0070c /source/blender/bmesh/intern | |
parent | a9fb183901f7d64bf5435a28bdb454b1f800cf6a (diff) |
smooth falloff options for loopcut.
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_opdefines.c | 1 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.h | 18 |
2 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index c872fb92a2a..587696268b1 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -969,6 +969,7 @@ static BMOpDefine bmo_subdivide_edges_def = { /* slots_in */ {{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, {"smooth", BMO_OP_SLOT_FLT}, + {"smooth_falloff", BMO_OP_SLOT_INT}, /* SUBD_FALLOFF_ROOT and friends */ {"fractal", BMO_OP_SLOT_FLT}, {"along_normal", BMO_OP_SLOT_FLT}, {"cuts", BMO_OP_SLOT_INT}, diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index ff0fc285dc3..e169bf740de 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -39,6 +39,15 @@ enum { SUBD_STRAIGHT_CUT }; +/* aligned with PROP_SMOOTH and friends */ +enum { + SUBD_FALLOFF_SMOOTH = 0, + SUBD_FALLOFF_SPHERE, + SUBD_FALLOFF_ROOT, + SUBD_FALLOFF_SHARP, + SUBD_FALLOFF_LIN, +}; + enum { SUBDIV_SELECT_ORIG, SUBDIV_SELECT_INNER, @@ -107,12 +116,13 @@ extern const int bmo_opdefines_total; /*------specific operator helper functions-------*/ void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag, - float smooth, float fractal, float along_normal, - int numcuts, - int seltype, int cornertype, + const float smooth, const short smooth_falloff, + const float fractal, const float along_normal, + const int numcuts, + const int seltype, const int cornertype, const short use_single_edge, const short use_grid_fill, const short use_only_quads, - int seed); + const int seed); #include "intern/bmesh_operator_api_inline.h" |