Fix T104381: Assert on Circle Select end modal
`em_setup_vivewcontext` cannot be used in this function now as it expects `obedit` to be a mesh. It also duplicated the viewcontext init. Instead `BKE_editmesh_from_object` is called only when type is a mesh.
This commit is contained in:
@@ -4751,11 +4751,11 @@ static void view3d_circle_select_recalc(void *user_data)
|
||||
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
|
||||
ViewContext vc;
|
||||
ED_view3d_viewcontext_init(C, &vc, depsgraph);
|
||||
em_setup_viewcontext(C, &vc);
|
||||
|
||||
if (vc.obedit) {
|
||||
switch (vc.obedit->type) {
|
||||
case OB_MESH: {
|
||||
vc.em = BKE_editmesh_from_object(vc.obedit);
|
||||
FOREACH_OBJECT_IN_MODE_BEGIN (
|
||||
vc.scene, vc.view_layer, vc.v3d, vc.obact->type, vc.obact->mode, ob_iter) {
|
||||
ED_view3d_viewcontext_init_object(&vc, ob_iter);
|
||||
|
||||
Reference in New Issue
Block a user