Blender V4.3
bpy_operator.cc File Reference
#include <Python.h>
#include "RNA_types.hh"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "../generic/py_capi_rna.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.hh"
#include "../generic/python_utildefines.hh"
#include "BPY_extern.hh"
#include "bpy_capi_utils.hh"
#include "bpy_operator.hh"
#include "bpy_operator_wrap.hh"
#include "bpy_rna.hh"
#include "RNA_access.hh"
#include "RNA_enum_types.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_report.hh"

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 PyObject * pyop_poll (PyObject *, PyObject *args)
 
static PyObject * pyop_call (PyObject *, PyObject *args)
 
static PyObject * pyop_as_string (PyObject *, PyObject *args)
 
static PyObject * pyop_dir (PyObject *)
 
static PyObject * pyop_getrna_type (PyObject *, PyObject *value)
 
static PyObject * pyop_get_bl_options (PyObject *, PyObject *value)
 
PyObject * BPY_operator_module ()
 

Variables

static PyMethodDef bpy_ops_methods []
 
static 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 scripts/modules/bpy/ops.py which exposes operators as dynamically defined modules & callable objects to access all operators.

Definition in file bpy_operator.cc.

Macro Definition Documentation

◆ BPY_RELEASE_GIL

#define BPY_RELEASE_GIL

Definition at line 50 of file bpy_operator.cc.

Function Documentation

◆ BPY_operator_module()

PyObject * BPY_operator_module ( )

Definition at line 465 of file bpy_operator.cc.

References bpy_ops_module.

Referenced by BPy_init_modules().

◆ ot_lookup_from_py_string()

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

Definition at line 52 of file bpy_operator.cc.

References ot, and WM_operatortype_find().

Referenced by pyop_get_bl_options(), and pyop_getrna_type().

◆ pyop_as_string()

◆ pyop_call()

◆ pyop_dir()

static PyObject * pyop_dir ( PyObject * )
static

Definition at line 398 of file bpy_operator.cc.

References wmOperatorType::idname, ot, and WM_operatortype_map().

◆ pyop_get_bl_options()

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

◆ pyop_getrna_type()

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

◆ pyop_poll()

Variable Documentation

◆ bpy_ops_methods

PyMethodDef bpy_ops_methods[]
static
Initial value:
= {
{"poll", (PyCFunction)pyop_poll, METH_VARARGS, nullptr},
{"call", (PyCFunction)pyop_call, METH_VARARGS, nullptr},
{"as_string", (PyCFunction)pyop_as_string, METH_VARARGS, nullptr},
{"dir", (PyCFunction)pyop_dir, METH_NOARGS, nullptr},
{"get_rna_type", (PyCFunction)pyop_getrna_type, METH_O, nullptr},
{"get_bl_options", (PyCFunction)pyop_get_bl_options, METH_O, nullptr},
{"macro_define", (PyCFunction)PYOP_wrap_macro_define, METH_VARARGS, nullptr},
{nullptr, nullptr, 0, nullptr},
}
static PyObject * pyop_getrna_type(PyObject *, PyObject *value)
static PyObject * pyop_get_bl_options(PyObject *, PyObject *value)
static PyObject * pyop_dir(PyObject *)
static PyObject * pyop_call(PyObject *, PyObject *args)
static PyObject * pyop_poll(PyObject *, PyObject *args)
static PyObject * pyop_as_string(PyObject *, PyObject *args)
PyObject * PYOP_wrap_macro_define(PyObject *, PyObject *args)

Definition at line 438 of file bpy_operator.cc.

◆ bpy_ops_module

PyModuleDef bpy_ops_module
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"_bpy.ops",
nullptr,
-1,
nullptr,
nullptr,
nullptr,
nullptr,
}
static PyMethodDef bpy_ops_methods[]

Definition at line 453 of file bpy_operator.cc.

Referenced by BPY_operator_module().