Hello Daniel,
we discussed recently similar problem in parallel thread (Is it possible to code a grouped panel and text?). As an author of this thread you also use opacity to hide or show multiple objects. I decided to quote part of my answer and to edit it for your case.
You are dealing with hierarchies of objects: nested figures and grouped figures. Generally some objects properties are inherited from it’s parent: if you change position or orientation of parent object, child objects also change thier positions.
However in general opacity property is not inherited from parent object, because otherwise it would be hard to make parent object more transparent than child. Opacity is inherited only from groups, because group doesn’t have it’s own body and it’s opacity can be used to simultaneous control of children opacities.
So, the simplest way to apply some opacity value to multiple objects is to group them and apply this value to group’s opacity (either from editor or from blockly).
If you want control opacity of hierarchy of nested figures you should create a single group above top figure: here is described how to do this for text panel which is also hierarchy of two elements.
Unfortunately this approach (!!!) doesn’t work in current version (!!!) of our application because of some wrong coding. These bugs are already fixed and update will come in next release. Sorry for inconvenience!