2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2013-01-04 07:58:47 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup pythonintern
|
2013-01-04 07:58:47 +00:00
|
|
|
*
|
2018-09-19 17:48:11 +02:00
|
|
|
* This file defines '_bpy_path' module, Some 'C' functionality used by 'bpy.path'
|
2013-01-04 07:58:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <Python.h>
|
|
|
|
|
|
2024-09-24 12:23:25 +02:00
|
|
|
#include "bpy_path.hh"
|
2013-01-04 07:58:47 +00:00
|
|
|
|
2024-09-24 15:25:36 +02:00
|
|
|
#include "../generic/py_capi_utils.hh"
|
2013-01-04 07:58:47 +00:00
|
|
|
|
2024-01-18 22:50:23 +02:00
|
|
|
/* #include "IMB_imbuf_types.hh" */
|
2024-01-19 13:48:04 +02:00
|
|
|
extern const char *imb_ext_image[];
|
|
|
|
|
extern const char *imb_ext_movie[];
|
|
|
|
|
extern const char *imb_ext_audio[];
|
2013-01-04 07:58:47 +00:00
|
|
|
|
|
|
|
|
/*----------------------------MODULE INIT-------------------------*/
|
2023-06-03 08:36:28 +10:00
|
|
|
static PyModuleDef _bpy_path_module_def = {
|
2023-07-16 17:43:31 +10:00
|
|
|
/*m_base*/ PyModuleDef_HEAD_INIT,
|
2022-11-08 11:13:58 +11:00
|
|
|
/*m_name*/ "_bpy_path",
|
2023-07-21 02:18:59 +02:00
|
|
|
/*m_doc*/ nullptr,
|
2022-11-08 11:13:58 +11:00
|
|
|
/*m_size*/ 0,
|
2023-07-21 02:18:59 +02:00
|
|
|
/*m_methods*/ nullptr,
|
|
|
|
|
/*m_slots*/ nullptr,
|
|
|
|
|
/*m_traverse*/ nullptr,
|
|
|
|
|
/*m_clear*/ nullptr,
|
|
|
|
|
/*m_free*/ nullptr,
|
2013-01-04 07:58:47 +00:00
|
|
|
};
|
|
|
|
|
|
2023-07-21 10:59:54 +10:00
|
|
|
PyObject *BPyInit__bpy_path()
|
2013-01-04 07:58:47 +00:00
|
|
|
{
|
|
|
|
|
PyObject *submodule;
|
|
|
|
|
|
|
|
|
|
submodule = PyModule_Create(&_bpy_path_module_def);
|
|
|
|
|
|
|
|
|
|
PyModule_AddObject(submodule, "extensions_image", PyC_FrozenSetFromStrings(imb_ext_image));
|
|
|
|
|
PyModule_AddObject(submodule, "extensions_movie", PyC_FrozenSetFromStrings(imb_ext_movie));
|
|
|
|
|
PyModule_AddObject(submodule, "extensions_audio", PyC_FrozenSetFromStrings(imb_ext_audio));
|
|
|
|
|
|
|
|
|
|
return submodule;
|
|
|
|
|
}
|