|
Blender V5.0
|
#include <BKE_instances.hh>
Definition at line 112 of file BKE_instances.hh.
|
default |
| blender::bke::Instances::Instances | ( | Instances && | other | ) |
Definition at line 151 of file instances.cc.
| blender::bke::Instances::Instances | ( | const Instances & | other | ) |
Definition at line 160 of file instances.cc.
|
default |
| void blender::bke::Instances::add_instance | ( | int | instance_handle, |
| const float4x4 & | transform ) |
Add a reference to the instance reference with an index specified by the #instance_handle argument. For adding many instances, using resize and accessing the transform array directly is preferred.
Definition at line 204 of file instances.cc.
| int blender::bke::Instances::add_new_reference | ( | const InstanceReference & | reference | ) |
Same as above, but does not deduplicate with existing references.
Definition at line 269 of file instances.cc.
| int blender::bke::Instances::add_reference | ( | const InstanceReference & | reference | ) |
Returns a handle for the given reference. If the reference exists already, the handle of the existing reference is returned. Otherwise a new handle is added.
Definition at line 261 of file instances.cc.
Definition at line 309 of file BKE_instances.hh.
|
inline |
Definition at line 314 of file BKE_instances.hh.
| AttributeAccessor blender::bke::Instances::attributes | ( | ) | const |
Definition at line 64 of file instances.cc.
| MutableAttributeAccessor blender::bke::Instances::attributes_for_write | ( | ) |
Definition at line 69 of file instances.cc.
| void blender::bke::Instances::count_memory | ( | MemoryCounter & | memory | ) | const |
Definition at line 423 of file instances.cc.
If references have a collection or object type, convert them into geometry instances recursively. After that, the geometry sets can be edited. There may still be instances of other types of they can't be converted to geometry sets.
Definition at line 107 of file geometry_set_instances.cc.
Definition at line 413 of file instances.cc.
| std::optional< int > blender::bke::Instances::find_reference_handle | ( | const InstanceReference & | query | ) |
Definition at line 250 of file instances.cc.
| void blender::bke::Instances::foreach_referenced_geometry | ( | FunctionRef< void(const GeometrySet &geometry_set)> | callback | ) | const |
Definition at line 75 of file geometry_set_instances.cc.
| GeometrySet & blender::bke::Instances::geometry_set_from_reference | ( | int | reference_index | ) |
With write access to the instances component, the data in the instanced geometry sets can be changed. This is a function on the component rather than each reference to ensure const correctness for that reason.
Definition at line 241 of file instances.cc.
| int blender::bke::Instances::instances_num | ( | ) | const |
Definition at line 393 of file instances.cc.
Definition at line 171 of file instances.cc.
Definition at line 181 of file instances.cc.
| bool blender::bke::Instances::owns_direct_data | ( | ) | const |
Definition at line 403 of file instances.cc.
| Span< int > blender::bke::Instances::reference_handles | ( | ) | const |
Definition at line 215 of file instances.cc.
Definition at line 222 of file instances.cc.
| Span< int > blender::bke::Instances::reference_user_counts | ( | ) | const |
Get cached user counts for every reference.
Definition at line 488 of file instances.cc.
| Span< InstanceReference > blender::bke::Instances::references | ( | ) | const |
Definition at line 275 of file instances.cc.
Definition at line 280 of file instances.cc.
| int blender::bke::Instances::references_num | ( | ) | const |
Definition at line 398 of file instances.cc.
| void blender::bke::Instances::remove | ( | const IndexMask & | mask, |
| const AttributeFilter & | attribute_filter ) |
Remove the indices that are not contained in the mask input, and remove unused instance references afterwards.
Definition at line 285 of file instances.cc.
Definition at line 311 of file instances.cc.
| void blender::bke::Instances::resize | ( | int | capacity | ) |
Resize the transform, handles, and attributes to the specified capacity.
Definition at line 191 of file instances.cc.
|
inline |
Definition at line 224 of file BKE_instances.hh.
| Span< float4x4 > blender::bke::Instances::transforms | ( | ) | const |
Definition at line 228 of file instances.cc.
Definition at line 235 of file instances.cc.
| Span< int > blender::bke::Instances::unique_ids | ( | ) | const |
Get an id for every instance. These can be used e.g. motion blur. This is based on the "id" attribute but makes sure that the ids are actually unique.
Definition at line 505 of file instances.cc.