Skip to content
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

Conversation

williamkrick
Copy link
Contributor

@williamkrick williamkrick commented May 6, 2021

to the instancer. Set the dirty instancer flag. Where the instancer is dirty, re-extract the instance colors.

This also fixes MAYA-110523

…to the instancer. Set the dirty instancer flag. Where the instancer is dirty, re-extract the instance colors.
@williamkrick williamkrick added the vp2renderdelegate Related to VP2RenderDelegate label May 7, 2021
@@ -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)) {
Copy link
Contributor Author

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))
Copy link
Contributor Author

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!

@williamkrick williamkrick added the ready-for-merge Development process is finished, PR is ready for merge label May 10, 2021
@kxl-adsk kxl-adsk merged commit e364f67 into dev May 10, 2021
@kxl-adsk kxl-adsk deleted the krickw/MAYA-111516/force_instance_colors_to_uypdate_when_the_instance_count_changes branch May 10, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants