Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the WriteUsdStageCache API #1806

Merged
merged 2 commits into from Jan 15, 2024

Conversation

sebastienblor
Copy link
Collaborator

@sebastienblor sebastienblor commented Jan 12, 2024

The WriteUsdStageCache API isn't exercised yet, it's meant to be used by MtoA and MAXtoA to avoid linking against USD.
It just had a "frame" argument hardcoded, but we actually want to extend it to have roughly the same set of optional parameters as scene_write . For that we use now a AtParamValueMap so that any argument can be added without changing the API signature. Since this isn't exercised yet, it might not be useful to add a note in the changelog

if (!AiParamValueMapGetStr(params, str::mtl_scope, &mtlScope))
mtlScope = AtString("/mtl");

writer.SetMtlScope(std::string(mtlScope.c_str()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure; but shouldn't the SetMtlScope be inside the condition ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not really. It's written as in the other code path, in a way that if it's not set, it defaults to "/mtl". But it's confusing indeed so in the last commit I'm just setting "/mtl" as the default in the writer class, and the procedural code can then apply the same logic as for the other attributes

Copy link
Collaborator

@cpichard cpichard left a comment

Choose a reason for hiding this comment

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

should we have an entry in the changelog for this improvement ?

@sebastienblor sebastienblor merged commit 06ea7c9 into Autodesk:master Jan 15, 2024
9 checks passed
@sebastienblor sebastienblor deleted the write_stage_api branch January 15, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants