PyAPI: add BPY_execute_string_as_string

Utility to execute a string and get the resulting string,
matching BPY_execute_string_as_number.

Not used just yet but generally useful function.
This commit is contained in:
2017-03-18 12:19:03 +11:00
parent d863b5182e
commit e392bb4937
4 changed files with 75 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ void BPY_thread_restore(BPy_ThreadStatePtr tstate);
bool BPY_execute_filepath(struct bContext *C, const char *filepath, struct ReportList *reports);
bool BPY_execute_text(struct bContext *C, struct Text *text, struct ReportList *reports, const bool do_jump);
bool BPY_execute_string_as_number(struct bContext *C, const char *expr, const bool verbose, double *r_value);
bool BPY_execute_string_as_string(struct bContext *C, const char *expr, const bool verbose, char **r_value);
bool BPY_execute_string_ex(struct bContext *C, const char *expr, bool use_eval);
bool BPY_execute_string(struct bContext *C, const char *expr);