41 if (instances_ !=
nullptr) {
42 new_component->instances_ =
new Instances(*instances_);
59 if (instances_ !=
nullptr) {
69 if (instances_ !=
nullptr) {
77 if (instances_ !=
nullptr) {
101 instances_ = instances;
102 ownership_ = ownership;
109 instances_ =
nullptr;
137 [](
const void *owner) ->
int {
152 instance_custom_data_access,
159 instance_custom_data_access,
167 instance_custom_data_access,
171 instance_custom_data_access);
174 {&instance_custom_data});
183 if (owner ==
nullptr) {
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object instance
std::optional< MutableAttributeAccessor > attributes_for_write() final
void ensure_owns_direct_data() override
void count_memory(MemoryCounter &memory) const override
Instances * get_for_write()
const Instances * get() const
bool is_empty() const final
GeometryComponentPtr copy() const override
bool owns_direct_data() const override
std::optional< AttributeAccessor > attributes() const final
void replace(Instances *instances, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void ensure_owns_direct_data()
bke::MutableAttributeAccessor attributes_for_write()
bke::AttributeAccessor attributes() const
void tag_reference_handles_changed()
int instances_num() const
void count_memory(MemoryCounter &memory) const
bool owns_direct_data() const
CustomData & custom_data_attributes()
AttributeAccessorFunctions accessor_functions_for_providers()
ImplicitSharingPtr< GeometryComponent > GeometryComponentPtr
static ComponentAttributeProviders create_attribute_providers_for_instances()
static const AttributeAccessorFunctions & get_instances_accessor_functions_ref()
static AttributeAccessorFunctions get_instances_accessor_functions()
static void tag_component_reference_index_changed(void *owner)
GVArray(* adapt_domain)(const void *owner, const GVArray &varray, AttrDomain from_domain, AttrDomain to_domain)
bool(* domain_supported)(const void *owner, AttrDomain domain)
int(* domain_size)(const void *owner, AttrDomain domain)