From 5f74e9ba7b1dfe17f571f396522eeecf1e967e47 Mon Sep 17 00:00:00 2001 From: Morgan Epp <60796713+epmog@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:15:09 -0600 Subject: [PATCH] fix: update openjd-runtime to handle signals (#20) Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com> --- pyproject.toml | 4 +++- src/deadline/keyshot_adaptor/KeyShotAdaptor/adaptor.py | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 89a5f01..9ea1b99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,10 +11,12 @@ requires-python = ">=3.9" dependencies = [ "deadline == 0.37.*", - "openjd-adaptor-runtime == 0.4.*", + "openjd-adaptor-runtime == 0.5.*", ] [project.scripts] +keyshot-openjd = "deadline.keyshot_adaptor.KeyShotAdaptor:main" +# KeyShotAdaptor is deprecated, use keyshot-openjd instead KeyShotAdaptor = "deadline.keyshot_adaptor.KeyShotAdaptor:main" [tool.hatch.build] diff --git a/src/deadline/keyshot_adaptor/KeyShotAdaptor/adaptor.py b/src/deadline/keyshot_adaptor/KeyShotAdaptor/adaptor.py index 7fb8d8b..a4ae968 100644 --- a/src/deadline/keyshot_adaptor/KeyShotAdaptor/adaptor.py +++ b/src/deadline/keyshot_adaptor/KeyShotAdaptor/adaptor.py @@ -10,7 +10,7 @@ from functools import wraps from typing import Callable -from openjd.adaptor_runtime.adaptors import Adaptor, AdaptorDataValidators +from openjd.adaptor_runtime.adaptors import Adaptor, AdaptorDataValidators, SemanticVersion from openjd.adaptor_runtime.adaptors.configuration import AdaptorConfiguration from openjd.adaptor_runtime.process import LoggingSubprocess from openjd.adaptor_runtime.app_handlers import RegexCallback, RegexHandler @@ -71,6 +71,10 @@ class KeyShotAdaptor(Adaptor[AdaptorConfiguration]): _expected_outputs: int = 1 # Total number of renders to perform. _produced_outputs: int = 0 # Counter for tracking number of complete renders. + @property + def integration_data_interface_version(self) -> SemanticVersion: + return SemanticVersion(major=0, minor=1) + @staticmethod def _get_timer(timeout: int | float) -> Callable[[], bool]: """