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

Maya: Remove some unused code #2709

Merged
merged 11 commits into from
Feb 22, 2022
Merged

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Feb 12, 2022

Brief description

First pass at cleaning up some dead Maya integration code, as a step for #1306

Notes

The following functions also appear unused - but I wasn't sure whether to remove them.

openpype.hosts.maya.api.lib.without_extension
openpype.hosts.maya.api.lib.remove_id
openpype.hosts.maya.api.lib.unique_name
openpype.hosts.maya.api.lib.no_refresh

The remove_id might be nice to keep in the API for anyone coding against the OP maya integration. The without_extension I wasn't sure about because it was exposed in the __init__ for the API too. The other ones feel like some that we can remove too?

Also, some of the removed code came from Avalon core and had no use in OP.

Testing notes

Still needs to be tested in Maya.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Feb 13, 2022

Did some quick preliminary testing in Maya. Launches fine, seems to work at first sight. I guess it's just a debate about those last potentially unused methods whether it's worth removing those too.

Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

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

As these are not used anywhere and it survived my casual playing with Maya I guess it is safe to merge it.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Feb 18, 2022

Any verdict on these still remaining functions that appear unusued?

openpype.hosts.maya.api.lib.without_extension
openpype.hosts.maya.api.lib.remove_id
openpype.hosts.maya.api.lib.unique_name
openpype.hosts.maya.api.lib.no_refresh

@tokejepsen
Copy link
Member

Is openpype.hosts.maya.api.lib.no_refresh not being used for alembic caching?

@BigRoy
Copy link
Collaborator Author

BigRoy commented Feb 18, 2022

Is openpype.hosts.maya.api.lib.no_refresh not being used for alembic caching?

No, that is - how confusing it might seem - openpype.hosts.maya.api.lib.suspended_refresh which differs in code from openpype.hosts.maya.api.lib.no_refresh.

If we'd want there's also ogs(pause=True) if we want to pause the Viewport 2.0 Hardware renderer. So much ways to suspend certain aspects from Maya. However do note that unpausing with ogs seems to perform a partial reset/refresh and thus can be slow for large scenes.

@mkolar mkolar added the type: bug Something isn't working label Feb 18, 2022
@antirotor
Copy link
Member

Any verdict on these still remaining functions that appear unusued?

I would remove them too. Even if they might be useful later, I hate idea to have OP as repository for useful but not used code :) Anyway, we have git history and if needed, they can be resurrected.

@antirotor
Copy link
Member

btw I love this :)

image

@BigRoy
Copy link
Collaborator Author

BigRoy commented Feb 21, 2022

I would remove them too. Even if they might be useful later, I hate idea to have OP as repository for useful but not used code :) Anyway, we have git history and if needed, they can be resurrected.

Agreed. Removed with b52e511

Did some preliminary testing in Maya 2020. Still seemed fine, as expected! 👍

btw I love this :)

Even better now. ♻️

@antirotor antirotor merged commit 3bbd40e into ynput:develop Feb 22, 2022
@tokejepsen
Copy link
Member

Woop woop! -2932 lines!

@BigRoy BigRoy deleted the maya_host_cleanup branch March 20, 2024 15:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants