diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-22 13:12:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-22 13:12:39 +0400 |
commit | 92145d5950b3c069418a097055cc8ae0e5710423 (patch) | |
tree | f64de73f354a7d76edcb608e6b26476dc929d280 /source/blender/blenkernel/intern/report.c | |
parent | 3c8d34b94e8c615c0349a01e3ea5e6381feaeefa (diff) |
Changes to allow python to do redraws through the timer operator, a reliable way to test the overhead of the python api (printed to the consoel on exit).
- rename WM_OT_ten_timer to WM_OT_redraw_timer
- added iterations argument to run more then 10 times (10 is default still)
- use report api rather then always calling a popup directly.
- added a new test that draws every region without swapping.
- dont show the info popup when operators are called from python.
- operators called from python now print reports, useful with the interactive console.
eg.
>>> bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=300)
Info: 300 x Draw Window: 4168.56 ms, average: 13.8952
Diffstat (limited to 'source/blender/blenkernel/intern/report.c')
-rw-r--r-- | source/blender/blenkernel/intern/report.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index 391adfb762a..e524359d2bc 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -230,7 +230,7 @@ char *BKE_reports_string(ReportList *reports, ReportType level) DynStr *ds; char *cstring; - if(!reports) + if(!reports || !reports->list.first) return NULL; ds= BLI_dynstr_new(); |