Layer index within layermix params

In the new layermix TOP, it would be nice to be able to fetch the layer index from within the individual layer parameters, without having to do string magic.

For example: the uniform scale parameter for the first layer is called “lay0uniscale”. I could do some magic to extract the “0” from the par name, but it would be nice to be able to fetch the layer index with some python method (like me.curPar, me.curLay?).

This would enable some automagic entanglements, an example:

op("table1")[me.curLay, 0]

where each layer can fetch the parameters from the respective table row.

Hi @NiccoG,

you can get to the sequence block index of the parameter via:

me.curPar.sequenceBlock.index

Hope this helps
Markus

Hi @snaut , thanks for always being so quick and helpful.

This is great, thanks. Would it be worth signposting it a bit more in the documentation? Hovering over the “Layers” tab on the LayerMix component gives a bunch of hints to keywords that don’t pop up in the documentation (e.g. numBlock and maxBlock) and there is no mention of seq.

Now, in hindsight, I see that “curSeq” is just below “curPar” in the layermixTOP Class wiki, but without knowing what to look for I don’t think I would have found it without your help.

I honestly don’t know what the solution is, but this is the first time for me having to deal with a sequence collection from Python and all I can say is it was hard to figure out how to interact with it.

Hi @NiccoG,

went ahead and reordered the OP Class page a bit making it hopefully easier to find relevant members on the page.

cheers
Markus