モーダルダイアログインターフェイスの作成に使用する。
xshade |
↑ |
dialog |
append_bool | 論理値のアイテムを追加する |
append_bool_deprecated | 論理値のアイテムを追加する(旧) |
append_custom | カスタムアイテムを追加する |
append_default_button | デフォルトボタンを追加する |
append_double | 倍精度浮動小数点値のアイテムを追加する |
append_double_deprecated | 倍精度浮動小数点値のアイテムを追加する(旧) |
append_float | 単精度浮動小数点値のアイテムを追加する |
append_float_deprecated | 単精度浮動小数点値のアイテムを追加する(旧) |
append_int | 整数値のアイテムを追加する |
append_int_deprecated | 整数値のアイテムを追加する(旧) |
append_path | ファイルへのパスを取得するアイテムを追加する |
append_push_button | プッシュボタンアイテムを追加する |
append_push_button_deprecated | プッシュボタンアイテムを追加する(旧) |
append_radio_button | ラジオボタンアイテムを追加する |
append_reset_button | 復帰ボタンを追加する |
append_rgb | rgb値のアイテムを追加する |
append_secure_short_string | パスワード用の短い文字列のアイテムを追加する |
append_secure_string | パスワード用の文字列のアイテムを追加する |
append_selection | 選択値のアイテムを追加する |
append_selection_deprecated | 選択値のアイテムを追加する(旧) |
append_short_string | 短い文字列のアイテムを追加する |
append_string | 文字列のアイテムを追加する |
append_string_deprecated | 文字列のアイテムを追加する(旧) |
append_text | テキストのアイテムを追加する |
append_text_deprecated | テキストのアイテムを追加する(旧) |
append_vec2 | vec2値のアイテムを追加する |
append_vec3 | vec3値のアイテムを追加する |
ask | ダイアログボックスを表示する |
ask_path | ファイル選択ダイアログを表示してパスを取得する |
begin_box | ボックスを開始する |
begin_group | グループを開始する |
begin_group_deprecated | グループを開始する(旧) |
begin_tab_group | タブグループを開始する |
end_box | ボックスを終了する |
end_group | グループを終了する |
end_tab_group | タブグループを終了する |
get_property_id | 指定したインデックス番号のプロパティの識別番号を返す |
get_property_type | 指定したインデックス番号のプロパティのタイプを返す |
get_value | 指定されたプロパティの値を返す |
separator | selectionのアイテムで使用されるセパレータ文字 |
set_default_value | 指定されたプロパティのデフォルト値を設定する |
set_value | 指定されたプロパティの値を設定する |
dialog_id | xshade.create_dialog()で設定したid |
dialog = xshade.create_dialog_with_uuid() のように、インスタンスを作成して使用する。
参照 :
xshade.create_dialog_with_uuid
#基本構造
dialog = xshade.create_dialog_with_uuid()
idx = dialog.append_bool('sample')
if dialog.ask('sample_dialog'):
r_idx = dialog.get_value(idx)
append_bool
論理値のアイテムを追加する。
戻り値 :
int
引数 :
string : 名前
idx = dialog.append_bool('sample')
append_bool_deprecated
論理値のアイテムを追加する(旧)。
戻り値 :
int
引数 :
string : 名前
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_bool_deprecated('sample')
append_custom
カスタムアイテムを追加する。
引数 :
size
スクリプトでは領域の確保のみ可能。
#(100,10)の領域(空白)を追加する
idx = dialog.append_custom((100,10))
append_double
倍精度浮動小数点値のアイテムを追加する。
戻り値 :
数値
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_double('sample','単位')
append_double_deprecated
倍精度浮動小数点値のアイテムを追加する(旧)。
戻り値 :
数値
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_double_deprecated('sample','単位')
append_float
単精度浮動小数点値のアイテムを追加する。
戻り値 :
数値
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_float('sample','単位')
append_float_deprecated
単精度浮動小数点値のアイテムを追加する(旧)。
戻り値 :
数値
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_float_deprecated('sample','単位')
append_int
整数値のアイテムを追加する。
戻り値 :
int
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_int('sample','単位')
append_int_deprecated
整数値のアイテムを追加する(旧)。
戻り値 :
int
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_int_deprecated('sample','単位')
append_path
ファイルへのパスを取得するアイテムを追加する。
戻り値 :
string : file_path
引数 :
string : テキストボックスのタイトル
引数 :
bool : フォルダ選択可能 : 省略可能、省略時True
引数 :
bool : ファイル選択可能 : 省略可能、省略時True
第二、第三引数は現在Macのみ対応。
Windowsではフォルダ選択のみ。
idx = dialog.append_path('sample')
プッシュボタンアイテムを追加する。
引数 :
string : ボタンに表示する文字列
ボタンの表示のみで、アクションを割り当てる事はできない。
idx = dialog.append_push_button('sample')
プッシュボタンアイテムを追加する(旧)。
引数 :
string : ボタンに表示する文字列
ボタンの表示のみで、アクションを割り当てる事はできない。
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_push_button_deprecated('sample')
ラジオボタンアイテムを追加する。
戻り値 :
int
引数 :
string : 名前
idx = dialog.append_radio_button('sample/item1/item2/item3')
復帰ボタンを追加する。
ダイアログが開いた時点での設定値に戻す。
dialog.append_reset_button()
append_rgb
rgb値のアイテムを追加する。
戻り値 :
rgb
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_rgb('sample','単位')
append_secure_short_string
パスワード用の短い文字列のアイテムを追加する。
戻り値 :
string
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_secure_short_string('sample','単位')
append_secure_string
パスワード用の文字列のアイテムを追加する。
戻り値 :
string
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_secure_string('sample','単位')
append_selection
選択値のアイテムを追加する。
戻り値 :
int
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
参照 :
separator
文字列はセパレータ文字で区切られる。
セパレータ文字のデフォルト値は'/'
idx = dialog.append_selection('sample/item/item/item','単位')
append_selection_deprecated
選択値のアイテムを追加する(旧)。
戻り値 :
int
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
参照 :
separator
文字列はセパレータ文字で区切られる。
セパレータ文字のデフォルト値は'/'
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_selection_deprecated('sample/item/item/item','単位')
append_short_string
短い文字列のアイテムを追加する。
戻り値 :
string
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx =dialog.append_short_string('sample','単位')
append_string
文字列のアイテムを追加する。
戻り値 :
string
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_string('sample','単位')
append_string_deprecated
文字列のアイテムを追加する。
戻り値 :
string
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_string_deprecated('sample','単位')
append_text
テキストのアイテムを追加する。
戻り値 :
string
引数 :
string : 名前
引数 :
int : 行数 省略可能 省略時6行
idx = dialog.append_text('sample',4)
append_text_deprecated
テキストのアイテムを追加する。
戻り値 :
string
引数 :
string : 名前
引数 :
int : 行数 省略可能 省略時6行
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
idx = dialog.append_text_deprecated('sample',4)
append_vec2
vec2値のアイテムを追加する。
戻り値 :
vec2
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_vec2('string','単位')
append_vec3
vec3値のアイテムを追加する。
戻り値 :
vec3
引数 :
string : 名前
引数 :
string : 単位 : 省略可能
idx = dialog.append_vec3('string','単位')
ask
ダイアログボックスを表示する。
戻り値 :
bool
引数 :
string : ダイアログのタイトル : 省略可能
dialog.ask()
ask_path
ファイル選択ダイアログを表示してパスを取得する。
戻り値 :
file_path
引数 :
bool : True : 開く、False : 保存
引数 :
string : 名称|拡張子1;拡張子2。|区切で複数指定可
dialog = xshade.create_dialog() #開く tmp_path = dialog.ask_path(True, "Jpeg(.jpg.jpeg)|jpg;jpeg|Gif(.gif)|gif") print tmp_path #保存 tmp_path = dialog.ask_path(False, "Jpeg(.jpg)|jpg|Gif(.gif)|gif") print tmp_path
begin_group_deprecated
グループを開始する。
引数 :
string : グループの名前
end_group()とセットで使用する。
Shade 3D 内部のダイアログインターフェイス変更に伴い、同じアイテムを作成する旧関数に「_deprecated」がつけられたもの。
dialog.begin_group_deprecated('string')
begin_tab_group
タブグループを開始する。
引数 :
string : タブグループの名前
end_tab_group()とセットで使用する。
dialog.begin_tab_group('sample')
get_property_id
指定したインデックス番号のプロパティの識別番号を返す。
戻り値 :
int
引数 :
int : プロパティのインデックス
print dialog.get_property_id(idx)
get_property_type
指定したインデックス番号のプロパティのタイプを返す。
戻り値 :
数値
引数 :
int : プロパティのインデックス
プロパティのタイプ :
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)
separator
型 : string
selectionのアイテムで使用されるセパレータ文字。
デフォルトは'/'
#セパレータ文字を「|」に変更する
dialog.separator = '|'
set_default_value
指定されたプロパティのデフォルト値を設定する。
引数 :
int : プロパティのインデックス番号
引数 :
Pythonオブジェクト : 各アイテムのデフォルトの値
dialog.set_default_value(idx, False)
set_value
指定されたプロパティの値を設定する。
引数 :
int : プロパティのインデックス番号
引数 :
Pythonオブジェクト : 各アイテムの値
参照 :
get_value
dialog.set_value(idx, False)