Files
test/source/blender/python/intern/bpy_operator_wrap.h
Campbell Barton d002703484 PyAPI: fixes for defining operator macros
- Support passing in operator ID's using Python dot syntax.
- Support define operators that haven't yet been registered
  matching Blender's own behavior.

Also add doc-string for bpy.types.Macro.define.
2024-06-01 16:17:02 +10:00

40 lines
970 B
C

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup pythonintern
*/
#pragma once
struct wmOperatorType;
#ifdef __cplusplus
extern "C" {
#endif
/**
* These are used for operator methods, used by `bpy_operator.cc`.
*
* Accessed via sub-classes of `bpy.types.Macro` using the `define` method.
*/
PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args);
/* Exposed to RNA/WM API. */
/**
* Generic function used by all Python defined operators
* it's passed as an argument to #WM_operatortype_append_ptr in for operator registration.
*/
void BPY_RNA_operator_wrapper(struct wmOperatorType *ot, void *userdata);
/**
* Generic function used by all Python defined macro-operators
* it's passed as an argument to #WM_operatortype_append_ptr in for operator registration.
*/
void BPY_RNA_operator_macro_wrapper(struct wmOperatorType *ot, void *userdata);
#ifdef __cplusplus
}
#endif