From 61b1c10e58740d7fca62882afc2730a7a3cfa5ec Mon Sep 17 00:00:00 2001 From: "DESKTOP-TVBJISQ\\Primere" Date: Wed, 1 Apr 2026 10:55:47 +0200 Subject: [PATCH] V2.0.0 - Title manager - titles --- Nodes/Rasterix.py | 52 ++++++++++++++++++-------------------- front_end/title_manager.js | 2 +- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/Nodes/Rasterix.py b/Nodes/Rasterix.py index f3b2f6d..3e31471 100644 --- a/Nodes/Rasterix.py +++ b/Nodes/Rasterix.py @@ -52,37 +52,37 @@ class PrimereRasterix: FILM_PRESETS_BY_TYPE = FILM_PRESETS_BY_TYPE LUT_DIR = os.path.join(PRIMERE_ROOT, 'components', 'images', 'luts') + SECTION_TITLES = [ - {"before": "concepts", "name": "rasterix_main", "title": "๐Ÿงญ Main Settings", "color": "#A13C2F", "text_color": "#EAF1F8", "label": "Choose model concept or model to save and load settings, set precision for all features at once."}, + {"before": "concepts", "name": "rasterix_main", "title": "๐Ÿงญ Project Setup", "color": "#5C3D34", "text_color": "#EAF1F8", "label": "Choose model concept/model for save-load profiles and set precision for the full pipeline."}, - {"after": "precision", "name": "rasterix_alevels", "title": "๐ŸŽš Auto levels", "color": "#4A351B", "text_color": "#EAF1F8", "label": "Photoshop inspired auto levels with lightness threshold. Set target gamma onn/off."}, - {"after": "gamma_target", "title": "๐Ÿ”ฆ White balance", "color": "#4A351B", "text_color": "#EAF1F8"}, - {"after": "wb_tint", "title": "๐Ÿ’ก Smart lightning", "color": "#4A351B", "text_color": "#EAF1F8"}, + {"after": "precision", "name": "rasterix_auto_levels", "title": "๐ŸŽš Auto Levels & Gamma", "color": "#6A4A2A", "text_color": "#EAF1F8", "label": "Photoshop-style auto levels with threshold protection and optional target gamma alignment. Inspired by Adobe Photoshop."}, + {"after": "gamma_target", "name": "rasterix_white_balance", "title": "๐Ÿ”ฆ White Balance", "color": "#6A4A2A", "text_color": "#EAF1F8", "label": "Correct temperature and tint first to establish a neutral color baseline for later grading. Inspired by Adobe Camera Raw and DxO Photolab."}, + {"after": "wb_tint", "name": "rasterix_smart_lighting", "title": "๐Ÿ’ก Smart Lighting", "color": "#6A4A2A", "text_color": "#EAF1F8", "label": "Adaptive light shaping to recover perceived depth and readability before local effects. Inspired by DxO Photolab"}, - {"after": "smart_lighting", "title": "๐ŸŒซ Dehaze", "color": "#314A2D", "text_color": "#EAF1F8"}, - {"after": "dehaze_contrast", "title": "๐Ÿช„ Depth blur", "color": "#314A2D", "text_color": "#EAF1F8"}, - {"after": "depth_gamma", "title": "๐Ÿซ— Blur", "color": "#314A2D", "text_color": "#EAF1F8"}, + {"after": "smart_lighting", "name": "rasterix_dehaze", "title": "๐ŸŒซ Atmosphere: Dehaze", "color": "#3E5C4B", "text_color": "#EAF1F8", "label": "Reduce haze and veiling glow while preserving natural contrast and color balance. Inspired by Adobe Lightroom Dehaze."}, + {"after": "dehaze_contrast", "name": "rasterix_depth_blur", "title": "๐ŸŒ€ Atmosphere: Depth Blur", "color": "#3E5C4B", "text_color": "#EAF1F8", "label": "Depth-guided lens blur to separate subject and background with controllable focus falloff."}, + {"after": "depth_gamma", "name": "rasterix_blur", "title": "๐Ÿซ— Atmosphere: Creative Blur", "color": "#3E5C4B", "text_color": "#EAF1F8", "label": "Apply additional blur styles for softness, abstraction, or cinematic diffusion."}, - {"after": "edge_threshold", "title": "๐ŸงŠ Brightness-contrast", "color": "#404A94", "text_color": "#EAF1F8"}, + {"after": "edge_threshold", "name": "rasterix_brightness_contrast", "title": "๐ŸงŠ Tone: Brightness & Contrast", "color": "#405985", "text_color": "#EAF1F8", "label": "Global tone shaping for exposure feel and contrast punch after atmospheric corrections. Inspired by Adobe Photoshop."}, + {"after": "use_legacy", "name": "rasterix_portrait_retouch", "title": "๐Ÿช’ Tone: Portrait Retouch", "color": "#405985", "text_color": "#EAF1F8", "label": "Frequency-based skin and texture workflow for gentle portrait cleanup and separation. Inspired by professional Photoshop retouch workflows."}, + {"after": "blend_mode", "name": "rasterix_local_laplacian", "title": "๐Ÿงฑ Tone: Edge-Aware Pyramid", "color": "#405985", "text_color": "#EAF1F8", "label": "Local Laplacian contrast/detail enhancement with strong edge preservation."}, - {"after": "use_legacy", "title": "๐Ÿช’ Portrait retouching", "color": "#404A94", "text_color": "#EAF1F8"}, - {"after": "blend_mode", "title": "โš” Edge-Aware pyramid", "color": "#404A94", "text_color": "#EAF1F8"}, + {"after": "levels", "name": "rasterix_analog_film", "title": "๐ŸŽž Creative: Analog Film / CCD", "color": "#3B5E68", "text_color": "#EAF1F8", "label": "Stylized film and sensor-era rendering for mood, palette, and texture character. Inspired by DxO."}, + {"after": "photo_paper", "name": "rasterix_lut_reader", "title": "๐Ÿ“ท Creative: LUT .cube Reader", "color": "#3B5E68", "text_color": "#EAF1F8", "label": "Load and blend LUT looks for fast creative direction and consistent show style. Inspired by Blackmagic DaVinci Resolve and DxO."}, + {"after": "color_space", "name": "rasterix_filmic_camera", "title": "๐ŸŽฅ Creative: Filmic Camera Curve", "color": "#3B5E68", "text_color": "#EAF1F8", "label": "Camera-like highlight roll-off and tonal response for cinematic dynamic range behavior. Inspired by Adobe Camera Raw."}, - {"after": "levels", "title": "๐ŸŽž Analog film and CCD rendering", "color": "#305157", "text_color": "#EAF1F8"}, - {"after": "photo_paper", "title": "๐Ÿ“ท LUT .cube file reader", "color": "#305157", "text_color": "#EAF1F8"}, - {"after": "color_space", "title": "๐ŸŽฅ Filmic camera", "color": "#305157", "text_color": "#EAF1F8"}, + {"after": "pivot", "name": "rasterix_selective_tone", "title": "๐ŸŽ› Color: Selective Tone Zones", "color": "#6A5636", "text_color": "#EAF1F8", "label": "Zone-based tonal pushes for highlights, midtones, shadows, and blacks. Inspired by DxO Photolab"}, + {"after": "selective_tone_strength", "name": "rasterix_color_balance", "title": "โš– Color: Balance Wheels", "color": "#6A5636", "text_color": "#EAF1F8", "label": "Color-balance style adjustments per tonal range with luminosity preservation options. Inspired by DaVinci Resolve and Photoshop color wheels."}, + {"after": "color_balance_separation", "name": "rasterix_hsl", "title": "๐ŸŒˆ Color: HSL Sculpting", "color": "#6A5636", "text_color": "#EAF1F8", "label": "Hue, saturation, lightness, and vibrance targeting by color channel. Inspired by Adobe Lightroom and Photoshop HSL panel."}, - {"after": "pivot", "title": "๐ŸŽ› Selective tone", "color": "#52472C", "text_color": "#EAF1F8"}, - {"after": "selective_tone_strength", "title": "โš– Color balance", "color": "#52472C", "text_color": "#EAF1F8"}, - {"after": "color_balance_separation", "title": "๐Ÿช Hue Saturation Lightness", "color": "#52472C", "text_color": "#EAF1F8"}, + {"after": "hsl_skin_protection", "name": "rasterix_shade_detailer", "title": "๐Ÿ’Ž Detail: Microcontrast", "color": "#554267", "text_color": "#EAF1F8", "label": "Fine local contrast shaping to emphasize texture and perceived detail. Inspired by DxO PhotoLab microcontrast tools."}, + {"after": "shade_strength", "name": "rasterix_clarity", "title": "๐Ÿ” Detail: Midtone Clarity", "color": "#554267", "text_color": "#EAF1F8", "label": "Midtone-focused clarity enhancement for crispness without excessive global contrast. Inspired by Adobe Lightroom Clarity."}, - {"after": "hsl_skin_protection", "title": "๐Ÿ’Ž Microcontrast - Shade detailer", "color": "#4A2D3A", "text_color": "#EAF1F8"}, - {"after": "shade_strength", "title": "๐Ÿงน Midtone claity", "color": "#355443", "text_color": "#EAF1F8"}, + {"after": "edge_preservation", "name": "rasterix_endpoints", "title": "๐Ÿ”› Output: Black/White Endpoints", "color": "#5A603E", "text_color": "#EAF1F8", "label": "Set endpoint compression and clipping behavior for final output anchoring. Inspired by Adobe Photoshop Levels."}, + {"after": "skip_if_no_clip", "name": "rasterix_dithering", "title": "๐Ÿงฉ Output: Dithering & Diffusion", "color": "#5A603E", "text_color": "#EAF1F8", "label": "Reduce banding and smooth gradients using dither and error diffusion tools. Inspired by Floyd-Steinberg error diffusion."}, - {"after": "edge_preservation", "title": "๐Ÿ”› Black and light endpoints", "color": "#454A2D", "text_color": "#EAF1F8"}, - {"after": "skip_if_no_clip", "title": "๐Ÿ› Dithering / diffusion", "color": "#454A2D", "text_color": "#EAF1F8"}, - - {"after": "error_diffusion", "title": "๐Ÿ“Š Histogram", "color": "#2F4F61", "text_color": "#EAF1F8"}, + {"after": "error_diffusion", "name": "rasterix_histogram", "title": "๐Ÿ“Š Analysis: Histogram", "color": "#35586A", "text_color": "#EAF1F8", "label": "View channel histograms for fast clipping, balance, and tonal distribution checks. Inspired by Adobe Photoshop (and all other) Histogram."}, ] @classmethod @@ -420,9 +420,6 @@ class PrimereRasterix: if use_film_rendering and film_rendering_intensity != 0: pil_img = img_film_rendering.img_film_rendering(image=pil_img, rendering=film_rendering, intensity=film_rendering_intensity, add_grain=iso_grain, add_halation=halation, expiration_years=expiration_years) - if use_photo_paper: - pil_img = img_solarization_bw.img_solarization_bw(image=pil_img, color_mode=False, strength=0.00, pivot=0.00, sigma=0.01, edge_boost=0.00, edge_radius=0.5, contrast=1, precision=precision, hard_paper=photo_paper, grain_modulation=False, grain_strength=0, grain_scale=1, seed=1) - if use_lut and lut_file != "None": lut_path = os.path.join(self.LUT_DIR, lut_file) pil_img = img_lut3d.img_lut3d(image=pil_img, lut_path=lut_path, intensity=intensity, input_space=color_space, output_space=color_space) @@ -430,6 +427,9 @@ class PrimereRasterix: if use_filmic: pil_img = img_filmic_curve.img_filmic_curve(image=pil_img, curve_type=curve_type, contrast=filmic_contrast, highlight_rolloff=highlight_rolloff, shadow_lift=shadow_lift, pivot=pivot) + if use_photo_paper: + pil_img = img_solarization_bw.img_solarization_bw(image=pil_img, color_mode=False, strength=0.00, pivot=0.00, sigma=0.01, edge_boost=0.00, edge_radius=0.5, contrast=1, precision=precision, hard_paper=photo_paper, grain_modulation=False, grain_strength=0, grain_scale=1, seed=1) + st_data = rasterix_data.get('selective_tone', {}) if use_selective_tone and st_data: pil_img = img_selective_tone.img_selective_tone(image=pil_img, channels_data=st_data, separation=selective_tone_separation, strength=selective_tone_strength) @@ -466,7 +466,6 @@ class PrimereRasterix: suffix = ''.join(random.choice("abcdefghijklmnopqrstuvwxyz0123456789") for _ in range(8)) temp_file = f"rasterix_hist_{suffix}.png" active_hist.save(os.path.join(folder_paths.temp_directory, temp_file), compress_level=1) - # return {"ui": {"images": [{"filename": temp_file, "subfolder": "", "type": "temp"}]}, "result": (utility.image_to_tensor(pil_img),), } return {"ui": {"images": [{"filename": temp_file, "subfolder": "", "type": "temp"}], "active_concept": [active_display]}, "result": (utility.image_to_tensor(pil_img),), } else: INVALID_IMAGE_PATH = os.path.join(PRIMERE_ROOT, 'front_end', 'images') @@ -477,7 +476,6 @@ class PrimereRasterix: os.makedirs(folder_paths.get_temp_directory(), exist_ok=True) TEMP_FILE = os.path.join(folder_paths.get_temp_directory(), temp_filename) utility.tensor_to_image(images[0]).save(TEMP_FILE) - # return {"ui": {"images": [{"filename": temp_filename, "subfolder": "", "type": "temp"}]}, "result": (utility.image_to_tensor(pil_img),),} return {"ui": {"images": [{"filename": temp_filename, "subfolder": "", "type": "temp"}], "active_concept": [active_display]}, "result": (utility.image_to_tensor(pil_img),),} class PrimereAutoNormalize: diff --git a/front_end/title_manager.js b/front_end/title_manager.js index 40a0c81..3d9035d 100644 --- a/front_end/title_manager.js +++ b/front_end/title_manager.js @@ -257,7 +257,7 @@ function handleTitleHover(node, event, pos) { for (const w of node.widgets) { const meta = w?.__primereTitleMeta; - if (!meta?.label) continue; + if (!meta?.label && !meta?.name) continue; const y0 = Number(w.last_y || 0); const y1 = y0 + TITLE_WIDGET_HEIGHT; const insideY = pos[1] >= y0 && pos[1] <= y1;