[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32874] trunk/blender/source/blender: Temporary fix for "freezing when pointcache is baked":
Janne Karhu
jhkarh at gmail.com
Thu Nov 4 21:17:38 CET 2010
Revision: 32874
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32874
Author: jhk
Date: 2010-11-04 21:17:38 +0100 (Thu, 04 Nov 2010)
Log Message:
-----------
Temporary fix for "freezing when pointcache is baked":
* WM_timecursor is broken somehow, so pointcache baking makes the cursor disappear.
* For user this seems like blender has frozen although it's just a matter of no progress indication.
* This fix just sets the default "busy" cursor for the whole duration of baking and reports progress in the console.
* If there's and easy fix for this then it should probably be done straight away, but I want to re-implement baking using the job system soon anyways, so a proper fix for this is not strictly necessary.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/pointcache.c
trunk/blender/source/blender/editors/physics/physics_pointcache.c
Modified: trunk/blender/source/blender/blenkernel/intern/pointcache.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/pointcache.c 2010-11-04 18:16:34 UTC (rev 32873)
+++ trunk/blender/source/blender/blenkernel/intern/pointcache.c 2010-11-04 20:17:38 UTC (rev 32874)
@@ -2607,6 +2607,8 @@
thread_data.break_operation = FALSE;
thread_data.thread_ended = FALSE;
old_progress = -1;
+
+ WM_cursor_wait(1);
if(G.background) {
ptcache_make_cache_thread((void*)&thread_data);
@@ -2690,6 +2692,8 @@
else if (baker->progressend)
baker->progressend(baker->progresscontext);
+ WM_cursor_wait(0);
+
/* TODO: call redraw all windows somehow */
}
/* Helpers */
Modified: trunk/blender/source/blender/editors/physics/physics_pointcache.c
===================================================================
--- trunk/blender/source/blender/editors/physics/physics_pointcache.c 2010-11-04 18:16:34 UTC (rev 32873)
+++ trunk/blender/source/blender/editors/physics/physics_pointcache.c 2010-11-04 20:17:38 UTC (rev 32874)
@@ -83,7 +83,7 @@
void bake_console_progress_end(void *UNUSED(arg))
{
- printf("\n");
+ printf("\rbake: done!\n");
}
static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
@@ -103,7 +103,10 @@
baker.break_test = cache_break_test;
baker.break_data = NULL;
- if (win) {
+ /* Disabled for now as this doesn't work properly,
+ * and pointcache baking will be reimplemented with
+ * the job system soon anyways. */
+ if (win && 0) {
baker.progressbar = (void (*)(void *, int))WM_timecursor;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
@@ -201,7 +204,10 @@
baker.break_test = cache_break_test;
baker.break_data = NULL;
- if (win) {
+ /* Disabled for now as this doesn't work properly,
+ * and pointcache baking will be reimplemented with
+ * the job system soon anyways. */
+ if (win && 0) {
baker.progressbar = (void (*)(void *, int))WM_timecursor;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
More information about the Bf-blender-cvs
mailing list