50#define ATTR_DOMAIN_NUM 7
181 return std::move(this->varray);
184 operator bool()
const
201 operator bool()
const
203 return this->function !=
nullptr;
232 operator bool()
const
242 if (this->tag_modified_fn) {
270 :
span(std::move(other.varray), copy_values_to_span),
276 operator bool()
const
278 return span.varray();
288 if (this->span.
varray()) {
291 if (this->tag_modified_fn) {
305 operator bool()
const
322 return std::move(this->varray);
339 operator bool()
const
346 if (this->tag_modified_fn) {
368 :
span(std::move(other.varray), copy_values_to_span),
374 operator bool()
const
376 return span.varray();
381 if (this->span.
varray()) {
384 if (this->tag_modified_fn) {
404 mutable bool stop_iteration_ =
false;
418 stop_iteration_ =
true;
423 return stop_iteration_;
434 std::optional<eCustomDataType>
data_type)
const;
438 return this->
get(domain, std::nullopt);
518 static std::optional<AttributeAccessor>
from_id(
const ID &
id);
535 return fn_->domain_supported(
owner_, domain);
552 return fn_->is_builtin(
owner_, attribute_id);
561 return fn_->lookup(
owner_, attribute_id);
569 std::optional<AttrDomain> domain,
570 std::optional<eCustomDataType> data_type)
const;
578 return this->
lookup(attribute_id, domain, std::nullopt);
587 return this->
lookup(attribute_id, std::nullopt, data_type);
596 const std::optional<AttrDomain> domain = std::nullopt)
const
600 return this->
lookup(attribute_id, domain, data_type).
typed<
T>();
612 const void *default_value =
nullptr)
const;
620 const T &default_value)
const
633 return fn_->lookup_validator(
owner_, attribute_id);
643 return fn_->adapt_domain(
owner_, varray, from_domain, to_domain);
742 return fn_->add(
owner_, attribute_id, domain, data_type, initializer);
749 return this->
add(attribute_id, domain, data_type, initializer);
798 attribute_id, domain, initializer);
842 return fn_->remove(
owner_, attribute_id);
880 const AttributeFilter &attribute_filter,
882 MutableAttributeAccessor dst_attributes);
890 const AttributeFilter &attribute_filter,
892 MutableAttributeAccessor dst_attributes);
902 const AttributeFilter &attribute_filter,
906 MutableAttributeAccessor dst_attributes);
911 const AttributeFilter &attribute_filter,
914 MutableAttributeAccessor dst_attributes);
919 const AttributeFilter &attribute_filter,
920 MutableAttributeAccessor dst_attributes);
925 const AttributeFilter &attribute_filter,
929 MutableAttributeAccessor dst_attributes);
933 const AttributeFilter &attribute_filter,
Generic geometry attributes built on CustomData.
#define BLI_STRUCT_EQUALITY_OPERATORS_2(Type, m1, m2)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color attribute
static const CPPType & get()
const GVMutableArray & varray() const
VArray< T > typed() const
const VMutableArray< T > & varray() const
static VArray ForSingle(T value, const int64_t size)
GAttributeReader lookup(const StringRef attribute_id, const eCustomDataType data_type) const
bool is_builtin(const StringRef attribute_id) const
void foreach_attribute(const FunctionRef< void(const AttributeIter &)> fn) const
AttributeReader< T > lookup(const StringRef attribute_id, const std::optional< AttrDomain > domain=std::nullopt) const
AttributeValidator lookup_validator(const StringRef attribute_id) const
AttributeReader< T > lookup_or_default(const StringRef attribute_id, const AttrDomain domain, const T &default_value) const
static std::optional< AttributeAccessor > from_id(const ID &id)
GVArray adapt_domain(const GVArray &varray, const AttrDomain from_domain, const AttrDomain to_domain) const
GAttributeReader lookup(const StringRef attribute_id) const
VArray< T > adapt_domain(const VArray< T > &varray, const AttrDomain from_domain, const AttrDomain to_domain) const
Set< StringRefNull > all_ids() const
std::optional< AttributeMetaData > lookup_meta_data(const StringRef attribute_id) const
GAttributeReader lookup_or_default(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const void *default_value=nullptr) const
GAttributeReader lookup(const StringRef attribute_id, const AttrDomain domain) const
bool domain_supported(const AttrDomain domain) const
AttributeAccessor(const void *owner, const AttributeAccessorFunctions &fn)
int domain_size(const AttrDomain domain) const
bool contains(const StringRef attribute_id) const
const AttributeAccessorFunctions * fn_
GAttributeReader get(const AttrDomain domain) const
AttributeReader< T > get(const std::optional< AttrDomain > domain=std::nullopt) const
eCustomDataType data_type
GAttributeReader get(const eCustomDataType data_type) const
AttributeIter(const StringRefNull name, const AttrDomain domain, const eCustomDataType data_type, const FunctionRef< GAttributeReader()> get_fn)
GAttributeReader get() const
const AttributeAccessor * accessor
GSpanAttributeWriter lookup_or_add_for_write_span(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer=AttributeInitDefaultValue())
GAttributeWriter lookup_or_add_for_write(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer=AttributeInitDefaultValue())
SpanAttributeWriter< T > lookup_for_write_span(const StringRef attribute_id)
GAttributeWriter lookup_for_write(StringRef attribute_id)
AttributeWriter< T > lookup_or_add_for_write(const StringRef attribute_id, const AttrDomain domain, const AttributeInit &initializer=AttributeInitDefaultValue())
bool remove(const StringRef attribute_id)
SpanAttributeWriter< T > lookup_or_add_for_write_only_span(const StringRef attribute_id, const AttrDomain domain)
bool add(const StringRef attribute_id, const AttrDomain domain, const eCustomDataType data_type, const AttributeInit &initializer)
bool rename(StringRef old_attribute_id, StringRef new_attribute_id)
bool add(const StringRef attribute_id, const AttrDomain domain, const AttributeInit &initializer)
AttributeWriter< T > lookup_for_write(const StringRef attribute_id)
MutableAttributeAccessor(void *owner, const AttributeAccessorFunctions &fn)
GSpanAttributeWriter lookup_or_add_for_write_only_span(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type)
GSpanAttributeWriter lookup_for_write_span(StringRef attribute_id)
SpanAttributeWriter< T > lookup_or_add_for_write_span(const StringRef attribute_id, const AttrDomain domain, const AttributeInit &initializer=AttributeInitDefaultValue())
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
Vector< AttributeTransferData > retrieve_attributes_for_transfer(const AttributeAccessor src_attributes, MutableAttributeAccessor dst_attributes, AttrDomainMask domain_mask, const AttributeFilter &attribute_filter={})
void fill_attribute_range_default(MutableAttributeAccessor dst_attributes, AttrDomain domain, const AttributeFilter &attribute_filter, IndexRange range)
void gather_attributes_to_groups(AttributeAccessor src_attributes, AttrDomain src_domain, AttrDomain dst_domain, const AttributeFilter &attribute_filter, OffsetIndices< int > dst_offsets, const IndexMask &src_selection, MutableAttributeAccessor dst_attributes)
bool allow_procedural_attribute_access(StringRef attribute_name)
eCustomDataType cpp_type_to_custom_data_type(const CPPType &type)
void copy_attributes(const AttributeAccessor src_attributes, AttrDomain src_domain, AttrDomain dst_domain, const AttributeFilter &attribute_filter, MutableAttributeAccessor dst_attributes)
const char * no_procedural_access_message
void gather_attributes(AttributeAccessor src_attributes, AttrDomain src_domain, AttrDomain dst_domain, const AttributeFilter &attribute_filter, const IndexMask &selection, MutableAttributeAccessor dst_attributes)
FunctionRef< bool(StringRefNull attribute_id, const AttributeMetaData &meta_data)> AttributeForeachCallback
eCustomDataType attribute_data_type_highest_complexity(Span< eCustomDataType > data_types)
AttrDomain attribute_domain_highest_priority(Span< AttrDomain > domains)
const CPPType * custom_data_type_to_cpp_type(eCustomDataType type)
void gather_attributes_group_to_group(AttributeAccessor src_attributes, AttrDomain src_domain, AttrDomain dst_domain, const AttributeFilter &attribute_filter, OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, MutableAttributeAccessor dst_attributes)
void copy_attributes_group_to_group(AttributeAccessor src_attributes, AttrDomain src_domain, AttrDomain dst_domain, const AttributeFilter &attribute_filter, OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, MutableAttributeAccessor dst_attributes)
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type pos vertex_in(1, Type::UINT, "data") .vertex_out(overlay_edit_curve_handle_iface) .geometry_layout(PrimitiveIn Frequency::GEOMETRY storage_buf(1, Qualifier::READ, "uint", "data[]", Frequency::GEOMETRY) .push_constant(Type Frequency::GEOMETRY selection[]
GVArray(* adapt_domain)(const void *owner, const GVArray &varray, AttrDomain from_domain, AttrDomain to_domain)
void(* foreach_attribute)(const void *owner, FunctionRef< void(const AttributeIter &iter)> fn, const AttributeAccessor &accessor)
bool(* remove)(void *owner, StringRef attribute_id)
bool(* domain_supported)(const void *owner, AttrDomain domain)
GAttributeWriter(* lookup_for_write)(void *owner, StringRef attribute_id)
bool(* is_builtin)(const void *owner, StringRef attribute_id)
AttributeValidator(* lookup_validator)(const void *owner, StringRef attribute_id)
bool(* add)(void *owner, StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer)
int(* domain_size)(const void *owner, AttrDomain domain)
GAttributeReader(* lookup)(const void *owner, StringRef attribute_id)
AttributeInitDefaultValue()
AttributeInitMoveArray(void *data)
AttributeInitShared(const void *data, const ImplicitSharingInfo &sharing_info)
const ImplicitSharingInfo * sharing_info
AttributeInitVArray(GVArray varray)
AttributeInit(const Type type)
eCustomDataType data_type
const VArray< T > & operator*() const &
VArray< T > operator*() &&
VArray< T > & operator*() &
const ImplicitSharingInfo * sharing_info
AttributeMetaData meta_data
const fn::multi_function::MultiFunction * function
fn::GField validate_field_if_necessary(const fn::GField &field) const
std::function< void()> tag_modified_fn
VMutableArray< T > varray
const ImplicitSharingInfo * sharing_info
AttributeReader< T > typed() const
const GVArray & operator*() const &
AttributeWriter< T > typed() const
std::function< void()> tag_modified_fn
GSpanAttributeWriter(GAttributeWriter &&other, const bool copy_values_to_span)
GSpanAttributeWriter()=default
std::function< void()> tag_modified_fn
SpanAttributeWriter(AttributeWriter< T > &&other, const bool copy_values_to_span)
SpanAttributeWriter()=default
MutableVArraySpan< T > span
std::function< void()> tag_modified_fn