Merging r50602 through r50617 form trunk into soc-2011-tomato
This commit is contained in:
@@ -42,6 +42,8 @@
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "bmesh_py_ops.h" /* own include */
|
||||
|
||||
#include "bmesh_py_types.h"
|
||||
|
||||
#include "bmesh_py_utils.h" /* own include */
|
||||
@@ -69,7 +71,7 @@ typedef struct {
|
||||
const char *opname;
|
||||
} BPy_BMeshOpFunc;
|
||||
|
||||
PyObject *bpy_bmesh_op_CreatePyObject(const char *opname)
|
||||
static PyObject *bpy_bmesh_op_CreatePyObject(const char *opname)
|
||||
{
|
||||
BPy_BMeshOpFunc *self = PyObject_New(BPy_BMeshOpFunc, &bmesh_op_Type);
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ set(SRC
|
||||
bpy_app_handlers.h
|
||||
bpy_driver.h
|
||||
bpy_intern_string.h
|
||||
bpy_library.h
|
||||
bpy_operator.h
|
||||
bpy_operator_wrap.h
|
||||
bpy_props.h
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "bpy_rna.h"
|
||||
#include "bpy_app.h"
|
||||
#include "bpy_props.h"
|
||||
#include "bpy_library.h"
|
||||
#include "bpy_operator.h"
|
||||
|
||||
#include "BLI_path_util.h"
|
||||
@@ -238,7 +239,6 @@ static PyObject *bpy_import_test(const char *modname)
|
||||
void BPy_init_modules(void)
|
||||
{
|
||||
extern BPy_StructRNA *bpy_context_module;
|
||||
extern int bpy_lib_init(PyObject *);
|
||||
PointerRNA ctx_ptr;
|
||||
PyObject *mod;
|
||||
|
||||
@@ -273,7 +273,7 @@ void BPy_init_modules(void)
|
||||
PyModule_AddObject(mod, "StructMetaPropGroup", (PyObject *)&pyrna_struct_meta_idprop_Type);
|
||||
|
||||
/* needs to be first so bpy_types can run */
|
||||
bpy_lib_init(mod);
|
||||
BPY_library_module(mod);
|
||||
|
||||
bpy_import_test("bpy_types");
|
||||
PyModule_AddObject(mod, "data", BPY_rna_module()); /* imports bpy_types by running this */
|
||||
|
||||
@@ -23,10 +23,13 @@
|
||||
* \ingroup pythonintern
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __BPY_H__
|
||||
|
||||
void BPy_init_modules(void);
|
||||
extern PyObject *bpy_package_py;
|
||||
|
||||
/* bpy_interface_atexit.c */
|
||||
void BPY_atexit_register(void);
|
||||
void BPY_atexit_unregister(void);
|
||||
|
||||
#endif /* __BPY_H__ */
|
||||
|
||||
@@ -26,11 +26,8 @@
|
||||
|
||||
#include <Python.h>
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_callbacks.h"
|
||||
|
||||
#include "RNA_types.h"
|
||||
#include "RNA_access.h"
|
||||
#include "bpy_rna.h"
|
||||
#include "bpy_app_ffmpeg.h"
|
||||
|
||||
#ifdef WITH_FFMPEG
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "bpy_rna.h"
|
||||
#include "bpy_app_handlers.h"
|
||||
|
||||
#include "BPY_extern.h"
|
||||
|
||||
void bpy_app_generic_callback(struct Main *main, struct ID *id, void *arg);
|
||||
|
||||
static PyTypeObject BlenderAppCbType;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_util.h"
|
||||
#include "bpy.h" /* own include */
|
||||
|
||||
#include "WM_api.h"
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "DNA_space_types.h" /* FILE_LINK, FILE_RELPATH */
|
||||
|
||||
#include "bpy_util.h"
|
||||
#include "bpy_library.h"
|
||||
|
||||
#ifdef USE_RNA_DATABLOCKS
|
||||
# include "bpy_rna.h"
|
||||
@@ -426,7 +427,7 @@ static PyObject *bpy_lib_dir(BPy_Library *self)
|
||||
}
|
||||
|
||||
|
||||
int bpy_lib_init(PyObject *mod_par)
|
||||
int BPY_library_module(PyObject *mod_par)
|
||||
{
|
||||
static PyMethodDef load_meth = {"load", (PyCFunction)bpy_lib_load,
|
||||
METH_STATIC | METH_VARARGS | METH_KEYWORDS,
|
||||
|
||||
32
source/blender/python/intern/bpy_library.h
Normal file
32
source/blender/python/intern/bpy_library.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Contributor(s): Campbell Barton
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file blender/python/intern/bpy_library.h
|
||||
* \ingroup pythonintern
|
||||
*/
|
||||
|
||||
#ifndef __BPY_LIBRARY_H__
|
||||
#define __BPY_LIBRARY_H__
|
||||
|
||||
int BPY_library_module(PyObject *);
|
||||
|
||||
#endif /* __BPY_LIBRARY_H__ */
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "RNA_types.h"
|
||||
|
||||
#include "BPY_extern.h"
|
||||
|
||||
#include "bpy_rna.h"
|
||||
#include "bpy_rna_anim.h"
|
||||
#include "bpy_props.h"
|
||||
@@ -45,7 +47,7 @@
|
||||
#include "bpy_intern_string.h"
|
||||
|
||||
#ifdef USE_PYRNA_INVALIDATE_WEAKREF
|
||||
#include "MEM_guardedalloc.h"
|
||||
# include "MEM_guardedalloc.h"
|
||||
#endif
|
||||
|
||||
#include "BLI_dynstr.h"
|
||||
@@ -55,7 +57,7 @@
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#ifdef USE_PYRNA_INVALIDATE_WEAKREF
|
||||
#include "BLI_ghash.h"
|
||||
# include "BLI_ghash.h"
|
||||
#endif
|
||||
|
||||
#include "RNA_enum_types.h"
|
||||
@@ -78,7 +80,7 @@
|
||||
#include "../generic/py_capi_utils.h"
|
||||
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
#include "BLF_translation.h"
|
||||
# include "BLF_translation.h"
|
||||
#endif
|
||||
|
||||
#define USE_PEDANTIC_WRITE
|
||||
@@ -2150,10 +2152,10 @@ static PyObject *pyrna_prop_collection_subscript_str(BPy_PropertyRNA *self, cons
|
||||
* -1: exception set
|
||||
* 0: not found
|
||||
* 1: found */
|
||||
int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyObject *key,
|
||||
const char *err_prefix, const short err_not_found,
|
||||
PointerRNA *r_ptr
|
||||
)
|
||||
static int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyObject *key,
|
||||
const char *err_prefix, const short err_not_found,
|
||||
PointerRNA *r_ptr
|
||||
)
|
||||
{
|
||||
char *keyname;
|
||||
|
||||
@@ -5908,7 +5910,7 @@ PyTypeObject pyrna_prop_collection_iter_Type = {
|
||||
NULL
|
||||
};
|
||||
|
||||
PyObject *pyrna_prop_collection_iter_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop)
|
||||
static PyObject *pyrna_prop_collection_iter_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop)
|
||||
{
|
||||
BPy_PropertyCollectionIterRNA *self = PyObject_New(BPy_PropertyCollectionIterRNA, &pyrna_prop_collection_iter_Type);
|
||||
|
||||
|
||||
@@ -175,6 +175,10 @@ PyObject *BPY_rna_types(void);
|
||||
PyObject *pyrna_struct_CreatePyObject(PointerRNA *ptr);
|
||||
PyObject *pyrna_prop_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop);
|
||||
|
||||
/* extern'd by other modules which don't deal closely with RNA */
|
||||
PyObject *pyrna_id_CreatePyObject(struct ID *id);
|
||||
int pyrna_id_FromPyObject(PyObject *obj, struct ID **id);
|
||||
|
||||
/* operators also need this to set args */
|
||||
int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, int all_args, const char *error_prefix);
|
||||
PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop);
|
||||
|
||||
@@ -74,8 +74,7 @@ static struct PyModuleDef gpumodule = {
|
||||
NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
PyMODINIT_FUNC
|
||||
PyInit_gpu(void)
|
||||
static PyObject *PyInit_gpu(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
|
||||
@@ -28,12 +28,15 @@
|
||||
* \ingroup pythonintern
|
||||
*/
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BPY_extern.h"
|
||||
|
||||
/* python, will come back */
|
||||
//void BPY_script_exec(void) {}
|
||||
//void BPY_python_start(void) {}
|
||||
//void BPY_text_free_code(void) {}
|
||||
void BPY_pyconstraint_exec(void) {}
|
||||
void BPY_pyconstraint_target(void) {}
|
||||
int BPY_is_pyconstraint(void) { return 0;}
|
||||
void BPY_pyconstraint_update(void) {}
|
||||
void BPY_pyconstraint_exec(struct bPythonConstraint *UNUSED(con), struct bConstraintOb *UNUSED(cob), struct ListBase *UNUSED(targets)) {}
|
||||
void BPY_pyconstraint_target(struct bPythonConstraint *UNUSED(con), struct bConstraintTarget *UNUSED(ct)) {}
|
||||
int BPY_is_pyconstraint(struct Text *UNUSED(text)) { return 0;}
|
||||
void BPY_pyconstraint_update(struct Object *UNUSED(owner), struct bConstraint *UNUSED(con)) {}
|
||||
|
||||
Reference in New Issue
Block a user