flame: convert color mapping to classmethod

This commit is contained in:
Jakub Jezek 2022-11-10 14:19:49 +01:00
parent cf50722e1f
commit 79eb997e4b
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -692,16 +692,17 @@ class ClipLoader(LoaderPlugin):
_mapping = None
def get_native_colorspace(self, input_colorspace):
if not self._mapping:
@classmethod
def get_native_colorspace(cls, input_colorspace):
if not cls._mapping:
settings = get_current_project_settings()["flame"]
mapping = settings["imageio"]["profilesMapping"]["inputs"]
self._mapping = {
cls._mapping = {
input["ocioName"]: input["flameName"]
for input in mapping
}
return self._mapping.get(input_colorspace)
return cls._mapping.get(input_colorspace)
class OpenClipSolver(flib.MediaInfoFile):