Blender V4.5
blender::workbench::SceneState Struct Reference

#include <workbench_private.hh>

Public Member Functions

void init (const DRWContext *context, bool scene_updated, Object *camera_ob=nullptr)
 

Public Attributes

Scenescene = nullptr
 
Objectcamera_object = nullptr
 
Cameracamera = nullptr
 
float4x4 view_projection_matrix = float4x4::identity()
 
int2 resolution = int2(0)
 
eContextObjectMode object_mode = CTX_MODE_OBJECT
 
View3DShading shading = {}
 
eLightingType lighting_type = eLightingType::STUDIO
 
bool xray_mode = false
 
DRWState cull_state = DRW_STATE_NO_DRAW
 
Vector< float4clip_planes
 
float4 background_color = float4(0)
 
bool draw_cavity = false
 
bool draw_curvature = false
 
bool draw_shadows = false
 
bool draw_outline = false
 
bool draw_dof = false
 
bool draw_aa = false
 
bool draw_object_id = false
 
int sample = 0
 
int samples_len = 0
 
bool reset_taa_next_sample = false
 
bool render_finished = false
 
Material material_override = Material(float3(1.0f))
 
Material material_attribute_color = Material(float3(-1.0f))
 

Detailed Description

Definition at line 125 of file workbench_private.hh.

Member Function Documentation

◆ init()

void blender::workbench::SceneState::init ( const DRWContext * context,
bool scene_updated,
Object * camera_ob = nullptr )

Definition at line 94 of file workbench_state.cc.

References RenderData::alphamode, blender::assign_if_different(), background_color, CAM_DOF_ENABLED, camera, View3D::camera, camera_object, View3DShading::cavity_type, RegionView3D::clip, clip_planes, View3DShading::color_type, CTX_data_mode_enum_ex(), cull_state, blender::draw::View::default_get(), DEG_get_evaluated_scene(), Scene::display, draw_aa, draw_cavity, draw_curvature, draw_dof, draw_object_id, draw_outline, draw_shadows, DRW_object_get_data_for_drawing(), DRW_STATE_CLIP_PLANES, DRW_STATE_CULL_BACK, DRW_STATE_NO_DRAW, ELEM, View3DShading::flag, GPU_vulkan_render_pass_workaround(), View3DShading::light, lighting_type, blender::workbench::lighting_type_from_v3d_lighting(), material_override, matrix, max_ii(), min_ii(), OB_CAMERA, OB_MATERIAL, OB_RENDER, OB_SOLID, object_mode, blender::draw::View::persmat(), RegionView3D::persp, Scene::r, R_ALPHAPREMUL, SceneDisplay::render_aa, render_finished, reset_taa_next_sample, resolution, RegionView3D::rflag, RV3D_BOXCLIP, RV3D_CAMOB, RV3D_CLIPPING_ENABLED, RV3D_GPULIGHT_UPDATE, RV3D_LOCK_FLAGS, sample, samples_len, scene, shading, SceneDisplay::shading, View3D::shading, SHADING_XRAY_ALPHA, SHADING_XRAY_ENABLED, View3DShading::single_color, Object::type, View3DShading::type, V3D_LIGHTING_FLAT, V3D_SHADING_BACKFACE_CULLING, V3D_SHADING_CAVITY, V3D_SHADING_CAVITY_BOTH, V3D_SHADING_CAVITY_CURVATURE, V3D_SHADING_CAVITY_SSAO, V3D_SHADING_DEPTH_OF_FIELD, V3D_SHADING_OBJECT_COLOR, V3D_SHADING_OBJECT_OUTLINE, V3D_SHADING_SHADOW, view_projection_matrix, SceneDisplay::viewport_aa, w(), Scene::world, View3DShading::xray_alpha, and xray_mode.

Referenced by blender::workbench::Instance::init().

Member Data Documentation

◆ background_color

float4 blender::workbench::SceneState::background_color = float4(0)

◆ camera

Camera* blender::workbench::SceneState::camera = nullptr

Definition at line 129 of file workbench_private.hh.

Referenced by blender::workbench::DofPass::init(), and init().

◆ camera_object

Object* blender::workbench::SceneState::camera_object = nullptr

Definition at line 128 of file workbench_private.hh.

Referenced by blender::workbench::DofPass::init(), and init().

◆ clip_planes

◆ cull_state

◆ draw_aa

bool blender::workbench::SceneState::draw_aa = false

Definition at line 149 of file workbench_private.hh.

Referenced by blender::workbench::AntiAliasingPass::init(), and init().

◆ draw_cavity

bool blender::workbench::SceneState::draw_cavity = false

◆ draw_curvature

bool blender::workbench::SceneState::draw_curvature = false

◆ draw_dof

bool blender::workbench::SceneState::draw_dof = false

◆ draw_object_id

bool blender::workbench::SceneState::draw_object_id = false

Definition at line 151 of file workbench_private.hh.

Referenced by blender::workbench::Instance::draw(), and init().

◆ draw_outline

bool blender::workbench::SceneState::draw_outline = false

Definition at line 147 of file workbench_private.hh.

Referenced by blender::workbench::OutlinePass::init(), and init().

◆ draw_shadows

◆ lighting_type

eLightingType blender::workbench::SceneState::lighting_type = eLightingType::STUDIO

◆ material_attribute_color

Material blender::workbench::SceneState::material_attribute_color = Material(float3(-1.0f))

Definition at line 161 of file workbench_private.hh.

Referenced by blender::workbench::Instance::get_material().

◆ material_override

Material blender::workbench::SceneState::material_override = Material(float3(1.0f))

Definition at line 159 of file workbench_private.hh.

Referenced by blender::workbench::Instance::get_material(), and init().

◆ object_mode

eContextObjectMode blender::workbench::SceneState::object_mode = CTX_MODE_OBJECT

Definition at line 133 of file workbench_private.hh.

Referenced by init(), and blender::workbench::ObjectState::ObjectState().

◆ render_finished

bool blender::workbench::SceneState::render_finished = false

◆ reset_taa_next_sample

bool blender::workbench::SceneState::reset_taa_next_sample = false

Definition at line 155 of file workbench_private.hh.

Referenced by init().

◆ resolution

◆ sample

◆ samples_len

◆ scene

◆ shading

◆ view_projection_matrix

float4x4 blender::workbench::SceneState::view_projection_matrix = float4x4::identity()

Definition at line 130 of file workbench_private.hh.

Referenced by init().

◆ xray_mode

bool blender::workbench::SceneState::xray_mode = false

Definition at line 137 of file workbench_private.hh.

Referenced by blender::workbench::Instance::draw_to_mesh_pass(), and init().


The documentation for this struct was generated from the following files: