Refactor: Move BPY generic headers to proper C++ ones.
NOTE: `bgl.h` was left unchanged, as it is deprecated code anyway, and its conversion to C++ does not seem immediately trivial.
This commit is contained in:
committed by
Bastien Montagne
parent
4fac7828e4
commit
c3247aa4f0
@@ -1334,7 +1334,7 @@ endif()
|
||||
# Check if Sub-modules are Cloned
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# While we have this as an '#error' in 'bpy_capi_utils.h',
|
||||
# While we have this as an '#error' in 'bpy_capi_utils.hh',
|
||||
# upgrading Python tends to cause confusion for users who build.
|
||||
# Give the error message early to make this more obvious.
|
||||
#
|
||||
|
||||
@@ -2056,9 +2056,7 @@ static bool ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b)
|
||||
return false;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
void PyC_FileAndNum_Safe(const char **r_filename, int *r_lineno);
|
||||
}
|
||||
extern void PyC_FileAndNum_Safe(const char **r_filename, int *r_lineno);
|
||||
|
||||
void UI_editsource_active_but_test(uiBut *but)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ extern "C" {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "generic/python_utildefines.h"
|
||||
#include "generic/python_utildefines.hh"
|
||||
#include "mathutils/mathutils.hh"
|
||||
|
||||
//==============================
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "RNA_prototypes.hh"
|
||||
#include "bpy_rna.hh" /* pyrna_struct_CreatePyObject() */
|
||||
|
||||
#include "../generic/py_capi_utils.h" /* #PyC_UnicodeFromBytes */
|
||||
#include "../generic/py_capi_utils.hh" /* #PyC_UnicodeFromBytes */
|
||||
|
||||
#include "BKE_colorband.hh" /* BKE_colorband_evaluate() */
|
||||
#include "BKE_colortools.hh" /* BKE_curvemapping_evaluateF() */
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "../../stroke/BasicStrokeShaders.h"
|
||||
|
||||
#include "../../../../python/generic/py_capi_utils.h"
|
||||
#include "../../../../python/generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "BPY_extern_run.h"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
|
||||
namespace Freestyle {
|
||||
|
||||
|
||||
@@ -6707,7 +6707,7 @@ bool RNA_property_assign_default(PointerRNA *ptr, PropertyRNA *prop)
|
||||
}
|
||||
|
||||
#ifdef WITH_PYTHON
|
||||
extern "C" void PyC_LineSpit(void);
|
||||
extern void PyC_LineSpit(void);
|
||||
#endif
|
||||
|
||||
void _RNA_warning(const char *format, ...)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "bmesh_py_api.h" /* own include */
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#include "bmesh_py_types.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
BLI_STATIC_ASSERT(sizeof(PyC_FlagSet) == sizeof(BMO_FlagSet), "size mismatch");
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
#include "../mathutils/mathutils.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "bmesh_py_types.h" /* own include */
|
||||
#include "bmesh_py_types_customdata.h"
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
#include "bmesh_py_types_customdata.h"
|
||||
#include "bmesh_py_types_meshdata.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
#include "../mathutils/mathutils.hh"
|
||||
|
||||
#include "BKE_customdata.hh"
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
#include "bmesh.hh"
|
||||
#include "bmesh_py_types_meshdata.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
/* Mesh Loop UV
|
||||
* ************ */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "bmesh_py_types.h"
|
||||
#include "bmesh_py_types_select.h"
|
||||
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "bmesh_py_types.h"
|
||||
#include "bmesh_py_utils.h" /* own include */
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
|
||||
@@ -25,17 +25,17 @@ set(SRC
|
||||
py_capi_utils.cc
|
||||
|
||||
bgl.h
|
||||
bl_math_py_api.h
|
||||
blf_py_api.h
|
||||
idprop_py_api.h
|
||||
idprop_py_ui_api.h
|
||||
imbuf_py_api.h
|
||||
py_capi_rna.h
|
||||
py_capi_utils.h
|
||||
bl_math_py_api.hh
|
||||
blf_py_api.hh
|
||||
idprop_py_api.hh
|
||||
idprop_py_ui_api.hh
|
||||
imbuf_py_api.hh
|
||||
py_capi_rna.hh
|
||||
py_capi_utils.hh
|
||||
|
||||
# header-only
|
||||
python_compat.h
|
||||
python_utildefines.h
|
||||
python_compat.hh
|
||||
python_utildefines.hh
|
||||
)
|
||||
|
||||
set(LIB
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "GPU_context.hh"
|
||||
#include "GPU_state.hh"
|
||||
|
||||
#include "py_capi_utils.h"
|
||||
#include "py_capi_utils.hh"
|
||||
|
||||
#include "BKE_global.hh"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bl_math_py_api.h"
|
||||
#include "bl_math_py_api.hh"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Module Doc String
|
||||
|
||||
@@ -9,12 +9,4 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyMODINIT_FUNC BPyInit_bl_math(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
PyMODINIT_FUNC BPyInit_bl_math();
|
||||
@@ -11,9 +11,9 @@
|
||||
/* Future-proof, See https://docs.python.org/3/c-api/arg.html#strings-and-buffers */
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "blf_py_api.h"
|
||||
#include "blf_py_api.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "python_utildefines.h"
|
||||
#include "python_utildefines.hh"
|
||||
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
|
||||
@@ -10,12 +10,4 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyObject *BPyInit_blf(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "idprop_py_api.h"
|
||||
#include "idprop_py_ui_api.h"
|
||||
#include "idprop_py_api.hh"
|
||||
#include "idprop_py_ui_api.hh"
|
||||
|
||||
#include "BKE_idprop.hh"
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
#define USE_STRING_COERCE
|
||||
|
||||
#ifdef USE_STRING_COERCE
|
||||
# include "py_capi_utils.h"
|
||||
# include "py_capi_utils.hh"
|
||||
#endif
|
||||
|
||||
#include "python_utildefines.h"
|
||||
#include "python_utildefines.hh"
|
||||
|
||||
extern bool pyrna_id_FromPyObject(PyObject *obj, ID **id);
|
||||
extern PyObject *pyrna_id_CreatePyObject(ID *id);
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct BPy_IDGroup_Iter;
|
||||
struct ID;
|
||||
struct IDProperty;
|
||||
@@ -46,20 +42,20 @@ extern PyTypeObject BPy_IDGroup_IterItems_Type;
|
||||
#define BPy_IDGroup_IterItems_Check(v) (PyObject_TypeCheck(v, &BPy_IDGroup_IterItems_Type))
|
||||
#define BPy_IDGroup_IterItems_CheckExact(v) (Py_TYPE(v) == &BPy_IDGroup_IterItems_Type)
|
||||
|
||||
typedef struct BPy_IDProperty {
|
||||
struct BPy_IDProperty {
|
||||
PyObject_VAR_HEAD
|
||||
struct ID *owner_id; /* can be NULL */
|
||||
struct IDProperty *prop; /* must be second member */
|
||||
struct IDProperty *parent;
|
||||
} BPy_IDProperty;
|
||||
};
|
||||
|
||||
typedef struct BPy_IDArray {
|
||||
struct BPy_IDArray {
|
||||
PyObject_VAR_HEAD
|
||||
struct ID *owner_id; /* can be NULL */
|
||||
struct IDProperty *prop; /* must be second member */
|
||||
} BPy_IDArray;
|
||||
};
|
||||
|
||||
typedef struct BPy_IDGroup_Iter {
|
||||
struct BPy_IDGroup_Iter {
|
||||
PyObject_VAR_HEAD
|
||||
BPy_IDProperty *group;
|
||||
struct IDProperty *cur;
|
||||
@@ -67,43 +63,39 @@ typedef struct BPy_IDGroup_Iter {
|
||||
int len_init;
|
||||
/** Iterate in the reverse direction. */
|
||||
bool reversed;
|
||||
} BPy_IDGroup_Iter;
|
||||
};
|
||||
|
||||
/** Use to implement `IDPropertyGroup.keys/values/items` */
|
||||
typedef struct BPy_IDGroup_View {
|
||||
struct BPy_IDGroup_View {
|
||||
PyObject_VAR_HEAD
|
||||
/** This will be NULL when accessing keys on data that has no ID properties. */
|
||||
BPy_IDProperty *group;
|
||||
bool reversed;
|
||||
} BPy_IDGroup_View;
|
||||
};
|
||||
|
||||
PyObject *BPy_Wrap_GetKeys(struct IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetValues(struct ID *id, struct IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetItems(struct ID *id, struct IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetKeys(IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetValues(ID *id, IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetItems(ID *id, IDProperty *prop);
|
||||
|
||||
PyObject *BPy_Wrap_GetKeys_View_WithID(struct ID *id, struct IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetValues_View_WithID(struct ID *id, struct IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetItems_View_WithID(struct ID *id, struct IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetKeys_View_WithID(ID *id, IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetValues_View_WithID(ID *id, IDProperty *prop);
|
||||
PyObject *BPy_Wrap_GetItems_View_WithID(ID *id, IDProperty *prop);
|
||||
|
||||
int BPy_Wrap_SetMapItem(struct IDProperty *prop, PyObject *key, PyObject *val);
|
||||
int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val);
|
||||
|
||||
/**
|
||||
* For simple, non nested types this is the same as #BPy_IDGroup_WrapData.
|
||||
*/
|
||||
PyObject *BPy_IDGroup_MapDataToPy(struct IDProperty *prop);
|
||||
PyObject *BPy_IDGroup_WrapData(struct ID *id, struct IDProperty *prop, struct IDProperty *parent);
|
||||
PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop);
|
||||
PyObject *BPy_IDGroup_WrapData(ID *id, IDProperty *prop, IDProperty *parent);
|
||||
/**
|
||||
* \note group can be a pointer array or a group.
|
||||
* assume we already checked key is a string.
|
||||
*
|
||||
* \return success.
|
||||
*/
|
||||
bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *key, struct IDProperty *group, PyObject *ob);
|
||||
bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *key, IDProperty *group, PyObject *ob);
|
||||
|
||||
void IDProp_Init_Types(void);
|
||||
void IDProp_Init_Types();
|
||||
|
||||
PyObject *BPyInit_idprop(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
PyObject *BPyInit_idprop();
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "idprop_py_ui_api.h"
|
||||
#include "idprop_py_ui_api.hh"
|
||||
|
||||
#include "BKE_idprop.hh"
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
#define USE_STRING_COERCE
|
||||
|
||||
#ifdef USE_STRING_COERCE
|
||||
# include "py_capi_utils.h"
|
||||
# include "py_capi_utils.hh"
|
||||
#endif
|
||||
#include "py_capi_rna.h"
|
||||
#include "py_capi_rna.hh"
|
||||
|
||||
#include "python_utildefines.h"
|
||||
#include "python_utildefines.hh"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name UI Data Update
|
||||
|
||||
@@ -8,21 +8,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct IDProperty;
|
||||
|
||||
extern PyTypeObject BPy_IDPropertyUIManager_Type;
|
||||
|
||||
typedef struct BPy_IDPropertyUIManager {
|
||||
struct BPy_IDPropertyUIManager {
|
||||
PyObject_VAR_HEAD
|
||||
struct IDProperty *property;
|
||||
} BPy_IDPropertyUIManager;
|
||||
IDProperty *property;
|
||||
};
|
||||
|
||||
void IDPropertyUIData_Init_Types(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
void IDPropertyUIData_Init_Types();
|
||||
@@ -14,12 +14,12 @@
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "py_capi_utils.h"
|
||||
#include "py_capi_utils.hh"
|
||||
|
||||
#include "python_compat.h"
|
||||
#include "python_utildefines.h"
|
||||
#include "python_compat.hh"
|
||||
#include "python_utildefines.hh"
|
||||
|
||||
#include "imbuf_py_api.h" /* own include */
|
||||
#include "imbuf_py_api.hh" /* own include */
|
||||
|
||||
#include "../../imbuf/IMB_imbuf.hh"
|
||||
#include "../../imbuf/IMB_imbuf_types.hh"
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
* \ingroup pygen
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyObject *BPyInit_imbuf(void);
|
||||
PyObject *BPyInit_imbuf();
|
||||
|
||||
extern PyTypeObject Py_ImBuf_Type;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "py_capi_rna.h"
|
||||
#include "py_capi_rna.hh"
|
||||
|
||||
#include "BLI_bitmap.h"
|
||||
#include "BLI_dynstr.h"
|
||||
|
||||
@@ -11,22 +11,18 @@
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct EnumPropertyItem;
|
||||
|
||||
/**
|
||||
* Convert all items into a single comma separated string.
|
||||
* Use for creating useful error messages.
|
||||
*/
|
||||
char *pyrna_enum_repr(const struct EnumPropertyItem *item);
|
||||
char *pyrna_enum_repr(const EnumPropertyItem *item);
|
||||
|
||||
/**
|
||||
* Same as #RNA_enum_value_from_id, but raises an exception.
|
||||
*/
|
||||
int pyrna_enum_value_from_id(const struct EnumPropertyItem *item,
|
||||
int pyrna_enum_value_from_id(const EnumPropertyItem *item,
|
||||
const char *identifier,
|
||||
int *r_value,
|
||||
const char *error_prefix);
|
||||
@@ -39,7 +35,7 @@ int pyrna_enum_value_from_id(const struct EnumPropertyItem *item,
|
||||
* \param type_convert_sign: Maps signed to unsigned range,
|
||||
* needed when we want to use the full range of a signed short/char.
|
||||
*/
|
||||
unsigned int *pyrna_enum_bitmap_from_set(const struct EnumPropertyItem *items,
|
||||
unsigned int *pyrna_enum_bitmap_from_set(const EnumPropertyItem *items,
|
||||
PyObject *value,
|
||||
int type_size,
|
||||
bool type_convert_sign,
|
||||
@@ -49,19 +45,19 @@ unsigned int *pyrna_enum_bitmap_from_set(const struct EnumPropertyItem *items,
|
||||
/**
|
||||
* 'value' _must_ be a set type, error check before calling.
|
||||
*/
|
||||
int pyrna_enum_bitfield_from_set(const struct EnumPropertyItem *items,
|
||||
int pyrna_enum_bitfield_from_set(const EnumPropertyItem *items,
|
||||
PyObject *value,
|
||||
int *r_value,
|
||||
const char *error_prefix);
|
||||
|
||||
PyObject *pyrna_enum_bitfield_as_set(const struct EnumPropertyItem *items, int value);
|
||||
PyObject *pyrna_enum_bitfield_as_set(const EnumPropertyItem *items, int value);
|
||||
|
||||
/**
|
||||
* Data for #pyrna_enum_value_parse_string & #pyrna_enum_bitfield_parse_set parsing utilities.
|
||||
* Use with #PyArg_ParseTuple's `O&` formatting.
|
||||
*/
|
||||
struct BPy_EnumProperty_Parse {
|
||||
const struct EnumPropertyItem *items;
|
||||
const EnumPropertyItem *items;
|
||||
/**
|
||||
* Set when the value was successfully parsed.
|
||||
* Useful if the input ever needs to be included in an error message.
|
||||
@@ -80,7 +76,3 @@ int pyrna_enum_value_parse_string(PyObject *o, void *p);
|
||||
* Use with #PyArg_ParseTuple's `O&` formatting.
|
||||
*/
|
||||
int pyrna_enum_bitfield_parse_set(PyObject *o, void *p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
#include "BLI_utildefines.h" /* for bool */
|
||||
|
||||
#include "py_capi_utils.h"
|
||||
#include "py_capi_utils.hh"
|
||||
|
||||
#include "python_utildefines.h"
|
||||
#include "python_utildefines.hh"
|
||||
|
||||
#ifndef MATH_STANDALONE
|
||||
# include "MEM_guardedalloc.h"
|
||||
|
||||
@@ -6,18 +6,15 @@
|
||||
* \ingroup pygen
|
||||
*/
|
||||
|
||||
/* Use a define instead of `#pragma once` because of `bmesh_py_types.h` */
|
||||
#ifndef __PY_CAPI_UTILS_H__
|
||||
#define __PY_CAPI_UTILS_H__
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "BLI_compiler_attrs.h"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_sys_types.h"
|
||||
#include "BLI_utildefines_variadic.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Useful to print Python objects while debugging. */
|
||||
void PyC_ObSpit(const char *name, PyObject *var);
|
||||
/**
|
||||
@@ -25,8 +22,8 @@ void PyC_ObSpit(const char *name, PyObject *var);
|
||||
* Use for logging.
|
||||
*/
|
||||
void PyC_ObSpitStr(char *result, size_t result_maxncpy, PyObject *var);
|
||||
void PyC_LineSpit(void);
|
||||
void PyC_StackSpit(void);
|
||||
void PyC_LineSpit();
|
||||
void PyC_StackSpit();
|
||||
|
||||
/**
|
||||
* Return a string containing the full stack trace.
|
||||
@@ -37,14 +34,14 @@ void PyC_StackSpit(void);
|
||||
* - `SystemExit` exceptions will exit (so `sys.exit(..)` works, matching `PyErr_Print` behavior).
|
||||
* - The always returns a Python string (unless exiting where the function doesn't return).
|
||||
*/
|
||||
PyObject *PyC_ExceptionBuffer(void) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL;
|
||||
PyObject *PyC_ExceptionBuffer() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL;
|
||||
/**
|
||||
* A version of #PyC_ExceptionBuffer that returns the last exception only.
|
||||
*
|
||||
* Useful for error messages from evaluating numeric expressions for e.g.
|
||||
* where a full multi-line stack-trace isn't needed and doesn't format well in the status-bar.
|
||||
*/
|
||||
PyObject *PyC_ExceptionBuffer_Simple(void) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL;
|
||||
PyObject *PyC_ExceptionBuffer_Simple() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL;
|
||||
|
||||
PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...);
|
||||
PyObject *PyC_FrozenSetFromStrings(const char **strings);
|
||||
@@ -145,11 +142,11 @@ const char *PyC_UnicodeAsBytesAndSize(PyObject *py_str, Py_ssize_t *r_size, PyOb
|
||||
* - Always `Py_XDECREF(value_coerce)` before returning,
|
||||
* after this `value` must not be accessed.
|
||||
*/
|
||||
typedef struct PyC_UnicodeAsBytesAndSize_Data {
|
||||
struct PyC_UnicodeAsBytesAndSize_Data {
|
||||
PyObject *value_coerce;
|
||||
const char *value;
|
||||
Py_ssize_t value_len;
|
||||
} PyC_UnicodeAsBytesAndSize_Data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Use with PyArg_ParseTuple's "O&" formatting.
|
||||
@@ -195,7 +192,7 @@ bool PyC_NameSpace_ImportArray(PyObject *py_dict, const char *imports[]);
|
||||
PyObject *PyC_MainModule_Backup() ATTR_WARN_UNUSED_RESULT;
|
||||
void PyC_MainModule_Restore(PyObject *main_mod);
|
||||
|
||||
bool PyC_IsInterpreterActive(void);
|
||||
bool PyC_IsInterpreterActive();
|
||||
|
||||
/**
|
||||
* Generic function to avoid depending on RNA.
|
||||
@@ -203,10 +200,10 @@ bool PyC_IsInterpreterActive(void);
|
||||
void *PyC_RNA_AsPointer(PyObject *value, const char *type_name);
|
||||
|
||||
/* flag / set --- interchange */
|
||||
typedef struct PyC_FlagSet {
|
||||
struct PyC_FlagSet {
|
||||
int value;
|
||||
const char *identifier;
|
||||
} PyC_FlagSet;
|
||||
};
|
||||
|
||||
PyObject *PyC_FlagSet_AsString(const PyC_FlagSet *item);
|
||||
int PyC_FlagSet_ValueFromID_int(const PyC_FlagSet *item, const char *identifier, int *r_value);
|
||||
@@ -356,15 +353,6 @@ bool PyC_StructFmt_type_is_int_any(char format);
|
||||
bool PyC_StructFmt_type_is_byte(char format);
|
||||
bool PyC_StructFmt_type_is_bool(char format);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include "BLI_span.hh"
|
||||
|
||||
# include <string>
|
||||
|
||||
/**
|
||||
* Create a `str` from `std::string`, wraps #PyC_UnicodeFromBytesAndSize.
|
||||
*/
|
||||
@@ -390,20 +378,3 @@ inline PyObject *PyC_Tuple_Pack_Bool(const blender::Span<bool> values)
|
||||
{
|
||||
return PyC_Tuple_PackArray_Bool(values.data(), values.size());
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
# define PyC_Tuple_Pack_F32(...) \
|
||||
PyC_Tuple_PackArray_F32(((const float[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
|
||||
# define PyC_Tuple_Pack_F64(...) \
|
||||
PyC_Tuple_PackArray_F64(((const double[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
|
||||
# define PyC_Tuple_Pack_I32(...) \
|
||||
PyC_Tuple_PackArray_I32(((const int[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
|
||||
# define PyC_Tuple_Pack_I32FromBool(...) \
|
||||
PyC_Tuple_PackArray_I32FromBool(((const int[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
|
||||
# define PyC_Tuple_Pack_Bool(...) \
|
||||
PyC_Tuple_PackArray_Bool(((const bool[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __PY_CAPI_UTILS_H__ */
|
||||
@@ -9,17 +9,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Add `intialized` member for Python 3.12+. */
|
||||
#if PY_VERSION_HEX >= 0x030c0000
|
||||
# define PY_ARG_PARSER_HEAD_COMPAT() 0,
|
||||
#else
|
||||
# define PY_ARG_PARSER_HEAD_COMPAT()
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -5,15 +5,11 @@
|
||||
/** \file
|
||||
* \ingroup pygen
|
||||
* \brief header-only utilities
|
||||
* \note light addition to Python.h, use py_capi_utils.h for larger features.
|
||||
* \note light addition to Python.h, use py_capi_utils.hh for larger features.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PyTuple_SET_ITEMS(op_arg, ...) \
|
||||
{ \
|
||||
PyTupleObject *op = (PyTupleObject *)op_arg; \
|
||||
@@ -44,7 +40,3 @@ Py_LOCAL_INLINE(int) PyList_APPEND(PyObject *op, PyObject *v)
|
||||
Py_DecRef(v);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "GPU_primitive.hh"
|
||||
#include "GPU_texture.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "gpu_py.hh" /* own include */
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
extern struct PyC_StringEnumItems bpygpu_primtype_items[];
|
||||
extern struct PyC_StringEnumItems bpygpu_dataformat_items[];
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
#include "GPU_batch.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_element.hh"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "GPU_texture.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "GPU_compute.hh"
|
||||
#include "GPU_state.hh"
|
||||
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_compute.hh" /* own include */
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_element.hh" /* own include */
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
#include "GPU_framebuffer.hh"
|
||||
#include "GPU_init_exit.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "../mathutils/mathutils.hh"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "../mathutils/mathutils.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#define USE_GPU_PY_MATRIX_API
|
||||
#include "GPU_matrix.hh"
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
#include "../mathutils/mathutils.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_texture.hh"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "GPU_select.hh"
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#include "GPU_texture.hh"
|
||||
#include "GPU_uniform_buffer.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "../mathutils/mathutils.hh"
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __cplusplus
|
||||
# include "../generic/py_capi_utils.h"
|
||||
# include "../generic/py_capi_utils.hh"
|
||||
#endif
|
||||
|
||||
struct GPUShaderCreateInfo;
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include "GPU_shader.hh"
|
||||
#include "intern/gpu_shader_create_info.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_shader.hh" /* own include */
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include "GPU_framebuffer.hh"
|
||||
#include "GPU_state.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_framebuffer.hh"
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#include "BKE_image.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_buffer.hh"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "GPU_context.hh"
|
||||
#include "GPU_uniform_buffer.hh"
|
||||
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_uniformbuffer.hh" /* own include */
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_vertex_buffer.hh" /* own include */
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "gpu_py.hh"
|
||||
#include "gpu_py_vertex_format.hh" /* own include */
|
||||
|
||||
@@ -87,7 +87,7 @@ set(SRC
|
||||
bpy_app_timers.hh
|
||||
bpy_app_translations.hh
|
||||
bpy_app_usd.hh
|
||||
bpy_capi_utils.h
|
||||
bpy_capi_utils.hh
|
||||
bpy_cli_command.hh
|
||||
bpy_driver.hh
|
||||
bpy_gizmo_wrap.hh
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
#include "bpy_utils_previews.hh"
|
||||
#include "bpy_utils_units.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
/* external util modules */
|
||||
#include "../generic/idprop_py_api.h"
|
||||
#include "../generic/idprop_py_ui_api.h"
|
||||
#include "../generic/idprop_py_api.hh"
|
||||
#include "../generic/idprop_py_ui_api.hh"
|
||||
#include "bpy_msgbus.hh"
|
||||
|
||||
#ifdef WITH_FREESTYLE
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
#include "WM_api.hh"
|
||||
#include "WM_types.hh"
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_rna.hh"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#ifdef BUILD_DATE
|
||||
extern "C" char build_date[];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_alembic.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef WITH_ALEMBIC
|
||||
# include "ABC_alembic.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_ffmpeg.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef WITH_FFMPEG
|
||||
extern "C" {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "bpy_app_handlers.hh"
|
||||
#include "bpy_rna.hh"
|
||||
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "BPY_extern.h"
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include "BKE_icons.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "bpy_app_icons.hh"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_ocio.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef WITH_OCIO
|
||||
# include "ocio_capi.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_oiio.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "openimageio_api.h"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_opensubdiv.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef WITH_OPENSUBDIV
|
||||
# include "opensubdiv_capi.hh"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_openvdb.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef WITH_OPENVDB
|
||||
# include "openvdb_capi.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_sdl.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef WITH_SDL
|
||||
/* SDL force defines __SSE__ and __SSE2__ flags, which generates warnings
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "bpy_app_timers.hh"
|
||||
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
static double handle_returned_value(PyObject *function, PyObject *ret)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "RNA_types.hh"
|
||||
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
# include "BLI_ghash.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "bpy_app_usd.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifdef WITH_USD
|
||||
# include "usd.hh"
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BKE_report.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
short BPy_reports_to_error(ReportList *reports, PyObject *exception, const bool clear)
|
||||
{
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BKE_blender_cli_command.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "bpy_cli_command.hh" /* Own include. */
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#include "bpy_intern_string.hh"
|
||||
#include "bpy_rna.hh"
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_rna.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
/* we may want to add, but not now */
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "RNA_types.hh"
|
||||
|
||||
#include "bpy.hh"
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_intern_string.hh"
|
||||
#include "bpy_path.hh"
|
||||
#include "bpy_props.hh"
|
||||
@@ -59,15 +59,15 @@
|
||||
#include "BPY_extern_python.h"
|
||||
#include "BPY_extern_run.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
/* `inittab` initialization functions. */
|
||||
#include "../bmesh/bmesh_py_api.h"
|
||||
#include "../generic/bgl.h"
|
||||
#include "../generic/bl_math_py_api.h"
|
||||
#include "../generic/blf_py_api.h"
|
||||
#include "../generic/idprop_py_api.h"
|
||||
#include "../generic/imbuf_py_api.h"
|
||||
#include "../generic/bl_math_py_api.hh"
|
||||
#include "../generic/blf_py_api.hh"
|
||||
#include "../generic/idprop_py_api.hh"
|
||||
#include "../generic/imbuf_py_api.hh"
|
||||
#include "../gpu/gpu_py_api.hh"
|
||||
#include "../mathutils/mathutils.hh"
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bpy.hh" /* own include */
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
|
||||
#include "WM_api.hh"
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
#include "BPY_extern_run.h"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_intern_string.hh"
|
||||
#include "bpy_traceback.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Private Utilities
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_library.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
/* nifty feature. swap out strings for RNA data */
|
||||
#define USE_RNA_DATABLOCKS
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
#include "RNA_types.hh"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_library.hh" /* Declaration for #BPY_library_load_method_def */
|
||||
#include "bpy_rna.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
using namespace blender::bke::blendfile;
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_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 "../mathutils/mathutils.hh"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "RNA_access.hh"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_rna.hh"
|
||||
|
||||
#include "bpy_msgbus.hh" /* own include */
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_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.h"
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_operator.hh"
|
||||
#include "bpy_operator_wrap.hh"
|
||||
#include "bpy_rna.hh" /* for setting argument properties & type method `get_rna_type`. */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "bpy_path.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
/* #include "IMB_imbuf_types.hh" */
|
||||
extern const char *imb_ext_image[];
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_props.hh"
|
||||
#include "bpy_rna.hh"
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
#include "DNA_ID.h" /* MAX_IDPROP_NAME */
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_rna.hh"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
using blender::Array;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "BPY_extern.h"
|
||||
#include "BPY_extern_clog.h"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_intern_string.hh"
|
||||
#include "bpy_props.hh"
|
||||
#include "bpy_rna.hh"
|
||||
@@ -62,12 +62,12 @@
|
||||
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
#include "../generic/idprop_py_api.h" /* For IDprop lookups. */
|
||||
#include "../generic/idprop_py_ui_api.h"
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/idprop_py_api.hh" /* For IDprop lookups. */
|
||||
#include "../generic/idprop_py_ui_api.hh"
|
||||
#include "../generic/py_capi_rna.hh"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#define USE_PEDANTIC_WRITE
|
||||
#define USE_MATHUTILS
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
#include "WM_api.hh"
|
||||
#include "WM_types.hh"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_rna.hh"
|
||||
#include "bpy_rna_anim.hh"
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_rna.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "BPY_extern_clog.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#define USE_MATHUTILS
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_rna.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "DNA_space_types.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "BPY_extern.h" /* For public API. */
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_rna.hh"
|
||||
#include "bpy_rna_callback.hh" /* Own include. */
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "bpy_rna_context.hh"
|
||||
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_prototypes.hh"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include <Python.h>
|
||||
#include <cstddef>
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
#include "WM_types.hh"
|
||||
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
#include "bpy_rna_gizmo.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_prototypes.hh"
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
#include "bpy_rna_id_collection.hh"
|
||||
|
||||
#include "../generic/py_capi_rna.h"
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_rna.hh"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "RNA_enum_types.hh"
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
#include "BKE_context.hh"
|
||||
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "BPY_extern.h"
|
||||
#include "bpy_capi_utils.h"
|
||||
#include "bpy_capi_utils.hh"
|
||||
|
||||
#include "bpy_rna_operator.hh" /* Own include, #BPY_rna_operator_poll_message_set_method_def. */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "BKE_text.h"
|
||||
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "bpy_rna.hh"
|
||||
#include "bpy_rna_text.hh" /* Declare #BPY_rna_region_as_string_method_def. */
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "bpy_rna_operator.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "RNA_prototypes.hh"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "UI_interface.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "bpy_rna.hh"
|
||||
#include "bpy_utils_previews.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
#include "bpy_utils_units.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_compat.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_compat.hh"
|
||||
|
||||
#include "BKE_unit.hh"
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#ifndef MATH_STANDALONE
|
||||
# include "BLI_dynstr.h"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#ifndef MATH_STANDALONE
|
||||
# include "IMB_colormanagement.hh"
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
#include "mathutils.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#ifndef MATH_STANDALONE
|
||||
# include "BLI_dynstr.h"
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#ifndef MATH_STANDALONE
|
||||
# include "BLI_dynstr.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#ifndef MATH_STANDALONE
|
||||
# include "BLI_dynstr.h"
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
#include "BKE_bvhutils.hh"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "mathutils.hh"
|
||||
#include "mathutils_bvhtree.hh" /* own include */
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
/*-------------------------DOC STRINGS ---------------------------*/
|
||||
PyDoc_STRVAR(
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include "BLI_kdtree.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/python_utildefines.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "../generic/python_utildefines.hh"
|
||||
|
||||
#include "mathutils.hh"
|
||||
#include "mathutils_kdtree.hh" /* own include */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "DNA_texture_types.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
|
||||
#include "mathutils.hh"
|
||||
#include "mathutils_noise.hh"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "RE_engine.h"
|
||||
|
||||
#include "../generic/py_capi_utils.h"
|
||||
#include "../generic/py_capi_utils.hh"
|
||||
#include "bpy_rna.hh"
|
||||
|
||||
#include "BKE_context.hh"
|
||||
|
||||
Reference in New Issue
Block a user