Fix layers support for particles
The particle system creates hidden internal nodes that do not take
part in the normal processing, meaning the particle system needs to
maintain and update the layers for the nodes it creates itself. This
was unfortunately missed in the initial implementation.
Note that this only applies to the internally created nodes, like the
sprite and line particles. For content the instantiated from a
user-provided delegate (ModelParticle3D and ModelBlendParticle3D) the
layers property is left alone, since the layers property is not inherited
and stamping user content would override explicit layer assignments
made in the delegate. While this design causes a slightly different
behavior for the two types of particles, it follows intended behavior
of the layers API and also avoids that we try to be cleaver and guess
what the user actually wants to do.
Added particle effects to the layers example, including a model
particle with a compound delegate where each model assigns its own
content layer, and a visual test.
Pick-to: 6.12 6.11 6.11.2
Change-Id: I0b2b08dfe6e19b7cbf4fcde81e485f1c360ef99b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>