Skip to content

Commit

Permalink
Prepend camera make only if *dnglab* is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Aug 1, 2024
1 parent b075bea commit 73b4e59
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions colour_hdri/network/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
matrix_XYZ_to_camera_space,
xy_to_camera_neutral,
)
from colour_hdri.process import DNG_CONVERTER

__author__ = "Colour Developers"
__copyright__ = "Copyright 2015 Colour Developers"
Expand Down Expand Up @@ -818,8 +819,10 @@ def process(self, **kwargs) -> None: # noqa: ARG002
camera_make = exif_group["Make"]
camera_model = exif_group["Camera Model Name"]

if not camera_model.startswith(camera_make):
self.log(f'Prepending "{camera_make}" camera make.', "warning")
if DNG_CONVERTER == "dnglab":
self.log(
f'"dnglab" used, prepending "{camera_make}" camera make.', "warning"
)
camera_model = f"{camera_make} {camera_model}"

self.log(
Expand Down Expand Up @@ -996,8 +999,10 @@ def process(self, **kwargs) -> None: # noqa: ARG002
camera_make = exif_group["Make"]
camera_model = exif_group["Camera Model Name"]

if not camera_model.startswith(camera_make):
self.log(f'Prepending "{camera_make}" camera make.', "warning")
if DNG_CONVERTER == "dnglab":
self.log(
f'"dnglab" used, prepending "{camera_make}" camera make.', "warning"
)
camera_model = f"{camera_make} {camera_model}"

self.log(
Expand Down

0 comments on commit 73b4e59

Please sign in to comment.