Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

editmesh_tools.c File Reference

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "BLO_sys_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_key_types.h"
#include "MEM_guardedalloc.h"
#include "RNA_define.h"
#include "RNA_access.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_editVert.h"
#include "BLI_rand.h"
#include "BLI_ghash.h"
#include "BLI_linklist.h"
#include "BLI_heap.h"
#include "BLI_scanfill.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_mesh.h"
#include "BKE_bmesh.h"
#include "BKE_report.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_view3d.h"
#include "ED_object.h"
#include "mesh_intern.h"

Go to the source code of this file.

Classes

struct  xvertsort
struct  facesort
struct  Collection
struct  CollectedEdge
struct  wUV
struct  wUVNode
struct  wUVEdge
struct  wUVEdgeCollect
struct  PathNode
struct  PathEdge

Defines

#define add_numbut(a, b, c, d, e, f, g)   {}
#define EDGENEW   2
#define FACENEW   2
#define EDGEINNER   4
#define EDGEOLD   8
#define DOUBLEOPFILL   16
#define VTEST(face, num, other)   (face->v##num != other->v1 && face->v##num != other->v2 && face->v##num != other->v3)
#define T2QUV_LIMIT   0.005f
#define T2QCOL_LIMIT   3
#define T2QDELETE   1
#define T2QCOMPLEX   2
#define T2QJOIN   4
#define FACE_MARKCLEAR(f)   (f->f1 = 1)
#define DIRECTION_CW   1
#define DIRECTION_CCW   2
#define AXIS_X   1
#define AXIS_Y   2
#define MERGELIMIT   0.000001
#define PATH_SELECT_EDGE_LENGTH   0
#define PATH_SELECT_TOPOLOGICAL   1

Typedefs

typedef struct xvertsort xvertsort
typedef EditFace * EVPtr
typedef EVPtr EVPTuple [2]
typedef struct Collection Collection
typedef struct CollectedEdge CollectedEdge
typedef struct wUV wUV
typedef struct wUVNode wUVNode
typedef struct wUVEdge wUVEdge
typedef struct wUVEdgeCollect wUVEdgeCollect
typedef struct PathNode PathNode
typedef struct PathEdge PathEdge

Functions

