Blender V2.61 - r43446
Defines | Functions | Variables

editmesh_add.c File Reference

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "RNA_define.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_library.h"
#include "BKE_mesh.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.

Defines

#define add_numbut(a, b, c, d, e, f, g)   {}
#define PRIM_PLANE   0
#define PRIM_CUBE   1
#define PRIM_CIRCLE   4
#define PRIM_CYLINDER   5
#define PRIM_CONE   7
#define PRIM_GRID   10
#define PRIM_UVSPHERE   11
#define PRIM_ICOSPHERE   12
#define PRIM_MONKEY   13

Functions

static int dupli_extrude_cursor (bContext *C, wmOperator *op, wmEvent *event)
void MESH_OT_dupli_extrude_cursor (wmOperatorType *ot)
static int make_fgon (EditMesh *em, wmOperator *op, int make)
static int make_fgon_exec (bContext *C, wmOperator *op)
void MESH_OT_fgon_make (struct wmOperatorType *ot)
static int clear_fgon_exec (bContext *C, wmOperator *op)
void MESH_OT_fgon_clear (struct wmOperatorType *ot)
static EditFaceaddface_from_edges (EditMesh *em)
static int compareface_overlaps (EditFace *vl1, EditFace *vl2)
static EditFaceexist_face_overlaps (EditMesh *em, EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4)
static void fix_new_face (EditMesh *em, EditFace *eface)
static void addfaces_from_edgenet (EditMesh *em)
static void addedgeface_mesh (EditMesh *em, wmOperator *op)
static int addedgeface_mesh_exec (bContext *C, wmOperator *op)
void MESH_OT_edge_face_add (wmOperatorType *ot)
static void make_prim (Object *obedit, int type, float mat[4][4], int tot, int seg, int subdiv, float dia, float depth, int ext, int fill)
static const char * get_mesh_defname (int type)
static void make_prim_ext (bContext *C, float *loc, float *rot, int enter_editmode, unsigned int layer, int type, int tot, int seg, int subdiv, float dia, float depth, int ext, int fill)
static int add_primitive_plane_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_plane_add (wmOperatorType *ot)
static int add_primitive_cube_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_cube_add (wmOperatorType *ot)
static int add_primitive_circle_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_circle_add (wmOperatorType *ot)
static int add_primitive_cylinder_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_cylinder_add (wmOperatorType *ot)
static int add_primitive_cone_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_cone_add (wmOperatorType *ot)
static int add_primitive_grid_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_grid_add (wmOperatorType *ot)
static int add_primitive_monkey_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_monkey_add (wmOperatorType *ot)
static int add_primitive_uvsphere_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_uv_sphere_add (wmOperatorType *ot)
static int add_primitive_icosphere_exec (bContext *C, wmOperator *op)
void MESH_OT_primitive_ico_sphere_add (wmOperatorType *ot)
static int mesh_duplicate_exec (bContext *C, wmOperator *UNUSED(op))
static int mesh_duplicate_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void MESH_OT_duplicate (wmOperatorType *ot)

Variables

static float icovert [12][3]
static short icoface [20][3]
static int monkeyo = 4
static int monkeynv = 271
static int monkeynf = 250
static signed char monkeyv [271][3]
static signed char monkeyf [250][4]

Detailed Description

Definition in file editmesh_add.c.


Define Documentation

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

Definition at line 73 of file editmesh_add.c.

#define PRIM_CIRCLE   4

Definition at line 1015 of file editmesh_add.c.

Referenced by add_primitive_circle_exec(), get_mesh_defname(), and make_prim().

#define PRIM_CONE   7

Definition at line 1017 of file editmesh_add.c.

Referenced by add_primitive_cone_exec(), get_mesh_defname(), and make_prim().

#define PRIM_CUBE   1

Definition at line 1014 of file editmesh_add.c.

Referenced by add_primitive_cube_exec(), get_mesh_defname(), and make_prim().

#define PRIM_CYLINDER   5

Definition at line 1016 of file editmesh_add.c.

Referenced by add_primitive_cylinder_exec(), get_mesh_defname(), and make_prim().

#define PRIM_GRID   10

Definition at line 1018 of file editmesh_add.c.

Referenced by add_primitive_grid_exec(), get_mesh_defname(), and make_prim().

#define PRIM_ICOSPHERE   12

Definition at line 1020 of file editmesh_add.c.

Referenced by add_primitive_icosphere_exec(), get_mesh_defname(), and make_prim().

#define PRIM_MONKEY   13

Definition at line 1021 of file editmesh_add.c.

Referenced by add_primitive_monkey_exec(), get_mesh_defname(), and make_prim().

#define PRIM_PLANE   0

Definition at line 1013 of file editmesh_add.c.

Referenced by add_primitive_plane_exec(), get_mesh_defname(), and make_prim().

#define PRIM_UVSPHERE   11

Definition at line 1019 of file editmesh_add.c.

Referenced by add_primitive_uvsphere_exec(), get_mesh_defname(), and make_prim().


Function Documentation

