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-125036 correctly identify orphaned edited prims #2803

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk commented Jan 5, 2023

Also fixes MAYA-126891

  • Provide a function to explicitly determine if an edited prim is orphaned.
  • Provide the function in Python too.
  • Use it both to build the context menu and do the outliner item rendering.

- Provide a function to explicitly determine if an edited prim is orphaned.
- Provide the function in Python too.
- Use it both to build the context menu and do the outliner item rendering.
@pierrebai-adsk pierrebai-adsk added adsk Related to Autodesk plugin outliner Features affecting Maya's Outliner labels Jan 5, 2023
@@ -117,6 +117,11 @@ std::string readPullInformationString(const PXR_NS::UsdPrim& prim)
return dagPathStr;
}

bool isEditedPrimOrphaned(const PXR_NS::UsdPrim& prim)
{
return MAYAUSD_NS_DEF::isEditedAsMayaOrphaned(prim);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just use the namespace name "MayaUsd::"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was using the same as existing code above it. I will change both.

// pulled node and not some node that just happens to have the same
// name. This can happen, for example, when two variants each contain
// a child with the same name, one pulled, one not.
if (MAYAUSD_NS_DEF::isEditedAsMayaOrphaned(usdItemPath))
Copy link
Collaborator

Choose a reason for hiding this comment

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

MayaUsd::

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jan 9, 2023
@seando-adsk
Copy link
Collaborator

@vlasovi Ivan can you please do a quick code review before I merge this. Thanks.

Copy link
Collaborator

@vlasovi vlasovi left a comment

Choose a reason for hiding this comment

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

Looks good

@seando-adsk seando-adsk merged commit 70e7efd into dev Jan 13, 2023
@seando-adsk seando-adsk deleted the bailp/MAYA-125036/proper-orphaned-detection branch January 13, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin outliner Features affecting Maya's Outliner 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.

4 participants