52#define PT_DEFAULT_RAD 0.05f
82 "conversion to EditBone* only possible when "
83 "UnifiedBonePtr contains an edit bone");
89 "conversion to EditBone* only possible when "
90 "UnifiedBonePtr contains an edit bone");
97 "conversion to bPoseChannel* only possible when "
98 "UnifiedBonePtr contains a pose channel");
104 "conversion to bPoseChannel* only possible when "
105 "UnifiedBonePtr contains a pose channel");
159 return is_editbone_ ?
eBone_->disp_mat :
pchan_->disp_mat;
163 return is_editbone_ ?
eBone_->disp_mat :
pchan_->disp_mat;
168 return is_editbone_ ?
eBone_->disp_tail_mat :
pchan_->disp_tail_mat;
173 return is_editbone_ ?
eBone_->disp_tail_mat :
pchan_->disp_tail_mat;
180 return is_editbone_ ?
eBone_->rad_head :
pchan_->bone->rad_head;
185 return is_editbone_ ?
eBone_->rad_tail :
pchan_->bone->rad_tail;
191 return eBone_->color.wrap();
194 if (
pchan_->color.palette_index == 0) {
197 return pchan_->bone->color.wrap();
199 return pchan_->color.wrap();
209 const float (*bone_mat)[4],
210 const float col_wire[4],
211 const float col_bone[4],
212 const float col_head[4],
213 const float col_tail[4],
233 const float (*bone_mat)[4],
234 const float *radius_head,
235 const float *radius_tail,
239 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
240 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
245 mul_m4_v4(ctx->
ob->object_to_world().ptr(), head_sph);
246 mul_m4_v4(ctx->
ob->object_to_world().ptr(), tail_sph);
247 mul_m4_v4(ctx->
ob->object_to_world().ptr(), xaxis);
250 head_sph[3] = *radius_head * obscale;
252 tail_sph[3] = *radius_tail * obscale;
262 const float (*bone_mat)[4],
263 const float bone_col[4],
264 const float hint_col[4],
265 const float outline_col[4],
266 const float *radius_head,
267 const float *radius_tail,
270 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
271 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
276 mul_m4_v4(ctx->
ob->object_to_world().ptr(), head_sph);
277 mul_m4_v4(ctx->
ob->object_to_world().ptr(), tail_sph);
278 mul_m4_v4(ctx->
ob->object_to_world().ptr(), xaxis);
280 head_sph[3] = *radius_head * obscale;
281 tail_sph[3] = *radius_tail * obscale;
286 if (head_sph[3] < 0.0f || tail_sph[3] < 0.0f) {
288 if (head_sph[3] < 0.0f) {
302 if (outline_col[3] > 0.0f) {
310 float fac_head = (
len - head_sph[3]) /
len;
311 float fac_tail = (
len - tail_sph[3]) /
len;
313 if (
len > (tail_sph[3] + head_sph[3]) + 1e-8f) {
327 if (outline_col[3] > 0.0f) {
335 float fac =
max_ff(fac_head, 1.0f - fac_tail);
345 if (outline_col[3] > 0.0f) {
356 const float (*bone_mat)[4],
357 const float bone_color[4],
358 const float hint_color[4],
359 const float outline_color[4],
360 const float wire_width,
374 if (surf || edges || loose_edges) {
382 ctx->
bone_buf->custom_shape_fill_get_buffer(surf).
append(inst_data, select_id);
388 ctx->
bone_buf->custom_shape_outline_get_buffer(edges).
append(inst_data, select_id);
394 ctx->
bone_buf->custom_shape_wire_get_buffer(loose_edges).
append(inst_data, select_id);
403 const float (*bone_mat)[4],
404 const float color[4],
405 const float wire_width,
421 ctx->
bone_buf->custom_shape_wire_get_buffer(geom).
append(inst_data, select_id);
430 const float (*bone_mat)[4],
431 const float outline_color[4],
432 const float wire_width,
443 blender::gpu::Batch *loose_edges =
nullptr;
457 ctx->
bone_buf->custom_shape_wire_get_buffer(loose_edges).
append(inst_data, select_id);
465 const float (*bone_mat)[4],
466 const float bone_color[4],
467 const float hint_color[4],
468 const float outline_color[4],
469 const float wire_width,
478 if (mesh !=
nullptr) {
503 const float (*bone_mat)[4],
504 const float color[4],
505 const float wire_width,
511 if (mesh !=
nullptr) {
529 const float (*bone_mat)[4],
530 const float color[4],
531 const float wire_width,
537 gpu::Batch *geom =
nullptr;
574 ctx->
bone_buf->custom_shape_wire_get_buffer(geom).
append(inst_data, select_id);
579 const float (*bone_mat)[4],
580 const float bone_color[4],
581 const float hint_color[4],
582 const float outline_color[4],
590 ctx->
bone_buf->sphere_fill_buf.
append({mat, bone_color, hint_color}, sel_id);
592 if (outline_color[3] > 0.0f) {
593 ctx->
bone_buf->sphere_outline_buf.
append({mat, outline_color}, sel_id);
599 const float (*bone_mat)[4],
600 const float color[4])
613 const float start[3],
615 const float color[4])
625 const float start[3],
633 const float start[3],
641 const float start[3],
649 const float start[3],
685 r = offset + int(cp[0]);
687 g = offset + int(cp[1]);
689 b = offset + int(cp[2]);
702static void use_bone_color(
float *r_color,
const uint8_t *color_from_theme,
const int shade_offset)
704 uint8_t srgb_color[4] = {255, 255, 255, 255};
708 if (shade_offset != 0) {
728 if (draw_active && draw_selected) {
731 else if (draw_active) {
734 else if (draw_selected) {
742 if (draw_active && draw_selected) {
745 else if (draw_active) {
748 else if (draw_selected) {
780 if ((constflag & flags_to_color) == 0 ||
788 float solid_color[4];
828 static float disp_color[4];
853 static float consts_color[4];
873 static float disp_color[4];
908 hint_color[3] = 1.0f;
914 static float hint_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
952 float (*bone_mat)[4];
982 float (*bone_mat)[4];
983 float (*disp_mat)[4];
984 float (*disp_tail_mat)[4];
1015 eBone->bbone_child =
nullptr;
1020 eBone->parent->bbone_child = eBone;
1030 float imat[4][4], bonemat[4][4];
1033 memset(¶m, 0,
sizeof(param));
1116 param.
roll1 += prev->roll2;
1144 float s[4][4], ebmat[4][4];
1145 float length, xwidth, zwidth;
1146 float (*bone_mat)[4];
1147 short bbone_segments;
1172 const float3 size_vec = {xwidth,
length / bbone_segments, zwidth};
1181 if (bbone_segments > 1) {
1184 for (
int i = bbone_segments;
i--; bbones_mat++) {
1197 if (bbone_segments > 1) {
1200 for (
int i = bbone_segments;
i--; bbones_mat++) {
1230 float axis_mat[4][4];
1240 float disp_mat[4][4];
1250 const float col_solid[4],
1251 const int select_id)
1253 float col_wire_root[4], col_wire_tail[4];
1254 float col_hint_root[4], col_hint_tail[4];
1262 const float envelope_ignore = -1.0f;
1282 const float *hint_color_shade_root = (ctx->
const_color) ?
1285 const float *hint_color_shade_tail = (ctx->
const_color) ?
1294 if (is_envelope_draw) {
1311 if (is_envelope_draw) {
1334 const int select_id)
1372 const int select_id)
1382 ctx->
bone_buf->octahedral_fill_buf.
append({bone_mat, col_solid, col_hint}, sel_id);
1384 if (col_wire[3] > 0.0f) {
1385 ctx->
bone_buf->octahedral_outline_buf.
append({bone_mat, col_wire}, sel_id);
1388 draw_points(ctx, bone, boneflag, col_solid, select_id);
1394 const int select_id)
1398 const float no_display[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1399 const float *col_head = no_display;
1400 const float *col_tail = col_bone;
1403 col_wire = no_display;
1404 col_bone = col_head = col_tail = ctx->
const_color;
1420 col_head = col_bone;
1425 if (select_id == -1) {
1429 ctx, bone.
disp_mat(), col_wire, col_bone, col_head, col_tail, select_id);
1441 if (col_head[3] > 0.0f) {
1452 ctx, bone.
disp_mat(), col_wire, no_display, no_display, col_tail, select_id |
BONESEL_TIP);
1459 const int select_id)
1478 for (
const Mat4 &in_bone_mat : bbone_matrices) {
1482 ctx->
bone_buf->bbones_fill_buf.
append({bone_mat, col_solid, col_hint}, sel_id);
1484 if (col_wire[3] > 0.0f) {
1485 ctx->
bone_buf->bbones_outline_buf.
append({bone_mat, col_wire}, sel_id);
1490 draw_points(ctx, bone, boneflag, col_solid, select_id);
1497 const int select_id)
1503 const float *rad_head, *rad_tail, *
distance;
1535 draw_points(ctx, bone, boneflag, col_solid, select_id);
1541 const int select_id)
1561 for (
const Mat4 &in_bone_mat : bbone_matrices) {
1571 draw_points(ctx, bone, boneflag, col_solid, select_id);
1576 const bool use_custom_shape,
1580 const int select_id)
1582 if (use_custom_shape) {
1619 float tmp[4][4], posetrans[4][4];
1620 float xminmax[2], zminmax[2];
1641 tmp[1][1] = -tmp[1][1];
1652 inst_data.
mat44,
float4(0.25f), xminmax[0], zminmax[0], xminmax[1], zminmax[1]);
1655 ctx->
bone_buf->degrees_of_freedom_wire_buf.
append(
data.with_color({0.0f, 0.0f, 0.0f, 1.0f}),
1660 inst_data.
mat44,
float4(1.0f, 0.0f, 0.0f, 1.0f), xminmax[0], 0.0f, xminmax[1], 0.0f);
1665 inst_data.
mat44,
float4(0.0f, 0.0f, 1.0f, 1.0f), 0.0f, zminmax[0], 0.0f, zminmax[1]);
1706 const bool only_temp)
1709 const float *line_start =
nullptr, *line_end =
nullptr;
1713 if (con->enforce == 0.0f) {
1717 switch (con->type) {
1732 while (parchan->
parent) {
1734 if (segcount ==
data->rootbone || segcount > 255) {
1737 parchan = parchan->
parent;
1765 while (parchan->
parent) {
1768 if (segcount ==
data->chainlen || segcount > 255) {
1771 parchan = parchan->
parent;
1774 if (parchan != pchan) {
1785 const float bone_head[3],
1786 const float parent_head[3],
1787 const float parent_tail[3])
1838 bone.
get(&eBone, &pchan);
1848 const float *head = is_pose ? pchan->
pose_head : eBone->
head;
1849 const float *tail = is_pose ? pchan->
pose_tail : eBone->
tail;
1855 is_pose ? pchan->
name : eBone->
name,
1856 is_pose ? strlen(pchan->
name) : strlen(eBone->
name),
1871 const bool use_custom_shape,
1874 if (use_custom_shape) {
1908 eBone = eBone->
next, index += 0x10000)
1914 const int select_id = is_select ? index :
uint(-1);
1942 bone_draw(drawtype,
false, ctx, bone, boneflag, select_id);
1964 bool draw_locked_weights =
false;
1973 bool is_pose_select =
false;
1996 if (is_pose_select) {
2005 (draw_ctx->
obact !=
nullptr))
2007 draw_locked_weights =
true;
2033 pchan = pchan->
next, index += 0x10000)
2039 Bone *bone = pchan->bone;
2045 const int select_id = is_pose_select ? index :
uint(-1);
2063 if (!draw_locked_weights) {
2068 if (!is_pose_select) {
2076 bone_draw(drawtype, use_custom_shape, ctx, bone_ptr, boneflag, select_id);
2079 if (is_pose_select) {
Functions to deal with Armatures.
C++ part of the BoneColor DNA struct.
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
void BKE_pchan_bbone_spline_setup(bPoseChannel *pchan, bool rest, bool for_deform, Mat4 *result_array)
int BKE_pchan_bbone_spline_compute(BBoneSplineParameters *param, bool for_deform, Mat4 *result_array)
General operations, lookup, etc. for blender objects.
Mesh * BKE_object_get_evaluated_mesh_no_subsurf_unchecked(const Object *object)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
MINLINE float max_ff(float a, float b)
MINLINE float clamp_f(float value, float min, float max)
MINLINE void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
MINLINE void srgb_to_linearrgb_v4(float linear[4], const float srgb[4])
float mat4_to_scale(const float mat[4][4])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void mul_m4_m4m3(float R[4][4], const float A[4][4], const float B[3][3])
void translate_m4(float mat[4][4], float Tx, float Ty, float Tz)
void rescale_m4(float mat[4][4], const float scale[3])
void size_to_mat4(float R[4][4], const float size[3])
void mul_m4_v3(const float M[4][4], float r[3])
void scale_m4_fl(float R[4][4], float scale)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
void mul_m4_v4(const float mat[4][4], float r[4])
bool invert_m4(float mat[4][4])
void unit_m4(float m[4][4])
void eulO_to_mat3(float M[3][3], const float e[3], short order)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t)
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_v3v3(float r[3], const float v1[3], const float v2[3])
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
T * DEG_get_original(T *id)
#define PCHAN_CUSTOM_BONE_LENGTH(pchan)
@ BONE_DRAW_LOCKED_WEIGHT
@ ARM_DRAW_TYPE_ARMATURE_DEFINED
@ BBONE_ADD_PARENT_END_ROLL
@ CONSTRAINT_TYPE_SPLINEIK
@ CONSTRAINT_TYPE_KINEMATIC
#define OB_MODE_ALL_WEIGHT_PAINT
Object is a sort of wrapper for general info.
T & DRW_object_get_data_for_drawing(const Object &object)
Mesh & DRW_mesh_get_for_drawing(Mesh &mesh)
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
void ED_armature_ebone_to_mat4(EditBone *ebone, float r_mat[4][4])
BMesh const char void * data
const f44 & disp_tail_mat() const
ePchan_ConstFlag constflag() const
UnifiedBonePtr(EditBone *eBone)
bPoseChannel * as_posebone()
void get(EditBone **eBone, bPoseChannel **pchan)
const f44 & disp_mat() const
void get(const EditBone **eBone, const bPoseChannel **pchan) const
const EditBone * as_editbone() const
UnifiedBonePtr(const UnifiedBonePtr &ptr)=default
UnifiedBonePtr(bPoseChannel *pchan)
const float & rad_head() const
const float & rad_tail() const
const blender::animrig::BoneColor & effective_bonecolor() const
const char * name() const
const bPoseChannel * as_posebone() const
const ThemeWireColor * effective_color() const
static void draw_armature_pose(Armatures::DrawContext *ctx)
static void draw_armature_edit(Armatures::DrawContext *ctx)
const DRWContext * DRW_context_get()
void DRW_text_cache_add(DRWTextStore *dt, const float co[3], const char *str, const int str_len, short xoffs, short yoffs, short flag, const uchar col[4], const bool shadow, const bool align_center)
@ DRW_TEXT_CACHE_GLOBALSPACE
@ DRW_TEXT_CACHE_STRING_PTR
float length(VecOp< float, D >) RET
float distance(VecOp< float, D >, VecOp< float, D >) RET
void * MEM_mallocN(size_t len, const char *str)
bool bone_is_visible(const bArmature *armature, const Bone *bone)
static bool is_from_dupli_or_set(const Object *ob)
void DRW_mesh_batch_cache_validate(Mesh &mesh)
blender::gpu::Batch * DRW_mesh_batch_cache_get_loose_edges(Mesh &mesh)
gpu::Batch * DRW_cache_text_edge_wire_get(Object *ob)
void DRW_curve_batch_cache_validate(Curve *cu)
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface(Mesh &mesh)
blender::gpu::Batch * DRW_mesh_batch_cache_get_all_edges(Mesh &mesh)
blender::gpu::Batch * DRW_mesh_batch_cache_get_edge_detection(Mesh &mesh, bool *r_is_manifold)
void drw_batch_cache_generate_requested_delayed(Object *ob)
gpu::Batch * DRW_cache_curve_edge_wire_get(Object *ob)
MatBase< T, NumCol, NumRow > scale(const MatBase< T, NumCol, NumRow > &mat, const VectorT &scale)
MatT from_scale(const VecBase< typename MatT::base_type, ScaleDim > &scale)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
MatBase< float, 4, 4 > float4x4
ListBaseWrapperTemplate< const ListBase, const T > ConstListBaseWrapper
VecBase< float, 4 > float4
ListBaseWrapperTemplate< ListBase, T > ListBaseWrapper
VecBase< float, 3 > float3
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 const float * get_bone_solid_color(const Armatures::DrawContext *ctx, const eBone_Flag boneflag)
static void draw_bone_update_disp_matrix_custom_shape(UnifiedBonePtr bone)
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 bone_draw_envelope(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id)
static const float * get_bone_solid_with_consts_color(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag)
static void ebone_spline_preview(EditBone *ebone, const float result_array[MAX_BBONE_SUBDIV][4][4])
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_ik_spline_lines(const Armatures::DrawContext *ctx, const float start[3], const float end[3])
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_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 draw_bone_relations(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag)
static void bone_locked_color_shade(const UniformData &theme, float color[4])
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 const float * get_bone_hint_color(const Armatures::DrawContext *ctx, const eBone_Flag boneflag)
static void use_bone_color(float *r_color, const uint8_t *color_from_theme, const int shade_offset)
static bool should_draw_relation_to_parent(const UnifiedBonePtr bone, const eBone_Flag boneflag)
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_points(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const float col_solid[4], const int select_id)
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 draw_bone_degrees_of_freedom(const Armatures::DrawContext *ctx, const bPoseChannel *pchan)
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)
static void drw_shgroup_bone_axes(const Armatures::DrawContext *ctx, const float(*bone_mat)[4], const float color[4])
static void get_pchan_color_solid(const UniformData &theme, const ThemeWireColor *bcolor, float r_color[4])
static void draw_bone_name(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone)
static void edbo_compute_bbone_child(bArmature *arm)
static void drw_shgroup_bone_ik_lines(const Armatures::DrawContext *ctx, const float start[3], const float end[3])
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 bone_hint_color_shade(float hint_color[4], const float color[4])
static void draw_bone_update_disp_matrix_default(UnifiedBonePtr bone)
static void bone_draw_wire(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id)
static void bone_draw_update_display_matrix(const eArmature_Drawtype drawtype, const bool use_custom_shape, UnifiedBonePtr bone)
static void draw_bone_update_disp_matrix_bbone(UnifiedBonePtr bone)
static void get_pchan_color_constraint(const UniformData &theme, const ThemeWireColor *bcolor, const UnifiedBonePtr bone, float r_color[4])
static void bone_draw_custom_shape(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id)
static float get_bone_wire_thickness(const Armatures::DrawContext *ctx, int boneflag)
static void bone_draw_line(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id)
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 bone_draw_octa(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id)
static void pchan_draw_ik_lines(const Armatures::DrawContext *ctx, const bPoseChannel *pchan, const bool only_temp)
static void draw_axes(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const bArmature &arm)
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 pchan_draw_data_init(bPoseChannel *pchan)
static void drw_shgroup_bone_ik_no_target_lines(const Armatures::DrawContext *ctx, const float start[3], const float end[3])
static void bone_draw_b_bone(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag, const int select_id)
static void set_ctx_bcolor(Armatures::DrawContext *ctx, const UnifiedBonePtr bone)
static void cp_shade_color3ub(uchar cp[3], const int offset)
static const float * get_bone_wire_color(const Armatures::DrawContext *ctx, const eBone_Flag boneflag)
static void drw_shgroup_bone_relationship_lines(const Armatures::DrawContext *ctx, const float start[3], const float end[3])
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 get_pchan_color_wire(const UniformData &theme, const ThemeWireColor *bcolor, const eArmatureDrawMode draw_mode, const eBone_Flag boneflag, float r_color[4])
#define WIRE_WIDTH_COMPRESSION
float disp_bbone_mat[32][4][4]
ObjectRuntimeHandle * runtime
struct ToolSettings * toolsettings
float4 bone_pose_no_target
float4 bone_ik_line_spline
float4 bone_pose_active_unsel
float4 bone_ik_line_no_target
float4 bone_pose_constraint
float4 bone_pose_spline_ik
struct EditBone * act_edbone
float bbone_matrix[0][4][4]
float custom_scale_xyz[3]
bPoseChannelDrawData * draw_data
float custom_rotation_euler[3]
struct bPoseChannel * parent
struct bPoseChannel * custom_tx
struct bPoseChannel * next
float custom_translation[3]
float custom_shape_wire_width
float disp_tail_mat[4][4]
bool draw_envelope_distance
const float * const_color
Armatures::BoneBuffers * bone_buf
bool draw_relation_from_head
eArmatureDrawMode draw_mode
const ThemeWireColor * bcolor
eArmature_Drawtype drawtype
void set_color(const float4 &bone_color)
void set_hint_color(const float4 &hint_color)
void append(const float3 &start, const float3 &end, const float4 &color, select::ID select_id=select::SelectMap::select_invalid_id())
bool is_selection() const
const ShapeCache & shapes
void append(const InstanceDataT &data, select::ID select_id)
static const ID select_invalid_id()
const ID select_id(const ObjectRef &ob_ref, uint sub_object_id=0)