58 if (data->instance ==
nullptr) {
59 data->instance =
new Instance(select::SelectionType::DISABLED,
false);
165 if (draw_edit_weights) {
254 if (*dupli_data ==
nullptr) {
259 else if ((*dupli_data)->base_flag != ob->
base_flag) {
312 if (!active_object || !ob) {
320 if ((active_object->
mode & ob->
mode) != 0) {
341 const bool is_preview = dupli_object !=
nullptr &&
346 const bool instance_parent_in_edit_mode = is_instance ?
353 const bool in_sculpt_curve_mode = (ob == draw_ctx->
obact ||
354 (is_preview && dupli_parent == draw_ctx->
obact &&
357 const bool in_sculpt_mode = (ob == draw_ctx->
obact) && (ob->
sculpt !=
nullptr) &&
361 const bool has_surface =
ELEM(ob->
type,
376 const bool draw_mode_transfer = draw_surface;
378 const bool draw_wires = draw_surface && has_surface &&
380 const bool draw_outlines = !in_edit_mode && !in_paint_mode && !in_sculpt_curve_mode &&
381 renderable && has_surface && !instance_parent_in_edit_mode &&
387 const bool draw_extras =
404 if (draw_mode_transfer) {
413 if (draw_bone_selection) {
435 if (draw_edit_weights) {
467 else if (in_pose_mode && draw_bones) {
491 else if (in_particle_edit_mode) {
495 if (in_sculpt_mode) {
498 else if (in_sculpt_curve_mode) {
501 else if (in_grease_pencil_sculpt_mode && !pd->
hide_overlays) {
505 if (draw_motion_paths) {
512 if (draw_bones && (is_select || (!in_edit_mode && !in_pose_mode))) {
590 {GPU_ATTACHMENT_TEXTURE(dtxl->depth_in_front), GPU_ATTACHMENT_TEXTURE(dtxl->color)});
618 const float clear_col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
806 if (instance !=
nullptr) {
@ CTX_MODE_VERTEX_GPENCIL_LEGACY
@ CTX_MODE_WEIGHT_GPENCIL_LEGACY
@ CTX_MODE_EDIT_POINT_CLOUD
@ CTX_MODE_SCULPT_GPENCIL_LEGACY
@ CTX_MODE_PAINT_GREASE_PENCIL
@ CTX_MODE_PAINT_GPENCIL_LEGACY
@ CTX_MODE_SCULPT_GREASE_PENCIL
@ CTX_MODE_EDIT_GREASE_PENCIL
@ CTX_MODE_WEIGHT_GREASE_PENCIL
@ CTX_MODE_VERTEX_GREASE_PENCIL
@ CTX_MODE_EDIT_GPENCIL_LEGACY
enum eContextObjectMode CTX_data_mode_enum_ex(const Object *obedit, const Object *ob, eObjectMode object_mode)
General operations, lookup, etc. for blender objects.
bool BKE_scene_uses_blender_workbench(const Scene *scene)
#define BLI_assert_msg(a, msg)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
float DEG_get_ctime(const Depsgraph *graph)
#define OB_MODE_ALL_PAINT
@ OB_MODE_VERTEX_GREASE_PENCIL
@ OB_MODE_SCULPT_GREASE_PENCIL
@ OB_MODE_WEIGHT_GREASE_PENCIL
#define BASE_SELECTED(v3d, base)
@ SI_OVERLAY_SHOW_OVERLAYS
@ V3D_OVERLAY_EDIT_WEIGHT
#define RV3D_CLIPPING_ENABLED(v3d, rv3d)
@ V3D_OVERLAY_SCULPT_SHOW_FACE_SETS
@ V3D_OVERLAY_FACE_ORIENTATION
@ V3D_OVERLAY_VIEWER_ATTRIBUTE
@ V3D_OVERLAY_HIDE_OBJECT_ORIGINS
@ V3D_OVERLAY_HIDE_MOTION_PATHS
@ V3D_OVERLAY_SCULPT_SHOW_MASK
@ V3D_OVERLAY_HIDE_OBJECT_XTRAS
@ V3D_OVERLAY_FADE_INACTIVE
@ V3D_OVERLAY_VIEWER_ATTRIBUTE_TEXT
@ V3D_XR_SHOW_PASSTHROUGH
#define DRW_VIEWPORT_DATA_SIZE(ty)
void GPU_framebuffer_bind(GPUFrameBuffer *framebuffer)
void GPU_framebuffer_clear_color(GPUFrameBuffer *fb, const float clear_col[4])
#define GPU_framebuffer_ensure_config(_fb,...)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object instance
static void module_free()
A running instance of the engine.
Object * DRW_object_get_dupli_parent(const Object *)
DefaultFramebufferList * DRW_viewport_framebuffer_list_get()
bool DRW_object_is_in_edit_mode(const Object *ob)
bool DRW_object_is_renderable(const Object *ob)
DefaultTextureList * DRW_viewport_texture_list_get()
void ** DRW_duplidata_get(void *vedata)
const DRWContextState * DRW_context_state_get()
DupliObject * DRW_object_get_dupli(const Object *)
bool DRW_state_is_select()
bool DRW_state_is_depth()
void DRW_view_set_active(const DRWView *view)
void DRW_texture_ensure_fullscreen_2d(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void *(* MEM_callocN)(size_t len, const char *str)
void OVERLAY_antialiasing_cache_init(OVERLAY_Data *vedata)
void OVERLAY_antialiasing_cache_finish(OVERLAY_Data *vedata)
void OVERLAY_antialiasing_init(OVERLAY_Data *vedata)
void OVERLAY_xray_depth_copy(OVERLAY_Data *vedata)
void OVERLAY_antialiasing_start(OVERLAY_Data *vedata)
void OVERLAY_xray_depth_infront_copy(OVERLAY_Data *vedata)
void OVERLAY_xray_fade_draw(OVERLAY_Data *vedata)
void OVERLAY_antialiasing_end(OVERLAY_Data *vedata)
void OVERLAY_armature_in_front_draw(OVERLAY_Data *vedata)
bool OVERLAY_armature_is_pose_mode(Object *ob, const DRWContextState *draw_ctx)
void OVERLAY_edit_armature_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_armature_cache_finish(OVERLAY_Data *vedata)
void OVERLAY_armature_cache_init(OVERLAY_Data *vedata)
void OVERLAY_pose_armature_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_pose_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_armature_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_pose_draw(OVERLAY_Data *vedata)
void OVERLAY_armature_draw(OVERLAY_Data *vedata)
void OVERLAY_background_cache_init(OVERLAY_Data *vedata)
void OVERLAY_background_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_curve_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_curve_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_curve_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_surf_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_curves_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_curves_init(OVERLAY_Data *vedata)
void OVERLAY_edit_curves_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_curves_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_mesh_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_mesh_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_mesh_init(OVERLAY_Data *vedata)
void OVERLAY_edit_mesh_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_text_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_text_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_text_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_uv_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_uv_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_uv_cache_finish(OVERLAY_Data *vedata)
void OVERLAY_edit_uv_init(OVERLAY_Data *vedata)
static void OVERLAY_draw_scene(void *vedata)
static const DrawEngineDataSize overlay_data_size
blender::draw::overlay::Instance Instance
static void OVERLAY_cache_init(void *vedata)
static bool overlay_object_is_paint_mode(const DRWContextState *draw_ctx, const Object *ob)
static void OVERLAY_cache_populate(void *vedata, Object *ob)
static bool overlay_object_is_edit_mode(const OVERLAY_PrivateData *pd, const Object *ob)
DrawEngineType draw_engine_overlay_type
static void OVERLAY_engine_init(void *vedata)
static void OVERLAY_engine_free()
static bool overlay_should_fade_object(Object *ob, Object *active_object)
BLI_INLINE OVERLAY_DupliData * OVERLAY_duplidata_get(Object *ob, void *vedata, bool *r_do_init)
static void OVERLAY_cache_finish(void *vedata)
static void OVERLAY_instance_free(void *instance_)
void OVERLAY_facing_init(OVERLAY_Data *)
void OVERLAY_facing_infront_draw(OVERLAY_Data *vedata)
void OVERLAY_facing_draw(OVERLAY_Data *vedata)
void OVERLAY_facing_cache_init(OVERLAY_Data *vedata)
void OVERLAY_facing_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_fade_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_fade_draw(OVERLAY_Data *vedata)
void OVERLAY_fade_infront_draw(OVERLAY_Data *vedata)
void OVERLAY_fade_cache_init(OVERLAY_Data *vedata)
void OVERLAY_gpencil_legacy_cache_init(OVERLAY_Data *vedata)
void OVERLAY_gpencil_legacy_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_gpencil_legacy_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_gpencil_legacy_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_grease_pencil_draw(OVERLAY_Data *vedata)
void OVERLAY_weight_grease_pencil_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_vertex_grease_pencil_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_grease_pencil_cache_init(OVERLAY_Data *vedata)
void OVERLAY_grease_pencil_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_grease_pencil_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_grease_pencil_draw(OVERLAY_Data *vedata)
void OVERLAY_sculpt_grease_pencil_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_grid_draw(OVERLAY_Data *vedata)
void OVERLAY_grid_cache_init(OVERLAY_Data *vedata)
void OVERLAY_grid_init(OVERLAY_Data *vedata)
void OVERLAY_image_cache_init(OVERLAY_Data *vedata)
void OVERLAY_image_background_draw(OVERLAY_Data *vedata)
void OVERLAY_image_in_front_draw(OVERLAY_Data *vedata)
void OVERLAY_image_scene_background_draw(OVERLAY_Data *vedata)
void OVERLAY_image_cache_finish(OVERLAY_Data *vedata)
void OVERLAY_image_draw(OVERLAY_Data *vedata)
void OVERLAY_image_init(OVERLAY_Data *vedata)
void OVERLAY_lattice_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_lattice_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_lattice_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_lattice_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_mode_transfer_cache_init(OVERLAY_Data *vedata)
void OVERLAY_mode_transfer_cache_finish(OVERLAY_Data *vedata)
void OVERLAY_mode_transfer_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_mode_transfer_infront_draw(OVERLAY_Data *vedata)
void OVERLAY_mode_transfer_draw(OVERLAY_Data *vedata)
void OVERLAY_motion_path_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_motion_path_draw(OVERLAY_Data *vedata)
void OVERLAY_motion_path_cache_init(OVERLAY_Data *vedata)
void OVERLAY_outline_cache_populate(OVERLAY_Data *vedata, Object *ob, OVERLAY_DupliData *dupli, bool init_dupli)
void OVERLAY_outline_draw(OVERLAY_Data *vedata)
void OVERLAY_outline_init(OVERLAY_Data *vedata)
void OVERLAY_outline_cache_init(OVERLAY_Data *vedata)
void OVERLAY_paint_texture_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_paint_init(OVERLAY_Data *vedata)
void OVERLAY_paint_cache_init(OVERLAY_Data *vedata)
void OVERLAY_paint_draw(OVERLAY_Data *vedata)
void OVERLAY_paint_weight_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_paint_vertex_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_particle_draw(OVERLAY_Data *vedata)
void OVERLAY_edit_particle_cache_init(OVERLAY_Data *vedata)
void OVERLAY_particle_cache_init(OVERLAY_Data *vedata)
void OVERLAY_edit_particle_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_particle_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_edit_particle_draw(OVERLAY_Data *vedata)
void OVERLAY_sculpt_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_sculpt_draw(OVERLAY_Data *vedata)
void OVERLAY_wireframe_draw(OVERLAY_Data *vedata)
void OVERLAY_volume_draw(OVERLAY_Data *vedata)
void OVERLAY_viewer_attribute_draw(OVERLAY_Data *vedata)
void OVERLAY_sculpt_curves_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_shader_free()
void OVERLAY_wireframe_in_front_draw(OVERLAY_Data *vedata)
void OVERLAY_sculpt_curves_cache_init(OVERLAY_Data *vedata)
void OVERLAY_volume_cache_populate(OVERLAY_Data *vedata, Object *ob)
void OVERLAY_volume_cache_init(OVERLAY_Data *vedata)
void OVERLAY_viewer_attribute_cache_populate(OVERLAY_Data *vedata, Object *object)
void OVERLAY_viewer_attribute_text(const Object &object)
void OVERLAY_sculpt_cache_init(OVERLAY_Data *vedata)
void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, Object *ob, OVERLAY_DupliData *dupli, bool init_dupli)
void OVERLAY_sculpt_curves_draw_wires(OVERLAY_Data *vedata)
void OVERLAY_sculpt_curves_draw(OVERLAY_Data *vedata)
void OVERLAY_wireframe_cache_init(OVERLAY_Data *vedata)
void OVERLAY_viewer_attribute_cache_init(OVERLAY_Data *vedata)
void OVERLAY_wireframe_init(OVERLAY_Data *vedata)
GPUFrameBuffer * overlay_fb
GPUFrameBuffer * in_front_fb
GPUFrameBuffer * overlay_only_fb
GPUTexture * depth_in_front
const blender::bke::GeometrySet * preview_base_geometry
GPUFrameBuffer * overlay_line_fb
GPUFrameBuffer * overlay_default_fb
GPUFrameBuffer * overlay_color_only_fb
GPUFrameBuffer * overlay_line_in_front_fb
GPUFrameBuffer * overlay_in_front_fb
eContextObjectMode ctx_mode
bool xray_enabled_and_not_wire
struct OVERLAY_PrivateData::@234 armature
struct OVERLAY_PrivateData::@230 edit_mesh
struct SculptSession * sculpt
SpaceImageOverlay overlay
float sculpt_mode_mask_opacity
float sculpt_mode_face_sets_opacity
float wireframe_threshold