Fix T65893: Edit Mesh Culling
The edit mesh is culled by object. When the object is not visible on screen, the edit mesh may still be visible. This change will not cull the edit mesh anymore. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5144
This commit is contained in:
parent
5eb156e769
commit
0f983e8540
Notes:
blender-bot
2023-02-14 05:16:25 +01:00
Referenced by commit 71803f2c94
, Fix T69687: Edit Curve culling
Referenced by issue #65893, Object edit cage disappears whenever the deformed object is out of view area
|
@ -667,17 +667,17 @@ static void edit_mesh_add_ob_to_pass(Scene *scene,
|
|||
|
||||
geom_tris = DRW_mesh_batch_cache_get_edit_triangles(ob->data);
|
||||
geom_edges = DRW_mesh_batch_cache_get_edit_edges(ob->data);
|
||||
DRW_shgroup_call(edge_shgrp, geom_edges, ob);
|
||||
DRW_shgroup_call(face_shgrp, geom_tris, ob);
|
||||
DRW_shgroup_call_no_cull(edge_shgrp, geom_edges, ob);
|
||||
DRW_shgroup_call_no_cull(face_shgrp, geom_tris, ob);
|
||||
|
||||
if ((tsettings->selectmode & SCE_SELECT_VERTEX) != 0) {
|
||||
geom_verts = DRW_mesh_batch_cache_get_edit_vertices(ob->data);
|
||||
DRW_shgroup_call(vert_shgrp, geom_verts, ob);
|
||||
DRW_shgroup_call_no_cull(vert_shgrp, geom_verts, ob);
|
||||
}
|
||||
|
||||
if (facedot_shgrp && (tsettings->selectmode & SCE_SELECT_FACE) != 0) {
|
||||
geom_fcenter = DRW_mesh_batch_cache_get_edit_facedots(ob->data);
|
||||
DRW_shgroup_call(facedot_shgrp, geom_fcenter, ob);
|
||||
DRW_shgroup_call_no_cull(facedot_shgrp, geom_fcenter, ob);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -702,7 +702,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
|
|||
|
||||
if (do_show_weight) {
|
||||
geom = DRW_cache_mesh_surface_weights_get(ob);
|
||||
DRW_shgroup_call(g_data->fweights_shgrp, geom, ob);
|
||||
DRW_shgroup_call_no_cull(g_data->fweights_shgrp, geom, ob);
|
||||
}
|
||||
|
||||
if (do_show_mesh_analysis && !XRAY_ACTIVE(v3d)) {
|
||||
|
@ -713,30 +713,30 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
|
|||
if (is_original) {
|
||||
geom = DRW_cache_mesh_surface_mesh_analysis_get(ob);
|
||||
if (geom) {
|
||||
DRW_shgroup_call(g_data->mesh_analysis_shgrp, geom, ob);
|
||||
DRW_shgroup_call_no_cull(g_data->mesh_analysis_shgrp, geom, ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (do_occlude_wire || do_in_front) {
|
||||
geom = DRW_cache_mesh_surface_get(ob);
|
||||
DRW_shgroup_call(do_in_front ? g_data->depth_shgrp_hidden_wire_in_front :
|
||||
g_data->depth_shgrp_hidden_wire,
|
||||
geom,
|
||||
ob);
|
||||
DRW_shgroup_call_no_cull(do_in_front ? g_data->depth_shgrp_hidden_wire_in_front :
|
||||
g_data->depth_shgrp_hidden_wire,
|
||||
geom,
|
||||
ob);
|
||||
}
|
||||
|
||||
if (vnormals_do) {
|
||||
geom = DRW_mesh_batch_cache_get_edit_vertices(ob->data);
|
||||
DRW_shgroup_call(g_data->vnormals_shgrp, geom, ob);
|
||||
DRW_shgroup_call_no_cull(g_data->vnormals_shgrp, geom, ob);
|
||||
}
|
||||
if (lnormals_do) {
|
||||
geom = DRW_mesh_batch_cache_get_edit_lnors(ob->data);
|
||||
DRW_shgroup_call(g_data->lnormals_shgrp, geom, ob);
|
||||
DRW_shgroup_call_no_cull(g_data->lnormals_shgrp, geom, ob);
|
||||
}
|
||||
if (fnormals_do) {
|
||||
geom = DRW_mesh_batch_cache_get_edit_facedots(ob->data);
|
||||
DRW_shgroup_call(g_data->fnormals_shgrp, geom, ob);
|
||||
DRW_shgroup_call_no_cull(g_data->fnormals_shgrp, geom, ob);
|
||||
}
|
||||
|
||||
if (g_data->do_zbufclip) {
|
||||
|
|
Loading…
Reference in New Issue