Create possibility to provide render settings via BlenderSceneDelegate #41

Merged
Bogdan Nagirniak merged 10 commits from BLEN-349 into hydra-render 2023-05-19 20:19:17 +02:00
Showing only changes of commit 1e87d95713 - Show all commits

View File

@ -34,7 +34,7 @@ void MaterialData::init()
double_sided = (((Material *)id)->blend_flag & MA_BL_CULL_BACKFACE) == 0; double_sided = (((Material *)id)->blend_flag & MA_BL_CULL_BACKFACE) == 0;
export_mtlx(); export_mtlx();
if (!scene_delegate_->settings.mx_filename_key.IsEmpty()) { if (scene_delegate_->settings.mx_filename_key.IsEmpty()) {
write_material_network_map(); write_material_network_map();
} }
} }
@ -75,7 +75,7 @@ void MaterialData::update()
pxr::VtValue MaterialData::get_data(pxr::TfToken const &key) const pxr::VtValue MaterialData::get_data(pxr::TfToken const &key) const
{ {
pxr::VtValue ret; pxr::VtValue ret;
if (key.GetString() == "MaterialXFilename") { if (key == scene_delegate_->settings.mx_filename_key) {
if (!mtlx_path_.GetResolvedPath().empty()) { if (!mtlx_path_.GetResolvedPath().empty()) {
ret = mtlx_path_; ret = mtlx_path_;
} }