Support multimaterials on one mesh #44

Merged
Bogdan Nagirniak merged 11 commits from BLEN-417 into hydra-render 2023-05-24 07:07:39 +02:00
Showing only changes of commit 78c001a396 - Show all commits

View File

@ -244,7 +244,7 @@ pxr::SdfPath BlenderSceneDelegate::world_prim_id() const
ObjectData *BlenderSceneDelegate::object_data(pxr::SdfPath const &id) const ObjectData *BlenderSceneDelegate::object_data(pxr::SdfPath const &id) const
{ {
pxr::SdfPath p_id = (id.GetName().find("SM_", 0) == 0) ? id.GetParentPath() : id; pxr::SdfPath p_id = (id.GetName().find("SM_") == 0) ? id.GetParentPath() : id;

id.GetName().find("SM_")

`id.GetName().find("SM_")`
auto it = objects_.find(p_id); auto it = objects_.find(p_id);
if (it != objects_.end()) { if (it != objects_.end()) {
return it->second.get(); return it->second.get();