Example #1
0
static void render_endjob(void *rjv)
{
	RenderJob *rj= rjv;	

	/* this render may be used again by the sequencer without the active 'Render' where the callbacks
	 * would be re-assigned. assign dummy callbacks to avoid referencing freed renderjobs bug [#24508] */
	RE_InitRenderCB(rj->re);

	if(rj->main != G.main)
		free_main(rj->main);

	/* else the frame will not update for the original value */
	if(!(rj->scene->r.scemode & R_NO_FRAME_UPDATE))
		ED_update_for_newframe(G.main, rj->scene, rj->win->screen, 1);
	
	/* XXX above function sets all tags in nodes */
	ntreeClearTags(rj->scene->nodetree);
	
	/* potentially set by caller */
	rj->scene->r.scemode &= ~R_NO_FRAME_UPDATE;
	
	if(rj->srl) {
		NodeTagIDChanged(rj->scene->nodetree, &rj->scene->id);
		WM_main_add_notifier(NC_NODE|NA_EDITED, rj->scene);
	}
	
	/* XXX render stability hack */
	G.rendering = 0;
	WM_main_add_notifier(NC_WINDOW, NULL);
}
Example #2
0
/* XXX after render animation system gets a refresh, this call allows composite to end clean */
void ntreeClearTags(bNodeTree *ntree)
{
	bNode *node;
	
	if(ntree==NULL) return;
	
	for(node= ntree->nodes.first; node; node= node->next) {
		node->need_exec= 0;
		if(node->type==NODE_GROUP)
			ntreeClearTags((bNodeTree *)node->id);
	}
}