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 8 additions and 10 deletions
Showing only changes of commit 445e628bf3 - Show all commits

View File

@ -386,8 +386,7 @@ void BlenderSceneDelegate::update_instancers(Object *object)
return;
}
instancers_.add_new(id, std::make_unique<InstancerData>(this, object, id));
i_data = instancer_data(id);
i_data = instancers_.lookup_or_add(id, std::make_unique<InstancerData>(this, object, id)).get();
i_data->init();
i_data->insert();
}

View File

@ -301,16 +301,15 @@ 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_.add_new(
p_id, std::make_unique<MaterialData>(scene_delegate_, mat, p_id));
m.mat_data = scene_delegate_->material_data(p_id);
m.mat_data = scene_delegate_->materials_
.lookup_or_add(p_id,
std::make_unique<MaterialData>(scene_delegate_, mat, p_id))
.get();
m.mat_data->init();
m.mat_data->insert();
}
}
}
} // namespace blender::render::hydra