Blender  V3.3
Functions
bmesh_py_ops_call.c File Reference
#include <Python.h>
#include "BLI_utildefines.h"
#include "../mathutils/mathutils.h"
#include "bmesh.h"
#include "bmesh_py_ops_call.h"
#include "bmesh_py_types.h"
#include "../generic/py_capi_utils.h"
#include "../generic/python_utildefines.h"

Go to the source code of this file.

Functions

 BLI_STATIC_ASSERT (sizeof(PyC_FlagSet)==sizeof(BMO_FlagSet), "size mismatch")
 
static int bpy_bm_op_as_py_error (BMesh *bm)
 
static int bpy_slot_from_py_elem_check (BPy_BMElem *value, BMesh *bm, const char htype, const char *opname, const char *slot_name, const char *descr)
 Utility function to check BMVert/BMEdge/BMFace's. More...
 
static int bpy_slot_from_py_elemseq_check (BPy_BMGeneric *value, BMesh *bm, const char htype_py, const char htype_bmo, const char *opname, const char *slot_name, const char *descr)
 Utility function to check BMVertSeq/BMEdgeSeq/BMFaceSeq's. More...
 
static int bpy_slot_from_py (BMesh *bm, BMOperator *bmop, BMOpSlot *slot, PyObject *value, const char *opname, const char *slot_name)
 
static PyObject * bpy_slot_to_py (BMesh *bm, BMOpSlot *slot)
 
PyObject * BPy_BMO_call (BPy_BMeshOpFunc *self, PyObject *args, PyObject *kw)
 

Detailed Description

This file provides call aka BPy_BMO_call for the bmesh operator and has been given its own file because argument conversion is involved.

Definition in file bmesh_py_ops_call.c.

Function Documentation

◆ BLI_STATIC_ASSERT()

BLI_STATIC_ASSERT ( sizeof(PyC_FlagSet = =sizeof(BMO_FlagSet),
"size mismatch"   
)

◆ bpy_bm_op_as_py_error()

static int bpy_bm_op_as_py_error ( BMesh bm)
static

◆ BPy_BMO_call()

PyObject* BPy_BMO_call ( BPy_BMeshOpFunc self,
PyObject *  args,
PyObject *  kw 
)

◆ bpy_slot_from_py()

static int bpy_slot_from_py ( BMesh bm,
BMOperator bmop,
BMOpSlot slot,
PyObject *  value,
const char *  opname,
const char *  slot_name 
)
static

Use for giving py args to an operator.

Definition at line 142 of file bmesh_py_ops_call.c.

References bm, BM_ALL_NOLOOP, BM_EDGE, BM_FACE, BM_ITER_BPY_BM_SEQ, bm_iter_itype_htype_map, BM_VERT, BMO_OP_SLOT_BOOL, BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_FLT, BMO_OP_SLOT_INT, BMO_OP_SLOT_MAPPING, BMO_OP_SLOT_MAT, BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE, BMO_OP_SLOT_SUBTYPE_INT_ENUM, BMO_OP_SLOT_SUBTYPE_INT_FLAG, BMO_OP_SLOT_SUBTYPE_MAP_BOOL, BMO_OP_SLOT_SUBTYPE_MAP_ELEM, BMO_OP_SLOT_SUBTYPE_MAP_EMPTY, BMO_OP_SLOT_SUBTYPE_MAP_FLT, BMO_OP_SLOT_SUBTYPE_MAP_INT, BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL, BMO_OP_SLOT_VEC, BMO_SLOT_AS_BOOL, BMO_SLOT_AS_FLOAT, BMO_SLOT_AS_INT, BMO_SLOT_AS_VECTOR, BMO_slot_buffer_alloc(), BMO_slot_buffer_from_all(), BMO_slot_buffer_from_single(), BMO_slot_map_bool_insert(), BMO_slot_map_elem_insert(), BMO_slot_map_empty_insert(), BMO_slot_map_float_insert(), BMO_slot_map_int_insert(), BMO_slot_mat_set(), BPy_BMEdgeSeq_Check, BPy_BMElem_PySeq_As_Array(), BPy_BMElemSeq_Check, BPy_BMFaceSeq_Check, BPy_BMVertSeq_Check, bpy_slot_from_py_elem_check(), bpy_slot_from_py_elemseq_check(), BMOpSlot::buf, MatrixObject::col_num, BMOpSlot::data, ELEM, eBMOpSlotSubType_Union::elem, BMOpSlot::enum_data, if(), eBMOpSlotSubType_Union::intg, itype, eBMOpSlotSubType_Union::map, mathutils_array_parse(), Matrix_ParseAny(), NULL, PyC_FlagSet_ToBitfield(), PyC_FlagSet_ValueFromID(), PyC_Long_AsBool(), MatrixObject::row_num, size(), BMOpSlot::slot_subtype, BMOpSlot::slot_type, and BMOperator::slots_in.

Referenced by BPy_BMO_call().

◆ bpy_slot_from_py_elem_check()

static int bpy_slot_from_py_elem_check ( BPy_BMElem value,
BMesh bm,
const char  htype,
const char *  opname,
const char *  slot_name,
const char *  descr 
)
static

Utility function to check BMVert/BMEdge/BMFace's.

Parameters
value
bmCheck the value against this.
htypeTest value matches this type.
descrDescription text.

Definition at line 51 of file bmesh_py_ops_call.c.

References bm, BPy_BMElem::bm, BPy_BMElem_Check, BPy_BMElem_StringFromHType(), BPy_BMElem::ele, BMElem::head, BMHeader::htype, and NULL.

Referenced by bpy_slot_from_py().

◆ bpy_slot_from_py_elemseq_check()

static int bpy_slot_from_py_elemseq_check ( BPy_BMGeneric value,
BMesh bm,
const char  htype_py,
const char  htype_bmo,
const char *  opname,
const char *  slot_name,
const char *  descr 
)
static

Utility function to check BMVertSeq/BMEdgeSeq/BMFaceSeq's.

Parameters
valueCaller must check its a BMeshSeq
bmCheck the value against this.
htype_pyThe type(s) of value.
htype_bmoThe type(s) supported by the target slot.
descrDescription text.

Definition at line 97 of file bmesh_py_ops_call.c.

References bm, BPy_BMGeneric::bm, BPy_BMElem_StringFromHType_ex(), and NULL.

Referenced by bpy_slot_from_py().

◆ bpy_slot_to_py()

static PyObject* bpy_slot_to_py ( BMesh bm,
BMOpSlot slot 
)
static