4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code was in: source/blender/bpython/include/BPY_extern.h
25 * Contributor(s): Michel Selten, Willian P. Germano, Chris Keith
27 * ***** END GPL LICENSE BLOCK *****
30 /** \file BPY_extern.h
39 extern char bprogname[]; /* holds a copy of argv[0], from creator.c */
41 struct Text; /* defined in DNA_text_types.h */
42 struct ID; /* DNA_ID.h */
43 struct Object; /* DNA_object_types.h */
44 struct ChannelDriver; /* DNA_anim_types.h */
45 struct ListBase; /* DNA_listBase.h */
46 struct SpaceText; /* DNA_space_types.h */
47 struct ScrArea; /* DNA_screen_types.h */
48 struct bScreen; /* DNA_screen_types.h */
49 struct bConstraint; /* DNA_constraint_types.h */
50 struct bPythonConstraint; /* DNA_constraint_types.h */
51 struct bConstraintOb; /* DNA_constraint_types.h */
52 struct bConstraintTarget; /* DNA_constraint_types.h*/
55 struct bContextDataResult;
62 void BPY_pyconstraint_exec(struct bPythonConstraint *con, struct bConstraintOb *cob, struct ListBase *targets);
63 // void BPY_pyconstraint_settings(void *arg1, void *arg2);
64 void BPY_pyconstraint_target(struct bPythonConstraint *con, struct bConstraintTarget *ct);
65 void BPY_pyconstraint_update(struct Object *owner, struct bConstraint *con);
66 int BPY_is_pyconstraint(struct Text *text);
67 // void BPY_free_pyconstraint_links(struct Text *text);
69 void BPY_python_start(int argc, const char **argv);
70 void BPY_python_end(void);
71 // void init_syspath(int first_time);
72 // void syspath_append(char *dir);
73 // void BPY_rebuild_syspath(void);
74 // int BPY_path_update(void);
76 // int BPY_Err_getLinenumber(void);
77 // const char *BPY_Err_getFilename(void);
80 int BPY_filepath_exec(struct bContext *C, const char *filepath, struct ReportList *reports);
81 int BPY_text_exec(struct bContext *C, struct Text *text, struct ReportList *reports, const short do_jump);
82 void BPY_text_free_code(struct Text *text);
83 void BPY_modules_update(struct bContext *C); // XXX - annoying, need this for pointers that get out of date
84 void BPY_modules_load_user(struct bContext *C);
86 void BPY_app_handlers_reset(void);
88 void BPY_driver_reset(void);
89 float BPY_driver_exec(struct ChannelDriver *driver);
91 int BPY_button_exec(struct bContext *C, const char *expr, double *value, const short verbose);
92 int BPY_string_exec(struct bContext *C, const char *expr);
94 void BPY_DECREF(void *pyob_ptr); /* Py_DECREF() */
95 int BPY_context_member_get(struct bContext *C, const char *member, struct bContextDataResult *result);
96 void BPY_context_set(struct bContext *C);
98 void BPY_id_release(struct ID *id);
104 #endif /* BPY_EXTERN_H */