mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-18 23:27:22 +00:00
49bd4a1273
- 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.
18 lines
562 B
Rust
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,
|
|
}
|