diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-06-11 04:22:10 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-06-11 04:22:10 +0400 |
commit | 32c7e22d3696e3575f4b7d05c1f7140591e88809 (patch) | |
tree | 44d501cb62aebd638a7f7b5d0306ecc03e0deb5f /source/blender/python/intern/bpy.c | |
parent | dfcd01553536d63dab1037d0ea289b9d9d90c39c (diff) | |
parent | 6fb82a85c9a48c9fad6cb7b42994a9cd7b2b491a (diff) |
Merged changes in the trunk up to revision 37388.
Conflicts resolved:
release/scripts/startup/bl_ui/properties_render.py
source/creator/SConscript
source/blender/blenlib/intern/bpath.c
source/blender/editors/space_outliner/outliner.c
Diffstat (limited to 'source/blender/python/intern/bpy.c')
-rw-r--r-- | source/blender/python/intern/bpy.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index e43d3a8e98c..ce548af3780 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -66,28 +66,28 @@ PyObject *bpy_package_py= NULL; -static char bpy_script_paths_doc[] = +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)) { PyObject *ret= PyTuple_New(2); char *path; - path= BLI_get_folder(BLENDER_USER_SCRIPTS, NULL); - PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:"")); path= BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, NULL); + PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:"")); + path= BLI_get_folder(BLENDER_USER_SCRIPTS, NULL); PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:"")); return ret; } -static char bpy_blend_paths_doc[] = +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" @@ -96,7 +96,7 @@ static char bpy_blend_paths_doc[] = " :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) { struct BPathIterator *bpi; @@ -139,7 +139,7 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec } -// static char bpy_user_resource_doc[]= // now in bpy/utils.py +// PyDoc_STRVAR(bpy_user_resource_doc[]= // now in bpy/utils.py static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObject *kw) { char *type; @@ -171,7 +171,7 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj return PyUnicode_DecodeFSDefault(path ? path : ""); } -static char bpy_resource_path_doc[] = +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" @@ -184,7 +184,7 @@ static char bpy_resource_path_doc[] = " :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) { char *type; @@ -233,7 +233,7 @@ static PyObject *bpy_import_test(const char *modname) /***************************************************************************** * Description: Creates the bpy module and adds it to sys.modules for importing *****************************************************************************/ -void BPy_init_modules( void ) +void BPy_init_modules(void) { extern BPy_StructRNA *bpy_context_module; extern int bpy_lib_init(PyObject *); @@ -241,7 +241,7 @@ void BPy_init_modules( void ) PyObject *mod; /* Needs to be first since this dir is needed for future modules */ - char *modpath= BLI_get_folder(BLENDER_SCRIPTS, "modules"); + char *modpath= BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, "modules"); if(modpath) { // printf("bpy: found module path '%s'.\n", modpath); PyObject *sys_path= PySys_GetObject("path"); /* borrow */ @@ -265,17 +265,17 @@ void BPy_init_modules( void ) /* run first, initializes rna types */ BPY_rna_init(); - PyModule_AddObject( mod, "types", BPY_rna_types() ); /* needs to be first so bpy_types can run */ + PyModule_AddObject(mod, "types", BPY_rna_types()); /* needs to be first so bpy_types can run */ PyModule_AddObject(mod, "StructMetaPropGroup", (PyObject *)&pyrna_struct_meta_idprop_Type); /* metaclass for idprop types, bpy_types.py needs access */ bpy_lib_init(mod); /* adds '_bpy._library_load', must be called before 'bpy_types' which uses it */ bpy_import_test("bpy_types"); - PyModule_AddObject( mod, "data", BPY_rna_module() ); /* imports bpy_types by running this */ + PyModule_AddObject(mod, "data", BPY_rna_module()); /* imports bpy_types by running this */ bpy_import_test("bpy_types"); - PyModule_AddObject( mod, "props", BPY_rna_props() ); - PyModule_AddObject( mod, "ops", BPY_operator_module() ); /* ops is now a python module that does the conversion from SOME_OT_foo -> some.foo */ - PyModule_AddObject( mod, "app", BPY_app_struct() ); + PyModule_AddObject(mod, "props", BPY_rna_props()); + PyModule_AddObject(mod, "ops", BPY_operator_module()); /* ops is now a python module that does the conversion from SOME_OT_foo -> some.foo */ + PyModule_AddObject(mod, "app", BPY_app_struct()); /* bpy context */ RNA_pointer_create(NULL, &RNA_Context, (void *)BPy_GetContext(), &ctx_ptr); |