Blender
V3.3
|
#include <object.h>
Public Types | |
enum | : uint32_t { PARTICLE_MODIFIED = (1 << 0) , GEOMETRY_MANAGER = (1 << 1) , MOTION_BLUR_MODIFIED = (1 << 2) , OBJECT_ADDED = (1 << 3) , OBJECT_REMOVED = (1 << 4) , OBJECT_MODIFIED = (1 << 5) , HOLDOUT_MODIFIED = (1 << 6) , TRANSFORM_MODIFIED = (1 << 7) , VISIBILITY_MODIFIED = (1 << 8) , UPDATE_ALL = ~0u , UPDATE_NONE = 0u } |
Public Member Functions | |
ObjectManager () | |
~ObjectManager () | |
void | device_update (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_update_transforms (DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_update_prim_offsets (Device *device, DeviceScene *dscene, Scene *scene) |
void | device_update_flags (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress, bool bounds_valid=true) |
void | device_update_geom_offsets (Device *device, DeviceScene *dscene, Scene *scene) |
void | device_free (Device *device, DeviceScene *dscene, bool force_free) |
void | tag_update (Scene *scene, uint32_t flag) |
bool | need_update () const |
void | apply_static_transforms (DeviceScene *dscene, Scene *scene, Progress &progress) |
string | get_cryptomatte_objects (Scene *scene) |
string | get_cryptomatte_assets (Scene *scene) |
Public Attributes | |
bool | need_flags_update |
Protected Member Functions | |
void | device_update_object_transform (UpdateObjectTransformState *state, Object *ob, bool update_all, const Scene *scene) |
void | device_update_object_transform_task (UpdateObjectTransformState *state) |
bool | device_update_object_transform_pop_work (UpdateObjectTransformState *state, int *start_index, int *num_objects) |
Definition at line 123 of file scene/object.h.
anonymous enum : uint32_t |
Enumerator | |
---|---|
PARTICLE_MODIFIED | |
GEOMETRY_MANAGER | |
MOTION_BLUR_MODIFIED | |
OBJECT_ADDED | |
OBJECT_REMOVED | |
OBJECT_MODIFIED | |
HOLDOUT_MODIFIED | |
TRANSFORM_MODIFIED | |
VISIBILITY_MODIFIED | |
UPDATE_ALL | |
UPDATE_NONE |
Definition at line 127 of file scene/object.h.
ObjectManager::ObjectManager | ( | ) |
Definition at line 376 of file scene/object.cpp.
References need_flags_update, and UPDATE_ALL.
ObjectManager::~ObjectManager | ( | ) |
Definition at line 382 of file scene/object.cpp.
void ObjectManager::apply_static_transforms | ( | DeviceScene * | dscene, |
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 912 of file scene/object.cpp.
References device_vector< T >::data(), Geometry::geometry_type, Progress::get_cancel(), Geometry::HAIR, Geometry::has_surface_bssrdf, Geometry::has_true_displacement(), Geometry::MESH, mesh, Scene::MOTION_BLUR, Scene::MOTION_PASS, Scene::need_motion(), DeviceScene::object_flag, Scene::objects, scene, SD_OBJECT_NEGATIVE_SCALE_APPLIED, SD_OBJECT_TRANSFORM_APPLIED, Mesh::SUBDIVISION_NONE, Geometry::transform_applied, Geometry::transform_negative_scaled, transform_uniform_scale(), and Object::use_motion().
void ObjectManager::device_free | ( | Device * | device, |
DeviceScene * | dscene, | ||
bool | force_free | ||
) |
Definition at line 902 of file scene/object.cpp.
References device_vector< T >::free_if_need_realloc(), DeviceScene::object_flag, DeviceScene::object_motion, DeviceScene::object_motion_pass, DeviceScene::object_prim_offset, DeviceScene::object_volume_step, and DeviceScene::objects.
Referenced by device_update(), and Scene::free_memory().
void ObjectManager::device_update | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 678 of file scene/object.cpp.
References device_free(), HOLDOUT_MODIFIED, Node::is_modified(), need_update(), OBJECT_ADDED, DeviceScene::object_flag, DeviceScene::object_motion, DeviceScene::object_motion_pass, OBJECT_REMOVED, DeviceScene::object_volume_step, DeviceScene::objects, Scene::objects, PARTICLE_MODIFIED, scene, device_vector< T >::tag_modified(), device_vector< T >::tag_realloc(), time, Scene::update_stats, and VLOG_INFO.
Referenced by Scene::device_update().
void ObjectManager::device_update_flags | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress, | ||
bool | bounds_valid = true |
||
) |
Definition at line 768 of file scene/object.cpp.
References need_flags_update, need_update(), scene, time, and Scene::update_stats.
Referenced by Scene::device_update().
void ObjectManager::device_update_geom_offsets | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene | ||
) |
Definition at line 857 of file scene/object.cpp.
References Geometry::attr_map_offset, KernelObject::attribute_map_offset, device_vector< T >::copy_to_device(), device_vector< T >::data(), Geometry::geometry_type, if(), Object::index, Geometry::MESH, mesh, PackedPatchTable::num_nodes, DeviceScene::objects, Scene::objects, KernelObject::patch_map_offset, PATCH_NODE_SIZE, scene, device_vector< T >::size(), PackedPatchTable::total_size(), and update().
Referenced by GeometryManager::device_update_attributes().
|
protected |
Definition at line 399 of file scene/object.cpp.
References KernelObject::alpha, KernelObject::ao_distance, ATTR_STD_MOTION_VERTEX_POSITION, ATTR_STD_VOLUME_VELOCITY, KernelObject::attribute_map_offset, Geometry::attributes, KernelObject::color, Object::color, color, KernelObject::cryptomatte_asset, KernelObject::cryptomatte_object, Object::data, KernelObject::dupli_generated, KernelObject::dupli_uv, AttributeSet::find(), float(), Geometry::geometry_type, Geometry::HAIR, Object::index, Geometry::is_volume(), KernelObject::itfm, KernelObject::lightgroup, Object::lightgroup, LIGHTGROUP_NONE, Scene::lightgroups, Geometry::MESH, mesh, Scene::MOTION_BLUR, KernelObject::motion_offset, Scene::MOTION_PASS, Node::name, PointCloud::num_points(), KernelObject::numkeys, KernelObject::numsteps, KernelObject::numverts, OBJECT_MOTION_PASS_SIZE, object_volume_density(), particle_index(), KernelObject::particle_index, KernelObject::pass_id, KernelObject::patch_map_offset, Geometry::POINTCLOUD, KernelObject::primitive_type, Geometry::primitive_type(), KernelObject::random_number, scene, SD_OBJECT_CAUSTICS_CASTER, SD_OBJECT_CAUSTICS_RECEIVER, SD_OBJECT_HAS_VERTEX_MOTION, SD_OBJECT_HAS_VOLUME_MOTION, SD_OBJECT_HOLDOUT_MASK, SD_OBJECT_MOTION, KernelObject::shadow_terminator_geometry_offset, KernelObject::shadow_terminator_shading_offset, Mesh::size, state, KernelObject::tfm, transform_inverse(), transform_motion_decompose(), Object::update_motion(), Object::use_motion(), util_hash_to_float(), util_murmur_hash3(), KernelObject::velocity_scale, KernelObject::visibility, Object::visibility_for_tracing(), Geometry::VOLUME, and KernelObject::volume_density.
|
protected |
|
protected |
void ObjectManager::device_update_prim_offsets | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene | ||
) |
Definition at line 566 of file scene/object.cpp.
References device_vector< T >::alloc(), BVH_LAYOUT_METAL, BVH_LAYOUT_MULTI_METAL, BVH_LAYOUT_MULTI_METAL_EMBREE, device_vector< T >::clear_modified(), device_vector< T >::copy_to_device(), Device::get_bvh_layout_mask(), Object::get_device_index(), Geometry::HAIR, DeviceScene::object_prim_offset, Scene::objects, and scene.
Referenced by Scene::device_update().
void ObjectManager::device_update_transforms | ( | DeviceScene * | dscene, |
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 595 of file scene/object.cpp.
References device_vector< T >::alloc(), Scene::MOTION_BLUR, Scene::MOTION_PASS, Scene::need_motion(), device_vector< T >::need_realloc(), NULL, DeviceScene::object_flag, DeviceScene::object_motion, DeviceScene::object_motion_pass, OBJECT_MOTION_PASS_SIZE, DeviceScene::object_volume_step, DeviceScene::objects, Scene::objects, blender::threading::parallel_for(), Scene::particle_systems, ParticleSystem::particles, r, scene, ParticleData::size, state, and Object::update_motion().
string ObjectManager::get_cryptomatte_assets | ( | Scene * | scene | ) |
Definition at line 1035 of file scene/object.cpp.
References Scene::objects, scene, string_printf(), and util_murmur_hash3().
Referenced by BlenderSession::stamp_view_layer_metadata().
string ObjectManager::get_cryptomatte_objects | ( | Scene * | scene | ) |
Definition at line 1018 of file scene/object.cpp.
References Node::name, Scene::objects, scene, string_printf(), and util_murmur_hash3().
Referenced by BlenderSession::stamp_view_layer_metadata().
bool ObjectManager::need_update | ( | ) | const |
Definition at line 1013 of file scene/object.cpp.
References UPDATE_NONE.
Referenced by device_update(), device_update_flags(), Scene::need_data_update(), and Film::update_passes().
Definition at line 980 of file scene/object.cpp.
References GeometryManager::GEOMETRY_ADDED, GEOMETRY_MANAGER, Scene::geometry_manager, GeometryManager::GEOMETRY_REMOVED, Scene::integrator, Scene::light_manager, OBJECT_ADDED, GeometryManager::OBJECT_MANAGER, Integrator::OBJECT_MANAGER, LightManager::OBJECT_MANAGER, OBJECT_MODIFIED, OBJECT_REMOVED, scene, GeometryManager::tag_update(), Integrator::tag_update(), LightManager::tag_update(), GeometryManager::TRANSFORM_MODIFIED, TRANSFORM_MODIFIED, GeometryManager::VISIBILITY_MODIFIED, and VISIBILITY_MODIFIED.
Referenced by Scene::create_node(), Scene::delete_node_impl(), Scene::delete_nodes(), Scene::device_update(), Scene::reset(), Object::tag_update(), GeometryManager::tag_update(), and Integrator::tag_update().
bool ObjectManager::need_flags_update |
Definition at line 144 of file scene/object.h.
Referenced by device_update_flags(), ObjectManager(), and Shader::tag_update().