diff --git a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc index dedab58950f0..a11d8be990cf 100644 --- a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc +++ b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc @@ -211,14 +211,14 @@ void BlenderSceneDelegate::populate(Depsgraph *deps, bContext *cont) void BlenderSceneDelegate::clear() { - for (auto &it : objects_) { - it.second->remove(); + for (auto &obj_data : objects_.values()) { + obj_data->remove(); } - for (auto &it : instancers_) { - it.second->remove(); + for (auto &i_data : instancers_.values()) { + i_data->remove(); } - for (auto &it : materials_) { - it.second->remove(); + for (auto &mat_data : materials_.values()) { + mat_data->remove(); } objects_.clear(); @@ -269,9 +269,9 @@ pxr::SdfPath BlenderSceneDelegate::world_prim_id() const ObjectData *BlenderSceneDelegate::object_data(pxr::SdfPath const &id) const { pxr::SdfPath p_id = (id.GetName().find("SM_") == 0) ? id.GetParentPath() : id; - auto it = objects_.find(p_id); - if (it != objects_.end()) { - return it->second.get(); + auto obj_data = objects_.lookup_ptr(p_id); + if (obj_data) { + return obj_data->get(); } InstancerData *i_data = instancer_data(p_id, true); if (i_data) { @@ -297,11 +297,11 @@ LightData *BlenderSceneDelegate::light_data(pxr::SdfPath const &id) const MaterialData *BlenderSceneDelegate::material_data(pxr::SdfPath const &id) const { - auto it = materials_.find(id); - if (it == materials_.end()) { + auto mat_data = materials_.lookup_ptr(id); + if (!mat_data) { return nullptr; } - return it->second.get(); + return mat_data->get(); } InstancerData *BlenderSceneDelegate::instancer_data(pxr::SdfPath const &id, bool child_id) const @@ -322,9 +322,9 @@ InstancerData *BlenderSceneDelegate::instancer_data(pxr::SdfPath const &id, bool p_id = id; } - auto it = instancers_.find(p_id); - if (it != instancers_.end()) { - return it->second.get(); + auto i_data = instancers_.lookup_ptr(p_id); + if (i_data) { + return i_data->get(); } return nullptr; } @@ -349,7 +349,7 @@ void BlenderSceneDelegate::update_objects(Object *object) return; } - objects_[id] = ObjectData::create(this, object, id); + objects_.add_new(id, ObjectData::create(this, object, id)); obj_data = object_data(id); obj_data->update_parent(); obj_data->init(); @@ -359,8 +359,8 @@ void BlenderSceneDelegate::update_objects(Object *object) void BlenderSceneDelegate::update_instancers(Object *object) { /* Check object inside instancers */ - for (auto &it : instancers_) { - it.second->check_update(object); + for (auto &i_data : instancers_.values()) { + i_data->check_update(object); } pxr::SdfPath id = instancer_prim_id(object); @@ -369,7 +369,7 @@ void BlenderSceneDelegate::update_instancers(Object *object) if ((object->transflag & OB_DUPLI) == 0) { /* Object isn't instancer anymore and should be removed */ i_data->remove(); - instancers_.erase(id); + instancers_.remove(id); return; } @@ -386,8 +386,7 @@ void BlenderSceneDelegate::update_instancers(Object *object) return; } - instancers_[id] = std::make_unique(this, object, id); - i_data = instancer_data(id); + i_data = instancers_.lookup_or_add(id, std::make_unique(this, object, id)).get(); i_data->init(); i_data->insert(); } @@ -524,7 +523,7 @@ void BlenderSceneDelegate::add_new_objects() void BlenderSceneDelegate::remove_unused_objects() { /* Get available objects */ - std::set available_objects; + Set available_objects; DEGObjectIterSettings settings = {0}; settings.depsgraph = depsgraph; @@ -542,67 +541,66 @@ void BlenderSceneDelegate::remove_unused_objects() object) { if (ObjectData::is_supported(object)) { - available_objects.insert(object_prim_id(object).GetName()); + available_objects.add(object_prim_id(object).GetName()); } - available_objects.insert(instancer_prim_id(object).GetName()); + available_objects.add(instancer_prim_id(object).GetName()); } ITER_END; /* Remove unused instancers */ - for (auto it = instancers_.begin(); it != instancers_.end(); ++it) { - if (available_objects.find(it->first.GetName()) != available_objects.end()) { - /* Remove objects from instancers */ - it->second->check_remove(available_objects); - continue; + instancers_.remove_if([&](auto item) { + bool ret = !available_objects.contains(item.key.GetName()); + if (ret) { + item.value->remove(); } - it->second->remove(); - instancers_.erase(it); - it = instancers_.begin(); - } + else { + item.value->check_remove(available_objects); + } + return ret; + }); /* Remove unused objects */ - for (auto it = objects_.begin(); it != objects_.end(); ++it) { - if (available_objects.find(it->first.GetName()) != available_objects.end()) { - continue; + objects_.remove_if([&](auto item) { + bool ret = !available_objects.contains(item.key.GetName()); + if (ret) { + item.value->remove(); } - it->second->remove(); - objects_.erase(it); - it = objects_.begin(); - } + return ret; + }); /* Remove unused materials */ - std::set available_materials; - for (auto &it : objects_) { - MeshData *m_data = dynamic_cast(it.second.get()); + Set available_materials; + for (auto &val : objects_.values()) { + MeshData *m_data = dynamic_cast(val.get()); if (m_data) { m_data->available_materials(available_materials); } - CurvesData *c_data = dynamic_cast(it.second.get()); + CurvesData *c_data = dynamic_cast(val.get()); if (c_data) { c_data->available_materials(available_materials); } } - for (auto &it : instancers_) { - it.second->available_materials(available_materials); + for (auto &val : instancers_.values()) { + val->available_materials(available_materials); } - for (auto it = materials_.begin(); it != materials_.end(); ++it) { - if (available_materials.find(it->first) != available_materials.end()) { - continue; + + materials_.remove_if([&](auto item) { + bool ret = !available_materials.contains(item.key); + if (ret) { + item.value->remove(); } - it->second->remove(); - materials_.erase(it); - it = materials_.begin(); - } + return ret; + }); } void BlenderSceneDelegate::update_visibility() { /* Updating visibility of existing objects/instancers */ - for (auto &it : objects_) { - it.second->update_visibility(); + for (auto &val : objects_.values()) { + val->update_visibility(); } - for (auto &it : instancers_) { - it.second->update_visibility(); + for (auto &val : instancers_.values()) { + val->update_visibility(); } /* Add objects/instancers which were invisible before and not added yet */ diff --git a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h index cc36e4b7f05e..16f659d99b3e 100644 --- a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h +++ b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h @@ -11,6 +11,7 @@ #include "CLG_log.h" +#include "BLI_set.hh" #include "curves.h" #include "instancer.h" #include "light.h" diff --git a/source/blender/render/hydra/scene_delegate/curves.cc b/source/blender/render/hydra/scene_delegate/curves.cc index 983a58c133e1..7b13c093d7e3 100644 --- a/source/blender/render/hydra/scene_delegate/curves.cc +++ b/source/blender/render/hydra/scene_delegate/curves.cc @@ -134,10 +134,10 @@ pxr::SdfPath CurvesData::material_id() const return mat_data_->prim_id; } -void CurvesData::available_materials(std::set &paths) const +void CurvesData::available_materials(Set &paths) const { if (mat_data_ && !mat_data_->prim_id.IsEmpty()) { - paths.insert(mat_data_->prim_id); + paths.add(mat_data_->prim_id); } } @@ -199,7 +199,8 @@ void CurvesData::write_material() pxr::SdfPath p_id = scene_delegate_->material_prim_id(mat); mat_data_ = scene_delegate_->material_data(p_id); if (!mat_data_) { - scene_delegate_->materials_[p_id] = std::make_unique(scene_delegate_, mat, p_id); + scene_delegate_->materials_.add_new( + p_id, std::make_unique(scene_delegate_, mat, p_id)); mat_data_ = scene_delegate_->material_data(p_id); mat_data_->init(); mat_data_->insert(); diff --git a/source/blender/render/hydra/scene_delegate/curves.h b/source/blender/render/hydra/scene_delegate/curves.h index 3fe26b5b2449..47a2199bbaf1 100644 --- a/source/blender/render/hydra/scene_delegate/curves.h +++ b/source/blender/render/hydra/scene_delegate/curves.h @@ -9,6 +9,7 @@ #include "BKE_duplilist.h" #include "DNA_Curves_types.h" +#include "BLI_set.hh" #include "material.h" #include "object.h" @@ -29,7 +30,7 @@ class CurvesData : public ObjectData { pxr::HdBasisCurvesTopology curves_topology(pxr::SdfPath const &id) const; pxr::HdPrimvarDescriptorVector primvar_descriptors(pxr::HdInterpolation interpolation) const; pxr::SdfPath material_id() const; - void available_materials(std::set &paths) const; + void available_materials(Set &paths) const; private: void write_curves(Curves *curves); diff --git a/source/blender/render/hydra/scene_delegate/id.h b/source/blender/render/hydra/scene_delegate/id.h index cdb5a6a7f232..c210236e2ba3 100644 --- a/source/blender/render/hydra/scene_delegate/id.h +++ b/source/blender/render/hydra/scene_delegate/id.h @@ -7,8 +7,16 @@ #include #include +#include "BLI_hash.hh" #include "DNA_ID.h" +template<> struct blender::DefaultHash { + uint64_t operator()(const pxr::SdfPath &value) const + { + return pxr::SdfPath::Hash()(value); + } +}; + namespace blender::render::hydra { class BlenderSceneDelegate; diff --git a/source/blender/render/hydra/scene_delegate/instancer.cc b/source/blender/render/hydra/scene_delegate/instancer.cc index 6f0177b4299e..db4384df1e9a 100644 --- a/source/blender/render/hydra/scene_delegate/instancer.cc +++ b/source/blender/render/hydra/scene_delegate/instancer.cc @@ -74,14 +74,14 @@ void InstancerData::insert() void InstancerData::remove() { CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s", prim_id.GetText()); - for (auto &it : mesh_instances_) { - it.second.data->remove(); + for (auto &m_inst : mesh_instances_.values()) { + m_inst.data->remove(); } scene_delegate_->GetRenderIndex().RemoveInstancer(prim_id); - for (auto &it : light_instances_) { - it.second.transforms.clear(); - update_light_instance(it.second); + for (auto &l_inst : light_instances_.values()) { + l_inst.transforms.clear(); + update_light_instance(l_inst); } } @@ -118,17 +118,17 @@ bool InstancerData::update_visibility() if (ret) { auto &change_tracker = scene_delegate_->GetRenderIndex().GetChangeTracker(); change_tracker.MarkInstancerDirty(prim_id, pxr::HdChangeTracker::DirtyVisibility); - for (auto &it : mesh_instances_) { - it.second.data->visible = visible; - for (auto &p : it.second.data->submesh_paths()) { + for (auto &m_inst : mesh_instances_.values()) { + m_inst.data->visible = visible; + for (auto &p : m_inst.data->submesh_paths()) { change_tracker.MarkRprimDirty(p, pxr::HdChangeTracker::DirtyVisibility); } } char name[16]; - for (auto &it : light_instances_) { - for (int i = 0; i < it.second.count; ++i) { + for (auto &l_inst : light_instances_.values()) { + for (int i = 0; i < l_inst.count; ++i) { snprintf(name, 16, "L_%08x", i); - change_tracker.MarkRprimDirty(it.second.data->prim_id.AppendElementString(name), + change_tracker.MarkRprimDirty(l_inst.data->prim_id.AppendElementString(name), pxr::HdChangeTracker::DirtyVisibility); } } @@ -179,8 +179,8 @@ ObjectData *InstancerData::object_data(pxr::SdfPath const &id) const pxr::SdfPathVector InstancerData::prototypes() const { pxr::SdfPathVector paths; - for (auto &it : mesh_instances_) { - for (auto &p : it.second.data->submesh_paths()) { + for (auto &m_inst : mesh_instances_.values()) { + for (auto &p : m_inst.data->submesh_paths()) { paths.push_back(p); } } @@ -194,7 +194,7 @@ void InstancerData::check_update(Object *object) if (m_inst) { if (!is_instance_visible(object)) { m_inst->data->remove(); - mesh_instances_.erase(path); + mesh_instances_.remove(path); scene_delegate_->GetRenderIndex().GetChangeTracker().MarkInstancerDirty( prim_id, pxr::HdChangeTracker::AllDirty); return; @@ -215,7 +215,7 @@ void InstancerData::check_update(Object *object) if (!is_instance_visible(object)) { l_inst->transforms.clear(); update_light_instance(*l_inst); - light_instances_.erase(path); + light_instances_.remove(path); return; } @@ -243,7 +243,7 @@ void InstancerData::check_update(Object *object) if (do_write_instances) { write_instances(); - if (!mesh_instances_.empty()) { + if (!mesh_instances_.is_empty()) { scene_delegate_->GetRenderIndex().GetChangeTracker().MarkInstancerDirty( prim_id, pxr::HdChangeTracker::AllDirty); } @@ -251,40 +251,39 @@ void InstancerData::check_update(Object *object) } } -void InstancerData::check_remove(std::set &available_objects) +void InstancerData::check_remove(Set &available_objects) { bool ret = false; - for (auto it = mesh_instances_.begin(); it != mesh_instances_.end(); ++it) { - if (available_objects.find(it->first.GetName()) != available_objects.end()) { - continue; - } - it->second.data->remove(); - mesh_instances_.erase(it); - it = mesh_instances_.begin(); - ret = true; - } + + mesh_instances_.remove_if([&](auto item) { + bool res = !available_objects.contains(item.key.GetName()); + if (res) { + item.value.data->remove(); + ret = true; + }; + return res; + }); + if (ret) { write_instances(); scene_delegate_->GetRenderIndex().GetChangeTracker().MarkInstancerDirty( prim_id, pxr::HdChangeTracker::AllDirty); } - for (auto it = light_instances_.begin(); it != light_instances_.end(); ++it) { - if (available_objects.find(it->first.GetName()) != available_objects.end()) { - continue; - } - it->second.transforms.clear(); - update_light_instance(it->second); - - light_instances_.erase(it); - it = light_instances_.begin(); - } + light_instances_.remove_if([&](auto item) { + bool res = !available_objects.contains(item.key.GetName()); + if (res) { + item.value.transforms.clear(); + update_light_instance(item.value); + }; + return res; + }); } -void InstancerData::available_materials(std::set &paths) const +void InstancerData::available_materials(Set &paths) const { - for (auto &it : mesh_instances_) { - ((MeshData *)it.second.data.get())->available_materials(paths); + for (auto &m_inst : mesh_instances_.values()) { + ((MeshData *)m_inst.data.get())->available_materials(paths); } } @@ -297,8 +296,8 @@ void InstancerData::update_as_parent() void InstancerData::update_double_sided(MaterialData *mat_data) { - for (auto &it : mesh_instances_) { - it.second.data->update_double_sided(mat_data); + for (auto &m_inst : mesh_instances_.values()) { + m_inst.data->update_double_sided(mat_data); } } @@ -343,11 +342,11 @@ int InstancerData::light_prim_id_index(pxr::SdfPath const &id) const void InstancerData::write_instances() { mesh_transforms_.clear(); - for (auto &it : mesh_instances_) { - it.second.indices.clear(); + for (auto &m_inst : mesh_instances_.values()) { + m_inst.indices.clear(); } - for (auto &it : light_instances_) { - it.second.transforms.clear(); + for (auto &l_inst : light_instances_.values()) { + l_inst.transforms.clear(); } ListBase *lb = object_duplilist( @@ -362,7 +361,7 @@ void InstancerData::write_instances() if (ob->type == OB_LAMP) { LightInstance *inst = light_instance(p_id); if (!inst) { - inst = &light_instances_[p_id]; + inst = &light_instances_.lookup_or_add_default(p_id); inst->data = std::make_unique(scene_delegate_, ob, p_id); inst->data->init(); } @@ -372,7 +371,7 @@ void InstancerData::write_instances() else { MeshInstance *inst = mesh_instance(p_id); if (!inst) { - inst = &mesh_instances_[p_id]; + inst = &mesh_instances_.lookup_or_add_default(p_id); inst->data = std::make_unique(scene_delegate_, ob, p_id); inst->data->init(); inst->data->insert(); @@ -385,23 +384,19 @@ void InstancerData::write_instances() free_object_duplilist(lb); /* Remove mesh intances without indices */ - for (auto it = mesh_instances_.begin(); it != mesh_instances_.end(); ++it) { - if (!it->second.indices.empty()) { - continue; + mesh_instances_.remove_if([&](auto item) { + bool res = item.value.indices.empty(); + if (res) { + item.value.data->remove(); } - it->second.data->remove(); - mesh_instances_.erase(it); - it = mesh_instances_.begin(); - } + return res; + }); /* Update light intances and remove instances without transforms */ - for (auto it = light_instances_.begin(); it != light_instances_.end(); ++it) { - update_light_instance(it->second); - if (it->second.transforms.empty()) { - light_instances_.erase(it); - it = light_instances_.begin(); - } - } + light_instances_.remove_if([&](auto item) { + update_light_instance(item.value); + return item.value.transforms.empty(); + }); } void InstancerData::update_light_instance(LightInstance &inst) @@ -461,20 +456,22 @@ void InstancerData::update_light_instance(LightInstance &inst) InstancerData::MeshInstance *InstancerData::mesh_instance(pxr::SdfPath const &id) const { - auto it = mesh_instances_.find(id.GetPathElementCount() == 4 ? id.GetParentPath() : id); - if (it == mesh_instances_.end()) { + auto m_inst = mesh_instances_.lookup_ptr(id.GetPathElementCount() == 4 ? id.GetParentPath() : + id); + if (!m_inst) { return nullptr; } - return const_cast(&it->second); + return const_cast(m_inst); } InstancerData::LightInstance *InstancerData::light_instance(pxr::SdfPath const &id) const { - auto it = light_instances_.find(id.GetPathElementCount() == 4 ? id.GetParentPath() : id); - if (it == light_instances_.end()) { + auto l_inst = light_instances_.lookup_ptr(id.GetPathElementCount() == 4 ? id.GetParentPath() : + id); + if (!l_inst) { return nullptr; } - return const_cast(&it->second); + return const_cast(l_inst); } } // namespace blender::render::hydra diff --git a/source/blender/render/hydra/scene_delegate/instancer.h b/source/blender/render/hydra/scene_delegate/instancer.h index 97ea2ebe7b21..b8a1d127d64c 100644 --- a/source/blender/render/hydra/scene_delegate/instancer.h +++ b/source/blender/render/hydra/scene_delegate/instancer.h @@ -4,6 +4,8 @@ #pragma once #include "BKE_duplilist.h" +#include "BLI_map.hh" +#include "BLI_set.hh" #include "light.h" #include "mesh.h" @@ -41,8 +43,8 @@ class InstancerData : public ObjectData { ObjectData *object_data(pxr::SdfPath const &id) const; pxr::SdfPathVector prototypes() const; void check_update(Object *object); - void check_remove(std::set &available_objects); - void available_materials(std::set &paths) const; + void check_remove(Set &available_objects); + void available_materials(Set &paths) const; void update_as_parent(); void update_double_sided(MaterialData *mat_data); @@ -56,12 +58,11 @@ class InstancerData : public ObjectData { MeshInstance *mesh_instance(pxr::SdfPath const &id) const; LightInstance *light_instance(pxr::SdfPath const &id) const; - pxr::TfHashMap mesh_instances_; - pxr::TfHashMap light_instances_; + Map mesh_instances_; + Map light_instances_; pxr::VtMatrix4dArray mesh_transforms_; }; -using InstancerDataMap = - pxr::TfHashMap, pxr::SdfPath::Hash>; +using InstancerDataMap = Map>; } // namespace blender::render::hydra diff --git a/source/blender/render/hydra/scene_delegate/material.cc b/source/blender/render/hydra/scene_delegate/material.cc index cd832a4f1816..827f31660d97 100644 --- a/source/blender/render/hydra/scene_delegate/material.cc +++ b/source/blender/render/hydra/scene_delegate/material.cc @@ -60,14 +60,14 @@ void MaterialData::update() scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, pxr::HdMaterial::AllDirty); if (prev_double_sided != double_sided) { - for (auto &it : scene_delegate_->objects_) { - MeshData *m_data = dynamic_cast(it.second.get()); + for (auto &obj_data : scene_delegate_->objects_.values()) { + MeshData *m_data = dynamic_cast(obj_data.get()); if (m_data) { m_data->update_double_sided(this); } } - for (auto &it : scene_delegate_->instancers_) { - it.second->update_double_sided(this); + for (auto &i_data : scene_delegate_->instancers_.values()) { + i_data->update_double_sided(this); } } } diff --git a/source/blender/render/hydra/scene_delegate/material.h b/source/blender/render/hydra/scene_delegate/material.h index 94df4d17b582..fd87cd332414 100644 --- a/source/blender/render/hydra/scene_delegate/material.h +++ b/source/blender/render/hydra/scene_delegate/material.h @@ -7,6 +7,7 @@ #include #include +#include "BLI_map.hh" #include "DNA_material_types.h" #include "id.h" @@ -37,7 +38,6 @@ class MaterialData : public IdData { pxr::VtValue material_network_map_; }; -using MaterialDataMap = - pxr::TfHashMap, pxr::SdfPath::Hash>; +using MaterialDataMap = Map>; } // namespace blender::render::hydra diff --git a/source/blender/render/hydra/scene_delegate/mesh.cc b/source/blender/render/hydra/scene_delegate/mesh.cc index 8c8ef8bb86f5..36f6050dfd71 100644 --- a/source/blender/render/hydra/scene_delegate/mesh.cc +++ b/source/blender/render/hydra/scene_delegate/mesh.cc @@ -173,11 +173,11 @@ void MeshData::update_double_sided(MaterialData *mat_data) } } -void MeshData::available_materials(std::set &paths) const +void MeshData::available_materials(Set &paths) const { for (auto &sm : submeshes_) { if (sm.mat_data && !sm.mat_data->prim_id.IsEmpty()) { - paths.insert(sm.mat_data->prim_id); + paths.add(sm.mat_data->prim_id); } } } @@ -301,15 +301,14 @@ void MeshData::write_materials() m.mat_data = nullptr; continue; } + pxr::SdfPath p_id = scene_delegate_->material_prim_id(mat); - m.mat_data = scene_delegate_->material_data(p_id); - if (!m.mat_data) { - scene_delegate_->materials_[p_id] = std::make_unique( - scene_delegate_, mat, p_id); - m.mat_data = scene_delegate_->material_data(p_id); - m.mat_data->init(); - m.mat_data->insert(); - } + m.mat_data = scene_delegate_->materials_ + .lookup_or_add(p_id, + std::make_unique(scene_delegate_, mat, p_id)) + .get(); + m.mat_data->init(); + m.mat_data->insert(); } } diff --git a/source/blender/render/hydra/scene_delegate/mesh.h b/source/blender/render/hydra/scene_delegate/mesh.h index 750e9c2bdf39..95f0ba04ed2a 100644 --- a/source/blender/render/hydra/scene_delegate/mesh.h +++ b/source/blender/render/hydra/scene_delegate/mesh.h @@ -7,6 +7,7 @@ #include #include "BKE_duplilist.h" +#include "BLI_set.hh" #include "material.h" #include "object.h" @@ -39,7 +40,7 @@ class MeshData : public ObjectData { pxr::SdfPath material_id(pxr::SdfPath const &id) const; bool double_sided(pxr::SdfPath const &id) const; void update_double_sided(MaterialData *mat_data); - void available_materials(std::set &paths) const; + void available_materials(Set &paths) const; pxr::SdfPathVector submesh_paths() const; pxr::HdCullStyle cull_style = pxr::HdCullStyleBackUnlessDoubleSided; diff --git a/source/blender/render/hydra/scene_delegate/object.h b/source/blender/render/hydra/scene_delegate/object.h index 6ed40aa579a3..79b2150cdb7f 100644 --- a/source/blender/render/hydra/scene_delegate/object.h +++ b/source/blender/render/hydra/scene_delegate/object.h @@ -7,6 +7,7 @@ #include #include "BKE_layer.h" +#include "BLI_map.hh" #include "DNA_object_types.h" #include "id.h" @@ -36,8 +37,7 @@ class ObjectData : public IdData { Object *parent_ = nullptr; }; -using ObjectDataMap = - pxr::TfHashMap, pxr::SdfPath::Hash>; +using ObjectDataMap = Map>; pxr::GfMatrix4d gf_matrix_from_transform(float m[4][4]);