|
Blender
V2.93
|
#include <BKE_geometry_set.hh>
Inherited by InstancesComponent, MeshComponent, PointCloudComponent, and VolumeComponent.
Public Member Functions | |
| virtual | ~GeometryComponent ()=default |
| virtual GeometryComponent * | copy () const =0 |
| virtual bool | owns_direct_data () const =0 |
| virtual void | ensure_owns_direct_data ()=0 |
| template<typename T > | |
| blender::bke::TypedReadAttribute< T > | attribute_get_for_read (const blender::StringRef attribute_name, const AttributeDomain domain, const T &default_value) const |
| template<typename T > | |
| blender::bke::TypedReadAttribute< T > | attribute_get_constant_for_read (const AttributeDomain domain, const T &value) const |
Geometry Component | |
| GeometryComponent (GeometryComponentType type) | |
| void | user_add () const |
| void | user_remove () const |
| bool | is_mutable () const |
| GeometryComponentType | type () const |
| virtual bool | is_empty () const |
| static GeometryComponent * | create (GeometryComponentType component_type) |
This is the base class for specialized geometry component types.
Definition at line 129 of file BKE_geometry_set.hh.
| GeometryComponent::GeometryComponent | ( | GeometryComponentType | type | ) |
Definition at line 48 of file geometry_set.cc.
|
virtualdefault |
|
virtual |
Reimplemented in PointCloudComponent, and MeshComponent.
Definition at line 706 of file attribute_access.cc.
Referenced by blender::nodes::add_instances_from_geometry_component(), blender::nodes::separate_points_from_component(), and blender::ed::spreadsheet::GeometryDataSource::tot_rows().
| bool GeometryComponent::attribute_domain_supported | ( | const AttributeDomain | domain | ) | const |
Definition at line 696 of file attribute_access.cc.
References blender::bke::ComponentAttributeProviders::supported_domains().
Referenced by blender::nodes::separate_points_from_component().
| bool GeometryComponent::attribute_exists | ( | const blender::StringRef | attribute_name | ) | const |
Definition at line 868 of file attribute_access.cc.
| bool GeometryComponent::attribute_foreach | ( | const AttributeForeachCallback | callback | ) | const |
Definition at line 831 of file attribute_access.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::bke::ComponentAttributeProviders::builtin_attribute_providers(), callback, AttributeMetaData::domain, and blender::bke::ComponentAttributeProviders::dynamic_attribute_providers().
Referenced by blender::ed::spreadsheet::GeometryDataSource::foreach_default_column_ids().
| blender::bke::ReadAttributePtr GeometryComponent::attribute_get_constant_for_read | ( | const AttributeDomain | domain, |
| const CustomDataType | data_type, | ||
| const void * | value | ||
| ) | const |
Definition at line 957 of file attribute_access.cc.
References BLI_assert, blender::bke::custom_data_type_to_cpp_type(), and blender::fn::CPPType::default_value().
Referenced by attribute_get_constant_for_read().
|
inline |
Definition at line 240 of file BKE_geometry_set.hh.
References attribute_get_constant_for_read(), blender::bke::cpp_type_to_custom_data_type(), and type().
| blender::bke::ReadAttributePtr GeometryComponent::attribute_get_constant_for_read_converted | ( | const AttributeDomain | domain, |
| const CustomDataType | in_data_type, | ||
| const CustomDataType | out_data_type, | ||
| const void * | value | ||
| ) | const |
Definition at line 971 of file attribute_access.cc.
References BLI_assert, blender::nodes::DataTypeConversions::convert_to_uninitialized(), blender::bke::custom_data_type_to_cpp_type(), blender::fn::CPPType::destruct(), blender::nodes::get_implicit_type_conversions(), blender::nodes::DataTypeConversions::is_convertible(), and blender::fn::CPPType::size().
| ReadAttributePtr GeometryComponent::attribute_get_for_read | ( | const blender::StringRef | attribute_name, |
| const AttributeDomain | domain, | ||
| const CustomDataType | data_type, | ||
| const void * | default_value | ||
| ) | const |
Definition at line 945 of file attribute_access.cc.
Referenced by blender::nodes::add_instances_from_geometry_component(), attribute_get_for_read(), blender::nodes::interpolate_existing_attributes(), and blender::nodes::separate_points_from_component().
|
inline |
Definition at line 215 of file BKE_geometry_set.hh.
References attribute_get_for_read(), blender::bke::cpp_type_to_custom_data_type(), and type().
| Set< std::string > GeometryComponent::attribute_names | ( | ) | const |
Definition at line 817 of file attribute_access.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), and UNUSED.
Referenced by blender::nodes::copy_attributes_based_on_mask().
|
virtual |
Reimplemented in MeshComponent.
Definition at line 734 of file attribute_access.cc.
| bool GeometryComponent::attribute_try_create | ( | const blender::StringRef | attribute_name, |
| const AttributeDomain | domain, | ||
| const CustomDataType | data_type | ||
| ) |
Definition at line 785 of file attribute_access.cc.
References blender::bke::ComponentAttributeProviders::builtin_attribute_providers(), blender::bke::BuiltinAttributeProvider::data_type(), blender::bke::BuiltinAttributeProvider::domain(), blender::bke::ComponentAttributeProviders::dynamic_attribute_providers(), blender::StringRefBase::is_empty(), and blender::bke::BuiltinAttributeProvider::try_create().
Referenced by OutputAttributePtr::save().
| bool GeometryComponent::attribute_try_delete | ( | const blender::StringRef | attribute_name | ) |
Definition at line 765 of file attribute_access.cc.
References blender::bke::ComponentAttributeProviders::builtin_attribute_providers(), blender::bke::ComponentAttributeProviders::dynamic_attribute_providers(), and blender::bke::BuiltinAttributeProvider::try_delete().
Referenced by OutputAttributePtr::save().
| OutputAttributePtr GeometryComponent::attribute_try_get_for_output | ( | const blender::StringRef | attribute_name, |
| const AttributeDomain | domain, | ||
| const CustomDataType | data_type, | ||
| const void * | default_value = nullptr |
||
| ) |
If an attribute with the given params exist, it is returned. If no attribute with the given name exists, create it and fill it with the default value if it is provided. If an attribute with the given name but different domain or type exists, a temporary attribute is created that has to be saved after the output has been computed. This avoids deleting another attribute, before a computation is finished.
This might return no attribute when the attribute cannot exist on the component.
Definition at line 1004 of file attribute_access.cc.
References BLI_assert, blender::bke::custom_data_type_to_cpp_type(), data, and blender::fn::CPPType::fill_initialized().
Referenced by blender::nodes::calculate_sphere_uvs(), blender::nodes::calculate_uvs(), and blender::nodes::copy_attributes_based_on_mask().
| ReadAttributePtr GeometryComponent::attribute_try_get_for_read | ( | const blender::StringRef | attribute_name | ) | const |
Definition at line 711 of file attribute_access.cc.
References blender::bke::ComponentAttributeProviders::builtin_attribute_providers(), blender::bke::ComponentAttributeProviders::dynamic_attribute_providers(), and blender::bke::BuiltinAttributeProvider::try_get_for_read().
Referenced by blender::nodes::copy_attributes_based_on_mask(), blender::ed::spreadsheet::GeometryDataSource::get_column_values(), and blender::nodes::interpolate_existing_attributes().
| ReadAttributePtr GeometryComponent::attribute_try_get_for_read | ( | const blender::StringRef | attribute_name, |
| const AttributeDomain | domain | ||
| ) | const |
Definition at line 923 of file attribute_access.cc.
| ReadAttributePtr GeometryComponent::attribute_try_get_for_read | ( | const blender::StringRef | attribute_name, |
| const AttributeDomain | domain, | ||
| const CustomDataType | data_type | ||
| ) | const |
Definition at line 894 of file attribute_access.cc.
References ATTR_DOMAIN_AUTO, BLI_assert, blender::bke::custom_data_type_to_cpp_type(), and try_adapt_data_type().
| WriteAttributePtr GeometryComponent::attribute_try_get_for_write | ( | const blender::StringRef | attribute_name | ) |
Definition at line 743 of file attribute_access.cc.
References blender::bke::ComponentAttributeProviders::builtin_attribute_providers(), blender::bke::ComponentAttributeProviders::dynamic_attribute_providers(), and blender::bke::BuiltinAttributeProvider::try_get_for_write().
Referenced by OutputAttributePtr::save().
|
pure virtual |
Implemented in VolumeComponent, InstancesComponent, PointCloudComponent, and MeshComponent.
|
static |
Definition at line 52 of file geometry_set.cc.
References BLI_assert_unreachable, GEO_COMPONENT_TYPE_INSTANCES, GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD, and GEO_COMPONENT_TYPE_VOLUME.
Referenced by GeometrySet::get_component_for_write().
|
pure virtual |
Implemented in VolumeComponent, InstancesComponent, PointCloudComponent, and MeshComponent.
Referenced by GeometrySet::ensure_owns_direct_data().
|
virtual |
Reimplemented in InstancesComponent, PointCloudComponent, and MeshComponent.
Definition at line 93 of file geometry_set.cc.
| bool GeometryComponent::is_mutable | ( | ) | const |
Definition at line 81 of file geometry_set.cc.
Referenced by MeshComponent::clear(), PointCloudComponent::clear(), VolumeComponent::clear(), MeshComponent::copy_vertex_group_names_from_object(), MeshComponent::ensure_owns_direct_data(), PointCloudComponent::ensure_owns_direct_data(), InstancesComponent::ensure_owns_direct_data(), VolumeComponent::ensure_owns_direct_data(), MeshComponent::get_for_write(), PointCloudComponent::get_for_write(), VolumeComponent::get_for_write(), MeshComponent::release(), PointCloudComponent::release(), VolumeComponent::release(), MeshComponent::replace(), PointCloudComponent::replace(), VolumeComponent::replace(), and MeshComponent::replace_mesh_but_keep_vertex_group_names().
|
pure virtual |
Implemented in VolumeComponent, InstancesComponent, PointCloudComponent, and MeshComponent.
Referenced by GeometrySet::ensure_owns_direct_data().
| GeometryComponentType GeometryComponent::type | ( | ) | const |
Definition at line 88 of file geometry_set.cc.
Referenced by attribute_get_constant_for_read(), attribute_get_for_read(), and blender::ed::spreadsheet::GeometryDataSource::get_selected_element_indices().
| void GeometryComponent::user_add | ( | ) | const |
Definition at line 68 of file geometry_set.cc.
| void GeometryComponent::user_remove | ( | ) | const |
Definition at line 73 of file geometry_set.cc.