diff options
author | Aaron Carlisle <Blendify> | 2021-12-06 21:39:19 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-06 21:40:02 +0300 |
commit | 9792994311d6268da52208e77d26a1a86c024534 (patch) | |
tree | b3bdba5d0cceee259213222abd59025f7a514590 /source/blender/nodes/NOD_socket_declarations.hh | |
parent | 2d4c7fa896ab4a6de163cd33746b54e67c7f8bac (diff) |
Nodes: Add function to set compact socket flag for vectors
This flag is currently only used for vector sockets
so the function is limited to the vector builder.
The flag is only used by two shader nodes at the moment
and this is needed to port them over to the new socket declaration API.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D13490
Diffstat (limited to 'source/blender/nodes/NOD_socket_declarations.hh')
-rw-r--r-- | source/blender/nodes/NOD_socket_declarations.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_socket_declarations.hh b/source/blender/nodes/NOD_socket_declarations.hh index 7284accd1ec..98c8fa68876 100644 --- a/source/blender/nodes/NOD_socket_declarations.hh +++ b/source/blender/nodes/NOD_socket_declarations.hh @@ -104,6 +104,7 @@ class VectorBuilder : public SocketDeclarationBuilder<Vector> { VectorBuilder &subtype(PropertySubType subtype); VectorBuilder &min(const float min); VectorBuilder &max(const float max); + VectorBuilder &compact(); }; class BoolBuilder; @@ -315,6 +316,12 @@ inline VectorBuilder &VectorBuilder::max(const float max) return *this; } +inline VectorBuilder &VectorBuilder::compact() +{ + decl_->compact_ = true; + return *this; +} + /** \} */ /* -------------------------------------------------------------------- */ |