|
Blender
V3.3
|
#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 wmOperatorType * | ot_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 |
This file defines _bpy.ops, an internal python module which gives Python the ability to inspect and call operators (defined by C or Python).
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.
| #define BPY_RELEASE_GIL |
Definition at line 45 of file bpy_operator.c.
| PyObject* BPY_operator_module | ( | void | ) |
Definition at line 506 of file bpy_operator.c.
References bpy_ops_module.
Referenced by BPy_init_modules().
|
static |
Definition at line 63 of file bpy_operator.c.
References NULL.
Referenced by pyop_call(), and pyop_poll().
|
static |
Definition at line 47 of file bpy_operator.c.
References NULL, ot, and WM_operatortype_find().
Referenced by pyop_getrna_type().
|
static |
Definition at line 370 of file bpy_operator.c.
References BPY_context_get(), C, MEM_freeN, NULL, ot, ptr, PyC_ParseBool(), pyrna_pydict_to_props(), RNA_pointer_create(), wmOperatorType::srna, WM_operator_properties_free(), WM_operator_pystring_ex(), and WM_operatortype_find().
|
static |
It might be that there is already a Python context override. We don't want to remove that except when this operator call sets a new override explicitly. This is necessary so that called operator runs in the same context as the calling code by default.
Definition at line 168 of file bpy_operator.c.
References BKE_reports_clear(), BKE_reports_init(), BLI_listbase_is_empty(), BPY_context_get(), BPY_modules_update(), BPy_reports_to_error(), BPy_reports_write_stdout(), C, blender::compositor::context, CTX_py_dict_get(), CTX_py_state_pop(), CTX_py_state_push(), CTX_wm_operator_poll_msg_clear(), CTX_wm_operator_poll_msg_get(), ELEM, ReportList::flag, ReportList::list, MEM_freeN, MEM_mallocN, NULL, op_context_override_deprecated_warning(), OPERATOR_CANCELLED, ot, ptr, pyrna_enum_bitfield_as_set(), pyrna_enum_repr(), pyrna_pydict_to_props(), pyrna_write_check(), rna_enum_operator_context_items, rna_enum_operator_return_items, RNA_enum_value_from_id(), RPT_FREE, RPT_OP_HOLD, RPT_STORE, WM_OP_EXEC_DEFAULT, WM_operator_call_py(), WM_operator_name_call(), WM_operator_poll_context(), WM_operator_properties_create_ptr(), WM_operator_properties_free(), WM_operator_properties_sanitize(), and WM_operatortype_find().
|
static |
Definition at line 444 of file bpy_operator.c.
References BLI_ghash_len(), BLI_ghashIterator_done(), BLI_ghashIterator_getValue(), BLI_ghashIterator_step(), GHashIterator::gh, wmOperatorType::idname, ot, and WM_operatortype_iter().
|
static |
Definition at line 474 of file bpy_operator.c.
|
static |
Definition at line 461 of file bpy_operator.c.
References NULL, ot, ot_lookup_from_py_string(), ptr, pyrna_struct_CreatePyObject(), RNA_pointer_create(), and wmOperatorType::srna.
|
static |
Definition at line 80 of file bpy_operator.c.
References BPY_context_get(), C, blender::compositor::context, CTX_py_dict_get(), CTX_py_state_pop(), CTX_py_state_push(), ELEM, MEM_freeN, NULL, op_context_override_deprecated_warning(), ot, pyrna_enum_repr(), ret, rna_enum_operator_context_items, RNA_enum_value_from_id(), WM_OP_EXEC_DEFAULT, WM_operator_poll_context(), and WM_operatortype_find().
|
static |
Definition at line 474 of file bpy_operator.c.
|
static |
Definition at line 474 of file bpy_operator.c.
Referenced by BPY_operator_module().