forked from blender/blender
BLEN-326: Pass MaterialX to Hydra via hdMaterialNetwork #5
@ -343,7 +343,7 @@ VtValue BlenderSceneDelegate::GetMaterialResource(SdfPath const& id)
|
|||||||
{
|
{
|
||||||
MaterialData *mat_data = material_data(id);
|
MaterialData *mat_data = material_data(id);
|
||||||
if (mat_data) {
|
if (mat_data) {
|
||||||
return mat_data->material_resource(this);
|
return mat_data->material_resource();
|
||||||
}
|
}
|
||||||
return VtValue();
|
return VtValue();
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ VtValue MaterialData::get_data(TfToken const &key)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
pxr::VtValue MaterialData::material_resource(pxr::HdSceneDelegate *scene_delegate)
|
pxr::VtValue MaterialData::material_resource()
|
||||||
{
|
{
|
||||||
#if defined(_MTLX_TRANSLATION_ENABLED)
|
#if defined(_MTLX_TRANSLATION_ENABLED)
|
||||||
std::string const &path = mtlx_path.GetResolvedPath();
|
std::string const &path = mtlx_path.GetResolvedPath();
|
||||||
|
@ -25,7 +25,7 @@ class MaterialData: IdData {
|
|||||||
void remove_prim() override;
|
void remove_prim() override;
|
||||||
void mark_prim_dirty(DirtyBits dirty_bits) override;
|
void mark_prim_dirty(DirtyBits dirty_bits) override;
|
||||||
|
|
||||||
pxr::VtValue material_resource(pxr::HdSceneDelegate *scene_delegate);
|
pxr::VtValue material_resource();
|
||||||
George-Shakula marked this conversation as resolved
|
|||||||
void export_mtlx();
|
void export_mtlx();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user
scene_delegate
is already available in MaterialData from IdData