Fix T59273: Text object disappears when Fill Mode is set to None
Reviewers: fclem Differential Revision: https://developer.blender.org/D4103
This commit is contained in:
parent
4563849c1b
commit
be98fcc6e2
Notes:
blender-bot
2023-02-14 08:08:56 +01:00
Referenced by issue #59387, Simple Crash Referenced by issue #59273, Text object disappears when Fill Mode set to None
|
@ -337,7 +337,8 @@ static void EDIT_TEXT_cache_populate(void *vedata, Object *ob)
|
|||
/* Get geometry cache */
|
||||
struct GPUBatch *geom;
|
||||
|
||||
if (cu->flag & CU_FAST) {
|
||||
bool has_surface = (cu->flag & (CU_FRONT | CU_BACK)) || cu->ext1 != 0.0f || cu->ext2 != 0.0f;
|
||||
if ((cu->flag & CU_FAST) || !has_surface) {
|
||||
geom = DRW_cache_text_edge_wire_get(ob);
|
||||
if (geom) {
|
||||
DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat);
|
||||
|
|
|
@ -2809,6 +2809,25 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case OB_FONT:
|
||||
{
|
||||
if (hide_object_extra) {
|
||||
break;
|
||||
}
|
||||
Curve *cu = (Curve *)ob->data;
|
||||
bool has_surface = (cu->flag & (CU_FRONT | CU_BACK)) || cu->ext1 != 0.0f || cu->ext2 != 0.0f;
|
||||
if (!has_surface) {
|
||||
struct GPUBatch *geom = DRW_cache_text_edge_wire_get(ob);
|
||||
if (geom) {
|
||||
if (theme_id == TH_UNDEFINED) {
|
||||
theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL);
|
||||
}
|
||||
DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(sgl, theme_id, sgl->wire);
|
||||
DRW_shgroup_call_object_add(shgroup, geom, ob);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue