diff options
author | Jacques Lucke <jacques@blender.org> | 2021-03-10 13:53:17 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-03-10 13:53:31 +0300 |
commit | 368647bd25d6bb0b32f5e439838c06e0e46ac8da (patch) | |
tree | c7c427ef51416358d34413b67f74836db3f96e47 /source/blender/blenkernel/BKE_geometry_set.hh | |
parent | 122fefcc8589a09d4e89ed3045f29f07ec6564e9 (diff) |
Geometry Nodes: move geometry component type enum to C
This allows us to use it in rna for the spreadsheet editor.
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index ad01814ce82..632fff07575 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -40,16 +40,6 @@ struct Object; struct PointCloud; struct Volume; -/* Each geometry component has a specific type. The type determines what kind of data the component - * stores. Functions modifying a geometry will usually just modify a subset of the component types. - */ -enum class GeometryComponentType { - Mesh = 0, - PointCloud = 1, - Instances = 2, - Volume = 3, -}; - enum class GeometryOwnershipType { /* The geometry is owned. This implies that it can be changed. */ Owned = 0, @@ -392,7 +382,7 @@ class MeshComponent : public GeometryComponent { bool is_empty() const final; - static constexpr inline GeometryComponentType static_type = GeometryComponentType::Mesh; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_MESH; private: const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final; @@ -422,7 +412,7 @@ class PointCloudComponent : public GeometryComponent { bool is_empty() const final; - static constexpr inline GeometryComponentType static_type = GeometryComponentType::PointCloud; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_POINT_CLOUD; private: const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final; @@ -462,7 +452,7 @@ class InstancesComponent : public GeometryComponent { bool is_empty() const final; - static constexpr inline GeometryComponentType static_type = GeometryComponentType::Instances; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_INSTANCES; }; /** A geometry component that stores volume grids. */ @@ -484,5 +474,5 @@ class VolumeComponent : public GeometryComponent { const Volume *get_for_read() const; Volume *get_for_write(); - static constexpr inline GeometryComponentType static_type = GeometryComponentType::Volume; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_VOLUME; }; |