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

Create Plugins: Better check of overriden '__init__' method #5571

Merged
merged 2 commits into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions openpype/pipeline/create/creator_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,16 @@ def __init__(
# Backwards compatibility for system settings
self.apply_settings(project_settings, system_settings)

init_overriden = self.__class__.__init__ is not BaseCreator.__init__
if init_overriden or expect_system_settings:
init_use_base = any(
self.__class__.__init__ is cls.__init__
for cls in {
BaseCreator,
Creator,
HiddenCreator,
AutoCreator,
}
)
if not init_use_base or expect_system_settings:
self.log.warning((
"WARNING: Source - Create plugin {}."
" System settings argument will not be passed to"
Expand Down
Loading