Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_data.c
| Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | void workbench_private_data_init(WORKBENCH_PrivateData *wpd) | ||||
| wpd->is_navigating = rv3d && (rv3d->rflag & (RV3D_NAVIGATING | RV3D_PAINTING)); | wpd->is_navigating = rv3d && (rv3d->rflag & (RV3D_NAVIGATING | RV3D_PAINTING)); | ||||
| wpd->ctx_mode = CTX_data_mode_enum_ex( | wpd->ctx_mode = CTX_data_mode_enum_ex( | ||||
| draw_ctx->object_edit, draw_ctx->obact, draw_ctx->object_mode); | draw_ctx->object_edit, draw_ctx->obact, draw_ctx->object_mode); | ||||
| wpd->preferences = &U; | wpd->preferences = &U; | ||||
| wpd->scene = scene; | wpd->scene = scene; | ||||
| wpd->sh_cfg = draw_ctx->sh_cfg; | wpd->sh_cfg = draw_ctx->sh_cfg; | ||||
| /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. | |||||
| * But this is a workaround for a missing update tagging. */ | |||||
| DRWState clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; | |||||
| if (clip_state != wpd->clip_state) { | |||||
| wpd->view_updated = true; | |||||
| } | |||||
| wpd->clip_state = clip_state; | |||||
| wpd->clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; | wpd->clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; | ||||
fclem: remove this line then. | |||||
| wpd->cull_state = CULL_BACKFACE_ENABLED(wpd) ? DRW_STATE_CULL_BACK : 0; | wpd->cull_state = CULL_BACKFACE_ENABLED(wpd) ? DRW_STATE_CULL_BACK : 0; | ||||
| wpd->vldata = vldata; | wpd->vldata = vldata; | ||||
| wpd->world_ubo = vldata->world_ubo; | wpd->world_ubo = vldata->world_ubo; | ||||
| wpd->taa_sample_len = workbench_antialiasing_sample_count_get(wpd); | wpd->taa_sample_len = workbench_antialiasing_sample_count_get(wpd); | ||||
| wpd->volumes_do = false; | wpd->volumes_do = false; | ||||
| BLI_listbase_clear(&wpd->smoke_domains); | BLI_listbase_clear(&wpd->smoke_domains); | ||||
| ▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines | |||||
remove this line then.