Loader: Remove context argument from Loader.__init__() (#4602)

* Remove Loader `context` argument to __init__

* Add backwards compatibility for Loader.load by still setting `.fname` attr

* Refactor/remove usage of `self.fname` in loaders

* Fix some refactoring

* Fix some refactoring

* Hound

* Revert invalid refactor

* Fix refactor

* Fix playblast panel collection

* Refactor missing method

* Fix typo

* Use the correct `context`

---------

Co-authored-by: Toke Stuart Jepsen <tokejepsen@gmail.com>
Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
Co-authored-by: Jakub Trllo <jakub.trllo@gmail.com>
This commit is contained in:
Roy Nieterau 2023-03-17 17:25:19 +01:00 committed by Jakub Trllo
parent 2fdb0ece6b
commit f58994d59c
99 changed files with 237 additions and 175 deletions

View file

@ -291,7 +291,7 @@ class ClipLoader:
active_bin = None
data = dict()
def __init__(self, cls, context, **options):
def __init__(self, cls, context, path, **options):
""" Initialize object
Arguments:
@ -304,6 +304,7 @@ class ClipLoader:
self.__dict__.update(cls.__dict__)
self.context = context
self.active_project = lib.get_current_project()
self.fname = path
# try to get value from options or evaluate key value for `handles`
self.with_handles = options.get("handles") or bool(