[Gui] New transparency property not applied

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

[Gui] New transparency property not applied

Post by kisolre »

Edit: looks like the problem is from some of the addons that i have. No time to investigate now. Somebody might try the differences between mine, their and DrMacros combinations.

There is a new "transparency" setting under "PD/shape appearance" which I waited a lot to appear. But setting it has no actual effect on the newly created bodies. They still have Transparency=0. Could anyone confirm?

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.21.29490 (Git)
Build type: Release
Branch: master
Hash: e24cd8f03ce917a7c2d5bd1c4b29c9011ed1d559
Python 3.8.8, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: Bulgarian/Bulgaria (bg_BG)
Installed mods: 
  * 3DfindIT 1.2.0
  * A2plus 0.4.56a
  * AirPlaneDesign 0.4.0
  * AnimationFreeCAD 1.0.0
  * ArchTextures
  * Assembly3 0.11.3
  * Assembly4 0.12.2
  * BIM 2021.12.0
  * BOLTSFC
  * CfdOF 1.17.0
  * CubeMenu
  * CurvedShapes 1.0.3
  * Curves 0.3.0
  * CycloidGearBox
  * Defeaturing
  * Design456 0.0.1
  * DesignSPHysics 0.6.1-2207-03-01
  * dodo
  * DynamicData 2.46.0
  * ExplodedAssembly
  * fasteners 0.3.46
  * FCGear 1.0.0
  * FCPDWorkbench 0.2.0
  * FEM_FrontISTR 0.1.0
  * frame 0.1.0
  * freecad.xray 2022.4.17
  * FreeCAD_mcm_addon
  * Help 1.0.3
  * InvGears 0.1.2
  * kicadStepUpMod 10.13.3
  * lattice2 1.0.0
  * Launcher
  * MakerWorkbench
  * Manipulator 1.4.9
  * Mechatronic
  * MeshRemodel 1.8919.0
  * MnesarcoUtils 0.1.0
  * Nikra-DAP
  * nurbs
  * OpticsWorkbench 1.0.8
  * ose-piping
  * parts_library
  * PlacementTools
  * Plot 2022.4.17
  * Pyramids-and-Polyhedrons
  * Reinforcement
  * Render 2022.2.0
  * Rocket 2.4.1
  * SearchBar 1.0.1
  * SelectorToolbar
  * sheetmetal 0.2.49
  * Ship 2022.4.11
  * Silk 1.0.0
  * SlopedPlanesMacro
  * StemfieWB
  * symbols_library
  * ThreadProfile 1.81.0
  * toSketch
  * Woodworking 0.20.29177
  * workfeature
  * workfeature-macro
Last edited by kisolre on Mon Jul 11, 2022 8:30 pm, edited 1 time in total.
drmacro
Veteran
Posts: 9001
Joined: Sun Mar 02, 2014 4:35 pm

Re: New transparency property not applied

Post by drmacro »

Seems to work on newly created Pad objects.
Snip macro screenshot-0494cd.png
Snip macro screenshot-0494cd.png (106.92 KiB) Viewed 813 times

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.29490 (Git)
Build type: Release
Branch: master
Hash: e24cd8f03ce917a7c2d5bd1c4b29c9011ed1d559
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.0.dev
Locale: English/United States (en_US)
Installed mods: 
  * kicadStepUpMod 10.13.3
  * Manipulator 1.4.9
  * DynamicData 2.46.0
  * fasteners 0.3.46
  * CubeMenu
  * fcgear 1.0.0
  * plugins
  * Pyramids-and-Polyhedrons
  * Defeaturing
  * Assembly4 0.12.2
  * OpticsWorkbench 1.0.8
  * workfeature-macro
  * sheetmetal 0.2.49
  * A2plus 0.4.56a
  * CurvedShapes 1.0.3
  * Curves 0.5.1
  * workfeature
  * lattice2 1.0.0
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: New transparency property not applied

Post by Syres »

kisolre wrote: Mon Jul 11, 2022 6:34 pm There is a new "transparency" setting under "PD/shape appearance" which I waited a lot to appear. But setting it has no actual effect on the newly created bodies. They still have Transparency=0. Could anyone confirm?
Could it be one of your many Addons causing the issue?
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: New transparency property not applied

Post by kisolre »

Syres wrote: Mon Jul 11, 2022 7:00 pm Could it be one of your many Addons causing the issue?
Sadly looks like it. I tried vanila config and it works. No time to investigate now :(
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: New transparency property not applied

Post by Syres »

kisolre wrote: Mon Jul 11, 2022 8:27 pm I tried vanila config and it works.
OK, that was a big change, using my Linux partition I initially could replicate the fault and removed each of my Addons one-by-one to no avail. Then I got a new user config alongside my existing one and to cut a long story short concluded that if the default shape colour is Hex #cccccc (light grey) then the default transparency works as expected but and it's a big but, long-term users such as ourselves have a default shape colour of Hex #9b9b9b (dark grey) which the default transparency doesn't seem to work along with Random Colour selected so probably best to say it only works with #cccccc.

uwestoehr wrote: I'm guessing you are not aware of this

Code: Select all

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.29490 (Git)
Build type: Release
Branch: master
Hash: e24cd8f03ce917a7c2d5bd1c4b29c9011ed1d559
Python 3.6.9, Qt 5.9.5, Coin 4.0.0a, Vtk 7.1.1, OCC 7.3.0
Locale: English/UnitedKingdom (en_GB)

Edit: Clarified only one colour appears to work correctly.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: [Addon problem] New transparency property not applied

Post by Syres »

I might have a fix, certainly seems to work for me https://github.com/FreeCAD/FreeCAD/comp ... D:patch-47
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: [Addon problem] New transparency property not applied

Post by kisolre »

Yes, I also have "Random color" active.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [Addon problem] New transparency property not applied

Post by uwestoehr »

kisolre wrote: Mon Jul 11, 2022 6:34 pm They still have Transparency=0. Could anyone confirm?
Confirmed, but only when one uses random colors.

I had now a look but cannot find where the random color would make the difference that the transparency is not applied.

The code is in

Code: Select all

ViewProviderGeometryObject::ViewProviderGeometryObject()
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [Addon problem] New transparency property not applied

Post by uwestoehr »

uwestoehr wrote: Wed Jul 13, 2022 3:06 am I had now a look but cannot find where the random color would make the difference that the transparency is not applied.
OK, I found the issue and fixed it:
https://github.com/FreeCAD/FreeCAD/commit/c76913454a

However, it is still not clear to me why the random color triggered it.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: [Addon problem] New transparency property not applied

Post by Syres »

uwestoehr wrote: Wed Jul 13, 2022 3:43 am OK, I found the issue and fixed it:
Thanks, all looks good

Code: Select all

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.29504 (Git)
Build type: Release
Branch: master
Hash: c76913454ab7e58f73c98047a494df8bff03663d
Python 3.6.9, Qt 5.9.5, Coin 4.0.0a, Vtk 7.1.1, OCC 7.3.0
Locale: English/UnitedKingdom (en_GB)
Installed mods: 
  * fasteners 0.3.45
  * Silk 1.0.0
  * Plot 2022.4.17
  * CfdOF 1.16.1
  * BIM 2021.12.0
  * FeedsAndSpeeds 0.4.0
  * dodo
  * Curves 0.5.0
  * Manipulator 1.4.5
  * fcgear 1.0.0
  * ThreadProfile 1.81.0
  * A2plus 0.4.56a
  * sheetmetal 0.2.49
Post Reply