Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_armature.c
| Show First 20 Lines • Show All 1,280 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void draw_axes(ArmatureDrawContext *ctx, | static void draw_axes(ArmatureDrawContext *ctx, | ||||
| const EditBone *eBone, | const EditBone *eBone, | ||||
| const bPoseChannel *pchan, | const bPoseChannel *pchan, | ||||
| const bArmature *arm) | const bArmature *arm) | ||||
| { | { | ||||
| float final_col[4]; | float final_col[4]; | ||||
| const float *col = (ctx->const_color) ? ctx->const_color : | const float *col = (ctx->const_color) ? | ||||
| ctx->const_color : | |||||
| (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? G_draw.block.colorTextHi : | (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? G_draw.block.colorTextHi : | ||||
| G_draw.block.colorText; | G_draw.block.colorText; | ||||
| copy_v4_v4(final_col, col); | copy_v4_v4(final_col, col); | ||||
| /* Mix with axes color. */ | /* Mix with axes color. */ | ||||
| final_col[3] = (ctx->const_color) ? 1.0 : (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? 0.1 : 0.65; | final_col[3] = (ctx->const_color) ? 1.0 : (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? 0.1 : 0.65; | ||||
| if (pchan && pchan->custom && !(arm->flag & ARM_NO_CUSTOM)) { | if (pchan && pchan->custom && !(arm->flag & ARM_NO_CUSTOM)) { | ||||
| /* Special case: Custom bones can have different scale than the bone. | /* Special case: Custom bones can have different scale than the bone. | ||||
| * Recompute display matrix without the custom scaling applied. (T65640). */ | * Recompute display matrix without the custom scaling applied. (T65640). */ | ||||
| float axis_mat[4][4]; | float axis_mat[4][4]; | ||||
| ▲ Show 20 Lines • Show All 1,009 Lines • Show Last 20 Lines | |||||