static int add_primitive_circle_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_cone_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_cube_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_cylinder_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_grid_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_icosphere_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_monkey_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_plane_exec ( bContext C,
wmOperator op 
) [static]
static int add_primitive_uvsphere_exec ( bContext C,
wmOperator op 
) [static]
static void addedgeface_mesh ( EditMesh em,
wmOperator op 
) [static]
static int addedgeface_mesh_exec ( bContext C,
wmOperator op 
) [static]
static EditFace* addface_from_edges ( EditMesh em) [static]
static void addfaces_from_edgenet ( EditMesh em) [static]
static int clear_fgon_exec ( bContext C,
wmOperator op 
) [static]
static int compareface_overlaps ( EditFace vl1,
EditFace vl2 
) [static]

Definition at line 499 of file editmesh_add.c.

References equal(), NULL, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.

Referenced by exist_face_overlaps().

static int dupli_extrude_cursor ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static EditFace* exist_face_overlaps ( EditMesh em,
EditVert v1,
EditVert v2,
EditVert v3,
EditVert v4 
) [static]
static void fix_new_face ( EditMesh em,
EditFace eface 
) [static]
static const char* get_mesh_defname ( int  type) [static]
static int make_fgon ( EditMesh em,
wmOperator op,
int  make 
) [static]
static int make_fgon_exec ( bContext C,
wmOperator op 
) [static]
static void make_prim ( Object obedit,
int  type,
float  mat[4][4],
int  tot,
int  seg,
int  subdiv,
float  dia,
float  depth,
int  ext,
int  fill 
) [static]
static void make_prim_ext ( bContext C,
float *  loc,
float *  rot,
int  enter_editmode,
unsigned int  layer,
int  type,
int  tot,
int  seg,
int  subdiv,
float  dia,
float  depth,
int  ext,
int  fill 
) [static]
static int mesh_duplicate_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int mesh_duplicate_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]

Definition at line 1765 of file editmesh_add.c.

References mesh_duplicate_exec(), OPERATOR_FINISHED, and WM_cursor_wait().

Referenced by MESH_OT_duplicate().

void MESH_OT_dupli_extrude_cursor ( wmOperatorType ot)
void MESH_OT_duplicate ( wmOperatorType ot)
void MESH_OT_edge_face_add ( wmOperatorType ot)
void MESH_OT_fgon_clear ( struct wmOperatorType ot)
void MESH_OT_fgon_make ( struct wmOperatorType ot)
void MESH_OT_primitive_circle_add ( wmOperatorType ot)
void MESH_OT_primitive_cone_add ( wmOperatorType ot)
void MESH_OT_primitive_cube_add ( wmOperatorType ot)
void MESH_OT_primitive_cylinder_add ( wmOperatorType ot)
void MESH_OT_primitive_grid_add ( wmOperatorType ot)
void MESH_OT_primitive_ico_sphere_add ( wmOperatorType ot)
void MESH_OT_primitive_monkey_add ( wmOperatorType ot)
void MESH_OT_primitive_plane_add ( wmOperatorType ot)
void MESH_OT_primitive_uv_sphere_add ( wmOperatorType ot)

Variable Documentation

short icoface[20][3] [static]
Initial value:
 {
    {2,0,1},
    {1,0,5},
    {3,0,2},
    {4,0,3},
    {5,0,4},
    {1,5,10},
    {2,1,6},
    {3,2,7},
    {4,3,8},
    {5,4,9},
    {6,1,10},
    {7,2,6},
    {8,3,7},
    {9,4,8},
    {10,5,9},
    {6,10,11},
    {7,6,11},
    {8,7,11},
    {9,8,11},
    {10,9,11}
}

Definition at line 90 of file editmesh_add.c.

Referenced by make_prim().

float icovert[12][3] [static]
Initial value:
 {
    {0.0f,0.0f,-200.0f}, 
    {144.72f, -105.144f,-89.443f},
    {-55.277f, -170.128,-89.443f}, 
    {-178.885f,0.0f,-89.443f},
    {-55.277f,170.128f,-89.443f}, 
    {144.72f,105.144f,-89.443f},
    {55.277f,-170.128f,89.443f},
    {-144.72f,-105.144f,89.443f},
    {-144.72f,105.144f,89.443f},
    {55.277f,170.128f,89.443f},
    {178.885f,0.0f,89.443f},
    {0.0f,0.0f,200.0f}
}

Definition at line 76 of file editmesh_add.c.

Referenced by make_prim().

signed char monkeyf[250][4] [static]

Definition at line 945 of file editmesh_add.c.

Referenced by make_prim().

int monkeynf = 250 [static]

Definition at line 873 of file editmesh_add.c.

Referenced by make_prim().

int monkeynv = 271 [static]

Definition at line 872 of file editmesh_add.c.

Referenced by make_prim().

int monkeyo = 4 [static]

Definition at line 871 of file editmesh_add.c.

Referenced by make_prim().

signed char monkeyv[271][3] [static]

Definition at line 874 of file editmesh_add.c.

Referenced by make_prim().