Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/attribute_access_intern.hh
| Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | bool foreach_attribute(const GeometryComponent &component, | ||||
| const AttributeForeachCallback callback) const final; | const AttributeForeachCallback callback) const final; | ||||
| void foreach_domain(const FunctionRef<void(AttributeDomain)> callback) const final; | void foreach_domain(const FunctionRef<void(AttributeDomain)> callback) const final; | ||||
| }; | }; | ||||
| /** | /** | ||||
| * This provider is used to provide access to builtin attributes. It supports making internal types | * This provider is used to provide access to builtin attributes. It supports making internal types | ||||
| * available as different types. For example, the vertex position attribute is stored as part of | * available as different types. For example, the vertex position attribute is stored as part of | ||||
| * the #MVert struct, but is exposed as float3 attribute. | * the #MVert struct, but is exposed as float3 attribute. | ||||
| * | |||||
| * It also supports named builtin attributes, and will look up attributes in #CustomData by name | |||||
| * if the stored type is the same as the attribute type. | |||||
| */ | */ | ||||
| class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider { | class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider { | ||||
| using AsReadAttribute = GVArrayPtr (*)(const void *data, const int domain_size); | using AsReadAttribute = GVArrayPtr (*)(const void *data, const int domain_size); | ||||
| using AsWriteAttribute = GVMutableArrayPtr (*)(void *data, const int domain_size); | using AsWriteAttribute = GVMutableArrayPtr (*)(void *data, const int domain_size); | ||||
| using UpdateOnRead = void (*)(const GeometryComponent &component); | using UpdateOnRead = void (*)(const GeometryComponent &component); | ||||
| using UpdateOnWrite = void (*)(GeometryComponent &component); | using UpdateOnWrite = void (*)(GeometryComponent &component); | ||||
| const CustomDataType stored_type_; | const CustomDataType stored_type_; | ||||
| const CustomDataAccessInfo custom_data_access_; | const CustomDataAccessInfo custom_data_access_; | ||||
| ▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines | |||||