44 #define BONE_VAR(eBone, pchan, var) ((eBone) ? (eBone->var) : (pchan->var))
45 #define BONE_FLAG(eBone, pchan) ((eBone) ? (eBone->flag) : (pchan->bone->flag))
47 #define PT_DEFAULT_RAD 0.05f
129 const bool use_wire_alpha = (wire_alpha < 1.0f);
148 for (
int i = 0; i < 2; i++) {
163 DRWPass *armature_ps = *p_armature_ps;
168 DRWPass *armature_transp_ps = *p_armature_trans_ps;
170 #define BUF_INSTANCE DRW_shgroup_call_buffer_instance
171 #define BUF_LINE(grp, format) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_LINES)
172 #define BUF_POINT(grp, format) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_POINTS)
209 if (use_wire_alpha) {
228 if (use_wire_alpha) {
247 if (use_wire_alpha) {
266 if (use_wire_alpha) {
283 if (use_wire_alpha) {
302 if (use_wire_alpha) {
338 if (use_wire_alpha) {
359 if (use_wire_alpha) {
381 if (use_wire_alpha) {
405 data->amin_a = aminx;
406 data->amin_b = aminz;
407 data->amax_a = amaxx;
408 data->amax_b = amaxz;
416 return (
float)((int)(
a * 255) | ((int)(
b * 255) << 8));
435 const float (*bone_mat)[4],
436 const float bone_color[4],
437 const float hint_color[4],
438 const float outline_color[4])
447 if (outline_color[3] > 0.0f) {
455 const float (*bone_mat)[4],
456 const float bone_color[4],
457 const float hint_color[4],
458 const float outline_color[4])
467 if (outline_color[3] > 0.0f) {
475 const float (*bone_mat)[4],
476 const float color[4])
478 float head[3], tail[3];
489 const float (*bone_mat)[4],
490 const float col_wire[4],
491 const float col_bone[4],
492 const float col_head[4],
493 const float col_tail[4])
495 float head[3], tail[3];
505 const float (*bone_mat)[4],
506 const float *radius_head,
507 const float *radius_tail,
511 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
512 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
522 head_sph[3] = *radius_head * obscale;
524 tail_sph[3] = *radius_tail * obscale;
531 const float (*bone_mat)[4],
532 const float bone_col[4],
533 const float hint_col[4],
534 const float outline_col[4],
535 const float *radius_head,
536 const float *radius_tail)
538 float head_sph[4] = {0.0f, 0.0f, 0.0f, 1.0f}, tail_sph[4] = {0.0f, 1.0f, 0.0f, 1.0f};
539 float xaxis[4] = {1.0f, 0.0f, 0.0f, 1.0f};
548 head_sph[3] = *radius_head * obscale;
549 tail_sph[3] = *radius_tail * obscale;
551 if (head_sph[3] < 0.0f || tail_sph[3] < 0.0f) {
553 if (head_sph[3] < 0.0f) {
569 if (outline_col[3] > 0.0f) {
578 float fac_head = (
len - head_sph[3]) /
len;
579 float fac_tail = (
len - tail_sph[3]) /
len;
581 if (
len > (tail_sph[3] + head_sph[3]) + 1e-8f) {
588 if (outline_col[3] > 0.0f) {
594 float fac =
max_ff(fac_head, 1.0f - fac_tail);
605 if (outline_col[3] > 0.0f) {
633 const float (*bone_mat)[4],
634 const float bone_color[4],
635 const float hint_color[4],
636 const float outline_color[4],
649 if (surf || edges || ledges) {
679 const float (*bone_mat)[4],
680 const float color[4],
703 const float (*bone_mat)[4],
704 const float outline_color[4],
736 const float (*bone_mat)[4],
737 const float bone_color[4],
738 const float hint_color[4],
739 const float outline_color[4],
749 ctx,
mesh, bone_mat, bone_color, hint_color, outline_color, custom);
759 const float (*bone_mat)[4],
760 const float color[4],
776 const float (*bone_mat)[4],
777 const float color[4],
802 const float (*bone_mat)[4],
803 const float bone_color[4],
804 const float hint_color[4],
805 const float outline_color[4])
814 if (outline_color[3] > 0.0f) {
822 const float (*bone_mat)[4],
823 const float color[4])
834 const float start[3],
836 const float color[4])
846 const float start[3],
853 const float start[3],
860 const float start[3],
868 const float start[3],
896 short color_index = 0;
899 if (
ELEM(
NULL, ob, arm, pose, pchan)) {
920 if (color_index > 0) {
922 ctx->
bcolor = &btheme->
tarm[(color_index - 1)];
924 else if (color_index == -1) {
954 const short constflag,
957 float *fcolor = r_color;
1054 const short constflag)
1061 static float disp_color[4];
1080 const short constflag)
1088 static float consts_color[4];
1096 return consts_color;
1116 const short constflag)
1118 static float disp_color[4];
1164 hint_color[3] = 1.0f;
1172 const short constflag)
1174 static float hint_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
1180 const float *wire_color =
get_bone_wire_color(ctx, eBone, pchan, arm, boneflag, constflag);
1211 float bone_scale[3];
1212 float(*bone_mat)[4];
1213 float(*disp_mat)[4];
1214 float(*disp_tail_mat)[4];
1246 for (eBone = arm->
edbo->
first; eBone; eBone = eBone->
next) {
1250 for (eBone = arm->
edbo->
first; eBone; eBone = eBone->
next) {
1262 float imat[4][4], bonemat[4][4];
1265 memset(¶m, 0,
sizeof(param));
1375 float s[4][4], ebmat[4][4];
1376 float length, xwidth, zwidth;
1377 float(*bone_mat)[4];
1378 short bbone_segments;
1408 if (bbone_segments > 1) {
1411 for (
int i = bbone_segments; i--; bbones_mat++) {
1423 if (bbone_segments > 1) {
1426 for (
int i = bbone_segments; i--; bbones_mat++) {
1442 float bone_scale[3];
1443 float(*bone_mat)[4];
1444 float(*disp_mat)[4];
1445 float(*disp_tail_mat)[4];
1446 float rot_mat[3][3];
1483 float axis_mat[4][4];
1492 float disp_mat[4][4];
1504 const short constflag,
1505 const int select_id)
1507 float col_solid_root[4], col_solid_tail[4], col_wire_root[4], col_wire_tail[4];
1508 float col_hint_root[4], col_hint_tail[4];
1516 const float envelope_ignore = -1.0f;
1531 const float *wire_color =
get_bone_wire_color(ctx, eBone, pchan, arm, boneflag, constflag);
1544 if (select_id != -1) {
1549 if (is_envelope_draw) {
1564 if (is_envelope_draw) {
1580 if (select_id != -1) {
1584 if (is_envelope_draw) {
1596 ctx,
BONE_VAR(eBone, pchan, disp_tail_mat), col_solid_tail, col_hint_tail, col_wire_tail);
1599 if (select_id != -1) {
1615 const short constflag,
1616 const int select_id)
1623 if (select_id != -1) {
1640 if (select_id != -1) {
1650 const short constflag,
1651 const int select_id)
1654 ctx, eBone, pchan, arm, boneflag, constflag);
1658 float *rad_head, *rad_tail, *
distance;
1678 if (select_id != -1) {
1683 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_solid, col_hint, col_wire, rad_head, rad_tail);
1685 if (select_id != -1) {
1689 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1697 const short constflag,
1698 const int select_id)
1701 ctx, eBone, pchan, arm, boneflag, constflag);
1703 const float no_display[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1704 const float *col_head = no_display;
1705 const float *col_tail = col_bone;
1708 col_wire = no_display;
1709 col_bone = col_head = col_tail = ctx->
const_color;
1730 col_head = col_bone;
1735 if (select_id == -1) {
1738 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, col_bone, col_head, col_tail);
1744 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, col_bone, no_display, no_display);
1746 if (col_head[3] > 0.0f) {
1749 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, no_display, col_head, no_display);
1754 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_wire, no_display, no_display, col_tail);
1765 const short constflag,
1766 const int select_id)
1770 if (select_id != -1) {
1778 for (
int i = pchan->
bone->
segments; i--; bbones_mat++) {
1783 for (
int i = 0; i < eBone->
segments; i++) {
1788 if (select_id != -1) {
1793 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1802 const short constflag,
1803 const int select_id)
1806 ctx, eBone, pchan, arm, boneflag, constflag);
1810 if (select_id != -1) {
1818 for (
int i = pchan->
bone->
segments; i--; bbones_mat++) {
1823 for (
int i = 0; i < eBone->
segments; i++) {
1828 if (select_id != -1) {
1833 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1842 const short constflag,
1843 const int select_id)
1846 ctx, eBone, pchan, arm, boneflag, constflag);
1850 if (select_id != -1) {
1855 ctx,
BONE_VAR(eBone, pchan, disp_mat), col_solid, col_hint, col_wire);
1857 if (select_id != -1) {
1861 draw_points(ctx, eBone, pchan, arm, boneflag, constflag, select_id);
1873 float tmp[4][4], posetrans[4][4];
1874 float xminmax[2], zminmax[2];
1900 tmp[1][1] = -tmp[1][1];
1908 &inst_data, xminmax[0], zminmax[0], xminmax[1], zminmax[1]);
1936 const bool only_temp,
1937 const int constflag)
1941 float *line_start =
NULL, *line_end =
NULL;
1948 switch (con->
type) {
1963 while (parchan->
parent) {
1965 if (segcount ==
data->rootbone || segcount > 255) {
1968 parchan = parchan->
parent;
1996 while (parchan->
parent) {
1999 if (segcount ==
data->chainlen || segcount > 255) {
2002 parchan = parchan->
parent;
2005 if (parchan != pchan) {
2020 const short constflag)
2022 if (ebone && ebone->
parent) {
2032 else if (pchan && pchan->
parent) {
2078 (pchan) ? pchan->
name : eBone->
name,
2079 (pchan) ? strlen(pchan->
name) : strlen(eBone->
name),
2158 const float scale = 1.1f;
2185 for (
int i = pchan->
bone->
segments; i--; bbones_mat++) {
2204 const float scale = 1.2f;
2232 eBone = eBone->
next, index += 0x10000) {
2235 const int select_id = is_select ? index : (
uint)-1;
2236 const short constflag = 0;
2239 int boneflag = eBone->
flag;
2299 bool draw_locked_weights =
false;
2306 bool is_pose_select =
false;
2329 if (is_pose_select) {
2338 draw_locked_weights =
true;
2370 const int select_id = is_pose_select ? index : (
uint)-1;
2371 const short constflag = pchan->
constflag;
2380 int boneflag = bone->
flag;
2390 if (!draw_locked_weights) {
2394 if (!is_pose_select) {
2436 if (!is_pose_select) {
2459 const bool do_envelope_dist,
2460 const bool is_edit_mode,
2461 const bool is_pose_mode,
2462 const float *const_color)
2464 const bool is_object_mode = !do_envelope_dist;
2467 const bool draw_as_wire = (ob->
dt <
OB_SOLID);
2469 const bool is_transparent = pd->
armature.
transparent || (draw_as_wire && !is_object_mode);
2474 static const float select_const_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
2509 (is_edit_mode | is_pose_mode);
2514 ((!is_filled || is_transparent) ? 1.0f : 0.0f));
2559 if (ob_mesh_deform) {
2586 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)
void BKE_pchan_minmax(const struct Object *ob, const struct bPoseChannel *pchan, const bool use_empty_drawtype, float r_min[3], float r_max[3])
void BKE_pchan_bbone_spline_setup(struct bPoseChannel *pchan, bool rest, bool for_deform, Mat4 *result_array)
int BKE_pchan_bbone_spline_compute(struct BBoneSplineParameters *param, 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)
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_evaluated_mesh_no_subsurf(const struct Object *object)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
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
#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_size_max_axis(const float M[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])
void mat4_to_size(float size[3], const float M[4][4])
void eulO_to_mat3(float mat[3][3], const float eul[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 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])
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])
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)
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
#define INIT_MINMAX(min, max)
#define UNUSED_VARS_NDEBUG(...)
struct Object * DEG_get_original_object(struct Object *object)
#define PCHAN_CUSTOM_BONE_LENGTH(pchan)
@ BONE_DRAW_LOCKED_WEIGHT
@ 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.
@ V3D_OVERLAY_BONE_SELECT
#define V3D_HIDE_HELPLINES
#define V3D_SELECT_OUTLINE
#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_uniform_block(shgroup, name, ubo)
#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 Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
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
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
GPUBatch * DRW_cache_bone_octahedral_wire_get(void)
GPUBatch * DRW_cache_curve_edge_wire_get(Object *ob)
GPUBatch * DRW_cache_bone_dof_lines_get(void)
GPUBatch * DRW_cache_text_edge_wire_get(Object *ob)
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_bone_dof_sphere_get(void)
struct GPUBatch * DRW_mesh_batch_cache_get_edge_detection(struct Mesh *me, bool *r_is_manifold)
void DRW_mesh_batch_cache_validate(struct Object *object, struct Mesh *me)
struct GPUBatch * DRW_mesh_batch_cache_get_loose_edges(struct Mesh *me)
struct GPUBatch * DRW_mesh_batch_cache_get_all_edges(struct Mesh *me)
void DRW_curve_batch_cache_validate(struct Curve *cu)
struct GPUBatch * DRW_mesh_batch_cache_get_surface(struct Mesh *me)
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_state_disable(DRWShadingGroup *shgroup, DRWState state)
const DRWView * DRW_view_default_get(void)
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)
bool DRW_culling_sphere_test(const DRWView *view, const BoundSphere *bsphere)
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
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_gpu_kernel_postfix ccl_global float int int int int sh
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float3 pow(float3 v, float e)
T length(const vec_base< T, Size > &a)
T distance(const T &a, const T &b)
SymEdge< T > * prev(const SymEdge< T > *se)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
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 bool pchan_culling_test_with_radius_scale(const DRWView *view, const Object *ob, const bPoseChannel *pchan, const float scale)
static bool pchan_culling_test_octohedral(const DRWView *view, const Object *ob, const bPoseChannel *pchan)
static void pchan_culling_calc_bsphere(const Object *ob, const bPoseChannel *pchan, BoundSphere *r_bsphere)
static void draw_bone_relations(ArmatureDrawContext *ctx, EditBone *ebone, bPoseChannel *pchan, bArmature *arm, const int boneflag, const short constflag)
static bool pchan_culling_test_wire(const DRWView *view, const Object *ob, const bPoseChannel *pchan)
static bool pchan_culling_test_bbone(const DRWView *view, const Object *ob, const bPoseChannel *pchan)
void OVERLAY_armature_cache_finish(OVERLAY_Data *vedata)
static void drw_shgroup_bone_custom_mesh_wire(ArmatureDrawContext *ctx, Mesh *mesh, const float(*bone_mat)[4], const float color[4], Object *custom)
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 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 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 drw_shgroup_custom_bone_curve(ArmatureDrawContext *ctx, Curve *curve, const float(*bone_mat)[4], const float outline_color[4], Object *custom)
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 bool pchan_culling_test_custom(const DRWView *view, const Object *ob, const bPoseChannel *pchan)
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 bool pchan_culling_test_simple(const DRWView *view, const Object *ob, const bPoseChannel *pchan)
static void set_pchan_colorset(ArmatureDrawContext *ctx, Object *ob, bPoseChannel *pchan)
static bool pchan_culling_test_envelope(const DRWView *view, const Object *ob, const 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 bool pchan_culling_test_line(const DRWView *view, const Object *ob, const bPoseChannel *pchan)
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
float4 color_bone_pose_active_unsel
float4 color_vertex_select
float4 color_bone_active_unsel
float4 color_bone_ik_line_no_target
float4 color_bone_pose_constraint
float4 color_bone_pose_target
float4 color_bone_pose_active
float4 color_bone_pose_ik
float4 color_bone_ik_line
float4 color_bone_ik_line_spline
float4 color_bone_pose_spline_ik
DRWShadingGroup * custom_outline
GHash * custom_shapes_ghash
DRWShadingGroup * custom_fill
DRWCallBuffer * point_fill
DRWShadingGroup * custom_wire
DRWCallBuffer * envelope_distance
DRWCallBuffer * envelope_outline
DRWCallBuffer * octa_fill
DRWCallBuffer * dof_lines
DRWCallBuffer * point_outline
DRWCallBuffer * octa_outline
DRWCallBuffer * box_outline
DRWCallBuffer * envelope_fill
DRWCallBuffer * dof_sphere
OVERLAY_ArmatureCallBuffersInner transp
OVERLAY_ArmatureCallBuffersInner solid
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::@256 armature
DRWShadingGroup * armature_bone_select_grp
OVERLAY_ArmatureCallBuffers armature_call_buffers[2]
DRWShadingGroup * armature_bone_select_act_grp
struct OVERLAY_PrivateData * pd
struct ToolSettings * toolsettings
struct EditBone * act_edbone
struct bConstraint * next
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 disp_tail_mat[4][4]