Armature: temp workaround for crash caused by custom bone drawing

This commit is contained in:
Clément Foucault 2018-12-18 13:07:33 +01:00
parent 604f5cf3f4
commit 77d9ddc5ea
Notes: blender-bot 2023-02-14 06:17:14 +01:00
Referenced by issue #59554, Crash drawing armature with custom bone shapes
1 changed files with 5 additions and 0 deletions

View File

@ -318,6 +318,8 @@ static void drw_shgroup_bone_envelope(
/* Custom (geometry) */
extern void drw_batch_cache_generate_requested(Object *custom);
static void drw_shgroup_bone_custom_solid(
const float (*bone_mat)[4],
const float bone_color[4], const float hint_color[4], const float outline_color[4],
@ -329,6 +331,9 @@ static void drw_shgroup_bone_custom_solid(
struct GPUBatch *ledges = DRW_cache_object_loose_edges_get(custom);
float final_bonemat[4][4];
/* XXXXXXX needs to be moved elsewhere. */
drw_batch_cache_generate_requested(custom);
if (surf || edges || ledges) {
mul_m4_m4m4(final_bonemat, g_data.ob->obmat, bone_mat);
}