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

General: Move creators plugin getter #3714

Merged
merged 2 commits into from
Aug 24, 2022

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Aug 23, 2022

Brief description

Moved get_creator_by_name function into openpype.pipeline.create.creator_plugins and renamed to get_legacy_creator_by_name.

Testing notes:

Creation during loading in Blender and Maya should work as before.

@iLLiCiTiT iLLiCiTiT self-assigned this Aug 23, 2022
@iLLiCiTiT iLLiCiTiT added the type: refactor Structural changes not affecting functionality label Aug 23, 2022
@BigRoy
Copy link
Collaborator

BigRoy commented Aug 23, 2022

Could you show me how I could get the non legacy creators by name? (Or basically what the new equivalent is of this functionality)

@iLLiCiTiT
Copy link
Member Author

Could you show me how I could get the non legacy creators by name? (Or basically what the new equivalent is of this functionality)

Creator plugins are wrapped into CreateContext. Creators can be accessed by their identifier from there. So there is not direct equivalent of this functionality.

Programmatically creation is not "ideal" now but ready to be added. The development focus was and still is elsewhere.

from openpype.pipeline import registered_host
from openpype.pipeline.create import CreateContext


context = CreateContext(registered_host())
render_creator = context.creators["render"]
...
# Do some stuff
...
context.save_changes()

@BigRoy
Copy link
Collaborator

BigRoy commented Aug 24, 2022

Creator plugins are wrapped into CreateContext. Creators can be accessed by their identifier from there. So there is not direct equivalent of this functionality.
Programmatically creation is not "ideal" now but ready to be added. The development focus was and still is elsewhere.

Thanks - that helps. That still looks painful, yes. Moving to legacy seem fine - we'll just need to make sure not to mark it deprecated until the new system is at the same ease of use.

@iLLiCiTiT iLLiCiTiT merged commit 26270c4 into develop Aug 24, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/legacy_creator_getter_function branch August 24, 2022 10:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: refactor Structural changes not affecting functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants