forked from blender/blender
Move to use blender::Map container instead std::unordered_map #47
@ -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();
|
||||
Vasyl-Pidhirskyi marked this conversation as resolved
Outdated
|
||||
i_data->init();
|
||||
i_data->insert();
|
||||
}
|
||||
|
@ -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,
|
||||
Vasyl-Pidhirskyi marked this conversation as resolved
Outdated
Georgiy Markelov
commented
seems like here should be seems like here should be `add_new`.
Bogdan Nagirniak
commented
`lookup_or_add_default`
Vasyl Pidhirskyi
commented
implemented via implemented via `lookup_or_add`
|
||||
std::make_unique<MaterialData>(scene_delegate_, mat, p_id))
|
||||
.get();
|
||||
m.mat_data->init();
|
||||
m.mat_data->insert();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace blender::render::hydra
|
||||
|
Loading…
Reference in New Issue
Block a user
seems like here should be
add_new
.use
lookup_or_add_default
implemented via
lookup_or_add