diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-10 21:29:09 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-01-10 21:29:09 +0300 |
commit | a4a95c8d36ba705d19735ed25f2ad5afdba59017 (patch) | |
tree | 8a1dbf23079680b240216047867c5feeb308cb62 /source/blender/makesdna | |
parent | ccf06fffbcdc6895732491dec68c3136e8785432 (diff) |
Docs: Add comments to node socket struct header
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index a2b8546f623..b44366642f3 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -106,15 +106,21 @@ typedef struct bNodeSocket { /** MAX_NAME. */ char name[64]; - /* XXX deprecated, only used for the Image and OutputFile nodes, - * should be removed at some point. - */ - /** Custom storage. */ + /** Only used for the Image and OutputFile nodes, should be removed at some point. */ void *storage; - short type, flag; - /** Max. number of links. Read via nodeSocketLinkLimit, - * because the limit might be defined on the socket type. */ + /** + * The socket's data type. #eNodeSocketDatatype. + */ + short type; + /** #eNodeSocketFlag */ + short flag; + /** + * Maximum number of links that can connect to the socket. Read via #nodeSocketLinkLimit, because + * the limit might be defined on the socket type, in which case this value does not have any + * effect. It is necessary to store this in the socket because it is exposed as an RNA property + * for custom nodes. + */ short limit; /** Input/output type. */ short in_out; @@ -123,6 +129,10 @@ typedef struct bNodeSocket { /** Runtime type identifier. */ char idname[64]; + /** + * The location of the sockets, in the view-space of the node editor. + * \note These are runtime data-- only calculated when drawing, and could be removed from DNA. + */ float locx, locy; /** Default input value used for unlinked sockets. */ |