forked from blender/blender
Move to use blender::Map container instead std::unordered_map #47
@ -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();
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user