Blender V2.61 - r43446
|
#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_py_api.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)) |
static int | bpy_blend_paths_visit_cb (void *userdata, char *UNUSED(path_dst), const char *path_src) |
PyDoc_STRVAR (bpy_blend_paths_doc,".. function:: blend_paths(absolute=False, packed=False, local=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"" :arg packed: When true skip file paths for packed data.\n"" :type packed: boolean\n"" :arg local: When true skip linked library paths.\n"" :type local: 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 |
static PyMethodDef | meth_bpy_blend_paths |
static PyMethodDef | meth_bpy_user_resource |
static PyMethodDef | meth_bpy_resource_path |
This file defines the '_bpy' module which is used by python's 'bpy' package to access C defined builtin functions. A script writer should never directly access this module.
Definition in file bpy.c.
static PyObject* bpy_blend_paths | ( | PyObject * | UNUSEDself, |
PyObject * | args, | ||
PyObject * | kw | ||
) | [static] |
Definition at line 107 of file bpy.c.
References BPATH_TRAVERSE_ABS, bpath_traverse_main(), BPATH_TRAVERSE_SKIP_LIBRARY, BPATH_TRAVERSE_SKIP_PACKED, bpy_blend_paths_visit_cb(), FALSE, G, and NULL.
static int bpy_blend_paths_visit_cb | ( | void * | userdata, |
char * | UNUSEDpath_dst, | ||
const char * | path_src | ||
) | [static] |
static PyObject* bpy_import_test | ( | const char * | modname | ) | [static] |
void BPy_init_modules | ( | void | ) |
Definition at line 233 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, mod(), 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 181 of file bpy.c.
References BLENDER_RESOURCE_PATH_LOCAL, BLENDER_RESOURCE_PATH_SYSTEM, BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION, BLI_get_folder_version(), FALSE, and NULL.
static PyObject* bpy_script_paths | ( | PyObject * | UNUSEDself | ) | [static] |
Definition at line 71 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 136 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(), and NULL.
PyDoc_STRVAR | ( | bpy_blend_paths_doc | , |
".. function:: blend_paths(absolute=False, packed=False, local=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"" :arg packed: When true skip file paths for packed data.\n"" :type packed: boolean\n"" :arg local: When true skip linked library paths.\n"" :type local: boolean\n"" :return: path list.\n"" :rtype: list of strings\n" | |||
) |
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_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 61 of file bpy.c.
Referenced by BPy_init_modules().
PyMethodDef meth_bpy_blend_paths [static] |
{"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc}
PyMethodDef meth_bpy_resource_path [static] |
{"resource_path", (PyCFunction)bpy_resource_path, METH_VARARGS|METH_KEYWORDS, bpy_resource_path_doc}
PyMethodDef meth_bpy_script_paths [static] |
{"script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc}
PyMethodDef meth_bpy_user_resource [static] |
{"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, NULL}