diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-20 16:02:33 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-20 16:02:33 +0300 |
commit | 6b1258f5b899d9aa0ad4e0c995dd637801b44aba (patch) | |
tree | c98e33576461d52270737b4ac8dda74f0d61fee4 /source/blender/render | |
parent | 88b2955564c42359d4367a4da52596c30dda3cd1 (diff) |
Bugfix #25301
Material Node trees:
SSS wasn't displaying in Nodes.
Implementation notes:
- Currently copying local data for preview render, only copies
the base material. Node materials are re-used.
- This causes data to be in 2 "main" databases... complex.
- To make it work for preview, I had to add another loop in the
SSS code that checks the original Main dbase. That's marked
as warning in code to be fixed up.
Another bug:
- Material properties "SSS presets" copied settings to the
active material, not to the displayed one. Added RNA call
to retrieve this from Objects.
(Next commit will fix preset scripts)
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/sss.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c index 993e0aeb9c3..4bccb46d3d8 100644 --- a/source/blender/render/intern/source/sss.c +++ b/source/blender/render/intern/source/sss.c @@ -997,6 +997,14 @@ void make_sss_tree(Render *re) 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); + } + } void free_sss(Render *re) |