Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/attribute_access_intern.hh
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | BuiltinAttributeProvider(std::string name, | ||||
| data_type_(data_type), | data_type_(data_type), | ||||
| createable_(createable), | createable_(createable), | ||||
| writable_(writable), | writable_(writable), | ||||
| deletable_(deletable) | deletable_(deletable) | ||||
| { | { | ||||
| } | } | ||||
| virtual GVArrayPtr try_get_for_read(const GeometryComponent &component) const = 0; | virtual GVArrayPtr try_get_for_read(const GeometryComponent &component) const = 0; | ||||
| virtual GVMutableArrayPtr try_get_for_write(GeometryComponent &component) const = 0; | virtual WriteAttributeLookup try_get_for_write(GeometryComponent &component) const = 0; | ||||
| virtual bool try_delete(GeometryComponent &component) const = 0; | virtual bool try_delete(GeometryComponent &component) const = 0; | ||||
| virtual bool try_create(GeometryComponent &UNUSED(component), | virtual bool try_create(GeometryComponent &UNUSED(component), | ||||
| const AttributeInit &UNUSED(initializer)) const = 0; | const AttributeInit &UNUSED(initializer)) const = 0; | ||||
| virtual bool exists(const GeometryComponent &component) const = 0; | virtual bool exists(const GeometryComponent &component) const = 0; | ||||
| StringRefNull name() const | StringRefNull name() const | ||||
| { | { | ||||
| return name_; | return name_; | ||||
| ▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | BuiltinCustomDataLayerProvider(std::string attribute_name, | ||||
| as_read_attribute_(as_read_attribute), | as_read_attribute_(as_read_attribute), | ||||
| as_write_attribute_(as_write_attribute), | as_write_attribute_(as_write_attribute), | ||||
| update_on_write_(update_on_write), | update_on_write_(update_on_write), | ||||
| stored_as_named_attribute_(data_type_ == stored_type_) | stored_as_named_attribute_(data_type_ == stored_type_) | ||||
| { | { | ||||
| } | } | ||||
| GVArrayPtr try_get_for_read(const GeometryComponent &component) const final; | GVArrayPtr try_get_for_read(const GeometryComponent &component) const final; | ||||
| GVMutableArrayPtr try_get_for_write(GeometryComponent &component) const final; | WriteAttributeLookup try_get_for_write(GeometryComponent &component) const final; | ||||
| bool try_delete(GeometryComponent &component) const final; | bool try_delete(GeometryComponent &component) const final; | ||||
| bool try_create(GeometryComponent &component, const AttributeInit &initializer) const final; | bool try_create(GeometryComponent &component, const AttributeInit &initializer) const final; | ||||
| bool exists(const GeometryComponent &component) const final; | bool exists(const GeometryComponent &component) const final; | ||||
| }; | }; | ||||
| /** | /** | ||||
| * This is a container for multiple attribute providers that are used by one geometry component | * This is a container for multiple attribute providers that are used by one geometry component | ||||
| * type (e.g. there is a set of attribute providers for mesh components). | * type (e.g. there is a set of attribute providers for mesh components). | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||