プロパティモジュール
propertiesモジュールは、動的属性の説明を導入します。
class substance_painter.properties.Property(handle: _substance_painter.data_tweak.PythonTweak) substance_painter.properties.Property
プロパティデータへの読み取り専用アクセス。
パラメーター: ハンドル (_substance_painter.data_tweak.PythonTweak)
value() -> bool | int | Tuple[int, int] | Tuple[int, int, int] | Tuple[int, int, int, int] |浮動小数点 |タプル[浮動小数点] |タプル[浮動小数点、浮動小数点] |カラー |タプル[カラー、浮動小数点] |タプル[浮動小数点、浮動小数点、浮動小数点] | str substance_painter.properties.Property.value
現在のプロパティ値を取得します。
現在の値を返します。
戻り値の型: PropertyValue
name() -> str substance_painter.properties.Property.name
プロパティ名を取得します。
返される値:プロパティ名。
戻り値の型: str
short_name() -> str substance_painter.properties.Property.short_name
短縮されたプロパティ名を取得します。
返される値:プロパティの短い名前です。
戻り値の型: str
label() -> str substance_painter.properties.Property.label
プロパティラベルを取得します。
返される値:プロパティラベル。
戻り値の型: str
widget_type() -> str substance_painter.properties.Property.widget_type
プロパティの編集に使用するウィジェットの種類を取得します。
戻り値:
‘Slider’、‘Angle’、‘Color’、‘Togglebutton’、‘Combobox’、‘RandomSeed’、‘File’、‘FileList’、‘LineEdit’、‘Resource’、'TextEdit’のいずれか。
戻り値の型: str
enum_values() -> Dict[str, int] substance_painter.properties.Property.enum_values
'Combobox’ウィジェットの種類に対応するテキストを含む可能な列挙値。
列挙値の辞書に列挙ラベルを返します。
戻り値の型: Dict[ str, int]
enum_value(enum_label: str) -> int substance_painter.properties.Property.enum_value
'Combobox’ウィジェットタイプの指定された列挙ラベルの列挙値を取得します。
パラメーター: 列挙_label (str) – 有効な列挙ラベルです。
戻り値:対応するラベルの列挙値。
戻り値の型: Dict[ str, int]
properties() -> Dict[str,任意] substance_painter.properties.Property.properties
このプロパティの使用可能なすべてのメタプロパティを記述するjsonオブジェクトを取得します。 例:値範囲、エディターステップ、設定可能な値、ツールヒントなど
返される値: Jsonオブジェクト。
戻り値の型: Dict[ str, 任意]