|
Blender V4.3
|
#include <cmath>#include <cstdlib>#include <cstring>#include "DNA_armature_types.h"#include "DNA_constraint_types.h"#include "DNA_mesh_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_view3d_types.h"#include "DRW_render.hh"#include "BLI_listbase_wrapper.hh"#include "BLI_math_color.h"#include "BLI_math_matrix_types.hh"#include "BLI_math_rotation.h"#include "BLI_utildefines.h"#include "BKE_action.hh"#include "BKE_armature.hh"#include "BKE_deform.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_object_types.hh"#include "DEG_depsgraph_query.hh"#include "ED_armature.hh"#include "ED_view3d.hh"#include "ANIM_bone_collections.hh"#include "ANIM_bonecolor.hh"#include "UI_resources.hh"#include "draw_common_c.hh"#include "draw_manager_text.hh"#include "overlay_next_armature.hh"#include "overlay_private.hh"#include "draw_cache_impl.hh"Go to the source code of this file.
Classes | |
| class | UnifiedBonePtr |
| class | ArmatureBoneDrawStrategy |
| class | ArmatureBoneDrawStrategyEmpty |
| class | ArmatureBoneDrawStrategyCustomShape |
| class | ArmatureBoneDrawStrategyOcta |
| class | ArmatureBoneDrawStrategyLine |
| class | ArmatureBoneDrawStrategyBBone |
| class | ArmatureBoneDrawStrategyEnvelope |
| class | ArmatureBoneDrawStrategyWire |
Macros | |
| #define | PT_DEFAULT_RAD 0.05f /* radius of the point batch. */ |
| #define | BUF_INSTANCE DRW_shgroup_call_buffer_instance |
| #define | BUF_LINE(grp, format) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_LINES) |
| #define | BUF_POINT(grp, format) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_POINTS) |
Functions | |
| bool | OVERLAY_armature_is_pose_mode (Object *ob, const DRWContextState *draw_ctx) |
| void | OVERLAY_armature_cache_init (OVERLAY_Data *vedata) |
Shader Groups (DRW_shgroup) | |
| static void | bone_instance_data_set_angle_minmax (BoneInstanceData *data, const float aminx, const float aminz, const float amaxx, const float amaxz) |
| static float | encode_2f_to_float (float a, float b) |
| void | OVERLAY_bone_instance_data_set_color_hint (BoneInstanceData *data, const float hint_color[4]) |
| void | OVERLAY_bone_instance_data_set_color (BoneInstanceData *data, const float bone_color[4]) |
| static void | drw_shgroup_bone_octahedral (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float bone_color[4], const float hint_color[4], const float outline_color[4]) |
| static void | drw_shgroup_bone_box (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float bone_color[4], const float hint_color[4], const float outline_color[4]) |
| static void | drw_shgroup_bone_stick (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float col_wire[4], const float col_bone[4], const float col_head[4], const float col_tail[4], const int select_id) |
| static void | drw_shgroup_bone_envelope_distance (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float *radius_head, const float *radius_tail, const float *distance) |
| static void | drw_shgroup_bone_envelope (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float bone_col[4], const float hint_col[4], const float outline_col[4], const float *radius_head, const float *radius_tail, const int select_id) |
| BLI_INLINE DRWCallBuffer * | custom_bone_instance_shgroup (const Armatures::DrawContext *ctx, DRWShadingGroup *grp, blender::gpu::Batch *custom_geom) |
| static void | drw_shgroup_bone_custom_solid_mesh (const Armatures::DrawContext *ctx, Mesh &mesh, const float(*bone_mat)[4], const float bone_color[4], const float hint_color[4], const float outline_color[4], const float wire_width, const draw::select::ID select_id, Object &custom) |
| static void | drw_shgroup_bone_custom_mesh_wire (const Armatures::DrawContext *ctx, Mesh &mesh, const float(*bone_mat)[4], const float color[4], const float wire_width, const draw::select::ID select_id, Object &custom) |
| static void | drw_shgroup_custom_bone_curve (const Armatures::DrawContext *ctx, Curve *curve, const float(*bone_mat)[4], const float outline_color[4], const float wire_width, const draw::select::ID select_id, Object *custom) |
| static void | drw_shgroup_bone_custom_solid (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float bone_color[4], const float hint_color[4], const float outline_color[4], const float wire_width, const draw::select::ID select_id, Object *custom) |
| static void | drw_shgroup_bone_custom_wire (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float color[4], const float wire_width, const draw::select::ID select_id, Object *custom) |
| static void | drw_shgroup_bone_custom_empty (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float color[4], const float wire_width, const draw::select::ID select_id, Object *custom) |
| static void | drw_shgroup_bone_sphere (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float bone_color[4], const float hint_color[4], const float outline_color[4], const int select_id) |
| static void | drw_shgroup_bone_axes (const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float color[4]) |
| static void | drw_shgroup_bone_relationship_lines_ex (const Armatures::DrawContext *ctx, const float start[3], const float end[3], const float color[4]) |
| static void | drw_shgroup_bone_relationship_lines (const Armatures::DrawContext *ctx, const float start[3], const float end[3]) |
| static void | drw_shgroup_bone_ik_lines (const Armatures::DrawContext *ctx, const float start[3], const float end[3]) |
| static void | drw_shgroup_bone_ik_no_target_lines (const Armatures::DrawContext *ctx, const float start[3], const float end[3]) |
| static void | drw_shgroup_bone_ik_spline_lines (const Armatures::DrawContext *ctx, const float start[3], const float end[3]) |
Drawing Theme Helpers | |
| |
| static void | set_ctx_bcolor (Armatures::DrawContext *ctx, const UnifiedBonePtr bone) |
| static void | cp_shade_color3ub (uchar cp[3], const int offset) |
| static void | use_bone_color (float *r_color, const uint8_t *color_from_theme, const int shade_offset) |
| static void | get_pchan_color_wire (const ThemeWireColor *bcolor, const eArmatureDrawMode draw_mode, const eBone_Flag boneflag, float r_color[4]) |
| static void | get_pchan_color_solid (const ThemeWireColor *bcolor, float r_color[4]) |
| static void | get_pchan_color_constraint (const ThemeWireColor *bcolor, const UnifiedBonePtr bone, float r_color[4]) |
Drawing Color Helpers | |
| static void | bone_locked_color_shade (float color[4]) |
| static const float * | get_bone_solid_color (const Armatures::DrawContext *ctx, const eBone_Flag boneflag) |
| static const float * | get_bone_solid_with_consts_color (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag) |
| static float | get_bone_wire_thickness (const Armatures::DrawContext *ctx, int boneflag) |
| static const float * | get_bone_wire_color (const Armatures::DrawContext *ctx, const eBone_Flag boneflag) |
| static void | bone_hint_color_shade (float hint_color[4], const float color[4]) |
| static const float * | get_bone_hint_color (const Armatures::DrawContext *ctx, const eBone_Flag boneflag) |
Helper Utils | |
| static void | pchan_draw_data_init (bPoseChannel *pchan) |
| static void | draw_bone_update_disp_matrix_default (UnifiedBonePtr bone) |
| static void | edbo_compute_bbone_child (bArmature *arm) |
| static void | ebone_spline_preview (EditBone *ebone, const float result_array[MAX_BBONE_SUBDIV][4][4]) |
| static void | draw_bone_update_disp_matrix_bbone (UnifiedBonePtr bone) |
| static void | draw_axes (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const bArmature *arm) |
| static void | draw_points (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const float col_solid[4], const int select_id) |
Draw Degrees of Freedom | |
| static void | draw_bone_degrees_of_freedom (const Armatures::DrawContext *ctx, const bPoseChannel *pchan) |
Draw Relationships | |
| static void | pchan_draw_ik_lines (const Armatures::DrawContext *ctx, const bPoseChannel *pchan, const bool only_temp) |
| static void | draw_bone_bone_relationship_line (const Armatures::DrawContext *ctx, const float bone_head[3], const float parent_head[3], const float parent_tail[3]) |
| static void | draw_bone_relations (const Armatures::DrawContext *ctx, const ArmatureBoneDrawStrategy &draw_strategy, const UnifiedBonePtr bone, const eBone_Flag boneflag) |
| static void | draw_bone_name (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag) |
Pose Bone Culling | |
Used for selection since drawing many bones can be slow, see: #91253. Bounding spheres are used with margins added to ensure bones are included. An added margin is needed because BKE_pchan_minmax only returns the bounds of the bones head & tail which doesn't account for parts of the bone users may select (octahedral spheres or envelope radius for example). | |
| static void | pchan_culling_calc_bsphere (const Object *ob, const bPoseChannel *pchan, BoundSphere *r_bsphere) |
| static bool | pchan_culling_test_simple (const DRWView *view, const Object *ob, const bPoseChannel *pchan) |
| static bool | pchan_culling_test_with_radius_scale (const DRWView *view, const Object *ob, const bPoseChannel *pchan, const float scale) |
Bone Drawing Strategies | |
Bone drawing uses a strategy pattern for the different armature drawing modes. | |
| static ArmatureBoneDrawStrategy & | strategy_for_armature_drawtype (const eArmature_Drawtype drawtype) |
Main Draw Loops | |
| static void | armature_context_setup (Armatures::DrawContext *ctx, OVERLAY_PrivateData *pd, Object *ob, const eArmatureDrawMode draw_mode, const float *const_color) |
| void | OVERLAY_edit_armature_cache_populate (OVERLAY_Data *vedata, Object *ob) |
| void | OVERLAY_pose_armature_cache_populate (OVERLAY_Data *vedata, Object *ob) |
| void | OVERLAY_armature_cache_populate (OVERLAY_Data *vedata, Object *ob) |
| static bool | POSE_is_driven_by_active_armature (Object *ob) |
| void | OVERLAY_pose_cache_populate (OVERLAY_Data *vedata, Object *ob) |
| void | OVERLAY_armature_cache_finish (OVERLAY_Data *vedata) |
| void | OVERLAY_armature_draw (OVERLAY_Data *vedata) |
| void | OVERLAY_armature_in_front_draw (OVERLAY_Data *vedata) |
| void | OVERLAY_pose_draw (OVERLAY_Data *vedata) |
| #define BUF_INSTANCE DRW_shgroup_call_buffer_instance |
Referenced by OVERLAY_armature_cache_init().
| #define BUF_LINE | ( | grp, | |
| format ) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_LINES) |
Referenced by OVERLAY_armature_cache_init().
| #define BUF_POINT | ( | grp, | |
| format ) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_POINTS) |
| #define PT_DEFAULT_RAD 0.05f /* radius of the point batch. */ |
Definition at line 53 of file overlay_armature.cc.
Referenced by drw_shgroup_bone_envelope().
|
static |
Definition at line 3143 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_OBJECT, blender::draw::overlay::ARM_DRAW_MODE_POSE, ARM_DRAW_RELATION_FROM_HEAD, OVERLAY_PrivateData::armature, OVERLAY_PrivateData::armature_call_buffers, Object::base_flag, BASE_SELECTED, blender::draw::overlay::Armatures::DrawContext::const_color, blender::draw::overlay::Armatures::DrawContext::const_wire, OVERLAY_ArmatureCallBuffersInner::custom_fill, blender::draw::overlay::Armatures::DrawContext::custom_outline, OVERLAY_ArmatureCallBuffersInner::custom_outline, blender::draw::overlay::Armatures::DrawContext::custom_shapes_ghash, OVERLAY_ArmatureCallBuffersInner::custom_shapes_ghash, blender::draw::overlay::Armatures::DrawContext::custom_solid, blender::draw::overlay::Armatures::DrawContext::custom_wire, OVERLAY_ArmatureCallBuffersInner::custom_wire, Object::data, OVERLAY_PrivateData::do_pose_xray, blender::draw::overlay::Armatures::DrawContext::do_relations, blender::draw::overlay::Armatures::DrawContext::dof_lines, OVERLAY_ArmatureCallBuffersInner::dof_lines, blender::draw::overlay::Armatures::DrawContext::dof_sphere, OVERLAY_ArmatureCallBuffersInner::dof_sphere, ArmatureBoneDrawStrategy::draw_context_setup(), blender::draw::overlay::Armatures::DrawContext::draw_envelope_distance, blender::draw::overlay::Armatures::DrawContext::draw_mode, blender::draw::overlay::Armatures::DrawContext::draw_relation_from_head, bArmature::drawtype, blender::draw::overlay::Armatures::DrawContext::drawtype, DRW_state_is_select(), Object::dt, Object::dtx, OVERLAY_PrivateData::extra_call_buffers, blender::draw::overlay::Armatures::DrawContext::extras, bArmature::flag, blender::draw::overlay::Armatures::DrawContext::ob, OB_DRAW_IN_FRONT, OB_SOLID, OVERLAY_ArmatureCallBuffersInner::point_fill, blender::draw::overlay::Armatures::DrawContext::point_outline, OVERLAY_ArmatureCallBuffersInner::point_outline, blender::draw::overlay::Armatures::DrawContext::point_solid, blender::draw::overlay::Armatures::DrawContext::show_relations, OVERLAY_PrivateData::show_relations, OVERLAY_ArmatureCallBuffers::solid, strategy_for_armature_drawtype(), OVERLAY_ArmatureCallBuffers::transp, OVERLAY_PrivateData::transparent, OVERLAY_PrivateData::v3d_flag, and V3D_SELECT_OUTLINE.
Referenced by OVERLAY_armature_cache_populate(), OVERLAY_edit_armature_cache_populate(), and OVERLAY_pose_armature_cache_populate().
Definition at line 1503 of file overlay_armature.cc.
References mul_v3_fl(), and mul_v3_v3v3().
Referenced by draw_points(), and get_bone_hint_color().
|
static |
Definition at line 581 of file overlay_armature.cc.
Referenced by draw_bone_degrees_of_freedom().
|
static |
Definition at line 1417 of file overlay_armature.cc.
References DRW_Global::block, GlobalsUboStorage::color_bone_locked, G_draw, and interp_v3_v3v3().
Referenced by get_bone_solid_color(), and get_bone_wire_color().
Definition at line 1288 of file overlay_armature.cc.
Referenced by use_bone_color().
| BLI_INLINE DRWCallBuffer * custom_bone_instance_shgroup | ( | const Armatures::DrawContext * | ctx, |
| DRWShadingGroup * | grp, | ||
| blender::gpu::Batch * | custom_geom ) |
Definition at line 862 of file overlay_armature.cc.
References BLI_ghash_insert(), BLI_ghash_lookup(), blender::draw::overlay::Armatures::DrawContext::custom_shapes_ghash, DRW_shgroup_call_buffer_instance(), OVERLAY_InstanceFormats::instance_bone, and OVERLAY_shader_instance_formats_get().
Referenced by drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), and drw_shgroup_custom_bone_curve().
|
static |
Definition at line 1783 of file overlay_armature.cc.
References ARM_NO_CUSTOM, UnifiedBonePtr::as_posebone(), bArmature::axes_position, DRW_Global::block, bPoseChannel::bone, BONE_SELECTED, col, GlobalsUboStorage::color_text, GlobalsUboStorage::color_text_hi, blender::draw::overlay::Armatures::DrawContext::const_color, copy_m4_m4(), copy_v4_v4(), bPoseChannel::custom, bPoseChannel::custom_tx, UnifiedBonePtr::disp_mat(), drw_shgroup_bone_axes(), bArmature::flag, UnifiedBonePtr::flag(), G_draw, UnifiedBonePtr::is_posebone(), Bone::length, length(), bPoseChannel::pose_mat, rescale_m4(), and translate_m4().
Referenced by blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 2095 of file overlay_armature.cc.
References blender::draw::overlay::Armatures::DrawContext::draw_relation_from_head, and drw_shgroup_bone_relationship_lines().
Referenced by draw_bone_relations().
|
static |
Definition at line 1922 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), bPoseChannel::bone, blender::draw::overlay::Armatures::DrawContext::bone_buf, BONE_IK_XLIMIT, BONE_IK_ZLIMIT, bone_instance_data_set_angle_minmax(), Bone::bone_mat, copy_m4_m4(), copy_v4_fl4(), data, blender::draw::overlay::Armatures::DrawContext::dof_lines, blender::draw::overlay::Armatures::DrawContext::dof_sphere, DRW_buffer_add_entry, bPoseChannel::ikflag, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), Bone::length, bPoseChannel::limitmax, bPoseChannel::limitmin, BoneInstanceData::mat44, mul_m4_m4m3(), mul_m4_m4m4(), blender::draw::overlay::Armatures::DrawContext::ob, bPoseChannel::parent, bPoseChannel::pose_mat, scale_m4_fl(), blender::draw::select::SelectMap::select_invalid_id(), sinf, bPoseChannel::size, translate_m4(), unit_m4(), and zero_v3().
Referenced by blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 2142 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_POSE, BONE_SELECTED, blender::draw::overlay::Armatures::DrawContext::draw_mode, DRW_text_cache_add(), DRW_text_cache_ensure(), DRW_TEXT_CACHE_GLOBALSPACE, DRW_TEXT_CACHE_STRING_PTR, EditBone::flag, UnifiedBonePtr::get(), EditBone::head, UnifiedBonePtr::is_posebone(), mid_v3_v3v3(), mul_m4_v3(), bPoseChannel::name, EditBone::name, blender::draw::overlay::Armatures::DrawContext::ob, bPoseChannel::pose_head, bPoseChannel::pose_tail, EditBone::tail, TH_TEXT, TH_TEXT_HI, and UI_GetThemeColor4ubv().
Referenced by blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 2108 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_EDIT, blender::draw::overlay::ARM_DRAW_MODE_POSE, UnifiedBonePtr::as_editbone(), UnifiedBonePtr::as_posebone(), BONE_SELECTED, bPoseChannel::constflag, blender::draw::overlay::Armatures::DrawContext::do_relations, draw_bone_bone_relationship_line(), blender::draw::overlay::Armatures::DrawContext::draw_mode, EditBone::head, bPoseChannel::parent, EditBone::parent, pchan_draw_ik_lines(), PCHAN_HAS_IK, PCHAN_HAS_SPLINEIK, bPoseChannel::pose_head, bPoseChannel::pose_tail, ArmatureBoneDrawStrategy::should_draw_relation_to_parent(), and EditBone::tail.
Referenced by blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 1711 of file overlay_armature.cc.
References UnifiedBonePtr::as_editbone(), UnifiedBonePtr::as_posebone(), bPoseChannelDrawData::bbone_matrix, BKE_pchan_bbone_spline_setup(), bPoseChannel::bone, EditBone::disp_bbone_mat, draw_bone_update_disp_matrix_default(), bPoseChannel::draw_data, ebone_spline_preview(), ED_armature_ebone_to_mat4(), float, EditBone::head, UnifiedBonePtr::is_posebone(), len_v3v3(), Bone::length, EditBone::length, length(), Mat4::mat, mul_m4_m4m4(), bPoseChannel::pose_mat, Bone::segments, EditBone::segments, size_to_mat4(), EditBone::tail, Bone::xwidth, EditBone::xwidth, Bone::zwidth, and EditBone::zwidth.
Referenced by ArmatureBoneDrawStrategyBBone::update_display_matrix(), and ArmatureBoneDrawStrategyWire::update_display_matrix().
|
static |
Definition at line 1549 of file overlay_armature.cc.
References UnifiedBonePtr::as_editbone(), UnifiedBonePtr::as_posebone(), bPoseChannel::bone, copy_m4_m4(), copy_v3_fl(), UnifiedBonePtr::disp_mat(), UnifiedBonePtr::disp_tail_mat(), ED_armature_ebone_to_mat4(), float, EditBone::head, UnifiedBonePtr::is_posebone(), len_v3v3(), Bone::length, EditBone::length, bPoseChannel::pose_mat, rescale_m4(), EditBone::tail, and translate_m4().
Referenced by draw_bone_update_disp_matrix_bbone(), ArmatureBoneDrawStrategyEmpty::update_display_matrix(), ArmatureBoneDrawStrategyEnvelope::update_display_matrix(), ArmatureBoneDrawStrategyLine::update_display_matrix(), and ArmatureBoneDrawStrategyOcta::update_display_matrix().
|
static |
Definition at line 1816 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_EDIT, blender::draw::overlay::ARM_DRAW_MODE_POSE, ARM_ENVELOPE, UnifiedBonePtr::as_editbone(), DRW_Global::block, BONE_CONNECTED, bone_hint_color_shade(), BONE_ROOTSEL, BONE_TIPSEL, BONESEL_ROOT, BONESEL_TIP, GlobalsUboStorage::color_bone_solid, GlobalsUboStorage::color_vertex, GlobalsUboStorage::color_vertex_select, blender::draw::overlay::Armatures::DrawContext::const_color, copy_v3_v3(), copy_v4_v4(), UnifiedBonePtr::disp_mat(), UnifiedBonePtr::disp_tail_mat(), blender::draw::overlay::Armatures::DrawContext::draw_mode, blender::draw::overlay::Armatures::DrawContext::drawtype, DRW_select_load_id(), drw_shgroup_bone_envelope(), drw_shgroup_bone_sphere(), EditBone::flag, G_draw, get_bone_wire_color(), get_bone_wire_thickness(), UnifiedBonePtr::has_parent(), blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), UnifiedBonePtr::rad_head(), and UnifiedBonePtr::rad_tail().
Referenced by annotation_draw_stroke_2d(), annotation_draw_stroke_3d(), annotation_draw_stroke_buffer(), ArmatureBoneDrawStrategyBBone::draw_bone(), ArmatureBoneDrawStrategyEnvelope::draw_bone(), ArmatureBoneDrawStrategyOcta::draw_bone(), and ArmatureBoneDrawStrategyWire::draw_bone().
|
static |
Definition at line 1194 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, data, blender::draw::overlay::Armatures::DrawContext::extras, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), blender::draw::overlay::Armatures::DrawContext::ob, OB_ARROWS, blender::draw::overlay::Armatures::DrawContext::ob_ref, OVERLAY_empty_shape(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::select::SelectMap::select_id().
Referenced by draw_axes().
|
static |
Definition at line 638 of file overlay_armature.cc.
References DRW_buffer_add_entry_struct(), BoneInstanceData::mat, mul_m4_m4m4(), blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::outline, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), and blender::draw::overlay::Armatures::DrawContext::solid.
Referenced by ArmatureBoneDrawStrategyBBone::draw_bone().
|
static |
Definition at line 1084 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::ShapeCache::arrows, BLI_assert, blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::overlay::ShapeCache::circle, blender::draw::overlay::ShapeCache::cube, blender::draw::overlay::ShapeCache::empty_cone, blender::draw::overlay::ShapeCache::empty_sphere, blender::draw::overlay::Armatures::DrawContext::extras, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, OB_ARROWS, OB_CIRCLE, OB_CUBE, OB_EMPTY_CONE, OB_EMPTY_IMAGE, OB_EMPTY_SPHERE, OB_PLAINAXES, OB_SINGLE_ARROW, OVERLAY_empty_shape(), blender::draw::overlay::ShapeCache::plain_axes, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), BoneInstanceData::set_color(), BoneInstanceData::set_hint_color(), blender::draw::overlay::Armatures::DrawContext::shapes, blender::draw::overlay::ShapeCache::single_arrow, UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by ArmatureBoneDrawStrategyCustomShape::draw_bone().
|
static |
Definition at line 947 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, custom_bone_instance_shgroup(), blender::draw::overlay::Armatures::DrawContext::custom_wire, drw_batch_cache_generate_requested_delayed(), DRW_buffer_add_entry_struct(), blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), BoneInstanceData::mat, BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, BoneInstanceData::set_color(), BoneInstanceData::set_hint_color(), UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by drw_shgroup_bone_custom_wire().
|
static |
Definition at line 1026 of file overlay_armature.cc.
References BKE_object_get_evaluated_mesh_no_subsurf_unchecked(), drw_shgroup_bone_custom_solid_mesh(), drw_shgroup_custom_bone_curve(), ELEM, OB_CURVES_LEGACY, OB_FONT, and OB_SURF.
Referenced by ArmatureBoneDrawStrategyCustomShape::draw_bone().
|
static |
Definition at line 877 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, custom_bone_instance_shgroup(), blender::draw::overlay::Armatures::DrawContext::custom_outline, blender::draw::overlay::Armatures::DrawContext::custom_solid, blender::draw::overlay::Armatures::DrawContext::custom_wire, drw_batch_cache_generate_requested_delayed(), DRW_buffer_add_entry_struct(), blender::draw::overlay::Armatures::DrawContext::is_filled, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), BoneInstanceData::mat, BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, BoneInstanceData::set_color(), BoneInstanceData::set_hint_color(), UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by drw_shgroup_bone_custom_solid().
|
static |
Definition at line 1064 of file overlay_armature.cc.
References BKE_object_get_evaluated_mesh_no_subsurf_unchecked(), drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_custom_bone_curve(), ELEM, OB_CURVES_LEGACY, OB_FONT, and OB_SURF.
Referenced by ArmatureBoneDrawStrategyCustomShape::draw_bone().
|
static |
Definition at line 726 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, clamp_f(), copy_v3_v3(), copy_v4_v4(), DRW_buffer_add_entry, DRW_buffer_add_entry_struct(), blender::draw::overlay::Armatures::DrawContext::envelope_outline, blender::draw::overlay::Armatures::DrawContext::envelope_solid, interp_v4_v4v4(), blender::draw::overlay::Armatures::DrawContext::is_filled, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), len, len_v3v3(), BoneInstanceData::mat, BoneInstanceData::mat44, mat4_to_scale(), max_ff(), mul_m4_v4(), blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), blender::draw::overlay::Armatures::DrawContext::point_outline, blender::draw::overlay::Armatures::DrawContext::point_solid, PT_DEFAULT_RAD, blender::draw::overlay::Armatures::DrawContext::res, scale_m4_fl(), blender::draw::select::SelectMap::select_id(), and blender::draw::select::SelectMap::select_invalid_id().
Referenced by ArmatureBoneDrawStrategyEnvelope::draw_bone(), and draw_points().
|
static |
Definition at line 690 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::overlay::Armatures::DrawContext::draw_envelope_distance, DRW_buffer_add_entry, blender::draw::overlay::Armatures::DrawContext::envelope_distance, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), mat4_to_scale(), mul_m4_v4(), blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::select::SelectMap::select_invalid_id(), and sub_v3_v3().
Referenced by ArmatureBoneDrawStrategyEnvelope::draw_bone().
|
static |
Definition at line 1241 of file overlay_armature.cc.
References DRW_Global::block, GlobalsUboStorage::color_bone_ik_line, drw_shgroup_bone_relationship_lines_ex(), and G_draw.
Referenced by pchan_draw_ik_lines().
|
static |
Definition at line 1248 of file overlay_armature.cc.
References DRW_Global::block, GlobalsUboStorage::color_bone_ik_line_no_target, drw_shgroup_bone_relationship_lines_ex(), and G_draw.
Referenced by pchan_draw_ik_lines().
|
static |
Definition at line 1256 of file overlay_armature.cc.
References DRW_Global::block, GlobalsUboStorage::color_bone_ik_line_spline, drw_shgroup_bone_relationship_lines_ex(), and G_draw.
Referenced by pchan_draw_ik_lines().
|
static |
Definition at line 618 of file overlay_armature.cc.
References DRW_buffer_add_entry_struct(), BoneInstanceData::mat, mul_m4_m4m4(), blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::outline, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), and blender::draw::overlay::Armatures::DrawContext::solid.
Referenced by ArmatureBoneDrawStrategyOcta::draw_bone().
|
static |
Definition at line 1234 of file overlay_armature.cc.
References DRW_Global::block, GlobalsUboStorage::color_wire, drw_shgroup_bone_relationship_lines_ex(), and G_draw.
Referenced by draw_bone_bone_relationship_line().
|
static |
Definition at line 1214 of file overlay_armature.cc.
References blender::draw::overlay::LinePrimitiveBuf::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::overlay::Armatures::DrawContext::extras, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), blender::draw::overlay::Armatures::DrawContext::ob, OVERLAY_extra_line_dashed(), and blender::math::transform_point().
Referenced by drw_shgroup_bone_ik_lines(), drw_shgroup_bone_ik_no_target_lines(), drw_shgroup_bone_ik_spline_lines(), and drw_shgroup_bone_relationship_lines().
|
static |
Definition at line 1156 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, DRW_buffer_add_entry_struct(), blender::draw::overlay::Armatures::DrawContext::is_filled, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), blender::draw::overlay::Armatures::DrawContext::point_outline, blender::draw::overlay::Armatures::DrawContext::point_solid, blender::draw::overlay::Armatures::DrawContext::res, blender::draw::select::SelectMap::select_id(), and blender::draw::select::SelectMap::select_invalid_id().
Referenced by draw_points().
|
static |
Definition at line 659 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, DRW_buffer_add_entry, blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), blender::MatBase< T, NumCol, NumRow, Alignment >::location(), blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, blender::draw::overlay::Armatures::DrawContext::res, blender::draw::select::SelectMap::select_id(), blender::draw::overlay::Armatures::DrawContext::stick, blender::math::transform_point(), and blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis().
Referenced by ArmatureBoneDrawStrategyLine::draw_bone().
|
static |
Definition at line 982 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, custom_bone_instance_shgroup(), blender::draw::overlay::Armatures::DrawContext::custom_wire, drw_batch_cache_generate_requested_delayed(), DRW_buffer_add_entry_struct(), DRW_cache_curve_edge_wire_get(), DRW_cache_text_edge_wire_get(), blender::draw::overlay::Armatures::DrawContext::is_overlay_next(), BoneInstanceData::mat, BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, OB_FONT, BoneInstanceData::set_color(), BoneInstanceData::set_hint_color(), UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by drw_shgroup_bone_custom_solid(), and drw_shgroup_bone_custom_wire().
|
static |
Definition at line 1595 of file overlay_armature.cc.
References add_v3_v3v3(), BBONE_ADD_PARENT_END_ROLL, EditBone::bbone_child, EditBone::bbone_flag, BBONE_HANDLE_AUTO, BBONE_HANDLE_RELATIVE, BBONE_HANDLE_TANGENT, EditBone::bbone_next, EditBone::bbone_next_type, EditBone::bbone_prev, EditBone::bbone_prev_type, BBONE_SCALE_EASING, BKE_pchan_bbone_spline_compute(), BONE_CONNECTED, copy_v3_fl3(), copy_v3_v3(), BBoneSplineParameters::curve_in_x, EditBone::curve_in_x, BBoneSplineParameters::curve_in_z, EditBone::curve_in_z, BBoneSplineParameters::curve_out_x, EditBone::curve_out_x, BBoneSplineParameters::curve_out_z, EditBone::curve_out_z, BBoneSplineParameters::ease1, EditBone::ease1, BBoneSplineParameters::ease2, EditBone::ease2, ED_armature_ebone_to_mat4(), EditBone::flag, EditBone::head, invert_m4(), BBoneSplineParameters::length, EditBone::length, mul_m4_m4m4(), mul_v3_m4v3(), next, BBoneSplineParameters::next_bbone, BBoneSplineParameters::next_h, BBoneSplineParameters::next_mat, EditBone::parent, BBoneSplineParameters::prev_bbone, BBoneSplineParameters::prev_h, BBoneSplineParameters::prev_mat, BBoneSplineParameters::roll1, EditBone::roll1, BBoneSplineParameters::roll2, EditBone::roll2, BBoneSplineParameters::scale_in, EditBone::scale_in, BBoneSplineParameters::scale_out, EditBone::scale_out, BBoneSplineParameters::segments, EditBone::segments, sub_v3_v3v3(), EditBone::tail, BBoneSplineParameters::use_next, BBoneSplineParameters::use_prev, and zero_v3().
Referenced by draw_bone_update_disp_matrix_bbone().
|
static |
Definition at line 1581 of file overlay_armature.cc.
References BONE_CONNECTED, bArmature::edbo, and LISTBASE_FOREACH.
Referenced by blender::draw::overlay::Armatures::draw_armature_edit().
Definition at line 594 of file overlay_armature.cc.
References b, CLAMP, and float.
Referenced by OVERLAY_bone_instance_data_set_color(), and OVERLAY_bone_instance_data_set_color_hint().
|
static |
Definition at line 1512 of file overlay_armature.cc.
References DRW_Global::block, bone_hint_color_shade(), GlobalsUboStorage::color_bone_solid, blender::draw::overlay::Armatures::DrawContext::const_color, G_draw, and get_bone_wire_color().
Referenced by ArmatureBoneDrawStrategyBBone::draw_bone(), ArmatureBoneDrawStrategyCustomShape::draw_bone(), ArmatureBoneDrawStrategyEnvelope::draw_bone(), and ArmatureBoneDrawStrategyOcta::draw_bone().
|
static |
Definition at line 1424 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_POSE, blender::draw::overlay::Armatures::DrawContext::bcolor, DRW_Global::block, BONE_DRAW_LOCKED_WEIGHT, bone_locked_color_shade(), GlobalsUboStorage::color_bone_solid, blender::draw::overlay::Armatures::DrawContext::const_color, blender::draw::overlay::Armatures::DrawContext::draw_mode, G_draw, and get_pchan_color_solid().
Referenced by ArmatureBoneDrawStrategyCustomShape::draw_bone(), and get_bone_solid_with_consts_color().
|
static |
Definition at line 1441 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_POSE, blender::draw::overlay::Armatures::DrawContext::bcolor, DRW_Global::block, BONE_DRAW_LOCKED_WEIGHT, col, GlobalsUboStorage::color_bone_solid, blender::draw::overlay::Armatures::DrawContext::const_color, blender::draw::overlay::Armatures::DrawContext::draw_mode, G_draw, get_bone_solid_color(), and get_pchan_color_constraint().
Referenced by ArmatureBoneDrawStrategyBBone::draw_bone(), ArmatureBoneDrawStrategyEnvelope::draw_bone(), ArmatureBoneDrawStrategyLine::draw_bone(), ArmatureBoneDrawStrategyOcta::draw_bone(), and ArmatureBoneDrawStrategyWire::draw_bone().
|
static |
Definition at line 1472 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_EDIT, blender::draw::overlay::ARM_DRAW_MODE_OBJECT, blender::draw::overlay::ARM_DRAW_MODE_POSE, blender::draw::overlay::Armatures::DrawContext::bcolor, DRW_Global::block, BONE_DRAW_LOCKED_WEIGHT, bone_locked_color_shade(), GlobalsUboStorage::color_vertex, blender::draw::overlay::Armatures::DrawContext::const_color, copy_v3_v3(), blender::draw::overlay::Armatures::DrawContext::draw_mode, G_draw, get_bone_wire_thickness(), and get_pchan_color_wire().
Referenced by ArmatureBoneDrawStrategyBBone::draw_bone(), ArmatureBoneDrawStrategyCustomShape::draw_bone(), ArmatureBoneDrawStrategyEnvelope::draw_bone(), ArmatureBoneDrawStrategyLine::draw_bone(), ArmatureBoneDrawStrategyOcta::draw_bone(), ArmatureBoneDrawStrategyWire::draw_bone(), draw_points(), and get_bone_hint_color().
|
static |
Definition at line 1460 of file overlay_armature.cc.
References BONE_DRAW_ACTIVE, BONE_SELECTED, blender::draw::overlay::Armatures::DrawContext::const_color, and blender::draw::overlay::Armatures::DrawContext::const_wire.
Referenced by draw_points(), and get_bone_wire_color().
|
static |
Definition at line 1376 of file overlay_armature.cc.
References DRW_Global::block, GlobalsUboStorage::color_bone_pose_constraint, GlobalsUboStorage::color_bone_pose_ik, GlobalsUboStorage::color_bone_pose_no_target, GlobalsUboStorage::color_bone_pose_spline_ik, UnifiedBonePtr::constflag(), ThemeWireColor::flag, G_draw, get_pchan_color_solid(), interp_v4_v4v4(), PCHAN_HAS_CONST, PCHAN_HAS_IK, PCHAN_HAS_NO_TARGET, PCHAN_HAS_SPLINEIK, and TH_WIRECOLOR_CONSTCOLS.
Referenced by get_bone_solid_with_consts_color().
|
static |
Definition at line 1365 of file overlay_armature.cc.
References DRW_Global::block, GlobalsUboStorage::color_bone_solid, copy_v4_v4(), G_draw, ThemeWireColor::solid, and use_bone_color().
Referenced by get_bone_solid_color(), and get_pchan_color_constraint().
|
static |
Definition at line 1323 of file overlay_armature.cc.
References ThemeWireColor::active, blender::draw::overlay::ARM_DRAW_MODE_EDIT, DRW_Global::block, BONE_DRAW_ACTIVE, BONE_SELECTED, GlobalsUboStorage::color_bone_active, GlobalsUboStorage::color_bone_active_unsel, GlobalsUboStorage::color_bone_pose, GlobalsUboStorage::color_bone_pose_active, GlobalsUboStorage::color_bone_pose_active_unsel, GlobalsUboStorage::color_bone_select, GlobalsUboStorage::color_wire, GlobalsUboStorage::color_wire_edit, copy_v4_v4(), G_draw, ThemeWireColor::select, ThemeWireColor::solid, and use_bone_color().
Referenced by get_bone_wire_color().
| void OVERLAY_armature_cache_finish | ( | OVERLAY_Data * | vedata | ) |
Definition at line 3257 of file overlay_armature.cc.
References OVERLAY_PrivateData::armature_call_buffers, BLI_ghash_free(), OVERLAY_ArmatureCallBuffersInner::custom_shapes_ghash, OVERLAY_StorageList::pd, OVERLAY_ArmatureCallBuffers::solid, OVERLAY_Data::stl, and OVERLAY_ArmatureCallBuffers::transp.
Referenced by OVERLAY_cache_finish().
| void OVERLAY_armature_cache_init | ( | OVERLAY_Data * | vedata | ) |
Definition at line 273 of file overlay_armature.cc.
References OVERLAY_PrivateData::armature, OVERLAY_PrivateData::armature_bone_select_act_grp, OVERLAY_PrivateData::armature_bone_select_grp, OVERLAY_PassList::armature_bone_select_ps, OVERLAY_PrivateData::armature_call_buffers, OVERLAY_PassList::armature_ps, OVERLAY_PassList::armature_transp_ps, BLI_ghash_ptr_new(), DRW_Global::block_ubo, View3DOverlay::bone_wire_alpha, OVERLAY_ArmatureCallBuffersInner::box_fill, OVERLAY_ArmatureCallBuffersInner::box_outline, BUF_INSTANCE, BUF_LINE, OVERLAY_PrivateData::clipping_state, OVERLAY_ArmatureCallBuffersInner::custom_fill, OVERLAY_ArmatureCallBuffersInner::custom_outline, OVERLAY_ArmatureCallBuffersInner::custom_shapes_ghash, OVERLAY_ArmatureCallBuffersInner::custom_wire, DefaultTextureList::depth, OVERLAY_PrivateData::do_pose_fade_geom, OVERLAY_PrivateData::do_pose_xray, OVERLAY_ArmatureCallBuffersInner::dof_lines, OVERLAY_ArmatureCallBuffersInner::dof_sphere, DRW_cache_bone_box_get(), DRW_cache_bone_box_wire_get(), DRW_cache_bone_dof_lines_get(), DRW_cache_bone_dof_sphere_get(), DRW_cache_bone_envelope_outline_get(), DRW_cache_bone_envelope_solid_get(), DRW_cache_bone_octahedral_get(), DRW_cache_bone_octahedral_wire_get(), DRW_cache_bone_point_get(), DRW_cache_bone_point_wire_outline_get(), DRW_cache_bone_stick_get(), DRW_context_state_get(), DRW_PASS_CREATE, DRW_shgroup_create(), DRW_shgroup_state_disable(), DRW_shgroup_state_enable(), DRW_shgroup_uniform_block, DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_float_copy(), DRW_shgroup_uniform_texture_ref(), DRW_shgroup_uniform_vec4_copy(), DRW_STATE_BLEND_ADD, DRW_STATE_BLEND_ALPHA, DRW_STATE_CULL_BACK, DRW_STATE_CULL_FRONT, DRW_STATE_DEPTH_EQUAL, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_IN_FRONT_SELECT, DRW_state_is_select(), DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, DRW_viewport_texture_list_get(), OVERLAY_ArmatureCallBuffersInner::envelope_distance, OVERLAY_ArmatureCallBuffersInner::envelope_fill, OVERLAY_ArmatureCallBuffersInner::envelope_outline, View3D::flag, View3DOverlay::flag, G_draw, OVERLAY_InstanceFormats::instance_bone, OVERLAY_InstanceFormats::instance_bone_envelope, OVERLAY_InstanceFormats::instance_bone_envelope_distance, OVERLAY_InstanceFormats::instance_bone_envelope_outline, OVERLAY_InstanceFormats::instance_bone_stick, OVERLAY_InstanceFormats::instance_extra, OB_MODE_WEIGHT_PAINT, OB_WIRE, DRWContextState::object_mode, DRWContextState::object_pose, OVERLAY_ArmatureCallBuffersInner::octa_fill, OVERLAY_ArmatureCallBuffersInner::octa_outline, OVERLAY_PrivateData::overlay, OVERLAY_shader_armature_degrees_of_freedom_solid(), OVERLAY_shader_armature_degrees_of_freedom_wire(), OVERLAY_shader_armature_envelope(), OVERLAY_shader_armature_shape(), OVERLAY_shader_armature_shape_wire(), OVERLAY_shader_armature_sphere(), OVERLAY_shader_armature_stick(), OVERLAY_shader_armature_wire(), OVERLAY_shader_instance_formats_get(), OVERLAY_shader_uniform_color(), OVERLAY_StorageList::pd, OVERLAY_ArmatureCallBuffersInner::point_fill, OVERLAY_ArmatureCallBuffersInner::point_outline, OVERLAY_InstanceFormats::pos_color, powf, OVERLAY_Data::psl, View3D::shading, OVERLAY_PrivateData::show_relations, OVERLAY_ArmatureCallBuffers::solid, state, OVERLAY_ArmatureCallBuffersInner::stick, OVERLAY_Data::stl, OVERLAY_ArmatureCallBuffers::transp, OVERLAY_PrivateData::transparent, View3DShading::type, USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE, DRWContextState::v3d, V3D_HIDE_HELPLINES, V3D_OVERLAY_BONE_SELECT, OVERLAY_ArmatureCallBuffersInner::wire, View3DOverlay::xray_alpha_bone, and XRAY_FLAG_ENABLED.
Referenced by OVERLAY_cache_init().
| void OVERLAY_armature_cache_populate | ( | OVERLAY_Data * | vedata, |
| Object * | ob ) |
Definition at line 3208 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_OBJECT, armature_context_setup(), blender::draw::overlay::Armatures::draw_armature_pose(), DRW_context_state_get(), DRW_object_wire_theme_get(), Object::dt, OB_BOUNDBOX, OVERLAY_StorageList::pd, OVERLAY_Data::stl, and DRWContextState::view_layer.
Referenced by OVERLAY_cache_populate().
| void OVERLAY_armature_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 3270 of file overlay_armature.cc.
References OVERLAY_PassList::armature_ps, OVERLAY_PassList::armature_transp_ps, DRW_draw_pass(), and OVERLAY_Data::psl.
Referenced by OVERLAY_draw_scene().
| void OVERLAY_armature_in_front_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 3278 of file overlay_armature.cc.
References OVERLAY_PassList::armature_bone_select_ps, OVERLAY_PassList::armature_ps, OVERLAY_PassList::armature_transp_ps, DRW_draw_pass(), DRW_state_is_select(), and OVERLAY_Data::psl.
Referenced by OVERLAY_draw_scene().
| bool OVERLAY_armature_is_pose_mode | ( | Object * | ob, |
| const DRWContextState * | draw_ctx ) |
Return true if armature should be handled by the pose mode engine.
Definition at line 252 of file overlay_armature.cc.
References Object::mode, OB_MODE_ALL_WEIGHT_PAINT, OB_MODE_POSE, DRWContextState::obact, DRWContextState::object_mode, and DRWContextState::object_pose.
Referenced by OVERLAY_cache_populate(), OVERLAY_motion_path_cache_populate(), and POSE_is_driven_by_active_armature().
| void OVERLAY_bone_instance_data_set_color | ( | BoneInstanceData * | data, |
| const float | bone_color[4] ) |
Definition at line 608 of file overlay_armature.cc.
References encode_2f_to_float().
Referenced by drw_shgroup_bone_box(), drw_shgroup_bone_envelope(), drw_shgroup_bone_octahedral(), drw_shgroup_bone_sphere(), and metaball_instance_data_set().
| void OVERLAY_bone_instance_data_set_color_hint | ( | BoneInstanceData * | data, |
| const float | hint_color[4] ) |
Definition at line 601 of file overlay_armature.cc.
References encode_2f_to_float().
Referenced by drw_shgroup_bone_box(), drw_shgroup_bone_envelope(), drw_shgroup_bone_octahedral(), and drw_shgroup_bone_sphere().
| void OVERLAY_edit_armature_cache_populate | ( | OVERLAY_Data * | vedata, |
| Object * | ob ) |
Definition at line 3192 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_EDIT, armature_context_setup(), blender::draw::overlay::Armatures::draw_armature_edit(), OVERLAY_StorageList::pd, and OVERLAY_Data::stl.
Referenced by OVERLAY_cache_populate().
| void OVERLAY_pose_armature_cache_populate | ( | OVERLAY_Data * | vedata, |
| Object * | ob ) |
Definition at line 3200 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_POSE, armature_context_setup(), blender::draw::overlay::Armatures::draw_armature_pose(), OVERLAY_StorageList::pd, and OVERLAY_Data::stl.
Referenced by OVERLAY_cache_populate().
| void OVERLAY_pose_cache_populate | ( | OVERLAY_Data * | vedata, |
| Object * | ob ) |
Definition at line 3242 of file overlay_armature.cc.
References OVERLAY_PrivateData::armature_bone_select_act_grp, OVERLAY_PrivateData::armature_bone_select_grp, DRW_cache_object_surface_get(), DRW_shgroup_call, OVERLAY_StorageList::pd, POSE_is_driven_by_active_armature(), and OVERLAY_Data::stl.
Referenced by OVERLAY_cache_populate().
| void OVERLAY_pose_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 3288 of file overlay_armature.cc.
References OVERLAY_PassList::armature_bone_select_ps, OVERLAY_PassList::armature_ps, OVERLAY_PassList::armature_transp_ps, DRW_draw_pass(), DRW_state_is_fbo(), OVERLAY_Data::fbl, GPU_framebuffer_bind(), GPU_framebuffer_clear_depth(), OVERLAY_FramebufferList::overlay_default_fb, OVERLAY_FramebufferList::overlay_line_in_front_fb, and OVERLAY_Data::psl.
Referenced by OVERLAY_draw_scene().
|
static |
Definition at line 2192 of file overlay_armature.cc.
References BKE_pchan_minmax(), BoundSphere::center, INIT_MINMAX, len_v3v3(), mid_v3_v3v3(), min, and BoundSphere::radius.
Referenced by ArmatureBoneDrawStrategyEnvelope::culling_test(), pchan_culling_test_simple(), and pchan_culling_test_with_radius_scale().
|
static |
pchan intersect the view. (same for other "test" functions defined here). Definition at line 2207 of file overlay_armature.cc.
References DRW_culling_sphere_test(), and pchan_culling_calc_bsphere().
Referenced by ArmatureBoneDrawStrategyCustomShape::culling_test(), and ArmatureBoneDrawStrategyWire::culling_test().
|
static |
Definition at line 2216 of file overlay_armature.cc.
References DRW_culling_sphere_test(), pchan_culling_calc_bsphere(), and BoundSphere::radius.
Referenced by ArmatureBoneDrawStrategyLine::culling_test(), and ArmatureBoneDrawStrategyOcta::culling_test().
|
static |
Definition at line 1534 of file overlay_armature.cc.
References bPoseChannelDrawData::bbone_matrix_len, bPoseChannel::bone, bPoseChannel::draw_data, MEM_mallocN, MEM_SAFE_FREE, and Bone::segments.
Referenced by blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 2015 of file overlay_armature.cc.
References bPoseChannel::constflag, CONSTRAINT_IK_TEMP, CONSTRAINT_IK_TIP, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK, bPoseChannel::constraints, drw_shgroup_bone_ik_lines(), drw_shgroup_bone_ik_no_target_lines(), drw_shgroup_bone_ik_spline_lines(), LISTBASE_FOREACH, bPoseChannel::parent, PCHAN_HAS_NO_TARGET, bPoseChannel::pose_head, and bPoseChannel::pose_tail.
Referenced by draw_bone_relations().
|
static |
Definition at line 3224 of file overlay_armature.cc.
References BKE_modifiers_is_deformed_by_armature(), BKE_modifiers_is_deformed_by_meshdeform(), DRW_context_state_get(), OVERLAY_armature_is_pose_mode(), and POSE_is_driven_by_active_armature().
Referenced by OVERLAY_pose_cache_populate(), and POSE_is_driven_by_active_armature().
|
static |
Definition at line 1273 of file overlay_armature.cc.
References ARM_COL_CUSTOM, blender::draw::overlay::Armatures::DrawContext::bcolor, Object::data, UnifiedBonePtr::effective_bonecolor(), blender::animrig::BoneColor::effective_color(), bArmature::flag, and blender::draw::overlay::Armatures::DrawContext::ob.
Referenced by blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Return the armature bone drawing strategy for the given draw type.
Note that this does not consider custom bone shapes, as those can be set per bone. For those occasions just instance a ArmatureBoneDrawStrategyCustomShape and use that.
Definition at line 2901 of file overlay_armature.cc.
References ARM_B_BONE, ARM_ENVELOPE, ARM_LINE, ARM_OCTA, ARM_WIRE, and BLI_assert_unreachable.
Referenced by armature_context_setup(), blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Utility function to use a shaded version of one of the colors in 'bcolor'.
The r_color parameter is put first for consistency with copy_v4_v4(dest, src).
Definition at line 1309 of file overlay_armature.cc.
References copy_v3_v3_uchar(), cp_shade_color3ub(), rgba_uchar_to_float(), and srgb_to_linearrgb_v4().
Referenced by get_pchan_color_solid(), and get_pchan_color_wire().