2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code was in: source/blender/bpython/include/BPY_extern.h
23 * Contributor(s): Michel Selten,
28 * ***** END GPL LICENSE BLOCK *****
31 /** \file BPY_extern.h
37 #ifndef __BPY_EXTERN_H__
38 #define __BPY_EXTERN_H__
40 struct Text; /* defined in DNA_text_types.h */
41 struct ID; /* DNA_ID.h */
42 struct Object; /* DNA_object_types.h */
43 struct ChannelDriver; /* DNA_anim_types.h */
44 struct ListBase; /* DNA_listBase.h */
45 struct bConstraint; /* DNA_constraint_types.h */
46 struct bPythonConstraint; /* DNA_constraint_types.h */
47 struct bConstraintOb; /* DNA_constraint_types.h */
48 struct bConstraintTarget; /* DNA_constraint_types.h*/
50 struct bContextDataResult;
57 void BPY_pyconstraint_exec(struct bPythonConstraint *con, struct bConstraintOb *cob, struct ListBase *targets);
58 // void BPY_pyconstraint_settings(void *arg1, void *arg2);
59 void BPY_pyconstraint_target(struct bPythonConstraint *con, struct bConstraintTarget *ct);
60 void BPY_pyconstraint_update(struct Object *owner, struct bConstraint *con);
61 int BPY_is_pyconstraint(struct Text *text);
62 // void BPY_free_pyconstraint_links(struct Text *text);
64 void BPY_python_start(int argc, const char **argv);
65 void BPY_python_end(void);
68 int BPY_filepath_exec(struct bContext *C, const char *filepath, struct ReportList *reports);
69 int BPY_text_exec(struct bContext *C, struct Text *text, struct ReportList *reports, const short do_jump);
70 void BPY_text_free_code(struct Text *text);
71 void BPY_modules_update(struct bContext *C); // XXX - annoying, need this for pointers that get out of date
72 void BPY_modules_load_user(struct bContext *C);
74 void BPY_app_handlers_reset(const short do_all);
76 void BPY_driver_reset(void);
77 float BPY_driver_exec(struct ChannelDriver *driver, const float evaltime);
79 int BPY_button_exec(struct bContext *C, const char *expr, double *value, const short verbose);
80 int BPY_string_exec(struct bContext *C, const char *expr);
82 void BPY_DECREF(void *pyob_ptr); /* Py_DECREF() */
83 void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr);
84 int BPY_context_member_get(struct bContext *C, const char *member, struct bContextDataResult *result);
85 void BPY_context_set(struct bContext *C);
86 void BPY_context_update(struct bContext *C);
88 void BPY_id_release(struct ID *id);
94 #endif /* __BPY_EXTERN_H__ */