sequence_exists

With this function you can check to see if a sequence object exists or not. You supply either the sequence object struct (as returned by the function sequence_create() or sequence_get()) or the sequence ID (as returned by the function layer_sequence_get_sequence() or from the sequence instance struct property sequence, or the index from the asset browser) and the function will return true if the sequence object exists or false if it does not.

 

Syntax:

sequence_exists(sequence_struct_or_id);

ArgumentTypeDescription
sequence_struct_or_idSequence Asset or Sequence Object StructThe sequence to check for, can be the asset reference itself or its Sequence object struct.

 

Returns:

Boolean

 

Example:

if (sequence_exists(my_seq))
{
    sequence_destroy(my_seq);
}

The above code checks to see if the given sequence object exists and if it does it is destroyed.