AWS Thinkbox Discussion Forums

Deadline 6.2, custom scrolling panel

Hi,
I know Deadine 6.2 is super outdated now, but it is what my studio uses, and therefore out of my control.

Is there any way I can add scrolling capability to a panel or Tab Control/Page in this version of deadline. In my scenario I am dynamically adding controls based on the maya scene selected in the monitor. In some cases, this is resulting in controls that are past the height of the screen.

Once again, I apologize that this question is for such an ancient deadline release, and i’ll continue pushing the execs to update our software licenses.

Thanks!

Nah, that’s fine. Technically we don’t support it but I can always answer questions. :slight_smile:

All of Deadline’s UI code is extending PyQt, so you can just hijack that and do what you like. The main reason we migrated our old UI widgets was to maintain compatibility with older scripts I believe.

Here’s my quick example from a right-click Monitor script:

from System import InvalidOperationException
from System.IO import *
from Deadline.Scripting import *
from DeadlineUI.Controls.Scripting.DeadlineScriptDialog import DeadlineScriptDialog
from ThinkboxUI.Controls.LineNumberTextEdit import LineNumberTextEdit
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *

def __main__():
    scriptDialog = DeadlineScriptDialog()
    scriptDialog.SetSize(1024, 768)
    scriptDialog.SetTitle("Some Kinda Title")
   
    layout = scriptDialog.layout()
    
    button = QPushButton("Boop")
    
    results = QListWidget()
    fixed_font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
    results.setFont(fixed_font)

    layout.addWidget(results, stretch = 1)
    layout.addWidget(report, stretch = 3)
    layout.addWidget(button, stretch = 1)
    
    scriptDialog.ShowDialog(True)

Perfect. Thanks!

Is there a different process that has to be called to close the dialog?

    self.OKBtn.clicked.connect(self.clicked_OK)

....

    def clicked_OK(self):
        scriptDialog.CloseDialog()  # isn't registering

I also found that calling CloseDialog() immediately after ShowDialog(True) also didn’t close the dialog.

Nevermind… Managed to return the window from the added QWidget.

ie. QWidget.window().close()

Hazaa! Glad you got it.

If I’m honest, it’s been a good three years since I’ve had an excuse to use Qt let along PyQt so you’re probably a better resource than I am. :smiley:

Privacy | Site terms | Cookie preferences