diff options
author | Hans Goudey <h.goudey@me.com> | 2021-09-28 20:05:42 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-09-28 20:05:42 +0300 |
commit | 797064544ea3e176c511f7ff7c1303498a783182 (patch) | |
tree | ee3cef6afe9024da7e1496361a7b7a0bb62f93ae /source/blender/makesdna | |
parent | 44e4f077a9d7b5b609f6199874802675d75f7266 (diff) |
Geometry Nodes: Only show attribute toggle for field inputs
Change the toggle to switch between an attribute and a single value to
only display for inputs that are fields, as determined statically by
the field inferencing added in rB61f3d4eb7c7db7. This means the field
inferencing must be calculated on file load, since it's used in the UI.
Differential Revision: https://developer.blender.org/D12623
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 34c74e5bd88..f7f2ccaa7be 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -463,7 +463,15 @@ typedef struct bNodeLink { #define NTREE_CHUNKSIZE_512 512 #define NTREE_CHUNKSIZE_1024 1024 +/** Workaround to forward-declare C++ type in C header. */ +#ifdef __cplusplus +namespace blender::nodes { struct FieldInferencingInterface; +} +using FieldInferencingInterfaceHandle = blender::nodes::FieldInferencingInterface; +#else +typedef struct FieldInferencingInterfaceHandle FieldInferencingInterfaceHandle; +#endif /* the basis for a Node tree, all links and nodes reside internal here */ /* only re-usable node trees are in the library though, @@ -488,7 +496,7 @@ typedef struct bNodeTree { ListBase nodes, links; /** Information about how inputs and outputs of the node group interact with fields. */ - struct FieldInferencingInterface *field_inferencing_interface; + FieldInferencingInterfaceHandle *field_inferencing_interface; /** Set init on fileread. */ int type, init; |