Blender  V3.3
Macros | Functions | Variables
bpy_operator.c File Reference
#include <Python.h>
#include "RNA_types.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "../generic/py_capi_rna.h"
#include "../generic/py_capi_utils.h"
#include "../generic/python_utildefines.h"
#include "BPY_extern.h"
#include "bpy_capi_utils.h"
#include "bpy_operator.h"
#include "bpy_operator_wrap.h"
#include "bpy_rna.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BKE_context.h"
#include "BKE_report.h"

Go to the source code of this file.

Macros

#define BPY_RELEASE_GIL
 

Functions

static wmOperatorTypeot_lookup_from_py_string (PyObject *value, const char *py_fn_id)
 
static void op_context_override_deprecated_warning (const char *action, const char *opname)
 
static PyObject * pyop_poll (PyObject *UNUSED(self), PyObject *args)
 
static PyObject * pyop_call (PyObject *UNUSED(self), PyObject *args)
 
static PyObject * pyop_as_string (PyObject *UNUSED(self), PyObject *args)
 
static PyObject * pyop_dir (PyObject *UNUSED(self))
 
static PyObject * pyop_getrna_type (PyObject *UNUSED(self), PyObject *value)
 
static PyObject * pyop_get_bl_options (PyObject *UNUSED(self), PyObject *value)
 
PyObject * BPY_operator_module (void)
 

Variables

static struct PyMethodDef bpy_ops_methods []
 
static struct PyModuleDef bpy_ops_module
 

Detailed Description

This file defines _bpy.ops, an internal python module which gives Python the ability to inspect and call operators (defined by C or Python).

Note
This C module is private, it should only be used by release/scripts/modules/bpy/ops.py which exposes operators as dynamically defined modules & callable objects to access all operators.

Definition in file bpy_operator.c.

Macro Definition Documentation

◆ BPY_RELEASE_GIL

#define BPY_RELEASE_GIL

Definition at line 45 of file bpy_operator.c.

Function Documentation

◆ BPY_operator_module()

PyObject* BPY_operator_module ( void  )

Definition at line 506 of file bpy_operator.c.

References bpy_ops_module.

Referenced by BPy_init_modules().

◆ op_context_override_deprecated_warning()

static void op_context_override_deprecated_warning ( const char *  action,
const char *  opname 
)
static

Definition at line 63 of file bpy_operator.c.

References NULL.

Referenced by pyop_call(), and pyop_poll().

◆ ot_lookup_from_py_string()

static wmOperatorType* ot_lookup_from_py_string ( PyObject *  value,
const char *  py_fn_id 
)
static

Definition at line 47 of file bpy_operator.c.

References NULL, ot, and WM_operatortype_find().

Referenced by pyop_getrna_type().

◆ pyop_as_string()

static PyObject* pyop_as_string ( PyObject *  UNUSEDself,
PyObject *  args 
)
static

◆ pyop_call()

static PyObject* pyop_call ( PyObject *  UNUSEDself,
PyObject *  args 
)
static

◆ pyop_dir()

static PyObject* pyop_dir ( PyObject *  UNUSEDself)
static

◆ pyop_get_bl_options()

static PyObject* pyop_get_bl_options ( PyObject *  UNUSEDself,
PyObject *  value 
)
static

Definition at line 474 of file bpy_operator.c.

◆ pyop_getrna_type()

static PyObject* pyop_getrna_type ( PyObject *  UNUSEDself,
PyObject *  value 
)
static

◆ pyop_poll()

static PyObject* pyop_poll ( PyObject *  UNUSEDself,
PyObject *  args 
)
static

Variable Documentation

◆ bpy_ops_methods

struct PyMethodDef bpy_ops_methods[]
static
Initial value:
= {
{"poll", (PyCFunction)pyop_poll, METH_VARARGS, NULL},
{"call", (PyCFunction)pyop_call, METH_VARARGS, NULL},
{"as_string", (PyCFunction)pyop_as_string, METH_VARARGS, NULL},
{"dir", (PyCFunction)pyop_dir, METH_NOARGS, NULL},
{"get_rna_type", (PyCFunction)pyop_getrna_type, METH_O, NULL},
{"get_bl_options", (PyCFunction)pyop_get_bl_options, METH_O, NULL},
{"macro_define", (PyCFunction)PYOP_wrap_macro_define, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL},
}
static PyObject * pyop_getrna_type(PyObject *UNUSED(self), PyObject *value)
Definition: bpy_operator.c:461
static PyObject * pyop_as_string(PyObject *UNUSED(self), PyObject *args)
Definition: bpy_operator.c:370
static PyObject * pyop_dir(PyObject *UNUSED(self))
Definition: bpy_operator.c:444
static PyObject * pyop_poll(PyObject *UNUSED(self), PyObject *args)
Definition: bpy_operator.c:80
static PyObject * pyop_call(PyObject *UNUSED(self), PyObject *args)
Definition: bpy_operator.c:168
static PyObject * pyop_get_bl_options(PyObject *UNUSED(self), PyObject *value)
Definition: bpy_operator.c:474
PyObject * PYOP_wrap_macro_define(PyObject *UNUSED(self), PyObject *args)

Definition at line 474 of file bpy_operator.c.

◆ bpy_ops_module

struct PyModuleDef bpy_ops_module
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"_bpy.ops",
-1,
}
static struct PyMethodDef bpy_ops_methods[]
Definition: bpy_operator.c:483

Definition at line 474 of file bpy_operator.c.

Referenced by BPY_operator_module().