forked from blender/blender
realize-depth #5
@ -441,9 +441,13 @@ bool BuiltinCustomDataLayerProvider::try_create(void *owner,
|
||||
if (add_custom_data_layer_from_attribute_init(
|
||||
name_, *custom_data, data_type_, element_num, initializer))
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user