feat: capture files with time-based variables for job attachments #162
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.
Resolves #125
What was the problem/requirement? (What/Why)
The deadliine-cloud rop node was evaluating parms at the current frame. So any filepaths that contained time-based variables would only have 1 of those files captured rather than the whole sequence
What was the solution? (How)
There were a few solutions available, each with various downsides.
Evaluate the parm with evalAsStringAtFrame`, would require us to figure out all the relevant frame numbers and adjust for offsets.
Grab the directory before the frame variable
Replace the relevant variables with globs and and let the stdlib take care of finding them.
I went with replacing the time-based variables for input filenames with globs to allow us to do some naive pattern matching. The code itself is then pretty simple with avenues to improve it later.
What is the impact of this change?
We get a LOT more of the files users want to be included with the job!
How was this change tested?
Added a bunch of unit tests to capture the pattern replacement and globbing functionality.
Test coverage is now at ~67%
I'll need to retest the node within Houdini again after some rebasing.
Was this change documented?
N/A
Is this a breaking change?
Fixing!
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.