static void waitcursor (int UNUSED(val))
static void free_tagged_edges_faces (EditMesh *em, EditEdge *eed, EditFace *efa)
int EdgeLoopDelete (EditMesh *em, wmOperator *op)
static int vergxco (const void *v1, const void *v2)
static int vergface (const void *v1, const void *v2)
static void convert_to_triface (EditMesh *em, int direction)
int removedoublesflag (EditMesh *em, short flag, short automerge, float limit)
static int removedoublesflag_exec (bContext *C, wmOperator *op)
void MESH_OT_remove_doubles (wmOperatorType *ot)
static void xsortvert_flag__doSetX (void *userData, EditVert *UNUSED(eve), int x, int UNUSED(y), int index)
static void xsortvert_flag (bContext *C, int flag)
static int mesh_vertices_sort_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_vertices_sort (wmOperatorType *ot)
static void hashvert_flag (EditMesh *em, int flag)
static int mesh_vertices_randomize_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_vertices_randomize (wmOperatorType *ot)
static void extrude_mesh (Object *obedit, EditMesh *em, wmOperator *op, short type)
static int mesh_extrude_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
static int mesh_extrude_exec (bContext *C, wmOperator *op)
static EnumPropertyItem * mesh_extrude_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
void MESH_OT_extrude (wmOperatorType *ot)
static int split_mesh (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_split (wmOperatorType *ot)
static int extrude_repeat_mesh_exec (bContext *C, wmOperator *op)
static int extrude_repeat_mesh_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void MESH_OT_extrude_repeat (wmOperatorType *ot)
static int spin_mesh (bContext *C, wmOperator *op, float *dvec, int steps, float degr, int dupli)
static int spin_mesh_exec (bContext *C, wmOperator *op)
static int spin_mesh_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void MESH_OT_spin (wmOperatorType *ot)
static int screw_mesh_exec (bContext *C, wmOperator *op)
static int screw_mesh_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void MESH_OT_screw (wmOperatorType *ot)
static void erase_edges (EditMesh *em, ListBase *l)
static void erase_faces (EditMesh *em, ListBase *l)
static void erase_vertices (EditMesh *em, ListBase *l)
static void delete_mesh (EditMesh *em, wmOperator *op, int event)
static int delete_mesh_exec (bContext *C, wmOperator *op)
void MESH_OT_delete (wmOperatorType *ot)
static void alter_co (float *co, EditEdge *edge, float smooth, float fractal, int beauty, float perc)
static EditVert * subdivide_edge_addvert (EditMesh *em, EditEdge *edge, float smooth, float fractal, int beauty, float percent)
static void flipvertarray (EditVert **arr, short size)
static void facecopy (EditMesh *em, EditFace *source, EditFace *target)
static void fill_quad_single (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, int seltype)
static void fill_tri_single (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, int seltype)
static void fill_quad_double_op (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
static void fill_quad_double_adj_path (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
static void fill_quad_double_adj_fan (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
static void fill_quad_double_adj_inner (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
static void fill_tri_double (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
static void fill_quad_triple (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
static void fill_quad_quadruple (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, float smooth, float fractal, int beauty)
static void fill_tri_triple (EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, float smooth, float fractal, int beauty)
static void fill_quad_doublevert (EditMesh *em, EditFace *efa, int v1, int v2)
static void fill_quad_singlevert (EditMesh *em, EditFace *efa, struct GHash *gh)
static EditVert * subdivideedgenum (EditMesh *em, EditEdge *edge, int curpoint, int totpoint, float smooth, float fractal, int beauty)
void esubdivideflag (Object *obedit, EditMesh *em, int flag, float smooth, float fractal, int beauty, int numcuts, int corner_pattern, int seltype)
static int count_selected_edges (EditEdge *ed)
static int collect_quadedges (EVPTuple *efaa, EditEdge *eed, EditFace *efa)
static void givequadverts (EditFace *efa, EditFace *efa1, EditVert **v1, EditVert **v2, EditVert **v3, EditVert **v4, int *vindex)
static void untag_edges (EditFace *f)
static float measure_facepair (EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4, float limit)
static int compareFaceAttribs (EditMesh *em, EditFace *f1, EditFace *f2, EditEdge *eed)
static int fplcmp (const void *v1, const void *v2)
void join_triangles (EditMesh *em)
static void edge_flip (EditMesh *em)
static void edge_rotate (EditMesh *em, wmOperator *op, EditEdge *eed, int dir)
static int edge_rotate_selected (bContext *C, wmOperator *op)
void MESH_OT_edge_rotate (wmOperatorType *ot)
static void UNUSED_FUNCTION() bevel_menu (EditMesh *em)
short sharesFace (EditMesh *em, EditEdge *e1, EditEdge *e2)
int EdgeLoopDelete (EditMesh *UNUSED(em), wmOperator *UNUSED(op))
static float mesh_rip_edgedist (ARegion *ar, float mat[][4], float *co1, float *co2, const int mval[2])
static void mesh_rip_setface (EditMesh *em, EditFace *sefa)
static int mesh_rip_invoke (bContext *C, wmOperator *op, wmEvent *event)
void MESH_OT_rip (wmOperatorType *ot)
static void shape_propagate (Object *obedit, EditMesh *em, wmOperator *op)
static int shape_propagate_to_all_exec (bContext *C, wmOperator *op)
void MESH_OT_shape_propagate_to_all (wmOperatorType *ot)
static int blend_from_shape_exec (bContext *C, wmOperator *op)
static EnumPropertyItem * shape_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
void MESH_OT_blend_from_shape (wmOperatorType *ot)
static void build_edgecollection (EditMesh *em, ListBase *allcollections)
static void freecollections (ListBase *allcollections)
static void append_weldedUV (EditMesh *em, EditFace *efa, EditVert *eve, int tfindex, ListBase *uvverts)
static void build_weldedUVs (EditMesh *em, ListBase *uvverts)
static void append_weldedUVEdge (EditMesh *em, EditFace *efa, EditEdge *eed, ListBase *uvedges)
static void build_weldedUVEdges (EditMesh *em, ListBase *uvedges, ListBase *uvverts)
static void free_weldedUVs (ListBase *uvverts)
static void collapse_edgeuvs (EditMesh *em)
static void collapseuvs (EditMesh *em, EditVert *mergevert)
static int collapseEdges (EditMesh *em)
static int merge_firstlast (EditMesh *em, int first, int uvmerge)
static void em_snap_to_center (EditMesh *em)
static void em_snap_to_cursor (EditMesh *em, bContext *C)
static int merge_target (bContext *C, EditMesh *em, int target, int uvmerge)
static int merge_exec (bContext *C, wmOperator *op)
static EnumPropertyItem * merge_type_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
void MESH_OT_merge (wmOperatorType *ot)
static int select_vertex_path_exec (bContext *C, wmOperator *op)
void MESH_OT_select_vertex_path (wmOperatorType *ot)
static int region_to_loop (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_region_to_loop (wmOperatorType *ot)
static int validate_loop (EditMesh *em, Collection *edgecollection)
static int loop_bisect (EditMesh *em, Collection *edgecollection)
static int loop_to_region (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_loop_to_region (wmOperatorType *ot)
static int mesh_rotate_uvs (bContext *C, wmOperator *op)
static int mesh_mirror_uvs (bContext *C, wmOperator *op)
static int mesh_rotate_colors (bContext *C, wmOperator *op)
static int mesh_mirror_colors (bContext *C, wmOperator *op)
void MESH_OT_uvs_rotate (wmOperatorType *ot)
void MESH_OT_uvs_mirror (wmOperatorType *ot)
void MESH_OT_colors_rotate (wmOperatorType *ot)
void MESH_OT_colors_mirror (wmOperatorType *ot)
static int subdivide_exec (bContext *C, wmOperator *op)
void MESH_OT_subdivide (wmOperatorType *ot)
static void beautify_fill (EditMesh *em)
static void fill_mesh (EditMesh *em)
static int fill_mesh_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_fill (wmOperatorType *ot)
static int beautify_fill_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_beautify_fill (wmOperatorType *ot)
static void permutate (void *list, int num, int size, int *index)
static int float_sort (const void *v1, const void *v2)
static int sort_faces_exec (bContext *C, wmOperator *op)
void MESH_OT_sort_faces (wmOperatorType *ot)
static int quads_convert_to_tris_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_quads_convert_to_tris (wmOperatorType *ot)
static int tris_convert_to_quads_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_tris_convert_to_quads (wmOperatorType *ot)
static int edge_flip_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_edge_flip (wmOperatorType *ot)
static void mesh_set_smooth_faces (EditMesh *em, short smooth)
static int mesh_faces_shade_smooth_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_faces_shade_smooth (wmOperatorType *ot)
static int mesh_faces_shade_flat_exec (bContext *C, wmOperator *UNUSED(op))
void MESH_OT_faces_shade_flat (wmOperatorType *ot)
static int select_axis_exec (bContext *C, wmOperator *op)
void MESH_OT_select_axis (wmOperatorType *ot)

Variables

EnumPropertyItem corner_type_items []
static EnumPropertyItem extrude_items []
static EnumPropertyItem prop_mesh_delete_types []
static const EnumPropertyItem direction_items []
static const EnumPropertyItem axis_items_xy []
static EnumPropertyItem merge_type_items []
static float * face_sort_floats

Detailed Description

Definition in file editmesh_tools.c.


Define Documentation

#define add_numbut (   a,
  b,
  c,
  d,
  e,
  f,
  g 
)    {}

Definition at line 90 of file editmesh_tools.c.

#define AXIS_X   1

Definition at line 3597 of file editmesh_tools.c.

Referenced by ntlTree::ntlTree().

#define AXIS_Y   2

Definition at line 3598 of file editmesh_tools.c.

Referenced by mesh_mirror_colors(), and mesh_mirror_uvs().

#define DIRECTION_CCW   2

Definition at line 3590 of file editmesh_tools.c.

Referenced by edge_rotate(), mesh_rotate_colors(), and mesh_rotate_uvs().

#define DIRECTION_CW   1
#define DOUBLEOPFILL   16

Definition at line 1456 of file editmesh_tools.c.

Referenced by esubdivideflag(), and fill_quad_double_op().

#define EDGEINNER   4
#define EDGENEW   2
#define EDGEOLD   8

Definition at line 1453 of file editmesh_tools.c.

Referenced by esubdivideflag().

#define FACE_MARKCLEAR (   f)    (f->f1 = 1)

Definition at line 3496 of file editmesh_tools.c.

Referenced by edge_flip().

#define FACENEW   2

Definition at line 1451 of file editmesh_tools.c.

#define MERGELIMIT   0.000001

Definition at line 4514 of file editmesh_tools.c.

Referenced by collapseEdges(), merge_firstlast(), and merge_target().

#define PATH_SELECT_EDGE_LENGTH   0

Definition at line 5226 of file editmesh_tools.c.

Referenced by MESH_OT_select_vertex_path(), and select_vertex_path_exec().

#define PATH_SELECT_TOPOLOGICAL   1

Definition at line 5227 of file editmesh_tools.c.

Referenced by MESH_OT_select_vertex_path().

#define T2QCOL_LIMIT   3

Definition at line 3260 of file editmesh_tools.c.

Referenced by compareFaceAttribs().

#define T2QCOMPLEX   2

Definition at line 3336 of file editmesh_tools.c.

Referenced by join_triangles().

#define T2QDELETE   1

Definition at line 3335 of file editmesh_tools.c.

Referenced by join_triangles().

#define T2QJOIN   4

Definition at line 3337 of file editmesh_tools.c.

Referenced by join_triangles().

#define T2QUV_LIMIT   0.005f

Definition at line 3259 of file editmesh_tools.c.

Referenced by compareFaceAttribs().

#define VTEST (   face,
  num,
  other 
)    (face->v##num != other->v1 && face->v##num != other->v2 && face->v##num != other->v3)

Definition at line 3114 of file editmesh_tools.c.

Referenced by givequadverts().


Typedef Documentation

typedef struct CollectedEdge CollectedEdge
typedef struct Collection Collection
typedef EditFace* EVPtr

Definition at line 3026 of file editmesh_tools.c.

typedef EVPtr EVPTuple[2]

Definition at line 3027 of file editmesh_tools.c.

typedef struct PathEdge PathEdge
typedef struct PathNode PathNode
typedef struct wUV wUV
typedef struct wUVEdge wUVEdge
typedef struct wUVNode wUVNode
typedef struct xvertsort xvertsort

Function Documentation

static void alter_co ( float *  co,
EditEdge *  edge,
float  smooth,
float  fractal,
int  beauty,
float  perc 
) [static]
static void append_weldedUV ( EditMesh *  em,
EditFace *  efa,
EditVert *  eve,
int  tfindex,
ListBase *  uvverts 
) [static]
static void append_weldedUVEdge ( EditMesh *  em,
EditFace *  efa,
EditEdge *  eed,
ListBase *  uvedges 
) [static]
static void beautify_fill ( EditMesh *  em) [static]
static int beautify_fill_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static void UNUSED_FUNCTION() bevel_menu ( EditMesh *  em) [static]
static int blend_from_shape_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void build_edgecollection ( EditMesh *  em,
ListBase *  allcollections 
) [static]
static void build_weldedUVEdges ( EditMesh *  em,
ListBase *  uvedges,
ListBase *  uvverts 
) [static]
static void build_weldedUVs ( EditMesh *  em,
ListBase *  uvverts 
) [static]
static void collapse_edgeuvs ( EditMesh *  em) [static]
static int collapseEdges ( EditMesh *  em) [static]
static void collapseuvs ( EditMesh *  em,
EditVert *  mergevert 
) [static]
static int collect_quadedges ( EVPTuple *  efaa,
EditEdge *  eed,
EditFace *  efa 
) [static]

builds EVPTuple array efaa of face tuples (in fact pointers to EditFaces) sharing one edge. arguments: selected edge list, face list. Edges will also be tagged accordingly (see eed->f2)

Definition at line 3034 of file editmesh_tools.c.

References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditEdge::f, EditFace::f, EditFace::f1, EditEdge::f1, EditEdge::f2, i, EditEdge::next, EditFace::next, NULL, EditEdge::p, SELECT, EditEdge::tmp, and EditFace::v4.

Referenced by beautify_fill(), edge_flip(), and join_triangles().

static int compareFaceAttribs ( EditMesh *  em,
EditFace *  f1,
EditFace *  f2,
EditEdge *  eed 
) [static]
static void convert_to_triface ( EditMesh *  em,
int  direction 
) [static]
static int count_selected_edges ( EditEdge *  ed) [static]

Definition at line 3014 of file editmesh_tools.c.

References EditEdge::f, EditEdge::next, EditEdge::p, SELECT, and EditEdge::tmp.

Referenced by beautify_fill(), edge_flip(), and join_triangles().

static void delete_mesh ( EditMesh *  em,
wmOperator *  op,
int  event 
) [static]
static int delete_mesh_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void edge_flip ( EditMesh *  em) [static]
static int edge_flip_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static void edge_rotate ( EditMesh *  em,
wmOperator *  op,
EditEdge *  eed,
int  dir 
) [static]
static int edge_rotate_selected ( bContext *  C,
wmOperator *  op 
) [static]
int EdgeLoopDelete ( EditMesh *  UNUSEDem,
wmOperator *  UNUSEDop 
)
int EdgeLoopDelete ( EditMesh *  em,
wmOperator *  op 
)

Referenced by delete_mesh().

static void em_snap_to_center ( EditMesh *  em) [static]
static void em_snap_to_cursor ( EditMesh *  em,
bContext *  C 
) [static]
static void erase_edges ( EditMesh *  em,
ListBase *  l 
) [static]
static void erase_faces ( EditMesh *  em,
ListBase *  l 
) [static]
static void erase_vertices ( EditMesh *  em,
ListBase *  l 
) [static]

Definition at line 1241 of file editmesh_tools.c.

References BLI_remlink(), EditVert::f, ListBase::first, free_editvert(), and EditVert::next.

Referenced by delete_mesh().

void esubdivideflag ( Object *  obedit,
EditMesh *  em,
int  flag,
float  smooth,
float  fractal,
int  beauty,
int  numcuts,
int  corner_pattern,
int  seltype 
)

Definition at line 2643 of file editmesh_tools.c.

References addedgelist(), B_BEAUTY, B_BEAUTY_SHORT, B_KNIFE, BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), EditVert::co, DOUBLEOPFILL, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EDGEINNER, EDGENEW, EDGEOLD, EditMesh::edges, EM_select_edge(), EM_selectmode_flush(), eModifierMode_Realtime, eModifierType_Mirror, EditEdge::f, EditVert::f, EditFace::f, EditFace::f1, EditVert::f1, EditEdge::f1, EditVert::f2, EditEdge::f2, fabsf, EditMesh::faces, fill_quad_double_adj_fan(), fill_quad_double_adj_inner(), fill_quad_double_adj_path(), fill_quad_double_op(), fill_quad_doublevert(), fill_quad_quadruple(), fill_quad_single(), fill_quad_singlevert(), fill_quad_triple(), fill_tri_double(), fill_tri_single(), fill_tri_triple(), ListBase::first, MirrorModifierData::flag, EditEdge::fp, free_tagged_edges_faces(), EditEdge::h, EditVert::h, EditFace::h, i, if(), len_v3v3(), length(), MEM_freeN(), MEM_mallocN(), MOD_MIR_AXIS_X, MOD_MIR_AXIS_Y, MOD_MIR_AXIS_Z, MOD_MIR_CLIPPING, ModifierData::mode, Object::modifiers, mul_mat3_m4_v3(), ModifierData::next, EditEdge::next, EditFace::next, EditVert::next, NULL, Object::obmat, recalc_editnormals(), SCE_SELECT_VERTEX, SELECT, EditMesh::selectmode, sort(), SUBDIV_SELECT_INNER, SUBDIV_SELECT_INNER_SEL, SUBDIV_SELECT_LOOPCUT, SUBDIV_SELECT_ORIG, subdivideedgenum(), EditEdge::tmp, MirrorModifierData::tolerance, ModifierData::type, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, EditFace::v4, VECCOPY, and EditMesh::verts.

Referenced by knife_cut_exec(), make_prim(), ringsel_finish(), and subdivide_exec().

static void extrude_mesh ( Object *  obedit,
EditMesh *  em,
wmOperator *  op,
short  type 
) [static]
static int extrude_repeat_mesh_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int extrude_repeat_mesh_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static void facecopy ( EditMesh *  em,
EditFace *  source,
EditFace *  target 
) [static]
static void fill_mesh ( EditMesh *  em) [static]
static int fill_mesh_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static void fill_quad_double_adj_fan ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts 
) [static]
static void fill_quad_double_adj_inner ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts 
) [static]
static void fill_quad_double_adj_path ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts 
) [static]
static void fill_quad_double_op ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts 
) [static]
static void fill_quad_doublevert ( EditMesh *  em,
EditFace *  efa,
int  v1,
int  v2 
) [static]
static void fill_quad_quadruple ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts,
float  smooth,
float  fractal,
int  beauty 
) [static]
static void fill_quad_single ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts,
int  seltype 
) [static]
static void fill_quad_singlevert ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh 
) [static]
static void fill_quad_triple ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts 
) [static]
static void fill_tri_double ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts 
) [static]
static void fill_tri_single ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts,
int  seltype 
) [static]
static void fill_tri_triple ( EditMesh *  em,
EditFace *  efa,
struct GHash *  gh,
int  numcuts,
float  smooth,
float  fractal,
int  beauty 
) [static]
static void flipvertarray ( EditVert **  arr,
short  size 
) [static]
static int float_sort ( const void *  v1,
const void *  v2 
) [static]

