説明
The Addr Lua object function converts a handle to an address string that can be used in commands.
See the Handle topic for more info regarding handles and links to other related functions.
引数
- handle:
The function takes a handle of the type "light_userdata" as an argument. This is the handle to the object where the address is requested.
It can be omitted when using the on an object.
- handle (オプション):
The returned address is from the root as a default. This optional handle can specify a different base location. It must still be a base location in the address path from the root to the object.
- boolean | nil (オプション):
This can be useful if there is a difference between the and Addr(). Setting this to "true" uses the index number from the ToAddr() instead of the Addr() index number. See the example below.
- boolean (オプション):
In some edge cases, the cue address is not resolved correctly. Setting this boolean to true will fix this.
戻り値
- string:
Text string with the address in a parent-child number format separated by dots.
例
This example prints different versions of the address to a cue in a sequence:
|
return function() Cmd("Store Sequence 1 Cue 100 /Merge /NoConfirmation") local cueObject = ObjectList("Sequence 1 Cue 100")[1] Printf("ToAddr: " .. cueObject:ToAddr()) Printf("Addr: " .. cueObject:Addr()) Printf("Addr(Parent, false, false): " .. cueObject:Addr(cueObject:Parent(), false, false)) Printf("Addr(Parent, true, false): " .. cueObject:Addr(cueObject:Parent(), true, false)) Printf("Addr(Parent, false, true): " .. cueObject:Addr(cueObject:Parent(), false, true)) Printf("Addr(Parent, true, true): " .. cueObject:Addr(cueObject:Parent(), true, true)) end |