Commit: 6467d9f812e8c301338873ddeb9aa44af7dab971
Author: Jacques Lucke
Date: Wed Jul 7 16:00:15 2021 +0200
Branches: temp-socket-inspection
https://developer.blender.org/rB6467d9f812e8c301338873ddeb9aa44af7dab971
cleanup
===================================================================
M source/blender/blenkernel/BKE_geometry_set.h
M source/blender/blenkernel/intern/geometry_set.cc
M source/blender/editors/space_node/node_draw.cc
===================================================================
diff --git a/source/blender/blenkernel/BKE_geometry_set.h
b/source/blender/blenkernel/BKE_geometry_set.h
index 5f6a9ec7b91..e121f7433f8 100644
--- a/source/blender/blenkernel/BKE_geometry_set.h
+++ b/source/blender/blenkernel/BKE_geometry_set.h
@@ -39,6 +39,8 @@ typedef enum GeometryComponentType {
GEO_COMPONENT_TYPE_CURVE = 4,
} GeometryComponentType;
+const char *BKE_geometry_component_type_name(GeometryComponentType type);
+
void BKE_geometry_set_free(struct GeometrySet *geometry_set);
bool BKE_geometry_set_has_instances(const struct GeometrySet *geometry_set);
diff --git a/source/blender/blenkernel/intern/geometry_set.cc
b/source/blender/blenkernel/intern/geometry_set.cc
index 07b4e715ea9..c3cea35e613 100644
--- a/source/blender/blenkernel/intern/geometry_set.cc
+++ b/source/blender/blenkernel/intern/geometry_set.cc
@@ -381,4 +381,22 @@ bool BKE_geometry_set_has_instances(const GeometrySet
*geometry_set)
return geometry_set->get_component_for_read<InstancesComponent>() != nullptr;
}
+const char *BKE_geometry_component_type_name(GeometryComponentType type)
+{
+ switch (type) {
+ case GEO_COMPONENT_TYPE_CURVE:
+ return "Curve";
+ case GEO_COMPONENT_TYPE_MESH:
+ return "Mesh";
+ case GEO_COMPONENT_TYPE_POINT_CLOUD:
+ return "Point Cloud";
+ case GEO_COMPONENT_TYPE_VOLUME:
+ return "Volume";
+ case GEO_COMPONENT_TYPE_INSTANCES:
+ return "Instances";
+ }
+ BLI_assert_unreachable();
+ return "";
+}
+
/** \} */
diff --git a/source/blender/editors/space_node/node_draw.cc
b/source/blender/editors/space_node/node_draw.cc
index c457008ff42..e8ecb9a19c4 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -870,23 +870,6 @@ static void
create_inspection_string_for_generic_value(const geo_log::GenericVal
}
}
-static const char *geometry_component_type_to_string(const
GeometryComponentType type)
-{
- switch (type) {
- case GEO_COMPONENT_TYPE_CURVE:
- return "Curve";
- case GEO_COMPONENT_TYPE_MESH:
- return "Mesh";
- case GEO_COMPONENT_TYPE_POINT_CLOUD:
- return "Point Cloud";
- case GEO_COMPONENT_TYPE_VOLUME:
- return "Volume";
- case GEO_COMPONENT_TYPE_INSTANCES:
- return "Instances";
- }
- return "";
-}
-
static void create_inspection_string_for_geometry(const
geo_log::GeometryValueLog &value_log,
std::stringstream &ss)
{
@@ -897,9 +880,9 @@ static void create_inspection_string_for_geometry(const
geo_log::GeometryValueLo
}
ss << "Geometry Components: ";
for (GeometryComponentType type : component_types.drop_back(1)) {
- ss << geometry_component_type_to_string(type) << ", ";
+ ss << BKE_geometry_component_type_name(type) << ", ";
}
- ss << geometry_component_type_to_string(component_types.last());
+ ss << BKE_geometry_component_type_name(component_types.last());
}
static std::optional<std::string> create_socket_inspection_string(bContext *C,
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs