| ... | @@ -9,6 +9,7 @@ pub enum ParamKind { | ... | @@ -9,6 +9,7 @@ pub enum ParamKind { |
| 9 | Vec2 { min: f64, max: f64, default: [f64; 2] }, | 9 | Vec2 { min: f64, max: f64, default: [f64; 2] }, |
| 10 | Bool { default: bool }, | 10 | Bool { default: bool }, |
| 11 | Enum { options: &'static [&'static str], default: &'static str }, | 11 | Enum { options: &'static [&'static str], default: &'static str }, |
| | 12 | IntEnum { options: &'static [(i32, &'static str)], default: i32 }, |
| 12 | Color { | 13 | Color { |
| 13 | r: &'static str, | 14 | r: &'static str, |
| 14 | g: &'static str, | 15 | g: &'static str, |
| ... | @@ -77,99 +78,218 @@ pub fn infer_float_range(name: &str, val: f64) -> (f64, f64) { | ... | @@ -77,99 +78,218 @@ pub fn infer_float_range(name: &str, val: f64) -> (f64, f64) { |
| 77 | } | 78 | } |
| 78 | | 79 | |
| 79 | const APPLY_MODES: &[&str] = &[ | 80 | const APPLY_MODES: &[&str] = &[ |
| 80 | "Normal", | 81 | "Normal", "Screen", "Multiply", "Overlay", "Soft Light", "Hard Light", |
| 81 | "Screen", | 82 | "Color Dodge", "LinearDodge", "Color Burn", "LinearBurn", "Darken", "Lighten", |
| 82 | "Multiply", | 83 | "Difference", "Exclusion", "LinearLight", "VividLight", "PinLight", |
| 83 | "Overlay", | 84 | "DarkerColor", "LighterColor", "Hypotenuse", "Geometric", |
| 84 | "Soft Light", | 85 | "Hue", "Saturation", "Color", "Luminosity", |
| 85 | "Hard Light", | | |
| 86 | "Color Dodge", | | |
| 87 | "Color Burn", | | |
| 88 | "Darken", | | |
| 89 | "Lighten", | | |
| 90 | "Difference", | | |
| 91 | "Exclusion", | | |
| 92 | "Hue", | | |
| 93 | "Saturation", | | |
| 94 | "Color", | | |
| 95 | "Luminosity", | | |
| 96 | ]; | 86 | ]; |
| 97 | | 87 | const MERGE_OPERATORS: &[&str] = &["Over", "Under", "In", "Held Out", "Atop", "XOr"]; |
| 98 | const BLUR_FILTERS: &[&str] = &["Fast Gaussian", "Gaussian", "Box", "Bartlett", "Multi-box"]; | 88 | const BLUR_FILTERS: &[&str] = &["Fast Gaussian", "Gaussian", "Box"]; |
| | 89 | const GLOW_FILTERS: &[&str] = &["Gaussian", "Fast Gaussian", "Box"]; |
| 99 | const CLIPPING_MODES: &[&str] = &["Frame", "Domain", "None"]; | 90 | const CLIPPING_MODES: &[&str] = &["Frame", "Domain", "None"]; |
| 100 | const EDGES_MODES: &[&str] = &["Canvas", "Wrap", "Duplicate", "Mirror"]; | 91 | const PAINT_MODES: &[&str] = &["Merge", "Add", "Subtract", "Multiply", "Minimum", "Maximum", "Invert", "Replace", "Average"]; |
| | 92 | const GAMUT_SPACES: &[&str] = &["NoChange", "sRGB", "Rec709"]; |
| | 93 | const MONTHS: &[&str] = &[ |
| | 94 | "January", "February", "March", "April", "May", "June", |
| | 95 | "July", "August", "September", "October", "November", "December", |
| | 96 | ]; |
| 101 | const SHAPE3D_TYPES: &[&str] = &[ | 97 | const SHAPE3D_TYPES: &[&str] = &[ |
| 102 | "SurfacePlaneInputs", | 98 | "SurfacePlaneInputs", "SurfaceSphereInputs", "SurfaceCubeInputs", "SurfaceCylinderInputs", |
| 103 | "SurfaceSphereInputs", | 99 | ]; |
| 104 | "SurfaceCubeInputs", | 100 | const GATE_FITS: &[&str] = &["Inside", "Width", "Height", "Outside", "Stretch"]; |
| 105 | "SurfaceCylinderInputs", | 101 | const MASK_CHANNELS: &[&str] = &[ |
| 106 | "SurfaceConeInputs", | 102 | "Alpha", "Luminance", "Red", "Green", "Blue", "Saturation", "Lightness", "Hue", |
| 107 | "SurfaceTorusInputs", | 103 | ]; |
| | 104 | |
| | 105 | const EDGES_INT: &[(i32, &str)] = &[(0, "Canvas"), (1, "Wrap"), (2, "Duplicate"), (3, "Mirror")]; |
| | 106 | const CB_OPS: &[(i32, &str)] = &[ |
| | 107 | (0, "Copy"), (1, "Add"), (2, "Subtract"), (6, "Multiply"), (7, "Divide"), |
| | 108 | (8, "Maximum"), (9, "Minimum"), (10, "Negative"), (11, "Solid"), (12, "Clear"), (13, "Difference"), |
| | 109 | ]; |
| | 110 | const CB_CHANNELS: &[(i32, &str)] = &[ |
| | 111 | (0, "Red FG"), (1, "Green FG"), (2, "Blue FG"), (3, "Alpha FG"), (4, "Do Nothing"), |
| | 112 | (5, "Red BG"), (6, "Green BG"), (7, "Blue BG"), (8, "Alpha BG"), |
| | 113 | (9, "Hue FG"), (10, "Lum FG"), (11, "Sat FG"), |
| | 114 | (12, "Hue BG"), (13, "Lum BG"), (14, "Sat BG"), (15, "Black"), (16, "White"), |
| 108 | ]; | 115 | ]; |
| | 116 | const DECAY_TYPES: &[(i32, &str)] = &[(0, "No Decay"), (1, "Linear"), (2, "Quadratic")]; |
| | 117 | const JOIN_STYLES: &[(i32, &str)] = &[(0, "Bevel"), (1, "Round"), (2, "Miter")]; |
| | 118 | const CAP_STYLES: &[(i32, &str)] = &[(0, "Butt"), (1, "Round"), (2, "Square")]; |
| 109 | | 119 | |
| 110 | const fn flt(name: &'static str, label: &'static str, min: f64, max: f64, default: f64) -> ParamSpec { | 120 | const fn flt(name: &'static str, label: &'static str, min: f64, max: f64, default: f64) -> ParamSpec { |
| 111 | ParamSpec { | 121 | ParamSpec { name, label, kind: ParamKind::Float { min, max, default, step: 0.01 } } |
| 112 | name, | | |
| 113 | label, | | |
| 114 | kind: ParamKind::Float { min, max, default, step: 0.01 }, | | |
| 115 | } | | |
| 116 | } | 122 | } |
| 117 | | 123 | |
| 118 | const fn v2(name: &'static str, label: &'static str, min: f64, max: f64, default: [f64; 2]) -> ParamSpec { | 124 | const fn v2(name: &'static str, label: &'static str, min: f64, max: f64, default: [f64; 2]) -> ParamSpec { |
| 119 | ParamSpec { | 125 | ParamSpec { name, label, kind: ParamKind::Vec2 { min, max, default } } |
| 120 | name, | | |
| 121 | label, | | |
| 122 | kind: ParamKind::Vec2 { min, max, default }, | | |
| 123 | } | | |
| 124 | } | 126 | } |
| 125 | | 127 | |
| 126 | const fn boolean(name: &'static str, label: &'static str, default: bool) -> ParamSpec { | 128 | const fn boolean(name: &'static str, label: &'static str, default: bool) -> ParamSpec { |
| 127 | ParamSpec { | 129 | ParamSpec { name, label, kind: ParamKind::Bool { default } } |
| 128 | name, | 130 | } |
| 129 | label, | 131 | |
| 130 | kind: ParamKind::Bool { default }, | 132 | const fn fuid(name: &'static str, label: &'static str, options: &'static [&'static str], default: &'static str) -> ParamSpec { |
| 131 | } | 133 | ParamSpec { name, label, kind: ParamKind::Enum { options, default } } |
| | 134 | } |
| | 135 | |
| | 136 | const fn int_enum(name: &'static str, label: &'static str, options: &'static [(i32, &'static str)], default: i32) -> ParamSpec { |
| | 137 | ParamSpec { name, label, kind: ParamKind::IntEnum { options, default } } |
| | 138 | } |
| | 139 | |
| | 140 | const fn text(name: &'static str, label: &'static str, default: &'static str) -> ParamSpec { |
| | 141 | ParamSpec { name, label, kind: ParamKind::Text { default } } |
| 132 | } | 142 | } |
| 133 | | 143 | |
| 134 | const fn fuid( | 144 | const fn rgba( |
| 135 | name: &'static str, | 145 | name: &'static str, |
| 136 | label: &'static str, | 146 | label: &'static str, |
| 137 | options: &'static [&'static str], | 147 | r: &'static str, |
| 138 | default: &'static str, | 148 | g: &'static str, |
| | 149 | b: &'static str, |
| | 150 | a: Option<&'static str>, |
| | 151 | default: [f64; 4], |
| 139 | ) -> ParamSpec { | 152 | ) -> ParamSpec { |
| 140 | ParamSpec { | 153 | ParamSpec { name, label, kind: ParamKind::Color { r, g, b, a, default } } |
| 141 | name, | | |
| 142 | label, | | |
| 143 | kind: ParamKind::Enum { options, default }, | | |
| 144 | } | | |
| 145 | } | 154 | } |
| 146 | | 155 | |
| | 156 | /// All tool kinds with curated Inspector schemas. |
| | 157 | #[cfg(test)] |
| | 158 | pub const CURATED_TOOL_KINDS: &[&str] = &[ |
| | 159 | // Composite & Routing |
| | 160 | "Merge", "Dissolve", "ChannelBoolean", "Shadow", "Switch", "Fuse.Switch", |
| | 161 | // Transform & Warp |
| | 162 | "Transform", "Displace", "Vortex", "Drip", "Dent", "GridWarp", "PerspectivePositioner", |
| | 163 | // Blur, Glow & Film |
| | 164 | "Blur", "DirectionalBlur", "VariBlur", "Glow", "SoftGlow", "Sharpen", "ErodeDilate", "FilmGrain", |
| | 165 | // Color & Keying |
| | 166 | "BrightnessContrast", "ColorCorrector", "ColorGain", "HueCurves", "GamutConvert", "UltraKeyer", "Custom", |
| | 167 | // Generators & I/O |
| | 168 | "Background", "FastNoise", "DaySky", "TextPlus", "Loader", "Saver", "TimeStretcher", "TimeSpeed", |
| | 169 | // Paint & Masks |
| | 170 | "Paint", "PaintMask", "EllipseMask", "RectangleMask", "BitmapMask", "WandMask", |
| | 171 | // Vector Shapes |
| | 172 | "sRender", "sEllipse", "sRectangle", "sNGon", "sBoolean", "sTransform", "sMerge", "sOutline", "sGrid", |
| | 173 | // 3D Scene, Lights & Materials |
| | 174 | "Camera3D", "Shape3D", "Cube3D", "SurfaceFBXMesh", |
| | 175 | "LightPoint", "LightSpot", "LightDirectional", "LightAmbient", |
| | 176 | "MtlBlinn", "MtlPhong", "MtlCookTorrance", "MtlWard", |
| | 177 | ]; |
| | 178 | |
| 147 | /// Curated Fusion 21.1 parameter schemas for major compositor tools. | 179 | /// Curated Fusion 21.1 parameter schemas for major compositor tools. |
| 148 | pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { | 180 | pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { |
| 149 | match kind { | 181 | match kind { |
| | 182 | // --- Composite & Routing --- |
| 150 | "Merge" => const { &[ | 183 | "Merge" => const { &[ |
| 151 | fuid("ApplyMode", "Apply Mode", APPLY_MODES, "Normal"), | 184 | fuid("ApplyMode", "Apply Mode", APPLY_MODES, "Normal"), |
| 152 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 185 | fuid("Operator", "Operator", MERGE_OPERATORS, "Over"), |
| 153 | flt("SubMerge", "Subtractive", 0.0, 1.0, 0.0), | 186 | flt("SubtractiveAdditive", "Sub / Add", 0.0, 1.0, 1.0), |
| | 187 | flt("Gain", "Alpha Gain", 0.0, 1.0, 1.0), |
| | 188 | flt("BurnIn", "Burn In", 0.0, 1.0, 0.0), |
| 154 | v2("Center", "Center", -1.0, 2.0, [0.5, 0.5]), | 189 | v2("Center", "Center", -1.0, 2.0, [0.5, 0.5]), |
| 155 | flt("Size", "Size", 0.0, 5.0, 1.0), | 190 | flt("Size", "Size", 0.0, 5.0, 1.0), |
| 156 | flt("Angle", "Angle", -360.0, 360.0, 0.0), | 191 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| 157 | boolean("FlipHoriz", "Flip Horiz", false), | 192 | boolean("FlipHoriz", "Flip Horiz", false), |
| 158 | boolean("FlipVert", "Flip Vert", false), | 193 | boolean("FlipVert", "Flip Vert", false), |
| 159 | fuid("Edges", "Edges", EDGES_MODES, "Canvas"), | 194 | int_enum("Edges", "Edges", EDGES_INT, 0), |
| 160 | boolean("PerformDepthMerge", "Depth Merge", false), | 195 | boolean("MultiplyByMask", "Mult by Mask", false), |
| | 196 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 197 | ] }, |
| | 198 | "Dissolve" => const { &[ |
| | 199 | flt("Mix", "Mix", 0.0, 1.0, 0.5), |
| | 200 | boolean("MultiplyByMask", "Mult by Mask", false), |
| | 201 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 202 | ] }, |
| | 203 | "ChannelBoolean" => const { &[ |
| | 204 | int_enum("Operation", "Operation", CB_OPS, 0), |
| | 205 | int_enum("ToRed", "To Red", CB_CHANNELS, 0), |
| | 206 | int_enum("ToGreen", "To Green", CB_CHANNELS, 1), |
| | 207 | int_enum("ToBlue", "To Blue", CB_CHANNELS, 2), |
| | 208 | int_enum("ToAlpha", "To Alpha", CB_CHANNELS, 3), |
| | 209 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 210 | ] }, |
| | 211 | "Shadow" => const { &[ |
| | 212 | v2("ShadowOffset", "Offset", -1.0, 2.0, [0.5, 0.5]), |
| | 213 | flt("Softness", "Softness", 0.0, 0.2, 0.0), |
| | 214 | rgba("Color", "Color", "Red", "Green", "Blue", Some("Alpha"), [0.0, 0.0, 0.0, 1.0]), |
| | 215 | int_enum("Output", "Output", &[(0, "Normal"), (1, "Shadow Only")], 0), |
| | 216 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 217 | ] }, |
| | 218 | "Switch" => const { &[ |
| | 219 | flt("Source", "Source", 0.0, 16.0, 0.0), |
| | 220 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 221 | ] }, |
| | 222 | "Fuse.Switch" => const { &[ |
| | 223 | flt("Which", "Which", 1.0, 16.0, 1.0), |
| 161 | ] }, | 224 | ] }, |
| | 225 | |
| | 226 | // --- Transform & Warp --- |
| 162 | "Transform" => const { &[ | 227 | "Transform" => const { &[ |
| 163 | v2("Center", "Center", -1.0, 2.0, [0.5, 0.5]), | 228 | v2("Center", "Center", -1.0, 2.0, [0.5, 0.5]), |
| 164 | v2("Pivot", "Pivot", -1.0, 2.0, [0.5, 0.5]), | 229 | v2("Pivot", "Pivot", -1.0, 2.0, [0.5, 0.5]), |
| | 230 | boolean("UseSizeAndAspect", "Size/Aspect", true), |
| 165 | flt("Size", "Size", 0.0, 5.0, 1.0), | 231 | flt("Size", "Size", 0.0, 5.0, 1.0), |
| 166 | flt("Aspect", "Aspect", 0.1, 4.0, 1.0), | 232 | flt("Aspect", "Aspect", 0.1, 4.0, 1.0), |
| | 233 | flt("XSize", "X Size", 0.0, 5.0, 1.0), |
| | 234 | flt("YSize", "Y Size", 0.0, 5.0, 1.0), |
| 167 | flt("Angle", "Angle", -360.0, 360.0, 0.0), | 235 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| 168 | boolean("FlipHoriz", "Flip Horiz", false), | 236 | boolean("FlipHoriz", "Flip Horiz", false), |
| 169 | boolean("FlipVert", "Flip Vert", false), | 237 | boolean("FlipVert", "Flip Vert", false), |
| 170 | fuid("Edges", "Edges", EDGES_MODES, "Canvas"), | 238 | boolean("InvertTransform", "Invert", false), |
| | 239 | int_enum("Edges", "Edges", EDGES_INT, 0), |
| | 240 | boolean("MultiplyByMask", "Mult by Mask", false), |
| | 241 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 242 | ] }, |
| | 243 | "Displace" => const { &[ |
| | 244 | int_enum("Type", "Type", &[(0, "Radial"), (1, "XY")], 0), |
| | 245 | flt("RefractionStrength", "Strength", -2.0, 2.0, 0.05), |
| | 246 | flt("XRefraction", "X Refract", -1.0, 1.0, 0.0), |
| | 247 | flt("YRefraction", "Y Refract", -1.0, 1.0, 0.0), |
| | 248 | flt("XOffset", "X Offset", -1.0, 1.0, 0.0), |
| | 249 | flt("YOffset", "Y Offset", -1.0, 1.0, 0.0), |
| | 250 | flt("Spread", "Spread", 0.0, 1.0, 0.0), |
| | 251 | flt("LightPower", "Light Power", -2.0, 2.0, 0.0), |
| | 252 | flt("LightAngle", "Light Angle", -360.0, 360.0, 0.0), |
| | 253 | v2("Center", "Center", -0.5, 1.5, [0.5, 0.5]), |
| | 254 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 255 | ] }, |
| | 256 | "Vortex" => const { &[ |
| | 257 | v2("Center", "Center", -0.5, 1.5, [0.5, 0.5]), |
| | 258 | flt("Size", "Size", 0.01, 2.0, 0.5), |
| | 259 | flt("Angle", "Angle", -720.0, 720.0, 0.0), |
| | 260 | flt("Power", "Power", 0.0, 20.0, 5.0), |
| | 261 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 262 | ] }, |
| | 263 | "Drip" => const { &[ |
| | 264 | int_enum("Shape", "Shape", &[(0, "Circle"), (1, "Square"), (2, "Random"), (3, "Horizontal"), (4, "Vertical")], 0), |
| | 265 | v2("Center", "Center", -0.5, 1.5, [0.5, 0.5]), |
| | 266 | flt("Amplitude", "Amplitude", -1.0, 1.0, 0.1), |
| | 267 | flt("Frequency", "Frequency", 0.0, 50.0, 10.0), |
| | 268 | flt("Aspect", "Aspect", 0.1, 4.0, 1.0), |
| | 269 | flt("Phase", "Phase", -10.0, 10.0, 0.0), |
| | 270 | flt("Dampening", "Dampening", 0.0, 5.0, 0.0), |
| | 271 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 272 | ] }, |
| | 273 | "Dent" => const { &[ |
| | 274 | int_enum("Type", "Type", &[(0, "Dent"), (1, "Sine"), (2, "Pinch"), (3, "Punch"), (4, "Cosine")], 0), |
| | 275 | v2("Center", "Center", -0.5, 1.5, [0.5, 0.5]), |
| | 276 | flt("Size", "Size", 0.01, 2.0, 0.5), |
| | 277 | flt("Strength", "Strength", -2.0, 2.0, 0.5), |
| | 278 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 279 | ] }, |
| | 280 | "GridWarp" => const { &[ |
| 171 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 281 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 172 | ] }, | 282 | ] }, |
| | 283 | "PerspectivePositioner" => const { &[ |
| | 284 | int_enum("MappingType", "Mapping", &[(0, "Linear"), (1, "Perspective")], 0), |
| | 285 | v2("TopLeft", "Top Left", -0.5, 1.5, [0.0, 1.0]), |
| | 286 | v2("TopRight", "Top Right", -0.5, 1.5, [1.0, 1.0]), |
| | 287 | v2("BottomLeft", "Bottom Left", -0.5, 1.5, [0.0, 0.0]), |
| | 288 | v2("BottomRight", "Bottom Right", -0.5, 1.5, [1.0, 0.0]), |
| | 289 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 290 | ] }, |
| | 291 | |
| | 292 | // --- Blur, Glow & Film --- |
| 173 | "Blur" => const { &[ | 293 | "Blur" => const { &[ |
| 174 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), | 294 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), |
| 175 | boolean("LockXY", "Lock X/Y", true), | 295 | boolean("LockXY", "Lock X/Y", true), |
| ... | @@ -178,19 +298,82 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { | ... | @@ -178,19 +298,82 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { |
| 178 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), | 298 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| 179 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 299 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 180 | ] }, | 300 | ] }, |
| | 301 | "DirectionalBlur" => const { &[ |
| | 302 | int_enum("Type", "Type", &[(0, "Linear"), (1, "Radial"), (2, "Centered"), (3, "Zoom")], 0), |
| | 303 | flt("Length", "Length", -0.5, 0.5, 0.02), |
| | 304 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| | 305 | v2("Center", "Center", -0.5, 1.5, [0.5, 0.5]), |
| | 306 | flt("Glow", "Glow", 0.0, 1.0, 0.0), |
| | 307 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 308 | ] }, |
| | 309 | "VariBlur" => const { &[ |
| | 310 | flt("XBlurSize", "Blur Size", 0.0, 100.0, 1.0), |
| | 311 | flt("YBlurSize", "Y Blur Size", 0.0, 100.0, 1.0), |
| | 312 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 313 | ] }, |
| 181 | "Glow" => const { &[ | 314 | "Glow" => const { &[ |
| | 315 | fuid("Filter", "Filter", GLOW_FILTERS, "Gaussian"), |
| | 316 | boolean("LockXY", "Lock X/Y", true), |
| 182 | flt("XGlowSize", "Glow Size", 0.0, 100.0, 10.0), | 317 | flt("XGlowSize", "Glow Size", 0.0, 100.0, 10.0), |
| 183 | flt("Glow", "Glow", 0.0, 2.0, 0.8), | 318 | flt("YGlowSize", "Y Glow Size", 0.0, 100.0, 10.0), |
| | 319 | flt("Glow", "Glow", 0.0, 1.0, 0.8), |
| | 320 | flt("RedScale", "Red Scale", 0.0, 5.0, 1.0), |
| | 321 | flt("GreenScale", "Green Scale", 0.0, 5.0, 1.0), |
| | 322 | flt("BlueScale", "Blue Scale", 0.0, 5.0, 1.0), |
| | 323 | flt("AlphaScale", "Alpha Scale", 0.0, 5.0, 1.0), |
| | 324 | boolean("Alpha", "Alpha", true), |
| | 325 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| 184 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 326 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 185 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), | | |
| 186 | ] }, | 327 | ] }, |
| 187 | "SoftGlow" => const { &[ | 328 | "SoftGlow" => const { &[ |
| 188 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), | 329 | fuid("Filter", "Filter", GLOW_FILTERS, "Gaussian"), |
| 189 | flt("Threshold", "Threshold", 0.0, 1.0, 0.0), | 330 | flt("Threshold", "Threshold", 0.0, 1.0, 0.0), |
| 190 | flt("Gain", "Gain", 0.0, 5.0, 2.0), | 331 | flt("Gain", "Gain", 0.0, 5.0, 2.0), |
| | 332 | boolean("LockXY", "Lock X/Y", true), |
| 191 | flt("XGlowSize", "Glow Size", 0.0, 100.0, 10.0), | 333 | flt("XGlowSize", "Glow Size", 0.0, 100.0, 10.0), |
| | 334 | flt("YGlowSize", "Y Glow Size", 0.0, 100.0, 10.0), |
| | 335 | flt("RedScale", "Red Scale", 0.0, 5.0, 1.0), |
| | 336 | flt("GreenScale", "Green Scale", 0.0, 5.0, 1.0), |
| | 337 | flt("BlueScale", "Blue Scale", 0.0, 5.0, 1.0), |
| | 338 | flt("AlphaScale", "Alpha Scale", 0.0, 5.0, 1.0), |
| | 339 | boolean("Alpha", "Alpha", true), |
| | 340 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| | 341 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 342 | ] }, |
| | 343 | "Sharpen" => const { &[ |
| | 344 | boolean("LockAmountXY", "Lock X/Y", true), |
| | 345 | flt("XAmount", "X Amount", 0.0, 50.0, 1.0), |
| | 346 | flt("YAmount", "Y Amount", 0.0, 50.0, 1.0), |
| | 347 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 348 | ] }, |
| | 349 | "ErodeDilate" => const { &[ |
| | 350 | int_enum("Filter", "Filter", &[(0, "Box"), (1, "Bartlett"), (2, "Gaussian"), (3, "Circle")], 0), |
| | 351 | boolean("LockXY", "Lock X/Y", true), |
| | 352 | flt("XAmount", "X Amount", -0.2, 0.2, 0.0), |
| | 353 | flt("YAmount", "Y Amount", -0.2, 0.2, 0.0), |
| | 354 | boolean("Red", "Red", true), |
| | 355 | boolean("Green", "Green", true), |
| | 356 | boolean("Blue", "Blue", true), |
| | 357 | boolean("Alpha", "Alpha", true), |
| 192 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 358 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 193 | ] }, | 359 | ] }, |
| | 360 | "FilmGrain" => const { &[ |
| | 361 | flt("MasterStrength", "Strength", 0.0, 1.0, 0.05), |
| | 362 | boolean("LockSize", "Lock Size", true), |
| | 363 | flt("MasterXSize", "Size", 0.1, 10.0, 1.0), |
| | 364 | flt("MasterYSize", "Y Size", 0.1, 10.0, 1.0), |
| | 365 | flt("MasterRoughness", "Roughness", 0.0, 1.0, 0.0), |
| | 366 | boolean("Monochrome", "Monochrome", true), |
| | 367 | boolean("LogProcessing", "Log Process", true), |
| | 368 | boolean("TimeLockSeed", "Lock Seed", false), |
| | 369 | flt("Seed", "Seed", 0.0, 10000.0, 0.0), |
| | 370 | flt("RedStrength", "Red Str", 0.0, 2.0, 1.0), |
| | 371 | flt("GreenStrength", "Green Str", 0.0, 2.0, 1.0), |
| | 372 | flt("BlueStrength", "Blue Str", 0.0, 2.0, 1.0), |
| | 373 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 374 | ] }, |
| | 375 | |
| | 376 | // --- Color & Keying --- |
| 194 | "BrightnessContrast" => const { &[ | 377 | "BrightnessContrast" => const { &[ |
| 195 | flt("Gain", "Gain", 0.0, 5.0, 1.0), | 378 | flt("Gain", "Gain", 0.0, 5.0, 1.0), |
| 196 | flt("Lift", "Lift", -1.0, 1.0, 0.0), | 379 | flt("Lift", "Lift", -1.0, 1.0, 0.0), |
| ... | @@ -199,6 +382,7 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { | ... | @@ -199,6 +382,7 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { |
| 199 | flt("Brightness", "Brightness", -1.0, 1.0, 0.0), | 382 | flt("Brightness", "Brightness", -1.0, 1.0, 0.0), |
| 200 | flt("Saturation", "Saturation", 0.0, 4.0, 1.0), | 383 | flt("Saturation", "Saturation", 0.0, 4.0, 1.0), |
| 201 | boolean("PreDividePostMultiply", "Pre-Div/Post", false), | 384 | boolean("PreDividePostMultiply", "Pre-Div/Post", false), |
| | 385 | boolean("MultiplyByMask", "Mult by Mask", false), |
| 202 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 386 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 203 | ] }, | 387 | ] }, |
| 204 | "ColorCorrector" => const { &[ | 388 | "ColorCorrector" => const { &[ |
| ... | @@ -210,52 +394,173 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { | ... | @@ -210,52 +394,173 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { |
| 210 | flt("MasterRGBContrast", "Contrast", 0.0, 3.0, 1.0), | 394 | flt("MasterRGBContrast", "Contrast", 0.0, 3.0, 1.0), |
| 211 | flt("MasterRGBBrightness", "Brightness", -1.0, 1.0, 0.0), | 395 | flt("MasterRGBBrightness", "Brightness", -1.0, 1.0, 0.0), |
| 212 | boolean("PreDividePostMultiply", "Pre-Div/Post", false), | 396 | boolean("PreDividePostMultiply", "Pre-Div/Post", false), |
| | 397 | boolean("MultiplyByMask", "Mult by Mask", false), |
| | 398 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 399 | ] }, |
| | 400 | "ColorGain" => const { &[ |
| | 401 | boolean("LockRGB", "Lock RGB", false), |
| | 402 | flt("GainRed", "Gain Red", 0.0, 5.0, 1.0), |
| | 403 | flt("GainGreen", "Gain Green", 0.0, 5.0, 1.0), |
| | 404 | flt("GainBlue", "Gain Blue", 0.0, 5.0, 1.0), |
| | 405 | flt("LiftRed", "Lift Red", -1.0, 1.0, 0.0), |
| | 406 | flt("LiftGreen", "Lift Green", -1.0, 1.0, 0.0), |
| | 407 | flt("LiftBlue", "Lift Blue", -1.0, 1.0, 0.0), |
| | 408 | flt("GammaRed", "Gamma Red", 0.05, 5.0, 1.0), |
| | 409 | flt("GammaGreen", "Gamma Green", 0.05, 5.0, 1.0), |
| | 410 | flt("GammaBlue", "Gamma Blue", 0.05, 5.0, 1.0), |
| | 411 | flt("SaturationRed", "Sat Red", 0.0, 4.0, 1.0), |
| | 412 | flt("SaturationGreen", "Sat Green", 0.0, 4.0, 1.0), |
| | 413 | flt("SaturationBlue", "Sat Blue", 0.0, 4.0, 1.0), |
| | 414 | boolean("PreDividePostMultiply", "Pre-Div/Post", false), |
| | 415 | boolean("MultiplyByMask", "Mult by Mask", false), |
| | 416 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 417 | ] }, |
| | 418 | "HueCurves" => const { &[ |
| | 419 | boolean("PreDividePostMultiply", "Pre-Div/Post", false), |
| | 420 | boolean("MultiplyByMask", "Mult by Mask", false), |
| 213 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 421 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 214 | ] }, | 422 | ] }, |
| | 423 | "GamutConvert" => const { &[ |
| | 424 | fuid("SourceSpace", "Source Space", GAMUT_SPACES, "NoChange"), |
| | 425 | boolean("RemoveGamma", "Remove Gamma", true), |
| | 426 | fuid("OutputSpace", "Output Space", GAMUT_SPACES, "NoChange"), |
| | 427 | boolean("AddGamma", "Add Gamma", true), |
| | 428 | boolean("PreDividePostMultiply", "Pre-Div/Post", false), |
| | 429 | boolean("MultiplyByMask", "Mult by Mask", false), |
| | 430 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 431 | ] }, |
| | 432 | "UltraKeyer" => const { &[ |
| | 433 | rgba("KeyColor", "Key Color", "BackgroundRed", "BackgroundGreen", "BackgroundBlue", None, [0.0, 1.0, 0.0, 1.0]), |
| | 434 | flt("MatteSeparation", "Matte Sep", 0.0, 1.0, 0.0), |
| | 435 | flt("LowMatteThreshold", "Matte Low", 0.0, 1.0, 0.0), |
| | 436 | flt("High", "Matte High", 0.0, 1.0, 1.0), |
| | 437 | flt("SpillSuppression", "Spill", 0.0, 1.0, 0.0), |
| | 438 | boolean("InvertMatte", "Invert Matte", false), |
| | 439 | boolean("PostMultiplyImage", "Post-Multiply", true), |
| | 440 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 441 | ] }, |
| | 442 | "Custom" => const { &[ |
| | 443 | text("RedExpression", "Red Expr", "r1"), |
| | 444 | text("GreenExpression", "Green Expr", "g1"), |
| | 445 | text("BlueExpression", "Blue Expr", "b1"), |
| | 446 | text("AlphaExpression", "Alpha Expr", "a1"), |
| | 447 | flt("NumberIn1", "Number 1", -10.0, 10.0, 0.0), |
| | 448 | flt("NumberIn2", "Number 2", -10.0, 10.0, 0.0), |
| | 449 | flt("NumberIn3", "Number 3", -10.0, 10.0, 0.0), |
| | 450 | flt("NumberIn4", "Number 4", -10.0, 10.0, 0.0), |
| | 451 | flt("NumberIn5", "Number 5", -10.0, 10.0, 0.0), |
| | 452 | flt("NumberIn6", "Number 6", -10.0, 10.0, 0.0), |
| | 453 | flt("NumberIn7", "Number 7", -10.0, 10.0, 0.0), |
| | 454 | flt("NumberIn8", "Number 8", -10.0, 10.0, 0.0), |
| | 455 | v2("PointIn1", "Point 1", -1.0, 2.0, [0.5, 0.5]), |
| | 456 | v2("PointIn2", "Point 2", -1.0, 2.0, [0.5, 0.5]), |
| | 457 | v2("PointIn3", "Point 3", -1.0, 2.0, [0.5, 0.5]), |
| | 458 | v2("PointIn4", "Point 4", -1.0, 2.0, [0.5, 0.5]), |
| | 459 | boolean("ProcessRed", "Proc Red", true), |
| | 460 | boolean("ProcessGreen", "Proc Green", true), |
| | 461 | boolean("ProcessBlue", "Proc Blue", true), |
| | 462 | boolean("ProcessAlpha", "Proc Alpha", true), |
| | 463 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 464 | ] }, |
| | 465 | |
| | 466 | // --- Generators & I/O --- |
| 215 | "Background" => const { &[ | 467 | "Background" => const { &[ |
| 216 | ParamSpec { | 468 | fuid("Type", "Type", &["Solid", "Horizontal", "Vertical", "Corner", "Gradient"], "Solid"), |
| 217 | name: "TopLeftColor", | 469 | fuid("GradientType", "Grad Type", &["Linear", "Radial", "Angle", "Reflect"], "Linear"), |
| 218 | label: "Color", | 470 | rgba("TopLeftColor", "Color", "TopLeftRed", "TopLeftGreen", "TopLeftBlue", Some("TopLeftAlpha"), [0.0, 0.0, 0.0, 1.0]), |
| 219 | kind: ParamKind::Color { | 471 | flt("Width", "Width", 1.0, 7680.0, 1920.0), |
| 220 | r: "TopLeftRed", | 472 | flt("Height", "Height", 1.0, 4320.0, 1080.0), |
| 221 | g: "TopLeftGreen", | 473 | ] }, |
| 222 | b: "TopLeftBlue", | 474 | "FastNoise" => const { &[ |
| 223 | a: Some("TopLeftAlpha"), | 475 | flt("Detail", "Detail", 0.0, 10.0, 2.0), |
| 224 | default: [0.0, 0.0, 0.0, 1.0], | 476 | flt("Contrast", "Contrast", 0.0, 5.0, 1.0), |
| 225 | }, | 477 | flt("Brightness", "Brightness", -1.0, 1.0, 0.0), |
| 226 | }, | 478 | boolean("LockXY", "Lock X/Y", true), |
| | 479 | flt("XScale", "Scale", 0.01, 50.0, 2.0), |
| | 480 | flt("YScale", "Y Scale", 0.01, 50.0, 2.0), |
| | 481 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| | 482 | flt("Seethe", "Seethe", 0.0, 100.0, 0.0), |
| | 483 | flt("SeetheRate", "Seethe Rate", 0.0, 2.0, 0.0), |
| | 484 | boolean("Discontinuous", "Discontinuous", false), |
| | 485 | boolean("Inverted", "Inverted", false), |
| | 486 | v2("Center", "Center", -2.0, 3.0, [0.5, 0.5]), |
| | 487 | rgba("Color1", "Color 1", "Color1Red", "Color1Green", "Color1Blue", Some("Color1Alpha"), [0.0, 0.0, 0.0, 0.0]), |
| | 488 | rgba("Color2", "Color 2", "Color2Red", "Color2Green", "Color2Blue", Some("Color2Alpha"), [1.0, 1.0, 1.0, 1.0]), |
| | 489 | flt("Width", "Width", 1.0, 7680.0, 1920.0), |
| | 490 | flt("Height", "Height", 1.0, 4320.0, 1080.0), |
| | 491 | ] }, |
| | 492 | "DaySky" => const { &[ |
| | 493 | boolean("UseFrameFormatSettings", "Frame Format", false), |
| 227 | flt("Width", "Width", 1.0, 7680.0, 1920.0), | 494 | flt("Width", "Width", 1.0, 7680.0, 1920.0), |
| 228 | flt("Height", "Height", 1.0, 4320.0, 1080.0), | 495 | flt("Height", "Height", 1.0, 4320.0, 1080.0), |
| | 496 | flt("Latitude", "Latitude", -90.0, 90.0, 43.65), |
| | 497 | flt("Longitude", "Longitude", -180.0, 180.0, -79.38), |
| | 498 | fuid("Month", "Month", MONTHS, "January"), |
| | 499 | flt("Day", "Day", 1.0, 31.0, 1.0), |
| | 500 | flt("Time", "Time (Hr)", 0.0, 24.0, 12.0), |
| | 501 | flt("Turbidity", "Turbidity", 0.0, 1.0, 0.0), |
| | 502 | flt("Exposure", "Exposure", 0.0, 5.0, 0.72), |
| | 503 | flt("Horizon.Brightness", "Horiz Bright", 0.0, 5.0, 1.0), |
| | 504 | flt("Horizon.Luminance", "Horiz Luma", 0.0, 5.0, 1.0), |
| | 505 | flt("Circumsolar.Intensity", "Sun Int", 0.0, 5.0, 1.0), |
| | 506 | flt("Circumsolar.Width", "Sun Width", 0.0, 5.0, 1.0), |
| | 507 | flt("BackscatteredLight", "Backscatter", 0.0, 5.0, 1.0), |
| | 508 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 229 | ] }, | 509 | ] }, |
| 230 | "TextPlus" => const { &[ | 510 | "TextPlus" => const { &[ |
| 231 | ParamSpec { | 511 | text("StyledText", "Styled Text", ""), |
| 232 | name: "StyledText", | 512 | text("Font", "Font", "Helvetica Neue"), |
| 233 | label: "Styled Text", | 513 | text("Style", "Style", "Regular"), |
| 234 | kind: ParamKind::Text { default: "" }, | | |
| 235 | }, | | |
| 236 | ParamSpec { | | |
| 237 | name: "Font", | | |
| 238 | label: "Font", | | |
| 239 | kind: ParamKind::Text { default: "Open Sans" }, | | |
| 240 | }, | | |
| 241 | flt("Size", "Size", 0.005, 1.0, 0.08), | 514 | flt("Size", "Size", 0.005, 1.0, 0.08), |
| 242 | flt("Tracking", "Tracking", 0.0, 4.0, 1.0), | 515 | flt("CharacterSpacing", "Tracking", 0.0, 4.0, 1.0), |
| | 516 | flt("LineSpacing", "Line Space", 0.0, 4.0, 1.0), |
| 243 | v2("Center", "Center", -1.0, 2.0, [0.5, 0.5]), | 517 | v2("Center", "Center", -1.0, 2.0, [0.5, 0.5]), |
| 244 | ParamSpec { | 518 | flt("HorizontalLeftCenterRight", "H Align", -1.0, 1.0, 0.0), |
| 245 | name: "TextColor", | 519 | flt("VerticalTopCenterBottom", "V Align", -1.0, 1.0, 0.0), |
| 246 | label: "Text Color", | 520 | rgba("TextColor", "Text Color", "Red1", "Green1", "Blue1", Some("Alpha1"), [1.0, 1.0, 1.0, 1.0]), |
| 247 | kind: ParamKind::Color { | 521 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 248 | r: "Red1", | 522 | ] }, |
| 249 | g: "Green1", | 523 | "Loader" => const { &[ |
| 250 | b: "Blue1", | 524 | flt("GlobalIn", "Global In", 0.0, 10000.0, 0.0), |
| 251 | a: Some("Alpha1"), | 525 | flt("GlobalOut", "Global Out", 0.0, 10000.0, 100.0), |
| 252 | default: [1.0, 1.0, 1.0, 1.0], | 526 | int_enum("MissingFrames", "Missing", &[(0, "Fail"), (1, "Output Color"), (2, "Hold Previous")], 0), |
| 253 | }, | 527 | boolean("Loop", "Loop", false), |
| 254 | }, | 528 | boolean("Reverse", "Reverse", false), |
| | 529 | ] }, |
| | 530 | "Saver" => const { &[ |
| | 531 | boolean("CreateDir", "Create Dir", true), |
| | 532 | boolean("SetSequenceStart", "Seq Start", false), |
| | 533 | flt("SequenceStartFrame", "Start Frame", 0.0, 10000.0, 0.0), |
| | 534 | boolean("ProcessWhenBlendIs00", "Proc Blend 0", false), |
| | 535 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| | 536 | ] }, |
| | 537 | "TimeStretcher" => const { &[ |
| | 538 | flt("SourceTime", "Source Time", 0.0, 10000.0, 0.0), |
| | 539 | int_enum("InterpolateBetweenFrames", "Interpolate", &[(0, "Nearest"), (1, "Blend"), (2, "Flow")], 1), |
| | 540 | ] }, |
| | 541 | "TimeSpeed" => const { &[ |
| | 542 | flt("Speed", "Speed", -10.0, 10.0, 1.0), |
| | 543 | flt("Delay", "Delay", -1000.0, 1000.0, 0.0), |
| | 544 | ] }, |
| | 545 | |
| | 546 | // --- Paint & Masks --- |
| | 547 | "Paint" => const { &[ |
| 255 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 548 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 256 | ] }, | 549 | ] }, |
| | 550 | "PaintMask" => const { &[ |
| | 551 | fuid("PaintMode", "Paint Mode", PAINT_MODES, "Merge"), |
| | 552 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), |
| | 553 | flt("SoftEdge", "Soft Edge", 0.0, 0.5, 0.0), |
| | 554 | flt("Level", "Level", 0.0, 1.0, 1.0), |
| | 555 | boolean("Invert", "Invert", false), |
| | 556 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| | 557 | flt("MaskWidth", "Mask Width", 1.0, 7680.0, 1920.0), |
| | 558 | flt("MaskHeight", "Mask Height", 1.0, 4320.0, 1080.0), |
| | 559 | ] }, |
| 257 | "EllipseMask" => const { &[ | 560 | "EllipseMask" => const { &[ |
| | 561 | fuid("PaintMode", "Paint Mode", PAINT_MODES, "Merge"), |
| 258 | flt("Level", "Level", 0.0, 1.0, 1.0), | 562 | flt("Level", "Level", 0.0, 1.0, 1.0), |
| | 563 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), |
| 259 | flt("SoftEdge", "Soft Edge", 0.0, 0.5, 0.0), | 564 | flt("SoftEdge", "Soft Edge", 0.0, 0.5, 0.0), |
| 260 | flt("BorderWidth", "Border", -0.2, 0.2, 0.0), | 565 | flt("BorderWidth", "Border", -0.2, 0.2, 0.0), |
| 261 | boolean("Solid", "Solid", true), | 566 | boolean("Solid", "Solid", true), |
| ... | @@ -264,10 +569,14 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { | ... | @@ -264,10 +569,14 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { |
| 264 | flt("Width", "Width", 0.0, 2.0, 0.5), | 569 | flt("Width", "Width", 0.0, 2.0, 0.5), |
| 265 | flt("Height", "Height", 0.0, 2.0, 0.5), | 570 | flt("Height", "Height", 0.0, 2.0, 0.5), |
| 266 | flt("Angle", "Angle", -360.0, 360.0, 0.0), | 571 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| | 572 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| 267 | ] }, | 573 | ] }, |
| 268 | "RectangleMask" => const { &[ | 574 | "RectangleMask" => const { &[ |
| | 575 | fuid("PaintMode", "Paint Mode", PAINT_MODES, "Merge"), |
| 269 | flt("Level", "Level", 0.0, 1.0, 1.0), | 576 | flt("Level", "Level", 0.0, 1.0, 1.0), |
| | 577 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), |
| 270 | flt("SoftEdge", "Soft Edge", 0.0, 0.5, 0.0), | 578 | flt("SoftEdge", "Soft Edge", 0.0, 0.5, 0.0), |
| | 579 | flt("BorderWidth", "Border", -0.2, 0.2, 0.0), |
| 271 | flt("CornerRadius", "Corner", 0.0, 1.0, 0.0), | 580 | flt("CornerRadius", "Corner", 0.0, 1.0, 0.0), |
| 272 | boolean("Solid", "Solid", true), | 581 | boolean("Solid", "Solid", true), |
| 273 | boolean("Invert", "Invert", false), | 582 | boolean("Invert", "Invert", false), |
| ... | @@ -275,57 +584,111 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { | ... | @@ -275,57 +584,111 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { |
| 275 | flt("Width", "Width", 0.0, 2.0, 0.5), | 584 | flt("Width", "Width", 0.0, 2.0, 0.5), |
| 276 | flt("Height", "Height", 0.0, 2.0, 0.5), | 585 | flt("Height", "Height", 0.0, 2.0, 0.5), |
| 277 | flt("Angle", "Angle", -360.0, 360.0, 0.0), | 586 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| | 587 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| 278 | ] }, | 588 | ] }, |
| 279 | "Displace" => const { &[ | 589 | "BitmapMask" => const { &[ |
| 280 | flt("XRefraction", "X Refract", -1.0, 1.0, 0.0), | 590 | fuid("Channel", "Channel", MASK_CHANNELS, "Alpha"), |
| 281 | flt("YRefraction", "Y Refract", -1.0, 1.0, 0.0), | 591 | flt("Low", "Low", 0.0, 1.0, 0.0), |
| 282 | flt("RefractionStrength", "Strength", -2.0, 2.0, 0.0), | 592 | flt("High", "High", 0.0, 1.0, 1.0), |
| 283 | flt("LightAngle", "Light Angle", -360.0, 360.0, 0.0), | 593 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), |
| 284 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 594 | flt("SoftEdge", "Soft Edge", 0.0, 0.5, 0.0), |
| 285 | ] }, | 595 | flt("Level", "Level", 0.0, 1.0, 1.0), |
| 286 | "Vortex" => const { &[ | 596 | boolean("Invert", "Invert", false), |
| | 597 | boolean("FitInput", "Fit Input", false), |
| 287 | v2("Center", "Center", -0.5, 1.5, [0.5, 0.5]), | 598 | v2("Center", "Center", -0.5, 1.5, [0.5, 0.5]), |
| 288 | flt("Size", "Size", 0.0, 2.0, 0.5), | 599 | fuid("PaintMode", "Paint Mode", PAINT_MODES, "Merge"), |
| 289 | flt("Angle", "Angle", -720.0, 720.0, 90.0), | 600 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| 290 | flt("Power", "Power", 0.1, 5.0, 1.0), | 601 | fuid("OutputSize", "Output Size", &["Default", "Custom"], "Default"), |
| | 602 | ] }, |
| | 603 | "WandMask" => const { &[ |
| | 604 | v2("SelectionPoint", "Seed Point", 0.0, 1.0, [0.5, 0.5]), |
| | 605 | flt("Range", "Range", 0.0, 1.0, 0.1), |
| | 606 | flt("RangeSoftEdge", "Range Soft", 0.0, 1.0, 0.0), |
| | 607 | int_enum("ColorSpace", "Color Space", &[(0, "RGB"), (1, "YUV")], 0), |
| | 608 | fuid("Filter", "Filter", BLUR_FILTERS, "Fast Gaussian"), |
| | 609 | flt("SoftEdge", "Soft Edge", 0.0, 0.5, 0.0), |
| | 610 | flt("Level", "Level", 0.0, 1.0, 1.0), |
| | 611 | boolean("Invert", "Invert", false), |
| | 612 | fuid("PaintMode", "Paint Mode", PAINT_MODES, "Merge"), |
| | 613 | fuid("ClippingMode", "Clipping", CLIPPING_MODES, "Frame"), |
| | 614 | ] }, |
| | 615 | |
| | 616 | // --- Vector Shapes --- |
| | 617 | "sRender" => const { &[ |
| | 618 | flt("Width", "Width", 1.0, 7680.0, 1920.0), |
| | 619 | flt("Height", "Height", 1.0, 4320.0, 1080.0), |
| 291 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 620 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 292 | ] }, | 621 | ] }, |
| 293 | "FastNoise" => const { &[ | 622 | "sEllipse" => const { &[ |
| 294 | flt("Detail", "Detail", 0.0, 10.0, 2.0), | 623 | flt("Width", "Width", 0.0, 2.0, 0.5), |
| 295 | flt("Contrast", "Contrast", 0.0, 5.0, 1.0), | 624 | flt("Height", "Height", 0.0, 2.0, 0.5), |
| 296 | flt("Brightness", "Brightness", -1.0, 1.0, 0.0), | 625 | flt("Translate.X", "Offset X", -1.0, 1.0, 0.0), |
| 297 | flt("XScale", "Scale", 0.01, 50.0, 2.0), | 626 | flt("Translate.Y", "Offset Y", -1.0, 1.0, 0.0), |
| 298 | flt("Seethe", "Seethe", 0.0, 100.0, 0.0), | 627 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| 299 | flt("SeetheRate", "Seethe Rate", 0.0, 2.0, 0.0), | 628 | boolean("Solid", "Solid", true), |
| 300 | v2("Center", "Center", -2.0, 3.0, [0.5, 0.5]), | 629 | flt("BorderWidth", "Border", 0.0, 0.2, 0.01), |
| | 630 | rgba("Color", "Color", "Red", "Green", "Blue", Some("Alpha"), [1.0, 1.0, 1.0, 1.0]), |
| 301 | ] }, | 631 | ] }, |
| 302 | "UltraKeyer" => const { &[ | 632 | "sRectangle" => const { &[ |
| 303 | ParamSpec { | 633 | flt("Width", "Width", 0.0, 2.0, 0.5), |
| 304 | name: "KeyColor", | 634 | flt("Height", "Height", 0.0, 2.0, 0.5), |
| 305 | label: "Key Color", | 635 | flt("CornerRadius", "Corner", 0.0, 1.0, 0.0), |
| 306 | kind: ParamKind::Color { | 636 | flt("Translate.X", "Offset X", -1.0, 1.0, 0.0), |
| 307 | r: "BackgroundRed", | 637 | flt("Translate.Y", "Offset Y", -1.0, 1.0, 0.0), |
| 308 | g: "BackgroundGreen", | 638 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| 309 | b: "BackgroundBlue", | 639 | boolean("Solid", "Solid", true), |
| 310 | a: None, | 640 | flt("BorderWidth", "Border", 0.0, 0.2, 0.01), |
| 311 | default: [0.0, 1.0, 0.0, 1.0], | 641 | int_enum("JoinStyle", "Join", JOIN_STYLES, 2), |
| 312 | }, | 642 | rgba("Color", "Color", "Red", "Green", "Blue", Some("Alpha"), [1.0, 1.0, 1.0, 1.0]), |
| 313 | }, | 643 | ] }, |
| 314 | flt("MatteThresholdLow", "Matte Low", 0.0, 1.0, 0.0), | 644 | "sNGon" => const { &[ |
| 315 | flt("MatteThresholdHigh", "Matte High", 0.0, 1.0, 1.0), | 645 | flt("Sides", "Sides", 3.0, 64.0, 6.0), |
| 316 | flt("SpillSuppression", "Spill", 0.0, 1.0, 0.0), | 646 | flt("Width", "Width", 0.0, 2.0, 0.5), |
| 317 | boolean("PostMultiplyImage", "Post-Multiply", true), | 647 | flt("Height", "Height", 0.0, 2.0, 0.5), |
| | 648 | flt("Translate.X", "Offset X", -1.0, 1.0, 0.0), |
| | 649 | flt("Translate.Y", "Offset Y", -1.0, 1.0, 0.0), |
| | 650 | flt("Angle", "Angle", -360.0, 360.0, 0.0), |
| | 651 | boolean("Solid", "Solid", true), |
| | 652 | flt("BorderWidth", "Border", 0.0, 0.2, 0.01), |
| | 653 | int_enum("JoinStyle", "Join", JOIN_STYLES, 2), |
| | 654 | rgba("Color", "Color", "Red", "Green", "Blue", Some("Alpha"), [1.0, 1.0, 1.0, 1.0]), |
| | 655 | ] }, |
| | 656 | "sBoolean" => const { &[ |
| | 657 | fuid("Operation", "Operation", &["Intersection", "Union", "Subtract", "Xor"], "Intersection"), |
| | 658 | rgba("Color", "Color", "Red", "Green", "Blue", Some("Alpha"), [1.0, 1.0, 1.0, 1.0]), |
| | 659 | ] }, |
| | 660 | "sTransform" => const { &[ |
| | 661 | flt("XOffset", "X Offset", -1.0, 1.0, 0.0), |
| | 662 | flt("YOffset", "Y Offset", -1.0, 1.0, 0.0), |
| | 663 | flt("XPivot", "X Pivot", -1.0, 1.0, 0.0), |
| | 664 | flt("YPivot", "Y Pivot", -1.0, 1.0, 0.0), |
| | 665 | flt("Scale", "Scale", 0.0, 5.0, 1.0), |
| | 666 | flt("XSize", "X Size", 0.0, 5.0, 1.0), |
| | 667 | flt("YSize", "Y Size", 0.0, 5.0, 1.0), |
| | 668 | flt("ZRotation", "Rotation", -360.0, 360.0, 0.0), |
| | 669 | ] }, |
| | 670 | "sMerge" => const { &[ |
| 318 | flt("Blend", "Blend", 0.0, 1.0, 1.0), | 671 | flt("Blend", "Blend", 0.0, 1.0, 1.0), |
| 319 | ] }, | 672 | ] }, |
| 320 | "Loader" => const { &[ | 673 | "sOutline" => const { &[ |
| 321 | flt("GlobalIn", "Global In", 0.0, 10000.0, 0.0), | 674 | flt("Thickness", "Thickness", 0.0, 0.2, 0.01), |
| 322 | flt("GlobalOut", "Global Out", 0.0, 10000.0, 100.0), | 675 | int_enum("JoinStyle", "Join", JOIN_STYLES, 2), |
| 323 | boolean("Loop", "Loop", false), | 676 | int_enum("CapStyle", "Cap", CAP_STYLES, 0), |
| 324 | boolean("Reverse", "Reverse", false), | | |
| 325 | ] }, | 677 | ] }, |
| | 678 | "sGrid" => const { &[ |
| | 679 | flt("CellsX", "Cells X", 1.0, 32.0, 3.0), |
| | 680 | flt("CellsY", "Cells Y", 1.0, 32.0, 3.0), |
| | 681 | flt("XOffset", "X Offset", -2.0, 2.0, 0.2), |
| | 682 | flt("YOffset", "Y Offset", -2.0, 2.0, 0.2), |
| | 683 | ] }, |
| | 684 | |
| | 685 | // --- 3D Scene, Lights & Materials --- |
| 326 | "Camera3D" => const { &[ | 686 | "Camera3D" => const { &[ |
| 327 | flt("FLength", "Focal Len", 5.0, 200.0, 24.0), | 687 | flt("FLength", "Focal Len", 5.0, 200.0, 35.0), |
| 328 | flt("PlaneOfFocus", "Focus Dist", 0.1, 100.0, 5.0), | 688 | flt("ApertureW", "Gate W", 0.1, 5.0, 1.4173236), |
| | 689 | flt("ApertureH", "Gate H", 0.1, 5.0, 0.9448824), |
| | 690 | fuid("ResolutionGateFit", "Gate Fit", GATE_FITS, "Height"), |
| | 691 | flt("PlaneOfFocus", "Focus Dist", 0.01, 100.0, 5.0), |
| 329 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), | 692 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), |
| 330 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), | 693 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), |
| 331 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 5.0), | 694 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 5.0), |
| ... | @@ -335,13 +698,103 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { | ... | @@ -335,13 +698,103 @@ pub fn schema_for_kind(kind: &str) -> &'static [ParamSpec] { |
| 335 | ] }, | 698 | ] }, |
| 336 | "Shape3D" => const { &[ | 699 | "Shape3D" => const { &[ |
| 337 | fuid("Shape", "Shape", SHAPE3D_TYPES, "SurfacePlaneInputs"), | 700 | fuid("Shape", "Shape", SHAPE3D_TYPES, "SurfacePlaneInputs"), |
| 338 | flt("SurfacePlaneInputs.Width", "Width", 0.01, 20.0, 1.0), | 701 | flt("SurfacePlaneInputs.Width", "Plane W", 0.01, 20.0, 1.0), |
| 339 | flt("SurfacePlaneInputs.Height", "Height", 0.01, 20.0, 1.0), | 702 | flt("SurfacePlaneInputs.SubdivisionWidth", "Plane Sub", 1.0, 64.0, 10.0), |
| | 703 | flt("SurfaceSphereInputs.Radius", "Sphere R", 0.01, 20.0, 1.0), |
| | 704 | flt("SurfaceCylinderInputs.Radius", "Cyl R", 0.01, 20.0, 1.0), |
| | 705 | flt("SurfaceCylinderInputs.Height", "Cyl H", 0.01, 20.0, 2.0), |
| | 706 | flt("SurfaceCubeInputs.Width", "Cube W", 0.01, 20.0, 1.0), |
| 340 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), | 707 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), |
| 341 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), | 708 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), |
| 342 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 0.0), | 709 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 0.0), |
| | 710 | flt("Transform3DOp.Rotate.X", "Rot X", -180.0, 180.0, 0.0), |
| | 711 | flt("Transform3DOp.Rotate.Y", "Rot Y", -180.0, 180.0, 0.0), |
| | 712 | flt("Transform3DOp.Rotate.Z", "Rot Z", -180.0, 180.0, 0.0), |
| 343 | flt("Transform3DOp.Scale.X", "Scale", 0.01, 20.0, 1.0), | 713 | flt("Transform3DOp.Scale.X", "Scale", 0.01, 20.0, 1.0), |
| 344 | ] }, | 714 | ] }, |
| | 715 | "Cube3D" => const { &[ |
| | 716 | flt("SurfaceCubeInputs.Width", "Width", 0.01, 20.0, 1.0), |
| | 717 | flt("SurfaceCubeInputs.SubdivisionWidth", "Subdivs", 1.0, 64.0, 10.0), |
| | 718 | boolean("SurfaceCubeInputs.Wireframe", "Wireframe", false), |
| | 719 | boolean("SurfaceCubeInputs.Visibility.IsVisible", "Visible", true), |
| | 720 | boolean("SurfaceCubeInputs.Lighting.IsAffectedByLights", "Lit", true), |
| | 721 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), |
| | 722 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), |
| | 723 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 0.0), |
| | 724 | flt("Transform3DOp.Rotate.X", "Rot X", -180.0, 180.0, 0.0), |
| | 725 | flt("Transform3DOp.Rotate.Y", "Rot Y", -180.0, 180.0, 0.0), |
| | 726 | flt("Transform3DOp.Rotate.Z", "Rot Z", -180.0, 180.0, 0.0), |
| | 727 | flt("Transform3DOp.Scale.X", "Scale", 0.01, 20.0, 1.0), |
| | 728 | ] }, |
| | 729 | "SurfaceFBXMesh" => const { &[ |
| | 730 | text("ImportFile", "FBX / OBJ", ""), |
| | 731 | text("ObjName", "Object Name", ""), |
| | 732 | flt("ScaleFileUnitsBy", "Scale Units", 0.001, 100.0, 1.0), |
| | 733 | boolean("SurfaceFBXInputs.Visibility.IsVisible", "Visible", true), |
| | 734 | boolean("SurfaceFBXInputs.Lighting.IsAffectedByLights", "Lit", true), |
| | 735 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), |
| | 736 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), |
| | 737 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 0.0), |
| | 738 | flt("Transform3DOp.Rotate.X", "Rot X", -180.0, 180.0, 0.0), |
| | 739 | flt("Transform3DOp.Rotate.Y", "Rot Y", -180.0, 180.0, 0.0), |
| | 740 | flt("Transform3DOp.Rotate.Z", "Rot Z", -180.0, 180.0, 0.0), |
| | 741 | flt("Transform3DOp.Scale.X", "Scale", 0.01, 20.0, 1.0), |
| | 742 | ] }, |
| | 743 | "LightPoint" => const { &[ |
| | 744 | boolean("Enabled", "Enabled", true), |
| | 745 | rgba("Color", "Color", "Red", "Green", "Blue", None, [1.0, 1.0, 1.0, 1.0]), |
| | 746 | flt("Intensity", "Intensity", 0.0, 20.0, 1.0), |
| | 747 | int_enum("DecayType", "Decay Type", DECAY_TYPES, 0), |
| | 748 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), |
| | 749 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), |
| | 750 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 0.0), |
| | 751 | ] }, |
| | 752 | "LightSpot" => const { &[ |
| | 753 | boolean("Enabled", "Enabled", true), |
| | 754 | rgba("Color", "Color", "Red", "Green", "Blue", None, [1.0, 1.0, 1.0, 1.0]), |
| | 755 | flt("Intensity", "Intensity", 0.0, 20.0, 1.0), |
| | 756 | flt("ConeAngle", "Cone Angle", 1.0, 179.0, 40.0), |
| | 757 | flt("PenumbraAngle", "Penumbra", -45.0, 45.0, 0.0), |
| | 758 | int_enum("DecayType", "Decay Type", DECAY_TYPES, 0), |
| | 759 | flt("Transform3DOp.Translate.X", "Trans X", -50.0, 50.0, 0.0), |
| | 760 | flt("Transform3DOp.Translate.Y", "Trans Y", -50.0, 50.0, 0.0), |
| | 761 | flt("Transform3DOp.Translate.Z", "Trans Z", -50.0, 50.0, 0.0), |
| | 762 | flt("Transform3DOp.Rotate.X", "Rot X", -180.0, 180.0, 0.0), |
| | 763 | flt("Transform3DOp.Rotate.Y", "Rot Y", -180.0, 180.0, 0.0), |
| | 764 | flt("Transform3DOp.Rotate.Z", "Rot Z", -180.0, 180.0, 0.0), |
| | 765 | ] }, |
| | 766 | "LightDirectional" => const { &[ |
| | 767 | boolean("Enabled", "Enabled", true), |
| | 768 | rgba("Color", "Color", "Red", "Green", "Blue", None, [1.0, 1.0, 1.0, 1.0]), |
| | 769 | flt("Intensity", "Intensity", 0.0, 20.0, 1.0), |
| | 770 | flt("Transform3DOp.Rotate.X", "Rot X", -180.0, 180.0, 0.0), |
| | 771 | flt("Transform3DOp.Rotate.Y", "Rot Y", -180.0, 180.0, 0.0), |
| | 772 | flt("Transform3DOp.Rotate.Z", "Rot Z", -180.0, 180.0, 0.0), |
| | 773 | ] }, |
| | 774 | "LightAmbient" => const { &[ |
| | 775 | boolean("Enabled", "Enabled", true), |
| | 776 | rgba("Color", "Color", "Red", "Green", "Blue", None, [1.0, 1.0, 1.0, 1.0]), |
| | 777 | flt("Intensity", "Intensity", 0.0, 10.0, 1.0), |
| | 778 | ] }, |
| | 779 | "MtlBlinn" | "MtlPhong" => const { &[ |
| | 780 | rgba("Diffuse", "Diffuse", "Diffuse.Color.Red", "Diffuse.Color.Green", "Diffuse.Color.Blue", Some("Diffuse.Opacity"), [1.0, 1.0, 1.0, 1.0]), |
| | 781 | rgba("Specular", "Specular", "Specular.Color.Red", "Specular.Color.Green", "Specular.Color.Blue", None, [1.0, 1.0, 1.0, 1.0]), |
| | 782 | flt("Specular.Intensity", "Spec Int", 0.0, 4.0, 1.0), |
| | 783 | flt("Specular.Exponent", "Spec Exp", 1.0, 200.0, 50.0), |
| | 784 | ] }, |
| | 785 | "MtlCookTorrance" => const { &[ |
| | 786 | rgba("Diffuse", "Diffuse", "Diffuse.Color.Red", "Diffuse.Color.Green", "Diffuse.Color.Blue", Some("Diffuse.Opacity"), [1.0, 1.0, 1.0, 1.0]), |
| | 787 | rgba("Specular", "Specular", "Specular.Color.Red", "Specular.Color.Green", "Specular.Color.Blue", None, [1.0, 1.0, 1.0, 1.0]), |
| | 788 | flt("Specular.Intensity", "Spec Int", 0.0, 4.0, 1.0), |
| | 789 | flt("Specular.Roughness", "Roughness", 0.05, 1.0, 0.6), |
| | 790 | ] }, |
| | 791 | "MtlWard" => const { &[ |
| | 792 | rgba("Diffuse", "Diffuse", "Diffuse.Color.Red", "Diffuse.Color.Green", "Diffuse.Color.Blue", Some("Diffuse.Opacity"), [1.0, 1.0, 1.0, 1.0]), |
| | 793 | rgba("Specular", "Specular", "Specular.Color.Red", "Specular.Color.Green", "Specular.Color.Blue", None, [1.0, 1.0, 1.0, 1.0]), |
| | 794 | flt("Specular.Intensity", "Spec Int", 0.0, 4.0, 1.0), |
| | 795 | flt("Specular.SpreadU", "Spread U", 0.01, 1.0, 0.25), |
| | 796 | flt("Specular.SpreadV", "Spread V", 0.01, 1.0, 0.25), |
| | 797 | ] }, |
| 345 | _ => &[], | 798 | _ => &[], |
| 346 | } | 799 | } |
| 347 | } | 800 | } |