diff options
author | Ton Roosendaal <ton@blender.org> | 2011-02-26 16:53:15 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-02-26 16:53:15 +0300 |
commit | 38bd8dcf05aa8d22cc97ba08eec4f7a4b858f696 (patch) | |
tree | 387e412444ff6b5c417b0f408a9e891386ffdca6 | |
parent | 457aba9d1bb39ccc4cbddc8f4a9fbaf17ad40d38 (diff) |
Bugfix #26221
Two bugs in one:
- Lukas commit monday for new group/socket handling accidentally removed
to set socketype in stacks, which as used by (texture) nodes to detect
whether value, color or vector had to be read.
Result was that all texture nodes were rendering as B&W
- Old 2.5 bug: preview renders for texture nodes didn't call a
NodeEndExec function, which gave crashes on deleting nodes.
The change in interface_hanlers.c is only a comment to explain
how keymaps are being found.
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 9 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 1 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 8 |
3 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 15ad3a7809a..320bead1c61 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -2318,8 +2318,15 @@ void ntreeBeginExecTree(bNodeTree *ntree) for(sock= node->inputs.first; sock; sock= sock->next) { ns = get_socket_stack(ntree->stack, sock, NULL); - if (ns) + if (ns) { ns->hasoutput = 1; + + /* sock type is needed to detect rgba or value or vector types */ + if(sock->link) + ns->sockettype= sock->link->fromsock->type; + else + sock->ns.sockettype= sock->type; + } if(sock->link) { bNodeLink *link= sock->link; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index e8d2771e257..acc806555ce 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4042,6 +4042,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) uiStyle *style= U.uistyles.first; IDProperty *prop= (but->opptr)? but->opptr->data: NULL; + /* XXX this guess_opname can potentially return a different keymap than being found on adding later... */ km = WM_keymap_guess_opname(C, but->optype->idname); kmi = WM_keymap_add_item(km, but->optype->idname, AKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 95a5220d562..67a0773199f 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -1055,6 +1055,14 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs /* unassign the pointers, reset vars */ preview_prepare_scene(sp->scene, NULL, GS(id->name), sp); + + /* XXX bad exception, end-exec is not being called in render, because it uses local main */ + if(idtype == ID_TE) { + Tex *tex= (Tex *)id; + if(tex->use_nodes && tex->nodetree) + ntreeEndExecTree(tex->nodetree); + } + } /* runs inside thread for material and icons */ |