|
Blender V5.0
|
#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 "DRW_render.hh"#include "BLI_listbase_wrapper.hh"#include "BLI_math_color.h"#include "BLI_math_matrix.h"#include "BLI_math_matrix_types.hh"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "BKE_action.hh"#include "BKE_armature.hh"#include "BKE_deform.hh"#include "BKE_object.hh"#include "DEG_depsgraph_query.hh"#include "ED_armature.hh"#include "ED_view3d.hh"#include "ANIM_armature.hh"#include "ANIM_bonecolor.hh"#include "UI_resources.hh"#include "draw_cache.hh"#include "draw_context_private.hh"#include "draw_manager_text.hh"#include "overlay_armature.hh"#include "draw_cache_impl.hh"Go to the source code of this file.
Classes | |
| class | UnifiedBonePtr |
Macros | |
| #define | PT_DEFAULT_RAD 0.05f /* radius of the point batch. */ |
Functions | |
Shading Groups | |
| 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) |
| 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 UniformData &theme, const ThemeWireColor *bcolor, const eArmatureDrawMode draw_mode, const eBone_Flag boneflag, float r_color[4]) |
| static void | get_pchan_color_solid (const UniformData &theme, const ThemeWireColor *bcolor, float r_color[4]) |
| static void | get_pchan_color_constraint (const UniformData &theme, const ThemeWireColor *bcolor, const UnifiedBonePtr bone, float r_color[4]) |
Drawing Color Helpers | |
| static void | bone_locked_color_shade (const UniformData &theme, 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 | draw_bone_update_disp_matrix_custom_shape (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) |
| static void | bone_draw_custom_shape (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id) |
| static void | bone_draw_octa (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id) |
| static void | bone_draw_line (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id) |
| static void | bone_draw_b_bone (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id) |
| static void | bone_draw_envelope (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id) |
| static void | bone_draw_wire (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id) |
| static void | bone_draw (const eArmature_Drawtype drawtype, const bool use_custom_shape, const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, 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 bool | should_draw_relation_to_parent (const UnifiedBonePtr bone, const eBone_Flag boneflag) |
| 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 UnifiedBonePtr bone, const eBone_Flag boneflag) |
| static void | draw_bone_name (const Armatures::DrawContext *ctx, const UnifiedBonePtr bone) |
Main Draw Loops | |
| static void | bone_draw_update_display_matrix (const eArmature_Drawtype drawtype, const bool use_custom_shape, UnifiedBonePtr bone) |
| #define PT_DEFAULT_RAD 0.05f /* radius of the point batch. */ |
Definition at line 52 of file overlay_armature.cc.
Referenced by drw_shgroup_bone_envelope().
|
static |
Definition at line 1575 of file overlay_armature.cc.
References ARM_DRAW_TYPE_B_BONE, ARM_DRAW_TYPE_ENVELOPE, ARM_DRAW_TYPE_OCTA, ARM_DRAW_TYPE_STICK, ARM_DRAW_TYPE_WIRE, BLI_assert_unreachable, bone_draw_b_bone(), bone_draw_custom_shape(), bone_draw_envelope(), bone_draw_line(), bone_draw_octa(), and bone_draw_wire().
Referenced by blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 1456 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::ARM_DRAW_MODE_EDIT, UnifiedBonePtr::as_editbone(), UnifiedBonePtr::as_posebone(), bPoseChannelDrawData::bbone_matrix, bPoseChannel::bone, blender::draw::overlay::Armatures::DrawContext::bone_buf, BONESEL_BONE, EditBone::disp_bbone_mat, bPoseChannel::draw_data, blender::draw::overlay::Armatures::DrawContext::draw_mode, draw_points(), get_bone_hint_color(), get_bone_solid_with_consts_color(), get_bone_wire_color(), blender::draw::overlay::Armatures::DrawContext::is_filled, UnifiedBonePtr::is_posebone(), blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, blender::draw::overlay::Armatures::DrawContext::res, Bone::segments, EditBone::segments, and blender::draw::select::SelectMap::select_id().
Referenced by bone_draw().
|
static |
Definition at line 1331 of file overlay_armature.cc.
References UnifiedBonePtr::as_posebone(), BONE_DRAW_LOCKED_WEIGHT, BONE_DRAWWIRE, BONESEL_BONE, bPoseChannel::custom, bPoseChannel::custom_shape_wire_width, UnifiedBonePtr::disp_mat(), drw_shgroup_bone_custom_empty(), drw_shgroup_bone_custom_solid(), drw_shgroup_bone_custom_wire(), Object::empty_drawtype, float, get_bone_hint_color(), get_bone_solid_color(), get_bone_wire_color(), OB_EMPTY, OB_EMPTY_IMAGE, blender::draw::overlay::Armatures::DrawContext::ob_ref, blender::draw::overlay::Armatures::DrawContext::res, blender::draw::select::SelectMap::select_id(), and Object::type.
Referenced by bone_draw().
|
static |
Definition at line 1494 of file overlay_armature.cc.
References UnifiedBonePtr::as_editbone(), UnifiedBonePtr::as_posebone(), bPoseChannel::bone, BONE_CONNECTED, BONE_NO_DEFORM, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONESEL_BONE, UnifiedBonePtr::disp_mat(), Bone::dist, EditBone::dist, distance(), draw_points(), drw_shgroup_bone_envelope(), drw_shgroup_bone_envelope_distance(), get_bone_hint_color(), get_bone_solid_with_consts_color(), get_bone_wire_color(), UnifiedBonePtr::is_editbone(), bPoseChannel::parent, EditBone::parent, Bone::rad_head, EditBone::rad_head, Bone::rad_tail, and EditBone::rad_tail.
Referenced by bone_draw().
|
static |
Definition at line 1391 of file overlay_armature.cc.
References BONE_CONNECTED, BONE_ROOTSEL, BONE_TIPSEL, BONESEL_BONE, BONESEL_ROOT, BONESEL_TIP, UniformData::colors, blender::draw::overlay::Armatures::DrawContext::const_color, UnifiedBonePtr::disp_mat(), drw_shgroup_bone_stick(), UnifiedBonePtr::flag(), get_bone_solid_with_consts_color(), get_bone_wire_color(), UnifiedBonePtr::has_parent(), UnifiedBonePtr::is_editbone(), blender::draw::overlay::Armatures::DrawContext::res, blender::draw::overlay::Resources::theme, and ThemeColors::vert_select.
Referenced by bone_draw().
|
static |
Definition at line 1369 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, BONESEL_BONE, UnifiedBonePtr::disp_mat(), draw_points(), get_bone_hint_color(), get_bone_solid_with_consts_color(), get_bone_wire_color(), blender::draw::overlay::Armatures::DrawContext::is_filled, blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::select::SelectMap::select_id().
Referenced by bone_draw().
|
static |
Definition at line 1870 of file overlay_armature.cc.
References ARM_DRAW_TYPE_B_BONE, ARM_DRAW_TYPE_WIRE, draw_bone_update_disp_matrix_bbone(), draw_bone_update_disp_matrix_custom_shape(), draw_bone_update_disp_matrix_default(), and ELEM.
Referenced by blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 1538 of file overlay_armature.cc.
References blender::draw::overlay::LinePrimitiveBuf::append(), UnifiedBonePtr::as_editbone(), UnifiedBonePtr::as_posebone(), bPoseChannelDrawData::bbone_matrix, bPoseChannel::bone, blender::draw::overlay::Armatures::DrawContext::bone_buf, BONESEL_BONE, EditBone::disp_bbone_mat, bPoseChannel::draw_data, draw_points(), get_bone_solid_with_consts_color(), get_bone_wire_color(), UnifiedBonePtr::is_editbone(), UnifiedBonePtr::is_posebone(), 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, Bone::segments, EditBone::segments, blender::draw::select::SelectMap::select_id(), blender::draw::select::SelectMap::select_invalid_id(), transform_point(), and blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis().
Referenced by bone_draw().
Definition at line 902 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 813 of file overlay_armature.cc.
References ThemeColors::bone_locked, UniformData::colors, and interp_v3_v3v3().
Referenced by get_bone_solid_color(), and get_bone_wire_color().
|
static |
Definition at line 681 of file overlay_armature.cc.
Referenced by use_bone_color().
|
static |
Definition at line 1214 of file overlay_armature.cc.
References ARM_NO_CUSTOM, UnifiedBonePtr::as_posebone(), bArmature::axes_position, bPoseChannel::bone, BONE_SELECTED, col, 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(), UnifiedBonePtr::is_posebone(), Bone::length, length(), bPoseChannel::pose_mat, blender::draw::overlay::Armatures::DrawContext::res, rescale_m4(), blender::draw::overlay::Resources::theme, and translate_m4().
Referenced by blender::draw::overlay::Armatures::draw_armature_edit(), and blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 1784 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 1615 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::bone_mat, copy_m4_m4(), data, bPoseChannel::ikflag, Bone::length, bPoseChannel::limitmax, bPoseChannel::limitmin, blender::draw::overlay::BoneInstanceData::mat44, mul_m4_m4m3(), mul_m4_m4m4(), blender::draw::overlay::Armatures::DrawContext::ob, bPoseChannel::parent, bPoseChannel::pose_mat, blender::math::scale(), bPoseChannel::scale, scale_m4_fl(), blender::draw::select::SelectMap::select_invalid_id(), sinf, translate_m4(), unit_m4(), and zero_v3().
Referenced by blender::draw::overlay::Armatures::draw_armature_pose().
|
static |
Definition at line 1830 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_GLOBALSPACE, DRW_TEXT_CACHE_STRING_PTR, blender::draw::overlay::Armatures::DrawContext::dt, bPoseChannel::flag, 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, POSE_SELECTED, 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 1797 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(), bPoseChannel::constflag, blender::draw::overlay::Armatures::DrawContext::do_relations, draw_bone_bone_relationship_line(), blender::draw::overlay::Armatures::DrawContext::draw_mode, bPoseChannel::flag, EditBone::head, bPoseChannel::parent, EditBone::parent, pchan_draw_ik_lines(), PCHAN_HAS_IK, PCHAN_HAS_SPLINEIK, bPoseChannel::pose_head, POSE_SELECTED, bPoseChannel::pose_tail, 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 1142 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, i, 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 bone_draw_update_display_matrix().
|
static |
Definition at line 979 of file overlay_armature.cc.
References UnifiedBonePtr::as_posebone(), copy_m4_m4(), bPoseChannel::custom_rotation_euler, bPoseChannel::custom_scale_xyz, bPoseChannel::custom_translation, bPoseChannel::custom_tx, UnifiedBonePtr::disp_mat(), bPoseChannel::disp_tail_mat, eulO_to_mat3(), float, mul_m4_m4m3(), mul_v3_v3fl(), PCHAN_CUSTOM_BONE_LENGTH, bPoseChannel::pose_mat, rescale_m4(), ROT_MODE_XYZ, and translate_m4().
Referenced by bone_draw_update_display_matrix().
|
static |
Definition at line 948 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 bone_draw_update_display_matrix(), and draw_bone_update_disp_matrix_bbone().
|
static |
Definition at line 1247 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_EDIT, blender::draw::overlay::ARM_DRAW_MODE_POSE, ARM_DRAW_TYPE_ENVELOPE, UnifiedBonePtr::as_editbone(), BONE_CONNECTED, bone_hint_color_shade(), BONE_ROOTSEL, ThemeColors::bone_solid, BONE_TIPSEL, BONESEL_ROOT, BONESEL_TIP, UniformData::colors, 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_shgroup_bone_envelope(), drw_shgroup_bone_sphere(), EditBone::flag, get_bone_wire_color(), get_bone_wire_thickness(), UnifiedBonePtr::has_parent(), UnifiedBonePtr::rad_head(), UnifiedBonePtr::rad_tail(), blender::draw::overlay::Armatures::DrawContext::res, blender::draw::overlay::Resources::theme, ThemeColors::vert, and ThemeColors::vert_select.
Referenced by annotation_draw_stroke_2d(), annotation_draw_stroke_3d(), annotation_draw_stroke_buffer(), bone_draw_b_bone(), bone_draw_envelope(), bone_draw_octa(), and bone_draw_wire().
|
static |
Definition at line 598 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::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::select::SelectMap::select_id().
Referenced by draw_axes().
|
static |
Definition at line 528 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, Object::empty_drawsize, Object::empty_drawtype, blender::draw::overlay::ShapeCache::empty_sphere, blender::math::from_scale(), blender::draw::overlay::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, blender::draw::overlay::ShapeCache::plain_axes, blender::draw::overlay::Armatures::DrawContext::res, blender::draw::overlay::BoneInstanceData::set_color(), blender::draw::overlay::BoneInstanceData::set_hint_color(), blender::draw::overlay::Resources::shapes, blender::draw::overlay::ShapeCache::single_arrow, UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by bone_draw_custom_shape().
|
static |
Definition at line 401 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::drw_batch_cache_generate_requested_delayed(), blender::draw::DRW_mesh_batch_cache_get_all_edges(), blender::draw::DRW_mesh_batch_cache_validate(), blender::draw::overlay::BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::BoneInstanceData::set_color(), blender::draw::overlay::BoneInstanceData::set_hint_color(), UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by drw_shgroup_bone_custom_wire().
|
static |
Definition at line 464 of file overlay_armature.cc.
References BKE_object_get_evaluated_mesh_no_subsurf_unchecked(), DRW_mesh_get_for_drawing(), DRW_object_get_data_for_drawing(), drw_shgroup_bone_custom_solid_mesh(), drw_shgroup_custom_bone_curve(), ELEM, OB_CURVES_LEGACY, OB_FONT, OB_SURF, and Object::type.
Referenced by bone_draw_custom_shape().
|
static |
Definition at line 354 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::drw_batch_cache_generate_requested_delayed(), blender::draw::DRW_mesh_batch_cache_get_edge_detection(), blender::draw::DRW_mesh_batch_cache_get_loose_edges(), blender::draw::DRW_mesh_batch_cache_get_surface(), blender::draw::DRW_mesh_batch_cache_validate(), blender::draw::overlay::Armatures::DrawContext::is_filled, blender::draw::overlay::BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::BoneInstanceData::set_color(), blender::draw::overlay::BoneInstanceData::set_hint_color(), UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by drw_shgroup_bone_custom_solid().
|
static |
Definition at line 502 of file overlay_armature.cc.
References BKE_object_get_evaluated_mesh_no_subsurf_unchecked(), DRW_mesh_get_for_drawing(), DRW_object_get_data_for_drawing(), drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_custom_bone_curve(), ELEM, OB_CURVES_LEGACY, OB_FONT, OB_SURF, and Object::type.
Referenced by bone_draw_custom_shape().
|
static |
Definition at line 261 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(), interp_v4_v4v4(), blender::draw::overlay::Armatures::DrawContext::is_filled, len, len_v3v3(), blender::draw::overlay::BoneInstanceData::mat, blender::draw::overlay::BoneInstanceData::mat44, mat4_to_scale(), max_ff(), mul_m4_v4(), blender::draw::overlay::Armatures::DrawContext::ob, blender::draw::overlay::Armatures::DrawContext::ob_ref, 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 bone_draw_envelope(), and draw_points().
|
static |
Definition at line 232 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, distance(), blender::draw::overlay::Armatures::DrawContext::draw_envelope_distance, 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 bone_draw_envelope().
|
static |
Definition at line 632 of file overlay_armature.cc.
References ThemeColors::bone_ik_line, UniformData::colors, drw_shgroup_bone_relationship_lines_ex(), blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::overlay::Resources::theme.
Referenced by pchan_draw_ik_lines().
|
static |
Definition at line 640 of file overlay_armature.cc.
References ThemeColors::bone_ik_line_no_target, UniformData::colors, drw_shgroup_bone_relationship_lines_ex(), blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::overlay::Resources::theme.
Referenced by pchan_draw_ik_lines().
|
static |
Definition at line 648 of file overlay_armature.cc.
References ThemeColors::bone_ik_line_spline, UniformData::colors, drw_shgroup_bone_relationship_lines_ex(), blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::overlay::Resources::theme.
Referenced by pchan_draw_ik_lines().
|
static |
Definition at line 624 of file overlay_armature.cc.
References UniformData::colors, drw_shgroup_bone_relationship_lines_ex(), blender::draw::overlay::Armatures::DrawContext::res, blender::draw::overlay::Resources::theme, and ThemeColors::wire.
Referenced by draw_bone_bone_relationship_line().
|
static |
Definition at line 612 of file overlay_armature.cc.
References blender::draw::overlay::LinePrimitiveBuf::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::overlay::Armatures::DrawContext::ob, 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 578 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::overlay::Armatures::DrawContext::is_filled, 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(), and blender::draw::select::SelectMap::select_invalid_id().
Referenced by draw_points().
|
static |
Definition at line 208 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, 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::math::transform_point(), and blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis().
Referenced by bone_draw_line().
|
static |
Definition at line 428 of file overlay_armature.cc.
References blender::draw::overlay::ShapeInstanceBuf< InstanceDataT >::append(), blender::draw::overlay::Armatures::DrawContext::bone_buf, blender::draw::drw_batch_cache_generate_requested_delayed(), blender::draw::DRW_cache_curve_edge_wire_get(), blender::draw::DRW_cache_text_edge_wire_get(), blender::draw::DRW_curve_batch_cache_validate(), blender::draw::overlay::BoneInstanceData::mat44, blender::draw::overlay::Armatures::DrawContext::ob, OB_FONT, blender::draw::overlay::BoneInstanceData::set_color(), blender::draw::overlay::BoneInstanceData::set_hint_color(), Object::type, UNPACK3, and WIRE_WIDTH_COMPRESSION.
Referenced by drw_shgroup_bone_custom_solid(), and drw_shgroup_bone_custom_wire().
|
static |
Definition at line 1026 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, MAX_BBONE_SUBDIV, 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 1012 of file overlay_armature.cc.
References BONE_CONNECTED, bArmature::edbo, and LISTBASE_FOREACH.
Referenced by blender::draw::overlay::Armatures::draw_armature_edit().
|
static |
Definition at line 911 of file overlay_armature.cc.
References bone_hint_color_shade(), blender::draw::overlay::Armatures::DrawContext::const_color, get_bone_wire_color(), blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::overlay::Resources::theme.
Referenced by bone_draw_b_bone(), bone_draw_custom_shape(), bone_draw_envelope(), and bone_draw_octa().
|
static |
Definition at line 820 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_POSE, blender::draw::overlay::Armatures::DrawContext::bcolor, BONE_DRAW_LOCKED_WEIGHT, bone_locked_color_shade(), ThemeColors::bone_solid, UniformData::colors, blender::draw::overlay::Armatures::DrawContext::const_color, blender::draw::overlay::Armatures::DrawContext::draw_mode, get_pchan_color_solid(), blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::overlay::Resources::theme.
Referenced by bone_draw_custom_shape(), and get_bone_solid_with_consts_color().
|
static |
Definition at line 838 of file overlay_armature.cc.
References blender::draw::overlay::ARM_DRAW_MODE_POSE, blender::draw::overlay::Armatures::DrawContext::bcolor, BONE_DRAW_LOCKED_WEIGHT, ThemeColors::bone_solid, col, UniformData::colors, blender::draw::overlay::Armatures::DrawContext::const_color, blender::draw::overlay::Armatures::DrawContext::draw_mode, get_bone_solid_color(), get_pchan_color_constraint(), blender::draw::overlay::Armatures::DrawContext::res, and blender::draw::overlay::Resources::theme.
Referenced by bone_draw_b_bone(), bone_draw_envelope(), bone_draw_line(), bone_draw_octa(), and bone_draw_wire().
|
static |
Definition at line 870 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, BONE_DRAW_LOCKED_WEIGHT, bone_locked_color_shade(), UniformData::colors, blender::draw::overlay::Armatures::DrawContext::const_color, copy_v3_v3(), blender::draw::overlay::Armatures::DrawContext::draw_mode, get_bone_wire_thickness(), get_pchan_color_wire(), blender::draw::overlay::Armatures::DrawContext::res, blender::draw::overlay::Resources::theme, and ThemeColors::vert.
Referenced by bone_draw_b_bone(), bone_draw_custom_shape(), bone_draw_envelope(), bone_draw_line(), bone_draw_octa(), bone_draw_wire(), draw_points(), and get_bone_hint_color().
|
static |
Definition at line 858 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 771 of file overlay_armature.cc.
References ThemeColors::bone_pose_constraint, ThemeColors::bone_pose_ik, ThemeColors::bone_pose_no_target, ThemeColors::bone_pose_spline_ik, UniformData::colors, UnifiedBonePtr::constflag(), ThemeWireColor::flag, 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 758 of file overlay_armature.cc.
References ThemeColors::bone_solid, UniformData::colors, copy_v4_v4(), ThemeWireColor::solid, and use_bone_color().
Referenced by get_bone_solid_color(), and get_pchan_color_constraint().
|
static |
Definition at line 716 of file overlay_armature.cc.
References ThemeWireColor::active, blender::draw::overlay::ARM_DRAW_MODE_EDIT, ThemeColors::bone_active, ThemeColors::bone_active_unsel, BONE_DRAW_ACTIVE, ThemeColors::bone_pose, ThemeColors::bone_pose_active, ThemeColors::bone_pose_active_unsel, ThemeColors::bone_select, BONE_SELECTED, UniformData::colors, copy_v4_v4(), ThemeWireColor::select, ThemeWireColor::solid, use_bone_color(), ThemeColors::wire, and ThemeColors::wire_edit.
Referenced by get_bone_wire_color().
|
static |
Definition at line 933 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 1704 of file overlay_armature.cc.
References bPoseChannel::constflag, CONSTRAINT_IK_TEMP, CONSTRAINT_IK_TIP, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK, bPoseChannel::constraints, data, 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 666 of file overlay_armature.cc.
References ARM_COL_CUSTOM, blender::draw::overlay::Armatures::DrawContext::bcolor, DRW_object_get_data_for_drawing(), 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 |
Should the relationship line between this bone and its parent be drawn?
Definition at line 1677 of file overlay_armature.cc.
References UnifiedBonePtr::as_posebone(), BONE_CONNECTED, bPoseChannel::flag, UnifiedBonePtr::has_parent(), UnifiedBonePtr::is_editbone(), UnifiedBonePtr::is_posebone(), bPoseChannel::parent, and POSE_SELECTED.
Referenced by draw_bone_relations().
|
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 702 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().