Skip to content

Commit

Permalink
Matching to Houdini build 18.5.49.
Browse files Browse the repository at this point in the history
  • Loading branch information
SideFX authored and Prisms User committed Dec 4, 2019
1 parent 3189c94 commit 5b5946e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
17 changes: 11 additions & 6 deletions src/houdini/lib/H_USD/HUSD/HUSD_Imaging.C
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ HUSD_Imaging::setRenderSettings(const UT_StringRef &settings_path,
}

UT_StringHolder
HUSD_Imaging::lookupID(int path_id, int inst_id) const
HUSD_Imaging::lookupID(int path_id, int inst_id, bool pick_instance) const
{
UT_StringHolder path;
if(myPrivate->myImagingEngine)
Expand All @@ -1785,17 +1785,22 @@ HUSD_Imaging::lookupID(int path_id, int inst_id) const

if(inst_id >= 0)
{
int index = -1;
SdfPath ipath = myPrivate->myImagingEngine->
GetPrimPathFromInstanceIndex(sdfpath, inst_id, &index);
GetPrimPathFromInstanceIndex(sdfpath, inst_id, nullptr);
if(!ipath.IsEmpty())
{
path = ipath.GetText();

UT_WorkBuffer index_string;
index_string.sprintf("[%d]", index);
path += UT_StringRef(index_string.buffer());
if(pick_instance)
{
UT_WorkBuffer index_string;
index_string.sprintf("[%d]", inst_id);
path += UT_StringRef(index_string.buffer());
}
}
else
path = sdfpath.GetText();

}
else
path = sdfpath.GetText();
Expand Down
4 changes: 3 additions & 1 deletion src/houdini/lib/H_USD/HUSD/HUSD_Imaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ class HUSD_API HUSD_Imaging : public UT_NonCopyable
void getRenderStats(UT_Options &stats);

// Returns the path associated with a ID from a primId buffer.
UT_StringHolder lookupID(int path_id, int inst_id) const;
UT_StringHolder lookupID(int path_id,
int inst_id,
bool pick_instance) const;

private:
class husd_ImagingPrivate;
Expand Down
3 changes: 3 additions & 0 deletions src/houdini/lib/H_USD/HUSD/HUSD_Scene.C
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,10 @@ HUSD_Scene::setSelection(const UT_StringArray &paths,

auto name_entry = myPathIDs.find(selpath);
if(name_entry != myPathIDs.end())
{
id = name_entry->second;
mySelection[id] = getPrimType(id);
}
else
no_path_id = true;

Expand Down

0 comments on commit 5b5946e

Please sign in to comment.