Page 1 of 1
what is UUID?
Posted: Thu Sep 02, 2021 3:44 pm
by davoodice2
any help?
Re: what is UUID?
Posted: Thu Sep 02, 2021 3:47 pm
by Stan
Re: what is UUID?
Posted: Thu Sep 02, 2021 3:53 pm
by davoodice2
specifically in moho
GetLayerByUUID():
Re: what is UUID?
Posted: Thu Sep 02, 2021 4:06 pm
by Stan
The "regular" layer ID is just the ordinal number of the layer. It may change if you move the layer above or below other layers. And that's what is used by the MohoDoc:Layer(id) or MohoDoc:LayerByAbsoluteID(id).
Unlike that, the UUID is a unique identifier. You can use it to make sure the particular layer is the one you need regardless of its position in the document.
There's no GetLayerByUUID method though. However, the UUID is used in some rare cases. Take a look at this example:
GroupLayer:GetLayerOrdering().
Re: what is UUID?
Posted: Fri Sep 03, 2021 7:51 am
by davoodice2
Stan wrote: ↑Thu Sep 02, 2021 4:06 pm
The "regular" layer ID is just the ordinal number of the layer. It may change if you move the layer above or below other layers. And that's what is used by the MohoDoc:Layer(id) or MohoDoc:LayerByAbsoluteID(id).
Unlike that, the UUID is a unique identifier. You can use it to make sure the particular layer is the one you need regardless of its position in the document.
There's no GetLayerByUUID method though. However, the UUID is used in some rare cases. Take a look at this example:
GroupLayer:GetLayerOrdering().
thanks.very clear description.