Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/geometry_set.cc
| Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | |||||
| const GeometryComponent *GeometrySet::get_component_for_read( | const GeometryComponent *GeometrySet::get_component_for_read( | ||||
| GeometryComponentType component_type) const | GeometryComponentType component_type) const | ||||
| { | { | ||||
| return components_[component_type].get(); | return components_[component_type].get(); | ||||
| } | } | ||||
| bool GeometrySet::has(const GeometryComponentType component_type) const | bool GeometrySet::has(const GeometryComponentType component_type) const | ||||
| { | { | ||||
| return components_[component_type].has_value(); | const GeometryComponentPtr &component = components_[component_type]; | ||||
| return component.has_value() && !component->is_empty(); | |||||
| } | } | ||||
| void GeometrySet::remove(const GeometryComponentType component_type) | void GeometrySet::remove(const GeometryComponentType component_type) | ||||
| { | { | ||||
| components_[component_type].reset(); | components_[component_type].reset(); | ||||
| } | } | ||||
| void GeometrySet::keep_only(const blender::Span<GeometryComponentType> component_types) | void GeometrySet::keep_only(const blender::Span<GeometryComponentType> component_types) | ||||
| ▲ Show 20 Lines • Show All 582 Lines • Show Last 20 Lines | |||||