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

EMSUSD-751 - UsdUfe: Move Ufe::Attributes interface implementation #3737

Merged
merged 9 commits into from
May 2, 2024

Conversation

seando-adsk
Copy link
Collaborator

EMSUSD-751 - UsdUfe: Move Ufe::Attributes interface implementation

  • Tokens moved: generic and some of the meta data.
  • Functions moved:
    • prettifyName (python wrapper)
    • isConnected()
    • canRemoveSrcProperty() / canRemoveDstProperty()
    • usdTypeToUfe() / ufeTypeToUsd()
    • usdAttrFromUfeAttr() / attrFromUfeAttrInfo()
    • vtValueFromString()
    • splitString()
  • Classes moved:
    • UsdAttributesHandler/UsdAttributes/UsdAttribute/UsdAttributeHolder
    • UsdShaderAttributeDef/UsdShaderAttributeHolder/
    • UsdAddAttributeCommand/UsdRemoveAttributeCommand/UsdRenameAttributeCommand
  • New (optional) DCC message (info/warning/error) functions.
  • Removed Maya setting isAttributeLocked function as a default implementation exists in UsdUfe.
  • Moved code from UsdShaderNodeDefHandler::usdDefinition() to UsdUfe::usdShaderNodeFromSceneItem().
  • Removed mayaUsd inline prettifyName().

EMSUSD-751 - UsdUfe: Move Ufe::Attributes interface implementation

  • Removed mayaUsd inline SanitizeName().

EMSUSD-751 - UsdUfe: Move Ufe::Attributes interface implementation

  • Moved 'using namespace UsdUfe' to mayaUsd to make sure that UsdUfe is properly using namespace.

* Tokens moved: generic and some of the meta data.
* Functions moved:
  * prettifyName (python wrapper)
  * isConnected()
  * canRemoveSrcProperty() / canRemoveDstProperty()
  * usdTypeToUfe() / ufeTypeToUsd()
  * usdAttrFromUfeAttr() / attrFromUfeAttrInfo()
  * vtValueFromString()
  * splitString()
* Classes moved:
  * UsdAttributesHandler/UsdAttributes/UsdAttribute/UsdAttributeHolder
  * UsdShaderAttributeDef/UsdShaderAttributeHolder/
  * UsdAddAttributeCommand/UsdRemoveAttributeCommand/UsdRenameAttributeCommand
* New (optional) DCC message (info/warning/error) functions.
* Removed Maya setting isAttributeLocked function as a default
  implementation exists in UsdUfe.
* Moved code from UsdShaderNodeDefHandler::usdDefinition() to
  UsdUfe::usdShaderNodeFromSceneItem().
* Removed mayaUsd inline prettifyName().
* Moved 'using namespace UsdUfe' to mayaUsd to make sure that
  UsdUfe is properly using namespace.
Copy link
Collaborator Author

@seando-adsk seando-adsk left a comment

Choose a reason for hiding this comment

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

@deboisj / @pierrebai-adsk I'll assign both of you as code reviewers. No rush to review. I'm off for the next of this week.

@seando-adsk seando-adsk added the ufe-usd Related to UFE-USD plugin in Maya-Usd label Apr 23, 2024
@seando-adsk seando-adsk self-assigned this Apr 23, 2024
@@ -120,6 +118,10 @@ void mayaStopWaitCursor() { MGlobal::executeCommand("waitCursor -state 0"); }
// Note: MayaUsd::ufe::getStage takes two parameters, so wrap it in a function taking only one.
PXR_NS::UsdStageWeakPtr mayaGetStage(const Ufe::Path& path) { return MayaUsd::ufe::getStage(path); }

void displayInfoMessage(const std::string& msg) { MGlobal::displayInfo(msg.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.

is this going to the maya listener? (the thing showing the red text bottom right)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes except being info it won't be red

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This prints to the Maya script editor and the command line. Three types of message: info, warning & error (same as USD).

}
}

namespace {
Copy link
Collaborator

Choose a reason for hiding this comment

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

unless specified i assumed all that is only moved / nothing new

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes correct. Very little new code.

deboisj
deboisj previously approved these changes Apr 29, 2024
Copy link
Collaborator

@deboisj deboisj 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, didnt have much to say. Hopefully there is good test coverage! Thanks alot!

pierrebai-adsk
pierrebai-adsk previously approved these changes Apr 29, 2024
@seando-adsk seando-adsk dismissed stale reviews from pierrebai-adsk and deboisj via 33f4802 April 29, 2024 20:33
@seando-adsk seando-adsk self-assigned this Apr 29, 2024
* Build fixes because of merging latest dev.
* Fixed pxr plugin when building without tests.
@seando-adsk
Copy link
Collaborator Author

@deboisj / @pierrebai-adsk I had to merge in latest dev and then add a few build fixes (related to new Ufe method isDefault).

deboisj
deboisj previously approved these changes Apr 30, 2024
pierrebai-adsk
pierrebai-adsk previously approved these changes May 1, 2024
@seando-adsk seando-adsk dismissed stale reviews from pierrebai-adsk and deboisj via 5944b1e May 1, 2024 21:29
@seando-adsk seando-adsk requested a review from pierrebai-adsk May 1, 2024 21:56
@seando-adsk
Copy link
Collaborator Author

@pierrebai-adsk Sorry had to merge in latest dev again since I merged my other clipboard PR. This should be the last time. I hope to merge this in on Thu.

pierrebai-adsk
pierrebai-adsk previously approved these changes May 2, 2024
@seando-adsk
Copy link
Collaborator Author

@pierrebai-adsk Sorry one last commit to fix Linux/OSX build issues. It was because I removed the using namespace UsdUfe from the api.h file.

@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label May 2, 2024
@seando-adsk seando-adsk merged commit 7a2bc9b into dev May 2, 2024
11 checks passed
@seando-adsk seando-adsk deleted the donnels/EMSUSD-751/move_attributes_to_usdufe branch May 2, 2024 19:01
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 ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants