2017-02-22 13:00:15 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright 2016, Blender Foundation.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Institute
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/** \file draw_armature.c
|
|
|
|
|
* \ingroup draw
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
|
|
#include "DNA_anim_types.h"
|
|
|
|
|
#include "DNA_armature_types.h"
|
|
|
|
|
#include "DNA_constraint_types.h"
|
|
|
|
|
#include "DNA_scene_types.h"
|
|
|
|
|
#include "DNA_screen_types.h"
|
|
|
|
|
#include "DNA_view3d_types.h"
|
|
|
|
|
#include "DNA_object_types.h"
|
|
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
#include "DRW_render.h"
|
|
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
#include "BLI_blenlib.h"
|
|
|
|
|
#include "BLI_math.h"
|
|
|
|
|
#include "BLI_dlrbTree.h"
|
|
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
|
|
|
|
|
#include "BKE_animsys.h"
|
|
|
|
|
#include "BKE_action.h"
|
|
|
|
|
#include "BKE_armature.h"
|
|
|
|
|
#include "BKE_global.h"
|
|
|
|
|
#include "BKE_modifier.h"
|
|
|
|
|
#include "BKE_nla.h"
|
|
|
|
|
#include "BKE_curve.h"
|
|
|
|
|
|
|
|
|
|
#include "BIF_gl.h"
|
|
|
|
|
|
|
|
|
|
#include "ED_armature.h"
|
|
|
|
|
#include "ED_keyframes_draw.h"
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
#include "GPU_select.h"
|
|
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
#include "UI_resources.h"
|
|
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
#include "draw_common.h"
|
2017-04-28 04:33:58 +10:00
|
|
|
#include "draw_manager_text.h"
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
#define BONE_VAR(eBone, pchan, var) ((eBone) ? (eBone->var) : (pchan->var))
|
|
|
|
|
#define BONE_FLAG(eBone, pchan) ((eBone) ? (eBone->flag) : (pchan->bone->flag))
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
/* Reset for drawing each armature object */
|
|
|
|
|
static struct {
|
|
|
|
|
/* Current armature object */
|
|
|
|
|
Object *ob;
|
|
|
|
|
/* Reset when changing current_armature */
|
|
|
|
|
DRWShadingGroup *bone_octahedral_solid;
|
|
|
|
|
DRWShadingGroup *bone_octahedral_wire;
|
|
|
|
|
DRWShadingGroup *bone_point_solid;
|
|
|
|
|
DRWShadingGroup *bone_point_wire;
|
|
|
|
|
DRWShadingGroup *bone_axes;
|
|
|
|
|
DRWShadingGroup *relationship_lines;
|
|
|
|
|
|
|
|
|
|
DRWPass *bone_solid;
|
|
|
|
|
DRWPass *bone_wire;
|
|
|
|
|
} g_data = {NULL};
|
2017-04-27 17:06:52 +10:00
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/** \name Shader Groups (DRW_shgroup)
|
|
|
|
|
* \{ */
|
|
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
/* Octahedral */
|
|
|
|
|
static void DRW_shgroup_bone_octahedral_solid(const float (*bone_mat)[4], const float color[4])
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
if (g_data.bone_octahedral_solid == NULL) {
|
2017-03-08 20:00:09 +01:00
|
|
|
struct Batch *geom = DRW_cache_bone_octahedral_get();
|
2017-04-27 18:17:47 +10:00
|
|
|
g_data.bone_octahedral_solid = shgroup_instance_objspace_solid(g_data.bone_solid, geom, g_data.ob->obmat);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
DRW_shgroup_call_dynamic_add(g_data.bone_octahedral_solid, bone_mat, color);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void DRW_shgroup_bone_octahedral_wire(const float (*bone_mat)[4], const float color[4])
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
if (g_data.bone_octahedral_wire == NULL) {
|
2017-03-08 20:00:09 +01:00
|
|
|
struct Batch *geom = DRW_cache_bone_octahedral_wire_outline_get();
|
2017-04-27 18:17:47 +10:00
|
|
|
g_data.bone_octahedral_wire = shgroup_instance_objspace_wire(g_data.bone_wire, geom, g_data.ob->obmat);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
DRW_shgroup_call_dynamic_add(g_data.bone_octahedral_wire, bone_mat, color);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-28 22:30:21 +10:00
|
|
|
/* Custom (geometry) */
|
|
|
|
|
|
|
|
|
|
static void DRW_shgroup_bone_custom_solid(const float (*bone_mat)[4], const float color[4], Object *custom)
|
|
|
|
|
{
|
|
|
|
|
/* grr, not re-using instances! */
|
|
|
|
|
struct Batch *geom = DRW_cache_object_surface_get(custom);
|
|
|
|
|
if (geom) {
|
|
|
|
|
DRWShadingGroup *shgrp_geom_solid = shgroup_instance_objspace_solid(g_data.bone_solid, geom, g_data.ob->obmat);
|
|
|
|
|
DRW_shgroup_call_dynamic_add(shgrp_geom_solid, bone_mat, color);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void DRW_shgroup_bone_custom_wire(const float (*bone_mat)[4], const float color[4], Object *custom)
|
|
|
|
|
{
|
|
|
|
|
/* grr, not re-using instances! */
|
|
|
|
|
struct Batch *geom = DRW_cache_object_wire_get(custom);
|
|
|
|
|
if (geom) {
|
|
|
|
|
DRWShadingGroup *shgrp_geom_wire = shgroup_instance_objspace_wire(g_data.bone_wire, geom, g_data.ob->obmat);
|
|
|
|
|
DRW_shgroup_call_dynamic_add(shgrp_geom_wire, bone_mat, color);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
/* Head and tail sphere */
|
|
|
|
|
static void DRW_shgroup_bone_point_solid(const float (*bone_mat)[4], const float color[4])
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
if (g_data.bone_point_solid == NULL) {
|
2017-03-08 20:00:09 +01:00
|
|
|
struct Batch *geom = DRW_cache_bone_point_get();
|
2017-04-27 18:17:47 +10:00
|
|
|
g_data.bone_point_solid = shgroup_instance_objspace_solid(g_data.bone_solid, geom, g_data.ob->obmat);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
DRW_shgroup_call_dynamic_add(g_data.bone_point_solid, bone_mat, color);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void DRW_shgroup_bone_point_wire(const float (*bone_mat)[4], const float color[4])
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
if (g_data.bone_point_wire == NULL) {
|
2017-03-08 20:00:09 +01:00
|
|
|
struct Batch *geom = DRW_cache_bone_point_wire_outline_get();
|
2017-04-27 18:17:47 +10:00
|
|
|
g_data.bone_point_wire = shgroup_instance_objspace_wire(g_data.bone_wire, geom, g_data.ob->obmat);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
DRW_shgroup_call_dynamic_add(g_data.bone_point_wire, bone_mat, color);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Axes */
|
|
|
|
|
static void DRW_shgroup_bone_axes(const float (*bone_mat)[4], const float color[4])
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
if (g_data.bone_axes == NULL) {
|
2017-03-08 20:00:09 +01:00
|
|
|
struct Batch *geom = DRW_cache_bone_arrows_get();
|
2017-04-27 18:17:47 +10:00
|
|
|
g_data.bone_axes = shgroup_instance_objspace_wire(g_data.bone_wire, geom, g_data.ob->obmat);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
DRW_shgroup_call_dynamic_add(g_data.bone_axes, bone_mat, color);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Relationship lines */
|
|
|
|
|
static void UNUSED_FUNCTION(DRW_shgroup_bone_relationship_lines)(const float head[3], const float tail[3])
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
DRW_shgroup_call_dynamic_add(g_data.relationship_lines, head);
|
|
|
|
|
DRW_shgroup_call_dynamic_add(g_data.relationship_lines, tail);
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 17:06:52 +10:00
|
|
|
/** \} */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/** \name Drawing Color Helpers
|
|
|
|
|
* \{ */
|
2017-02-22 13:00:15 +01:00
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
/**
|
|
|
|
|
* Follow `TH_*` naming except for mixed colors.
|
|
|
|
|
*/
|
|
|
|
|
static struct {
|
|
|
|
|
float select_color[4];
|
|
|
|
|
float edge_select_color[4];
|
|
|
|
|
float bone_select_color[4]; /* tint */
|
|
|
|
|
float wire_color[4];
|
|
|
|
|
float wire_edit_color[4];
|
|
|
|
|
float bone_solid_color[4];
|
|
|
|
|
float bone_active_unselect_color[4]; /* mix */
|
|
|
|
|
float bone_pose_color[4];
|
|
|
|
|
float bone_pose_active_color[4];
|
|
|
|
|
float bone_pose_active_unselect_color[4]; /* mix */
|
|
|
|
|
float text_hi_color[4];
|
|
|
|
|
float text_color[4];
|
|
|
|
|
float vertex_select_color[4];
|
|
|
|
|
float vertex_color[4];
|
|
|
|
|
|
|
|
|
|
/* not a theme, this is an override */
|
|
|
|
|
const float *const_color;
|
|
|
|
|
} g_theme;
|
|
|
|
|
|
|
|
|
|
/** See: 'set_pchan_color'*/
|
2017-02-22 13:00:15 +01:00
|
|
|
static void update_color(const float const_color[4])
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
g_theme.const_color = const_color;
|
|
|
|
|
|
2017-04-27 19:31:19 +10:00
|
|
|
#define NO_ALPHA(c) (((c)[3] = 1.0f), (c))
|
|
|
|
|
|
|
|
|
|
UI_GetThemeColor3fv(TH_SELECT, NO_ALPHA(g_theme.select_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_EDGE_SELECT, NO_ALPHA(g_theme.edge_select_color));
|
|
|
|
|
UI_GetThemeColorShade3fv(TH_EDGE_SELECT, -20, NO_ALPHA(g_theme.bone_select_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_WIRE, NO_ALPHA(g_theme.wire_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_WIRE_EDIT, NO_ALPHA(g_theme.wire_edit_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_BONE_SOLID, NO_ALPHA(g_theme.bone_solid_color));
|
|
|
|
|
UI_GetThemeColorBlendShade3fv(TH_WIRE_EDIT, TH_EDGE_SELECT, 0.15f, 0, NO_ALPHA(g_theme.bone_active_unselect_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_BONE_POSE, NO_ALPHA(g_theme.bone_pose_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_BONE_POSE_ACTIVE, NO_ALPHA(g_theme.bone_pose_active_color));
|
|
|
|
|
UI_GetThemeColorBlendShade3fv(TH_WIRE, TH_BONE_POSE, 0.15f, 0, NO_ALPHA(g_theme.bone_pose_active_unselect_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_TEXT_HI, NO_ALPHA(g_theme.text_hi_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_TEXT, NO_ALPHA(g_theme.text_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_VERTEX_SELECT, NO_ALPHA(g_theme.vertex_select_color));
|
|
|
|
|
UI_GetThemeColor3fv(TH_VERTEX, NO_ALPHA(g_theme.vertex_color));
|
|
|
|
|
|
|
|
|
|
#undef NO_ALPHA
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
static const float *get_bone_solid_color(const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm)
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
if (g_theme.const_color)
|
|
|
|
|
return g_theme.bone_solid_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
/* Edit Mode */
|
|
|
|
|
if (eBone) {
|
2017-04-27 18:17:47 +10:00
|
|
|
bool is_active = (arm->act_edbone == eBone);
|
|
|
|
|
if (eBone->flag & BONE_SELECTED) {
|
|
|
|
|
if (is_active) {
|
|
|
|
|
return g_theme.edge_select_color;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return g_theme.bone_select_color;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (arm->flag & ARM_POSEMODE) {
|
|
|
|
|
bool is_active = (arm->act_bone == pchan->bone);
|
|
|
|
|
if (pchan->bone->flag & BONE_SELECTED) {
|
|
|
|
|
if (is_active) {
|
|
|
|
|
return g_theme.bone_pose_active_color;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return g_theme.bone_pose_color;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
return g_theme.bone_solid_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
static const float *get_bone_wire_color(const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm)
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
if (g_theme.const_color)
|
|
|
|
|
return g_theme.const_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
if (eBone) {
|
2017-04-27 18:17:47 +10:00
|
|
|
bool is_active = (arm->act_edbone == eBone);
|
|
|
|
|
if (eBone->flag & BONE_SELECTED) {
|
|
|
|
|
if (is_active) {
|
|
|
|
|
return g_theme.edge_select_color;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return g_theme.bone_select_color;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (is_active) {
|
|
|
|
|
return g_theme.bone_active_unselect_color;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return g_theme.wire_edit_color;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
2017-04-27 18:17:47 +10:00
|
|
|
else if (arm->flag & ARM_POSEMODE) {
|
|
|
|
|
bool is_active = (arm->act_bone == pchan->bone);
|
|
|
|
|
if (pchan->bone->flag & BONE_SELECTED) {
|
|
|
|
|
if (is_active) {
|
|
|
|
|
return g_theme.bone_pose_active_color;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return g_theme.bone_pose_color;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (is_active) {
|
|
|
|
|
return g_theme.bone_pose_active_unselect_color;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return g_theme.wire_color;
|
|
|
|
|
}
|
2017-04-27 16:57:11 +10:00
|
|
|
}
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
|
2017-04-27 18:17:47 +10:00
|
|
|
return g_theme.vertex_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 17:06:52 +10:00
|
|
|
/** \} */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/** \name Helper Utils
|
|
|
|
|
* \{ */
|
2017-02-22 13:00:15 +01:00
|
|
|
|
2017-04-28 22:30:21 +10:00
|
|
|
static void draw_bone_update_disp_matrix_default(EditBone *eBone, bPoseChannel *pchan)
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
|
|
|
|
float s[4][4], ebmat[4][4];
|
|
|
|
|
float length;
|
|
|
|
|
float (*bone_mat)[4];
|
|
|
|
|
float (*disp_mat)[4];
|
|
|
|
|
float (*disp_tail_mat)[4];
|
|
|
|
|
|
|
|
|
|
/* TODO : This should be moved to depsgraph or armature refresh
|
|
|
|
|
* and not be tight to the draw pass creation.
|
|
|
|
|
* This would refresh armature without invalidating the draw cache */
|
|
|
|
|
if (pchan) {
|
|
|
|
|
length = pchan->bone->length;
|
|
|
|
|
bone_mat = pchan->pose_mat;
|
|
|
|
|
disp_mat = pchan->disp_mat;
|
|
|
|
|
disp_tail_mat = pchan->disp_tail_mat;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
eBone->length = len_v3v3(eBone->tail, eBone->head);
|
|
|
|
|
ED_armature_ebone_to_mat4(eBone, ebmat);
|
|
|
|
|
|
|
|
|
|
length = eBone->length;
|
|
|
|
|
bone_mat = ebmat;
|
|
|
|
|
disp_mat = eBone->disp_mat;
|
|
|
|
|
disp_tail_mat = eBone->disp_tail_mat;
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-28 22:30:21 +10:00
|
|
|
scale_m4_fl(s, length);
|
|
|
|
|
mul_m4_m4m4(disp_mat, bone_mat, s);
|
|
|
|
|
copy_m4_m4(disp_tail_mat, disp_mat);
|
|
|
|
|
translate_m4(disp_tail_mat, 0.0f, 1.0f, 0.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void draw_bone_update_disp_matrix_custom(bPoseChannel *pchan)
|
|
|
|
|
{
|
|
|
|
|
float s[4][4];
|
|
|
|
|
float length;
|
|
|
|
|
float (*bone_mat)[4];
|
|
|
|
|
float (*disp_mat)[4];
|
|
|
|
|
float (*disp_tail_mat)[4];
|
|
|
|
|
|
|
|
|
|
/* See TODO above */
|
|
|
|
|
length = PCHAN_CUSTOM_DRAW_SIZE(pchan);
|
|
|
|
|
bone_mat = pchan->pose_mat;
|
|
|
|
|
disp_mat = pchan->disp_mat;
|
|
|
|
|
disp_tail_mat = pchan->disp_tail_mat;
|
|
|
|
|
|
|
|
|
|
scale_m4_fl(s, length);
|
|
|
|
|
mul_m4_m4m4(disp_mat, bone_mat, s);
|
|
|
|
|
copy_m4_m4(disp_tail_mat, disp_mat);
|
|
|
|
|
translate_m4(disp_tail_mat, 0.0f, 1.0f, 0.0f);
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void draw_axes(EditBone *eBone, bPoseChannel *pchan)
|
|
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
const float *col = (g_theme.const_color) ? g_theme.const_color :
|
|
|
|
|
(BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? g_theme.text_hi_color : g_theme.text_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
DRW_shgroup_bone_axes(BONE_VAR(eBone, pchan, disp_tail_mat), col);
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
static void draw_points(
|
|
|
|
|
const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm,
|
|
|
|
|
const int select_id)
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
const float *col_solid_root = g_theme.bone_solid_color;
|
|
|
|
|
const float *col_solid_tail = g_theme.bone_solid_color;
|
|
|
|
|
const float *col_wire_root = (g_theme.const_color) ? g_theme.const_color : g_theme.vertex_color;
|
|
|
|
|
const float *col_wire_tail = (g_theme.const_color) ? g_theme.const_color : g_theme.vertex_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
/* Edit bone points can be selected */
|
|
|
|
|
if (eBone) {
|
|
|
|
|
if (eBone->flag & BONE_ROOTSEL) {
|
2017-04-27 18:17:47 +10:00
|
|
|
col_solid_root = g_theme.vertex_select_color;
|
|
|
|
|
col_wire_root = g_theme.vertex_select_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
if (eBone->flag & BONE_TIPSEL) {
|
2017-04-27 18:17:47 +10:00
|
|
|
col_solid_tail = g_theme.vertex_select_color;
|
|
|
|
|
col_wire_tail = g_theme.vertex_select_color;
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
}
|
2017-04-27 18:17:47 +10:00
|
|
|
else if (arm->flag & ARM_POSEMODE) {
|
|
|
|
|
col_solid_root = col_solid_tail = get_bone_solid_color(eBone, pchan, arm);
|
|
|
|
|
col_wire_root = col_wire_tail = get_bone_wire_color(eBone, pchan, arm);
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
/* Draw root point if we are not connected and parent are not hidden */
|
|
|
|
|
if ((BONE_FLAG(eBone, pchan) & BONE_CONNECTED) == 0) {
|
2017-04-26 16:11:37 +10:00
|
|
|
if (select_id != -1) {
|
|
|
|
|
DRW_select_load_id(select_id | BONESEL_ROOT);
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
if (eBone) {
|
|
|
|
|
if (!((eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent))) {
|
|
|
|
|
DRW_shgroup_bone_point_solid(eBone->disp_mat, col_solid_root);
|
|
|
|
|
DRW_shgroup_bone_point_wire(eBone->disp_mat, col_wire_root);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Bone *bone = pchan->bone;
|
|
|
|
|
if (!((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)))) {
|
|
|
|
|
DRW_shgroup_bone_point_solid(pchan->disp_mat, col_solid_root);
|
|
|
|
|
DRW_shgroup_bone_point_wire(pchan->disp_mat, col_wire_root);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Draw tip point */
|
2017-04-26 16:11:37 +10:00
|
|
|
if (select_id != -1) {
|
|
|
|
|
DRW_select_load_id(select_id | BONESEL_TIP);
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
DRW_shgroup_bone_point_solid(BONE_VAR(eBone, pchan, disp_tail_mat), col_solid_tail);
|
|
|
|
|
DRW_shgroup_bone_point_wire(BONE_VAR(eBone, pchan, disp_tail_mat), col_wire_tail);
|
2017-04-26 16:11:37 +10:00
|
|
|
|
|
|
|
|
if (select_id != -1) {
|
|
|
|
|
DRW_select_load_id(-1);
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 17:06:52 +10:00
|
|
|
/** \} */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/** \name Draw Bones
|
|
|
|
|
* \{ */
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
static void draw_bone_custom_shape(
|
2017-04-28 22:30:21 +10:00
|
|
|
EditBone *eBone, bPoseChannel *pchan, bArmature *arm,
|
|
|
|
|
const int select_id)
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-04-28 22:30:21 +10:00
|
|
|
const float *col_solid = get_bone_solid_color(eBone, pchan, arm);
|
|
|
|
|
const float *col_wire = get_bone_wire_color(eBone, pchan, arm);
|
|
|
|
|
const float (*disp_mat)[4] = pchan->custom_tx ? pchan->custom_tx->disp_mat : pchan->disp_mat;
|
|
|
|
|
|
|
|
|
|
if (select_id != -1) {
|
|
|
|
|
DRW_select_load_id(select_id | BONESEL_BONE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DRW_shgroup_bone_custom_solid(disp_mat, col_solid, pchan->custom);
|
|
|
|
|
DRW_shgroup_bone_custom_wire(disp_mat, col_wire, pchan->custom);
|
|
|
|
|
|
|
|
|
|
if (select_id != -1) {
|
|
|
|
|
DRW_select_load_id(-1);
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
static void draw_bone_envelope(
|
|
|
|
|
EditBone *UNUSED(eBone), bPoseChannel *UNUSED(pchan), bArmature *UNUSED(arm),
|
|
|
|
|
const int UNUSED(select_id))
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-02-23 11:14:19 +01:00
|
|
|
/* work in progress -- fclem */
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
static void draw_bone_line(
|
|
|
|
|
EditBone *UNUSED(eBone), bPoseChannel *UNUSED(pchan), bArmature *UNUSED(arm),
|
|
|
|
|
const int UNUSED(select_id))
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-02-23 11:14:19 +01:00
|
|
|
/* work in progress -- fclem */
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
static void draw_bone_wire(
|
|
|
|
|
EditBone *UNUSED(eBone), bPoseChannel *UNUSED(pchan), bArmature *UNUSED(arm),
|
|
|
|
|
const int UNUSED(select_id))
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-02-23 11:14:19 +01:00
|
|
|
/* work in progress -- fclem */
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
static void draw_bone_box(
|
|
|
|
|
EditBone *UNUSED(eBone), bPoseChannel *UNUSED(pchan), bArmature *UNUSED(arm),
|
|
|
|
|
const int UNUSED(select_id))
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
2017-02-23 11:14:19 +01:00
|
|
|
/* work in progress -- fclem */
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
static void draw_bone_octahedral(
|
|
|
|
|
EditBone *eBone, bPoseChannel *pchan, bArmature *arm,
|
|
|
|
|
const int select_id)
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
|
|
|
|
const float *col_solid = get_bone_solid_color(eBone, pchan, arm);
|
|
|
|
|
const float *col_wire = get_bone_wire_color(eBone, pchan, arm);
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
if (select_id != -1) {
|
|
|
|
|
DRW_select_load_id(select_id | BONESEL_BONE);
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
DRW_shgroup_bone_octahedral_solid(BONE_VAR(eBone, pchan, disp_mat), col_solid);
|
|
|
|
|
DRW_shgroup_bone_octahedral_wire(BONE_VAR(eBone, pchan, disp_mat), col_wire);
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
if (select_id != -1) {
|
|
|
|
|
DRW_select_load_id(-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
draw_points(eBone, pchan, arm, select_id);
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 17:06:52 +10:00
|
|
|
/** \} */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/** \name Main Draw Loops
|
|
|
|
|
* \{ */
|
|
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
static void draw_armature_edit(Object *ob)
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
|
|
|
|
EditBone *eBone;
|
|
|
|
|
bArmature *arm = ob->data;
|
2017-04-26 22:25:38 +10:00
|
|
|
int index;
|
2017-04-27 02:04:56 +10:00
|
|
|
const bool is_select = DRW_state_is_select();
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
update_color(NULL);
|
|
|
|
|
|
2017-04-28 04:33:58 +10:00
|
|
|
const bool show_text = DRW_state_show_text();
|
|
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
for (eBone = arm->edbo->first, index = 0; eBone; eBone = eBone->next, index++) {
|
|
|
|
|
if (eBone->layer & arm->layer) {
|
|
|
|
|
if ((eBone->flag & BONE_HIDDEN_A) == 0) {
|
2017-04-26 16:11:37 +10:00
|
|
|
const int select_id = is_select ? index : (unsigned int)-1;
|
2017-02-22 13:00:15 +01:00
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
if (arm->drawtype == ARM_ENVELOPE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(eBone, NULL);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_envelope(eBone, NULL, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else if (arm->drawtype == ARM_LINE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(eBone, NULL);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_line(eBone, NULL, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else if (arm->drawtype == ARM_WIRE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(eBone, NULL);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_wire(eBone, NULL, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else if (arm->drawtype == ARM_B_BONE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(eBone, NULL);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_box(eBone, NULL, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(eBone, NULL);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_octahedral(eBone, NULL, arm, select_id);
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
|
2017-04-28 04:33:58 +10:00
|
|
|
/* Draw names of bone */
|
|
|
|
|
if (show_text && (arm->flag & ARM_DRAWNAMES)) {
|
|
|
|
|
unsigned char color[4];
|
|
|
|
|
UI_GetThemeColor4ubv((eBone->flag & BONE_SELECTED) ? TH_TEXT_HI : TH_TEXT, color);
|
|
|
|
|
|
|
|
|
|
float vec[3];
|
|
|
|
|
mid_v3_v3v3(vec, eBone->head, eBone->tail);
|
|
|
|
|
mul_m4_v3(ob->obmat, vec);
|
|
|
|
|
|
|
|
|
|
struct DRWTextStore *dt = DRW_text_cache_ensure();
|
|
|
|
|
DRW_text_cache_add(
|
|
|
|
|
dt, vec, eBone->name, strlen(eBone->name),
|
|
|
|
|
10, DRW_TEXT_CACHE_GLOBALSPACE | DRW_TEXT_CACHE_STRING_PTR, color);
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
/* Draw additional axes */
|
2017-04-26 16:11:37 +10:00
|
|
|
if (arm->flag & ARM_DRAWAXES) {
|
2017-02-22 13:00:15 +01:00
|
|
|
draw_axes(eBone, NULL);
|
2017-04-26 16:11:37 +10:00
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* if const_color is NULL do pose mode coloring */
|
2017-03-08 20:00:09 +01:00
|
|
|
static void draw_armature_pose(Object *ob, const float const_color[4])
|
2017-02-22 13:00:15 +01:00
|
|
|
{
|
|
|
|
|
bArmature *arm = ob->data;
|
|
|
|
|
bPoseChannel *pchan;
|
2017-04-26 22:25:38 +10:00
|
|
|
int index = -1;
|
2017-02-22 13:00:15 +01:00
|
|
|
Bone *bone;
|
|
|
|
|
|
|
|
|
|
update_color(const_color);
|
|
|
|
|
|
|
|
|
|
/* We can't safely draw non-updated pose, might contain NULL bone pointers... */
|
|
|
|
|
if (ob->pose->flag & POSE_RECALC) {
|
|
|
|
|
BKE_pose_rebuild(ob, arm);
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-26 22:39:12 +10:00
|
|
|
// if (!(base->flag & OB_FROMDUPLI)) // TODO
|
|
|
|
|
{
|
|
|
|
|
if (ob->mode & OB_MODE_POSE) {
|
|
|
|
|
arm->flag |= ARM_POSEMODE;
|
|
|
|
|
}
|
2017-04-26 22:25:38 +10:00
|
|
|
|
2017-04-26 22:39:12 +10:00
|
|
|
if (arm->flag & ARM_POSEMODE) {
|
|
|
|
|
index = ob->base_selection_color;
|
2017-04-26 22:25:38 +10:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-28 04:33:58 +10:00
|
|
|
const bool is_pose_select = (arm->flag & ARM_POSEMODE) && DRW_state_is_select();
|
|
|
|
|
const bool show_text = DRW_state_show_text();
|
2017-04-26 22:39:12 +10:00
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
/* being set below */
|
|
|
|
|
arm->layer_used = 0;
|
|
|
|
|
|
|
|
|
|
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
|
|
|
|
|
bone = pchan->bone;
|
|
|
|
|
arm->layer_used |= bone->layer;
|
|
|
|
|
|
|
|
|
|
/* bone must be visible */
|
|
|
|
|
if ((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) {
|
|
|
|
|
if (bone->layer & arm->layer) {
|
2017-04-26 22:39:12 +10:00
|
|
|
const int select_id = is_pose_select ? index : (unsigned int)-1;
|
2017-02-22 13:00:15 +01:00
|
|
|
|
|
|
|
|
|
2017-04-26 16:11:37 +10:00
|
|
|
if ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM)) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_custom(pchan);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_custom_shape(NULL, pchan, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else if (arm->drawtype == ARM_ENVELOPE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(NULL, pchan);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_envelope(NULL, pchan, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else if (arm->drawtype == ARM_LINE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(NULL, pchan);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_line(NULL, pchan, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else if (arm->drawtype == ARM_WIRE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(NULL, pchan);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_wire(NULL, pchan, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else if (arm->drawtype == ARM_B_BONE) {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(NULL, pchan);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_box(NULL, pchan, arm, select_id);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2017-04-28 22:30:21 +10:00
|
|
|
draw_bone_update_disp_matrix_default(NULL, pchan);
|
2017-04-26 16:11:37 +10:00
|
|
|
draw_bone_octahedral(NULL, pchan, arm, select_id);
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
|
2017-04-28 04:33:58 +10:00
|
|
|
/* Draw names of bone */
|
|
|
|
|
if (show_text && (arm->flag & ARM_DRAWNAMES)) {
|
|
|
|
|
unsigned char color[4];
|
|
|
|
|
UI_GetThemeColor4ubv((arm->flag & ARM_POSEMODE) &&
|
|
|
|
|
(pchan->bone->flag & BONE_SELECTED) ? TH_TEXT_HI : TH_TEXT, color);
|
|
|
|
|
float vec[3];
|
|
|
|
|
mid_v3_v3v3(vec, pchan->pose_head, pchan->pose_tail);
|
|
|
|
|
mul_m4_v3(ob->obmat, vec);
|
|
|
|
|
|
|
|
|
|
struct DRWTextStore *dt = DRW_text_cache_ensure();
|
|
|
|
|
DRW_text_cache_add(
|
|
|
|
|
dt, vec, pchan->name, strlen(pchan->name),
|
|
|
|
|
10, DRW_TEXT_CACHE_GLOBALSPACE | DRW_TEXT_CACHE_STRING_PTR, color);
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-22 13:00:15 +01:00
|
|
|
/* Draw additional axes */
|
2017-04-28 04:33:58 +10:00
|
|
|
if (arm->flag & ARM_DRAWAXES) {
|
2017-02-22 13:00:15 +01:00
|
|
|
draw_axes(NULL, pchan);
|
2017-04-28 04:33:58 +10:00
|
|
|
}
|
2017-04-26 22:25:38 +10:00
|
|
|
|
2017-04-26 22:39:12 +10:00
|
|
|
if (is_pose_select) {
|
2017-04-26 22:25:38 +10:00
|
|
|
index += 0x10000;
|
|
|
|
|
}
|
2017-02-22 13:00:15 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-04-26 22:25:38 +10:00
|
|
|
|
|
|
|
|
arm->flag &= ~ARM_POSEMODE;
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
2017-04-27 17:06:52 +10:00
|
|
|
/**
|
|
|
|
|
* This function set the object space to use for all subsequent `DRW_shgroup_bone_*` calls.
|
|
|
|
|
*/
|
2017-03-08 20:00:09 +01:00
|
|
|
static void DRW_shgroup_armature(
|
2017-04-22 16:11:12 +10:00
|
|
|
Object *ob, DRWPass *pass_bone_solid, DRWPass *pass_bone_wire,
|
|
|
|
|
DRWShadingGroup *shgrp_relationship_lines)
|
2017-03-08 20:00:09 +01:00
|
|
|
{
|
2017-04-27 18:17:47 +10:00
|
|
|
memset(&g_data, 0x0, sizeof(g_data));
|
|
|
|
|
g_data.ob = ob;
|
|
|
|
|
|
|
|
|
|
g_data.bone_solid = pass_bone_solid;
|
|
|
|
|
g_data.bone_wire = pass_bone_wire;
|
|
|
|
|
g_data.relationship_lines = shgrp_relationship_lines;
|
2017-03-08 20:00:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DRW_shgroup_armature_object(
|
2017-04-22 16:11:12 +10:00
|
|
|
Object *ob, SceneLayer *sl, DRWPass *pass_bone_solid, DRWPass *pass_bone_wire,
|
|
|
|
|
DRWShadingGroup *shgrp_relationship_lines)
|
2017-03-08 20:00:09 +01:00
|
|
|
{
|
|
|
|
|
float *color;
|
2017-03-21 17:47:22 +01:00
|
|
|
DRW_object_wire_theme_get(ob, sl, &color);
|
2017-03-08 20:00:09 +01:00
|
|
|
|
|
|
|
|
DRW_shgroup_armature(ob, pass_bone_solid, pass_bone_wire, shgrp_relationship_lines);
|
|
|
|
|
draw_armature_pose(ob, color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DRW_shgroup_armature_pose(
|
2017-04-22 16:11:12 +10:00
|
|
|
Object *ob, DRWPass *pass_bone_solid, DRWPass *pass_bone_wire,
|
|
|
|
|
DRWShadingGroup *shgrp_relationship_lines)
|
2017-03-08 20:00:09 +01:00
|
|
|
{
|
|
|
|
|
DRW_shgroup_armature(ob, pass_bone_solid, pass_bone_wire, shgrp_relationship_lines);
|
|
|
|
|
draw_armature_pose(ob, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DRW_shgroup_armature_edit(
|
2017-04-22 16:11:12 +10:00
|
|
|
Object *ob, DRWPass *pass_bone_solid, DRWPass *pass_bone_wire,
|
|
|
|
|
DRWShadingGroup *shgrp_relationship_lines)
|
2017-03-08 20:00:09 +01:00
|
|
|
{
|
|
|
|
|
DRW_shgroup_armature(ob, pass_bone_solid, pass_bone_wire, shgrp_relationship_lines);
|
|
|
|
|
draw_armature_edit(ob);
|
2017-04-22 16:11:12 +10:00
|
|
|
}
|
2017-04-27 17:06:52 +10:00
|
|
|
|
|
|
|
|
/** \} */
|