Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya: Remove shelf class and shelf build on maya userSetup.py #5837

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Oct 30, 2023

Changelog Description

Remove shelf builder logic. It appeared to be unused and had bugs.

Additional info

Bugs/unused:

  • It referenced self._null even though it didn't exist there.
  • Docstring mentioned it had an empty build method - it didn't; it ran a preset dict.
  • It builds from settings['maya'].get('project_shelf') which is not an existing key in project settings.
  • It used environment var OPENPYPE_PROJECT_SCRIPTS in the build but it's not set anywhere so will be confusing to anyone if it were to be run even (since it doesn't have settings you can't run it.)
  • The whole shelf preset setup is weird with exec calls and could be potentially abused by someone savvy with ill intent.
  • addMenuItem didn't set the icon if it were passed
    • a lot of cosmetic issues; code style doesn't match rest of the code, etc.

@mkolar Do you know of someone somewhere potentially using this? It seemed originally coded by you but I have a feeling its ancient and now unused code.

Testing notes:

  1. Maya should launch and still work as expected.

@BigRoy BigRoy added host: Maya type: refactor Structural changes not affecting functionality community contribution labels Oct 30, 2023
@ynbot ynbot added the size/S Denotes a PR changes 100-499 lines, ignoring general files label Oct 30, 2023
Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

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

Launches Maya successfully without any error and I have done some quick test with the publishing and so far so good. I also take a look at Openpype tool and open dialogs to see if it has registered and all look fine.
Code looks good for me too.
image

@mkolar
Copy link
Member

mkolar commented Nov 24, 2023

Agreed. this has been used on some old productions to build custom shelfs and clearly a legacy bit.

We have a small conflict, but happy to merge when that is resolved.

…hore/maya_shelf_build_cleanup

# Conflicts:
#	openpype/hosts/maya/api/lib.py
@BigRoy
Copy link
Collaborator Author

BigRoy commented Dec 21, 2023

@mkolar should be resolved now

Copy link
Member

@tokejepsen tokejepsen left a comment

Choose a reason for hiding this comment

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

Tested in Maya 2023 successfully. Ready to merge.

@tokejepsen tokejepsen assigned antirotor and unassigned LiborBatek Jan 23, 2024
@BigRoy
Copy link
Collaborator Author

BigRoy commented Feb 7, 2024

Yay, time for merging! 🚀

@mkolar
Copy link
Member

mkolar commented Feb 9, 2024

Shame to not merge this even though technically it should not make it to OP anymore. @bradenjennings could you please port it to ayon-core, so we can merge both at the same time?

@mkolar mkolar merged commit ca71b9d into ynput:develop Feb 13, 2024
7 checks passed
@ynbot ynbot added this to the next-patch milestone Feb 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community contribution host: Maya port to AYON size/S Denotes a PR changes 100-499 lines, ignoring general files target: AYON target: OpenPype type: refactor Structural changes not affecting functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants