Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-03-23 18:56:38 +0300
committerJacques Lucke <jacques@blender.org>2021-03-23 18:56:38 +0300
commit3a68dcb1e61e2be5757b8e7f45fa8a21d5cfb46f (patch)
tree9c27c83352ca165caeee958c49be8f4782e2ad48 /source/blender/blenkernel/intern/geometry_component_pointcloud.cc
parent9a2e623372cbdbffc0daf25427fdf72e1cdb9b51 (diff)
Cleanup: allow looking up size of unsupported domains
There isn't really a reason for not supporting it.
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_component_pointcloud.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_pointcloud.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_pointcloud.cc b/source/blender/blenkernel/intern/geometry_component_pointcloud.cc
index 073f457ae54..32c4ee8a6a6 100644
--- a/source/blender/blenkernel/intern/geometry_component_pointcloud.cc
+++ b/source/blender/blenkernel/intern/geometry_component_pointcloud.cc
@@ -115,11 +115,12 @@ bool PointCloudComponent::is_empty() const
int PointCloudComponent::attribute_domain_size(const AttributeDomain domain) const
{
- BLI_assert(domain == ATTR_DOMAIN_POINT);
- UNUSED_VARS_NDEBUG(domain);
if (pointcloud_ == nullptr) {
return 0;
}
+ if (domain != ATTR_DOMAIN_POINT) {
+ return 0;
+ }
return pointcloud_->totpoint;
}