Definition at line 6377 of file editmesh_tools.c.

Referenced by sort_faces_exec().

static int fplcmp ( const void *  v1,
const void *  v2 
) [static]

Definition at line 3324 of file editmesh_tools.c.

References EditEdge::crease.

Referenced by join_triangles().

static void free_tagged_edges_faces ( EditMesh *  em,
EditEdge *  eed,
EditFace *  efa 
) [static]
static void free_weldedUVs ( ListBase *  uvverts) [static]

Definition at line 4748 of file editmesh_tools.c.

References BLI_freelistN(), ListBase::first, wUV::next, and wUV::nodes.

Referenced by collapse_edgeuvs().

static void freecollections ( ListBase *  allcollections) [static]
static void givequadverts ( EditFace *  efa,
EditFace *  efa1,
EditVert **  v1,
EditVert **  v2,
EditVert **  v3,
EditVert **  v4,
int *  vindex 
) [static]

Definition at line 3117 of file editmesh_tools.c.

References NULL, EditFace::v1, EditFace::v2, EditFace::v3, and VTEST.

Referenced by beautify_fill(), edge_flip(), and join_triangles().

static void hashvert_flag ( EditMesh *  em,
int  flag 
) [static]
void join_triangles ( EditMesh *  em)
static int loop_bisect ( EditMesh *  em,
Collection *  edgecollection 
) [static]
static int loop_to_region ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static float measure_facepair ( EditVert *  v1,
EditVert *  v2,
EditVert *  v3,
EditVert *  v4,
float  limit 
) [static]
static int merge_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int merge_firstlast ( EditMesh *  em,
int  first,
int  uvmerge 
) [static]
static int merge_target ( bContext *  C,
EditMesh *  em,
int  target,
int  uvmerge 
) [static]
static EnumPropertyItem* merge_type_itemf ( bContext *  C,
PointerRNA *  UNUSEDptr,
PropertyRNA *  UNUSEDprop,
int *  free 
) [static]
static int mesh_extrude_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int mesh_extrude_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static EnumPropertyItem* mesh_extrude_itemf ( bContext *  C,
PointerRNA *  UNUSEDptr,
PropertyRNA *  UNUSEDprop,
int *  free 
) [static]
static int mesh_faces_shade_flat_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int mesh_faces_shade_smooth_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int mesh_mirror_colors ( bContext *  C,
wmOperator *  op 
) [static]
static int mesh_mirror_uvs ( bContext *  C,
wmOperator *  op 
) [static]
void MESH_OT_beautify_fill ( wmOperatorType *  ot)
void MESH_OT_blend_from_shape ( wmOperatorType *  ot)
void MESH_OT_colors_mirror ( wmOperatorType *  ot)
void MESH_OT_colors_rotate ( wmOperatorType *  ot)
void MESH_OT_delete ( wmOperatorType *  ot)
void MESH_OT_edge_flip ( wmOperatorType *  ot)
void MESH_OT_edge_rotate ( wmOperatorType *  ot)
void MESH_OT_extrude ( wmOperatorType *  ot)
void MESH_OT_extrude_repeat ( wmOperatorType *  ot)
void MESH_OT_faces_shade_flat ( wmOperatorType *  ot)
void MESH_OT_faces_shade_smooth ( wmOperatorType *  ot)
void MESH_OT_fill ( wmOperatorType *  ot)
void MESH_OT_loop_to_region ( wmOperatorType *  ot)
void MESH_OT_merge ( wmOperatorType *  ot)
void MESH_OT_quads_convert_to_tris ( wmOperatorType *  ot)
void MESH_OT_region_to_loop ( wmOperatorType *  ot)
void MESH_OT_remove_doubles ( wmOperatorType *  ot)
void MESH_OT_rip ( wmOperatorType *  ot)
void MESH_OT_screw ( wmOperatorType *  ot)
void MESH_OT_select_axis ( wmOperatorType *  ot)
void MESH_OT_select_vertex_path ( wmOperatorType *  ot)
void MESH_OT_shape_propagate_to_all ( wmOperatorType *  ot)
void MESH_OT_sort_faces ( wmOperatorType *  ot)
void MESH_OT_spin ( wmOperatorType *  ot)
void MESH_OT_split ( wmOperatorType *  ot)
void MESH_OT_subdivide ( wmOperatorType *  ot)
void MESH_OT_tris_convert_to_quads ( wmOperatorType *  ot)
void MESH_OT_uvs_mirror ( wmOperatorType *  ot)
void MESH_OT_uvs_rotate ( wmOperatorType *  ot)
void MESH_OT_vertices_randomize ( wmOperatorType *  ot)
void MESH_OT_vertices_sort ( wmOperatorType *  ot)
static float mesh_rip_edgedist ( ARegion *  ar,
float  mat[][4],
float *  co1,
float *  co2,
const int  mval[2] 
) [static]

