Skip to content

Commit

Permalink
Matching to Houdini build 18.5.30.
Browse files Browse the repository at this point in the history
  • Loading branch information
SideFX authored and Prisms User committed Nov 15, 2019
1 parent 8a57cd0 commit 593d797
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/houdini/lib/H_USD/HUSD/HUSD_Scene.C
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ HUSD_Scene::HUSD_Scene()
myModSerial(0),
myCamSerial(0),
myLightSerial(0),
mySelectionResolveSerial(0),
mySelectionArrayID(0),
myDeferUpdate(false),
myRenderIndex(nullptr),
Expand Down Expand Up @@ -682,7 +683,9 @@ HUSD_Scene::setSelection(const UT_StringArray &paths,
selectionModified(id);
}

if(no_path_id)
// Prim isn't missing if it's a render setting prim, otherwise we
// need to resolve later when more prims are processed.
if(no_path_id && !selpath.startsWith("/Render/"))
missing = true;

mySelection[id] = PATH_HIGHLIGHT;
Expand All @@ -695,13 +698,25 @@ HUSD_Scene::setSelection(const UT_StringArray &paths,
// If some ids failed to resolve, we may need to try again after the
// scene is updated.
mySelectionArrayNeedsUpdate = missing;
if(missing)
{
// Don't attempt to resolve unless something changes.
mySelectionResolveSerial = myGeoSerial + myLightSerial + myCamSerial;
}
}

void
HUSD_Scene::redoSelectionList()
{
if(mySelectionArrayNeedsUpdate)
setSelection(mySelectionArray);
{
int64 serial = myGeoSerial + myLightSerial + myCamSerial;

// Don't attempt to resolve missing selection paths unless
// something actually changed (geometry, camera, or lights added).
if(serial != mySelectionResolveSerial)
setSelection(mySelectionArray);
}
}

const UT_StringArray &
Expand Down Expand Up @@ -1181,7 +1196,6 @@ HUSD_Scene::intersectHighlightWithSelection()

if(to_remove.entries())
mySelectionID++;

}

void
Expand Down
1 change: 1 addition & 0 deletions src/houdini/lib/H_USD/HUSD/HUSD_Scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ class HUSD_API HUSD_Scene : public UT_NonCopyable
int64 myModSerial;
int64 myCamSerial;
int64 myLightSerial;
int64 mySelectionResolveSerial;
bool myDeferUpdate;
UT_Vector2I myRenderPrimRes;

Expand Down

0 comments on commit 593d797

Please sign in to comment.