Enhanced relative layer visibility #1160
This brings back relative layer transparency with a slight enhancement or similarity to the real world. The top layer is at the bottom of the visibility stack, meaning that once the top is selected, other layers aren't shown. As soon as you move down the stack (or add more papers to the light board) then the drawings behind will become more and more opaque.
@candyface Alright I've read through all your notes. I just have one question. Will the visibility state be saved in a working pencil2d file? or will it be saved in the pencil2d preferences?
I mean It's ok that transparent is default for a new user, but if the user presses alt +3 to make it fully opaque, will this change revert the next time they either open the program or open a new file?
@Jose-Moreno The visibility state is not saved atm. so when you reopen a project it'll start as relative like it always has. I'll look into seeing if I can add that to the project file.
edit: correction, it is saved but it is being set to 1 (relative) when loading the xml. I will fix that.
I've reworked the algorithm now so it goes both ways. So now it's "true" relative opacity based on the current layer in each direction as opposed to before where it only went downwards and the top layer would be the bottom of the stack and the only visible one.
@scribblemaniac That's true I almost forgot about that.
@Jose-Moreno A correction from my last comment, the visibility state that I was speaking about was simply whether a layer was visible or not, since that wasn't handled either. The global layer visibility state was not loaded or saved prior to my last commit but now it's possible to set the startup value through the preference dialog. It is not project based currently.
Because the parent implementation of mouseDoubleClickEvent was never being called, the second mouse event never fires, causing some mouse presses to not change the visibility. This wasn't a big issue with most of the other timeline functions because clicking twice in the same place usually has the same effect as clicking once or a double click action.
Add default layer values if none is found Fix comparison of floating pointer warning Fix optionid being float where it should be int Use layerVisibility enum instead of int consistently Always render layers on camera layer Simplify condition Fix warning Fix cosmetics Add layer opacity threshold as parameter to CanvasPainterOptions Fix spinbox not going beyond 52... Move layer and onion skin into own section Move layer visibility to View instead of Layer Fix UI bugs Fix warning and remove debug statement LayerVisibility should be 2 by default Refactor some cosmetics Remove redundant check