-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-111516 When the instnace count changes we need to update everything related #1398
MAYA-111516 When the instnace count changes we need to update everything related #1398
Conversation
…to the instancer. Set the dirty instancer flag. Where the instancer is dirty, re-extract the instance colors.
…isplayed which are not working right now.
…er index dirty flag in mesh.
@@ -91,7 +91,8 @@ void HdVP2Instancer::_SyncPrimvars() | |||
// primvars are dirty. | |||
HdDirtyBits dirtyBits = changeTracker.GetInstancerDirtyBits(id); | |||
if (HdChangeTracker::IsAnyPrimvarDirty(dirtyBits, id) | |||
|| HdChangeTracker::IsInstancerDirty(dirtyBits, id)) { | |||
|| HdChangeTracker::IsInstancerDirty(dirtyBits, id) | |||
|| HdChangeTracker::IsInstanceIndexDirty(dirtyBits, id)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The important thing here is down at line 128 we clean the instancer. If the instancer doesn't get cleaned then next time the instancer changes HdChangeTracker::MarkInstancerDirty will detect that the dirty bits are not changing and then not send any update.
if (((rprimDirtyBits & HdChangeTracker::DirtyPrimvar) != 0) | ||
if (((rprimDirtyBits | ||
& (HdChangeTracker::DirtyPrimvar | HdChangeTracker::DirtyInstancer | ||
| HdChangeTracker::DirtyInstanceIndex)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the additional dirty bit DirtyInstanceIndex!
to the instancer. Set the dirty instancer flag. Where the instancer is dirty, re-extract the instance colors.
This also fixes MAYA-110523