|
Blender V5.0
|
#include <BKE_attribute.hh>
Public Member Functions | |
| SpanAttributeWriter ()=default | |
| SpanAttributeWriter (AttributeWriter< T > &&other, const bool copy_values_to_span) | |
| operator bool () const | |
| void | finish () |
Public Attributes | |
| MutableVArraySpan< T > | span |
| AttrDomain | domain |
| std::function< void()> | tag_modified_fn |
A version of AttributeWriter for the common case when the user of the attribute wants to write to a span instead of a virtual array. Since most attributes are spans internally, this can result in better performance and also simplifies code.
Definition at line 285 of file BKE_attribute.hh.
|
default |
|
inline |
Definition at line 301 of file BKE_attribute.hh.
|
inline |
Has to be called when done writing to the attribute. This makes sure that the data is copied to the underlying attribute if it was not stored as an array. Furthermore, this may invalidate other data depending on the modified attribute.
Definition at line 318 of file BKE_attribute.hh.
|
inline |
Definition at line 308 of file BKE_attribute.hh.
| AttrDomain blender::bke::SpanAttributeWriter< T >::domain |
Domain of the attribute. Also determines the size of the span.
Definition at line 293 of file BKE_attribute.hh.
| MutableVArraySpan<T> blender::bke::SpanAttributeWriter< T >::span |
A span based on the virtual array that contains the attribute data. This may be empty.
Definition at line 289 of file BKE_attribute.hh.
| std::function<void()> blender::bke::SpanAttributeWriter< T >::tag_modified_fn |
Has to be called after writing to the span.
Definition at line 297 of file BKE_attribute.hh.