diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-27 20:12:40 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-27 20:12:40 +0300 |
commit | c0ee40ab1077de07741344b163ccd8de046db0fe (patch) | |
tree | 8469c10210578f650141ce0717212a4a608db806 /source/blender/editors/preview | |
parent | b602fd8b1c7c3f492ba91ff7dc85a0aafd5c3ee7 (diff) |
2.5
Compositor now uses threaded jobs.
- updates happen per preview node! Check this file for
fun: http://www.blender.org/bf/composite_image.blend
(any compo node could get preview!)
- had to ensure the composite data gets fully copied before
it executes thread, so editing is not frustrated.
- put back node buttons (missing init)
- added WM_jobs api call to check for running job,
illustrated with red light icon in 'use nodes' button.
- added another callback to WM_jobs, to initialize.
use this init to ensure you only do it when job really
starts.
- added an extra notifier option for WM_jobs, to signal
finished job (like redraw image view)
- fixed file read error, it copied the screen it read,
instead of using it.
- commented out annoying prints for missing ops in imagewin
Diffstat (limited to 'source/blender/editors/preview')
-rw-r--r-- | source/blender/editors/preview/previewrender.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/preview/previewrender.c index 7fbac0a77c2..407674163a6 100644 --- a/source/blender/editors/preview/previewrender.c +++ b/source/blender/editors/preview/previewrender.c @@ -1060,13 +1060,6 @@ static void shader_preview_free(void *customdata) MEM_freeN(sp); } -static void shader_preview_update(void *customdata) -{ -// ShaderPreview *sp= customdata; - -} - - void ED_preview_shader_job(const bContext *C, void *owner, ID *id, int sizex, int sizey) { wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner); @@ -1082,8 +1075,8 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, int sizex, in /* setup job */ WM_jobs_customdata(steve, sp, shader_preview_free); - WM_jobs_timer(steve, 0.1, NC_MATERIAL); - WM_jobs_callbacks(steve, shader_preview_startjob, shader_preview_update); + WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL); + WM_jobs_callbacks(steve, shader_preview_startjob, NULL, NULL); WM_jobs_start(steve); } |