Skip to content

feat(vray): Add pre-submission hook for vrscene asset discovery#209

Open
rickrams wants to merge 2 commits into
aws-deadline:mainlinefrom
rickrams:feat/vrscene-asset-discovery-hook
Open

feat(vray): Add pre-submission hook for vrscene asset discovery#209
rickrams wants to merge 2 commits into
aws-deadline:mainlinefrom
rickrams:feat/vrscene-asset-discovery-hook

Conversation

@rickrams
Copy link
Copy Markdown
Contributor

Add a pre-submission hook that parses vrscene files to automatically discover and attach referenced textures and files to job submissions.

The hook extracts file paths from:

  • file="..." parameters (BitmapBuffer textures, GeomMeshFile meshes, etc.)
  • #include "..." directives for referenced vrscene files

Relative paths are resolved against the vrscene directory. Missing files are logged as warnings but do not block submission.

New files:

  • hooks.yaml: Pre-submission hook configuration
  • scripts/discover_vrscene_assets.py: Asset discovery script

Updated files:

  • template.yaml: Updated VraySceneFile description
  • README.md: Added hook documentation and updated bundle structure

Fixes:

How was this change tested?

Ran with two different vrscene files confirming it found all additional files, added them as job attachments, and the resulting render worked.

Was this change documented?

yes


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add a pre-submission hook that parses vrscene files to automatically
discover and attach referenced textures and files to job submissions.

The hook extracts file paths from:
- file="..." parameters (BitmapBuffer textures, GeomMeshFile meshes, etc.)
- #include "..." directives for referenced vrscene files

Relative paths are resolved against the vrscene directory. Missing files
are logged as warnings but do not block submission.

New files:
- hooks.yaml: Pre-submission hook configuration
- scripts/discover_vrscene_assets.py: Asset discovery script

Updated files:
- template.yaml: Updated VraySceneFile description
- README.md: Added hook documentation and updated bundle structure

Signed-off-by: rickrams <rickrams@users.noreply.github.com>
@rickrams rickrams requested a review from a team as a code owner April 27, 2026 19:39
@github-actions github-actions Bot added the waiting-on-maintainers Waiting on the maintainers to review. label Apr 27, 2026
@@ -0,0 +1,5 @@
version: "1.0"
preSubmission:
- command: python3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: python3 probably won't work on Windows. Maybe we want to make commands configurable by OS for hooks in the future.

crowecawcaw
crowecawcaw previously approved these changes Apr 27, 2026
crowecawcaw
crowecawcaw previously approved these changes Apr 28, 2026
V-Ray appends the frame number before the extension when using -frames
(e.g., output_f10_region_r0_c0.0010.png instead of
output_f10_region_r0_c0.png). The merge step expects the filename
without the frame number insertion.

Rename V-Ray's actual output to the expected name after rendering so
multi-frame renders work correctly.

Signed-off-by: rickrams <rickrams@users.noreply.github.com>
@rickrams rickrams force-pushed the feat/vrscene-asset-discovery-hook branch from d732e33 to d55531a Compare April 28, 2026 23:44
@rickrams
Copy link
Copy Markdown
Contributor Author

rickrams commented May 4, 2026

added a fix for frame names for multi-frame renders but otherwise good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-maintainers Waiting on the maintainers to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants