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");
148 return is_editbone_ ?
eBone_->disp_mat :
pchan_->disp_mat;
152 return is_editbone_ ?
eBone_->disp_mat :
pchan_->disp_mat;
157 return is_editbone_ ?
eBone_->disp_tail_mat :
pchan_->disp_tail_mat;
162 return is_editbone_ ?
eBone_->disp_tail_mat :
pchan_->disp_tail_mat;
169 return is_editbone_ ?
eBone_->rad_head :
pchan_->bone->rad_head;
174 return is_editbone_ ?
eBone_->rad_tail :
pchan_->bone->rad_tail;
180 return eBone_->color.wrap();
183 if (
pchan_->color.palette_index == 0) {
186 return pchan_->bone->color.wrap();
188 return pchan_->color.wrap();
198 const float (*bone_mat)[4],
199 const float col_wire[4],
200 const float col_bone[4],
201 const float col_head[4],
202 const float col_tail[4],
222 const float (*bone_mat)[4],
223 const float *radius_head,
224 const float *radius_tail,
228 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
229 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
234 mul_m4_v4(ctx->
ob->object_to_world().ptr(), head_sph);
235 mul_m4_v4(ctx->
ob->object_to_world().ptr(), tail_sph);
236 mul_m4_v4(ctx->
ob->object_to_world().ptr(), xaxis);
239 head_sph[3] = *radius_head * obscale;
241 tail_sph[3] = *radius_tail * obscale;
251 const float (*bone_mat)[4],
252 const float bone_col[4],
253 const float hint_col[4],
254 const float outline_col[4],
255 const float *radius_head,
256 const float *radius_tail,
259 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
260 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
265 mul_m4_v4(ctx->
ob->object_to_world().ptr(), head_sph);
266 mul_m4_v4(ctx->
ob->object_to_world().ptr(), tail_sph);
267 mul_m4_v4(ctx->
ob->object_to_world().ptr(), xaxis);
269 head_sph[3] = *radius_head * obscale;
270 tail_sph[3] = *radius_tail * obscale;
275 if (head_sph[3] < 0.0f || tail_sph[3] < 0.0f) {
277 if (head_sph[3] < 0.0f) {
291 if (outline_col[3] > 0.0f) {
299 float fac_head = (
len - head_sph[3]) /
len;
300 float fac_tail = (
len - tail_sph[3]) /
len;
302 if (
len > (tail_sph[3] + head_sph[3]) + 1e-8f) {
316 if (outline_col[3] > 0.0f) {
324 float fac =
max_ff(fac_head, 1.0f - fac_tail);
334 if (outline_col[3] > 0.0f) {
345 const float (*bone_mat)[4],
346 const float bone_color[4],
347 const float hint_color[4],
348 const float outline_color[4],
349 const float wire_width,
363 if (surf || edges || loose_edges) {
371 ctx->
bone_buf->custom_shape_fill_get_buffer(surf).
append(inst_data, select_id);
377 ctx->
bone_buf->custom_shape_outline_get_buffer(edges).
append(inst_data, select_id);
383 ctx->
bone_buf->custom_shape_wire_get_buffer(loose_edges).
append(inst_data, select_id);
392 const float (*bone_mat)[4],
393 const float color[4],
394 const float wire_width,
410 ctx->
bone_buf->custom_shape_wire_get_buffer(geom).
append(inst_data, select_id);
419 const float (*bone_mat)[4],
420 const float outline_color[4],
421 const float wire_width,
432 blender::gpu::Batch *loose_edges =
nullptr;
446 ctx->
bone_buf->custom_shape_wire_get_buffer(loose_edges).
append(inst_data, select_id);
454 const float (*bone_mat)[4],
455 const float bone_color[4],
456 const float hint_color[4],
457 const float outline_color[4],
458 const float wire_width,
467 if (mesh !=
nullptr) {
492 const float (*bone_mat)[4],
493 const float color[4],
494 const float wire_width,
500 if (mesh !=
nullptr) {
517 const float (*bone_mat)[4],
518 const float color[4],
519 const float wire_width,
525 gpu::Batch *geom =
nullptr;
562 ctx->
bone_buf->custom_shape_wire_get_buffer(geom).
append(inst_data, select_id);
567 const float (*bone_mat)[4],
568 const float bone_color[4],
569 const float hint_color[4],
570 const float outline_color[4],
578 ctx->
bone_buf->sphere_fill_buf.
append({mat, bone_color, hint_color}, sel_id);
580 if (outline_color[3] > 0.0f) {
581 ctx->
bone_buf->sphere_outline_buf.
append({mat, outline_color}, sel_id);
587 const float (*bone_mat)[4],
588 const float color[4])
601 const float start[3],
603 const float color[4])
613 const float start[3],
621 const float start[3],
629 const float start[3],
637 const float start[3],
673 r = offset + int(cp[0]);
675 g = offset + int(cp[1]);
677 b = offset + int(cp[2]);
690static void use_bone_color(
float *r_color,
const uint8_t *color_from_theme,
const int shade_offset)
692 uint8_t srgb_color[4] = {255, 255, 255, 255};
696 if (shade_offset != 0) {
716 if (draw_active && draw_selected) {
719 else if (draw_active) {
722 else if (draw_selected) {
730 if (draw_active && draw_selected) {
733 else if (draw_active) {
736 else if (draw_selected) {
768 if ((constflag & flags_to_color) == 0 ||
776 float solid_color[4];
816 static float disp_color[4];
841 static float consts_color[4];
861 static float disp_color[4];
896 hint_color[3] = 1.0f;
902 static float hint_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
941 float(*disp_mat)[4] = bone.
disp_mat();
972 float(*disp_tail_mat)[4];
1003 eBone->bbone_child =
nullptr;
1008 eBone->parent->bbone_child = eBone;
1018 float imat[4][4], bonemat[4][4];
1021 memset(¶m, 0,
sizeof(param));
1104 param.
roll1 += prev->roll2;
1132 float s[4][4], ebmat[4][4];
1133 float length, xwidth, zwidth;
1134 float(*bone_mat)[4];
1135 short bbone_segments;
1160 const float3 size_vec = {xwidth,
length / bbone_segments, zwidth};
1169 if (bbone_segments > 1) {
1172 for (
int i = bbone_segments;
i--; bbones_mat++) {
1185 if (bbone_segments > 1) {
1188 for (
int i = bbone_segments;
i--; bbones_mat++) {
1218 float axis_mat[4][4];
1228 float disp_mat[4][4];
1238 const float col_solid[4],
1239 const int select_id)
1241 float col_wire_root[4], col_wire_tail[4];
1242 float col_hint_root[4], col_hint_tail[4];
1250 const float envelope_ignore = -1.0f;
1270 const float *hint_color_shade_root = (ctx->
const_color) ?
1273 const float *hint_color_shade_tail = (ctx->
const_color) ?
1282 if (is_envelope_draw) {
1299 if (is_envelope_draw) {
1322 const int select_id)
1327 const float(*disp_mat)[4] = bone.
disp_mat();
1360 const int select_id)
1370 ctx->
bone_buf->octahedral_fill_buf.
append({bone_mat, col_solid, col_hint}, sel_id);
1372 if (col_wire[3] > 0.0f) {
1373 ctx->
bone_buf->octahedral_outline_buf.
append({bone_mat, col_wire}, sel_id);
1376 draw_points(ctx, bone, boneflag, col_solid, select_id);
1382 const int select_id)
1386 const float no_display[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1387 const float *col_head = no_display;
1388 const float *col_tail = col_bone;
1391 col_wire = no_display;
1392 col_bone = col_head = col_tail = ctx->
const_color;
1408 col_head = col_bone;
1413 if (select_id == -1) {
1417 ctx, bone.
disp_mat(), col_wire, col_bone, col_head, col_tail, select_id);
1429 if (col_head[3] > 0.0f) {
1440 ctx, bone.
disp_mat(), col_wire, no_display, no_display, col_tail, select_id |
BONESEL_TIP);
1447 const int select_id)
1466 for (
const Mat4 &in_bone_mat : bbone_matrices) {
1470 ctx->
bone_buf->bbones_fill_buf.
append({bone_mat, col_solid, col_hint}, sel_id);
1472 if (col_wire[3] > 0.0f) {
1473 ctx->
bone_buf->bbones_outline_buf.
append({bone_mat, col_wire}, sel_id);
1478 draw_points(ctx, bone, boneflag, col_solid, select_id);
1485 const int select_id)
1491 const float *rad_head, *rad_tail, *
distance;
1523 draw_points(ctx, bone, boneflag, col_solid, select_id);
1529 const int select_id)
1549 for (
const Mat4 &in_bone_mat : bbone_matrices) {
1559 draw_points(ctx, bone, boneflag, col_solid, select_id);
1564 const bool use_custom_shape,
1568 const int select_id)
1570 if (use_custom_shape) {
1607 float tmp[4][4], posetrans[4][4];
1608 float xminmax[2], zminmax[2];
1629 tmp[1][1] = -tmp[1][1];
1640 inst_data.
mat44,
float4(0.25f), xminmax[0], zminmax[0], xminmax[1], zminmax[1]);
1643 ctx->
bone_buf->degrees_of_freedom_wire_buf.
append(
data.with_color({0.0f, 0.0f, 0.0f, 1.0f}),
1648 inst_data.
mat44,
float4(1.0f, 0.0f, 0.0f, 1.0f), xminmax[0], 0.0f, xminmax[1], 0.0f);
1653 inst_data.
mat44,
float4(0.0f, 0.0f, 1.0f, 1.0f), 0.0f, zminmax[0], 0.0f, zminmax[1]);
1694 const bool only_temp)
1697 const float *line_start =
nullptr, *line_end =
nullptr;
1701 if (con->enforce == 0.0f) {
1705 switch (con->type) {
1720 while (parchan->
parent) {
1722 if (segcount ==
data->rootbone || segcount > 255) {
1725 parchan = parchan->
parent;
1753 while (parchan->
parent) {
1756 if (segcount ==
data->chainlen || segcount > 255) {
1759 parchan = parchan->
parent;
1762 if (parchan != pchan) {
1773 const float bone_head[3],
1774 const float parent_head[3],
1775 const float parent_tail[3])
1828 bone.
get(&eBone, &pchan);
1838 const float *head = is_pose ? pchan->
pose_head : eBone->
head;
1839 const float *tail = is_pose ? pchan->
pose_tail : eBone->
tail;
1845 is_pose ? pchan->
name : eBone->
name,
1846 is_pose ? strlen(pchan->
name) : strlen(eBone->
name),
1861 const bool use_custom_shape,
1864 if (use_custom_shape) {
1898 eBone = eBone->
next, index += 0x10000)
1904 const int select_id = is_select ? index :
uint(-1);
1932 bone_draw(drawtype,
false, ctx, bone, boneflag, select_id);
1954 bool draw_locked_weights =
false;
1963 bool is_pose_select =
false;
1986 if (is_pose_select) {
1995 (draw_ctx->
obact !=
nullptr))
1997 draw_locked_weights =
true;
2023 pchan = pchan->
next, index += 0x10000)
2025 Bone *bone = pchan->bone;
2035 const int select_id = is_pose_select ? index :
uint(-1);
2053 if (!draw_locked_weights) {
2058 if (!is_pose_select) {
2066 bone_draw(drawtype, use_custom_shape, ctx, bone_ptr, boneflag, select_id);
2069 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 srgb_to_linearrgb_v4(float linear[4], const float srgb[4])
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[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.
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()
Mesh & DRW_object_get_data_for_drawing(const Object &object)
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_editbone(const bArmature *armature, const EditBone *ebone)
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 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 draw_bone_name(const Armatures::DrawContext *ctx, const UnifiedBonePtr bone, const eBone_Flag boneflag)
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)