No way of displaying a message box

Started by Catalin Moldovan, November 21, 2019, 01:30:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Catalin Moldovan

Looking at the scripting API, I don't seem to find any proper way of displaying a modal message box to the user. There are various cases when this is needed, like informing the user about an error and the lux.getInputText() is the only way to display a text dialog, but that's editable and not suited for these cases.
Is it possible to add a flag to the lux.getInputText() function to act as read-only message dialog with only a confirmation button or add a proper API for a message box?
Thank you!

Morten Kristensen

Hi heretique,

It is a very good point about adding a regular message box with title, message, and a type (info, warning, critical..) for a future release.

In the meantime, you can use the following trick to get a non-editable message box:
lux.getInputDialog("title text", values=[(lux.DIALOG_LABEL, "message text")])


I hope that helps a bit. Thanks.
/Morten

Morten Kristensen

Hi again. Just wanted to inform you that it's been implemented and will be in KeyShot 9.1: lux.getMessageBox(msg, [title, type])
Thanks.

Catalin Moldovan

Hey, thanks for the hint, that'll be great until Keyshot 9.1.
Cheers!