Used to create a modal dialog interface.
| xshade |
| ↑ |
| dialog |
| append_bool | Appends a boolean item |
| append_bool_deprecated | Appends a boolean item (old) |
| append_custom | Appends a custom item |
| append_default_button | Appends a default button |
| append_double | Appends a double precision floating point item |
| append_double_deprecated | Appends a double precision floating point item (old) |
| append_float | Appends a single precision floating point item |
| append_float_deprecated | Appends a single precision floating point item (old) |
| append_int | Appends an integer item |
| append_int_deprecated | Appends an integer item (old) |
| append_path | Appends an item which obtains the file path |
| append_push_button | Appends a push button item |
| append_push_button_deprecated | Appends a push button item (old) |
| append_radio_button | Appends a radio button item |
| append_reset_button | Appends a reset button |
| append_rgb | Appends an rgb item |
| append_secure_short_string | Appends a short string item for a password |
| append_secure_string | Appends a string item for a password |
| append_selection | Appends a selection item |
| append_selection_deprecated | Appends a selection item (old) |
| append_short_string | Appends a short string item |
| append_string | Appends a string item |
| append_string_deprecated | Appends a string item (old) |
| append_text | Appends a text item |
| append_text_deprecated | Appends a text item (old) |
| append_vec2 | Appends a vec2 item |
| append_vec3 | Appends a vec3 item |
| ask | Displays a dialog box |
| ask_path | Displays a file selection dialog box and obtains the path |
| begin_box | Begins a box |
| begin_group | Begins a group |
| begin_group_deprecated | Begins a group (old) |
| begin_tab_group | Begins a tab group |
| end_box | Ends the box |
| end_group | Ends the group |
| end_tab_group | Ends the tab group |
| get_property_id | Returns the property ID of the specified index number |
| get_property_type | Returns the property type of the specified index number |
| get_value | Returns the value of the specified property |
| separator | The separator character used in the selection item |
| set_default_value | Sets the default value of the specified property |
| set_value | Sets the value of the specified property |
| dialog_id | The ID set with xshade.create_dialog() |
Creates an instance similar to dialog = xshade.create_dialog_with_uuid()
See also :
xshade.create_dialog_with_uuid
#basic structure
dialog = xshade.create_dialog_with_uuid()
idx = dialog.append_bool('sample')
if dialog.ask('sample_dialog'):
r_idx = dialog.get_value(idx)
append_bool
Appends a boolean item.
Return value :
int
Arguments :
string : name
idx = dialog.append_bool('sample')
append_bool_deprecated
Appends a boolean item (old).
Return value :
int
Arguments :
string : name
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated".
idx = dialog.append_bool_deprecated('sample')
append_custom
Appends a custom item.
Arguments :
size
It is possible to reserve white space with scripts.
#appends (100,10) area (of white space)
idx = dialog.append_custom((100,10))
Appends a default button.
Returns the default settings value of the dialog.
See also :
set_default_value
dialog.append_default_button()
append_double
Appends a double precision floating point item.
Return value :
Value
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_double('sample','unit')
append_double_deprecated
Appends a double precision floating point item (old).
Return value :
Value
Arguments :
string : name
Arguments :
string : unit : optional
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated".
idx = dialog.append_double_deprecated('sample','unit')
append_float
Appends a single precision floating point item.
Return value :
Value
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_float('sample','unit')
append_float_deprecated
Appends a single precision floating point item (old).
Return value :
Value
Arguments :
string : name
Arguments :
string : unit : optional
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated"
idx = dialog.append_float_deprecated('sample','unit')
append_int
Appends an integer item.
Return value :
int
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_int('sample','unit')
append_int_deprecated
Appends an integer item (old).
Return value :
int
Arguments :
string : name
Arguments :
string : unit : optional
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated"
idx = dialog.append_int_deprecated('sample','unit')
append_path
Appends an item which obtains the file path.
Return value :
string : file_path
Arguments :
string : text box title
Arguments :
bool : folder selectable : optional, True if omitted
Arguments :
bool : file selectable : optional, True if omitted
The second and third arguments are currently Mac only.
In Windows, folder selection only.
idx = dialog.append_path('sample')
Appends a push button item.
Arguments :
string : string displayed on the button
Only displays the button; actions cannot be assigned.
idx = dialog.append_push_button('sample')
Appends a push button item (old).
Arguments :
string : string displayed on the button
Only displays the button; actions cannot be assigned.
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated"
idx = dialog.append_push_button_deprecated('sample')
Appends a radio button item.
Return value :
int
Arguments :
string : name
idx = dialog.append_radio_button('sample/item1/item2/item3')
Appends a reset button.
Returns the settings value at the time the dialog is opened.
dialog.append_reset_button()
append_rgb
Appends an rgb item.
Return value :
rgb
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_rgb('sample','unit')
append_secure_short_string
Appends a short string item for a password.
Return value :
string
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_secure_short_string('sample','unit')
append_secure_string
Appends a string item for a password.
Return value :
string
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_secure_string('sample','unit')
append_selection
Appends a selection item.
Return value :
int
Arguments :
string : name
Arguments :
string : unit : optional
See also :
separator
Strings are separated by the separator character.
The default separator character is '/'
idx = dialog.append_selection('sample/item/item/item','unit')
append_selection_deprecated
Appends a selection item (old).
Return value :
int
Arguments :
string : name
Arguments :
string : unit : optional
See also :
separator
Strings are separated by the separator character.
The default separator character is '/'
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated".
idx = dialog.append_selection_deprecated('sample/item/item/item','unit')
append_short_string
Appends a short string item.
Return value :
string
Arguments :
string : name
Arguments :
string : unit : optional
idx =dialog.append_short_string('sample','unit')
append_string
Appends a string item.
Return value :
string
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_string('sample','unit')
append_string_deprecated
Appends a string item.
Return value :
string
Arguments :
string : name
Arguments :
string : unit : optional
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated".
idx = dialog.append_string_deprecated('sample','unit')
append_text
Appends a text item.
Return value :
string
Arguments :
string : name
Arguments :
int : number of lines optional 6 lines when omitted
idx = dialog.append_text('sample',4)
append_text_deprecated
Appends a text item.
Return value :
string
Arguments :
string : name
Arguments :
int : number of lines optional 6 lines when omitted
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated".
idx = dialog.append_text_deprecated('sample',4)
append_vec2
Appends a vec2 item.
Return value :
vec2
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_vec2('string','unit')
append_vec3
Appends a vec3 item.
Return value :
vec3
Arguments :
string : name
Arguments :
string : unit : optional
idx = dialog.append_vec3('string','unit')
ask
Displays a dialog box.
Return value :
bool
Arguments :
string : dialog title : optional
dialog.ask()
ask_path
Displays a file selection dialog box and returns the path.
Return value :
file_path
Arguments :
bool : True : open, False : save
Arguments :
string : name | extension1; extension2. multiple strings possible using the | separator
dialog = xshade.create_dialog() #Open tmp_path = dialog.ask_path(True, "Jpeg(.jpg.jpeg)|jpg;jpeg|Gif(.gif)|gif") print tmp_path #Save tmp_path = dialog.ask_path(False, "Jpeg(.jpg)|jpg|Gif(.gif)|gif") print tmp_path
begin_box
Begins a box.
Arguments :
bool : True : vertical placement, False : horizontal placement
Use together with end_box()
dialog.begin_box()
begin_group
Begins a group.
Arguments :
string : group name
Use together with end_group().
dialog.begin_group('string')
begin_group_deprecated
Begins a group.
Arguments :
string : group name
Use together with end_group()
Due to changes to Shade's internal dialog interface, old fucntions which create the same items are appended with "_deprecated".
dialog.begin_group_deprecated('string')
begin_tab_group
Begins a tab group.
Arguments :
string : tabe group name
Use together with end_tab_group().
dialog.begin_tab_group('sample')
get_property_id
Returns the property ID of the specified index number.
Return value :
int
Arguments :
int : property index
print dialog.get_property_id(idx)
get_property_type
Returns the property type of the specified index number.
Return value :
Value
Arguments :
int : property index
Property Type :
| 1 | bool |
| 2 | selection |
| 3 | int |
| 4 | float |
| 5 | vec3 |
| 6 | rgb |
| 7 | string |
| 8 | double |
| 9 | group begin |
| 10 | group end |
| 11 | short string |
| 12 | text |
| 13 | rgba |
| 14 | window |
| 15 | tag group begin |
| 16 | tag group end |
| 17 | vec2 |
| 18 | vec4 |
| 19 | quaternion |
| 20 | mat4 |
| 21 | hbox begin |
| 22 | vbox begin |
| 23 | box end |
| 24 | custom |
| 25 | progress |
| 26 | listbox |
| 27 | push button |
| 28 | secure string |
| 29 | secure short string |
| 30 | path |
| 31 | radio button |
print dialog.get_property_type(idx)
get_value
Returns the value of the specified property.
See also :
set_value
res = dialog.get_value(idx)
separator
Type : string
The separator character used in the selection item.
The default is '/'
#Change the separator charactor to '|'
dialog.separator = '|'
set_default_value
Sets the default value of the specified property.
Arguments :
int : property index number
Arguments :
Python object : default value of each item
dialog.set_default_value(idx, False)
set_value
Sets the value of the specified property.
Arguments :
int : property index number
Arguments :
Python object : value of each item
See also :
get_value
dialog.set_value(idx, False)