Blender  V3.3
Macros | Functions | Variables
workbench_engine.c File Reference
#include "DRW_render.h"
#include "BLI_alloca.h"
#include "BKE_editmesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pbvh.h"
#include "DNA_curves_types.h"
#include "DNA_fluid_types.h"
#include "DNA_image_types.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_node_types.h"
#include "ED_paint.h"
#include "workbench_engine.h"
#include "workbench_private.h"

Go to the source code of this file.

Macros

#define WORKBENCH_ENGINE   "BLENDER_WORKBENCH"
 

Functions

void workbench_engine_init (void *ved)
 
void workbench_cache_init (void *ved)
 
static struct GPUBatch ** workbench_object_surface_material_get (Object *ob)
 
static void workbench_cache_sculpt_populate (WORKBENCH_PrivateData *wpd, Object *ob, eV3DShadingColorType color_type)
 
BLI_INLINE void workbench_object_drawcall (DRWShadingGroup *grp, struct GPUBatch *geom, Object *ob)
 
static void workbench_cache_texpaint_populate (WORKBENCH_PrivateData *wpd, Object *ob)
 
static void workbench_cache_common_populate (WORKBENCH_PrivateData *wpd, Object *ob, eV3DShadingColorType color_type, bool *r_transp)
 
static void workbench_cache_hair_populate (WORKBENCH_PrivateData *wpd, Object *ob, ParticleSystem *psys, ModifierData *md, eV3DShadingColorType color_type, bool use_texpaint_mode, const int matnr)
 
static const CustomDataworkbench_mesh_get_loop_custom_data (const Mesh *mesh)
 
static const CustomDataworkbench_mesh_get_vert_custom_data (const Mesh *mesh)
 
static eV3DShadingColorType workbench_color_type_get (WORKBENCH_PrivateData *wpd, Object *ob, bool *r_sculpt_pbvh, bool *r_texpaint_mode, bool *r_draw_shadow)
 
void workbench_cache_populate (void *ved, Object *ob)
 
void workbench_cache_finish (void *ved)
 
void workbench_draw_sample (void *ved)
 
static void workbench_draw_scene (void *ved)
 
void workbench_draw_finish (void *UNUSED(ved))
 
static void workbench_engine_free (void)
 
static void workbench_view_update (void *vedata)
 
static void workbench_id_update (void *UNUSED(vedata), struct ID *id)
 

Variables

static const DrawEngineDataSize workbench_data_size = DRW_VIEWPORT_DATA_SIZE(WORKBENCH_Data)
 
DrawEngineType draw_engine_workbench
 
RenderEngineType DRW_engine_viewport_workbench_type
 

Detailed Description

Workbench Engine:

Optimized engine to draw the working viewport with solid and transparent geometry.

Definition in file workbench_engine.c.

Macro Definition Documentation

◆ WORKBENCH_ENGINE

#define WORKBENCH_ENGINE   "BLENDER_WORKBENCH"

Definition at line 35 of file workbench_engine.c.

Function Documentation

◆ workbench_cache_common_populate()

static void workbench_cache_common_populate ( WORKBENCH_PrivateData wpd,
Object ob,
eV3DShadingColorType  color_type,
bool r_transp 
)
static

◆ workbench_cache_finish()

void workbench_cache_finish ( void ved)

◆ workbench_cache_hair_populate()

static void workbench_cache_hair_populate ( WORKBENCH_PrivateData wpd,
Object ob,
ParticleSystem psys,
ModifierData md,
eV3DShadingColorType  color_type,
bool  use_texpaint_mode,
const int  matnr 
)
static

◆ workbench_cache_init()

void workbench_cache_init ( void ved)

◆ workbench_cache_populate()

void workbench_cache_populate ( void ved,
Object ob 
)

◆ workbench_cache_sculpt_populate()

