Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_attribute_access.hh
| Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Used when looking up a "plain attribute" based on a name for reading from it and writing to it. | * Used when looking up a "plain attribute" based on a name for reading from it and writing to it. | ||||
| */ | */ | ||||
| struct WriteAttributeLookup { | struct WriteAttributeLookup { | ||||
| /* The virtual array that is used to read from and write to the attribute. */ | /* The virtual array that is used to read from and write to the attribute. */ | ||||
| GVMutableArrayPtr varray; | GVMutableArrayPtr varray; | ||||
| /* Domain the attributes lives on in the geometry. */ | /* Domain the attributes lives on in the geometry. */ | ||||
| AttributeDomain domain; | AttributeDomain domain; | ||||
| /* Call this after changing the attribute to invalidate caches that depend on this attribute. */ | |||||
| std::function<void()> tag_modified_fn; | |||||
| /* Convenience function to check if the attribute has been found. */ | /* Convenience function to check if the attribute has been found. */ | ||||
| operator bool() const | operator bool() const | ||||
| { | { | ||||
| return this->varray.get() != nullptr; | return this->varray.get() != nullptr; | ||||
| } | } | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines | |||||