Dynamically add / remove layers from layermix

Currently it seems to be impossible to add or remove layers from the layermix component programmatically (via python). The only way is to manually press the “+” and “-” buttons on the layers parameters tab.

The python documentation shows no mention of the “numBlocks” and “maxBlocks” parameters that appear when you hover over the “lay” parameter, and trying to set them gives no result.

I am putting this under wishlist as I’m unsure whether it is intentional or an oversight.

Hi @NiccoG

you can specify the number of sequence blocks by:

op('/project1/layermix1').seq.lay.numBlocks += 1

You can also insert, remove, and move blocks with the methods available to the Sequence Class:

Hope this helps
Markus

Hi @snaut ,

again, thank you so much. I’m not going to repeat myself as I’ve just posted in the other thread, but now that you’ve unveiled the seq keyword, everything is clearer. Thanks!