Inherits ThinkboxDialog, and ScriptControl.
|
def | __init__ (self, parent=None) |
|
def | CloseDialog (self) |
|
def | CopyToClipboard (self, text) |
|
def | CreateColorObject (self, r, g, b, a=255) |
|
def | LoadSettings (self, filename, controlNames) |
|
def | MakeTopMost (self) |
|
def | OpenUrl (self, url) |
|
def | SaveSettings (self, filename, controlNames) |
|
def | SetIcon (self, filename) |
|
def | SetSize (self, width, height) |
|
def | SetTitle (self, title) |
|
def | ShowDialog (self, modal=True) |
|
def | ShowFolderBrowser (self, initialPath) |
|
def | ShowMessageBox (self, description, title, buttons=None) |
|
def | ShowMultiOpenFileBrowser (self, initialDir, filter) |
|
def | ShowOpenFileBrowser (self, initialDir, filter) |
|
def | ShowSaveFileBrowser (self, initialDir, filter) |
|
A convenient dialog class that can be used to create user interfaces for scripts.
◆ __init__()
def ScriptDialog.ScriptDialog.__init__ |
( |
|
self, |
|
|
|
parent = None |
|
) |
| |
◆ CloseDialog()
def ScriptDialog.ScriptDialog.CloseDialog |
( |
|
self | ) |
|
◆ CopyToClipboard()
def ScriptDialog.ScriptDialog.CopyToClipboard |
( |
|
self, |
|
|
|
text |
|
) |
| |
Copies the given text to the clipboard.
text: the text to be copied
◆ CreateColorObject()
def ScriptDialog.ScriptDialog.CreateColorObject |
( |
|
self, |
|
|
|
r, |
|
|
|
g, |
|
|
|
b, |
|
|
|
a = 255 |
|
) |
| |
Creates a Color object from the given rgba values.
r: The red value (0-255)
g: The green value (0-255)
b: The blue value (0-255)
a: The alpha value (0-255), which is optional and defaults to 255
◆ LoadSettings()
def ScriptDialog.ScriptDialog.LoadSettings |
( |
|
self, |
|
|
|
filename, |
|
|
|
controlNames |
|
) |
| |
Loads sticky settings from the specified file. The controlNames are the names of the controls in the dialog that the settings will be loaded for.
◆ MakeTopMost()
def ScriptDialog.ScriptDialog.MakeTopMost |
( |
|
self | ) |
|
Forces the dialog to stay on top of other windows.
◆ OpenUrl()
def ScriptDialog.ScriptDialog.OpenUrl |
( |
|
self, |
|
|
|
url |
|
) |
| |
Opens the given url.
url: The url to open
◆ SaveSettings()
def ScriptDialog.ScriptDialog.SaveSettings |
( |
|
self, |
|
|
|
filename, |
|
|
|
controlNames |
|
) |
| |
Saves sticky settings to the specified file. The controlNames are the names of the controls in the dialog that the settings will be saved for.
◆ SetIcon()
def ScriptDialog.ScriptDialog.SetIcon |
( |
|
self, |
|
|
|
filename |
|
) |
| |
Sets the icon for the dialog.
◆ SetSize()
def ScriptDialog.ScriptDialog.SetSize |
( |
|
self, |
|
|
|
width, |
|
|
|
height |
|
) |
| |
Sets the size of the dialog.
◆ SetTitle()
def ScriptDialog.ScriptDialog.SetTitle |
( |
|
self, |
|
|
|
title |
|
) |
| |
Sets the title for the dialog.
◆ ShowDialog()
def ScriptDialog.ScriptDialog.ShowDialog |
( |
|
self, |
|
|
|
modal = True |
|
) |
| |
Shows the dialog. If modal is True, this will block until the dialog is closed.
◆ ShowFolderBrowser()
def ScriptDialog.ScriptDialog.ShowFolderBrowser |
( |
|
self, |
|
|
|
initialPath |
|
) |
| |
Shows a folder browser. This returns the name of the folder selected, or None if the browser is cancelled.
◆ ShowMessageBox()
def ScriptDialog.ScriptDialog.ShowMessageBox |
( |
|
self, |
|
|
|
description, |
|
|
|
title, |
|
|
|
buttons = None |
|
) |
| |
Shows a message box. This returns the text for the button that was clicked.
◆ ShowMultiOpenFileBrowser()
def ScriptDialog.ScriptDialog.ShowMultiOpenFileBrowser |
( |
|
self, |
|
|
|
initialDir, |
|
|
|
filter |
|
) |
| |
Shows a multi-file browser. This returns a list of the files selected, or an empty list if the browser is cancelled.
initialDir: the directory to start in, and if it includes a file name, the file will be selected
filter: the file filter - an example file browser filter would look like "Text Files (*.txt);;All Files (*.*)"
◆ ShowOpenFileBrowser()
def ScriptDialog.ScriptDialog.ShowOpenFileBrowser |
( |
|
self, |
|
|
|
initialDir, |
|
|
|
filter |
|
) |
| |
Shows a file browser. This returns the name of the file selected, or None if the browser is cancelled.
initialDir: the directory to start in, and if it includes a file name, the file will be selected
filter: the file filter - an example file browser filter would look like "Text Files (*.txt);;All Files (*.*)"
◆ ShowSaveFileBrowser()
def ScriptDialog.ScriptDialog.ShowSaveFileBrowser |
( |
|
self, |
|
|
|
initialDir, |
|
|
|
filter |
|
) |
| |
Shows a file saver. This returns the name of the file selected, or None if the saver is cancelled.
initialDir: the directory to start in, and if it includes a file name, the file will be selected
filter: the file filter - an example file browser filter would look like "Text Files (*.txt);;All Files (*.*)"