diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 4 | ||||
-rw-r--r-- | source/blender/editors/preview/previewrender.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 112 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_jobs.c | 7 |
7 files changed, 11 insertions, 141 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index af66c0ea630..9d7913ec2af 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -392,7 +392,7 @@ void draw_gpl_channel(gla2DDrawInfo *di, ActKeysInc *aki, bGPDlayer *gpl, float void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki) { - Key *key= ob_get_key(ob); +// Key *key= ob_get_key(ob); if (ob) { bDopeSheet *ads= (aki)? (aki->ads) : NULL; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index e6020361961..b635de6aa73 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -89,6 +89,8 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "ED_util.h" #include "ED_screen.h" +#include "UI_interface.h" + #include "mesh_intern.h" /* XXX */ @@ -6410,8 +6412,6 @@ void MESH_OT_subdivide_smooth(wmOperatorType *ot) static int subdivs_invoke(bContext *C, wmOperator *op, wmEvent *event) { - wmWindowManager *wm= CTX_wm_manager(C); - wmOperator *lastop; int items; char *menu, *p; diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/preview/previewrender.c index 20bc49d7029..7fbac0a77c2 100644 --- a/source/blender/editors/preview/previewrender.c +++ b/source/blender/editors/preview/previewrender.c @@ -996,7 +996,6 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd { ShaderPreview *sp= customdata; Render *re; - RenderStats *rstats; Scene *sce; char name [32]; @@ -1034,12 +1033,6 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd RE_test_break_cb(re, sp, shader_preview_break); } - /* enforce preview image clear */ -// if(GS(sp->id->name)==ID_MA) { -// Material *ma= (Material *)sp->id; -// ntreeClearPreview(ma->nodetree); -// } - /* entire cycle for render engine */ RE_SetCamera(re, sce->camera); RE_Database_FromScene(re, sce, 1); @@ -1054,17 +1047,6 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd // ri->rect= MEM_mallocN(sizeof(int)*ri->pr_rectx*ri->pr_recty, "BIF_previewrender"); //RE_ResultGet32(re, ri->rect); } - else { - rstats= RE_GetStats(re); - - if(rstats->totpart==rstats->partsdone && rstats->partsdone) { - // allqueues - } - else { - // if(pr_method==PR_DRAW_RENDER && qtest()) - // addafterqueue(area->win, RENDERPREVIEW, 1); - } - } /* unassign the pointers, reset vars */ preview_prepare_scene(sp->scene, GS(sp->id->name), NULL); @@ -1101,7 +1083,7 @@ 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, NULL, shader_preview_update); + WM_jobs_callbacks(steve, shader_preview_startjob, shader_preview_update); WM_jobs_start(steve); } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 9300b22ec1c..aa4d139e32f 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -62,43 +62,14 @@ #include "ED_previewrender.h" #include "BIF_gl.h" -/*#include "BIF_cursors.h" -#include "BIF_editview.h" -#include "BIF_graphics.h" -#include "BIF_imasel.h" -#include "BIF_interface.h" -#include "BIF_mywindow.h" -#include "BIF_previewrender.h" -#include "BIF_resources.h" -#include "BIF_renderwin.h" -#include "BIF_space.h" -#include "BIF_scrarea.h" -#include "BIF_screen.h" -#include "BIF_toolbox.h" -*/ - -/*#include "BSE_drawipo.h" -#include "BSE_edit.h" -#include "BSE_filesel.h" -#include "BSE_headerbuttons.h" -#include "BSE_node.h"*/ #include "BLI_arithb.h" #include "BLI_blenlib.h" #include "BLI_storage_types.h" -/*#include "BDR_editobject.h" -#include "BDR_gpencil.h"*/ - #include "RE_pipeline.h" -#include "IMB_imbuf_types.h" -/*#include "blendef.h" -#include "butspace.h" -#include "PIL_time.h" -#include "mydevice.h" -#include "winlay.h" -*/ +#include "IMB_imbuf_types.h" #include "ED_space_api.h" #include "ED_screen.h" @@ -118,70 +89,11 @@ static void BIF_undo_push(char *s) {} #if 0 -/* currently called from BIF_preview_changed */ -void snode_tag_dirty(SpaceNode *snode) -{ - bNode *node; - - if(snode->treetype==NTREE_SHADER) { - if(snode->nodetree) { - for(node= snode->nodetree->nodes.first; node; node= node->next) { - if(node->type==SH_NODE_OUTPUT) - node->lasty= 0; - } - snode->flag |= SNODE_DO_PREVIEW; /* this adds an afterqueue on a redraw, to allow button previews to work first */ - } - } - // allqueue(REDRAWNODE, 1); -} -static void shader_node_previewrender(ScrArea *sa, SpaceNode *snode) -{ - bNode *node; - - if(snode->id==NULL) return; - if( ((Material *)snode->id )->use_nodes==0 ) return; - - for(node= snode->nodetree->nodes.first; node; node= node->next) { - if(node->type==SH_NODE_OUTPUT) { - if(node->flag & NODE_DO_OUTPUT) { - if(node->lasty<PREVIEW_RENDERSIZE-2) { - RenderInfo ri; -// int test= node->lasty; - - ri.curtile = 0; - ri.tottile = 0; - ri.rect = NULL; - ri.pr_rectx = PREVIEW_RENDERSIZE; - ri.pr_recty = PREVIEW_RENDERSIZE; - - // XXX BIF_previewrender(snode->id, &ri, NULL, PR_DO_RENDER); /* sends redraw event */ - if(ri.rect) MEM_freeN(ri.rect); - - /* when not finished... */ - if(ri.curtile<ri.tottile) - ; // XXX addafterqueue(sa->win, RENDERPREVIEW, 1); -// if(test!=node->lasty) -// printf("node rendered to %d\n", node->lasty); - - break; - } - } - } - } -} - -// XXX stub -static void set_timecursor() {} -static int blender_test_break() { return 0; } - -// XXX snode_handle_recalc can go away */ +// XXX snode_handle_recalc will go away */ static void snode_handle_recalc(SpaceNode *snode) { - if(snode->treetype==NTREE_SHADER) { - // XXX BIF_preview_changed(ID_MA); /* signals buttons windows and node editors */ - } - else if(snode->treetype==NTREE_COMPOSIT) { + if(snode->treetype==NTREE_COMPOSIT) { if(G.scene->use_nodes) { snode->nodetree->timecursor= set_timecursor; G.afbreek= 0; @@ -210,19 +122,6 @@ static void snode_handle_recalc(SpaceNode *snode) } } -static void shader_node_event(SpaceNode *snode, short event) -{ - switch(event) { - case B_REDR: - // allqueue(REDRAWNODE, 1); - break; - default: - /* B_NODE_EXEC */ - snode_handle_recalc(snode); - break; - - } -} static int image_detect_file_sequence(int *start_p, int *frames_p, char *str) { @@ -2633,11 +2532,6 @@ void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt) texture_node_event(snode, val); break; - case RENDERPREVIEW: - if(snode->treetype==NTREE_SHADER) - shader_node_previewrender(sa, snode); - break; - case PADPLUSKEY: snode_zoom_in(sa); doredraw= 1; diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 13104b58a04..9584751a775 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -180,7 +180,6 @@ void WM_jobs_customdata(struct wmJob *, void *customdata, void (*free)(void *)) void WM_jobs_timer(struct wmJob *, double timestep, unsigned int note); void WM_jobs_callbacks(struct wmJob *, void (*startjob)(void *, short *, short *), - void (*listener)(struct wmJob *, struct wmNotifier *), void (*update)(void *)); void WM_jobs_start(struct wmJob *); diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 67b114b746f..8537c745303 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -338,7 +338,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) else { GLint format; - glGenTextures(1, &win->drawtex); + glGenTextures(1, (GLuint *)&win->drawtex); if(!win->drawtex) { /* not the typical failure case but we handle it anyway */ @@ -363,7 +363,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) if(format != GL_RGB8) { /* proxy texture is only guaranteed to test for the cases that * there is only one texture in use, which may not be the case */ - glDeleteTextures(1, &win->drawtex); + glDeleteTextures(1, (GLuint *)&win->drawtex); win->drawmethod= USER_DRAW_OVERLAP_ALL; wm_method_draw_overlap_all(C, win); @@ -380,7 +380,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) if(glGetError() == GL_OUT_OF_MEMORY) { /* not sure if this works everywhere .. */ - glDeleteTextures(1, &win->drawtex); + glDeleteTextures(1, (GLuint *)&win->drawtex); win->drawmethod= USER_DRAW_OVERLAP_ALL; wm_method_draw_overlap_all(C, win); diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 1f320df7587..422cc42e10b 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -85,7 +85,7 @@ struct wmJob { /* job originating from, keep track of this when deleting windows */ wmWindow *win; - /* should store entire own context, for start, free or listeners */ + /* should store entire own context, for start, update, free */ void *customdata; void (*startjob)(void *, short *stop, short *do_update); void (*free)(void *); @@ -96,9 +96,6 @@ struct wmJob { /* the notifier event timers should send */ unsigned int note; - /* managing */ - void (*listener)(struct wmJob *, struct wmNotifier *); - /* update gets called if thread defines so, and max once per timerstep */ /* no drawing, send notifiers! */ void (*update)(void *); @@ -161,11 +158,9 @@ void WM_jobs_timer(wmJob *steve, double timestep, unsigned int note) void WM_jobs_callbacks(wmJob *steve, void (*startjob)(void *, short *, short *), - void (*listener)(struct wmJob *, struct wmNotifier *), void (*update)(void *)) { steve->startjob= startjob; - steve->listener= listener; steve->update= update; } |