Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Jolly <charlie>2019-08-22 12:10:11 +0300
committerJacques Lucke <mail@jlucke.com>2019-08-22 12:10:11 +0300
commit2ba233a31fead52820763fb6637dcae20eeed574 (patch)
tree9775141864615386c1e2c3d8a9e4712896505cb7 /source/blender/makesdna/DNA_node_types.h
parent0356c8f25b96bf9d8c677e51ad5106b5295cb37f (diff)
Nodes: Support for socket shapes other than circle
Previously there was already "draw_shape" property, but it was doing nothing. This commit renames the property to "display_shape". Furthermore, different shapes like SQUARE and DIAMOND are supported now. Currently, the shapes are drawn using the shader that also draws keyframes. In the future we might want to separate this. The new shapes are not used anywhere yet, but they can be used by addon developers and will probably be useful when we want to support different kinds node systems later. For example, different shapes can be used to distinguish between data and control flow. Differential Revision: https://developer.blender.org/D2829
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r--source/blender/makesdna/DNA_node_types.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 385a5bd4428..af66add01f3 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -113,7 +113,7 @@ typedef struct bNodeSocket {
short stack_index;
/* XXX deprecated, kept for forward compatibility */
short stack_type DNA_DEPRECATED;
- char draw_shape;
+ char display_shape;
char _pad[3];
/** Cached data from execution. */
@@ -153,11 +153,14 @@ typedef enum eNodeSocketDatatype {
} eNodeSocketDatatype;
/* socket shape */
-typedef enum eNodeSocketDrawShape {
- SOCK_DRAW_SHAPE_CIRCLE = 0,
- SOCK_DRAW_SHAPE_SQUARE = 1,
- SOCK_DRAW_SHAPE_DIAMOND = 2,
-} eNodeSocketDrawShape;
+typedef enum eNodeSocketDisplayShape {
+ SOCK_DISPLAY_SHAPE_CIRCLE = 0,
+ SOCK_DISPLAY_SHAPE_SQUARE = 1,
+ SOCK_DISPLAY_SHAPE_DIAMOND = 2,
+ SOCK_DISPLAY_SHAPE_CIRCLE_DOT = 3,
+ SOCK_DISPLAY_SHAPE_SQUARE_DOT = 4,
+ SOCK_DISPLAY_SHAPE_DIAMOND_DOT = 5,
+} eNodeSocketDisplayShape;
/* socket side (input/output) */
typedef enum eNodeSocketInOut {