|
Blender
V2.59
|
#include <Python.h>#include "bpy.h"#include "bpy_util.h"#include "bpy_rna.h"#include "bpy_app.h"#include "bpy_props.h"#include "bpy_operator.h"#include "BLI_path_util.h"#include "BLI_string.h"#include "BLI_bpath.h"#include "BLI_utildefines.h"#include "BKE_main.h"#include "BKE_global.h"#include "BKE_blender.h"#include "RNA_access.h"#include "MEM_guardedalloc.h"#include "../generic/IDProp.h"#include "../generic/bgl.h"#include "../generic/blf_py_api.h"#include "../mathutils/mathutils.h"Go to the source code of this file.
Defines | |
| #define | WITH_PYTHON |
Functions | |
| PyDoc_STRVAR (bpy_script_paths_doc,".. function:: script_paths()\n""\n"" Return 2 paths to blender scripts directories.\n""\n"" :return: (system, user) strings will be empty when not found.\n"" :rtype: tuple of strings\n") | |
| static PyObject * | bpy_script_paths (PyObject *UNUSED(self)) |
| PyDoc_STRVAR (bpy_blend_paths_doc,".. function:: blend_paths(absolute=False)\n""\n"" Returns a list of paths to external files referenced by the loaded .blend file.\n""\n"" :arg absolute: When true the paths returned are made absolute.\n"" :type absolute: boolean\n"" :return: path list.\n"" :rtype: list of strings\n") | |
| static PyObject * | bpy_blend_paths (PyObject *UNUSED(self), PyObject *args, PyObject *kw) |
| static PyObject * | bpy_user_resource (PyObject *UNUSED(self), PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (bpy_resource_path_doc,".. function:: resource_path(type, major=2, minor=57)\n""\n"" Return the base path for storing system files.\n""\n"" :arg type: string in ['USER', 'LOCAL', 'SYSTEM'].\n"" :type type: string\n"" :arg major: major version, defaults to current.\n"" :type major: int\n"" :arg minor: minor version, defaults to current.\n"" :type minor: string\n"" :return: the resource path (not necessarily existing).\n"" :rtype: string\n") | |
| static PyObject * | bpy_resource_path (PyObject *UNUSED(self), PyObject *args, PyObject *kw) |
| static PyObject * | bpy_import_test (const char *modname) |
| void | BPy_init_modules (void) |
Variables | |
| PyObject * | bpy_package_py = NULL |
| static PyMethodDef | meth_bpy_script_paths = {"script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc} |
| static PyMethodDef | meth_bpy_blend_paths = {"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc} |
| static PyMethodDef | meth_bpy_user_resource = {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, NULL} |
| static PyMethodDef | meth_bpy_resource_path = {"resource_path", (PyCFunction)bpy_resource_path, METH_VARARGS|METH_KEYWORDS, bpy_resource_path_doc} |
Definition in file bpy.c.
| static PyObject* bpy_blend_paths | ( | PyObject * | UNUSEDself, |
| PyObject * | args, | ||
| PyObject * | kw | ||
| ) | [static] |
Definition at line 96 of file bpy.c.
References BLI_bpathIterator_free(), BLI_bpathIterator_getBasePath(), BLI_bpathIterator_getLib(), BLI_bpathIterator_getPath(), BLI_bpathIterator_getPathExpanded(), BLI_bpathIterator_init(), BLI_bpathIterator_isDone(), BLI_bpathIterator_step(), BLI_path_cmp, G, Global::main, Main::name, and NULL.
| static PyObject* bpy_import_test | ( | const char * | modname | ) | [static] |
| void BPy_init_modules | ( | void | ) |
Definition at line 232 of file bpy.c.
References BLENDER_SYSTEM_SCRIPTS, BLI_get_folder(), BPY_app_struct(), bpy_context_module, BPy_GetContext(), bpy_import_test(), bpy_lib_init(), BPY_operator_module(), bpy_package_py, BPY_rna_init(), BPY_rna_module(), BPY_rna_props(), BPY_rna_types(), IDProp_Init_Types(), meth_bpy_register_class, meth_bpy_unregister_class, NULL, pyrna_struct_CreatePyObject(), pyrna_struct_meta_idprop_Type, RNA_Context, and RNA_pointer_create().
Referenced by BPY_python_start().
| static PyObject* bpy_resource_path | ( | PyObject * | UNUSEDself, |
| PyObject * | args, | ||
| PyObject * | kw | ||
| ) | [static] |
Definition at line 184 of file bpy.c.
References BLENDER_RESOURCE_PATH_LOCAL, BLENDER_RESOURCE_PATH_SYSTEM, BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION, BLI_get_folder_version(), FALSE, NULL, and BPathIterator::type.
| static PyObject* bpy_script_paths | ( | PyObject * | UNUSEDself | ) | [static] |
Definition at line 73 of file bpy.c.
References BLENDER_SYSTEM_SCRIPTS, BLENDER_USER_SCRIPTS, BLI_get_folder(), and NULL.
| static PyObject* bpy_user_resource | ( | PyObject * | UNUSEDself, |
| PyObject * | args, | ||
| PyObject * | kw | ||
| ) | [static] |
Definition at line 139 of file bpy.c.
References BLENDER_USER_AUTOSAVE, BLENDER_USER_CONFIG, BLENDER_USER_DATAFILES, BLENDER_USER_SCRIPTS, BLI_get_folder(), BLI_get_user_folder_notest(), NULL, and BPathIterator::type.
| PyDoc_STRVAR | ( | bpy_script_paths_doc | , |
| ".. function:: script_paths()\n""\n"" Return 2 paths to blender scripts directories.\n""\n"" :return: (system, user) strings will be empty when not found.\n"" :rtype: tuple of strings\n" | |||
| ) |
| PyDoc_STRVAR | ( | bpy_blend_paths_doc | , |
| ".. function:: blend_paths(absolute=False)\n""\n"" Returns a list of paths to external files referenced by the loaded .blend file.\n""\n"" :arg absolute: When true the paths returned are made absolute.\n"" :type absolute: boolean\n"" :return: path list.\n"" :rtype: list of strings\n" | |||
| ) |
| PyDoc_STRVAR | ( | bpy_resource_path_doc | , |
| ".. function:: resource_path(type, major=2, minor=57)\n""\n"" Return the base path for storing system files.\n""\n"" :arg type: string in .\n"" :type type: string\n"" :arg major: major | version['USER', 'LOCAL', 'SYSTEM'], | ||
| defaults to current.\n"":type major:int\n"":arg minor:minor | version, | ||
| defaults to current.\n"":type minor:string\n"":return:the resource path(not necessarily existing).\n"":rtype:string\n" | |||
| ) |
| PyObject* bpy_package_py = NULL |
Definition at line 63 of file bpy.c.
Referenced by BPy_init_modules().
PyMethodDef meth_bpy_blend_paths = {"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc} [static] |
PyMethodDef meth_bpy_resource_path = {"resource_path", (PyCFunction)bpy_resource_path, METH_VARARGS|METH_KEYWORDS, bpy_resource_path_doc} [static] |
PyMethodDef meth_bpy_script_paths = {"script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc} [static] |
PyMethodDef meth_bpy_user_resource = {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, NULL} [static] |