Blender
V3.3
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#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.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_deform.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "DEG_depsgraph_query.h"
#include "ED_armature.h"
#include "ED_view3d.h"
#include "UI_resources.h"
#include "draw_common.h"
#include "draw_manager_text.h"
#include "overlay_private.h"
#include "draw_cache_impl.h"
Go to the source code of this file.
Classes | |
struct | ArmatureDrawContext |
Macros | |
#define | BONE_VAR(eBone, pchan, var) ((eBone) ? (eBone->var) : (pchan->var)) |
#define | BONE_FLAG(eBone, pchan) ((eBone) ? (eBone->flag) : (pchan->bone->flag)) |
#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) |
Typedefs | |
typedef struct ArmatureDrawContext | ArmatureDrawContext |
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 (ArmatureDrawContext *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 (ArmatureDrawContext *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_wire (ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4]) |
static void | drw_shgroup_bone_stick (ArmatureDrawContext *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]) |
static void | drw_shgroup_bone_envelope_distance (ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float *radius_head, const float *radius_tail, const float *distance) |
static void | drw_shgroup_bone_envelope (ArmatureDrawContext *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) |
void | drw_batch_cache_validate (Object *custom) |
void | drw_batch_cache_generate_requested_delayed (Object *custom) |
BLI_INLINE DRWCallBuffer * | custom_bone_instance_shgroup (ArmatureDrawContext *ctx, DRWShadingGroup *grp, struct GPUBatch *custom_geom) |
static void | drw_shgroup_bone_custom_solid_mesh (ArmatureDrawContext *ctx, Mesh *mesh, const float(*bone_mat)[4], const float bone_color[4], const float hint_color[4], const float outline_color[4], Object *custom) |
static void | drw_shgroup_bone_custom_mesh_wire (ArmatureDrawContext *ctx, Mesh *mesh, const float(*bone_mat)[4], const float color[4], Object *custom) |
static void | drw_shgroup_custom_bone_curve (ArmatureDrawContext *ctx, Curve *curve, const float(*bone_mat)[4], const float outline_color[4], Object *custom) |
static void | drw_shgroup_bone_custom_solid (ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float bone_color[4], const float hint_color[4], const float outline_color[4], Object *custom) |
static void | drw_shgroup_bone_custom_wire (ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4], Object *custom) |
static void | drw_shgroup_bone_custom_empty (ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4], Object *custom) |
static void | drw_shgroup_bone_point (ArmatureDrawContext *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_axes (ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4]) |
static void | drw_shgroup_bone_relationship_lines_ex (ArmatureDrawContext *ctx, const float start[3], const float end[3], const float color[4]) |
static void | drw_shgroup_bone_relationship_lines (ArmatureDrawContext *ctx, const float start[3], const float end[3]) |
static void | drw_shgroup_bone_ik_lines (ArmatureDrawContext *ctx, const float start[3], const float end[3]) |
static void | drw_shgroup_bone_ik_no_target_lines (ArmatureDrawContext *ctx, const float start[3], const float end[3]) |
static void | drw_shgroup_bone_ik_spline_lines (ArmatureDrawContext *ctx, const float start[3], const float end[3]) |
Drawing Color Helpers | |
static void | bone_locked_color_shade (float color[4]) |
static const float * | get_bone_solid_color (const ArmatureDrawContext *ctx, const EditBone *UNUSED(eBone), const bPoseChannel *pchan, const bArmature *arm, const int boneflag, const short constflag) |
static const float * | get_bone_solid_with_consts_color (const ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm, const int boneflag, const short constflag) |
static float | get_bone_wire_thickness (const ArmatureDrawContext *ctx, int boneflag) |
static const float * | get_bone_wire_color (const ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm, const int boneflag, const short constflag) |
static void | bone_hint_color_shade (float hint_color[4], const float color[4]) |
static const float * | get_bone_hint_color (const ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm, const int boneflag, const short constflag) |
Helper Utils | |
static void | pchan_draw_data_init (bPoseChannel *pchan) |
static void | draw_bone_update_disp_matrix_default (EditBone *eBone, bPoseChannel *pchan) |
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 (EditBone *eBone, bPoseChannel *pchan) |
static void | draw_bone_update_disp_matrix_custom (bPoseChannel *pchan) |
static void | draw_axes (ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm) |
static void | draw_points (ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm, const int boneflag, const short constflag, const int select_id) |
Draw Bones | |
static void | draw_bone_custom_shape (ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id) |
static void | draw_bone_envelope (ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id) |
static void | draw_bone_line (ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id) |
static void | draw_bone_wire (ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id) |
static void | draw_bone_box (ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id) |
static void | draw_bone_octahedral (ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id) |
Draw Degrees of Freedom | |
static void | draw_bone_degrees_of_freedom (ArmatureDrawContext *ctx, bPoseChannel *pchan) |
Draw Relationships | |
static void | pchan_draw_ik_lines (ArmatureDrawContext *ctx, bPoseChannel *pchan, const bool only_temp, const int constflag) |
static void | draw_bone_relations (ArmatureDrawContext *ctx, EditBone *ebone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag) |
static void | draw_bone_name (ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag) |
Pose Bone Culling | |
Used for selection since drawing many bones can be slow, see: T91253. 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) |
static bool | pchan_culling_test_custom (const DRWView *view, const Object *ob, const bPoseChannel *pchan) |
static bool | pchan_culling_test_wire (const DRWView *view, const Object *ob, const bPoseChannel *pchan) |
static bool | pchan_culling_test_line (const DRWView *view, const Object *ob, const bPoseChannel *pchan) |
static bool | pchan_culling_test_envelope (const DRWView *view, const Object *ob, const bPoseChannel *pchan) |
static bool | pchan_culling_test_bbone (const DRWView *view, const Object *ob, const bPoseChannel *pchan) |
static bool | pchan_culling_test_octohedral (const DRWView *view, const Object *ob, const bPoseChannel *pchan) |
Main Draw Loops | |
static void | draw_armature_edit (ArmatureDrawContext *ctx) |
static void | draw_armature_pose (ArmatureDrawContext *ctx) |
static void | armature_context_setup (ArmatureDrawContext *ctx, OVERLAY_PrivateData *pd, Object *ob, const bool do_envelope_dist, const bool is_edit_mode, const bool is_pose_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) |
Drawing Theme Helpers | |
| |
enum | { PCHAN_COLOR_NORMAL = 0 , PCHAN_COLOR_SOLID , PCHAN_COLOR_CONSTS } |
static void | set_pchan_colorset (ArmatureDrawContext *ctx, Object *ob, bPoseChannel *pchan) |
static void | cp_shade_color3ub (uchar cp[3], const int offset) |
static bool | set_pchan_color (const ArmatureDrawContext *ctx, short colCode, const int boneflag, const short constflag, float r_color[4]) |
#define BONE_FLAG | ( | eBone, | |
pchan | |||
) | ((eBone) ? (eBone->flag) : (pchan->bone->flag)) |
Definition at line 45 of file overlay_armature.c.
#define BONE_VAR | ( | eBone, | |
pchan, | |||
var | |||
) | ((eBone) ? (eBone->var) : (pchan->var)) |
Definition at line 44 of file overlay_armature.c.
#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) |
Definition at line 47 of file overlay_armature.c.
typedef struct ArmatureDrawContext ArmatureDrawContext |
anonymous enum |
Enumerator | |
---|---|
PCHAN_COLOR_NORMAL | |
PCHAN_COLOR_SOLID | |
PCHAN_COLOR_CONSTS |
Definition at line 884 of file overlay_armature.c.
|
static |
Definition at line 2456 of file overlay_armature.c.
References ARM_B_BONE, ARM_ENVELOPE, ARM_LINE, ARM_OCTA, ARM_WIRE, OVERLAY_PrivateData::armature, OVERLAY_PrivateData::armature_call_buffers, Object::base_flag, BASE_SELECTED, OVERLAY_ArmatureCallBuffersInner::box_fill, OVERLAY_ArmatureCallBuffersInner::box_outline, ArmatureDrawContext::const_color, ArmatureDrawContext::const_wire, OVERLAY_ArmatureCallBuffersInner::custom_fill, ArmatureDrawContext::custom_outline, OVERLAY_ArmatureCallBuffersInner::custom_outline, ArmatureDrawContext::custom_shapes_ghash, OVERLAY_ArmatureCallBuffersInner::custom_shapes_ghash, ArmatureDrawContext::custom_solid, ArmatureDrawContext::custom_wire, OVERLAY_ArmatureCallBuffersInner::custom_wire, Object::data, OVERLAY_PrivateData::do_pose_xray, ArmatureDrawContext::do_relations, ArmatureDrawContext::dof_lines, OVERLAY_ArmatureCallBuffersInner::dof_lines, ArmatureDrawContext::dof_sphere, OVERLAY_ArmatureCallBuffersInner::dof_sphere, bArmature::drawtype, DRW_state_is_select(), Object::dt, Object::dtx, ArmatureDrawContext::envelope_distance, OVERLAY_ArmatureCallBuffersInner::envelope_distance, OVERLAY_ArmatureCallBuffersInner::envelope_fill, ArmatureDrawContext::envelope_outline, OVERLAY_ArmatureCallBuffersInner::envelope_outline, ArmatureDrawContext::envelope_solid, OVERLAY_PrivateData::extra_call_buffers, ArmatureDrawContext::extras, NULL, ArmatureDrawContext::ob, OB_DRAW_IN_FRONT, OB_SOLID, OVERLAY_ArmatureCallBuffersInner::octa_fill, OVERLAY_ArmatureCallBuffersInner::octa_outline, ArmatureDrawContext::outline, OVERLAY_ArmatureCallBuffersInner::point_fill, ArmatureDrawContext::point_outline, OVERLAY_ArmatureCallBuffersInner::point_outline, ArmatureDrawContext::point_solid, ArmatureDrawContext::show_relations, OVERLAY_PrivateData::show_relations, ArmatureDrawContext::solid, OVERLAY_ArmatureCallBuffers::solid, ArmatureDrawContext::stick, OVERLAY_ArmatureCallBuffersInner::stick, OVERLAY_ArmatureCallBuffers::transp, OVERLAY_PrivateData::transparent, OVERLAY_PrivateData::v3d_flag, V3D_SELECT_OUTLINE, ArmatureDrawContext::wire, and OVERLAY_ArmatureCallBuffersInner::wire.
Referenced by OVERLAY_armature_cache_populate(), OVERLAY_edit_armature_cache_populate(), and OVERLAY_pose_armature_cache_populate().
Definition at line 1158 of file overlay_armature.c.
References color, mul_v3_fl(), and mul_v3_v3v3().
Referenced by draw_points(), and get_bone_hint_color().
|
static |
Definition at line 399 of file overlay_armature.c.
References data.
Referenced by draw_bone_degrees_of_freedom().
Definition at line 1042 of file overlay_armature.c.
References DRW_Global::block, color, GlobalsUboStorage::color_bone_locked, G_draw, and interp_v3_v3v3().
Referenced by get_bone_solid_color(), and get_bone_wire_color().
Definition at line 934 of file overlay_armature.c.
References usdtokens::b(), CLAMP, usdtokens::g(), offset, and r.
Referenced by set_pchan_color().
BLI_INLINE DRWCallBuffer* custom_bone_instance_shgroup | ( | ArmatureDrawContext * | ctx, |
DRWShadingGroup * | grp, | ||
struct GPUBatch * | custom_geom | ||
) |
Definition at line 618 of file overlay_armature.c.
References BLI_ghash_insert(), BLI_ghash_lookup(), ArmatureDrawContext::custom_shapes_ghash, DRW_shgroup_call_buffer_instance(), OVERLAY_InstanceFormats::instance_bone, NULL, 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 2214 of file overlay_armature.c.
References bArmature::act_edbone, ARM_B_BONE, ARM_DRAWAXES, ARM_DRAWNAMES, ARM_ENVELOPE, ARM_LINE, ARM_WIRE, BONE_CONNECTED, BONE_DRAW_ACTIVE, BONE_DRAW_LOCKED_WEIGHT, BONE_HIDDEN_A, Object::data, DEG_get_original_object(), draw_axes(), draw_bone_box(), draw_bone_envelope(), draw_bone_line(), draw_bone_name(), draw_bone_octahedral(), draw_bone_relations(), draw_bone_update_disp_matrix_bbone(), draw_bone_update_disp_matrix_default(), draw_bone_wire(), bArmature::drawtype, DRW_state_is_select(), DRW_state_show_text(), EBONE_VISIBLE, bArmature::edbo, edbo_compute_bbone_child(), ListBase::first, EditBone::flag, bArmature::flag, EditBone::layer, bArmature::layer, EditBone::next, NULL, ArmatureDrawContext::ob, EditBone::parent, Object::runtime, and Object_Runtime::select_id.
Referenced by OVERLAY_edit_armature_cache_populate().
|
static |
Definition at line 2290 of file overlay_armature.c.
References bArmature::act_bone, ARM_B_BONE, ARM_DRAWAXES, ARM_DRAWNAMES, ARM_ENVELOPE, ARM_LINE, ARM_NO_CUSTOM, ARM_POSEMODE, ARM_WIRE, Object::base_flag, BASE_FROM_DUPLI, BASE_FROM_SET, BKE_object_defgroup_list(), BKE_pose_channel_find_name(), bPoseChannel::bone, BONE_CONNECTED, BONE_DRAW_ACTIVE, BONE_DRAW_LOCKED_WEIGHT, BONE_HIDDEN_P, BONE_HIDDEN_PG, BONE_IK_XLIMIT, BONE_IK_ZLIMIT, BONE_SELECTED, bPose::chanbase, ArmatureDrawContext::const_color, bPoseChannel::constflag, bPoseChannel::custom, Object::data, DEG_get_original_object(), DG_LOCK_WEIGHT, draw_axes(), draw_bone_box(), draw_bone_custom_shape(), draw_bone_degrees_of_freedom(), draw_bone_envelope(), draw_bone_line(), draw_bone_name(), draw_bone_octahedral(), draw_bone_relations(), draw_bone_update_disp_matrix_bbone(), draw_bone_update_disp_matrix_custom(), draw_bone_update_disp_matrix_default(), draw_bone_wire(), bArmature::drawtype, DRW_context_state_get(), DRW_state_is_select(), DRW_state_show_text(), DRW_view_default_get(), ListBase::first, bPose::flag, Bone::flag, bArmature::flag, bPoseChannel::ikflag, Bone::layer, bArmature::layer, LISTBASE_FOREACH, Object::mode, bPoseChannel::next, NULL, ArmatureDrawContext::ob, OB_MODE_ALL_WEIGHT_PAINT, OB_MODE_OBJECT, OB_MODE_POSE, DRWContextState::obact, ToolSettings::object_flag, DRWContextState::object_mode, DRWContextState::object_pose, Bone::parent, pchan_culling_test_bbone(), pchan_culling_test_custom(), pchan_culling_test_envelope(), pchan_culling_test_line(), pchan_culling_test_octohedral(), pchan_culling_test_wire(), pchan_draw_data_init(), Object::pose, POSE_RECALC, Object::runtime, SCE_OBJECT_MODE_LOCK, scene, DRWContextState::scene, Object_Runtime::select_id, set_pchan_colorset(), ArmatureDrawContext::show_relations, Scene::toolsettings, and view.
Referenced by OVERLAY_armature_cache_populate(), and OVERLAY_pose_armature_cache_populate().
|
static |
Definition at line 1467 of file overlay_armature.c.
References ARM_NO_CUSTOM, bArmature::axes_position, DRW_Global::block, bPoseChannel::bone, BONE_FLAG, BONE_SELECTED, BONE_VAR, col, GlobalsUboStorage::color_text, GlobalsUboStorage::color_text_hi, ArmatureDrawContext::const_color, copy_m4_m4(), copy_v4_v4(), bPoseChannel::custom, bPoseChannel::custom_tx, drw_shgroup_bone_axes(), bArmature::flag, G_draw, blender::math::length(), Bone::length, bPoseChannel::pose_mat, rescale_m4(), and translate_m4().
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 1797 of file overlay_armature.c.
References bPoseChannelDrawData::bbone_matrix, BLI_assert, bPoseChannel::bone, BONESEL_BONE, EditBone::disp_bbone_mat, bPoseChannel::draw_data, draw_points(), DRW_select_load_id(), drw_shgroup_bone_box(), get_bone_hint_color(), get_bone_solid_with_consts_color(), get_bone_wire_color(), Mat4::mat, NULL, EditBone::segments, and Bone::segments.
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 1610 of file overlay_armature.c.
References BONE_DRAW_LOCKED_WEIGHT, BONE_DRAWWIRE, BONESEL_BONE, bPoseChannel::custom, bPoseChannel::disp_mat, DRW_select_load_id(), 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, and Object::type.
Referenced by draw_armature_pose().
|
static |
Definition at line 1870 of file overlay_armature.c.
References bPoseChannel::bone, BONE_IK_XLIMIT, BONE_IK_ZLIMIT, bone_instance_data_set_angle_minmax(), Bone::bone_mat, color, copy_m4_m4(), copy_v4_fl4(), ArmatureDrawContext::dof_lines, ArmatureDrawContext::dof_sphere, DRW_buffer_add_entry, bPoseChannel::ikflag, Bone::length, bPoseChannel::limitmax, bPoseChannel::limitmin, BoneInstanceData::mat, mul_m4_m4m3(), mul_m4_m4m4(), NULL, ArmatureDrawContext::ob, Object::obmat, bPoseChannel::parent, bPoseChannel::pose_mat, scale_m4_fl(), sinf, bPoseChannel::size, translate_m4(), unit_m4(), and zero_v3().
Referenced by draw_armature_pose().
|
static |
Definition at line 1645 of file overlay_armature.c.
References bPoseChannel::bone, BONE_CONNECTED, BONE_NO_DEFORM, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_VAR, BONESEL_BONE, EditBone::dist, Bone::dist, blender::math::distance(), draw_points(), DRW_select_load_id(), drw_shgroup_bone_envelope(), drw_shgroup_bone_envelope_distance(), get_bone_hint_color(), get_bone_solid_with_consts_color(), get_bone_wire_color(), EditBone::parent, bPoseChannel::parent, EditBone::rad_head, Bone::rad_head, EditBone::rad_tail, and Bone::rad_tail.
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 1692 of file overlay_armature.c.
References DRW_Global::block, bPoseChannel::bone, BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_VAR, BONESEL_BONE, BONESEL_ROOT, BONESEL_TIP, GlobalsUboStorage::color_bone_active, GlobalsUboStorage::color_vertex_select, GlobalsUboStorage::color_wire, ArmatureDrawContext::const_color, DRW_select_load_id(), drw_shgroup_bone_stick(), EditBone::flag, G_draw, get_bone_solid_with_consts_color(), get_bone_wire_color(), NULL, EditBone::parent, and Bone::parent.
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 2055 of file overlay_armature.c.
References ARM_POSEMODE, BONE_SELECTED, color, DRW_text_cache_add(), DRW_text_cache_ensure(), DRW_TEXT_CACHE_GLOBALSPACE, DRW_TEXT_CACHE_STRING_PTR, EditBone::flag, bArmature::flag, EditBone::head, mid_v3_v3v3(), mul_m4_v3(), EditBone::name, bPoseChannel::name, ArmatureDrawContext::ob, Object::obmat, bPoseChannel::pose_head, bPoseChannel::pose_tail, EditBone::tail, TH_TEXT, TH_TEXT_HI, and UI_GetThemeColor4ubv().
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 1837 of file overlay_armature.c.
References BONE_VAR, BONESEL_BONE, draw_points(), DRW_select_load_id(), drw_shgroup_bone_octahedral(), get_bone_hint_color(), get_bone_solid_with_consts_color(), and get_bone_wire_color().
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 2015 of file overlay_armature.c.
References ARM_POSEMODE, bPoseChannel::bone, BONE_CONNECTED, BONE_SELECTED, ArmatureDrawContext::do_relations, drw_shgroup_bone_relationship_lines(), Bone::flag, bArmature::flag, EditBone::head, EditBone::parent, bPoseChannel::parent, pchan_draw_ik_lines(), PCHAN_HAS_IK, PCHAN_HAS_SPLINEIK, bPoseChannel::pose_head, bPoseChannel::pose_tail, and EditBone::tail.
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 1373 of file overlay_armature.c.
References 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, if(), len_v3v3(), EditBone::length, blender::math::length(), Bone::length, Mat4::mat, mul_m4_m4m4(), bPoseChannel::pose_mat, EditBone::segments, Bone::segments, size_to_mat4(), EditBone::tail, EditBone::xwidth, Bone::xwidth, EditBone::zwidth, and Bone::zwidth.
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 1440 of file overlay_armature.c.
References copy_m4_m4(), bPoseChannel::custom_rotation_euler, bPoseChannel::custom_scale_xyz, bPoseChannel::custom_translation, bPoseChannel::custom_tx, bPoseChannel::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 draw_armature_pose().
|
static |
Definition at line 1208 of file overlay_armature.c.
References bPoseChannel::bone, copy_m4_m4(), copy_v3_fl(), EditBone::disp_mat, bPoseChannel::disp_mat, EditBone::disp_tail_mat, bPoseChannel::disp_tail_mat, ED_armature_ebone_to_mat4(), float(), EditBone::head, len_v3v3(), EditBone::length, Bone::length, bPoseChannel::pose_mat, rescale_m4(), EditBone::tail, and translate_m4().
Referenced by draw_armature_edit(), draw_armature_pose(), and draw_bone_update_disp_matrix_bbone().
|
static |
Definition at line 1760 of file overlay_armature.c.
References bPoseChannelDrawData::bbone_matrix, BLI_assert, bPoseChannel::bone, BONESEL_BONE, EditBone::disp_bbone_mat, bPoseChannel::draw_data, draw_points(), DRW_select_load_id(), drw_shgroup_bone_wire(), get_bone_wire_color(), Mat4::mat, NULL, EditBone::segments, and Bone::segments.
Referenced by draw_armature_edit(), and draw_armature_pose().
|
static |
Definition at line 1499 of file overlay_armature.c.
References ARM_ENVELOPE, ARM_POSEMODE, DRW_Global::block, bPoseChannel::bone, BONE_CONNECTED, bone_hint_color_shade(), BONE_ROOTSEL, BONE_TIPSEL, BONE_VAR, BONESEL_ROOT, BONESEL_TIP, GlobalsUboStorage::color_bone_solid, GlobalsUboStorage::color_vertex, GlobalsUboStorage::color_vertex_select, ArmatureDrawContext::const_color, copy_v3_v3(), copy_v4_v4(), EditBone::disp_mat, bPoseChannel::disp_mat, bArmature::drawtype, DRW_select_load_id(), drw_shgroup_bone_envelope(), drw_shgroup_bone_point(), EditBone::flag, bArmature::flag, G_draw, get_bone_solid_color(), get_bone_wire_color(), get_bone_wire_thickness(), EditBone::parent, Bone::parent, EditBone::rad_head, Bone::rad_head, EditBone::rad_tail, and Bone::rad_tail.
Referenced by annotation_draw_stroke_2d(), annotation_draw_stroke_3d(), annotation_draw_stroke_buffer(), draw_bone_box(), draw_bone_envelope(), draw_bone_octahedral(), and draw_bone_wire().
Definition at line 3392 of file draw_cache.c.
References BLI_gset_add(), DRWManager::delayed_extraction, and DST.
Referenced by drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), and drw_shgroup_custom_bone_curve().
Definition at line 3298 of file draw_cache.c.
References Object::data, DRW_curve_batch_cache_validate(), DRW_curves_batch_cache_validate(), DRW_lattice_batch_cache_validate(), DRW_mball_batch_cache_validate(), DRW_mesh_batch_cache_validate(), DRW_pointcloud_batch_cache_validate(), DRW_volume_batch_cache_validate(), OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by DRW_draw_depth_object(), drw_duplidata_load(), drw_engines_cache_populate(), and DRW_render_object_iter().
|
static |
Definition at line 821 of file overlay_armature.c.
References add_v3_v3(), color, ArmatureDrawContext::extras, mul_m4_m4m4(), ArmatureDrawContext::ob, OB_ARROWS, Object::obmat, and OVERLAY_empty_shape().
Referenced by draw_axes().
|
static |
Definition at line 454 of file overlay_armature.c.
References DRW_buffer_add_entry_struct(), BoneInstanceData::mat, mul_m4_m4m4(), ArmatureDrawContext::ob, Object::obmat, ArmatureDrawContext::outline, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), and ArmatureDrawContext::solid.
Referenced by draw_bone_box().
|
static |
Definition at line 775 of file overlay_armature.c.
References color, Object::empty_drawsize, Object::empty_drawtype, ArmatureDrawContext::extras, mul_m4_m4m4(), ArmatureDrawContext::ob, OB_ARROWS, OB_CIRCLE, OB_CUBE, OB_EMPTY_CONE, OB_EMPTY_IMAGE, OB_EMPTY_SPHERE, OB_PLAINAXES, OB_SINGLE_ARROW, Object::obmat, and OVERLAY_empty_shape().
Referenced by draw_bone_custom_shape().
|
static |
Definition at line 677 of file overlay_armature.c.
References color, custom_bone_instance_shgroup(), ArmatureDrawContext::custom_wire, drw_batch_cache_generate_requested_delayed(), DRW_buffer_add_entry_struct(), DRW_mesh_batch_cache_get_all_edges(), DRW_mesh_batch_cache_validate(), GPUBatch, BoneInstanceData::mat, mesh, mul_m4_m4m4(), ArmatureDrawContext::ob, Object::obmat, OVERLAY_bone_instance_data_set_color(), and OVERLAY_bone_instance_data_set_color_hint().
Referenced by drw_shgroup_bone_custom_wire().
|
static |
Definition at line 735 of file overlay_armature.c.
References BKE_object_get_evaluated_mesh_no_subsurf(), Object::data, drw_shgroup_bone_custom_solid_mesh(), drw_shgroup_custom_bone_curve(), ELEM, mesh, NULL, OB_CURVES_LEGACY, OB_FONT, OB_SURF, and Object::type.
Referenced by draw_bone_custom_shape().
|
static |
Definition at line 631 of file overlay_armature.c.
References custom_bone_instance_shgroup(), ArmatureDrawContext::custom_outline, ArmatureDrawContext::custom_solid, ArmatureDrawContext::custom_wire, drw_batch_cache_generate_requested_delayed(), DRW_buffer_add_entry_struct(), DRW_mesh_batch_cache_get_edge_detection(), DRW_mesh_batch_cache_get_loose_edges(), DRW_mesh_batch_cache_get_surface(), DRW_mesh_batch_cache_validate(), GPUBatch, BoneInstanceData::mat, mesh, mul_m4_m4m4(), NULL, ArmatureDrawContext::ob, Object::obmat, OVERLAY_bone_instance_data_set_color(), and OVERLAY_bone_instance_data_set_color_hint().
Referenced by drw_shgroup_bone_custom_solid().
|
static |
Definition at line 758 of file overlay_armature.c.
References BKE_object_get_evaluated_mesh_no_subsurf(), color, Object::data, drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_custom_bone_curve(), ELEM, mesh, NULL, OB_CURVES_LEGACY, OB_FONT, OB_SURF, and Object::type.
Referenced by draw_bone_custom_shape().
|
static |
Definition at line 530 of file overlay_armature.c.
References clamp_f(), copy_v3_v3(), copy_v4_v4(), DRW_buffer_add_entry, DRW_buffer_add_entry_struct(), ArmatureDrawContext::envelope_outline, ArmatureDrawContext::envelope_solid, interp_v4_v4v4(), len, len_v3v3(), BoneInstanceData::mat, mat4_to_scale(), max_ff(), mul_m4_v4(), ArmatureDrawContext::ob, Object::obmat, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), ArmatureDrawContext::point_outline, ArmatureDrawContext::point_solid, PT_DEFAULT_RAD, and scale_m4_fl().
Referenced by draw_bone_envelope(), and draw_points().
|
static |
Definition at line 504 of file overlay_armature.c.
References blender::math::distance(), DRW_buffer_add_entry, ArmatureDrawContext::envelope_distance, mat4_to_scale(), mul_m4_v4(), ArmatureDrawContext::ob, Object::obmat, and sub_v3_v3().
Referenced by draw_bone_envelope().
|
static |
Definition at line 852 of file overlay_armature.c.
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 859 of file overlay_armature.c.
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 867 of file overlay_armature.c.
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 434 of file overlay_armature.c.
References DRW_buffer_add_entry_struct(), BoneInstanceData::mat, mul_m4_m4m4(), ArmatureDrawContext::ob, Object::obmat, ArmatureDrawContext::outline, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), and ArmatureDrawContext::solid.
Referenced by draw_bone_octahedral().
|
static |
Definition at line 801 of file overlay_armature.c.
References DRW_buffer_add_entry_struct(), BoneInstanceData::mat, mul_m4_m4m4(), ArmatureDrawContext::ob, Object::obmat, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), ArmatureDrawContext::point_outline, and ArmatureDrawContext::point_solid.
Referenced by draw_points().
|
static |
Definition at line 845 of file overlay_armature.c.
References DRW_Global::block, GlobalsUboStorage::color_wire, drw_shgroup_bone_relationship_lines_ex(), and G_draw.
Referenced by draw_bone_relations().
|
static |
Definition at line 833 of file overlay_armature.c.
References color, e, ArmatureDrawContext::extras, mul_v3_m4v3(), ArmatureDrawContext::ob, Object::obmat, and OVERLAY_extra_line_dashed().
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 488 of file overlay_armature.c.
References add_v3_v3v3(), DRW_buffer_add_entry, mul_m4_v3(), mul_v3_m4v3(), ArmatureDrawContext::ob, Object::obmat, and ArmatureDrawContext::stick.
Referenced by draw_bone_line().
|
static |
Definition at line 474 of file overlay_armature.c.
References add_v3_v3v3(), color, DRW_buffer_add_entry, mul_m4_v3(), mul_v3_m4v3(), ArmatureDrawContext::ob, Object::obmat, and ArmatureDrawContext::wire.
Referenced by draw_bone_wire().
|
static |
Definition at line 701 of file overlay_armature.c.
References curve, custom_bone_instance_shgroup(), ArmatureDrawContext::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(), DRW_curve_batch_cache_validate(), GPUBatch, BoneInstanceData::mat, mul_m4_m4m4(), NULL, ArmatureDrawContext::ob, OB_FONT, Object::obmat, OVERLAY_bone_instance_data_set_color(), OVERLAY_bone_instance_data_set_color_hint(), and Object::type.
Referenced by drw_shgroup_bone_custom_solid(), and drw_shgroup_bone_custom_wire().
|
static |
Definition at line 1258 of file overlay_armature.c.
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(), EditBone::curve_in_x, BBoneSplineParameters::curve_in_x, EditBone::curve_in_z, BBoneSplineParameters::curve_in_z, EditBone::curve_out_x, BBoneSplineParameters::curve_out_x, EditBone::curve_out_z, BBoneSplineParameters::curve_out_z, EditBone::ease1, BBoneSplineParameters::ease1, EditBone::ease2, BBoneSplineParameters::ease2, ED_armature_ebone_to_mat4(), EditBone::flag, EditBone::head, invert_m4(), EditBone::length, BBoneSplineParameters::length, mul_m4_m4m4(), mul_v3_m4v3(), next, BBoneSplineParameters::next_bbone, BBoneSplineParameters::next_h, BBoneSplineParameters::next_mat, NULL, EditBone::parent, blender::meshintersect::prev(), BBoneSplineParameters::prev_bbone, BBoneSplineParameters::prev_h, BBoneSplineParameters::prev_mat, EditBone::roll1, BBoneSplineParameters::roll1, EditBone::roll2, BBoneSplineParameters::roll2, EditBone::scale_in, BBoneSplineParameters::scale_in, EditBone::scale_out, BBoneSplineParameters::scale_out, EditBone::segments, BBoneSplineParameters::segments, sub_v3_v3v3(), EditBone::tail, BBoneSplineParameters::use_next, BBoneSplineParameters::use_prev, and zero_v3().
Referenced by draw_bone_update_disp_matrix_bbone().
Definition at line 1242 of file overlay_armature.c.
References EditBone::bbone_child, BONE_CONNECTED, bArmature::edbo, ListBase::first, EditBone::flag, EditBone::next, NULL, and EditBone::parent.
Referenced by draw_armature_edit().
Definition at line 412 of file overlay_armature.c.
References Freestyle::a, usdtokens::b(), and CLAMP.
Referenced by OVERLAY_bone_instance_data_set_color(), and OVERLAY_bone_instance_data_set_color_hint().
|
static |
Definition at line 1167 of file overlay_armature.c.
References DRW_Global::block, bone_hint_color_shade(), GlobalsUboStorage::color_bone_solid, ArmatureDrawContext::const_color, G_draw, and get_bone_wire_color().
Referenced by draw_bone_box(), draw_bone_custom_shape(), draw_bone_envelope(), and draw_bone_octahedral().
|
static |
Definition at line 1049 of file overlay_armature.c.
References ARM_POSEMODE, DRW_Global::block, BONE_DRAW_LOCKED_WEIGHT, bone_locked_color_shade(), GlobalsUboStorage::color_bone_solid, ArmatureDrawContext::const_color, copy_v4_v4(), bPoseChannel::draw_data, bArmature::flag, G_draw, PCHAN_COLOR_SOLID, set_pchan_color(), and bPoseChannelDrawData::solid_color.
Referenced by draw_bone_custom_shape(), draw_points(), and get_bone_solid_with_consts_color().
|
static |
Definition at line 1075 of file overlay_armature.c.
References ARM_POSEMODE, DRW_Global::block, BONE_DRAW_LOCKED_WEIGHT, col, GlobalsUboStorage::color_bone_solid, ArmatureDrawContext::const_color, copy_v4_v4(), bArmature::flag, G_draw, get_bone_solid_color(), interp_v3_v3v3(), PCHAN_COLOR_CONSTS, and set_pchan_color().
Referenced by draw_bone_box(), draw_bone_envelope(), draw_bone_line(), and draw_bone_octahedral().
|
static |
Definition at line 1111 of file overlay_armature.c.
References ARM_POSEMODE, DRW_Global::block, BONE_DRAW_ACTIVE, BONE_DRAW_LOCKED_WEIGHT, bone_locked_color_shade(), BONE_SELECTED, GlobalsUboStorage::color_bone_active, GlobalsUboStorage::color_bone_active_unsel, GlobalsUboStorage::color_bone_select, GlobalsUboStorage::color_vertex, GlobalsUboStorage::color_wire_edit, ArmatureDrawContext::const_color, copy_v3_v3(), copy_v4_v4(), bPoseChannel::draw_data, bArmature::flag, G_draw, get_bone_wire_thickness(), PCHAN_COLOR_NORMAL, set_pchan_color(), and bPoseChannelDrawData::wire_color.
Referenced by draw_bone_box(), draw_bone_custom_shape(), draw_bone_envelope(), draw_bone_line(), draw_bone_octahedral(), draw_bone_wire(), draw_points(), and get_bone_hint_color().
|
static |
Definition at line 1099 of file overlay_armature.c.
References BONE_DRAW_ACTIVE, BONE_SELECTED, ArmatureDrawContext::const_color, and ArmatureDrawContext::const_wire.
Referenced by draw_points(), and get_bone_wire_color().
void OVERLAY_armature_cache_finish | ( | OVERLAY_Data * | vedata | ) |
Definition at line 2582 of file overlay_armature.c.
References OVERLAY_PrivateData::armature_call_buffers, BLI_ghash_free(), OVERLAY_ArmatureCallBuffersInner::custom_shapes_ghash, NULL, 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 112 of file overlay_armature.c.
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, 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_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, OVERLAY_ArmatureCallBuffersInner::envelope_distance, OVERLAY_ArmatureCallBuffersInner::envelope_fill, OVERLAY_ArmatureCallBuffersInner::envelope_outline, View3DOverlay::flag, View3D::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, NULL, 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, pow(), OVERLAY_Data::psl, sh, View3D::shading, OVERLAY_PrivateData::show_relations, OVERLAY_ArmatureCallBuffers::solid, state, OVERLAY_ArmatureCallBuffersInner::stick, OVERLAY_Data::stl, OVERLAY_ArmatureCallBuffers::transp, OVERLAY_PrivateData::transparent, View3DShading::type, 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 2533 of file overlay_armature.c.
References armature_context_setup(), color, 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 2595 of file overlay_armature.c.
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 2603 of file overlay_armature.c.
References OVERLAY_PassList::armature_bone_select_ps, OVERLAY_PassList::armature_ps, OVERLAY_PassList::armature_transp_ps, DRW_draw_pass(), DRW_state_is_select(), NULL, and OVERLAY_Data::psl.
Referenced by OVERLAY_draw_scene().
bool OVERLAY_armature_is_pose_mode | ( | Object * | ob, |
const DRWContextState * | draw_ctx | ||
) |
Definition at line 92 of file overlay_armature.c.
References Object::mode, NULL, 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 426 of file overlay_armature.c.
References data, and encode_2f_to_float().
Referenced by drw_shgroup_bone_box(), drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), drw_shgroup_bone_envelope(), drw_shgroup_bone_octahedral(), drw_shgroup_bone_point(), drw_shgroup_custom_bone_curve(), and metaball_instance_data_set().
void OVERLAY_bone_instance_data_set_color_hint | ( | BoneInstanceData * | data, |
const float | hint_color[4] | ||
) |
Definition at line 419 of file overlay_armature.c.
References data, and encode_2f_to_float().
Referenced by drw_shgroup_bone_box(), drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), drw_shgroup_bone_envelope(), drw_shgroup_bone_octahedral(), drw_shgroup_bone_point(), and drw_shgroup_custom_bone_curve().
void OVERLAY_edit_armature_cache_populate | ( | OVERLAY_Data * | vedata, |
Object * | ob | ||
) |
Definition at line 2517 of file overlay_armature.c.
References armature_context_setup(), draw_armature_edit(), NULL, 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 2525 of file overlay_armature.c.
References armature_context_setup(), draw_armature_pose(), NULL, 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 2567 of file overlay_armature.c.
References OVERLAY_PrivateData::armature_bone_select_act_grp, OVERLAY_PrivateData::armature_bone_select_grp, DRW_cache_object_surface_get(), DRW_shgroup_call, GPUBatch, 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 2613 of file overlay_armature.c.
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(), NULL, 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 2099 of file overlay_armature.c.
References BKE_pchan_minmax(), BoundSphere::center, INIT_MINMAX, len_v3v3(), max, mid_v3_v3v3(), min, and BoundSphere::radius.
Referenced by pchan_culling_test_envelope(), pchan_culling_test_simple(), and pchan_culling_test_with_radius_scale().
|
static |
Definition at line 2176 of file overlay_armature.c.
References ARM_B_BONE, bPoseChannelDrawData::bbone_matrix, BLI_assert, bPoseChannel::bone, BoundSphere::center, Object::data, bPoseChannel::draw_data, bArmature::drawtype, DRW_culling_sphere_test(), len_v3(), Mat4::mat, mat4_to_size(), mat4_to_size_max_axis(), mul_v3_m4v3(), Object::obmat, BoundSphere::radius, Bone::segments, size(), UNUSED_VARS_NDEBUG, and view.
Referenced by draw_armature_pose().
|
static |
Definition at line 2134 of file overlay_armature.c.
References pchan_culling_test_simple(), and view.
Referenced by draw_armature_pose().
|
static |
Definition at line 2162 of file overlay_armature.c.
References ARM_ENVELOPE, BLI_assert, bPoseChannel::bone, Object::data, bPoseChannel::disp_mat, bArmature::drawtype, DRW_culling_sphere_test(), mat4_to_size_max_axis(), max_ff(), Object::obmat, pchan_culling_calc_bsphere(), Bone::rad_head, Bone::rad_tail, BoundSphere::radius, UNUSED_VARS_NDEBUG, and view.
Referenced by draw_armature_pose().
|
static |
Definition at line 2150 of file overlay_armature.c.
References ARM_LINE, BLI_assert, Object::data, pchan_culling_test_with_radius_scale(), and view.
Referenced by draw_armature_pose().
|
static |
Definition at line 2198 of file overlay_armature.c.
References pchan_culling_test_with_radius_scale(), and view.
Referenced by draw_armature_pose().
|
static |
pchan
intersect the view. (same for other "test" functions defined here). Definition at line 2114 of file overlay_armature.c.
References DRW_culling_sphere_test(), pchan_culling_calc_bsphere(), and view.
Referenced by pchan_culling_test_custom(), and pchan_culling_test_wire().
|
static |
Definition at line 2142 of file overlay_armature.c.
References ARM_WIRE, BLI_assert, Object::data, pchan_culling_test_simple(), and view.
Referenced by draw_armature_pose().
|
static |
Definition at line 2123 of file overlay_armature.c.
References DRW_culling_sphere_test(), pchan_culling_calc_bsphere(), BoundSphere::radius, and view.
Referenced by pchan_culling_test_line(), and pchan_culling_test_octohedral().
|
static |
Definition at line 1193 of file overlay_armature.c.
References bPoseChannelDrawData::bbone_matrix_len, bPoseChannel::bone, bPoseChannel::draw_data, MEM_mallocN, MEM_SAFE_FREE, NULL, and Bone::segments.
Referenced by draw_armature_pose().
|
static |
Definition at line 1934 of file overlay_armature.c.
References CONSTRAINT_IK_TEMP, CONSTRAINT_IK_TIP, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK, bPoseChannel::constraints, data, bConstraint::data, drw_shgroup_bone_ik_lines(), drw_shgroup_bone_ik_no_target_lines(), drw_shgroup_bone_ik_spline_lines(), bConstraint::enforce, ListBase::first, if(), bConstraint::next, NULL, bPoseChannel::parent, PCHAN_HAS_TARGET, bPoseChannel::pose_head, bPoseChannel::pose_tail, and bConstraint::type.
Referenced by draw_bone_relations().
Definition at line 2549 of file overlay_armature.c.
References BKE_modifiers_is_deformed_by_armature(), BKE_modifiers_is_deformed_by_meshdeform(), DRW_context_state_get(), and OVERLAY_armature_is_pose_mode().
Referenced by OVERLAY_pose_cache_populate().
|
static |
Definition at line 951 of file overlay_armature.c.
References ThemeWireColor::active, ArmatureDrawContext::bcolor, DRW_Global::block, BONE_DRAW_ACTIVE, BONE_SELECTED, GlobalsUboStorage::color_bone_pose, GlobalsUboStorage::color_bone_pose_active, GlobalsUboStorage::color_bone_pose_active_unsel, GlobalsUboStorage::color_bone_pose_constraint, GlobalsUboStorage::color_bone_pose_ik, GlobalsUboStorage::color_bone_pose_spline_ik, GlobalsUboStorage::color_bone_pose_target, GlobalsUboStorage::color_bone_solid, GlobalsUboStorage::color_wire, copy_v3_v3_uchar(), copy_v4_v4(), cp_shade_color3ub(), ThemeWireColor::flag, G_draw, NULL, PCHAN_COLOR_CONSTS, PCHAN_COLOR_NORMAL, PCHAN_COLOR_SOLID, PCHAN_HAS_CONST, PCHAN_HAS_IK, PCHAN_HAS_SPLINEIK, PCHAN_HAS_TARGET, rgb_uchar_to_float(), ThemeWireColor::select, ThemeWireColor::solid, srgb_to_linearrgb_v4(), and TH_WIRECOLOR_CONSTCOLS.
Referenced by get_bone_solid_color(), get_bone_solid_with_consts_color(), and get_bone_wire_color().
|
static |
Definition at line 891 of file overlay_armature.c.
References bPose::agroups, bPoseChannel::agrp_index, ARM_COL_CUSTOM, ArmatureDrawContext::bcolor, BLI_findlink(), bActionGroup::cs, bActionGroup::customCol, Object::data, ELEM, NULL, Object::pose, bTheme::tarm, and UI_GetTheme().
Referenced by draw_armature_pose().