Post #4796: Use these in an if statement

📋 Metadata

  • Author: Pluglug
  • Date: 2023-07-12 16:33:37
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_04795

🏷️ Tags

pie-menu configuration intermediate solved

  • Pie Menu Editor
  • Python Scripting
  • Modal Editor

💬 Content

Use these in an if statement
edit: It can also be used in the poll method.

C.space_data.shading.type == 'WIREFRAME'
C.space_data.shading.type == 'SOLID'
C.space_data.shading.type == 'MATERIAL'
C.space_data.shading.type == 'RENDERED'

C.space_data.region_3d.view_perspective == 'CAMERA'
C.space_data.region_3d.view_perspective == 'PERSP'
C.space_data.region_3d.view_perspective == 'ORTHO'

❤️ 2 likes


🔗 View on Blender Artists