Ensure options attributes are not set while a render is in progress #2076
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.
When
_Executeis being invoked over and over in the render delegate, even sometimes when a render is in progress without any real change, we need to check if specific things have changed, and if they do we make it so that the render is interrupted to update them.Here we were constantly setting a couple of options parameters (pixel_aspect_ratio and subdiv_camera) without even interrupting the render. Worse, with the default use case of no subdiv_camera, we were calling AiNodeResetParameter on it, which currently doesn't have all the checks we do in AiNodeSet*, so Arnold constantly thinks that the options have changed, even during iterations.
Finally, in ShouldSkipIteration I'm now calling ProcessConnections all the time, instead of checking the boolean value "skip". In a separate task, we need to rewrite this function completely as it's logic is completely inverted
Issues fixed in this pull request
Fixes #2075