Fix T59640: Transform w/ auto-merge & hidden verts crashes
[blender.git] / source / blender / bmesh / intern / bmesh_operators.c
index 546bd9fb461fdf280b68cd062ef79f63c2a7ceb0..61a86070f76cc433e0844f7982a55c79a332837d 100644 (file)
@@ -1847,7 +1847,12 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
                                                        BMO_slot_buffer_from_disabled_hflag(bm, op, op->slots_in, slot_name, htype, va_arg(vlist, int));
                                                }
                                                else if (type == 'a') {
-                                                       BMO_slot_buffer_from_all(bm, op, op->slots_in, slot_name, htype);
+                                                       if ((op->flag & BMO_FLAG_RESPECT_HIDE) == 0) {
+                                                               BMO_slot_buffer_from_all(bm, op, op->slots_in, slot_name, htype);
+                                                       }
+                                                       else {
+                                                               BMO_slot_buffer_from_disabled_hflag(bm, op, op->slots_in, slot_name, htype, BM_ELEM_HIDDEN);
+                                                       }
                                                }
                                                else if (type == 'f') {
                                                        BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_in, slot_name, htype, va_arg(vlist, int));