Blender  V3.3
Enumerations | Functions | Variables
bmesh_operators.h File Reference
#include "intern/bmesh_operator_api_inline.h"

Go to the source code of this file.

Enumerations

enum  { SUBD_CORNER_INNERVERT , SUBD_CORNER_PATH , SUBD_CORNER_FAN , SUBD_CORNER_STRAIGHT_CUT }
 
enum  {
  SUBD_FALLOFF_SMOOTH = 0 , SUBD_FALLOFF_SPHERE , SUBD_FALLOFF_ROOT , SUBD_FALLOFF_SHARP ,
  SUBD_FALLOFF_LIN , SUBD_FALLOFF_INVSQUARE = 7
}
 
enum  { SUBDIV_SELECT_NONE , SUBDIV_SELECT_ORIG , SUBDIV_SELECT_INNER , SUBDIV_SELECT_LOOPCUT }
 
enum  { SUBD_RING_INTERP_LINEAR , SUBD_RING_INTERP_PATH , SUBD_RING_INTERP_SURF }
 
enum  {
  SIMFACE_MATERIAL = 201 , SIMFACE_AREA , SIMFACE_SIDES , SIMFACE_PERIMETER ,
  SIMFACE_NORMAL , SIMFACE_COPLANAR , SIMFACE_SMOOTH , SIMFACE_FACEMAP ,
  SIMFACE_FREESTYLE
}
 
enum  {
  SIMEDGE_LENGTH = 101 , SIMEDGE_DIR , SIMEDGE_FACE , SIMEDGE_FACE_ANGLE ,
  SIMEDGE_CREASE , SIMEDGE_BEVEL , SIMEDGE_SEAM , SIMEDGE_SHARP ,
  SIMEDGE_FREESTYLE
}
 
enum  {
  SIMVERT_NORMAL = 0 , SIMVERT_FACE , SIMVERT_VGROUP , SIMVERT_EDGE ,
  SIMVERT_CREASE
}
 
enum  { BMOP_POKE_MEDIAN_WEIGHTED = 0 , BMOP_POKE_MEDIAN , BMOP_POKE_BOUNDS }
 
enum  {
  BEVEL_AMT_OFFSET , BEVEL_AMT_WIDTH , BEVEL_AMT_DEPTH , BEVEL_AMT_PERCENT ,
  BEVEL_AMT_ABSOLUTE
}
 
enum  { BEVEL_PROFILE_SUPERELLIPSE , BEVEL_PROFILE_CUSTOM }
 
enum  { BEVEL_FACE_STRENGTH_NONE , BEVEL_FACE_STRENGTH_NEW , BEVEL_FACE_STRENGTH_AFFECTED , BEVEL_FACE_STRENGTH_ALL }
 
enum  { BEVEL_MITER_SHARP , BEVEL_MITER_PATCH , BEVEL_MITER_ARC }
 
enum  { BEVEL_VMESH_ADJ , BEVEL_VMESH_CUTOFF }
 
enum  { BEVEL_AFFECT_VERTICES = 0 , BEVEL_AFFECT_EDGES = 1 }
 
enum  { FACE_STRENGTH_WEAK = -16384 , FACE_STRENGTH_MEDIUM = 0 , FACE_STRENGTH_STRONG = 16384 }
 

Functions

void BM_mesh_esubdivide (BMesh *bm, char edge_hflag, float smooth, short smooth_falloff, bool use_smooth_even, float fractal, float along_normal, int numcuts, int seltype, int cornertype, short use_single_edge, short use_grid_fill, short use_only_quads, int seed)
 
