Blender
V3.3
|
#include "DRW_engine.h"
#include "DRW_render.h"
#include "DEG_depsgraph_query.h"
#include "ED_view3d.h"
#include "UI_interface.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "DNA_space_types.h"
#include "overlay_engine.h"
#include "overlay_private.h"
Go to the source code of this file.
Functions | |
Engine Callbacks | |
static void | OVERLAY_engine_init (void *vedata) |
static void | OVERLAY_cache_init (void *vedata) |
BLI_INLINE OVERLAY_DupliData * | OVERLAY_duplidata_get (Object *ob, void *vedata, bool *do_init) |
static bool | overlay_object_is_edit_mode (const OVERLAY_PrivateData *pd, const Object *ob) |
static bool | overlay_should_fade_object (Object *ob, Object *active_object) |
static void | OVERLAY_cache_populate (void *vedata, Object *ob) |
static void | OVERLAY_cache_finish (void *vedata) |
static void | OVERLAY_draw_scene (void *vedata) |
static void | OVERLAY_engine_free (void) |
static void | OVERLAY_instance_free (void *instance_) |
Variables | |
Engine Type | |
static const DrawEngineDataSize | overlay_data_size = DRW_VIEWPORT_DATA_SIZE(OVERLAY_Data) |
DrawEngineType | draw_engine_overlay_type |
Engine for drawing a selection map where the pixels indicate the selection indices.
Definition in file overlay_engine.c.
Definition at line 505 of file overlay_engine.c.
References data, DefaultTextureList::depth_in_front, DRW_texture_ensure_fullscreen_2d(), DRW_viewport_framebuffer_list_get(), DRW_viewport_texture_list_get(), ELEM, GPU_DEPTH24_STENCIL8, DefaultFramebufferList::in_front_fb, OVERLAY_antialiasing_cache_finish(), OVERLAY_armature_cache_finish(), OVERLAY_edit_uv_cache_finish(), OVERLAY_image_cache_finish(), OVERLAY_mode_transfer_cache_finish(), SPACE_IMAGE, SPACE_NODE, and OVERLAY_PrivateData::space_type.
Definition at line 132 of file overlay_engine.c.
References BLI_assert_msg, OVERLAY_PrivateData::ctx_mode, CTX_MODE_EDIT_ARMATURE, CTX_MODE_EDIT_CURVE, CTX_MODE_EDIT_CURVES, CTX_MODE_EDIT_GPENCIL, CTX_MODE_EDIT_LATTICE, CTX_MODE_EDIT_MESH, CTX_MODE_EDIT_METABALL, CTX_MODE_EDIT_SURFACE, CTX_MODE_EDIT_TEXT, CTX_MODE_OBJECT, CTX_MODE_PAINT_GPENCIL, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_PARTICLE, CTX_MODE_POSE, CTX_MODE_SCULPT, CTX_MODE_SCULPT_CURVES, CTX_MODE_SCULPT_GPENCIL, CTX_MODE_VERTEX_GPENCIL, CTX_MODE_WEIGHT_GPENCIL, data, OVERLAY_PrivateData::edit_mesh, OVERLAY_PrivateData::flag, OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_curves_cache_init(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_lattice_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_particle_cache_init(), OVERLAY_edit_text_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_facing_cache_init(), OVERLAY_fade_cache_init(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_image_cache_init(), OVERLAY_metaball_cache_init(), OVERLAY_mode_transfer_cache_init(), OVERLAY_motion_path_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_init(), OVERLAY_sculpt_cache_init(), OVERLAY_sculpt_curves_cache_init(), OVERLAY_volume_cache_init(), OVERLAY_wireframe_cache_init(), OVERLAY_StorageList::pd, SPACE_IMAGE, SPACE_NODE, OVERLAY_PrivateData::space_type, and V3D_OVERLAY_EDIT_WEIGHT.
Definition at line 290 of file overlay_engine.c.
References OVERLAY_PrivateData::armature, OVERLAY_DupliData::base_flag, Object::base_flag, BASE_FROM_DUPLI, BASE_SELECTED, BLI_listbase_is_empty(), View3D::camera, OVERLAY_PrivateData::ctx_mode, CTX_MODE_PARTICLE, data, OVERLAY_PrivateData::do_pose_fade_geom, DRW_context_state_get(), DRW_object_get_dupli_parent(), DRW_object_is_renderable(), DRW_state_is_select(), Object::dt, OVERLAY_PrivateData::edit_mesh, ELEM, OVERLAY_PrivateData::flag, View3DOverlay::flag, OVERLAY_PrivateData::hide_overlays, Object::id, Object::mode, SculptSession::mode_type, NULL, OB_ARMATURE, OB_BOUNDBOX, OB_CAMERA, OB_CURVES, OB_CURVES_LEGACY, OB_EMPTY, OB_FONT, OB_GPENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_MODE_ALL_PAINT, OB_MODE_PARTICLE_EDIT, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, OB_WIRE, DRWContextState::obact, DRWContextState::object_mode, ID::orig_id, OVERLAY_PrivateData::overlay, OVERLAY_armature_cache_populate(), OVERLAY_armature_is_pose_mode(), OVERLAY_camera_cache_populate(), OVERLAY_duplidata_get(), OVERLAY_edit_armature_cache_populate(), OVERLAY_edit_curve_cache_populate(), OVERLAY_edit_curves_cache_populate(), OVERLAY_edit_lattice_cache_populate(), OVERLAY_edit_mesh_cache_populate(), OVERLAY_edit_metaball_cache_populate(), OVERLAY_edit_particle_cache_populate(), OVERLAY_edit_surf_cache_populate(), OVERLAY_edit_text_cache_populate(), OVERLAY_empty_cache_populate(), OVERLAY_extra_cache_populate(), OVERLAY_facing_cache_populate(), OVERLAY_fade_cache_populate(), OVERLAY_gpencil_cache_populate(), OVERLAY_lattice_cache_populate(), OVERLAY_light_cache_populate(), OVERLAY_lightprobe_cache_populate(), OVERLAY_metaball_cache_populate(), OVERLAY_mode_transfer_cache_populate(), OVERLAY_motion_path_cache_populate(), overlay_object_is_edit_mode(), OVERLAY_outline_cache_populate(), OVERLAY_paint_texture_cache_populate(), OVERLAY_paint_vertex_cache_populate(), OVERLAY_paint_weight_cache_populate(), OVERLAY_particle_cache_populate(), OVERLAY_pose_armature_cache_populate(), OVERLAY_pose_cache_populate(), OVERLAY_sculpt_cache_populate(), OVERLAY_sculpt_curves_cache_populate(), overlay_should_fade_object(), OVERLAY_speaker_cache_populate(), OVERLAY_volume_cache_populate(), OVERLAY_wireframe_cache_populate(), Object::particlesystem, RegionView3D::persp, DRWContextState::rv3d, RV3D_CAMOB, Object::sculpt, SPACE_IMAGE, OVERLAY_PrivateData::space_type, Object::type, DRWContextState::v3d, OVERLAY_PrivateData::v3d_flag, V3D_OVERLAY_EDIT_WEIGHT, V3D_OVERLAY_FACE_ORIENTATION, V3D_OVERLAY_FADE_INACTIVE, V3D_OVERLAY_HIDE_BONES, V3D_OVERLAY_HIDE_MOTION_PATHS, V3D_OVERLAY_HIDE_OBJECT_XTRAS, V3D_SELECT_OUTLINE, and OVERLAY_PrivateData::wireframe_mode.
Definition at line 537 of file overlay_engine.c.
References OVERLAY_PrivateData::ctx_mode, CTX_MODE_EDIT_CURVE, CTX_MODE_EDIT_CURVES, CTX_MODE_EDIT_GPENCIL, CTX_MODE_EDIT_LATTICE, CTX_MODE_EDIT_MESH, CTX_MODE_EDIT_SURFACE, CTX_MODE_EDIT_TEXT, CTX_MODE_PAINT_GPENCIL, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_PARTICLE, CTX_MODE_POSE, CTX_MODE_SCULPT, CTX_MODE_SCULPT_CURVES, CTX_MODE_SCULPT_GPENCIL, CTX_MODE_VERTEX_GPENCIL, CTX_MODE_WEIGHT_GPENCIL, data, DRW_state_is_depth(), DRW_state_is_fbo(), DRW_state_is_select(), DRW_view_set_active(), DRW_viewport_framebuffer_list_get(), GPU_framebuffer_bind(), NULL, OVERLAY_antialiasing_end(), OVERLAY_antialiasing_start(), OVERLAY_armature_draw(), OVERLAY_armature_in_front_draw(), OVERLAY_background_draw(), OVERLAY_FramebufferList::overlay_color_only_fb, OVERLAY_FramebufferList::overlay_default_fb, OVERLAY_edit_curve_draw(), OVERLAY_edit_curves_draw(), OVERLAY_edit_gpencil_draw(), OVERLAY_edit_lattice_draw(), OVERLAY_edit_mesh_draw(), OVERLAY_edit_particle_draw(), OVERLAY_edit_text_draw(), OVERLAY_edit_uv_draw(), OVERLAY_extra_blend_draw(), OVERLAY_extra_centers_draw(), OVERLAY_extra_draw(), OVERLAY_extra_in_front_draw(), OVERLAY_facing_draw(), OVERLAY_facing_infront_draw(), OVERLAY_fade_draw(), OVERLAY_fade_infront_draw(), DefaultFramebufferList::overlay_fb, OVERLAY_gpencil_draw(), OVERLAY_grid_draw(), OVERLAY_image_background_draw(), OVERLAY_image_draw(), OVERLAY_image_in_front_draw(), OVERLAY_image_scene_background_draw(), OVERLAY_FramebufferList::overlay_in_front_fb, OVERLAY_FramebufferList::overlay_line_fb, OVERLAY_FramebufferList::overlay_line_in_front_fb, OVERLAY_metaball_draw(), OVERLAY_metaball_in_front_draw(), OVERLAY_mode_transfer_draw(), OVERLAY_mode_transfer_infront_draw(), OVERLAY_motion_path_draw(), DefaultFramebufferList::overlay_only_fb, OVERLAY_outline_draw(), OVERLAY_paint_draw(), OVERLAY_particle_draw(), OVERLAY_pose_draw(), OVERLAY_sculpt_curves_draw(), OVERLAY_sculpt_draw(), OVERLAY_volume_draw(), OVERLAY_wireframe_draw(), OVERLAY_wireframe_in_front_draw(), OVERLAY_xray_depth_copy(), OVERLAY_xray_depth_infront_copy(), OVERLAY_xray_fade_draw(), SPACE_IMAGE, SPACE_NODE, OVERLAY_PrivateData::space_type, and SPACE_VIEW3D.
BLI_INLINE OVERLAY_DupliData* OVERLAY_duplidata_get | ( | Object * | ob, |
void * | vedata, | ||
bool * | do_init | ||
) |
Definition at line 221 of file overlay_engine.c.
References Object::base_flag, DRW_duplidata_get(), ELEM, MEM_callocN, NULL, OB_CURVES_LEGACY, OB_FONT, OB_LATTICE, OB_MESH, OB_SURF, and Object::type.
Referenced by OVERLAY_cache_populate().
Definition at line 708 of file overlay_engine.c.
References OVERLAY_shader_free().
Definition at line 31 of file overlay_engine.c.
References BKE_scene_uses_blender_workbench(), OVERLAY_PrivateData::cfra, OVERLAY_PrivateData::clear_in_front, OVERLAY_PrivateData::clipping_state, CTX_data_mode_enum_ex(), OVERLAY_PrivateData::ctx_mode, CTX_MODE_EDIT_CURVES, CTX_MODE_EDIT_MESH, data, DEG_get_ctime(), DRWContextState::depsgraph, DRW_context_state_get(), DRW_STATE_CLIP_PLANES, SpaceImageOverlay::flag, View3DOverlay::flag, View3D::flag, View3D::flag2, Sculpt::flags, View3D::gridflag, OVERLAY_PrivateData::hide_overlays, MEM_callocN, NULL, OB_SOLID, OB_WIRE, DRWContextState::obact, DRWContextState::object_edit, DRWContextState::object_mode, OVERLAY_PrivateData::overlay, SpaceImage::overlay, View3D::overlay, OVERLAY_antialiasing_init(), OVERLAY_edit_curves_init(), OVERLAY_edit_mesh_init(), OVERLAY_edit_uv_init(), OVERLAY_facing_init(), OVERLAY_grid_init(), OVERLAY_image_init(), OVERLAY_outline_init(), OVERLAY_paint_init(), OVERLAY_wireframe_init(), OVERLAY_StorageList::pd, DRWContextState::rv3d, RV3D_CLIPPING_ENABLED, scene, DRWContextState::scene, ToolSettings::sculpt, SCULPT_HIDE_FACE_SETS, SCULPT_HIDE_MASK, View3DOverlay::sculpt_mode_face_sets_opacity, View3DOverlay::sculpt_mode_mask_opacity, View3D::shading, SI_OVERLAY_SHOW_OVERLAYS, DRWContextState::space_data, SPACE_IMAGE, SPACE_NODE, OVERLAY_PrivateData::space_type, SPACE_VIEW3D, SpaceLink::spacetype, Scene::toolsettings, View3DShading::type, OVERLAY_PrivateData::use_in_front, DRWContextState::v3d, OVERLAY_PrivateData::v3d_flag, OVERLAY_PrivateData::v3d_gridflag, V3D_HIDE_OVERLAYS, V3D_OVERLAY_HIDE_BONES, V3D_OVERLAY_HIDE_MOTION_PATHS, V3D_OVERLAY_HIDE_OBJECT_ORIGINS, V3D_OVERLAY_HIDE_OBJECT_XTRAS, V3D_OVERLAY_HIDE_TEXT, V3D_OVERLAY_WIREFRAMES, OVERLAY_PrivateData::wireframe_mode, View3DOverlay::wireframe_opacity, View3DOverlay::wireframe_threshold, XRAY_ACTIVE, XRAY_ALPHA, OVERLAY_PrivateData::xray_enabled, OVERLAY_PrivateData::xray_enabled_and_not_wire, and OVERLAY_PrivateData::xray_opacity.
Definition at line 713 of file overlay_engine.c.
References DRW_UBO_FREE_SAFE, instance, and MEM_freeN.
|
static |
Definition at line 243 of file overlay_engine.c.
References OVERLAY_PrivateData::ctx_mode, CTX_MODE_EDIT_ARMATURE, CTX_MODE_EDIT_CURVE, CTX_MODE_EDIT_CURVES, CTX_MODE_EDIT_LATTICE, CTX_MODE_EDIT_MESH, CTX_MODE_EDIT_METABALL, CTX_MODE_EDIT_SURFACE, CTX_MODE_EDIT_TEXT, DRW_object_is_in_edit_mode(), OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by OVERLAY_cache_populate().
Definition at line 273 of file overlay_engine.c.
References ELEM, Object::mode, OB_MODE_OBJECT, and OB_MODE_POSE.
Referenced by OVERLAY_cache_populate().
DrawEngineType draw_engine_overlay_type |
Definition at line 728 of file overlay_engine.c.
Referenced by drw_engine_enable_image_editor(), drw_engines_enable_editors(), drw_engines_enable_overlays(), and DRW_engines_register().
|
static |
Definition at line 726 of file overlay_engine.c.