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

MAYA-122926 reset auto-edit in all variants #2377

Merged
merged 1 commit into from
May 25, 2022

Conversation

pierrebai-adsk
Copy link
Collaborator

  • Add a utility function to apply a function to all variants of a prim.
  • Add a utility class to automatically restore the current variant on exit.
  • Use these to clear the auto-edit flag in all variants.
  • Remove obsolete comments about type info not being correctly preserved and psuhEnd not being called (now it is called).

- Add a utility function to apply a function to all variants of a prim.
- Add a utility class to automatically restore the current variant on exit.
- Use these to clear the auto-edit flag in all variants.
- Remove obsolete comments about type info not being correctly preserved and psuhEnd not being called (now it is called).
void clearAutoEdit(const UsdPrim& prim)
{
if (prim.IsValid()) {
UsdPrim parentPrim = prim.GetParent();
MAYAUSD_NS::applyToAllVariants(parentPrim, true, [prim]() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We normally just use the actual namespace name instead of the define. So just MayaUsd::

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label May 25, 2022
@seando-adsk seando-adsk added the core Related to core library label May 25, 2022
@seando-adsk seando-adsk merged commit 8d0a425 into dev May 25, 2022
@seando-adsk seando-adsk deleted the t_bailp/MAYA-122926/reset-flag-in-all-variants branch May 25, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core library 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