Blender V4.3
realize_instances.cc File Reference

Go to the source code of this file.

Classes

struct  blender::geometry::OrderedAttributes
 
struct  blender::geometry::AttributeFallbacksArray
 
struct  blender::geometry::PointCloudRealizeInfo
 
struct  blender::geometry::RealizePointCloudTask
 
struct  blender::geometry::MeshElementStartIndices
 
struct  blender::geometry::MeshRealizeInfo
 
struct  blender::geometry::RealizeMeshTask
 
struct  blender::geometry::RealizeCurveInfo
 
struct  blender::geometry::CurvesElementStartIndices
 
struct  blender::geometry::RealizeCurveTask
 
struct  blender::geometry::GreasePencilRealizeInfo
 
struct  blender::geometry::RealizeGreasePencilTask
 
struct  blender::geometry::RealizeEditDataTask
 
struct  blender::geometry::AllPointCloudsInfo
 
struct  blender::geometry::AllMeshesInfo
 
struct  blender::geometry::AllCurvesInfo
 
struct  blender::geometry::AllGreasePencilsInfo
 
struct  blender::geometry::AllInstancesInfo
 
struct  blender::geometry::GatherTasks
 
struct  blender::geometry::GatherOffsets
 
struct  blender::geometry::GatherTasksInfo
 
struct  blender::geometry::InstanceContext
 

Namespaces

namespace  blender
 
namespace  blender::geometry
 

Functions

static int64_t blender::geometry::get_final_points_num (const GatherTasks &tasks)
 
static bool blender::geometry::skip_transform (const float4x4 &transform)
 
static void blender::geometry::copy_transformed_positions (const Span< float3 > src, const float4x4 &transform, MutableSpan< float3 > dst)
 
static void blender::geometry::transform_positions (const float4x4 &transform, MutableSpan< float3 > positions)
 
static void blender::geometry::copy_transformed_normals (const Span< float3 > src, const float4x4 &transform, MutableSpan< float3 > dst)
 
static void blender::geometry::threaded_copy (const GSpan src, GMutableSpan dst)
 
static void blender::geometry::threaded_fill (const GPointer value, GMutableSpan dst)
 
static void blender::geometry::copy_generic_attributes_to_result (const Span< std::optional< GVArraySpan > > src_attributes, const AttributeFallbacksArray &attribute_fallbacks, const OrderedAttributes &ordered_attributes, const FunctionRef< IndexRange(bke::AttrDomain)> &range_fn, MutableSpan< GSpanAttributeWriter > dst_attribute_writers)
 
static void blender::geometry::create_result_ids (const RealizeInstancesOptions &options, const Span< int > stored_ids, const int task_id, MutableSpan< int > dst_ids)
 
Gather Realize Tasks
static void blender::geometry::gather_realize_tasks_recursive (GatherTasksInfo &gather_info, const int current_depth, const int target_depth, const bke::GeometrySet &geometry_set, const float4x4 &base_transform, const InstanceContext &base_instance_context)
 
static Vector< std::pair< int, GSpan > > blender::geometry::prepare_attribute_fallbacks (GatherTasksInfo &gather_info, const Instances &instances, const OrderedAttributes &ordered_attributes)
 
static void blender::geometry::foreach_geometry_in_reference (const InstanceReference &reference, const float4x4 &base_transform, const uint32_t id, FunctionRef< void(const bke::GeometrySet &geometry_set, const float4x4 &transform, uint32_t id)> fn)
 
static void blender::geometry::gather_realize_tasks_for_instances (GatherTasksInfo &gather_info, const int current_depth, const int target_depth, const Instances &instances, const float4x4 &base_transform, const InstanceContext &base_instance_context)
 
static void blender::geometry::gather_attribute_propagation_components (const bke::GeometrySet &geometry, const bke::GeometryComponent::Type component_type, const RealizeInstancesOptions &options, const int current_depth, const std::optional< int > max_depth, Set< bke::GeometryComponentPtr > &r_components)
 
static void blender::geometry::gather_attribute_propagation_components_with_custom_depths (const bke::GeometrySet &geometry, const bke::GeometryComponent::Type component_type, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, Set< bke::GeometryComponentPtr > &r_components)
 
static Map< StringRef, AttributeKindblender::geometry::gather_attributes_to_propagate (const bke::GeometrySet &geometry, const bke::GeometryComponent::Type component_type, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option)
 
Instance
static OrderedAttributes blender::geometry::gather_generic_instance_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option)
 
static void blender::geometry::execute_instances_tasks (const Span< bke::GeometryComponentPtr > src_components, Span< blender::float4x4 > src_base_transforms, OrderedAttributes all_instances_attributes, Span< blender::geometry::AttributeFallbacksArray > attribute_fallback, bke::GeometrySet &r_realized_geometry)
 
Point Cloud
static OrderedAttributes blender::geometry::gather_generic_pointcloud_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, bool &r_create_radii, bool &r_create_id)
 
