Blender  V2.93
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 }
 
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, const char edge_hflag, const float smooth, const short smooth_falloff, const bool use_smooth_even, 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, const int seed)
 
void BM_mesh_calc_uvs_grid (BMesh *bm, const uint x_segments, const uint y_segments, const short oflag, const int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_sphere (BMesh *bm, const short oflag, const int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_circle (BMesh *bm, float mat[4][4], const float radius, const short oflag, const int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_cone (BMesh *bm, float mat[4][4], const float radius_top, const float radius_bottom, const int segments, const bool cap_ends, const short oflag, const int cd_loop_uv_offset)
 
void BM_mesh_calc_uvs_cube (BMesh *bm, const 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 28 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 36 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 45 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 53 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 65 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 78 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
SIMVERT_NORMAL 
SIMVERT_FACE 
SIMVERT_VGROUP 
SIMVERT_EDGE 

Definition at line 91 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BMOP_POKE_MEDIAN_WEIGHTED 
BMOP_POKE_MEDIAN 
BMOP_POKE_BOUNDS 

Definition at line 99 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 106 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_PROFILE_SUPERELLIPSE 
BEVEL_PROFILE_CUSTOM 

Definition at line 115 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 121 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_MITER_SHARP 
BEVEL_MITER_PATCH 
BEVEL_MITER_ARC 

Definition at line 129 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_VMESH_ADJ 
BEVEL_VMESH_CUTOFF 

Definition at line 136 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
BEVEL_AFFECT_VERTICES 
BEVEL_AFFECT_EDGES 

Definition at line 142 of file bmesh_operators.h.

◆ anonymous enum

anonymous enum
Enumerator
FACE_STRENGTH_WEAK 
FACE_STRENGTH_MEDIUM 
FACE_STRENGTH_STRONG 

Definition at line 148 of file bmesh_operators.h.

Function Documentation

◆ BM_mesh_calc_uvs_circle()

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

Fills first available UVmap with 2D projected UVs for all faces OpFlag-ged by given flag.

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 1354 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],
const float  radius_top,
const float  radius_bottom,
const int  segments,
const bool  cap_ends,
const short  oflag,
const int  cd_loop_uv_offset 
)

Fills first available UVmap with cylinder/cone-like UVs for all faces OpFlag-ged by given flag.

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 1549 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,
const short  oflag 
)

Fills first available UVmap with cube-like UVs for all faces OpFlag-ged by given flag.

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 1723 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,
const uint  x_segments,
const uint  y_segments,
const short  oflag,
const int  cd_loop_uv_offset 
)

Fills first available UVmap with grid-like UVs for all faces OpFlag-ged by given flag.

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 798 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,
const short  oflag,
const int  cd_loop_uv_offset 
)

Fills first available UVmap with spherical projected UVs for all faces OpFlag-ged by given flag.

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

Definition at line 1139 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,
const char  edge_hflag,
const float  smooth,
const short  smooth_falloff,
const bool  use_smooth_even,
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,
const int  seed 
)

Variable Documentation

◆ bmo_opdefines

const BMOpDefine* bmo_opdefines[]
extern

◆ bmo_opdefines_total

const int bmo_opdefines_total
extern

Definition at line 2183 of file bmesh_opdefines.c.

Referenced by BMO_opcode_from_opname().