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

General: Added helper getters to modules manager #3712

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

iLLiCiTiT
Copy link
Member

Brief description

Added helper methods to ModulesManager to access modules by name.

Description

Added dictionary like access to module by their names and special method to get module by name which also checks if is module enabled.

Testing notes:

New methods on created object of ModulesManager in different cases (e.g. in Tray > Admin > Console).

from openpype.modules import ModulesManager

manager = ModulesManager()
print(manager["project_manager"])
print(manager.get("project_manager"))
print(manager.get_enabled_module("project_manager"))

@iLLiCiTiT iLLiCiTiT self-assigned this Aug 23, 2022
@iLLiCiTiT iLLiCiTiT added the type: enhancement Enhancements to existing functionality label Aug 23, 2022
Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

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

Both new ones work as expected.

@iLLiCiTiT iLLiCiTiT merged commit 81c01b2 into develop Aug 24, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/module_getters_on_modules_manager branch August 24, 2022 09:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants