示例#1
0
void make_sss_tree(Render *re)
{
	Material *mat;
	bool infostr_set = false;
	const char *prevstr = NULL;

	free_sss(re);
	
	re->sss_hash= BLI_ghash_ptr_new("make_sss_tree gh");

	re->stats_draw(re->sdh, &re->i);
	
	for (mat= re->main->mat.first; mat; mat= mat->id.next) {
		if (mat->id.us && (mat->flag & MA_IS_USED) && (mat->sss_flag & MA_DIFF_SSS)) {
			if (!infostr_set) {
				prevstr = re->i.infostr;
				re->i.infostr = IFACE_("SSS preprocessing");
				infostr_set = true;
			}

			sss_create_tree_mat(re, mat);
		}
	}
	
	/* XXX preview exception */
	/* localizing preview render data is not fun for node trees :( */
	if (re->main!=G.main) {
		for (mat= G.main->mat.first; mat; mat= mat->id.next) {
			if (mat->id.us && (mat->flag & MA_IS_USED) && (mat->sss_flag & MA_DIFF_SSS)) {
				if (!infostr_set) {
					prevstr = re->i.infostr;
					re->i.infostr = IFACE_("SSS preprocessing");
					infostr_set = true;
				}

				sss_create_tree_mat(re, mat);
			}
		}
	}
	
	if (infostr_set)
		re->i.infostr = prevstr;
}
示例#2
0
void make_sss_tree(Render *re)
{
	Material *mat;
	
	re->sss_hash= BLI_ghash_ptr_new("make_sss_tree gh");

	re->i.infostr = IFACE_("SSS preprocessing");
	re->stats_draw(re->sdh, &re->i);
	
	for (mat= re->main->mat.first; mat; mat= mat->id.next)
		if (mat->id.us && (mat->flag & MA_IS_USED) && (mat->sss_flag & MA_DIFF_SSS))
			sss_create_tree_mat(re, mat);
	
	/* XXX preview exception */
	/* localizing preview render data is not fun for node trees :( */
	if (re->main!=G.main) {
		for (mat= G.main->mat.first; mat; mat= mat->id.next)
			if (mat->id.us && (mat->flag & MA_IS_USED) && (mat->sss_flag & MA_DIFF_SSS))
				sss_create_tree_mat(re, mat);
	}
	
}
示例#3
0
文件: sss.c 项目: jinjoh/NOOR
void make_sss_tree(Render *re)
{
	Material *mat;
	
	re->sss_hash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);

	re->i.infostr= "SSS preprocessing";
	re->stats_draw(re->sdh, &re->i);
	
	for(mat= G.main->mat.first; mat; mat= mat->id.next)
		if(mat->id.us && (mat->flag & MA_IS_USED) && (mat->sss_flag & MA_DIFF_SSS))
			sss_create_tree_mat(re, mat);
}