説明
Get 関数は、オブジェクトの名前、クラス、パスなど、指定されたプロパティに関する情報を含む文字列を返します。
引数
- handle:
light_userdata 型のハンドルです。オブジェクトでコロン記法を用いる場合は省略できます。
- string:
オブジェクトの有効なプロパティ名を表す文字列です。
- integer (オプション):
有効な役割を指定できます。これにより、戻り値は文字列になります。
戻り値
- string:
プロパティの値を返します。プロパティが boolean 値の場合、役割が指定されていない限り、戻り値は "0" または "1" です(オプション引数の integer を参照)。役割が指定されている場合は、"No" または "Yes" の値が返されます。
例
この例では、選択したシーケンスの Tracking プロパティに関する情報を出力します。
|
return function () local selectedSequence = SelectedSequence() if selectedSequence == nil then ErrPrintf("The selected sequence could not be found.") return end local propertyName = "Tracking" local propertyValue = selectedSequence:Get(propertyName) local propertyValueString = selectedSequence:Get(propertyName, Enums.Roles.Edit) if propertyValue ~= nil then Printf("The selected sequence's property " .. propertyName.. " has the value '" .. propertyValue .. "' and a string value of '" .. propertyValueString .. "'.") else ErrPrintf("The property could not be found.") end end |