Definition at line 4044 of file editmesh_tools.c.

References dist_to_line_segment_v2(), and ED_view3d_project_float().

Referenced by mesh_rip_invoke().

static int mesh_rip_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static void mesh_rip_setface ( EditMesh *  em,
EditFace *  sefa 
) [static]
static int mesh_rotate_colors ( bContext *  C,
wmOperator *  op 
) [static]
static int mesh_rotate_uvs ( bContext *  C,
wmOperator *  op 
) [static]
static void mesh_set_smooth_faces ( EditMesh *  em,
short  smooth 
) [static]
static int mesh_vertices_randomize_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int mesh_vertices_sort_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]

Definition at line 571 of file editmesh_tools.c.

References OPERATOR_FINISHED, SELECT, and xsortvert_flag().

Referenced by MESH_OT_vertices_sort().

static void permutate ( void *  list,
int  num,
int  size,
int *  index 
) [static]

Definition at line 6358 of file editmesh_tools.c.

References i, len(), MEM_freeN(), MEM_mallocN(), and size().

Referenced by sort_faces_exec().

static int quads_convert_to_tris_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int region_to_loop ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
int removedoublesflag ( EditMesh *  em,
short  flag,
short  automerge,
float  limit 
)
static int removedoublesflag_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int screw_mesh_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int screw_mesh_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static int select_axis_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int select_vertex_path_exec ( bContext *  C,
wmOperator *  op 
) [static]
static EnumPropertyItem* shape_itemf ( bContext *  C,
PointerRNA *  UNUSEDptr,
PropertyRNA *  UNUSEDprop,
int *  free 
) [static]

