fix for ReParameterization corner case #1670
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This proposed patch fixes a corner case we were seeing during live rendering with ReParameterization.
We were experiencing a problem when
ss->ReParameterize()
wasn't successfully applying parameter changes for us.In our situation, a shader's parameter, "A", was marked with lockgeom=0 (ie. "live" or "editable") and was set via
ss->Parameter()
. This parameter was connected (through a series of copies and network links) to another shader's parameter, "B", downstream whose initialized value (ie. the one specified in the .osl/.oso file) matched A's set value. When this happened, A's shading layer was getting marked as "mergeable" and deleted, and we wouldn't see any updates to A via "reparameterization" take effect.Tests
We are using v3.13.2.3 locally and a similar fix (with
b_sym->lockgeom() == 0
in lieu of this PR'sb_sym->interactive()
) resolved the issue. I can port my fix to the v3.12.3 branch if desired.Checklist: