|
Blender V5.0
|
#include <overlay_origin.hh>
Inherits blender::draw::overlay::Overlay.
Public Member Functions | |
| Origins (SelectionType selection_type) | |
| void | begin_sync (Resources &, const State &state) final |
| void | object_sync (Manager &, const ObjectRef &ob_ref, Resources &res, const State &state) final |
| void | end_sync (Resources &res, const State &state) final |
| void | draw_color_only (Framebuffer &framebuffer, Manager &manager, View &view) final |
Display object origins as dots. The option can be found under (Viewport Overlays > Objects > Origins).
Definition at line 21 of file overlay_origin.hh.
|
inline |
Definition at line 29 of file overlay_origin.hh.
Synchronization creates and fill render passes based on context state and scene state.
It runs for every scene update, so keep computation overhead low. If it is triggered, everything in the scene is considered updated. Note that this only concerns the render passes, the mesh batch caches are updated on a per object-data basis.
IMPORTANT: Synchronization must be view agnostic. That is, not rely on view position, projection matrix or frame-buffer size to do conditional pass creation. This is because, by design, syncing can happen once and rendered multiple time (multi view rendering, stereo rendering, orbiting view ...). Conditional pass creation, must be done in the drawing callbacks, but they should remain the exception. Also there will be no access to object data at this point. Creates passes used for object sync and enabling / disabling internal overlay types (e.g. vertices, edges, faces in edit mode). Runs once at the start of the sync cycle. Should also contain passes setup for overlays that are not per object overlays (e.g. Grid).
This method must be implemented.
Implements blender::draw::overlay::Overlay.
Definition at line 31 of file overlay_origin.hh.
References blender::draw::overlay::Overlay::enabled_, OB_MODE_ALL_PAINT, OB_MODE_ALL_PAINT_GPENCIL, OB_MODE_SCULPT_CURVES, and state.
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 93 of file overlay_origin.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), and view.
Finalize passes or buffers used for object sync. Runs once at the start of the sync cycle.
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 76 of file overlay_origin.hh.
References DRW_CLIPPING_UBO_SLOT, DRW_STATE_BLEND_ALPHA, DRW_STATE_WRITE_COLOR, blender::draw::overlay::Overlay::enabled_, GPU_PRIM_POINTS, OVERLAY_GLOBALS_SLOT, and state.
|
inlinefinalvirtual |
Fills passes or buffers for each object. Runs for each individual object state. IMPORTANT: Can run only once for instances using the same state (ObjectRef might contains instancing data).
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 40 of file overlay_origin.hh.
References Object::base_flag, BASE_SELECTED, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), blender::draw::overlay::Overlay::enabled_, Object::id, ID_IS_LINKED, ID_REAL_USERS, blender::draw::overlay::is_from_dupli_or_set(), state, and V3D_DRAW_CENTERS.