diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-03-02 19:04:25 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-03-02 19:04:25 +0400 |
commit | fd553c5b7bdfd5bec1cc005bc67785c54916a64a (patch) | |
tree | 35dc06e8085b1ede7208fc545f9919426583e217 /source/blender/blenkernel | |
parent | 6137ae29c110c755e7892d28bf7052fb319aa746 (diff) |
Fix T37334: Better "internal links" function for muting and node disconnect.
Implements a more flexible internal connect function for standard nodes
(compositor, shader, texture). Allow feasible datatype connections by
priority.
The priorities for common datatypes in compositor, shader and texture
nodes are encoded in a simple function. Certain impossible connections
(e.g. color -> cycles shader) are excluded by giving them -1 priority.
Priority overrides link status: If a higher priority input can be found,
this will be used regardless of link status. Link status only comes into
play for inputs with same priority.
Reviewers: brecht
CC: sebastian_k
Differential Revision: https://developer.blender.org/D356
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 59ea921e11e..d37e16e6349 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -101,6 +101,8 @@ typedef struct bNodeSocketTemplate { float min, max; int subtype; /* would use PropertySubType but this is a bad level include to use RNA */ int flag; + /* optional: allowed inputs for internal links */ + const bool *internal_links; /* after this line is used internal only */ struct bNodeSocket *sock; /* used to hold verified socket */ |