Files
Rebornim 49bd4a1273 Polygon fill: review fixes
- A box drag always finishes: on release (even after a failed move), before
  any edit, undo, redo or tool change, and when a scripted box fails or
  starts while another drag is open. A camera move mid-drag (wheel zoom)
  keeps the drag and selects again from the new camera.
- A drag projects the mesh once, skips repaints whose box hasn't moved,
  and builds each grouping once; triangle edges are computed once.
- 2D clicks read the triangle from the set's UV G-buffer at the clicked
  texel, so collapsed UV faces can't take the click.
- Brush strokes no longer record the nearest-triangle buffer; only polygon
  fill asks for it (EyeDepth::render_with_triangles). Screen projection is
  shared through paint::screen_point.
- A box touching the view's edge or zero-size on whole pixels selects
  exactly the pixels it covers.
- Click fills never merge into a box drag's undo step; FillMode moves to
  its own file; partial box parameters get their own error.
2026-11-07 07:52:40 +00:00

18 lines
562 B
Rust

//! What one polygon fill target grows to.
use serde::{Deserialize, Serialize};
/// Polygon fill granularity: what a clicked triangle or a boxed polygon grows to
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)]
pub enum FillMode {
/// The triangle itself
#[default]
Triangle,
/// The source polygon (quad or n-gon) the importer split into triangles
Polygon,
/// The UV island: triangles sharing edges in UV space
UvIsland,
/// The connected geometry: triangles sharing edges by position
Mesh,
}