Skip to content

Render command line Hydra scene dump functionality, with tests. - #466

Merged
debloip-adsk merged 7 commits into
devfrom
tremblp/HYDRA-2382/batch_renderer_scene_dump
Jul 13, 2026
Merged

Render command line Hydra scene dump functionality, with tests.#466
debloip-adsk merged 7 commits into
devfrom
tremblp/HYDRA-2382/batch_renderer_scene_dump

Conversation

@ppt-adsk

@ppt-adsk ppt-adsk commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@ppt-adsk
ppt-adsk requested a review from benyoon-adsk July 7, 2026 21:02

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved to fvpSceneIndexUtils.h, to be used in non-test code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved to fvpSceneIndexUtils.cpp, to be used in non-test code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved from testUtils.h, to be used in non-test code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Moved from testUtils.cpp, to be used in non-test code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added Hydra scene dump capability for all renderers.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Expected dump file for test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Expected dump file for test.


_engine.Execute(_renderIndex, &tasks);

dumpHydraScene(_renderIndex);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Optionally dump the Hydra scene, for debugging.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Add two Hydra scene dump tests, one for the terminal scene index, the other for the Maya Hydra scene index (which translates Maya data to Hydra).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Instead of using platform-native fc on Windows and diff on UNIX, AI suggested (and wrote) this Python comparison script, which is more robust to line ending differences, and turned out to be very handy to filter out object address differences (which are encoded in some of the Hydra prim names we generate). Since these may differ from machine to machine and run to run, the exact object hexadecimal address must not be considered in the file difference.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could this info be included in the comments?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

See comments in CMakeLists.txt.

@ppt-adsk ppt-adsk self-assigned this Jul 7, 2026
@ppt-adsk ppt-adsk assigned ppt-adsk and unassigned ppt-adsk Jul 8, 2026
benyoon-adsk
benyoon-adsk previously approved these changes Jul 8, 2026

@benyoon-adsk benyoon-adsk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work!


def _ensureStringAttr(attrName, value):
exists = cmds.attributeQuery(attrName, node=_NODE, exists=True)
if not value and not exists:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small nit, the conditions not exists seem redundant, would this be better?

if not exists:
    if not value:
        return
    cmds.addAttr(_NODE, longName=attrName, dataType='string')
cmds.setAttr('%s.%s' % (_NODE, attrName), value, type='string')

@ppt-adsk
ppt-adsk requested a review from benyoon-adsk July 9, 2026 15:25
@ppt-adsk ppt-adsk assigned ppt-adsk and unassigned ppt-adsk Jul 9, 2026
benyoon-adsk
benyoon-adsk previously approved these changes Jul 9, 2026
@ppt-adsk
ppt-adsk requested a review from benyoon-adsk July 10, 2026 19:45
@ppt-adsk ppt-adsk assigned ppt-adsk and unassigned ppt-adsk Jul 10, 2026
@ppt-adsk ppt-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 13, 2026
@debloip-adsk
debloip-adsk merged commit 16b7fa6 into dev Jul 13, 2026
11 checks passed
@debloip-adsk
debloip-adsk deleted the tremblp/HYDRA-2382/batch_renderer_scene_dump branch July 13, 2026 21:58
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants