Blender V4.3
bpy_path.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11#include <Python.h>
12
13#include "BLI_utildefines.h"
14
15#include "bpy_path.hh"
16
18
19/* #include "IMB_imbuf_types.hh" */
20extern const char *imb_ext_image[];
21extern const char *imb_ext_movie[];
22extern const char *imb_ext_audio[];
23
24/*----------------------------MODULE INIT-------------------------*/
25static PyModuleDef _bpy_path_module_def = {
26 /*m_base*/ PyModuleDef_HEAD_INIT,
27 /*m_name*/ "_bpy_path",
28 /*m_doc*/ nullptr,
29 /*m_size*/ 0,
30 /*m_methods*/ nullptr,
31 /*m_slots*/ nullptr,
32 /*m_traverse*/ nullptr,
33 /*m_clear*/ nullptr,
34 /*m_free*/ nullptr,
35};
36
38{
39 PyObject *submodule;
40
41 submodule = PyModule_Create(&_bpy_path_module_def);
42
43 PyModule_AddObject(submodule, "extensions_image", PyC_FrozenSetFromStrings(imb_ext_image));
44 PyModule_AddObject(submodule, "extensions_movie", PyC_FrozenSetFromStrings(imb_ext_movie));
45 PyModule_AddObject(submodule, "extensions_audio", PyC_FrozenSetFromStrings(imb_ext_audio));
46
47 return submodule;
48}
PyObject * BPyInit__bpy_path()
Definition bpy_path.cc:37
static PyModuleDef _bpy_path_module_def
Definition bpy_path.cc:25
const char * imb_ext_movie[]
const char * imb_ext_audio[]
const char * imb_ext_image[]
PyObject * PyC_FrozenSetFromStrings(const char **strings)