Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_defaults.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_pointcloud_types.h"
#include "BLI_bounds.hh"
#include "BLI_index_range.hh"
#include "BLI_listbase.h"
#include "BLI_math_vec_types.hh"
#include "BLI_rand.h"
#include "BLI_span.hh"
#include "BLI_string.h"
#include "BLI_task.hh"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "BKE_anim_data.h"
#include "BKE_customdata.h"
#include "BKE_geometry_set.hh"
#include "BKE_global.h"
#include "BKE_idtype.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_pointcloud.h"
#include "BLT_translation.h"
#include "DEG_depsgraph_query.h"
#include "BLO_read_write.h"
Go to the source code of this file.
Variables | |
const char * | POINTCLOUD_ATTR_POSITION = "position" |
const char * | POINTCLOUD_ATTR_RADIUS = "radius" |
IDTypeInfo | IDType_ID_PT |
void(* | BKE_pointcloud_batch_cache_dirty_tag_cb )(PointCloud *pointcloud, int mode) = nullptr |
void(* | BKE_pointcloud_batch_cache_free_cb )(PointCloud *pointcloud) = nullptr |
Definition at line 219 of file pointcloud.cc.
References BKE_id_new(), and ID_PT.
Referenced by BKE_mesh_to_pointcloud().
Definition at line 226 of file pointcloud.cc.
References BKE_libblock_alloc(), CD_CALLOC, CD_PROP_FLOAT, CustomData_add_layer_named(), PointCloud::id, ID_PT, PointCloud::pdata, POINTCLOUD_ATTR_RADIUS, pointcloud_init_data(), pointcloud_random(), and PointCloud::totpoint.
Referenced by BKE_object_obdata_add_from_type().
void BKE_pointcloud_batch_cache_dirty_tag | ( | PointCloud * | pointcloud, |
int | mode | ||
) |
Definition at line 436 of file pointcloud.cc.
References PointCloud::batch_cache, and BKE_pointcloud_batch_cache_dirty_tag_cb.
Referenced by BKE_object_data_batch_cache_dirty_tag().
void BKE_pointcloud_batch_cache_free | ( | PointCloud * | pointcloud | ) |
Definition at line 443 of file pointcloud.cc.
References PointCloud::batch_cache, and BKE_pointcloud_batch_cache_free_cb.
Referenced by pointcloud_free_data().
Definition at line 295 of file pointcloud.cc.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BKE_pointcloud_minmax(), BLI_assert, BOUNDBOX_DIRTY, GeometrySet::compute_boundbox_without_instances(), Object::data, BoundBox::flag, Object_Runtime::geometry_set_eval, INIT_MINMAX, max, MEM_callocN, min, OB_POINTCLOUD, Object::runtime, and Object::type.
Referenced by BKE_object_boundbox_get(), and BKE_object_minmax().
PointCloud* BKE_pointcloud_copy_for_eval | ( | struct PointCloud * | pointcloud_src, |
bool | reference | ||
) |
Definition at line 344 of file pointcloud.cc.
References BKE_id_copy_ex(), PointCloud::id, LIB_ID_COPY_CD_REFERENCE, LIB_ID_COPY_LOCALIZE, and result.
Referenced by PointCloudComponent::copy(), PointCloudComponent::ensure_owns_direct_data(), and PointCloudComponent::get_for_write().
bool BKE_pointcloud_customdata_required | ( | const PointCloud * | UNUSEDpointcloud, |
const char * | name | ||
) |
Definition at line 321 of file pointcloud.cc.
References POINTCLOUD_ATTR_POSITION, and STREQ.
void BKE_pointcloud_data_update | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
Object * | object | ||
) |
Definition at line 407 of file pointcloud.cc.
References BKE_object_eval_assign_data(), BKE_object_free_derived_caches(), BKE_pointcloud_new_nomain(), GeometrySet::create_with_pointcloud(), depsgraph, PointCloud::id, pointcloud_evaluate_modifiers(), ReadOnly, scene, and take_pointcloud_ownership_from_geometry_set().
Referenced by BKE_object_handle_data_update(), and object_force_modifier_update_for_bind().
bool BKE_pointcloud_minmax | ( | const PointCloud * | pointcloud, |
float | r_min[3], | ||
float | r_max[3] | ||
) |
Definition at line 280 of file pointcloud.cc.
References copy_v3_v3(), blender::math::max(), blender::math::min(), blender::bounds::min_max(), and point_cloud_bounds().
Referenced by BKE_pointcloud_boundbox_get().
PointCloud* BKE_pointcloud_new_for_eval | ( | const PointCloud * | pointcloud_src, |
int | totpoint | ||
) |
Definition at line 328 of file pointcloud.cc.
References BKE_id_new_nomain(), CD_CALLOC, CD_MASK_ALL, CustomData_copy(), CustomData_free(), PointCloud::id, ID_PT, PointCloud::mat, MEM_dupallocN, ID::name, PointCloud::pdata, STRNCPY, PointCloud::totcol, and PointCloud::totpoint.
PointCloud* BKE_pointcloud_new_nomain | ( | const int | totpoint | ) |
Definition at line 243 of file pointcloud.cc.
References BKE_idtype_idcode_to_name(), BKE_libblock_alloc(), CD_CALLOC, CD_PROP_FLOAT, CustomData_add_layer_named(), CustomData_realloc(), PointCloud::id, ID_PT, LIB_ID_CREATE_LOCALIZE, PointCloud::pdata, POINTCLOUD_ATTR_RADIUS, pointcloud_init_data(), and PointCloud::totpoint.
Referenced by BKE_pointcloud_data_update(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_pointcloud(), blender::geometry::execute_realize_pointcloud_tasks(), blender::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_curve_to_points_cc::node_geo_exec(), blender::nodes::node_geo_points_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_on_faces_cc::point_distribution_calculate(), blender::geometry::point_merge_by_distance(), and blender::nodes::node_geo_delete_geometry_cc::separate_point_cloud_selection().
|
static |
Definition at line 265 of file pointcloud.cc.
References ATTR_DOMAIN_POINT, blender::bke::AttributeAccessor::lookup_or_default(), blender::bounds::min_max(), blender::bounds::min_max_with_radii(), POINTCLOUD_ATTR_POSITION, POINTCLOUD_ATTR_RADIUS, blender::bke::pointcloud_attributes(), positions, and radii.
Referenced by BKE_pointcloud_minmax().
|
static |
Definition at line 131 of file pointcloud.cc.
References PointCloud::adt, BKE_animdata_blend_read_data(), BLO_read_data_address, BLO_read_pointer_array(), CustomData_blend_read(), PointCloud::mat, PointCloud::pdata, and PointCloud::totpoint.
|
static |
Definition at line 152 of file pointcloud.cc.
References Freestyle::a, BLO_expand, PointCloud::mat, and PointCloud::totcol.
|
static |
Definition at line 144 of file pointcloud.cc.
References Freestyle::a, BLO_read_id_address, PointCloud::id, ID::lib, PointCloud::mat, and PointCloud::totcol.
|
static |
Definition at line 106 of file pointcloud.cc.
References PointCloud::adt, BKE_animdata_blend_write(), BKE_id_blend_write(), BLO_write_id_struct, BLO_write_pointer_array(), CD_MASK_ALL, CustomData_blend_write(), CustomData_blend_write_prepare(), PointCloud::id, PointCloud::mat, PointCloud::pdata, PointCloud::totcol, and PointCloud::totpoint.
|
static |
Definition at line 73 of file pointcloud.cc.
References PointCloud::batch_cache, CD_DUPLICATE, CD_MASK_ALL, CD_REFERENCE, CustomData_copy(), LIB_ID_COPY_CD_REFERENCE, PointCloud::mat, MEM_dupallocN, PointCloud::pdata, and PointCloud::totpoint.
|
static |
Definition at line 356 of file pointcloud.cc.
References BKE_modifier_get_info(), BKE_modifier_is_enabled(), BKE_modifiers_clear_errors(), BKE_modifiers_get_virtual_modifierlist(), DAG_EVAL_RENDER, DEG_get_mode(), depsgraph, eModifierMode_Realtime, eModifierMode_Render, MOD_APPLY_RENDER, MOD_APPLY_USECACHE, ModifierTypeInfo::modifyGeometrySet, ModifierData::next, scene, and ModifierData::type.
Referenced by BKE_pointcloud_data_update().
|
static |
Definition at line 98 of file pointcloud.cc.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, data, IDWALK_CB_USER, PointCloud::mat, and PointCloud::totcol.
Definition at line 89 of file pointcloud.cc.
References BKE_animdata_free(), BKE_pointcloud_batch_cache_free(), CustomData_free(), PointCloud::id, PointCloud::mat, MEM_SAFE_FREE, PointCloud::pdata, and PointCloud::totpoint.
Definition at line 57 of file pointcloud.cc.
References BLI_assert, CD_CALLOC, CD_PROP_FLOAT3, CustomData_add_layer_named(), CustomData_reset(), DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, PointCloud::pdata, POINTCLOUD_ATTR_POSITION, and PointCloud::totpoint.
Referenced by BKE_pointcloud_add_default(), and BKE_pointcloud_new_nomain().
|
static |
Definition at line 190 of file pointcloud.cc.
References ATTR_DOMAIN_POINT, BLI_rng_free(), BLI_rng_get_float(), BLI_rng_new(), CustomData_realloc(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), PointCloud::pdata, POINTCLOUD_ATTR_POSITION, POINTCLOUD_ATTR_RADIUS, blender::bke::pointcloud_attributes_for_write(), positions, radii, and PointCloud::totpoint.
Referenced by BKE_pointcloud_add_default().
|
static |
Definition at line 388 of file pointcloud.cc.
References GeometrySet::get_component_for_write(), GeometrySet::has(), ReadOnly, PointCloudComponent::release(), GeometrySet::remove(), and PointCloudComponent::replace().
Referenced by BKE_pointcloud_data_update().
void(* BKE_pointcloud_batch_cache_dirty_tag_cb) (PointCloud *pointcloud, int mode) | ( | PointCloud * | pointcloud, |
int | mode | ||
) | = nullptr |
Definition at line 433 of file pointcloud.cc.
Referenced by BKE_pointcloud_batch_cache_dirty_tag(), and DRW_engines_register().
void(* BKE_pointcloud_batch_cache_free_cb) (PointCloud *pointcloud) | ( | PointCloud * | pointcloud | ) | = nullptr |
Definition at line 434 of file pointcloud.cc.
Referenced by BKE_pointcloud_batch_cache_free(), and DRW_engines_register().
IDTypeInfo IDType_ID_PT |
Definition at line 160 of file pointcloud.cc.
const char* POINTCLOUD_ATTR_POSITION = "position" |
Definition at line 54 of file pointcloud.cc.
Referenced by BKE_mesh_from_pointcloud(), BKE_pointcloud_customdata_required(), point_cloud_bounds(), pointcloud_init_data(), and pointcloud_random().
const char* POINTCLOUD_ATTR_RADIUS = "radius" |
Definition at line 55 of file pointcloud.cc.
Referenced by BKE_pointcloud_add_default(), BKE_pointcloud_new_nomain(), point_cloud_bounds(), and pointcloud_random().