Page MenuHome

Fix workbench shading pie menu
AbandonedPublic

Authored by Dalai Felinto (dfelinto) on Fri, Jan 4, 3:11 PM.

Details

Summary

Not all render engines have material or rendered mode.


Note: This is not working at the moment, submitting for review to get some light shed on it.

How to reproduce the original (unreported issue):

  • Change render engine to Workbench.
  • Press "Z" in the viewport for the shading menu.

Once this is out of the way a similar fix should be applied to the extended menu as well.
The problem with this patch is that I seem to always get all modes (MATERIAL included) in:

  • view.shading.bl_rna.properties["type"].enum_items

Diff Detail

Repository
rB Blender
Branch
temp-fix-workbench-shading-menu (branched from master)
Build Status
Buildable 2702
Build 2702: arc lint + arc unit

Event Timeline

Well, C RNA code expects MATERIAL to be valid for all renderers. Only RENDERED is optional (see rna_space.c, rna_3DViewShading_type_itemf() func)…

Well, C RNA code expects MATERIAL to be valid for all renderers. Only RENDERED is optional (see rna_space.c, rna_3DViewShading_type_itemf() func)…

Not really. look at the logic for BKE_scene_uses_blender_workbench() there. There is no MATERIAL for benchmark engine.

Then you have to update RNA code to match expected behavior :P

C'mon I'm serious here :) The RNA as far as everythign else is concerned seems to be working fine, so I'm either using the wrong API to access the items, or we need to define them differently.