Move to use blender::Map container instead std::unordered_map #47

Merged
Bogdan Nagirniak merged 17 commits from Vasyl-Pidhirskyi/blender_bn:BLEN-418 into hydra-render 2023-06-02 12:02:46 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 757555fe17 - Show all commits

View File

@ -199,7 +199,7 @@ void CurvesData::write_material()
pxr::SdfPath p_id = scene_delegate_->material_prim_id(mat); pxr::SdfPath p_id = scene_delegate_->material_prim_id(mat);
mat_data_ = scene_delegate_->material_data(p_id); mat_data_ = scene_delegate_->material_data(p_id);
if (!mat_data_) { if (!mat_data_) {
scene_delegate_->materials_[p_id] = std::make_unique<MaterialData>(scene_delegate_, mat, p_id); scene_delegate_->materials_.add_overwrite(p_id, std::make_unique<MaterialData>(scene_delegate_, mat, p_id));
mat_data_ = scene_delegate_->material_data(p_id); mat_data_ = scene_delegate_->material_data(p_id);
mat_data_->init(); mat_data_->init();
mat_data_->insert(); mat_data_->insert();

View File

@ -60,8 +60,8 @@ void MaterialData::update()
scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id,
pxr::HdMaterial::AllDirty); pxr::HdMaterial::AllDirty);
if (prev_double_sided != double_sided) { if (prev_double_sided != double_sided) {
for (auto &it : scene_delegate_->objects_) { for (auto &it : scene_delegate_->objects_.values()) {
MeshData *m_data = dynamic_cast<MeshData *>(it.second.get()); MeshData *m_data = dynamic_cast<MeshData *>(it.get());
if (m_data) { if (m_data) {
m_data->update_double_sided(this); m_data->update_double_sided(this);
} }