void BM_mesh_calc_uvs_grid (BMesh *bm, uint x_segments, uint y_segments, short oflag, int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_sphere (BMesh *bm, short oflag, int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_circle (BMesh *bm, float mat[4][4], float radius, short oflag, int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_cone (BMesh *bm, float mat[4][4], float radius_top, float radius_bottom, int segments, bool cap_ends, short oflag, int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_cube (BMesh *bm, short oflag)
 

Variables

const BMOpDefinebmo_opdefines []
 
const int bmo_opdefines_total
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SUBD_CORNER_INNERVERT 
SUBD_CORNER_PATH 
SUBD_CORNER_FAN 
SUBD_CORNER_STRAIGHT_CUT 

Definition at line 14 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
SUBD_FALLOFF_SMOOTH 
SUBD_FALLOFF_SPHERE 
SUBD_FALLOFF_ROOT 
SUBD_FALLOFF_SHARP 
SUBD_FALLOFF_LIN 
SUBD_FALLOFF_INVSQUARE 

Definition at line 22 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
SUBDIV_SELECT_NONE 
SUBDIV_SELECT_ORIG 
SUBDIV_SELECT_INNER 
SUBDIV_SELECT_LOOPCUT 

Definition at line 31 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
SUBD_RING_INTERP_LINEAR 
SUBD_RING_INTERP_PATH 
SUBD_RING_INTERP_SURF 

Definition at line 39 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
SIMFACE_MATERIAL 
SIMFACE_AREA 
SIMFACE_SIDES 
SIMFACE_PERIMETER 
SIMFACE_NORMAL 
SIMFACE_COPLANAR 
SIMFACE_SMOOTH 
SIMFACE_FACEMAP 
SIMFACE_FREESTYLE 

Definition at line 51 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
SIMEDGE_LENGTH 
SIMEDGE_DIR 
SIMEDGE_FACE 
SIMEDGE_FACE_ANGLE 
SIMEDGE_CREASE 
SIMEDGE_BEVEL 
SIMEDGE_SEAM 
SIMEDGE_SHARP 
SIMEDGE_FREESTYLE 

Definition at line 64 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
SIMVERT_NORMAL 
SIMVERT_FACE 
SIMVERT_VGROUP 
SIMVERT_EDGE 
SIMVERT_CREASE 

Definition at line 77 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BMOP_POKE_MEDIAN_WEIGHTED 
BMOP_POKE_MEDIAN 
BMOP_POKE_BOUNDS 

Definition at line 86 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_AMT_OFFSET 
BEVEL_AMT_WIDTH 
BEVEL_AMT_DEPTH 
BEVEL_AMT_PERCENT 
BEVEL_AMT_ABSOLUTE 

Definition at line 93 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_PROFILE_SUPERELLIPSE 
BEVEL_PROFILE_CUSTOM 

Definition at line 102 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_FACE_STRENGTH_NONE 
BEVEL_FACE_STRENGTH_NEW 
BEVEL_FACE_STRENGTH_AFFECTED 
BEVEL_FACE_STRENGTH_ALL 

Definition at line 108 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_MITER_SHARP 
BEVEL_MITER_PATCH 
BEVEL_MITER_ARC 

Definition at line 116 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_VMESH_ADJ 
BEVEL_VMESH_CUTOFF 

Definition at line 123 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_AFFECT_VERTICES 
BEVEL_AFFECT_EDGES 

Definition at line 129 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
FACE_STRENGTH_WEAK 
FACE_STRENGTH_MEDIUM 
FACE_STRENGTH_STRONG 

Definition at line 135 of file bmesh_operators.h.

Function Documentation

◆ BM_mesh_calc_uvs_circle()

void BM_mesh_calc_uvs_circle ( BMesh bm,
float  mat[4][4],
float  radius,
short  oflag,
int  cd_loop_uv_offset 
)

Fills first available UV-map with 2D projected UVs for all faces with oflag set.

Parameters
bmThe BMesh to operate on.
matThe transform matrix applied to the created circle.
radiusThe size of the circle.
oflagThe flag to check faces with.

Definition at line 1316 of file bmo_primitive.c.

References BLI_assert, bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, BMVert::co, copy_v3_v3(), invert_m4_m4(), l, mul_m4_v3(), oflag, MLoopUV::uv, and BMLoop::v.

Referenced by bmo_create_circle_exec().

◆ BM_mesh_calc_uvs_cone()

void BM_mesh_calc_uvs_cone ( BMesh bm,
float  mat[4][4],
float  radius_top,
float  radius_bottom,
int  segments,
bool  cap_ends,
short  oflag,
int  cd_loop_uv_offset 
)

Fills first available UV-map with cylinder/cone-like UVs for all faces with oflag set.

Parameters
bmThe BMesh to operate on.
matThe transform matrix applied to the created cone/cylinder.
radius_topThe size of the top end of the cone/cylinder.
radius_bottomThe size of the bottom end of the cone/cylinder.
segmentsThe number of subdivisions in the sides of the cone/cylinder.
cap_endsWhether the ends of the cone/cylinder are filled or not.
oflagThe flag to check faces with.

Definition at line 1501 of file bmo_primitive.c.

References BLI_assert, bm, BM_ELEM_CD_GET_VOID_P, BM_face_normal_update(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, BMVert::co, dot_v3v3(), float(), invert_m4_m4(), l, BMFace::len, mul_mat3_m4_v3(), mul_v3_m4v3(), BMFace::no, normalize_v3(), oflag, MLoopUV::uv, BMLoop::v, x, and y.

Referenced by bmo_create_cone_exec().

◆ BM_mesh_calc_uvs_cube()

void BM_mesh_calc_uvs_cube ( BMesh bm,
short  oflag 
)

Fills first available UV-map with cube-like UVs for all faces with oflag set.

Note
Expects tagged faces to be six quads.
Caller must order faces for correct alignment.
Parameters
bmThe BMesh to operate on.
oflagThe flag to check faces with.

Definition at line 1666 of file bmo_primitive.c.

References BLI_assert, bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, CD_MLOOPUV, CustomData_get_offset(), l, BMesh::ldata, oflag, MLoopUV::uv, width, x, and y.

Referenced by bmo_create_cube_exec().

◆ BM_mesh_calc_uvs_grid()

void BM_mesh_calc_uvs_grid ( BMesh bm,
uint  x_segments,
uint  y_segments,
short  oflag,
int  cd_loop_uv_offset 
)

Fills first available UV-map with grid-like UV's for all faces with oflag set.

Parameters
bmThe BMesh to operate on
x_segmentsThe x-resolution of the grid
y_segmentsThe y-resolution of the grid
oflagThe flag to check faces with.

Definition at line 776 of file bmo_primitive.c.

References BLI_assert, bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_face_flag_test, float(), l, oflag, MLoopUV::uv, x, and y.

Referenced by bmo_create_grid_exec().

◆ BM_mesh_calc_uvs_sphere()

void BM_mesh_calc_uvs_sphere ( BMesh bm,
short  oflag,
int  cd_loop_uv_offset 
)

Fills first available UV-map with spherical projected UVs for all faces with oflag set.

Parameters
bmThe BMesh to operate on
oflagThe flag to check faces with.

Definition at line 1111 of file bmo_primitive.c.

References BLI_assert, bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, bm_mesh_calc_uvs_sphere_face(), BMO_face_flag_test, l, oflag, and MLoopUV::uv.

Referenced by bmo_create_uvsphere_exec().

◆ BM_mesh_esubdivide()

void BM_mesh_esubdivide ( BMesh bm,
char  edge_hflag,
float  smooth,
short  smooth_falloff,
bool  use_smooth_even,
float  fractal,
float  along_normal,
int  numcuts,
int  seltype,
int  cornertype,
short  use_single_edge,
short  use_grid_fill,
short  use_only_quads,
int  seed 
)

Variable Documentation

◆ bmo_opdefines

const BMOpDefine* bmo_opdefines[]
extern

◆ bmo_opdefines_total

const int bmo_opdefines_total
extern

Definition at line 2172 of file bmesh_opdefines.c.

Referenced by BMO_opcode_from_opname().