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

@ -14,8 +14,9 @@ class CopyFile(load.LoaderPlugin):
color = get_default_entity_icon_color()
def load(self, context, name=None, namespace=None, data=None):
self.log.info("Added copy to clipboard: {0}".format(self.fname))
self.copy_file_to_clipboard(self.fname)
path = self.filepath_from_context(context)
self.log.info("Added copy to clipboard: {0}".format(path))
self.copy_file_to_clipboard(path)
@staticmethod
def copy_file_to_clipboard(path):