[Bf-blender-cvs] [7c10fa0ac3a] functions: object list type

Jacques Lucke noreply at git.blender.org
Tue Jul 9 18:01:48 CEST 2019


Commit: 7c10fa0ac3ad0a75d24afdc2a930c984a6b4e86b
Author: Jacques Lucke
Date:   Tue Jul 9 16:20:40 2019 +0200
Branches: functions
https://developer.blender.org/rB7c10fa0ac3ad0a75d24afdc2a930c984a6b4e86b

object list type

===================================================================

M	source/blender/functions/frontends/data_flow_nodes/builder.cpp
M	source/blender/functions/types/numeric_lists.cpp
M	source/blender/functions/types/numeric_lists.hpp

===================================================================

diff --git a/source/blender/functions/frontends/data_flow_nodes/builder.cpp b/source/blender/functions/frontends/data_flow_nodes/builder.cpp
index b5427e4fa70..f2104f75f2a 100644
--- a/source/blender/functions/frontends/data_flow_nodes/builder.cpp
+++ b/source/blender/functions/frontends/data_flow_nodes/builder.cpp
@@ -244,6 +244,9 @@ SharedType &BTreeGraphBuilder::type_by_name(const char *data_type) const
   else if (STREQ(data_type, "Boolean")) {
     return Types::GET_TYPE_bool();
   }
+  else if (STREQ(data_type, "Object")) {
+    return Types::GET_TYPE_object();
+  }
   else if (STREQ(data_type, "Float List")) {
     return Types::GET_TYPE_float_list();
   }
@@ -256,6 +259,9 @@ SharedType &BTreeGraphBuilder::type_by_name(const char *data_type) const
   else if (STREQ(data_type, "Boolean List")) {
     return Types::GET_TYPE_bool_list();
   }
+  else if (STREQ(data_type, "Object List")) {
+    return Types::GET_TYPE_object_list();
+  }
   else {
     BLI_assert(false);
     return *(SharedType *)nullptr;
diff --git a/source/blender/functions/types/numeric_lists.cpp b/source/blender/functions/types/numeric_lists.cpp
index 3944c8ea14a..c36bb9d709b 100644
--- a/source/blender/functions/types/numeric_lists.cpp
+++ b/source/blender/functions/types/numeric_lists.cpp
@@ -56,5 +56,10 @@ BLI_LAZY_INIT(SharedType, GET_TYPE_bool_list)
   return create_list_type<bool>("Bool List");
 }
 
+BLI_LAZY_INIT(SharedType, GET_TYPE_object_list)
+{
+  return create_list_type<Object *>("Object List");
+}
+
 }  // namespace Types
 }  // namespace FN
diff --git a/source/blender/functions/types/numeric_lists.hpp b/source/blender/functions/types/numeric_lists.hpp
index a8b5ab09f1f..c97fae89005 100644
--- a/source/blender/functions/types/numeric_lists.hpp
+++ b/source/blender/functions/types/numeric_lists.hpp
@@ -4,6 +4,8 @@
 #include "lists.hpp"
 #include "numeric.hpp"
 
+struct Object;
+
 namespace FN {
 namespace Types {
 
@@ -11,11 +13,13 @@ using SharedFloatList = SharedList<float>;
 using SharedFloat3List = SharedList<float3>;
 using SharedInt32List = SharedList<int32_t>;
 using SharedBoolList = SharedList<bool>;
+using SharedObjectList = SharedList<Object *>;
 
 SharedType &GET_TYPE_float_list();
 SharedType &GET_TYPE_float3_list();
 SharedType &GET_TYPE_int32_list();
 SharedType &GET_TYPE_bool_list();
+SharedType &GET_TYPE_object_list();
 
 }  // namespace Types
 }  // namespace FN



More information about the Bf-blender-cvs mailing list