Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-07-24 03:59:59 +0300
committerHans Goudey <h.goudey@me.com>2022-07-24 03:59:59 +0300
commitc94c0d988a5640ab7c6fb815462792dcf8dd863b (patch)
tree4e8d03520ec1f9a7ef4ae0236a6d93ea13fae114 /source/blender/blenkernel/intern/attribute_access_intern.hh
parent0c3851d31fa89642797f00da179ca91702c28697 (diff)
Fix: Removing attributes from UI invalidates caches
Use the new attribute API to implement the attribute remove function used by RNA, except for BMesh attributes. Currently, removing curve attributes from the panel in the property editor does not mark the relevant caches dirty (for example, the cache of curve type counts), because that behavior is implemented with the new attribute API. Also, eventually we want to merge the two APIs, and removing an attribute is the first function that can be partially implemented with the new API. Differential Revision: https://developer.blender.org/D15495
Diffstat (limited to 'source/blender/blenkernel/intern/attribute_access_intern.hh')
-rw-r--r--source/blender/blenkernel/intern/attribute_access_intern.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/attribute_access_intern.hh b/source/blender/blenkernel/intern/attribute_access_intern.hh
index 17432fa2726..1a2607d9403 100644
--- a/source/blender/blenkernel/intern/attribute_access_intern.hh
+++ b/source/blender/blenkernel/intern/attribute_access_intern.hh
@@ -226,12 +226,12 @@ class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider {
using AsReadAttribute = GVArray (*)(const void *data, int element_num);
using AsWriteAttribute = GVMutableArray (*)(void *data, int element_num);
using UpdateOnRead = void (*)(const void *owner);
- using UpdateOnWrite = void (*)(void *owner);
+ using UpdateOnChange = void (*)(void *owner);
const eCustomDataType stored_type_;
const CustomDataAccessInfo custom_data_access_;
const AsReadAttribute as_read_attribute_;
const AsWriteAttribute as_write_attribute_;
- const UpdateOnWrite update_on_write_;
+ const UpdateOnChange update_on_change_;
bool stored_as_named_attribute_;
public:
@@ -245,14 +245,14 @@ class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider {
const CustomDataAccessInfo custom_data_access,
const AsReadAttribute as_read_attribute,
const AsWriteAttribute as_write_attribute,
- const UpdateOnWrite update_on_write)
+ const UpdateOnChange update_on_write)
: BuiltinAttributeProvider(
std::move(attribute_name), domain, attribute_type, creatable, writable, deletable),
stored_type_(stored_type),
custom_data_access_(custom_data_access),
as_read_attribute_(as_read_attribute),
as_write_attribute_(as_write_attribute),
- update_on_write_(update_on_write),
+ update_on_change_(update_on_write),
stored_as_named_attribute_(data_type_ == stored_type_)
{
}