Skip to content

Commit

Permalink
Refactor search paths handling in OCIOConfigFileGenerator
Browse files Browse the repository at this point in the history
- Updated method to append search paths instead of clearing and appending.
- Improved logic for handling multiple search path arguments.
  • Loading branch information
jakubjezek001 committed Aug 8, 2024
1 parent 86c05e8 commit 32aac90
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lablib/generators/ocio_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def set_views(self, *args: Union[str, List[str]]) -> None:
self.append_views(*args)

def set_search_paths(self, *args: Union[str, List[str]]) -> None:
self.clear_search_paths()
self.append_search_paths(*args)

def set_operators(self, *args) -> None:
Expand Down Expand Up @@ -209,10 +208,10 @@ def clear_vars(self):
"""Clear the environment variables."""
self._vars = {}

def clear_search_paths(self):
def append_search_paths(self, *args) -> None:
# first clear all search paths
self._ocio_search_paths = []

def append_search_paths(self, *args) -> None:
for arg in args:
if isinstance(arg, list):
self.append_search_paths(*arg)
Expand Down

0 comments on commit 32aac90

Please sign in to comment.