Make Eevee material options available when Cycles is selected (for material preview compatibility)

I posted this on RCS, but figured this might be a better place to post it as I’d actually like to try and implement it myself, and figured it would be good to run it by the devs first to see if it’s something you agree should be added. Original RCS below:

I mainly use Cycles, but often find myself using the material preview mode for quickly making shaders. Problem is, if I ever add transparency to a material then I have to switch to Eevee, change the setting, and then go back to Cycles. I then have to do this for every new material I make.

It would be nice if these settings were just available in both Cycles and Eevee, as that would allow for easy control of the material previews from within cycles.


Ok, so it looks like the best way to do it would be to add a “Preview opacity,” option to the “Viewport Display,” panel. In order to do this it appears I need to add a new property to the “mat” rna, but I can’t seem to find where in the code this would be located. Could anyone point me in the right direction?