Set(handle, string, string[, integer])

grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object API » Set(handle, string, string[, integer]) Version 2.2

説明

The Set function sets a value to a specified property of the object, for instance, the object's name.

引数

  • Handle:
    The function takes a handle of the type "light_userdata" as an argument.
    It can be omitted when using the colon notation on an object.

    The Colon Notation is a way to omit the handle as the first argument when using the Object functions.

    This is the general syntax with the colon notation: object:function()

    This is the general syntax with standard handle notation: object.function(object)

    Learn more in the Lua Functions - Object API topic.

  • String:
    The string must be the name of a valid property for the object.
  • String:
    This string must be the desired value for the property.
  • Integer  (optional):
    ?

戻り値

この関数は何も返しません。

This example changes the "Tracking" property of the selected sequence to "No".

Lua
return function()
    -- SelectedSequence() creates a handle to the selected sequence.
    local selectedSequence = SelectedSequence()
    -- Set a variable with the property name.
    local propertyName = "Tracking"
    -- Set the property.
    selectedSequence:Set(propertyName, "No")
end