diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-02-27 21:38:16 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-02-27 21:38:16 +0400 |
commit | 050428049f1f10ac2c8b6ccf7d775c6d9dcfe2ba (patch) | |
tree | 36987af8cfe4c4401bdab6b5a99ea3097fa056fd /source/blender/nodes/texture/node_texture_util.h | |
parent | d55c1d59f91a919c8d4b935136454200adb0b8e8 (diff) |
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. The default key is ALT+DKEY though, instead ALT+GKEY, since the latter is already used for the ungroup operator.
Diffstat (limited to 'source/blender/nodes/texture/node_texture_util.h')
-rw-r--r-- | source/blender/nodes/texture/node_texture_util.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index a0b219804b9..c9a5a02e277 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -119,6 +119,4 @@ void tex_do_preview(bNode *node, float *coord, float *col); void params_from_cdata(TexParams *out, TexCallData *in); -void node_tex_pass_on(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out); - #endif |