説明
The Get function returns a string with information about a specified property of the object, for instance, the object's name, class, or path.
引数
- handle:
The function takes a handle of the type "light_userdata" as an argument.
It can be omitted when using the on an object.
- string:
The string must be the name of a valid property for the object.
- integer (オプション):
A valid role integer can be supplied.
This will make the returned value a text string.
戻り値
- string:
The function returns the value of the property. If the property is a boolean, then the return is "0" or "1" unless a role is defined (see optional integer argument above). When the role is supplied, a boolean is returned as "No" or "Yes".
例
This example prints information about the "Tracking" property of the selected sequence.
|
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 |