static void blender::geometry::gather_pointclouds_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const PointCloud * > &r_pointclouds)
 
static AllPointCloudsInfo blender::geometry::preprocess_pointclouds (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option)
 
static void blender::geometry::execute_realize_pointcloud_task (const RealizeInstancesOptions &options, const RealizePointCloudTask &task, const OrderedAttributes &ordered_attributes, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< float > all_dst_radii, MutableSpan< int > all_dst_ids, MutableSpan< float3 > all_dst_positions)
 
static void blender::geometry::add_instance_attributes_to_single_geometry (const OrderedAttributes &ordered_attributes, const AttributeFallbacksArray &attribute_fallbacks, bke::MutableAttributeAccessor attributes)
 
static void blender::geometry::execute_realize_pointcloud_tasks (const RealizeInstancesOptions &options, const AllPointCloudsInfo &all_pointclouds_info, const Span< RealizePointCloudTask > tasks, const OrderedAttributes &ordered_attributes, bke::GeometrySet &r_realized_geometry)
 
Mesh
static OrderedAttributes blender::geometry::gather_generic_mesh_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, bool &r_create_id, bool &r_create_material_index)
 
static void blender::geometry::gather_meshes_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const Mesh * > &r_meshes)
 
static AllMeshesInfo blender::geometry::preprocess_meshes (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option)
 
static void blender::geometry::execute_realize_mesh_task (const RealizeInstancesOptions &options, const RealizeMeshTask &task, const OrderedAttributes &ordered_attributes, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< float3 > all_dst_positions, MutableSpan< int2 > all_dst_edges, MutableSpan< int > all_dst_face_offsets, MutableSpan< int > all_dst_corner_verts, MutableSpan< int > all_dst_corner_edges, MutableSpan< int > all_dst_vertex_ids, MutableSpan< int > all_dst_material_indices)
 
static void blender::geometry::execute_realize_mesh_tasks (const RealizeInstancesOptions &options, const AllMeshesInfo &all_meshes_info, const Span< RealizeMeshTask > tasks, const OrderedAttributes &ordered_attributes, const VectorSet< Material * > &ordered_materials, bke::GeometrySet &r_realized_geometry)
 
Curves
static OrderedAttributes blender::geometry::gather_generic_curve_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, bool &r_create_id)
 
static void blender::geometry::gather_curves_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const Curves * > &r_curves)
 
static AllCurvesInfo blender::geometry::preprocess_curves (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option)
 
static void blender::geometry::execute_realize_curve_task (const RealizeInstancesOptions &options, const AllCurvesInfo &all_curves_info, const RealizeCurveTask &task, const OrderedAttributes &ordered_attributes, bke::CurvesGeometry &dst_curves, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< int > all_dst_ids, MutableSpan< float3 > all_handle_left, MutableSpan< float3 > all_handle_right, MutableSpan< float > all_radii, MutableSpan< float > all_nurbs_weights, MutableSpan< int > all_resolutions, MutableSpan< float3 > all_custom_normals)
 
static void blender::geometry::execute_realize_curve_tasks (const RealizeInstancesOptions &options, const AllCurvesInfo &all_curves_info, const Span< RealizeCurveTask > tasks, const OrderedAttributes &ordered_attributes, bke::GeometrySet &r_realized_geometry)
 
Grease Pencil
static OrderedAttributes blender::geometry::gather_generic_grease_pencil_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_options)
 
static void blender::geometry::gather_grease_pencils_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const GreasePencil * > &r_grease_pencils)
 
static AllGreasePencilsInfo blender::geometry::preprocess_grease_pencils (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_options)
 
static void blender::geometry::execute_realize_grease_pencil_task (const RealizeGreasePencilTask &task, const OrderedAttributes &ordered_attributes, GreasePencil &dst_grease_pencil, MutableSpan< GSpanAttributeWriter > dst_attribute_writers)
 
static void blender::geometry::transform_grease_pencil_layers (Span< bke::greasepencil::Layer * > layers, const float4x4 &transform)
 
static void blender::geometry::execute_realize_grease_pencil_tasks (const AllGreasePencilsInfo &all_grease_pencils_info, const Span< RealizeGreasePencilTask > tasks, const OrderedAttributes &ordered_attributes, bke::GeometrySet &r_realized_geometry)
 
Edit Data
static void blender::geometry::execute_realize_edit_data_tasks (const Span< RealizeEditDataTask > tasks, bke::GeometrySet &r_realized_geometry)
 
Realize Instances
static void blender::geometry::remove_id_attribute_from_instances (bke::GeometrySet &geometry_set)
 
static void blender::geometry::propagate_instances_to_keep (const bke::GeometrySet &geometry_set, const IndexMask &selection, bke::GeometrySet &new_geometry_set, const bke::AttributeFilter &attribute_filter)
 
bke::GeometrySet blender::geometry::realize_instances (bke::GeometrySet geometry_set, const RealizeInstancesOptions &options)
 
bke::GeometrySet blender::geometry::realize_instances (bke::GeometrySet geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option)