Definition at line 4440 of file editmesh_tools.c.

References CTX_data_edit_object(), Object::data, and NULL.

Referenced by MESH_OT_blend_from_shape().

static void shape_propagate ( Object *  obedit,
EditMesh *  em,
wmOperator *  op 
) [static]
static int shape_propagate_to_all_exec ( bContext *  C,
wmOperator *  op 
) [static]
short sharesFace ( EditMesh *  em,
EditEdge *  e1,
EditEdge *  e2 
)
static int sort_faces_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int spin_mesh ( bContext *  C,
wmOperator *  op,
float *  dvec,
int  steps,
float  degr,
int  dupli 
) [static]
static int spin_mesh_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int spin_mesh_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static int split_mesh ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static EditVert* subdivide_edge_addvert ( EditMesh *  em,
EditEdge *  edge,
float  smooth,
float  fractal,
int  beauty,
float  percent 
) [static]
static int subdivide_exec ( bContext *  C,
wmOperator *  op 
) [static]
static EditVert* subdivideedgenum ( EditMesh *  em,
EditEdge *  edge,
int  curpoint,
int  totpoint,
float  smooth,
float  fractal,
int  beauty 
) [static]
static int tris_convert_to_quads_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static void untag_edges ( EditFace *  f) [static]

Definition at line 3161 of file editmesh_tools.c.

