Qt3DRender::QTexture2D does not handle opacity. Therefore, it is not
possible to use the default Qt3DExtras::QDiffuseSpecularMaterial
implementation. This problem is solved by using
Qt3DRender::QMaterial and copying the
Qt3DExtras::QDiffuseSpecularMaterial shaders from Qt3D source
code. Then, the texture color needs to be changed to set the correct
opacity. This is achieved in the fragement shader:
```
vec4 diffuseTextureColor = vec4(texture(diffuseTexture, texCoord).rgb,
opacity);
```
instead of the default:
```
vec4 diffuseTextureColor = vec4(texture(diffuseTexture, texCoord));
```
As far as the FrameGraph is concerned, this is already handled in
Qgs3DMapScene::finalizeNewEntity which checks for all material which
have an effect with an opacity parameter.
Fixes#47387 and another bug (unreported or #40549 ?)
where digitizing the referencing feature of a newly added
referenced feature (in transaction mode) failed due to the
form being closed and the reference feature not saved.
The new behavior is that the form is brought back after the
digitizing of the referencing feature has been completed or
user-interrupted, this way the referenced layer form can be
saved or dismissed as expected.
Funded by: ARPA Piemonte
to a new project "capability"
This avoids the unwanted cost of initialising a blank style database
whenever QgsProject::clear is called and project styles are not
required (eg. for server)
Contains methods to serialize/deserialize colors from xml and strings,
where the colors are losslessly stored/restored.
The previous methods for storing colors (Eg QgsSymbolLayerUtils::encode/decodeColor)
are lossy, and only store QColors as 8 bit RGB representations. In
contrast, the new methods store the full lossless representation of
a QColor, including support for 16 bit color components, extended
RGB color components, and storage of HSL/HSV/CMYK color specifications
using their original color components instead of RGB components.
When these new methods are used in place of the existing lossy methods,
they open the possibility of 16 bit color support for QGIS symbols/projects,
(and potentially future CMYK color support).