Stop timer on application exit setting.

Making the feature optional.
This commit is contained in:
Toke Stuart Jepsen 2021-08-09 16:56:20 +01:00
parent 1c99861702
commit 65b60d6b5d
3 changed files with 13 additions and 0 deletions

View file

@ -10,6 +10,7 @@ from avalon.tvpaint.communication_server import register_localization_file
from .lib import set_context_settings
from openpype.hosts import tvpaint
from openpype.api import get_current_project_settings
log = logging.getLogger(__name__)
@ -54,6 +55,12 @@ def initial_launch():
def application_exit():
data = get_current_project_settings()
stop_timer = data["tvpaint"]["stop_timer_on_application_exit"]
if not stop_timer:
return
# Stop application timer.
webserver_url = os.environ.get("OPENPYPE_WEBSERVER_URL")
rest_api_url = "{}/timers_manager/stop_timer".format(webserver_url)

View file

@ -1,4 +1,5 @@
{
"stop_timer_on_application_exit": false,
"publish": {
"ExtractSequence": {
"review_bg": [

View file

@ -5,6 +5,11 @@
"label": "TVPaint",
"is_file": true,
"children": [
{
"type": "boolean",
"key": "stop_timer_on_application_exit",
"label": "Stop timer on application exit"
},
{
"type": "dict",
"collapsible": true,