Sequence Class

An object describing and controlling a set of sequential parameters. Accessed via

mySequence = op('/add1').par.point0weight.sequence	# get the sequence object
alsoMySequence = op('/add1').seq.point				# another way to get the sequence object

# A sequence block is a SequenceBlock object, which gives access to one set of parameters in the sequence.
print(len(seq))									# number of sequence blocks in the sequence
print(seq[0])									# first sequence block in the sequence
for parBlock in seq:
	print([par for par in parBlock])			# print all sequence blocks
seq.numBlocks += 1							    # add a new sequence block (same as pressing + in the UI)

See also: Sequential Parameters, SequenceBlock Class, SequenceCollection Class


blockSizeint :

Get or set the sequence blocksize.

blocks(Read Only):

The set of all blocks in this sequence. A block is a set of parameters which can be repeated in an operator. See SequenceBlock class.

maxBlocksint or None (Read Only):

The maximum number of blocks allowed in the sequence, or None if limitless.

namestr :

Get or set the sequence name, which affects all its parameter names.

numBlocksint :

Get or set the total number of parameter blocks in this sequence.

ownerOP (Read Only):

The OP to which this object belongs.

blockParslist (Read Only):

An intermediate parameter collection object, from which specific sequence parameters can be found.

Returns a list of one parameter from each block.

n.seq.Info.blockPars.Tx[3] #Par from 4th block.
n.seq.Info.blockPars['Tx'] #returns None if not found.

blockParGroupslist (Read Only):

An intermediate parGroup collection object, from which specific sequence parameter groups can be found.

Returns a list of one parGroup from each block.

n.seq.Info.blockParGroups.T[3] #ParGroup from 4th block.
n.seq.Info.blockParGroups['T'] #returns None if not found.

sequencePar(Read Only):

The main sequence parameter defining this sequence.


[block index]SequenceBlock:

Sequence blocks may be easily accessed using the [] subscript and assignment operators.

  • block index - The index of the desired block.


Destroy the block of parameters at the given location.

  • block - The index of the existing block to destroy.


Insert a block of parameters at the given location.

  • block - The index of the new block to insert.

Returns the newly created block.

TouchDesigner Build: