forked from blender/blender
realize-depth #5
@ -441,8 +441,12 @@ bool BuiltinCustomDataLayerProvider::try_create(void *owner,
|
||||
if (add_custom_data_layer_from_attribute_init(
|
||||
name_, *custom_data, data_type_, element_num, initializer))
|
||||
{
|
||||
if (update_on_change_ != nullptr) {
|
||||
update_on_change_(owner);
|
||||
if (initializer.type != AttributeInit::Type::Construct) {
|
||||
/* Avoid calling update function when values are not initialized. In that case
|
||||
* values must be set elsewhere anyway, which will cause a separate update tag. */
|
||||
if (update_on_change_ != nullptr) {
|
||||
update_on_change_(owner);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user