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

Commit

Permalink
Merge pull request #5571 from ynput/bugfix/fix-warning-messages-about…
Browse files Browse the repository at this point in the history
…-overriden-init

Create Plugins: Better check of overriden '__init__' method
  • Loading branch information
iLLiCiTiT authored Sep 5, 2023
2 parents 176fc9a + c3847ae commit d851023
Showing 1 changed file with 10 additions and 2 deletions.
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

0 comments on commit d851023

Please sign in to comment.