Blender  V2.93
bpy_path.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
23 #include <Python.h>
24 
25 #include "BLI_utildefines.h"
26 
27 #include "bpy_path.h"
28 
29 #include "../generic/py_capi_utils.h"
30 
31 /* #include "IMB_imbuf_types.h" */
32 extern const char *imb_ext_image[];
33 extern const char *imb_ext_movie[];
34 extern const char *imb_ext_audio[];
35 
36 /*----------------------------MODULE INIT-------------------------*/
37 static struct PyModuleDef _bpy_path_module_def = {
38  PyModuleDef_HEAD_INIT,
39  "_bpy_path", /* m_name */
40  NULL, /* m_doc */
41  0, /* m_size */
42  NULL, /* m_methods */
43  NULL, /* m_reload */
44  NULL, /* m_traverse */
45  NULL, /* m_clear */
46  NULL, /* m_free */
47 };
48 
49 PyObject *BPyInit__bpy_path(void)
50 {
51  PyObject *submodule;
52 
53  submodule = PyModule_Create(&_bpy_path_module_def);
54 
55  PyModule_AddObject(submodule, "extensions_image", PyC_FrozenSetFromStrings(imb_ext_image));
56  PyModule_AddObject(submodule, "extensions_movie", PyC_FrozenSetFromStrings(imb_ext_movie));
57  PyModule_AddObject(submodule, "extensions_audio", PyC_FrozenSetFromStrings(imb_ext_audio));
58 
59  return submodule;
60 }
const char * imb_ext_movie[]
Definition: util.c:95
static struct PyModuleDef _bpy_path_module_def
Definition: bpy_path.c:37
const char * imb_ext_audio[]
Definition: util.c:102
PyObject * BPyInit__bpy_path(void)
Definition: bpy_path.c:49
const char * imb_ext_image[]
Definition: util.c:60
PyObject * PyC_FrozenSetFromStrings(const char **strings)