|
Blender
V2.93
|
#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_listbase.h"#include "BLI_math.h"#include "BLI_rand.h"#include "BLI_string.h"#include "BLI_utildefines.h"#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 |
| void* BKE_pointcloud_add | ( | Main * | bmain, |
| const char * | name | ||
| ) |
Definition at line 216 of file pointcloud.cc.
References BKE_id_new(), and ID_PT.
Referenced by BKE_mesh_to_pointcloud().
| void* BKE_pointcloud_add_default | ( | Main * | bmain, |
| const char * | name | ||
| ) |
Definition at line 223 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 424 of file pointcloud.cc.
References PointCloud::batch_cache, and BKE_pointcloud_batch_cache_dirty_tag_cb.
Referenced by BKE_object_batch_cache_dirty_tag().
| void BKE_pointcloud_batch_cache_free | ( | PointCloud * | pointcloud | ) |
Definition at line 431 of file pointcloud.cc.
References PointCloud::batch_cache, and BKE_pointcloud_batch_cache_free_cb.
Referenced by pointcloud_free_data().
Definition at line 277 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 335 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 | ( | PointCloud * | UNUSEDpointcloud, |
| CustomDataLayer * | layer | ||
| ) |
Definition at line 311 of file pointcloud.cc.
References CD_PROP_FLOAT3, CustomDataLayer::name, POINTCLOUD_ATTR_POSITION, STREQ, and CustomDataLayer::type.
| void BKE_pointcloud_data_update | ( | struct Depsgraph * | depsgraph, |
| struct Scene * | scene, | ||
| Object * | object | ||
| ) |
Definition at line 396 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().
| void BKE_pointcloud_minmax | ( | const struct PointCloud * | pointcloud, |
| float | r_min[3], | ||
| float | r_max[3] | ||
| ) |
Definition at line 263 of file pointcloud.cc.
References Freestyle::a, PointCloud::co, DO_MAX, DO_MIN, float(), PointCloud::radius, and PointCloud::totpoint.
Referenced by BKE_pointcloud_boundbox_get(), and GeometrySet::compute_boundbox_without_instances().
| PointCloud* BKE_pointcloud_new_for_eval | ( | const PointCloud * | pointcloud_src, |
| int | totpoint | ||
| ) |
Definition at line 318 of file pointcloud.cc.
References BKE_id_new_nomain(), BKE_pointcloud_update_customdata_pointers(), 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 240 of file pointcloud.cc.
References BKE_idtype_idcode_to_name(), BKE_libblock_alloc(), BKE_pointcloud_update_customdata_pointers(), 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::create_component_points(), blender::nodes::geo_node_point_distribute_exec(), blender::nodes::join_components(), and blender::bke::join_instance_groups_pointcloud().
| void BKE_pointcloud_update_customdata_pointers | ( | PointCloud * | pointcloud | ) |
Definition at line 303 of file pointcloud.cc.
References CD_PROP_FLOAT, CD_PROP_FLOAT3, PointCloud::co, CustomData_get_layer_named(), PointCloud::pdata, POINTCLOUD_ATTR_POSITION, POINTCLOUD_ATTR_RADIUS, and PointCloud::radius.
Referenced by BKE_pointcloud_from_mesh(), BKE_pointcloud_new_for_eval(), BKE_pointcloud_new_nomain(), blender::bke::create_attribute_providers_for_point_cloud(), pointcloud_blend_read_data(), pointcloud_copy_data(), pointcloud_init_data(), and pointcloud_random().
|
static |
Definition at line 140 of file pointcloud.cc.
References PointCloud::adt, BKE_animdata_blend_read_data(), BKE_pointcloud_update_customdata_pointers(), BLO_read_data_address, BLO_read_pointer_array(), CustomData_blend_read(), PointCloud::mat, PointCloud::pdata, and PointCloud::totpoint.
|
static |
Definition at line 162 of file pointcloud.cc.
References Freestyle::a, BLO_expand, PointCloud::mat, and PointCloud::totcol.
|
static |
Definition at line 154 of file pointcloud.cc.
References Freestyle::a, BLO_read_id_address, PointCloud::id, ID::lib, PointCloud::mat, and PointCloud::totcol.
|
static |
Definition at line 112 of file pointcloud.cc.
References PointCloud::adt, ARRAY_SIZE, BKE_animdata_blend_write(), BKE_id_blend_write(), BLO_write_id_struct, BLO_write_is_undo(), BLO_write_pointer_array(), CD_MASK_ALL, CD_TEMP_CHUNK_SIZE, CustomData_blend_write(), CustomData_blend_write_prepare(), PointCloud::id, PointCloud::mat, MEM_freeN, PointCloud::pdata, PointCloud::totcol, PointCloud::totpoint, and ID::us.
|
static |
Definition at line 78 of file pointcloud.cc.
References PointCloud::batch_cache, BKE_pointcloud_update_customdata_pointers(), 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 347 of file pointcloud.cc.
References BKE_modifier_get_info(), BKE_modifier_is_enabled(), 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 104 of file pointcloud.cc.
References BKE_LIB_FOREACHID_PROCESS, data, IDWALK_CB_USER, PointCloud::mat, and PointCloud::totcol.
|
static |
Definition at line 95 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.
|
static |
Definition at line 61 of file pointcloud.cc.
References BKE_pointcloud_update_customdata_pointers(), 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 198 of file pointcloud.cc.
References BKE_pointcloud_update_customdata_pointers(), BLI_rng_free(), BLI_rng_get_float(), BLI_rng_new(), PointCloud::co, CustomData_realloc(), PointCloud::pdata, PointCloud::radius, and PointCloud::totpoint.
Referenced by BKE_pointcloud_add_default().
|
static |
Definition at line 377 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 421 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 422 of file pointcloud.cc.
Referenced by BKE_pointcloud_batch_cache_free(), and DRW_engines_register().
| IDTypeInfo IDType_ID_PT |
Definition at line 170 of file pointcloud.cc.
| const char* POINTCLOUD_ATTR_POSITION = "position" |
Definition at line 58 of file pointcloud.cc.
Referenced by BKE_mesh_from_pointcloud(), BKE_pointcloud_customdata_required(), BKE_pointcloud_update_customdata_pointers(), and pointcloud_init_data().
| const char* POINTCLOUD_ATTR_RADIUS = "radius" |
Definition at line 59 of file pointcloud.cc.
Referenced by BKE_pointcloud_add_default(), BKE_pointcloud_new_nomain(), and BKE_pointcloud_update_customdata_pointers().