Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9579)

Issue 5695063: Simplification of node muting and new detach operator (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by lukas.toenne
Modified:
11 years, 11 months ago
Reviewers:
mont29, brechtvl, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

Implements a new operator for detaching nodes. In the process i overhauled the node muting system as well. There are a number of features that use a kind of "internal linking" in nodes: 1. muting 2. delete + reconnect (restore link to/from node after delete) 3. the new detach operator (same as 2, but don't delete the node) The desired behavior in all cases is the same: find a sensible mapping of inputs-to-outputs of a node. In the case of muting these links are displayed in red on the node itself. For the other operators they are used to relink connections, such that one gets the best possible ongoing link between previous up- and downstream nodes. Muting previously used a complicated callback system to ensure consistent behavior in the editor as well as execution in compositor, shader cpu/gpu and texture nodes. This has been greatly simplified by moving the muting step into the node tree localization functions. Any muted node is now bypassed using the generalized nodeInternalRelink function and then removed from the local tree. This way the internal execution system doesn't have to deal with muted nodes at all, as if they are non-existent. The same function is also used by the delete_reconnect and the new links_detach operators (which work directly in the editor node tree). Detaching nodes is currently keymapped as a translation variant (macro operator): pressing ALTKEY + moving node first detaches and then continues with regular transform operator.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Removed unused code from previous node muting #

Patch Set 3 : Changed key mapping to ALT+DKEY #

Unified diffs Side-by-side diffs Delta from patch set Stats (+444 lines, -743 lines) Patch
source/blender/blenkernel/BKE_node.h View 1 2 5 chunks +8 lines, -27 lines 0 comments Download
source/blender/blenkernel/intern/node.c View 1 2 4 chunks +53 lines, -18 lines 0 comments Download
source/blender/editors/space_node/node_draw.c View 1 2 1 chunk +6 lines, -17 lines 0 comments Download
source/blender/editors/space_node/node_edit.c View 1 2 4 chunks +45 lines, -118 lines 0 comments Download
source/blender/editors/space_node/node_intern.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
source/blender/editors/space_node/node_ops.c View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
source/blender/editors/transform/transform_ops.c View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
source/blender/gpu/GPU_material.h View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
source/blender/gpu/intern/gpu_codegen.c View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
source/blender/gpu/intern/gpu_shader_material.glsl View 1 2 1 chunk +0 lines, -20 lines 0 comments Download
source/blender/gpu/intern/gpu_shader_material.glsl.c View 1 2 1 chunk +226 lines, -234 lines 0 comments Download
source/blender/makesdna/DNA_node_types.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
source/blender/nodes/composite/node_composite_tree.c View 1 2 4 chunks +24 lines, -8 lines 0 comments Download
source/blender/nodes/composite/node_composite_util.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
source/blender/nodes/composite/node_composite_util.c View 1 2 1 chunk +0 lines, -26 lines 0 comments Download
source/blender/nodes/composite/nodes/node_composite_composite.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
source/blender/nodes/composite/nodes/node_composite_outputFile.c View 1 2 4 chunks +0 lines, -16 lines 0 comments Download
source/blender/nodes/composite/nodes/node_composite_splitViewer.c View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
source/blender/nodes/composite/nodes/node_composite_viewer.c View 1 2 1 chunk +1 line, -2 lines 0 comments Download
source/blender/nodes/intern/node_exec.c View 1 2 2 chunks +2 lines, -6 lines 0 comments Download
source/blender/nodes/intern/node_util.h View 1 2 1 chunk +1 line, -8 lines 0 comments Download
source/blender/nodes/intern/node_util.c View 1 2 1 chunk +18 lines, -36 lines 0 comments Download
source/blender/nodes/shader/node_shader_tree.c View 1 2 2 chunks +17 lines, -4 lines 0 comments Download
source/blender/nodes/shader/node_shader_util.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
source/blender/nodes/shader/node_shader_util.c View 1 2 2 chunks +1 line, -58 lines 0 comments Download
source/blender/nodes/shader/nodes/node_shader_output.c View 1 2 1 chunk +1 line, -2 lines 0 comments Download
source/blender/nodes/shader/nodes/node_shader_output_lamp.c View 1 2 1 chunk +1 line, -2 lines 0 comments Download
source/blender/nodes/shader/nodes/node_shader_output_material.c View 1 2 1 chunk +1 line, -2 lines 0 comments Download
source/blender/nodes/shader/nodes/node_shader_output_world.c View 1 2 1 chunk +1 line, -2 lines 0 comments Download
source/blender/nodes/texture/node_texture_tree.c View 1 2 2 chunks +17 lines, -4 lines 0 comments Download
source/blender/nodes/texture/node_texture_util.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
source/blender/nodes/texture/node_texture_util.c View 1 2 1 chunk +0 lines, -92 lines 0 comments Download
source/blender/nodes/texture/nodes/node_texture_output.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
source/blender/nodes/texture/nodes/node_texture_viewer.c View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
lukas.toenne
12 years, 1 month ago (2012-02-25 15:08:17 UTC) #1
mont29
Big +1 for me, muting code is mush nicer this way, regrouping similar code is ...
12 years, 1 month ago (2012-02-25 16:27:09 UTC) #2
lukas.toenne
Removed unused code from previous node muting
12 years, 1 month ago (2012-02-25 16:58:21 UTC) #3
lukas.toenne
http://codereview.appspot.com/5695063/diff/1/source/blender/editors/transform/transform_ops.c File source/blender/editors/transform/transform_ops.c (right): http://codereview.appspot.com/5695063/diff/1/source/blender/editors/transform/transform_ops.c#newcode953 source/blender/editors/transform/transform_ops.c:953: WM_keymap_add_item(keymap, "NODE_OT_move_detach_links", GKEY, KM_PRESS, KM_ALT, 0); On 2012/02/25 16:27:09, ...
12 years, 1 month ago (2012-02-25 16:58:30 UTC) #4
brechtvl
I'd just use a different shortcut like Alt+D here, I don't really see much reason ...
12 years, 1 month ago (2012-02-27 15:06:50 UTC) #5
lukas.toenne
12 years, 1 month ago (2012-02-27 17:21:53 UTC) #6
Changed key mapping to ALT+DKEY
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b