MCPcopy Create free account
hub / github.com/vladmandic/sdnext / process

Method process

scripts/color_grading.py:14–27  ·  view source on GitHub ↗
(self, pp: scripts_postprocessing.PostprocessedImage, *args, **kwargs)

Source from the content-addressed store, hash-verified

12 return ui_controls_dict
13
14 def process(self, pp: scripts_postprocessing.PostprocessedImage, *args, **kwargs): # pylint: disable=arguments-differ
15 kwargs = {k: v for k, v in kwargs.items() if v is not None}
16 grading_params = processing_grading.GradingParams(*args, **kwargs)
17 if not processing_grading.is_active(grading_params):
18 return
19 pp.image = processing_grading.grade_image(pp.image, grading_params)
20 defaults = processing_grading.GradingParams()
21 for f in fields(grading_params):
22 val = getattr(grading_params, f.name)
23 if val == getattr(defaults, f.name):
24 continue
25 if f.name == 'lut_cube_file' and val:
26 val = os.path.basename(str(val))
27 pp.info[f"Grading {f.name.replace('_', ' ')}"] = val

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.80
is_activeMethod · 0.80

Tested by

no test coverage detected