static void workbench_cache_sculpt_populate ( WORKBENCH_PrivateData wpd,
Object ob,
eV3DShadingColorType  color_type 
)
static

◆ workbench_cache_texpaint_populate()

static void workbench_cache_texpaint_populate ( WORKBENCH_PrivateData wpd,
Object ob 
)
static

◆ workbench_color_type_get()

static eV3DShadingColorType workbench_color_type_get ( WORKBENCH_PrivateData wpd,
Object ob,
bool r_sculpt_pbvh,
bool r_texpaint_mode,
bool r_draw_shadow 
)
static

◆ workbench_draw_finish()

void workbench_draw_finish ( void UNUSEDved)

Definition at line 621 of file workbench_engine.c.

References DRW_view_set_active(), and NULL.

Referenced by workbench_draw_scene(), and workbench_render().

◆ workbench_draw_sample()

void workbench_draw_sample ( void ved)

◆ workbench_draw_scene()

static void workbench_draw_scene ( void ved)
static

◆ workbench_engine_free()

static void workbench_engine_free ( void  )
static

Definition at line 627 of file workbench_engine.c.

References workbench_shader_free().

◆ workbench_engine_init()

void workbench_engine_init ( void ved)

◆ workbench_id_update()

static void workbench_id_update ( void UNUSEDvedata,
struct ID id 
)
static

◆ workbench_mesh_get_loop_custom_data()

static const CustomData* workbench_mesh_get_loop_custom_data ( const Mesh mesh)
static

◆ workbench_mesh_get_vert_custom_data()

static const CustomData* workbench_mesh_get_vert_custom_data ( const Mesh mesh)
static

◆ workbench_object_drawcall()

BLI_INLINE void workbench_object_drawcall ( DRWShadingGroup grp,
struct GPUBatch geom,
Object ob 
)

◆ workbench_object_surface_material_get()

static struct GPUBatch** workbench_object_surface_material_get ( Object ob)
static

◆ workbench_view_update()

static void workbench_view_update ( void vedata)
static

Definition at line 632 of file workbench_engine.c.

References data, and workbench_antialiasing_view_updated().

Variable Documentation

◆ draw_engine_workbench

DrawEngineType draw_engine_workbench
Initial value:
= {
N_("Workbench"),
NULL,
}
#define N_(msgid)
static void workbench_draw_scene(void *ved)
static void workbench_engine_free(void)
void workbench_cache_populate(void *ved, Object *ob)
void workbench_cache_init(void *ved)
static void workbench_id_update(void *UNUSED(vedata), struct ID *id)
void workbench_engine_init(void *ved)
static void workbench_view_update(void *vedata)
void workbench_cache_finish(void *ved)
static const DrawEngineDataSize workbench_data_size
void workbench_render(void *ved, struct RenderEngine *engine, struct RenderLayer *render_layer, const struct rcti *rect)

Definition at line 652 of file workbench_engine.c.

Referenced by workbench_dof_engine_init(), workbench_engine_init(), workbench_id_update(), and workbench_shadow_cache_populate().

◆ DRW_engine_viewport_workbench_type

RenderEngineType DRW_engine_viewport_workbench_type
Initial value:
= {
N_("Workbench"),
{NULL, NULL, NULL},
}
#define RE_USE_STEREO_VIEWPORT
Definition: RE_engine.h:51
#define RE_INTERNAL
Definition: RE_engine.h:43
#define RE_USE_GPU_CONTEXT
Definition: RE_engine.h:52
void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph)
#define WORKBENCH_ENGINE
DrawEngineType draw_engine_workbench
void workbench_render_update_passes(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)

Definition at line 670 of file workbench_engine.c.

Referenced by drw_engines_enable_from_engine(), and DRW_engines_register().

◆ workbench_data_size

const DrawEngineDataSize workbench_data_size = DRW_VIEWPORT_DATA_SIZE(WORKBENCH_Data)
static

Definition at line 650 of file workbench_engine.c.