54 #define BONE_VAR(eBone, pchan, var) ((eBone) ? (eBone->var) : (pchan->var))
55 #define BONE_FLAG(eBone, pchan) ((eBone) ? (eBone->flag) : (pchan->bone->flag))
57 #define PT_DEFAULT_RAD 0.05f
157 for (
int i = 0; i < 2; i++) {
172 DRWPass *armature_ps = *p_armature_ps;
177 DRWPass *armature_transp_ps = *p_armature_trans_ps;
179 #define BUF_INSTANCE DRW_shgroup_call_buffer_instance
180 #define BUF_LINE(grp, format) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_LINES)
181 #define BUF_POINT(grp, format) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_POINTS)
304 data->amin_a = aminx;
305 data->amin_b = aminz;
306 data->amax_a = amaxx;
307 data->amax_b = amaxz;
314 CLAMP(b, 0.0f, 2.0f);
315 return (
float)((int)(
a * 255) | ((int)(b * 255) << 8));
334 const float (*bone_mat)[4],
335 const float bone_color[4],
336 const float hint_color[4],
337 const float outline_color[4])
346 if (outline_color[3] > 0.0f) {
354 const float (*bone_mat)[4],
355 const float bone_color[4],
356 const float hint_color[4],
357 const float outline_color[4])
366 if (outline_color[3] > 0.0f) {
374 const float (*bone_mat)[4],
375 const float color[4])
377 float head[3], tail[3];
388 const float (*bone_mat)[4],
389 const float col_wire[4],
390 const float col_bone[4],
391 const float col_head[4],
392 const float col_tail[4])
394 float head[3], tail[3];
404 const float (*bone_mat)[4],
405 const float *radius_head,
406 const float *radius_tail,
410 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
411 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
421 head_sph[3] = *radius_head * obscale;
423 tail_sph[3] = *radius_tail * obscale;
430 const float (*bone_mat)[4],
431 const float bone_col[4],
432 const float hint_col[4],
433 const float outline_col[4],
434 const float *radius_head,
435 const float *radius_tail)
437 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
438 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
447 head_sph[3] = *radius_head * obscale;
448 tail_sph[3] = *radius_tail * obscale;
450 if (head_sph[3] < 0.0f || tail_sph[3] < 0.0f) {
452 if (head_sph[3] < 0.0f) {
468 if (outline_col[3] > 0.0f) {
477 float fac_head = (
len - head_sph[3]) /
len;
478 float fac_tail = (
len - tail_sph[3]) /
len;
480 if (
len > (tail_sph[3] + head_sph[3]) + 1e-8f) {
487 if (outline_col[3] > 0.0f) {
493 float fac =
max_ff(fac_head, 1.0f - fac_tail);
504 if (outline_col[3] > 0.0f) {
531 const float (*bone_mat)[4],
532 const float bone_color[4],
533 const float hint_color[4],
534 const float outline_color[4],
547 if (surf || edges || ledges) {
576 const float (*bone_mat)[4],
577 const float color[4],
600 const float (*bone_mat)[4],
601 const float color[4],
604 const float final_color[4] = {color[0], color[1], color[2], 1.0f};
626 const float (*bone_mat)[4],
627 const float bone_color[4],
628 const float hint_color[4],
629 const float outline_color[4])
638 if (outline_color[3] > 0.0f) {
646 const float (*bone_mat)[4],
647 const float color[4])
658 const float start[3],
660 const float color[4])
670 const float start[3],
677 const float start[3],
684 const float start[3],
691 const float start[3],
719 short color_index = 0;
722 if (
ELEM(
NULL, ob, arm, pose, pchan)) {
743 if (color_index > 0) {
745 ctx->
bcolor = &btheme->
tarm[(color_index - 1)];
747 else if (color_index == -1) {
761 r = offset + (int)cp[0];
763 g = offset + (int)cp[1];
765 b = offset + (int)cp[2];
777 const short constflag,
780 float *fcolor = r_color;
877 const short constflag)
884 static float disp_color[4];
903 const short constflag)
911 static float consts_color[4];
939 const short constflag)
941 static float disp_color[4];
987 hint_color[3] = 1.0f;
995 const short constflag)
997 static float hint_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
1003 const float *wire_color =
get_bone_wire_color(ctx, eBone, pchan, arm, boneflag, constflag);
1035 float(*bone_mat)[4];
1036 float(*disp_mat)[4];
1037 float(*disp_tail_mat)[4];
1069 for (eBone = arm->
edbo->
first; eBone; eBone = eBone->
next) {
1073 for (eBone = arm->
edbo->
first; eBone; eBone = eBone->
next) {
1085 float imat[4][4], bonemat[4][4];
1088 memset(¶m, 0,
sizeof(param));
1191 float s[4][4], ebmat[4][4];
1192 float length, xwidth, zwidth;
1193 float(*bone_mat)[4];
1194 short bbone_segments;
1224 if (bbone_segments > 1) {
1227 for (
int i = bbone_segments; i--; bbones_mat++) {
1239 if (bbone_segments > 1) {
1242 for (
int i = bbone_segments; i--; bbones_mat++) {
1259 float(*bone_mat)[4];
1260 float(*disp_mat)[4];
1261 float(*disp_tail_mat)[4];
1292 float axis_mat[4][4];
1301 float disp_mat[4][4];
1313 const short constflag,
1314 const int select_id)
1316 float col_solid_root[4], col_solid_tail[4], col_wire_root[4], col_wire_tail[4];
1317 float col_hint_root[4], col_hint_tail[4];
1325 const float envelope_ignore = -1.0f;
1340 const float *wire_color =
get_bone_wire_color(ctx, eBone, pchan, arm, boneflag, constflag);
1353 if (select_id != -1) {
1358 if (is_envelope_draw) {
1373 if (is_envelope_draw) {
1389 if (select_id != -1) {
1393 if (is_envelope_draw) {
1405 ctx,
BONE_VAR(eBone, pchan, disp_tail_mat), col_solid_tail, col_hint_tail, col_wire_tail);
1408 if (select_id != -1) {
1424 const short constflag,
1425 const int select_id)
1432 if (select_id != -1) {
1449 if (select_id != -1) {
1459 const short constflag,
1460 const int select_id)
1463 ctx, eBone, pchan, arm, boneflag, constflag);
1467 float *rad_head, *rad_tail, *
distance;
1487 if (select_id != -1) {
1492 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_solid, col_hint, col_wire, rad_head, rad_tail);
1494 if (select_id != -1) {
1498 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1506 const short constflag,
1507 const int select_id)
1510 ctx, eBone, pchan, arm, boneflag, constflag);
1512 const float no_display[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1513 const float *col_head = no_display;
1514 const float *col_tail = col_bone;
1517 col_wire = no_display;
1518 col_bone = col_head = col_tail = ctx->
const_color;
1539 col_head = col_bone;
1544 if (select_id == -1) {
1547 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, col_bone, col_head, col_tail);
1553 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, col_bone, no_display, no_display);
1555 if (col_head[3] > 0.0f) {
1558 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, no_display, col_head, no_display);
1563 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, no_display, no_display, col_tail);
1574 const short constflag,
1575 const int select_id)
1579 if (select_id != -1) {
1587 for (
int i = pchan->
bone->
segments; i--; bbones_mat++) {
1592 for (
int i = 0; i < eBone->
segments; i++) {
1597 if (select_id != -1) {
1602 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1611 const short constflag,
1612 const int select_id)
1615 ctx, eBone, pchan, arm, boneflag, constflag);
1619 if (select_id != -1) {
1627 for (
int i = pchan->
bone->
segments; i--; bbones_mat++) {
1632 for (
int i = 0; i < eBone->
segments; i++) {
1637 if (select_id != -1) {
1642 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1651 const short constflag,
1652 const int select_id)
1655 ctx, eBone, pchan, arm, boneflag, constflag);
1659 if (select_id != -1) {
1664 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_solid, col_hint, col_wire);
1666 if (select_id != -1) {
1670 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1682 float tmp[4][4], posetrans[4][4];
1683 float xminmax[2], zminmax[2];
1709 tmp[1][1] = -tmp[1][1];
1717 &inst_data, xminmax[0], zminmax[0], xminmax[1], zminmax[1]);
1745 const bool only_temp,
1746 const int constflag)
1750 float *line_start =
NULL, *line_end =
NULL;
1757 switch (con->
type) {
1772 while (parchan->
parent) {
1774 if (segcount ==
data->rootbone || segcount > 255) {
1777 parchan = parchan->
parent;
1805 while (parchan->
parent) {
1808 if (segcount ==
data->chainlen || segcount > 255) {
1811 parchan = parchan->
parent;
1814 if (parchan != pchan) {
1829 const short constflag)
1831 if (ebone && ebone->
parent) {
1841 else if (pchan && pchan->
parent) {
1887 (pchan) ? pchan->
name : eBone->
name,
1888 (pchan) ? strlen(pchan->
name) : strlen(eBone->
name),
1918 eBone = eBone->
next, index += 0x10000) {
1921 const int select_id = is_select ? index : (
uint)-1;
1922 const short constflag = 0;
1925 int boneflag = eBone->
flag;
1981 bool draw_locked_weights =
false;
1988 bool is_pose_select =
false;
2011 if (is_pose_select) {
2020 draw_locked_weights =
true;
2049 const int select_id = is_pose_select ? index : (
uint)-1;
2050 const short constflag = pchan->
constflag;
2058 int boneflag = bone->
flag;
2060 boneflag = bone->
flag;
2070 if (!draw_locked_weights) {
2122 const bool do_envelope_dist,
2123 const bool is_edit_mode,
2124 const bool is_pose_mode,
2125 const float *const_color)
2127 const bool is_object_mode = !do_envelope_dist;
2130 const bool draw_as_wire = (ob->
dt <
OB_SOLID);
2132 const bool is_transparent = pd->
armature.
transparent || (draw_as_wire && !is_object_mode);
2136 static const float select_const_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
2174 (is_edit_mode | is_pose_mode);
2179 ((!is_filled || is_transparent) ? 1.0f : 0.0f));
2227 if (ob_mesh_deform) {
2254 for (
int i = 0; i < 2; i++) {
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
int BKE_pchan_bbone_spline_compute(struct BBoneSplineParameters *param, const bool for_deform, Mat4 *result_array)
void BKE_pchan_bbone_spline_setup(struct bPoseChannel *pchan, const bool rest, const bool for_deform, Mat4 *result_array)
struct Object * BKE_modifiers_is_deformed_by_armature(struct Object *ob)
struct Object * BKE_modifiers_is_deformed_by_meshdeform(struct Object *ob)
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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 rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
bool invert_m4(float R[4][4])
void mul_m4_v4(const float M[4][4], float r[4])
void mul_m4_m4m3(float R[4][4], const float A[4][4], const float B[3][3])
void unit_m4(float m[4][4])
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])
float mat4_to_scale(const float M[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3])
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])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t)
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])
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
struct Object * DEG_get_original_object(struct Object *object)
#define PCHAN_CUSTOM_DRAW_SIZE(pchan)
@ BONE_DRAW_LOCKED_WEIGHT
@ BONE_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.
#define V3D_HIDE_HELPLINES
#define V3D_SELECT_OUTLINE
@ V3D_OVERLAY_BONE_SELECT
#define DRW_buffer_add_entry(buffer,...)
@ DRW_STATE_IN_FRONT_SELECT
@ DRW_STATE_DEPTH_LESS_EQUAL
#define DRW_PASS_CREATE(pass, state)
#define DRW_shgroup_call(shgroup, geom, ob)
#define EBONE_VISIBLE(arm, ebone)
#define XRAY_FLAG_ENABLED(v3d)
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
struct GPUShader GPUShader
Group RGB to Bright Vector Camera CLAMP
struct bTheme * UI_GetTheme(void)
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
void ED_armature_ebone_to_mat4(EditBone *ebone, float r_mat[4][4])
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
static CCL_NAMESPACE_BEGIN const double alpha
GPUBatch * DRW_cache_bone_octahedral_wire_get(void)
GPUBatch * DRW_cache_object_all_edges_get(Object *ob)
GPUBatch * DRW_cache_bone_dof_lines_get(void)
GPUBatch * DRW_cache_object_edge_detection_get(Object *ob, bool *r_is_manifold)
GPUBatch * DRW_cache_bone_box_get(void)
GPUBatch * DRW_cache_bone_octahedral_get(void)
GPUBatch * DRW_cache_bone_point_wire_outline_get(void)
GPUBatch * DRW_cache_bone_stick_get(void)
GPUBatch * DRW_cache_bone_envelope_outline_get(void)
GPUBatch * DRW_cache_bone_envelope_solid_get(void)
GPUBatch * DRW_cache_bone_point_get(void)
GPUBatch * DRW_cache_bone_box_wire_get(void)
GPUBatch * DRW_cache_object_surface_get(Object *ob)
GPUBatch * DRW_cache_object_loose_edges_get(struct Object *ob)
GPUBatch * DRW_cache_bone_dof_sphere_get(void)
int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color)
bool DRW_state_is_select(void)
bool DRW_state_show_text(void)
bool DRW_state_is_fbo(void)
const DRWContextState * DRW_context_state_get(void)
struct DRWTextStore * DRW_text_cache_ensure(void)
void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value)
void DRW_shgroup_uniform_block(DRWShadingGroup *shgroup, const char *name, const GPUUniformBuf *ubo)
void DRW_shgroup_state_disable(DRWShadingGroup *shgroup, DRWState state)
void DRW_buffer_add_entry_struct(DRWCallBuffer *callbuf, const void *data)
void DRW_shgroup_state_enable(DRWShadingGroup *shgroup, DRWState state)
DRWCallBuffer * DRW_shgroup_call_buffer_instance(DRWShadingGroup *shgroup, struct GPUVertFormat *format, GPUBatch *geom)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_vec4_copy(DRWShadingGroup *shgroup, const char *name, const float *value)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
void DRW_draw_pass(DRWPass *pass)
void DRW_select_load_id(uint id)
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])
@ DRW_TEXT_CACHE_GLOBALSPACE
@ DRW_TEXT_CACHE_STRING_PTR
void *(* MEM_mallocN)(size_t len, const char *str)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
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 drw_shgroup_bone_ik_spline_lines(ArmatureDrawContext *ctx, const float start[3], const float end[3])
static void draw_bone_update_disp_matrix_bbone(EditBone *eBone, bPoseChannel *pchan)
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])
#define BONE_VAR(eBone, pchan, var)
void drw_batch_cache_validate(Object *custom)
static void ebone_spline_preview(EditBone *ebone, const float result_array[MAX_BBONE_SUBDIV][4][4])
void drw_batch_cache_generate_requested_delayed(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 const float * get_bone_hint_color(const ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm, const int boneflag, const short constflag)
static void draw_bone_box(ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id)
static bool POSE_is_driven_by_active_armature(Object *ob)
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_armature_in_front_draw(OVERLAY_Data *vedata)
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)
bool OVERLAY_armature_is_pose_mode(Object *ob, const DRWContextState *draw_ctx)
void OVERLAY_edit_armature_cache_populate(OVERLAY_Data *vedata, Object *ob)
static void draw_bone_degrees_of_freedom(ArmatureDrawContext *ctx, bPoseChannel *pchan)
static void draw_bone_relations(ArmatureDrawContext *ctx, EditBone *ebone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag)
void OVERLAY_armature_cache_finish(OVERLAY_Data *vedata)
void OVERLAY_bone_instance_data_set_color_hint(BoneInstanceData *data, const float hint_color[4])
static void drw_shgroup_bone_relationship_lines_ex(ArmatureDrawContext *ctx, const float start[3], const float end[3], const float color[4])
void OVERLAY_armature_cache_init(OVERLAY_Data *vedata)
static void draw_armature_pose(ArmatureDrawContext *ctx)
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 void drw_shgroup_bone_relationship_lines(ArmatureDrawContext *ctx, const float start[3], const float end[3])
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 draw_bone_update_disp_matrix_default(EditBone *eBone, bPoseChannel *pchan)
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 draw_bone_wire(ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id)
static void drw_shgroup_bone_ik_no_target_lines(ArmatureDrawContext *ctx, const float start[3], const float end[3])
static void edbo_compute_bbone_child(bArmature *arm)
struct ArmatureDrawContext ArmatureDrawContext
void OVERLAY_pose_armature_cache_populate(OVERLAY_Data *vedata, Object *ob)
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 bone_hint_color_shade(float hint_color[4], const float color[4])
static void drw_shgroup_bone_wire(ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4])
static void drw_shgroup_bone_custom_wire(ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4], Object *custom)
void OVERLAY_pose_cache_populate(OVERLAY_Data *vedata, Object *ob)
static void draw_axes(ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm)
#define BONE_FLAG(eBone, pchan)
static void bone_locked_color_shade(float color[4])
void OVERLAY_armature_cache_populate(OVERLAY_Data *vedata, Object *ob)
static bool set_pchan_color(const ArmatureDrawContext *ctx, short colCode, const int boneflag, const short constflag, float r_color[4])
static void draw_bone_octahedral(ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag, const int select_id)
static void draw_armature_edit(ArmatureDrawContext *ctx)
static float encode_2f_to_float(float a, float b)
#define BUF_LINE(grp, format)
static void bone_instance_data_set_angle_minmax(BoneInstanceData *data, const float aminx, const float aminz, const float amaxx, const float amaxz)
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_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 draw_points(ArmatureDrawContext *ctx, const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm, const int boneflag, const short constflag, const int select_id)
static void draw_bone_name(ArmatureDrawContext *ctx, EditBone *eBone, bPoseChannel *pchan, bArmature *arm, const int boneflag)
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 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 pchan_draw_data_init(bPoseChannel *pchan)
void OVERLAY_pose_draw(OVERLAY_Data *vedata)
static void set_pchan_colorset(ArmatureDrawContext *ctx, Object *ob, bPoseChannel *pchan)
static float get_bone_wire_thickness(const ArmatureDrawContext *ctx, int boneflag)
static void drw_shgroup_bone_ik_lines(ArmatureDrawContext *ctx, const float start[3], const float end[3])
void OVERLAY_armature_draw(OVERLAY_Data *vedata)
static void cp_shade_color3ub(uchar cp[3], const int offset)
static void drw_shgroup_bone_axes(ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4])
static void pchan_draw_ik_lines(ArmatureDrawContext *ctx, bPoseChannel *pchan, const bool only_temp, const int constflag)
static void draw_bone_update_disp_matrix_custom(bPoseChannel *pchan)
void OVERLAY_bone_instance_data_set_color(BoneInstanceData *data, const float bone_color[4])
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)
BLI_INLINE DRWCallBuffer * custom_bone_instance_shgroup(ArmatureDrawContext *ctx, DRWShadingGroup *grp, struct GPUBatch *custom_geom)
static void drw_shgroup_bone_custom_empty(ArmatureDrawContext *ctx, const float(*bone_mat)[4], const float color[4], Object *custom)
GPUShader * OVERLAY_shader_armature_degrees_of_freedom_wire(void)
GPUShader * OVERLAY_shader_armature_sphere(bool use_outline)
GPUShader * OVERLAY_shader_armature_degrees_of_freedom_solid(void)
GPUShader * OVERLAY_shader_armature_shape_wire(void)
GPUShader * OVERLAY_shader_armature_shape(bool use_outline)
GPUShader * OVERLAY_shader_armature_wire(void)
GPUShader * OVERLAY_shader_armature_envelope(bool use_outline)
GPUShader * OVERLAY_shader_uniform_color(void)
GPUShader * OVERLAY_shader_armature_stick(void)
OVERLAY_InstanceFormats * OVERLAY_shader_instance_formats_get(void)
DRWShadingGroup * custom_outline
GHash * custom_shapes_ghash
DRWCallBuffer * envelope_distance
DRWCallBuffer * dof_lines
DRWCallBuffer * point_solid
DRWCallBuffer * dof_sphere
const float * const_color
const ThemeWireColor * bcolor
OVERLAY_ExtraCallBuffers * extras
DRWShadingGroup * custom_solid
DRWCallBuffer * point_outline
DRWCallBuffer * envelope_solid
DRWCallBuffer * envelope_outline
DRWShadingGroup * custom_wire
struct ViewLayer * view_layer
struct Object * object_pose
struct GPUUniformBuf * block_ubo
struct EditBone * bbone_child
float disp_bbone_mat[32][4][4]
struct EditBone * bbone_next
float disp_tail_mat[4][4]
struct EditBone * bbone_prev
float colorBonePoseTarget[4]
float colorBoneIKLineSpline[4]
float colorBoneIKLineNoTarget[4]
float colorBonePoseActive[4]
float colorBonePoseActiveUnsel[4]
float colorVertexSelect[4]
float colorBoneActiveUnsel[4]
float colorBonePoseConstraint[4]
float colorBonePoseSplineIK[4]
DRWCallBuffer * envelope_distance
DRWCallBuffer * point_outline
GHash * custom_shapes_ghash
DRWCallBuffer * octa_solid
DRWCallBuffer * octa_transp
DRWCallBuffer * box_transp
DRWCallBuffer * octa_outline
DRWShadingGroup * custom_transp
DRWCallBuffer * box_solid
DRWCallBuffer * envelope_outline
GHash * custom_shapes_transp_ghash
DRWCallBuffer * dof_sphere
DRWCallBuffer * point_solid
DRWCallBuffer * envelope_solid
DRWShadingGroup * custom_outline
DRWCallBuffer * point_transp
DRWCallBuffer * box_outline
DRWShadingGroup * custom_wire
DRWShadingGroup * custom_solid
DRWCallBuffer * envelope_transp
DRWCallBuffer * dof_lines
OVERLAY_StorageList * stl
OVERLAY_FramebufferList * fbl
struct GPUFrameBuffer * overlay_line_in_front_fb
struct GPUFrameBuffer * overlay_default_fb
DRWPass * armature_bone_select_ps
DRWPass * armature_transp_ps[2]
OVERLAY_ExtraCallBuffers extra_call_buffers[2]
struct OVERLAY_PrivateData::@245 armature
DRWShadingGroup * armature_bone_select_grp
OVERLAY_ArmatureCallBuffers armature_call_buffers[2]
DRWShadingGroup * armature_bone_select_act_grp
struct OVERLAY_PrivateData * pd
struct Object * proxy_from
struct ToolSettings * toolsettings
struct EditBone * act_edbone
struct bConstraint * next
float bbone_matrix[0][4][4]
bPoseChannelDrawData * draw_data
struct bPoseChannel * parent
struct bPoseChannel * custom_tx
struct bPoseChannel * next
float disp_tail_mat[4][4]
ccl_device_inline float distance(const float2 &a, const float2 &b)