Script Dialog Control : Image

Hi,
Maybe I should be looking into more of a “import PyQt4” kind of solution, but it would be useful if I could display images in a Deadline scriptDialog interface, whether it be directly in the dialog I am developing, or be spawned into another window when a UI element such as a “button” or “text control” is clicked on. Having the ability to control the image size, position, etc would also be good. Could this be added to the wishlist?
Thanks,
Mike

affirmative :ugeek:

Hey Mike,

What types of images are you looking to view? The .NET control for displaying images is a bit limited on the formats it supports:
msdn.microsoft.com/en-us/library … rties.aspx

If you are looking to display rendered images, it might be best to have a button launch another tool to display the image. However, if you are just looking to show some pngs or jpgs, then adding an image control would be possible.

Cheers,

  • Ryan

Thanks Ryan.
I was purely looking at being able to display static images (NOT anything fancy like rendered EXR images or such like) within the scriptDialog. I’m flexible with image formats. PNG & JPG would be perfect.

On an extra note, is there anyway to build in an “on mouse down”, “LMB cursor location events” into the scriptDialog at the moment? ie: If the mouse enters a certain location within the scriptDialog window, an event is processed and hence can be handled, like changing an image? Alternatively, a similar solution to being able to access the event handler which fires a UI control elements “tooltips” would work and instead of potentially displaying a “tooltip”, it executes an event handler if it is present in the code?

Finally, is it possible to handle child spawned scriptDialogs so that if the parent dialog is closed, then all child dialogs are also closed automatically? Example code would be most useful of this approach!

Thanks,
Mike

Cool, we’ll add it to the wish list then.

All the controls in our scripting API are extended from .NET controls, so all events associated with them are available:
msdn.microsoft.com/en-us/library … vents.aspx

Yes.

The attached example is just the original Script UI Example with two extra controls at the bottom. A label that demonstrates the MouseEnter event which occurs when the mouse cursor enters the space over the label, and a Dialog button that displays a non-modal Window that closes when the main window is closed. Just unzip the attached file to \your\repository\scripts\General, and restart your Monitor or reconnect to the same repository to refresh the Scripts menu.

Cheers,

Thanks Ryan.
Very useful.
I had to edit lines 72-75 as something funky had gone wrong and it contained 1 too many arguments:

scriptDialog.AddRadioControl( "Radio One", "RadioControl", True, "RadioGroup", 100, -1 ) scriptDialog.AddRadioControl( "Radio Two", "RadioControl", False, "RadioGroup", 100, -1 ) scriptDialog.AddRadioControl( "Radio Three", "RadioControl", False, "RadioGroup", 100, -1 ) scriptDialog.AddRadioControl( "Radio Four", "RadioControl", False, "RadioGroup", 100, -1 )

Thanks,
Mike

Ah, right, that’s because I sent you the version from the next release of Deadline (which now separates the radio control name from its displayed text).

Cheers,

  • Ryan

LOL! Must be some annoying client who keeps asking for enhancements all the time to Deadline!