References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, and EditEdge::f1.

Referenced by free_tagged_edges_faces().

static int validate_loop ( EditMesh *  em,
Collection *  edgecollection 
) [static]
static int vergface ( const void *  v1,
const void *  v2 
) [static]

Definition at line 130 of file editmesh_tools.c.

References facesort::x.

Referenced by removedoublesflag().

static int vergxco ( const void *  v1,
const void *  v2 
) [static]

Definition at line 115 of file editmesh_tools.c.

References xvertsort::x.

Referenced by removedoublesflag(), and xsortvert_flag().

static void waitcursor ( int   UNUSEDval) [static]

Definition at line 89 of file editmesh_tools.c.

Referenced by fill_mesh(), and join_triangles().

static void xsortvert_flag ( bContext *  C,
int  flag 
) [static]
static void xsortvert_flag__doSetX ( void *  userData,
EditVert *  UNUSEDeve,
int  x,
int   UNUSEDy,
int  index 
) [static]

Definition at line 525 of file editmesh_tools.c.

References xvertsort::x.

Referenced by xsortvert_flag().


Variable Documentation

const EnumPropertyItem axis_items_xy[] [static]
Initial value:
 {
    {AXIS_X, "X", 0, "X", ""},
    {AXIS_Y, "Y", 0, "Y", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 3600 of file editmesh_tools.c.

Initial value:
 {
    {SUBDIV_CORNER_PATH,  "PATH", 0, "Path", ""},
    {SUBDIV_CORNER_INNERVERT,  "INNER_VERTEX", 0, "Inner Vertex", ""},
    {SUBDIV_CORNER_FAN,  "FAN",  0, "Fan", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 96 of file editmesh_tools.c.

Initial value:
 {
    {DIRECTION_CW, "CW", 0, "Clockwise", ""},
    {DIRECTION_CCW, "CCW", 0, "Counter Clockwise", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 3592 of file editmesh_tools.c.

Referenced by ARMATURE_OT_select_hierarchy(), CURVE_OT_cyclic_toggle(), POSE_OT_select_hierarchy(), and uv_transform_properties().

Initial value:
 {
        {1, "REGION", 0, "Region", ""},
        {2, "FACES", 0, "Individual Faces", ""},
        {3, "EDGES", 0, "Only Edges", ""},
        {4, "VERTS", 0, "Only Vertices", ""},
        {0, NULL, 0, NULL, NULL}}

Definition at line 756 of file editmesh_tools.c.

Referenced by mesh_extrude_itemf().

float* face_sort_floats [static]

Definition at line 6376 of file editmesh_tools.c.

Initial value:
 {
    {6, "FIRST", 0, "At First", ""},
    {1, "LAST", 0, "At Last", ""},
    {3, "CENTER", 0, "At Center", ""},
    {4, "CURSOR", 0, "At Cursor", ""},
    {5, "COLLAPSE", 0, "Collapse", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 5144 of file editmesh_tools.c.

Referenced by merge_type_itemf().

Initial value:
 {
    {10,"VERT",     0, "Vertices", ""},
    {1, "EDGE",     0, "Edges", ""},
    {2, "FACE",     0, "Faces", ""},
    {3, "ALL",      0, "All", ""},
    {4, "EDGE_FACE",0, "Edges & Faces", ""},
    {5, "ONLY_FACE",0, "Only Faces", ""},
    {6, "EDGE_LOOP",0, "Edge Loop", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 1396 of file editmesh_tools.c.