2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version 2
5 * of the License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 #include "BLI_sys_types.h"
33 /* bpy_interface_run.c */
34 bool BPY_run_filepath(struct bContext *C, const char *filepath, struct ReportList *reports);
35 bool BPY_run_text(struct bContext *C,
37 struct ReportList *reports,
40 /* Use the 'eval' for simple single-line expressions,
41 * otherwise 'exec' for full multi-line scripts. */
42 bool BPY_run_string_exec(struct bContext *C, const char *imports[], const char *expr);
43 bool BPY_run_string_eval(struct bContext *C, const char *imports[], const char *expr);
45 /* Run, evaluating to fixed type result. */
46 bool BPY_run_string_as_number(struct bContext *C,
47 const char *imports[],
49 const char *report_prefix,
51 bool BPY_run_string_as_intptr(struct bContext *C,
52 const char *imports[],
54 const char *report_prefix,
56 bool BPY_run_string_as_string_and_size(struct bContext *C,
57 const char *imports[],
59 const char *report_prefix,
61 size_t *r_value_size);
62 bool BPY_run_string_as_string(struct bContext *C,
63 const char *imports[],
65 const char *report_prefix,