diff --git a/crates/engine/src/tool_cmds.rs b/crates/engine/src/tool_cmds.rs index a890113d..c4eb8e22 100644 --- a/crates/engine/src/tool_cmds.rs +++ b/crates/engine/src/tool_cmds.rs @@ -42,7 +42,7 @@ pub fn specs() -> Vec { "Brush settings", [], None, - "{size?: 0..100, flow?: 0..100, opacity?: 0..100, spacing?: 1..1000, hardness?: 0..100, angle?, followPath?, alignment?: tangent|camera, lazy?, jitterSize?, jitterAngle?, jitterFlow?, jitterPosition?, alpha?: procedural name | {image: resource name} | {library: id (alpha.list)}, alphaSizeX?: 5..100 and alphaSizeY?: 5..100 (percent of the stamp the alpha fills), alphaRoundness?: 0..100 (Round alpha only: 100 circle, 0 square), alphaContrast?: 1..8, alphaInvert?, backfaceCulling?, angleFade?: [from, to] degrees 0..90 (culled faces fade out between them), screenSpace? (the size follows the view), stampDepth?: 0.05..4, symmetryOn? (the toolbar toggle; off keeps the settings), symmetryX?, symmetryY?, symmetryZ?, symmetryRadial?: 0..32 copies around symmetryAxis?: x|y|z (default y), symmetryOffset?: [x, y, z] (world units from the mesh center, where the mirror planes and radial axis cross), symmetryAngleSpan?: 0..360 degrees the radial copies spread over, minSize?, sizePressure? (default true: pen pressure shrinks the size towards minSize), smudgeStrength?: 0..100, cloneSource?: composite|layer (what the Clone tool copies), cloneAligned? (default true: the first stroke fixes the offset to the source for the following strokes; false: every stroke starts sampling at the source point), particles?: {enabled?, count?: 1..16, lifetime?: 1..128 steps, gravity?: 0..2}}", + "{size?: 0..100, flow?: 0..100, opacity?: 0..100, spacing?: 1..1000, hardness?: 0..100, angle?, followPath?, alignment?: tangent|camera, lazy?, jitterSize?, jitterAngle?, jitterFlow?, jitterPosition?, alpha?: procedural name | {image: resource name} | {library: id (alpha.list)}, alphaSizeX?: 5..100 and alphaSizeY?: 5..100 (percent of the stamp the alpha fills), alphaRoundness?: 0..100 (Round alpha only: 100 circle, 0 square), alphaContrast?: 1..8, alphaInvert?, backfaceCulling?, angleFade?: [from, to] degrees 0..90 (culled faces fade out between them), screenSpace? (the size follows the view), stampDepth?: 0.05..4, symmetryOn? (the toolbar toggle; off keeps the settings), symmetryX?, symmetryY?, symmetryZ?, symmetryRadial?: 0..32 copies around symmetryAxis?: x|y|z (default y), symmetryOffset?: [x, y, z] (world units from the mesh center, where the mirror planes and radial axis cross), symmetryAngleSpan?: 0..360 degrees the radial copies spread over, minSize?, sizePressure? (default true: pen pressure shrinks the size towards minSize), smudgeStrength?: 0..100, cloneSource?: composite|layer (what the Clone tool copies), cloneAligned? (default true: the first stroke fixes the offset to the source for the following strokes; false: every stroke starts sampling at the source point)}", always, brush ), @@ -137,6 +137,10 @@ fn select(s: &mut Session, p: &Value) -> Result { /// Brush values use the UI's 0–100 scales, so agents and the sliders speak the same numbers fn brush(session: &mut Session, params: &Value) -> Result { + if params.get("particles").is_some() { + return Err(bad("tool.brush", "particle brush settings are no longer supported")); + } + let mut settings = session.tool.brush.clone(); let percent = |key: &str| f32p(params, key).map(|value| value / PERCENT); @@ -267,14 +271,6 @@ fn brush(session: &mut Session, params: &Value) -> Result { settings.screen_space = value; } - if let Some(particle_params) = params.get("particles") { - let particles = &mut settings.particles; - particles.enabled = boolp(particle_params, "enabled").unwrap_or(particles.enabled); - particles.count = f32p(particle_params, "count").map_or(particles.count, |value| value as u32); - particles.lifetime = f32p(particle_params, "lifetime").map_or(particles.lifetime, |value| value as u32); - particles.gravity = f32p(particle_params, "gravity").unwrap_or(particles.gravity); - } - let clone_from = if let Some(value) = strp(params, "cloneSource") { match value { "composite" => CloneFrom::Composite, @@ -323,7 +319,7 @@ pub(crate) fn brush_json(session: &Session) -> Value { "stampDepth": settings.depth, "symmetry": [settings.symmetry.x, settings.symmetry.y, settings.symmetry.z], "radialSymmetry": { "copies": settings.symmetry.radial, "axis": (["x", "y", "z"].get(settings.symmetry.axis as usize)) }, "symmetryOffset": settings.symmetry.offset, "symmetryOn": settings.symmetry.enabled, "symmetryAngleSpan": settings.symmetry.angle_span, - "material": session.tool.material, "smudgeStrength": session.tool.smudge_strength * PERCENT, "particles": settings.particles, + "material": session.tool.material, "smudgeStrength": session.tool.smudge_strength * PERCENT, "cloneSource": if session.tool.clone_from == CloneFrom::Layer { "layer" } else { "composite" }, "cloneAligned": session.tool.clone_aligned, }) diff --git a/crates/engine/tests/it/path_tool.rs b/crates/engine/tests/it/path_tool.rs index a17442bd..54e58efb 100644 --- a/crates/engine/tests/it/path_tool.rs +++ b/crates/engine/tests/it/path_tool.rs @@ -1,5 +1,4 @@ -//! The Path tool (stroked and filled paths, 3D and 2D) and the particle brush, driven through -//! engine commands the way agents paint. +//! The Path tool (stroked and filled paths, 3D and 2D) and brush symmetry, driven through commands. use serde_json::{Value, json}; use texturecraft_engine::core::Channel; @@ -139,37 +138,6 @@ fn wall() -> Mesh { m } -/// Painted texel rows (v) after one particle dab at the wall's center. -fn particle_rows() -> Vec { - let mut s = session(wall()); - execute(&mut s, "tool.brush", &json!({"size": 10, "particles": {"enabled": true, "count": 6, "lifetime": 40, "gravity": 1.5}})).unwrap(); - let hit = s.pick(Vec2::new(200.0, 200.0), s.viewport).unwrap(); - assert!((hit.uv.y - 0.5).abs() < 0.02, "{hit:?}"); - execute(&mut s, "tool.stroke", &json!({"points": [[200, 200]]})).unwrap(); - let mut rows = Vec::new(); - for y in 0..RES as u32 { - for x in 0..RES as u32 { - let c = s.caches[0].composite.value(Channel::BaseColor, x, y); - if c[0] > 0.85 && c[1] < 0.5 { - rows.push(y); - } - } - } - rows -} - -#[test] -fn particle_brush_paints_below_the_start_and_is_deterministic() { - let rows = particle_rows(); - assert!(!rows.is_empty()); - let start = (0.5 * RES) as u32; - let lowest = rows.iter().max().copied().unwrap(); - let highest = rows.iter().min().copied().unwrap(); - assert!(lowest > start + 40, "trails run down the wall: {lowest}"); - assert!(highest + 20 > start, "nothing well above the start: {highest}"); - assert_eq!(rows, particle_rows()); -} - #[test] fn radial_symmetry_paints_copies_around_the_axis() { let mut s = session(primitives::sphere(1.0, 48, 24)); diff --git a/crates/engine/tests/it/tool_settings.rs b/crates/engine/tests/it/tool_settings.rs index ef5a921b..da913821 100644 --- a/crates/engine/tests/it/tool_settings.rs +++ b/crates/engine/tests/it/tool_settings.rs @@ -171,3 +171,12 @@ fn a_malformed_angle_fade_leaves_the_brush_unchanged() { assert!(execute(&mut session, "tool.brush", &json!({"size": 50, "angleFade": "steep"})).is_err()); assert_eq!(session.tool.brush, before); } + +#[test] +fn removed_particle_settings_reject_the_whole_brush_update() { + let mut session = another_project(); + let before = session.tool.brush.clone(); + + assert!(execute(&mut session, "tool.brush", &json!({"size": 50, "particles": {"enabled": true}})).is_err()); + assert_eq!(session.tool.brush, before); +} diff --git a/crates/paint/src/brush.rs b/crates/paint/src/brush.rs index ffc45e22..69fa4401 100644 --- a/crates/paint/src/brush.rs +++ b/crates/paint/src/brush.rs @@ -270,25 +270,6 @@ impl Symmetry { } } -/// Particle brush: every stamp emits particles that slide down the surface under gravity -/// (world −Y), painting small dabs along their tracks instead of the stamp itself. -#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] -pub struct Particles { - pub enabled: bool, - /// Particles per stamp. - pub count: u32, - /// Simulation steps per particle (one dab each). - pub lifetime: u32, - /// Distance slid per step, relative to the particle size (0 = particles stay put). - pub gravity: f32, -} - -impl Default for Particles { - fn default() -> Self { - Particles { enabled: false, count: 4, lifetime: 24, gravity: 1.0 } - } -} - /// Brush parameters (the "Brush" properties section plus tool-bar values). #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BrushSettings { @@ -337,8 +318,6 @@ pub struct BrushSettings { pub symmetry: Symmetry, /// Size in screen space (constant on screen) instead of world space. pub screen_space: bool, - #[serde(default)] - pub particles: Particles, } impl Default for BrushSettings { @@ -368,7 +347,6 @@ impl Default for BrushSettings { depth: 1.0, symmetry: Symmetry::default(), screen_space: false, - particles: Particles::default(), } } } @@ -412,12 +390,6 @@ impl BrushSettings { angle_span: clamp_finite(self.symmetry.angle_span, 0.0, FULL_TURN_DEGREES, FULL_TURN_DEGREES), ..self.symmetry }, - particles: Particles { - enabled: self.particles.enabled, - count: self.particles.count.clamp(1, 16), - lifetime: self.particles.lifetime.clamp(1, 128), - gravity: clamp_finite(self.particles.gravity, 0.0, 2.0, 1.0), - }, ..self.clone() } } diff --git a/crates/paint/src/lib.rs b/crates/paint/src/lib.rs index 31fcf547..d7508e4b 100644 --- a/crates/paint/src/lib.rs +++ b/crates/paint/src/lib.rs @@ -5,8 +5,8 @@ //! them into a texture-space stroke alpha over the UV G-buffer, hiding surfaces the camera can't //! see ([`EyeDepth`]); [`commit`] blends the finished stroke into layer pixels. Clone and smudge //! strokes carry channel values ([`pickup`]) instead of painting the tool's material. -//! [`path`] samples the Path tool's curves and lasso coverage; [`particles`] runs the particle -//! brush; [`alphas`] is the built-in library of procedural brush alphas and [`presets`] the built-in +//! [`path`] samples the Path tool's curves and lasso coverage. [`alphas`] is the built-in +//! library of procedural brush alphas and [`presets`] the built-in //! brush presets; [`text`] draws text for text alphas and decals. #![forbid(unsafe_code)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] @@ -15,7 +15,6 @@ pub mod alpha_params; pub mod alphas; pub mod brush; pub mod commit; -pub mod particles; pub mod path; pub mod pickup; pub mod presets; @@ -26,7 +25,7 @@ pub mod text; pub mod visibility; pub use alpha_params::AlphaParams; -pub use brush::{Alignment, BrushAlpha, BrushSettings, FULL_TURN_DEGREES, MAX_RADIAL_COPIES, Particles, Shape, Symmetry, image_alpha}; +pub use brush::{Alignment, BrushAlpha, BrushSettings, FULL_TURN_DEGREES, MAX_RADIAL_COPIES, Shape, Symmetry, image_alpha}; pub use commit::{CommitSource, Staging, TexelFn, commit_coverage, commit_layer, commit_mask}; pub use path::{Lasso, spline, spline_segments, spline_segments_with_corners, spline_with_corners}; pub use pickup::{Pickup, PickupMode}; diff --git a/crates/paint/src/particles.rs b/crates/paint/src/particles.rs deleted file mode 100644 index 51c3d53c..00000000 --- a/crates/paint/src/particles.rs +++ /dev/null @@ -1,112 +0,0 @@ -//! Particle brush: each stamp emits a few particles that slide down the surface under gravity -//! (world −Y) and fall off overhangs, painting a small dab per simulation step. Deterministic: -//! particles are seeded by the stamp seed. - -use texturecraft_geom::glam::Vec3; -use texturecraft_geom::{Surface, surface_at}; -use texturecraft_texel::noise::pcg3d; - -use crate::brush::Particles; -use crate::stroke::{PickCtx, Stamp}; - -/// Particle dab radius relative to the brush stamp. -const PARTICLE_SIZE: f32 = 0.35; - -/// The surface hit by a ray, if any within `tmax`. -fn cast(ctx: &PickCtx, o: Vec3, d: Vec3, tmax: f32) -> Option { - let hit = ctx.bvh.closest(o, d, tmax)?; - surface_at(ctx.mesh, hit.tri, hit.u, hit.v) -} - -/// Project `p` onto the surface along the normal `n` (within `reach`). -fn snap(ctx: &PickCtx, p: Vec3, n: Vec3, reach: f32) -> Option { - cast(ctx, p + n * reach, -n, reach * 2.0) -} - -/// Particle dabs for one brush stamp. -pub fn emit(ctx: &PickCtx, p: &Particles, s: &Stamp) -> Vec { - let size = s.radius * PARTICLE_SIZE; - let step = size * p.gravity; - let fall = s.radius * 20.0; - let unit = |v: u32| v as f32 / u32::MAX as f32; - let mut out = Vec::new(); - for k in 0..p.count { - let r = pcg3d(s.seed, k, 0xD057); - let (a, d) = (unit(r[0]) * std::f32::consts::TAU, unit(r[1]).sqrt()); - let start = s.center + (s.tangent * a.cos() + s.bitangent * a.sin()) * d * s.radius; - let Some(mut at) = snap(ctx, start, s.normal, s.radius) else { continue }; - for life in 0..p.lifetime { - let tangent = at.nrm.any_orthonormal_vector(); - out.push(Stamp { - center: at.pos, - normal: at.nrm, - tangent, - bitangent: at.nrm.cross(tangent), - radius: size, - flow: s.flow * (1.0 - life as f32 / p.lifetime as f32), - seed: s.seed.wrapping_mul(17).wrapping_add(k), - ..*s - }); - if step <= 0.0 { - break; - } - let slide = Vec3::NEG_Y - at.nrm * at.nrm.dot(Vec3::NEG_Y); - let next = if slide.length() > 0.05 { - // Slide downhill; past an edge the particle drops onto what lies below. - let to = at.pos + slide.normalize() * step; - snap(ctx, to, at.nrm, step).or_else(|| cast(ctx, to + at.nrm * step, Vec3::NEG_Y, fall)) - } else if at.nrm.y < 0.0 { - // Hanging under a ceiling: fall straight down. - cast(ctx, at.pos + at.nrm * step, Vec3::NEG_Y, fall) - } else { - None // resting on flat ground - }; - match next { - Some(h) => at = h, - None => break, - } - } - } - out -} - -#[cfg(test)] -mod tests { - use super::*; - use texturecraft_geom::glam::Vec2; - use texturecraft_geom::{Bvh, OrbitCamera, primitives}; - - #[test] - fn particles_slide_down_a_wall_deterministically() { - // A vertical wall: the plane rotated to face +Z - let mut mesh = primitives::plane(2.0, 8); - for position in &mut mesh.positions { - *position = Vec3::new(position.x, -position.z, 0.0); - } - mesh.normals.fill(Vec3::Z); - let bvh = Bvh::new(&mesh); - let camera = OrbitCamera::default(); - let context = PickCtx { mesh: &mesh, bvh: &bvh, camera: &camera, viewport: Vec2::new(100.0, 100.0) }; - let stamp = Stamp { - center: Vec3::ZERO, - normal: Vec3::Z, - tangent: Vec3::X, - bitangent: Vec3::Y, - radius: 0.1, - flow: 1.0, - hardness: 0.5, - depth: 1.0, - seed: 3, - source: None, - }; - let particles = Particles { enabled: true, count: 4, lifetime: 20, gravity: 1.0 }; - - let dabs = emit(&context, &particles, &stamp); - - assert_eq!(dabs, emit(&context, &particles, &stamp)); - assert_eq!(dabs.len(), 80); - let lowest = dabs.iter().map(|d| d.center.y).fold(f32::MAX, f32::min); - assert!(lowest < -0.4, "{lowest}"); - assert!(dabs.iter().all(|d| d.center.z.abs() < 1e-3)); - } -} diff --git a/crates/paint/src/presets.rs b/crates/paint/src/presets.rs index e82bf3e9..b2945def 100644 --- a/crates/paint/src/presets.rs +++ b/crates/paint/src/presets.rs @@ -1,5 +1,5 @@ //! Built-in brush presets: how a brush strokes (shape, spacing, flow, hardness, jitters, path -//! following, particles). Applying one keeps the brush's size, alignment, culling, symmetry and +//! following). Applying one keeps the brush's size, alignment, culling, symmetry and //! lazy mouse, so a preset changes the stroke, not the setup. use crate::brush::{BrushAlpha, BrushSettings}; @@ -22,7 +22,7 @@ impl BrushPreset { } /// `brush` with the stroke of `from` (shape, flow, opacity, spacing, hardness, angle, path -/// following, jitters, particles and the alpha's parameters): what a preset sets. +/// following, jitters and the alpha's parameters): what a preset sets. pub fn with_stroke_of(brush: &BrushSettings, from: &BrushSettings) -> BrushSettings { BrushSettings { flow: from.flow, @@ -39,7 +39,6 @@ pub fn with_stroke_of(brush: &BrushSettings, from: &BrushSettings) -> BrushSetti alpha_image: from.alpha_image.clone(), alpha_library: from.alpha_library.clone(), alpha_params: from.alpha_params, - particles: from.particles, ..brush.clone() } .sanitized() @@ -60,7 +59,7 @@ fn library(b: &mut BrushSettings, id: &str) { } /// Every built-in preset, in shelf order. -pub const PRESETS: [BrushPreset; 18] = [ +pub const PRESETS: [BrushPreset; 17] = [ BrushPreset { id: "basic_hard", label: "Basic hard", category: BASIC, recipe: |b| b.hardness = 0.95 }, BrushPreset { id: "basic_soft", label: "Basic soft", category: BASIC, recipe: |b| (b.hardness, b.flow) = (0.0, 0.6) }, BrushPreset { id: "airbrush", label: "Airbrush", category: BASIC, recipe: |b| (b.hardness, b.flow, b.spacing) = (0.0, 0.12, 0.04) }, @@ -129,15 +128,6 @@ pub const PRESETS: [BrushPreset; 18] = [ (b.jitter_angle, b.spacing) = (1.0, 0.9); }, }, - BrushPreset { - id: "drips", - label: "Drips", - category: GRUNGE, - recipe: |b| { - (b.hardness, b.flow) = (0.7, 0.6); - b.particles.enabled = true; - }, - }, BrushPreset { id: "stars", label: "Stars", diff --git a/crates/paint/src/stroke.rs b/crates/paint/src/stroke.rs index e8221602..bdcb786b 100644 --- a/crates/paint/src/stroke.rs +++ b/crates/paint/src/stroke.rs @@ -118,9 +118,6 @@ impl Stroke { } let mut out = Vec::new(); self.feed(ctx, p, pressure, 0, &mut out); - if self.settings.particles.enabled { - out = out.iter().flat_map(|s| crate::particles::emit(ctx, &self.settings.particles, s)).collect(); - } let mut all = Vec::with_capacity(out.len() * 2); for s in out { all.push(s); diff --git a/crates/ui-egui/src/brush_sheet.rs b/crates/ui-egui/src/brush_sheet.rs index cf4a7022..11b8cc45 100644 --- a/crates/ui-egui/src/brush_sheet.rs +++ b/crates/ui-egui/src/brush_sheet.rs @@ -41,11 +41,8 @@ const POSITION_JITTER_PERCENT_RANGE: RangeInclusive = 0.0..=400.0; const PERCENT_RANGE: RangeInclusive = 0.0..=100.0; -/// The ranges of Stamp depth, Gravity, particles per stamp, and a particle's lifetime in steps +/// The range of Stamp depth const STAMP_DEPTH_RANGE: RangeInclusive = 0.05..=4.0; -const GRAVITY_RANGE: RangeInclusive = 0.0..=2.0; -const PARTICLE_COUNT_RANGE: RangeInclusive = 1.0..=16.0; -const PARTICLE_LIFETIME_RANGE: RangeInclusive = 1.0..=128.0; /// Width of the brush presets list const PRESETS_WIDTH: f32 = 230.0; @@ -142,19 +139,6 @@ pub(crate) fn brush_section(app: &mut TextureCraftApp, sheet: &mut PropertySheet projection_rows(sheet, brush, &tokens); } - let particles = &mut brush.particles; - let band = sheet.band(tr("Particles"), false, Some(*particles != defaults.particles), None); - if band.reset { - *particles = defaults.particles; - } - if band.open { - sheet.info(tr("Paint slides down the surface")); - sheet.toggle(tr("Particle brush"), &mut particles.enabled); - whole_slider(sheet, tr("Count per stamp"), &mut particles.count, PARTICLE_COUNT_RANGE); - whole_slider(sheet, tr("Lifetime (steps)"), &mut particles.lifetime, PARTICLE_LIFETIME_RANGE); - sheet.slider(tr("Gravity"), &mut particles.gravity, GRAVITY_RANGE, 2); - } - *brush = brush.sanitized(); } @@ -227,14 +211,6 @@ fn pen_percent_slider(sheet: &mut PropertySheet<'_>, label: &str, fraction: &mut } } -/// A count on a slider of whole numbers -fn whole_slider(sheet: &mut PropertySheet<'_>, label: &str, count: &mut u32, range: RangeInclusive) { - let mut shown = *count as f32; - if sheet.slider(label, &mut shown, range, 0).is_some() { - *count = shown.round() as u32; - } -} - /// The brush presets, listed under the Brush caption's ≡ button fn brush_presets_popover(app: &mut TextureCraftApp, ui: &Ui, menu: Response) { menu.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, tr("Brush presets"))); diff --git a/crates/ui-egui/src/i18n/ar.rs b/crates/ui-egui/src/i18n/ar.rs index 07836f43..50fa80d9 100644 --- a/crates/ui-egui/src/i18n/ar.rs +++ b/crates/ui-egui/src/i18n/ar.rs @@ -203,7 +203,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "تعذرت قراءة التصيير من وحدة معالجة الرسوميات (GPU)"), ("Couldn't save the render: {error}", "تعذر حفظ التصيير: {error}"), ("Couldn't save {name}: {error}", "تعذر حفظ {name}: {error}"), - ("Count per stamp", "العدد لكل طبعة"), ("Crate", "صندوق"), ("Create", "إنشاء"), ("Create smart material", "إنشاء مادة ذكية"), @@ -362,7 +361,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "توهج"), ("Gradient", "تدرج لوني"), ("Gradient Map", "خريطة التدرج"), - ("Gravity", "الجاذبية"), ("Gray", "رمادي"), ("Gray + A", "رمادي + A"), ("Gray 50%", "رمادي 50%"), @@ -455,7 +453,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Lens size: how quickly things blur away from the focus distance", "حجم العدسة: سرعة تمويه العناصر البعيدة عن مسافة التركيز"), ("Level", "المستوى"), ("Levels", "المستويات"), - ("Lifetime (steps)", "عمر الجسيم (بالخطوات)"), ("Light / direction", "الضوء / الاتجاه"), ("Lighten (Max)", "تفتيح (الحد الأقصى)"), ("Lightness", "الإضاءة"), @@ -586,9 +583,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Pan", "تحريك العرض (Pan)"), ("Parallax occlusion (height channel)", "إزاحة المنظور (قناة الارتفاع)"), ("Partial mask values follow the layer's height: high parts show first", "قيم القناع الجزئية تتبع ارتفاع الطبقة: تظهر الأجزاء المرتفعة أولاً"), - ("Particle brush (slides down the surface)", "فرشاة الجسيمات (تنزلق على السطح)"), - ("Particle brush: particles slide down the surface", "فرشاة الجسيمات: تنزلق الجسيمات على السطح"), - ("Particles", "جسيمات"), ("Passthrough", "تمرير مباشر (Passthrough)"), ("Paste as instance", "لصق كنسخة مرتبطة (Instance)"), ("Paste effect", "لصق التأثير"), diff --git a/crates/ui-egui/src/i18n/de.rs b/crates/ui-egui/src/i18n/de.rs index c24315e7..6e61a17e 100644 --- a/crates/ui-egui/src/i18n/de.rs +++ b/crates/ui-egui/src/i18n/de.rs @@ -215,7 +215,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "Das Rendering konnte nicht von der GPU zurückgelesen werden"), ("Couldn't save the render: {error}", "Das Rendering konnte nicht gespeichert werden: {error}"), ("Couldn't save {name}: {error}", "{name} konnte nicht gespeichert werden: {error}"), - ("Count per stamp", "Anzahl pro Abdruck"), ("Crate", "Kiste"), ("Create", "Erstellen"), ("Create smart material", "Smart-Material erstellen"), @@ -386,7 +385,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "Glühen"), ("Gradient", "Verlauf"), ("Gradient Map", "Verlaufsumsetzung"), - ("Gravity", "Schwerkraft"), ("Gray", "Grau"), ("Gray + A", "Grau + A"), ("Gray 50%", "Grau 50%"), @@ -482,7 +480,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Lens size: how quickly things blur away from the focus distance", "Linsengröße: wie schnell Objekte außerhalb der Fokusdistanz unscharf werden"), ("Level", "Stufe"), ("Levels", "Tonwertkorrektur"), - ("Lifetime (steps)", "Lebensdauer (Schritte)"), ("Light / direction", "Licht / Richtung"), ("Lighten (Max)", "Aufhellen (Max)"), ("Lightness", "Helligkeit"), @@ -622,9 +619,6 @@ pub const TABLE: &[(&str, &str)] = &[ "Partial mask values follow the layer's height: high parts show first", "Teilweise Maskenwerte folgen der Höhe der Ebene: Hohe Bereiche erscheinen zuerst", ), - ("Particle brush (slides down the surface)", "Partikelpinsel (gleitet die Oberfläche hinab)"), - ("Particle brush: particles slide down the surface", "Partikelpinsel: Partikel gleiten die Oberfläche hinab"), - ("Particles", "Partikel"), ("Passthrough", "Hindurchwirken"), ("Paste as instance", "Als Instanz einfügen"), ("Paste effect", "Effekt einfügen"), diff --git a/crates/ui-egui/src/i18n/es.rs b/crates/ui-egui/src/i18n/es.rs index 0f3177d0..d4f8803e 100644 --- a/crates/ui-egui/src/i18n/es.rs +++ b/crates/ui-egui/src/i18n/es.rs @@ -212,7 +212,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "No se pudo recuperar el render de la GPU"), ("Couldn't save the render: {error}", "No se pudo guardar el render: {error}"), ("Couldn't save {name}: {error}", "No se pudo guardar {name}: {error}"), - ("Count per stamp", "Cantidad por estampado"), ("Crate", "Caja"), ("Create", "Crear"), ("Create smart material", "Crear material inteligente"), @@ -377,7 +376,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "Resplandor"), ("Gradient", "Degradado"), ("Gradient Map", "Mapa de degradado"), - ("Gravity", "Gravedad"), ("Gray", "Gris"), ("Gray + A", "Gris + A"), ("Gray 50%", "Gris 50%"), @@ -473,7 +471,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Lens size: how quickly things blur away from the focus distance", "Tamaño de la lente: lo rápido que se desenfoca todo fuera de la distancia de enfoque"), ("Level", "Nivel"), ("Levels", "Niveles"), - ("Lifetime (steps)", "Duración (pasos)"), ("Light / direction", "Luz / dirección"), ("Lighten (Max)", "Aclarar (máx.)"), ("Lightness", "Claridad"), @@ -613,9 +610,6 @@ pub const TABLE: &[(&str, &str)] = &[ "Partial mask values follow the layer's height: high parts show first", "Los valores parciales de la máscara siguen la altura de la capa: las partes altas aparecen primero", ), - ("Particle brush (slides down the surface)", "Pincel de partículas (se deslizan por la superficie)"), - ("Particle brush: particles slide down the surface", "Pincel de partículas: las partículas se deslizan por la superficie"), - ("Particles", "Partículas"), ("Passthrough", "Paso directo"), ("Paste as instance", "Pegar como instancia"), ("Paste effect", "Pegar efecto"), diff --git a/crates/ui-egui/src/i18n/fr.rs b/crates/ui-egui/src/i18n/fr.rs index 4694845c..deb9bb80 100644 --- a/crates/ui-egui/src/i18n/fr.rs +++ b/crates/ui-egui/src/i18n/fr.rs @@ -218,7 +218,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "Impossible de relire le rendu depuis le GPU"), ("Couldn't save the render: {error}", "Impossible d'enregistrer le rendu : {error}"), ("Couldn't save {name}: {error}", "Impossible d'enregistrer {name} : {error}"), - ("Count per stamp", "Nombre par empreinte"), ("Crate", "Caisse"), ("Create", "Créer"), ("Create smart material", "Créer un matériau intelligent"), @@ -389,7 +388,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "Lueur"), ("Gradient", "Dégradé"), ("Gradient Map", "Carte de dégradé"), - ("Gravity", "Gravité"), ("Gray", "Gris"), ("Gray + A", "Gris + A"), ("Gray 50%", "Gris 50 %"), @@ -488,7 +486,6 @@ pub const TABLE: &[(&str, &str)] = &[ ), ("Level", "Niveau"), ("Levels", "Niveaux"), - ("Lifetime (steps)", "Durée de vie (pas)"), ("Light / direction", "Lumière / direction"), ("Lighten (Max)", "Éclaircir (Max)"), ("Lightness", "Clarté"), @@ -628,9 +625,6 @@ pub const TABLE: &[(&str, &str)] = &[ "Partial mask values follow the layer's height: high parts show first", "Les valeurs de masque partielles suivent la hauteur du calque : les parties hautes apparaissent en premier", ), - ("Particle brush (slides down the surface)", "Pinceau à particules (glisse le long de la surface)"), - ("Particle brush: particles slide down the surface", "Pinceau à particules : les particules glissent le long de la surface"), - ("Particles", "Particules"), ("Passthrough", "Transfert"), ("Paste as instance", "Coller comme instance"), ("Paste effect", "Coller l'effet"), diff --git a/crates/ui-egui/src/i18n/it.rs b/crates/ui-egui/src/i18n/it.rs index 129bcb34..c4e3e124 100644 --- a/crates/ui-egui/src/i18n/it.rs +++ b/crates/ui-egui/src/i18n/it.rs @@ -218,7 +218,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "Impossibile rileggere il render dalla GPU"), ("Couldn't save the render: {error}", "Impossibile salvare il render: {error}"), ("Couldn't save {name}: {error}", "Impossibile salvare {name}: {error}"), - ("Count per stamp", "Quantità per impronta"), ("Crate", "Cassa"), ("Create", "Crea"), ("Create smart material", "Crea materiale intelligente"), @@ -383,7 +382,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "Bagliore"), ("Gradient", "Sfumatura"), ("Gradient Map", "Mappa sfumatura"), - ("Gravity", "Gravità"), ("Gray", "Grigio"), ("Gray + A", "Grigio + A"), ("Gray 50%", "Grigio 50%"), @@ -479,7 +477,6 @@ pub const TABLE: &[(&str, &str)] = &[ ), ("Level", "Livello"), ("Levels", "Livelli"), - ("Lifetime (steps)", "Durata (passi)"), ("Light / direction", "Luce / direzione"), ("Lighten (Max)", "Schiarisci (Max)"), ("Lightness", "Luminosità"), @@ -619,9 +616,6 @@ pub const TABLE: &[(&str, &str)] = &[ "Partial mask values follow the layer's height: high parts show first", "I valori parziali della maschera seguono l'altezza del livello: le parti alte appaiono per prime", ), - ("Particle brush (slides down the surface)", "Pennello particellare (scivola giù lungo la superficie)"), - ("Particle brush: particles slide down the surface", "Pennello particellare: le particelle scivolano giù lungo la superficie"), - ("Particles", "Particelle"), ("Passthrough", "Pass-through"), ("Paste as instance", "Incolla come istanza"), ("Paste effect", "Incolla effetto"), diff --git a/crates/ui-egui/src/i18n/ja.rs b/crates/ui-egui/src/i18n/ja.rs index fe299bba..9bceed9b 100644 --- a/crates/ui-egui/src/i18n/ja.rs +++ b/crates/ui-egui/src/i18n/ja.rs @@ -218,7 +218,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "GPUからレンダリング結果を読み戻せませんでした"), ("Couldn't save the render: {error}", "レンダリング結果を保存できませんでした: {error}"), ("Couldn't save {name}: {error}", "{name} を保存できませんでした: {error}"), - ("Count per stamp", "スタンプあたりの数"), ("Crate", "木箱"), ("Create", "作成"), ("Create smart material", "スマートマテリアルを作成"), @@ -371,7 +370,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "グロー"), ("Gradient", "グラデーション"), ("Gradient Map", "グラデーションマップ"), - ("Gravity", "重力"), ("Gray", "グレー"), ("Gray + A", "グレー + A"), ("Gray 50%", "グレー 50%"), @@ -467,7 +465,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Lens size: how quickly things blur away from the focus distance", "レンズサイズ: フォーカス距離から離れるにつれてぼける速さ"), ("Level", "レベル"), ("Levels", "レベル補正"), - ("Lifetime (steps)", "寿命 (ステップ)"), ("Light / direction", "ライト / 方向"), ("Lighten (Max)", "比較(明) (Max)"), ("Lightness", "明度"), @@ -604,9 +601,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Pan", "パン"), ("Parallax occlusion (height channel)", "視差オクルージョン (ハイトチャンネル)"), ("Partial mask values follow the layer's height: high parts show first", "中間のマスク値はレイヤーのハイトに従い、高い部分から表示されます"), - ("Particle brush (slides down the surface)", "パーティクルブラシ (表面を滑り落ちる)"), - ("Particle brush: particles slide down the surface", "パーティクルブラシ: パーティクルが表面を滑り落ちます"), - ("Particles", "パーティクル"), ("Passthrough", "通過"), ("Paste as instance", "インスタンスとして貼り付け"), ("Paste effect", "エフェクトを貼り付け"), diff --git a/crates/ui-egui/src/i18n/ko.rs b/crates/ui-egui/src/i18n/ko.rs index 35b7041d..2ca567fd 100644 --- a/crates/ui-egui/src/i18n/ko.rs +++ b/crates/ui-egui/src/i18n/ko.rs @@ -209,7 +209,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "GPU에서 렌더를 읽어올 수 없습니다"), ("Couldn't save the render: {error}", "렌더를 저장할 수 없습니다: {error}"), ("Couldn't save {name}: {error}", "저장할 수 없습니다 ({name}): {error}"), - ("Count per stamp", "스탬프당 개수"), ("Crate", "상자"), ("Create", "만들기"), ("Create smart material", "스마트 머티리얼 만들기"), @@ -368,7 +367,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "글로우"), ("Gradient", "그레이디언트"), ("Gradient Map", "그레이디언트 맵"), - ("Gravity", "중력"), ("Gray", "회색"), ("Gray + A", "회색 + A"), ("Gray 50%", "회색 50%"), @@ -461,7 +459,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Lens size: how quickly things blur away from the focus distance", "렌즈 크기: 초점 거리에서 멀어질수록 얼마나 빠르게 흐려지는지 결정합니다"), ("Level", "레벨"), ("Levels", "레벨"), - ("Lifetime (steps)", "수명 (단계)"), ("Light / direction", "조명 / 방향"), ("Lighten (Max)", "밝게 하기 (최대)"), ("Lightness", "명도"), @@ -595,9 +592,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Pan", "이동"), ("Parallax occlusion (height channel)", "시차 오클루전 (높이 채널)"), ("Partial mask values follow the layer's height: high parts show first", "부분 마스크 값이 레이어 높이를 따릅니다. 높은 부분이 먼저 나타납니다"), - ("Particle brush (slides down the surface)", "파티클 브러시 (표면을 따라 흘러내림)"), - ("Particle brush: particles slide down the surface", "파티클 브러시: 파티클이 표면을 따라 흘러내립니다"), - ("Particles", "파티클"), ("Passthrough", "통과"), ("Paste as instance", "인스턴스로 붙여넣기"), ("Paste effect", "이펙트 붙여넣기"), diff --git a/crates/ui-egui/src/i18n/pt_br.rs b/crates/ui-egui/src/i18n/pt_br.rs index 02b832fd..5693b01c 100644 --- a/crates/ui-egui/src/i18n/pt_br.rs +++ b/crates/ui-egui/src/i18n/pt_br.rs @@ -212,7 +212,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "Não foi possível ler a renderização de volta da GPU"), ("Couldn't save the render: {error}", "Não foi possível salvar a renderização: {error}"), ("Couldn't save {name}: {error}", "Não foi possível salvar {name}: {error}"), - ("Count per stamp", "Quantidade por carimbo"), ("Crate", "Caixote"), ("Create", "Criar"), ("Create smart material", "Criar material inteligente"), @@ -377,7 +376,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "Brilho"), ("Gradient", "Gradiente"), ("Gradient Map", "Mapa de gradiente"), - ("Gravity", "Gravidade"), ("Gray", "Cinza"), ("Gray + A", "Cinza + A"), ("Gray 50%", "Cinza 50%"), @@ -470,7 +468,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Lens size: how quickly things blur away from the focus distance", "Tamanho da lente: quão rápido os objetos desfocam fora da distância de foco"), ("Level", "Nível"), ("Levels", "Níveis"), - ("Lifetime (steps)", "Duração (passos)"), ("Light / direction", "Luz / direção"), ("Lighten (Max)", "Clarear (Máx)"), ("Lightness", "Claridade"), @@ -610,9 +607,6 @@ pub const TABLE: &[(&str, &str)] = &[ "Partial mask values follow the layer's height: high parts show first", "Valores parciais de máscara seguem a altura da camada: as partes altas aparecem primeiro", ), - ("Particle brush (slides down the surface)", "Pincel de partículas (desliza pela superfície)"), - ("Particle brush: particles slide down the surface", "Pincel de partículas: as partículas deslizam pela superfície"), - ("Particles", "Partículas"), ("Passthrough", "Passagem"), ("Paste as instance", "Colar como instância"), ("Paste effect", "Colar efeito"), diff --git a/crates/ui-egui/src/i18n/zh_hans.rs b/crates/ui-egui/src/i18n/zh_hans.rs index fbeda5d1..a3379cf9 100644 --- a/crates/ui-egui/src/i18n/zh_hans.rs +++ b/crates/ui-egui/src/i18n/zh_hans.rs @@ -191,7 +191,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Couldn't read the render back from the GPU", "无法从 GPU 读回渲染结果"), ("Couldn't save the render: {error}", "无法保存渲染结果:{error}"), ("Couldn't save {name}: {error}", "无法保存 {name}:{error}"), - ("Count per stamp", "每个笔印的数量"), ("Crate", "箱子"), ("Create", "创建"), ("Create smart material", "创建智能材质"), @@ -338,7 +337,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Glow", "辉光"), ("Gradient", "渐变"), ("Gradient Map", "渐变映射"), - ("Gravity", "重力"), ("Gray", "灰度"), ("Gray + A", "灰度 + A"), ("Gray 50%", "50% 灰"), @@ -425,7 +423,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Lens size: how quickly things blur away from the focus distance", "镜头大小:远离对焦距离时物体变模糊的速度"), ("Level", "级别"), ("Levels", "色阶"), - ("Lifetime (steps)", "寿命(步数)"), ("Light / direction", "光照 / 方向"), ("Lighten (Max)", "变亮(最大值)"), ("Lightness", "明度"), @@ -553,9 +550,6 @@ pub const TABLE: &[(&str, &str)] = &[ ("Pan", "平移"), ("Parallax occlusion (height channel)", "视差遮蔽(高度通道)"), ("Partial mask values follow the layer's height: high parts show first", "部分遮罩值跟随图层高度:较高部分先显示"), - ("Particle brush (slides down the surface)", "粒子笔刷(沿表面向下滑动)"), - ("Particle brush: particles slide down the surface", "粒子笔刷:粒子沿表面向下滑动"), - ("Particles", "粒子"), ("Passthrough", "穿透"), ("Paste as instance", "粘贴为实例"), ("Paste effect", "粘贴效果"), diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs index 72cbf52d..b3bf32d3 100644 --- a/crates/ui-egui/src/toolbar.rs +++ b/crates/ui-egui/src/toolbar.rs @@ -333,11 +333,8 @@ fn tool_controls(app: &mut TextureCraftApp, ui: &mut egui::Ui, tokens: &Tokens) } } - ui.separator(); - if icon_button(ui, ic::CLOUD_RAIN, tr("Particle brush: particles slide down the surface"), brush.particles.enabled, button_size).clicked() { - brush.particles.enabled = !brush.particles.enabled; - } if crate::symmetry::applies_to(tool) { + ui.separator(); crate::symmetry::toolbar_controls(app, ui); } diff --git a/crates/ui-egui/tests/it/brush_section_reset.rs b/crates/ui-egui/tests/it/brush_section_reset.rs index 19dd4b0c..a7fd5d2e 100644 --- a/crates/ui-egui/tests/it/brush_section_reset.rs +++ b/crates/ui-egui/tests/it/brush_section_reset.rs @@ -2,7 +2,7 @@ use egui_kittest::Harness; use egui_kittest::kittest::{NodeT, Queryable}; -use texturecraft_engine::paint::{Alignment, BrushAlpha, BrushSettings, Particles, Symmetry}; +use texturecraft_engine::paint::{Alignment, BrushAlpha, BrushSettings, Symmetry}; use texturecraft_ui_egui::TextureCraftApp; /// The default window; Properties shows only the top of the brush there, so lower bands are scrolled to @@ -18,7 +18,7 @@ const SETTLE_FRAMES: usize = 3; type SectionReset = fn(&mut BrushSettings, &BrushSettings); /// Each band's title, a label shown only while it is open, whether it starts open, and its reset -const SECTIONS: [(&str, &str, bool, SectionReset); 6] = [ +const SECTIONS: [(&str, &str, bool, SectionReset); 5] = [ ("Size", "Minimum Size (%)", true, |brush, defaults| { (brush.size, brush.size_pressure, brush.min_size, brush.spacing) = (defaults.size, defaults.size_pressure, defaults.min_size, defaults.spacing) }), @@ -32,7 +32,6 @@ const SECTIONS: [(&str, &str, bool, SectionReset); 6] = [ (brush.alignment, brush.backface_culling, brush.angle_fade, brush.screen_space, brush.depth) = (defaults.alignment, defaults.backface_culling, defaults.angle_fade, defaults.screen_space, defaults.depth) }), - ("Particles", "Gravity", false, |brush, defaults| brush.particles = defaults.particles), ]; /// A valid brush with every section field changed and a custom alpha that resets must preserve @@ -56,7 +55,6 @@ fn changed_brush() -> BrushSettings { backface_culling: false, angle_fade: (30.0, 60.0), depth: 2.0, - particles: Particles { enabled: true, count: 8, lifetime: 12, gravity: 0.5 }, lazy: 50.0, symmetry: Symmetry { x: true, y: true, z: true, radial: 4, axis: 2, ..Symmetry::default() }, alpha: BrushAlpha::Star, diff --git a/crates/ui-egui/tests/ui_snapshots.rs b/crates/ui-egui/tests/ui_snapshots.rs index 32285025..c4d04aac 100644 --- a/crates/ui-egui/tests/ui_snapshots.rs +++ b/crates/ui-egui/tests/ui_snapshots.rs @@ -3507,20 +3507,6 @@ fn paint_tool_properties_snapshots() { tool.brush = default_brush; tool.values = default_values; - // The top bar has labels of the same names: Properties is the rightmost - let in_properties = |harness: &Harness<'_, TextureCraftApp>, label: &str| { - harness.get_all_by_label(label).map(|node| node.rect().center()).max_by(|a, b| a.x.total_cmp(&b.x)).unwrap() - }; - - harness.get_all_by_label("Particles").max_by(|a, b| a.rect().left().total_cmp(&b.rect().left())).unwrap().scroll_to_me(); - harness.run_steps(3); - let at = in_properties(&harness, "Particles"); - harness.hover_at(at); - for pressed in [true, false] { - harness.event(Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }); - harness.run_steps(2); - } - let themes = std::env::var_os("TC_UI_THEMES").is_some(); let shoot = |harness: &mut Harness<'_, TextureCraftApp>, name: &str| { save(harness, &output_dir, name); @@ -3563,7 +3549,7 @@ fn paint_tool_properties_snapshots() { open(&mut harness, egui::Role::ComboBox, "Tangent | Wrap"); shoot(&mut harness, "paint-alignment-open"); close(&mut harness); - harness.get_all_by_label("Particles").max_by(|a, b| a.rect().left().total_cmp(&b.rect().left())).unwrap().scroll_to_me(); + harness.get_by_role_and_label(egui::Role::Slider, "Stamp depth").scroll_to_me(); harness.run_steps(6); shoot(&mut harness, "paint-brush-scrolled"); diff --git a/docs/features.md b/docs/features.md index 91dbffa1..169b099d 100644 --- a/docs/features.md +++ b/docs/features.md @@ -13,13 +13,13 @@ Everything TextureCraft does today, by area. What's still missing is in [`ROADMA and angle. **67 procedural brush alphas** in their own shelf tab, or any imported image as the alpha. Every alpha has Parameters (Properties › Alpha): hardness, size X and Y, roundness for the Round shape, contrast and invert, with Restore defaults. - **18 brush presets** (basic, wear and grunge, details) in the shelf's Brushes tab set the + **17 brush presets** (basic, wear and grunge, details) in the shelf's Brushes tab set the stroke and keep the size. The Brush section's **Brush presets** popover (and the shelf) also keeps your own: save the current brush, click to use it, rename, replace or delete it. - **Tools:** paint, eraser, **projection** (paints an image's colors), a **stencil** every brush tool paints through (its gray masks the stroke; hold S to move, turn and scale it; painting the quick mask, - or in the 2D UV view with any tool but projection, ignores the stencil), polygon fill (triangle, UV island or the whole mesh), **path** (Shift+click places a corner point for hard edges) and **lasso fill**, a - **particle brush**, **smudge**, **clone** (V + click sets the source, marked in the 3D and 2D views; + or in the 2D UV view with any tool but projection, ignores the stencil), polygon fill (triangle, UV island or the whole mesh), **path** (Shift+click places a corner point for hard edges), **lasso fill**, + **smudge**, **clone** (V + click sets the source, marked in the 3D and 2D views; an Aligned option keeps or restarts the offset per stroke), material picker, Shift+click straight lines (Ctrl+Shift+click snaps them to 15 degree steps), and painting directly in the **2D UV view**. Brush, symmetry and the other tool settings stay when you open another project and when you