Fix immediate mesh modifications that don't call set_mesh
Mesh_instance_2d has no way to know when the mesh had been modified unless you called set_mesh. This meant that you could modify the underlying mesh without it knowing which could result in incorrect result.
Modified mesh_instance_2d to be more similar to mesh_instance_3d which connects to the changed signal of the mesh and reacts occordingly.
Resolves 94151
I've investigated this much deeper and in the cases when it disappears, its getting skipped in _attach_canvas_item_for_draw because p_clip_rect.intersects(p_global_rect, true) returns no intersection. The values for p_clip_rect look fine but p_global_rect has a position that looks suspect. Still working on why it is wrong though.
I've investigated this much deeper and in the cases when it disappears, its getting skipped in
_attach_canvas_item_for_drawbecausep_clip_rect.intersects(p_global_rect, true)returns no intersection. The values forp_clip_rectlook fine butp_global_recthas a position that looks suspect. Still working on why it is wrong though.
I suspect the bounding rect isn't updated if we don't queue a redraw
I've investigated this much deeper and in the cases when it disappears, its getting skipped in
_attach_canvas_item_for_drawbecausep_clip_rect.intersects(p_global_rect, true)returns no intersection. The values forp_clip_rectlook fine butp_global_recthas a position that looks suspect. Still working on why it is wrong though.I suspect the bounding rect isn't updated if we don't queue a redraw
Yup. That is what happens.
Thanks!