Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-05-27 12:22:16 +0400
committerMatt Ebb <matt@mke3.net>2010-05-27 12:22:16 +0400
commit6e92ddf8b37dbfae733a9738a20777917610b4a0 (patch)
tree4f92654d234a24a85918f5ec37ad1a9e4d819e63 /source/blender/blenkernel/intern/node.c
parentec70356424d687cb1cdb8cb80095a5593937e03a (diff)
Progress indicators for threaded jobs
Now, rather than the bit-too-alarming stop sign, threaded wmJobs display a progress indicator in the header. This is an optional feature for each job type and still uses the same hardcoded ui template (could use further work here...). Currently implemented for: Render - parts completed, then nodes comped Compositor - nodes comped Fluid Sim - frames simulated Texture Bake - faces baked Example: http://mke3.net/blender/devel/2.5/progress.mov
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r--source/blender/blenkernel/intern/node.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 3d49548cba7..13ea55ebf0f 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -2434,7 +2434,7 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview)
bNode *node;
ListBase threads;
ThreadData thdata;
- int totnode, rendering= 1;
+ int totnode, curnode, rendering= 1;
if(ntree==NULL) return;
@@ -2455,7 +2455,7 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview)
BLI_srandom(rd->cfra);
/* sets need_exec tags in nodes */
- totnode= setExecutableNodes(ntree, &thdata);
+ curnode = totnode= setExecutableNodes(ntree, &thdata);
BLI_init_threads(&threads, exec_composite_node, rd->threads);
@@ -2465,14 +2465,14 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview)
node= getExecutableNode(ntree);
if(node) {
- if(ntree->timecursor)
- ntree->timecursor(ntree->tch, totnode);
+ if(ntree->progress)
+ ntree->progress(ntree->prh, (1.0 - curnode/(float)totnode));
if(ntree->stats_draw) {
char str[64];
- sprintf(str, "Compositing %d %s", totnode, node->name);
+ sprintf(str, "Compositing %d %s", curnode, node->name);
ntree->stats_draw(ntree->sdh, str);
}
- totnode--;
+ curnode--;
node->threaddata = &thdata;
node->exec= NODE_PROCESSING;