Feature request #12769
Data defined opacity for vector features
|Assigned to:||-||% Done:||
|Target version:||Future Release - Nice to have|
|Platform version:||Pull Request or Patch supplied:||No|
Lately, more and more settings got data-definable. But it seems opacity/transparency was somewhat forgotten !
Of course, it's possible to achieve the result by data-defining the color of each symbol layer, but then one must hardcode the color in the code.
So I'd suggest adding the ability to data-define transparency, which I think can be useful in a lot of cases.
|related to QGIS Application - Bug report #13033: Data defined settings at root Marker are copied to child ...||Closed||06/23/2015|
Updated by Karolina Alexiou almost 2 years ago
I also noticed that. I will try to implement this soon. It's also nice to have when you have an SVG marker because there you can't set the color.
Updated by Olivier Dalang almost 2 years ago
@Karolina do you have an idea when you'd be able to work on this ? I had a look at the source, unfortunately it seems a bit above my C++ skills...
From what I understand, data-defined properties are only possible at symbol layer level.
Data-defined properties at root level (size and rotation for point layers, and width for line layers) seem to be copied to the underlying symbol layers with some intelligence so that they scale/rotate/... proportionally.
This has (at least) two drawbacks :
- it leads to some unexpected behaviour when you add a new symbol layer after having data-defined a root level property (the new symbol layer won't scale/rotate) - I just created #13033
- it's not applicable for opacity, which is defined in the color in the symbol layers
Probably best would be to implement data-defined properties at root symbol level too, instead of copying them to the symbol layers.
This probably means to change the "size" and "width" fields at root symbol level to "scale" (which makes more sense anyways, since the width of the child elements can be different).
Without doing that, implementing data-defined opacity for the whole symbol will be very tricky.
Also available in: Atom