From 222c4b979077cf0777b90ed25c7b7d10100d6af1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Couble?= <timothee.couble@kitware.com>
Date: Mon, 19 Sep 2022 15:22:23 +0200
Subject: [PATCH] [feat] Add player controller python binding

---
 Application/Ui/python/lidarview/applogic.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Application/Ui/python/lidarview/applogic.py b/Application/Ui/python/lidarview/applogic.py
index 6b55ee91c..6e021406c 100644
--- a/Application/Ui/python/lidarview/applogic.py
+++ b/Application/Ui/python/lidarview/applogic.py
@@ -638,6 +638,11 @@ def onClose():
     # Disable Actions
     disableSaveActions()
 
+# Get the player controller, it can be used to call lqPlayerControlsController functions
+# Such as onPlay(), onPause() ... 
+# Note: For the reader mode onPlay() will block the python shell
+def getPlayerController():
+    return PythonQt.paraview.lqPlayerControlsToolbar(getMainWindow())
 
 # Generic Helpers
 def _setSaveActionsEnabled(enabled):
-- 
GitLab