|
Blender V5.3
|
#include <overlay_armature.hh>
Inherits blender::draw::overlay::Overlay.
Classes | |
| struct | DrawContext |
Public Member Functions | |
| Armatures (const SelectionType selection_type) | |
| void | begin_sync (Resources &res, const State &state) final |
| DrawContext | create_draw_context (const ObjectRef &ob_ref, Resources &res, const State &state, eArmatureDrawMode draw_mode) |
| void | edit_object_sync (Manager &, const ObjectRef &ob_ref, Resources &res, 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 &) final |
| void | draw_line (Framebuffer &framebuffer, Manager &manager, View &view) final |
Static Public Member Functions | |
| static bool | is_pose_mode (const Object *armature_ob, const State &state) |
Main Draw Loops | |
| static void | draw_armature_pose (Armatures::DrawContext *ctx) |
| static void | draw_armature_edit (Armatures::DrawContext *ctx) |
Displays armature objects. This includes Object, Edit and Pose mode.
Definition at line 31 of file overlay_armature.hh.
|
inline |
Definition at line 143 of file overlay_armature.hh.
|
inlinefinalvirtual |
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 145 of file overlay_armature.hh.
References blender::CTX_MODE_PAINT_WEIGHT, DRW_CLIPPING_UBO_SLOT, blender::DRW_STATE_BLEND_ADD, blender::DRW_STATE_BLEND_ALPHA, blender::DRW_STATE_CULL_BACK, blender::DRW_STATE_CULL_FRONT, blender::DRW_STATE_DEPTH_LESS_EQUAL, blender::DRW_STATE_WRITE_COLOR, blender::DRW_STATE_WRITE_DEPTH, blender::draw::overlay::Overlay::enabled_, blender::OB_WIRE, OVERLAY_GLOBALS_SLOT, state, blender::U, blender::USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE, blender::V3D_HIDE_HELPLINES, blender::V3D_SELECT_OUTLINE, and XRAY_FLAG_ENABLED.
|
inline |
Definition at line 507 of file overlay_armature.hh.
References blender::draw::overlay::ARM_DRAW_MODE_OBJECT, blender::ARM_DRAW_RELATION_FROM_HEAD, blender::draw::overlay::Armatures::DrawContext::armature, blender::Object::base_flag, blender::BASE_SELECTED, blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::overlay::Armatures::DrawContext::const_color, blender::draw::overlay::Armatures::DrawContext::const_wire, blender::draw::overlay::Armatures::DrawContext::do_relations, blender::draw::overlay::Armatures::DrawContext::draw_envelope_distance, blender::draw::overlay::Armatures::DrawContext::draw_mode, blender::draw::overlay::Armatures::DrawContext::draw_relation_from_head, blender::bArmature::drawtype, blender::draw::overlay::Armatures::DrawContext::drawtype, blender::DRW_object_get_data_for_drawing(), blender::draw::overlay::Armatures::DrawContext::dt, blender::Object::dt, blender::bArmature::flag, blender::draw::overlay::Armatures::DrawContext::is_filled, blender::nullptr, blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, blender::OB_SOLID, blender::draw::ObjectRef::object, blender::draw::overlay::Resources::object_wire_color(), blender::draw::overlay::Armatures::DrawContext::res, blender::draw::overlay::Armatures::DrawContext::show_relations, blender::draw::overlay::Armatures::DrawContext::show_text, and state.
Referenced by edit_object_sync(), and object_sync().
|
static |
Definition at line 1941 of file overlay_armature.cc.
References blender::bArmature::act_edbone, blender::ARM_DRAW_TYPE_ARMATURE_DEFINED, blender::ARM_DRAWAXES, blender::ARM_DRAWNAMES, blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::BONE_CONNECTED, blender::bone_draw(), blender::BONE_DRAW_ACTIVE, blender::BONE_DRAW_LOCKED_WEIGHT, blender::bone_draw_update_display_matrix(), blender::animrig::bone_is_visible(), blender::draw::overlay::Armatures::DrawContext::const_color, blender::DEG_get_original(), blender::draw_axes(), blender::draw_bone_name(), blender::draw_bone_relations(), blender::bArmature::drawtype, blender::EditBone::drawtype, blender::DRW_object_get_data_for_drawing(), blender::bArmature::edbo, blender::edbo_compute_bbone_child(), blender::bArmature::flag, blender::EditBone::flag, blender::draw::overlay::Resources::is_selection(), blender::EditBone::next, blender::draw::overlay::Armatures::DrawContext::ob, blender::EditBone::parent, blender::draw::overlay::Armatures::DrawContext::res, blender::Object::runtime, blender::bke::ObjectRuntime::select_id, blender::set_ctx_bcolor(), and blender::draw::overlay::Armatures::DrawContext::show_text.
Referenced by edit_object_sync().
|
static |
Definition at line 2012 of file overlay_armature.cc.
References blender::bArmature::act_bone, blender::draw::overlay::ARM_DRAW_MODE_OBJECT, blender::draw::overlay::ARM_DRAW_MODE_POSE, blender::ARM_DRAW_TYPE_ARMATURE_DEFINED, blender::ARM_DRAWAXES, blender::ARM_DRAWNAMES, blender::ARM_NO_CUSTOM, blender::Object::base_flag, blender::BASE_FROM_DUPLI, blender::BKE_object_defgroup_list(), blender::BKE_pose_channel_find_name(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::BONE_CONNECTED, blender::bone_draw(), blender::BONE_DRAW_ACTIVE, blender::BONE_DRAW_LOCKED_WEIGHT, blender::bone_draw_update_display_matrix(), blender::BONE_IK_XLIMIT, blender::BONE_IK_ZLIMIT, blender::animrig::bone_is_visible(), blender::bPose::chanbase, blender::draw::overlay::Armatures::DrawContext::const_color, blender::DEG_get_original(), blender::DG_LOCK_WEIGHT, blender::draw::overlay::Armatures::DrawContext::do_relations, blender::draw_axes(), blender::draw_bone_degrees_of_freedom(), blender::draw_bone_name(), blender::draw_bone_relations(), blender::draw::overlay::Armatures::DrawContext::draw_mode, blender::bArmature::drawtype, blender::Bone::drawtype, blender::DRW_context_get(), blender::DRW_object_get_data_for_drawing(), blender::bArmature::flag, blender::bPose::flag, blender::bPoseChannel::flag, blender::UnifiedBonePtr::flag(), blender::draw::overlay::Resources::is_selection(), blender::Object::mode, blender::draw::overlay::Armatures::DrawContext::ob, OB_MODE_ALL_WEIGHT_PAINT, blender::OB_MODE_OBJECT, blender::OB_MODE_POSE, blender::DRWContext::obact, blender::ToolSettings::object_flag, blender::DRWContext::object_mode, blender::DRWContext::object_pose, blender::pchan_draw_data_init(), blender::Object::pose, blender::POSE_RECALC, blender::POSE_SELECTED, blender::draw::overlay::Armatures::DrawContext::res, blender::Object::runtime, blender::SCE_OBJECT_MODE_LOCK, blender::DRWContext::scene, blender::bke::ObjectRuntime::select_id, blender::set_ctx_bcolor(), blender::draw::overlay::Armatures::DrawContext::show_text, and blender::Scene::toolsettings.
Referenced by object_sync().
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 640 of file overlay_armature.hh.
References blender::draw::overlay::Overlay::enabled_, and blender::GPU_framebuffer_bind().
|
inlinefinalvirtual |
Fills passes or buffers for each object in edit mode. Runs for each individual object state for a specific mode. 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 543 of file overlay_armature.hh.
References blender::draw::overlay::ARM_DRAW_MODE_EDIT, create_draw_context(), draw_armature_edit(), blender::draw::overlay::Overlay::enabled_, and state.
|
inlinefinalvirtual |
Finalize passes or buffers used for object sync. Runs once at the end of the sync cycle.
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 572 of file overlay_armature.hh.
References blender::draw::overlay::Overlay::enabled_, end_sync(), blender::GPU_PRIM_LINES, and blender::GPU_PRIM_TRIS.
Referenced by end_sync().
|
inlinestatic |
Definition at line 654 of file overlay_armature.hh.
References blender::BKE_object_pose_armature_get(), blender::Object::mode, OB_MODE_ALL_WEIGHT_PAINT, blender::OB_MODE_POSE, and state.
Referenced by object_sync(), and blender::draw::overlay::MotionPath::object_sync().
|
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 556 of file overlay_armature.hh.
References blender::draw::overlay::ARM_DRAW_MODE_OBJECT, blender::draw::overlay::ARM_DRAW_MODE_POSE, create_draw_context(), draw_armature_pose(), blender::draw::overlay::Overlay::enabled_, is_pose_mode(), blender::OB_BOUNDBOX, and state.