29 return PyUnicode_FromFormat(
"<%.200s bmesh.ops.%.200s()>", Py_TYPE(
self)->tp_name,
self->opname);
47 while (*slot_types[i].name) {
51 const int name_len = is_out ? (strchr(slot_types[i].name,
'.') - slot_types[i].name) :
52 sizeof(slot_types[i].name);
53 const char *value =
"<Unknown>";
54 switch (slot_types[i].type) {
60 value = slot_types[i].enum_flags[0].identifier;
91 i ?
", %.*s=%s%s%s%s%s" :
"%.*s=%s%s%s%s%s",
119 ret = PyUnicode_FromFormat(
"%.200s bmesh.ops.%.200s(bmesh, %s)\n -> dict(%s)",
120 Py_TYPE(
self)->tp_name,
133 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
140 PyVarObject_HEAD_INIT(
nullptr, 0)
198 self->opname = opname;
200 return (PyObject *)
self;
205 const char *opname = PyUnicode_AsUTF8(pyname);
211 PyErr_Format(PyExc_AttributeError,
"BMeshOpsModule: operator \"%.200s\" doesn't exist", opname);
223 for (i = 0; i < tot; i++) {
230#if (defined(__GNUC__) && !defined(__clang__))
231# pragma GCC diagnostic push
232# pragma GCC diagnostic ignored "-Wcast-function-type"
238 {
nullptr,
nullptr, 0,
nullptr},
241#if (defined(__GNUC__) && !defined(__clang__))
242# pragma GCC diagnostic pop
248 "Access to BMesh operators");
250 PyModuleDef_HEAD_INIT,
A dynamically sized string ADT.
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format,...) ATTR_PRINTF_FORMAT(2
Read Guarded memory(de)allocation.
const int bmo_opdefines_total
const BMOpDefine * bmo_opdefines[]
@ BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE
@ BMO_OP_SLOT_ELEMENT_BUF
int BMO_opcode_from_opname(const char *opname)
@ BMO_OP_SLOT_SUBTYPE_INT_FLAG
@ BMO_OP_SLOT_SUBTYPE_INT_ENUM
static PyObject * bpy_bmesh_ops_module_getattro(PyObject *, PyObject *pyname)
static PyObject * bpy_bmesh_op_repr(BPy_BMeshOpFunc *self)
static PyObject * bpy_bmesh_op_CreatePyObject(const char *opname)
static char * bmp_slots_as_args(const BMOSlotType slot_types[BMO_OP_MAX_SLOTS], const bool is_out)
static PyMethodDef BPy_BM_ops_methods[]
static PyModuleDef BPy_BM_ops_module_def
static PyGetSetDef bpy_bmesh_op_getseters[]
static PyObject * bpy_bmesh_ops_module_dir(PyObject *)
PyDoc_STRVAR(BPy_BM_ops_doc, "Access to BMesh operators")
PyObject * BPyInit_bmesh_ops()
static PyObject * bpy_bmesh_op_doc_get(BPy_BMeshOpFunc *self, void *)
static PyTypeObject bmesh_op_Type
PyObject * BPy_BMO_call(BPy_BMeshOpFunc *self, PyObject *args, PyObject *kw)
node_ attributes set("label", ss.str())
void MEM_freeN(void *vmemh)