brushcue
Examples
- Adjust Channels
- Black And White Negative Filter
- Bloom
- Blue Channel
- Box Blur
- Brightness Adjust
- Brightness Contrast Adjust
- Camera Moving Distortion
- Chroma Offset
- Coachella Aesthetic
- Color Invert
- Color Rectangle
- Color Reducer
- Color Threshold
- Contrast Adjust
- Convert To BT 709
- Convert To Display P3
- Convert To sRGB
- CRT Monitor Filter
- Darken
- Dilate
- Duotone Effect
- Erode
- Exposure Adjust
- Film Grain
- Film Noir
- Gaussian Blur
- Glitch Filter Animation
- Grayscale
- Green Channel
- Halftone
- High Contrast Grayscale
- Horizontal Mirror
- Image To Video
- Kaleidoscope Animation
- Kaleidoscope
- Kelvin Tuner
- Lighten
- Lightness Threshold
- Linear Transform
- Liquify
- Median Filter
- Negative Filter
- Opacity Scale
- Pixelate Reveal Animation
- Pixelate
- Red Channel
- RGB Color Mix Aesthetic
- RGB Color Shift
- Rose Tint
- Rotate 180
- Rotate 90 Clockwise
- Rotate 90 Counter Clockwise
- Saturation Adjust
- Scale By Factor
- Sepia
- Shadow Tint
- Sharpen
- Sobel Edge Detection
- Solarize
- Spinning Reveal Animation
- Swirl
- Vertical Mirror
- Vibrancy
- Vignette
- Warmth Adjust
- Zoom Blur
1# (c) Dito Technologies LLC. Auto-generated. Do not modify directly. 2# hash: 46dafc98799bf5ad0e9a474dc2c8545a1ab2fd0292033232d04d55b9127dfb23 3# generated from templates/py_brushcue_init.jinja 4 5from __future__ import annotations 6 7"""Typed Python bindings for BrushCue graph construction.""" 8 9from . import _py as _internal 10from ._graph import Project 11from ._py import ( 12 Bounds, 13 Context, 14 ImageRecipe, 15 MovieRecipe, 16 all_tools, 17 mcp_prompt, 18) 19from . import input_parsers 20 21def null_value() -> Null: 22 result = _internal.null_value_internal() 23 from .null import Null 24 return Null(result) 25 26 27 28 29from .any import Any 30 31from .any_stream import AnyStream 32 33from .bool import Bool 34 35from .bounds2f import Bounds2f 36 37from .bounds2i import Bounds2i 38 39from .bounds2i_list import Bounds2iList 40 41from .brush import Brush 42 43from .byte_list import ByteList 44 45from .color_profile import ColorProfile 46 47from .color_representation import ColorRepresentation 48 49from .composition import Composition 50 51from .curve import Curve 52 53from .dictionary import Dictionary 54 55from .fill import Fill 56 57from .float import Float 58 59from .float_list import FloatList 60 61from .image import Image 62 63from .int import Int 64 65from .int_list import IntList 66 67from .null import Null 68 69from .ok_lab_a import OkLabA 70 71from .ok_lab_color import OkLabColor 72 73from .ok_lab_hist import OkLabHist 74 75from .painter import Painter 76 77from .path import Path 78 79from .pixel_encoding import PixelEncoding 80 81from .point2f import Point2f 82 83from .point2f_list import Point2fList 84 85from .point2f_stream import Point2fStream 86 87from .point2i import Point2i 88 89from .point2i_list import Point2iList 90 91from .profiled_color import ProfiledColor 92 93from .profiled_color_list import ProfiledColorList 94 95from .r_g_b_a_color import RGBAColor 96 97from .r_g_b_color import RGBColor 98 99from .render_style import RenderStyle 100 101from .sequence import Sequence 102 103from .string import String 104 105from .transform2 import Transform2 106 107from .transform2_list import Transform2List 108 109from .vector2f import Vector2f 110 111from .vector2i import Vector2i 112 113from .vector3f import Vector3f 114 115from .void import Void 116 117from .x_y_z import XYZ 118 119from .x_y_z_a import XYZA 120 121 122from ._operators import setup_operators 123 124setup_operators() 125 126__all__ = [ 127 "Context", "Project", "ImageRecipe", "MovieRecipe", "Bounds", 128 129 "null_value", 130 131 132 "Any", 133 134 "AnyStream", 135 136 "Bool", 137 138 "Bounds2f", 139 140 "Bounds2i", 141 142 "Bounds2iList", 143 144 "Brush", 145 146 "ByteList", 147 148 "ColorProfile", 149 150 "ColorRepresentation", 151 152 "Composition", 153 154 "Curve", 155 156 "Dictionary", 157 158 "Fill", 159 160 "Float", 161 162 "FloatList", 163 164 "Image", 165 166 "Int", 167 168 "IntList", 169 170 "Null", 171 172 "OkLabA", 173 174 "OkLabColor", 175 176 "OkLabHist", 177 178 "Painter", 179 180 "Path", 181 182 "PixelEncoding", 183 184 "Point2f", 185 186 "Point2fList", 187 188 "Point2fStream", 189 190 "Point2i", 191 192 "Point2iList", 193 194 "ProfiledColor", 195 196 "ProfiledColorList", 197 198 "RGBAColor", 199 200 "RGBColor", 201 202 "RenderStyle", 203 204 "Sequence", 205 206 "String", 207 208 "Transform2", 209 210 "Transform2List", 211 212 "Vector2f", 213 214 "Vector2i", 215 216 "Vector3f", 217 218 "Void", 219 220 "XYZ", 221 222 "XYZA", 223 224]
30class Project: 31 """A Python façade for a Rust graph project.""" 32 33 def __init__(self, inner: _internal.Project | None = None): 34 self._inner = _internal.Project() if inner is None else inner 35 36 def add_graph(self, graph: _GraphWrapper | _internal.Graph) -> Project: 37 return Project(self._inner.add_graph(unwrap_graph(graph))) 38 39 def serialize(self, context: _internal.Context) -> bytes: 40 return self._inner.serialize(context) 41 42 def execute(self, context: _internal.Context, graph_id: int) -> _internal.Type: 43 return self._inner.execute(context, graph_id) 44 45 @staticmethod 46 def deserialize(context: _internal.Context, data: bytes) -> Project: 47 return Project(_internal.Project.deserialize(context, data))
A Python façade for a Rust graph project.
Wraps image_recipe::ImageRecipe for Python. Methods return new PyImageRecipe instances following ImageRecipe's immutable builder pattern.
Wraps movie_recipe::MovieRecipe for Python.
15class Any(_GraphWrapper): 16 """Representing any type in the graph""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
Representing any type in the graph
15class AnyStream(_GraphWrapper): 16 """Stream of Anys""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
Stream of Anys
15class Bool(_GraphWrapper): 16 """A bool""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context).as_bool() 21 22 23 def and_(self, bool2) -> Bool: 24 """And 25 26 Returns true if both inputs are true. 27 28 Args: 29 bool2: Graph of Bool 30 31 32 Returns: 33 Graph: A graph node producing a Bool. 34 """ 35 bool1_parsed = input_parsers.parse_bool_graph(self) 36 bool2_parsed = input_parsers.parse_bool_graph(bool2) 37 result = _internal.and_internal(bool1_parsed, bool2_parsed) 38 39 return Bool(result) 40 41 def if_(self, input_1, input_2) -> Bool: 42 """Bool If 43 44 If the boolean is true returns input 1, otherwise input 2. Type: Bool 45 46 Args: 47 input_1: Graph of Bool 48 input_2: Graph of Bool 49 50 51 Returns: 52 Graph: A graph node producing a Bool. 53 """ 54 bool_parsed = input_parsers.parse_bool_graph(self) 55 input_1_parsed = input_parsers.parse_bool_graph(input_1) 56 input_2_parsed = input_parsers.parse_bool_graph(input_2) 57 result = _internal.bool_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 58 59 return Bool(result) 60 61 def not_(self) -> Bool: 62 """Not 63 64 Returns the opposite of a boolean 65 66 Returns: 67 Graph: A graph node producing a Bool. 68 """ 69 bool_parsed = input_parsers.parse_bool_graph(self) 70 result = _internal.not_internal(bool_parsed) 71 72 return Bool(result) 73 74 def or_(self, bool2) -> Bool: 75 """Or 76 77 Returns true if either inputs are true. 78 79 Args: 80 bool2: Graph of Bool 81 82 83 Returns: 84 Graph: A graph node producing a Bool. 85 """ 86 bool1_parsed = input_parsers.parse_bool_graph(self) 87 bool2_parsed = input_parsers.parse_bool_graph(bool2) 88 result = _internal.or_internal(bool1_parsed, bool2_parsed) 89 90 return Bool(result) 91 92 def xor(self, bool2) -> Bool: 93 """Exclusive Or 94 95 Returns true if either the inputs are true. But false if both are true. 96 97 Args: 98 bool2: Graph of Bool 99 100 101 Returns: 102 Graph: A graph node producing a Bool. 103 """ 104 bool1_parsed = input_parsers.parse_bool_graph(self) 105 bool2_parsed = input_parsers.parse_bool_graph(bool2) 106 result = _internal.xor_internal(bool1_parsed, bool2_parsed) 107 108 return Bool(result)
A bool
23 def and_(self, bool2) -> Bool: 24 """And 25 26 Returns true if both inputs are true. 27 28 Args: 29 bool2: Graph of Bool 30 31 32 Returns: 33 Graph: A graph node producing a Bool. 34 """ 35 bool1_parsed = input_parsers.parse_bool_graph(self) 36 bool2_parsed = input_parsers.parse_bool_graph(bool2) 37 result = _internal.and_internal(bool1_parsed, bool2_parsed) 38 39 return Bool(result)
And
Returns true if both inputs are true.
Args: bool2: Graph of Bool
Returns: Graph: A graph node producing a Bool.
41 def if_(self, input_1, input_2) -> Bool: 42 """Bool If 43 44 If the boolean is true returns input 1, otherwise input 2. Type: Bool 45 46 Args: 47 input_1: Graph of Bool 48 input_2: Graph of Bool 49 50 51 Returns: 52 Graph: A graph node producing a Bool. 53 """ 54 bool_parsed = input_parsers.parse_bool_graph(self) 55 input_1_parsed = input_parsers.parse_bool_graph(input_1) 56 input_2_parsed = input_parsers.parse_bool_graph(input_2) 57 result = _internal.bool_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 58 59 return Bool(result)
Bool If
If the boolean is true returns input 1, otherwise input 2. Type: Bool
Args: input_1: Graph of Bool input_2: Graph of Bool
Returns: Graph: A graph node producing a Bool.
61 def not_(self) -> Bool: 62 """Not 63 64 Returns the opposite of a boolean 65 66 Returns: 67 Graph: A graph node producing a Bool. 68 """ 69 bool_parsed = input_parsers.parse_bool_graph(self) 70 result = _internal.not_internal(bool_parsed) 71 72 return Bool(result)
Not
Returns the opposite of a boolean
Returns: Graph: A graph node producing a Bool.
74 def or_(self, bool2) -> Bool: 75 """Or 76 77 Returns true if either inputs are true. 78 79 Args: 80 bool2: Graph of Bool 81 82 83 Returns: 84 Graph: A graph node producing a Bool. 85 """ 86 bool1_parsed = input_parsers.parse_bool_graph(self) 87 bool2_parsed = input_parsers.parse_bool_graph(bool2) 88 result = _internal.or_internal(bool1_parsed, bool2_parsed) 89 90 return Bool(result)
Or
Returns true if either inputs are true.
Args: bool2: Graph of Bool
Returns: Graph: A graph node producing a Bool.
92 def xor(self, bool2) -> Bool: 93 """Exclusive Or 94 95 Returns true if either the inputs are true. But false if both are true. 96 97 Args: 98 bool2: Graph of Bool 99 100 101 Returns: 102 Graph: A graph node producing a Bool. 103 """ 104 bool1_parsed = input_parsers.parse_bool_graph(self) 105 bool2_parsed = input_parsers.parse_bool_graph(bool2) 106 result = _internal.xor_internal(bool1_parsed, bool2_parsed) 107 108 return Bool(result)
Exclusive Or
Returns true if either the inputs are true. But false if both are true.
Args: bool2: Graph of Bool
Returns: Graph: A graph node producing a Bool.
20class Bounds2f(_GraphWrapper): 21 """A 2D bounding box of Floats""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context).as_bounds2f() 26 27 28 @staticmethod 29 def from_x_y_width_height(x, y, width, height) -> Bounds2f: 30 """Bounds 2D Float from X, Y, Width & Height 31 32 Creates the bounds of a 2D float region from its X, Y, Width and Height. 33 34 Args: 35 x: Graph of Float 36 y: Graph of Float 37 width: Graph of Float 38 height: Graph of Float 39 40 41 Returns: 42 Graph: A graph node producing a Bounds2f. 43 """ 44 x_parsed = input_parsers.parse_float_graph(x) 45 y_parsed = input_parsers.parse_float_graph(y) 46 width_parsed = input_parsers.parse_float_graph(width) 47 height_parsed = input_parsers.parse_float_graph(height) 48 result = _internal.bounds2f_from_x_y_width_height_internal(x_parsed, y_parsed, width_parsed, height_parsed) 49 50 return Bounds2f(result) 51 52 def height(self) -> float.Float: 53 """Bounds2f Height 54 55 Gets the height of the bounds. 56 57 Returns: 58 Graph: A graph node producing a Float. 59 """ 60 bounds_parsed = input_parsers.parse_graph(self) 61 result = _internal.bounds2f_height_internal(bounds_parsed) 62 63 from .float import Float 64 return Float(result) 65 66 def min_x(self) -> float.Float: 67 """Bounds2f Min X 68 69 Gets the minimum X coordinate (left edge) of the bounds. 70 71 Returns: 72 Graph: A graph node producing a Float. 73 """ 74 bounds_parsed = input_parsers.parse_graph(self) 75 result = _internal.bounds2f_min_x_internal(bounds_parsed) 76 77 from .float import Float 78 return Float(result) 79 80 def min_y(self) -> float.Float: 81 """Bounds2f Min Y 82 83 Gets the minimum Y coordinate (top edge) of the bounds. 84 85 Returns: 86 Graph: A graph node producing a Float. 87 """ 88 bounds_parsed = input_parsers.parse_graph(self) 89 result = _internal.bounds2f_min_y_internal(bounds_parsed) 90 91 from .float import Float 92 return Float(result) 93 94 def width(self) -> float.Float: 95 """Bounds2f Width 96 97 Gets the width of the bounds. 98 99 Returns: 100 Graph: A graph node producing a Float. 101 """ 102 bounds_parsed = input_parsers.parse_graph(self) 103 result = _internal.bounds2f_width_internal(bounds_parsed) 104 105 from .float import Float 106 return Float(result)
A 2D bounding box of Floats
28 @staticmethod 29 def from_x_y_width_height(x, y, width, height) -> Bounds2f: 30 """Bounds 2D Float from X, Y, Width & Height 31 32 Creates the bounds of a 2D float region from its X, Y, Width and Height. 33 34 Args: 35 x: Graph of Float 36 y: Graph of Float 37 width: Graph of Float 38 height: Graph of Float 39 40 41 Returns: 42 Graph: A graph node producing a Bounds2f. 43 """ 44 x_parsed = input_parsers.parse_float_graph(x) 45 y_parsed = input_parsers.parse_float_graph(y) 46 width_parsed = input_parsers.parse_float_graph(width) 47 height_parsed = input_parsers.parse_float_graph(height) 48 result = _internal.bounds2f_from_x_y_width_height_internal(x_parsed, y_parsed, width_parsed, height_parsed) 49 50 return Bounds2f(result)
Bounds 2D Float from X, Y, Width & Height
Creates the bounds of a 2D float region from its X, Y, Width and Height.
Args: x: Graph of Float y: Graph of Float width: Graph of Float height: Graph of Float
Returns: Graph: A graph node producing a Bounds2f.
52 def height(self) -> float.Float: 53 """Bounds2f Height 54 55 Gets the height of the bounds. 56 57 Returns: 58 Graph: A graph node producing a Float. 59 """ 60 bounds_parsed = input_parsers.parse_graph(self) 61 result = _internal.bounds2f_height_internal(bounds_parsed) 62 63 from .float import Float 64 return Float(result)
Bounds2f Height
Gets the height of the bounds.
Returns: Graph: A graph node producing a Float.
66 def min_x(self) -> float.Float: 67 """Bounds2f Min X 68 69 Gets the minimum X coordinate (left edge) of the bounds. 70 71 Returns: 72 Graph: A graph node producing a Float. 73 """ 74 bounds_parsed = input_parsers.parse_graph(self) 75 result = _internal.bounds2f_min_x_internal(bounds_parsed) 76 77 from .float import Float 78 return Float(result)
Bounds2f Min X
Gets the minimum X coordinate (left edge) of the bounds.
Returns: Graph: A graph node producing a Float.
80 def min_y(self) -> float.Float: 81 """Bounds2f Min Y 82 83 Gets the minimum Y coordinate (top edge) of the bounds. 84 85 Returns: 86 Graph: A graph node producing a Float. 87 """ 88 bounds_parsed = input_parsers.parse_graph(self) 89 result = _internal.bounds2f_min_y_internal(bounds_parsed) 90 91 from .float import Float 92 return Float(result)
Bounds2f Min Y
Gets the minimum Y coordinate (top edge) of the bounds.
Returns: Graph: A graph node producing a Float.
94 def width(self) -> float.Float: 95 """Bounds2f Width 96 97 Gets the width of the bounds. 98 99 Returns: 100 Graph: A graph node producing a Float. 101 """ 102 bounds_parsed = input_parsers.parse_graph(self) 103 result = _internal.bounds2f_width_internal(bounds_parsed) 104 105 from .float import Float 106 return Float(result)
Bounds2f Width
Gets the width of the bounds.
Returns: Graph: A graph node producing a Float.
15class Bounds2i(_GraphWrapper): 16 """A 2D bounding box of Ints""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def from_x_y_width_height(x, y, width, height) -> Bounds2i: 25 """Bounds 2D Int from X, Y, Width & Height 26 27 Creates the bounds of a 2D array from its X, Y, Width and Height. 28 29 Args: 30 x: Graph of Int 31 y: Graph of Int 32 width: Graph of Int 33 height: Graph of Int 34 35 36 Returns: 37 Graph: A graph node producing a Bounds2i. 38 """ 39 x_parsed = input_parsers.parse_int_graph(x) 40 y_parsed = input_parsers.parse_int_graph(y) 41 width_parsed = input_parsers.parse_int_graph(width) 42 height_parsed = input_parsers.parse_int_graph(height) 43 result = _internal.bounds2i_from_x_y_width_height_internal(x_parsed, y_parsed, width_parsed, height_parsed) 44 45 return Bounds2i(result)
A 2D bounding box of Ints
23 @staticmethod 24 def from_x_y_width_height(x, y, width, height) -> Bounds2i: 25 """Bounds 2D Int from X, Y, Width & Height 26 27 Creates the bounds of a 2D array from its X, Y, Width and Height. 28 29 Args: 30 x: Graph of Int 31 y: Graph of Int 32 width: Graph of Int 33 height: Graph of Int 34 35 36 Returns: 37 Graph: A graph node producing a Bounds2i. 38 """ 39 x_parsed = input_parsers.parse_int_graph(x) 40 y_parsed = input_parsers.parse_int_graph(y) 41 width_parsed = input_parsers.parse_int_graph(width) 42 height_parsed = input_parsers.parse_int_graph(height) 43 result = _internal.bounds2i_from_x_y_width_height_internal(x_parsed, y_parsed, width_parsed, height_parsed) 44 45 return Bounds2i(result)
Bounds 2D Int from X, Y, Width & Height
Creates the bounds of a 2D array from its X, Y, Width and Height.
Args: x: Graph of Int y: Graph of Int width: Graph of Int height: Graph of Int
Returns: Graph: A graph node producing a Bounds2i.
15class Bounds2iList(_GraphWrapper): 16 """List of Bounds 2D Ints""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
List of Bounds 2D Ints
15class Brush(_GraphWrapper): 16 """A brush to stroke on 2D objects""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def solid(color, radius) -> Brush: 25 """Brush Solid 26 27 Creates a brush with a color and radius. Will stroke with the solid color. 28 29 Args: 30 color: Graph of ProfiledColor 31 radius: Graph of Float 32 33 34 Returns: 35 Graph: A graph node producing a Brush. 36 """ 37 color_parsed = input_parsers.parse_graph(color) 38 radius_parsed = input_parsers.parse_float_graph(radius) 39 result = _internal.brush_solid_internal(color_parsed, radius_parsed) 40 41 return Brush(result)
A brush to stroke on 2D objects
23 @staticmethod 24 def solid(color, radius) -> Brush: 25 """Brush Solid 26 27 Creates a brush with a color and radius. Will stroke with the solid color. 28 29 Args: 30 color: Graph of ProfiledColor 31 radius: Graph of Float 32 33 34 Returns: 35 Graph: A graph node producing a Brush. 36 """ 37 color_parsed = input_parsers.parse_graph(color) 38 radius_parsed = input_parsers.parse_float_graph(radius) 39 result = _internal.brush_solid_internal(color_parsed, radius_parsed) 40 41 return Brush(result)
Brush Solid
Creates a brush with a color and radius. Will stroke with the solid color.
Args: color: Graph of ProfiledColor radius: Graph of Float
Returns: Graph: A graph node producing a Brush.
20class ByteList(_GraphWrapper): 21 """List of Bytes""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 @staticmethod 29 def from_url(url) -> ByteList: 30 """Byte List from URL 31 32 Given a URL. Performs a GET request and downloads the result as bytes. 33 34 Args: 35 url: Graph of String 36 37 38 Returns: 39 Graph: A graph node producing a ByteList. 40 """ 41 url_parsed = input_parsers.parse_string_graph(url) 42 result = _internal.byte_list_from_u_r_l_internal(url_parsed) 43 44 return ByteList(result) 45 46 def file_convert_image_to_bmp(self) -> ByteList: 47 """File Convert Image to BMP 48 49 Converts any image format (JPEG, PNG, WebP, TIFF, HEIC, etc.) to BMP. Returns BMP bytes. 50 51 Returns: 52 Graph: A graph node producing a ByteList. 53 """ 54 image_bytes_parsed = input_parsers.parse_graph(self) 55 result = _internal.file_convert_image_to_bmp_internal(image_bytes_parsed) 56 57 return ByteList(result) 58 59 def file_convert_image_to_heic(self, quality) -> ByteList: 60 """File Convert Image to HEIC 61 62 Converts any image format (JPEG, PNG, WebP, TIFF, BMP, etc.) to HEIC. Returns HEIC bytes. 63 64 Args: 65 quality: Graph of Int 66 67 68 Returns: 69 Graph: A graph node producing a ByteList. 70 """ 71 image_bytes_parsed = input_parsers.parse_graph(self) 72 quality_parsed = input_parsers.parse_int_graph(quality) 73 result = _internal.file_convert_image_to_heic_internal(image_bytes_parsed, quality_parsed) 74 75 return ByteList(result) 76 77 def file_convert_image_to_jpeg(self, quality) -> ByteList: 78 """File Convert Image to JPEG 79 80 Converts any image format (PNG, WebP, TIFF, BMP, HEIC, etc.) to JPEG. Returns JPEG bytes. 81 82 Args: 83 quality: Graph of Int 84 85 86 Returns: 87 Graph: A graph node producing a ByteList. 88 """ 89 image_bytes_parsed = input_parsers.parse_graph(self) 90 quality_parsed = input_parsers.parse_int_graph(quality) 91 result = _internal.file_convert_image_to_jpeg_internal(image_bytes_parsed, quality_parsed) 92 93 return ByteList(result) 94 95 def file_convert_image_to_png(self) -> ByteList: 96 """File Convert Image to PNG 97 98 Converts any image format (JPEG, WebP, TIFF, BMP, HEIC, etc.) to PNG. Returns PNG bytes. 99 100 Returns: 101 Graph: A graph node producing a ByteList. 102 """ 103 image_bytes_parsed = input_parsers.parse_graph(self) 104 result = _internal.file_convert_image_to_png_internal(image_bytes_parsed) 105 106 return ByteList(result) 107 108 def file_convert_image_to_tiff(self) -> ByteList: 109 """File Convert Image to TIFF 110 111 Converts any image format (JPEG, PNG, WebP, BMP, HEIC, etc.) to TIFF. Returns TIFF bytes. 112 113 Returns: 114 Graph: A graph node producing a ByteList. 115 """ 116 image_bytes_parsed = input_parsers.parse_graph(self) 117 result = _internal.file_convert_image_to_tiff_internal(image_bytes_parsed) 118 119 return ByteList(result) 120 121 def file_convert_image_to_web_p(self, quality) -> ByteList: 122 """File Convert Image to WebP 123 124 Converts any image format (JPEG, PNG, TIFF, BMP, HEIC, etc.) to WebP. Returns WebP bytes. 125 126 Args: 127 quality: Graph of Int 128 129 130 Returns: 131 Graph: A graph node producing a ByteList. 132 """ 133 image_bytes_parsed = input_parsers.parse_graph(self) 134 quality_parsed = input_parsers.parse_int_graph(quality) 135 result = _internal.file_convert_image_to_web_p_internal(image_bytes_parsed, quality_parsed) 136 137 return ByteList(result) 138 139 def file_convert_video_to_animated_web_p(self) -> ByteList: 140 """File Convert Video to Animated WebP 141 142 Converts any video format (MP4, MOV, WebM, AVI, MKV) to an animated WebP. Returns animated WebP bytes. 143 144 Returns: 145 Graph: A graph node producing a ByteList. 146 """ 147 video_bytes_parsed = input_parsers.parse_graph(self) 148 result = _internal.file_convert_video_to_animated_web_p_internal(video_bytes_parsed) 149 150 return ByteList(result) 151 152 def file_convert_video_to_gif(self, frame_rate) -> ByteList: 153 """File Convert Video to GIF 154 155 Converts any video format (MP4, MOV, WebM, AVI, MKV) to a GIF. Returns GIF bytes. 156 157 Args: 158 frame_rate: Graph of Int 159 160 161 Returns: 162 Graph: A graph node producing a ByteList. 163 """ 164 video_bytes_parsed = input_parsers.parse_graph(self) 165 frame_rate_parsed = input_parsers.parse_int_graph(frame_rate) 166 result = _internal.file_convert_video_to_gif_internal(video_bytes_parsed, frame_rate_parsed) 167 168 return ByteList(result) 169 170 def file_convert_video_to_mp4(self) -> ByteList: 171 """File Convert Video to MP4 172 173 Converts any video format (MOV, WebM, AVI, MKV) to MP4. Returns MP4 bytes. 174 175 Returns: 176 Graph: A graph node producing a ByteList. 177 """ 178 video_bytes_parsed = input_parsers.parse_graph(self) 179 result = _internal.file_convert_video_to_m_p4_internal(video_bytes_parsed) 180 181 return ByteList(result) 182 183 def file_convert_video_to_web_m(self) -> ByteList: 184 """File Convert Video to WebM 185 186 Converts any video format (MP4, MOV, AVI, MKV) to WebM. Returns WebM bytes. 187 188 Returns: 189 Graph: A graph node producing a ByteList. 190 """ 191 video_bytes_parsed = input_parsers.parse_graph(self) 192 result = _internal.file_convert_video_to_web_m_internal(video_bytes_parsed) 193 194 return ByteList(result) 195 196 def upload_byte_list(self, url, content_type) -> void.Void: 197 """Upload Byte List 198 199 Given bytes and a URL. Performs a PUT request and uploads the bytes 200 201 Args: 202 url: Graph of String 203 content_type: Graph of String 204 205 206 Returns: 207 Graph: A graph node producing a Void. 208 """ 209 bytes_parsed = input_parsers.parse_graph(self) 210 url_parsed = input_parsers.parse_string_graph(url) 211 content_type_parsed = input_parsers.parse_string_graph(content_type) 212 result = _internal.upload_byte_list_internal(bytes_parsed, url_parsed, content_type_parsed) 213 214 from .void import Void 215 return Void(result)
List of Bytes
28 @staticmethod 29 def from_url(url) -> ByteList: 30 """Byte List from URL 31 32 Given a URL. Performs a GET request and downloads the result as bytes. 33 34 Args: 35 url: Graph of String 36 37 38 Returns: 39 Graph: A graph node producing a ByteList. 40 """ 41 url_parsed = input_parsers.parse_string_graph(url) 42 result = _internal.byte_list_from_u_r_l_internal(url_parsed) 43 44 return ByteList(result)
Byte List from URL
Given a URL. Performs a GET request and downloads the result as bytes.
Args: url: Graph of String
Returns: Graph: A graph node producing a ByteList.
46 def file_convert_image_to_bmp(self) -> ByteList: 47 """File Convert Image to BMP 48 49 Converts any image format (JPEG, PNG, WebP, TIFF, HEIC, etc.) to BMP. Returns BMP bytes. 50 51 Returns: 52 Graph: A graph node producing a ByteList. 53 """ 54 image_bytes_parsed = input_parsers.parse_graph(self) 55 result = _internal.file_convert_image_to_bmp_internal(image_bytes_parsed) 56 57 return ByteList(result)
File Convert Image to BMP
Converts any image format (JPEG, PNG, WebP, TIFF, HEIC, etc.) to BMP. Returns BMP bytes.
Returns: Graph: A graph node producing a ByteList.
59 def file_convert_image_to_heic(self, quality) -> ByteList: 60 """File Convert Image to HEIC 61 62 Converts any image format (JPEG, PNG, WebP, TIFF, BMP, etc.) to HEIC. Returns HEIC bytes. 63 64 Args: 65 quality: Graph of Int 66 67 68 Returns: 69 Graph: A graph node producing a ByteList. 70 """ 71 image_bytes_parsed = input_parsers.parse_graph(self) 72 quality_parsed = input_parsers.parse_int_graph(quality) 73 result = _internal.file_convert_image_to_heic_internal(image_bytes_parsed, quality_parsed) 74 75 return ByteList(result)
File Convert Image to HEIC
Converts any image format (JPEG, PNG, WebP, TIFF, BMP, etc.) to HEIC. Returns HEIC bytes.
Args: quality: Graph of Int
Returns: Graph: A graph node producing a ByteList.
77 def file_convert_image_to_jpeg(self, quality) -> ByteList: 78 """File Convert Image to JPEG 79 80 Converts any image format (PNG, WebP, TIFF, BMP, HEIC, etc.) to JPEG. Returns JPEG bytes. 81 82 Args: 83 quality: Graph of Int 84 85 86 Returns: 87 Graph: A graph node producing a ByteList. 88 """ 89 image_bytes_parsed = input_parsers.parse_graph(self) 90 quality_parsed = input_parsers.parse_int_graph(quality) 91 result = _internal.file_convert_image_to_jpeg_internal(image_bytes_parsed, quality_parsed) 92 93 return ByteList(result)
File Convert Image to JPEG
Converts any image format (PNG, WebP, TIFF, BMP, HEIC, etc.) to JPEG. Returns JPEG bytes.
Args: quality: Graph of Int
Returns: Graph: A graph node producing a ByteList.
95 def file_convert_image_to_png(self) -> ByteList: 96 """File Convert Image to PNG 97 98 Converts any image format (JPEG, WebP, TIFF, BMP, HEIC, etc.) to PNG. Returns PNG bytes. 99 100 Returns: 101 Graph: A graph node producing a ByteList. 102 """ 103 image_bytes_parsed = input_parsers.parse_graph(self) 104 result = _internal.file_convert_image_to_png_internal(image_bytes_parsed) 105 106 return ByteList(result)
File Convert Image to PNG
Converts any image format (JPEG, WebP, TIFF, BMP, HEIC, etc.) to PNG. Returns PNG bytes.
Returns: Graph: A graph node producing a ByteList.
108 def file_convert_image_to_tiff(self) -> ByteList: 109 """File Convert Image to TIFF 110 111 Converts any image format (JPEG, PNG, WebP, BMP, HEIC, etc.) to TIFF. Returns TIFF bytes. 112 113 Returns: 114 Graph: A graph node producing a ByteList. 115 """ 116 image_bytes_parsed = input_parsers.parse_graph(self) 117 result = _internal.file_convert_image_to_tiff_internal(image_bytes_parsed) 118 119 return ByteList(result)
File Convert Image to TIFF
Converts any image format (JPEG, PNG, WebP, BMP, HEIC, etc.) to TIFF. Returns TIFF bytes.
Returns: Graph: A graph node producing a ByteList.
121 def file_convert_image_to_web_p(self, quality) -> ByteList: 122 """File Convert Image to WebP 123 124 Converts any image format (JPEG, PNG, TIFF, BMP, HEIC, etc.) to WebP. Returns WebP bytes. 125 126 Args: 127 quality: Graph of Int 128 129 130 Returns: 131 Graph: A graph node producing a ByteList. 132 """ 133 image_bytes_parsed = input_parsers.parse_graph(self) 134 quality_parsed = input_parsers.parse_int_graph(quality) 135 result = _internal.file_convert_image_to_web_p_internal(image_bytes_parsed, quality_parsed) 136 137 return ByteList(result)
File Convert Image to WebP
Converts any image format (JPEG, PNG, TIFF, BMP, HEIC, etc.) to WebP. Returns WebP bytes.
Args: quality: Graph of Int
Returns: Graph: A graph node producing a ByteList.
139 def file_convert_video_to_animated_web_p(self) -> ByteList: 140 """File Convert Video to Animated WebP 141 142 Converts any video format (MP4, MOV, WebM, AVI, MKV) to an animated WebP. Returns animated WebP bytes. 143 144 Returns: 145 Graph: A graph node producing a ByteList. 146 """ 147 video_bytes_parsed = input_parsers.parse_graph(self) 148 result = _internal.file_convert_video_to_animated_web_p_internal(video_bytes_parsed) 149 150 return ByteList(result)
File Convert Video to Animated WebP
Converts any video format (MP4, MOV, WebM, AVI, MKV) to an animated WebP. Returns animated WebP bytes.
Returns: Graph: A graph node producing a ByteList.
152 def file_convert_video_to_gif(self, frame_rate) -> ByteList: 153 """File Convert Video to GIF 154 155 Converts any video format (MP4, MOV, WebM, AVI, MKV) to a GIF. Returns GIF bytes. 156 157 Args: 158 frame_rate: Graph of Int 159 160 161 Returns: 162 Graph: A graph node producing a ByteList. 163 """ 164 video_bytes_parsed = input_parsers.parse_graph(self) 165 frame_rate_parsed = input_parsers.parse_int_graph(frame_rate) 166 result = _internal.file_convert_video_to_gif_internal(video_bytes_parsed, frame_rate_parsed) 167 168 return ByteList(result)
File Convert Video to GIF
Converts any video format (MP4, MOV, WebM, AVI, MKV) to a GIF. Returns GIF bytes.
Args: frame_rate: Graph of Int
Returns: Graph: A graph node producing a ByteList.
170 def file_convert_video_to_mp4(self) -> ByteList: 171 """File Convert Video to MP4 172 173 Converts any video format (MOV, WebM, AVI, MKV) to MP4. Returns MP4 bytes. 174 175 Returns: 176 Graph: A graph node producing a ByteList. 177 """ 178 video_bytes_parsed = input_parsers.parse_graph(self) 179 result = _internal.file_convert_video_to_m_p4_internal(video_bytes_parsed) 180 181 return ByteList(result)
File Convert Video to MP4
Converts any video format (MOV, WebM, AVI, MKV) to MP4. Returns MP4 bytes.
Returns: Graph: A graph node producing a ByteList.
183 def file_convert_video_to_web_m(self) -> ByteList: 184 """File Convert Video to WebM 185 186 Converts any video format (MP4, MOV, AVI, MKV) to WebM. Returns WebM bytes. 187 188 Returns: 189 Graph: A graph node producing a ByteList. 190 """ 191 video_bytes_parsed = input_parsers.parse_graph(self) 192 result = _internal.file_convert_video_to_web_m_internal(video_bytes_parsed) 193 194 return ByteList(result)
File Convert Video to WebM
Converts any video format (MP4, MOV, AVI, MKV) to WebM. Returns WebM bytes.
Returns: Graph: A graph node producing a ByteList.
196 def upload_byte_list(self, url, content_type) -> void.Void: 197 """Upload Byte List 198 199 Given bytes and a URL. Performs a PUT request and uploads the bytes 200 201 Args: 202 url: Graph of String 203 content_type: Graph of String 204 205 206 Returns: 207 Graph: A graph node producing a Void. 208 """ 209 bytes_parsed = input_parsers.parse_graph(self) 210 url_parsed = input_parsers.parse_string_graph(url) 211 content_type_parsed = input_parsers.parse_string_graph(content_type) 212 result = _internal.upload_byte_list_internal(bytes_parsed, url_parsed, content_type_parsed) 213 214 from .void import Void 215 return Void(result)
Upload Byte List
Given bytes and a URL. Performs a PUT request and uploads the bytes
Args: url: Graph of String content_type: Graph of String
Returns: Graph: A graph node producing a Void.
15class ColorProfile(_GraphWrapper): 16 """A Color Profile""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def aces_cg() -> ColorProfile: 25 """Color Profile ACEScg 26 27 Creates an ACEScg Color Profile 28 29 Returns: 30 Graph: A graph node producing a ColorProfile. 31 """ 32 result = _internal.color_profile_a_c_e_scg_internal() 33 34 return ColorProfile(result) 35 36 @staticmethod 37 def bt709() -> ColorProfile: 38 """Color Profile BT.709 39 40 Creates a BT.709 Color Profile 41 42 Returns: 43 Graph: A graph node producing a ColorProfile. 44 """ 45 result = _internal.color_profile_b_t709_internal() 46 47 return ColorProfile(result) 48 49 @staticmethod 50 def ok_lab_a() -> ColorProfile: 51 """Color Profile OkLabA 52 53 Creates an OkLabA color profile. OkLab with also an alpha component. 54 55 Returns: 56 Graph: A graph node producing a ColorProfile. 57 """ 58 result = _internal.color_profile_ok_lab_a_internal() 59 60 return ColorProfile(result) 61 62 @staticmethod 63 def p3() -> ColorProfile: 64 """Color Profile P3 65 66 Creates a P3 Color Profile 67 68 Returns: 69 Graph: A graph node producing a ColorProfile. 70 """ 71 result = _internal.color_profile_p3_internal() 72 73 return ColorProfile(result) 74 75 @staticmethod 76 def png_srgb() -> ColorProfile: 77 """Color Profile PNG sRGB 78 79 Creates a color profile that is the same one as PNG sRGB. 80 81 Returns: 82 Graph: A graph node producing a ColorProfile. 83 """ 84 result = _internal.color_profile_p_n_g_s_r_g_b_internal() 85 86 return ColorProfile(result) 87 88 @staticmethod 89 def srgb() -> ColorProfile: 90 """Color Profile sRGB 91 92 Creates an sRGB Color Profile 93 94 Returns: 95 Graph: A graph node producing a ColorProfile. 96 """ 97 result = _internal.color_profile_s_r_g_b_internal() 98 99 return ColorProfile(result) 100 101 @staticmethod 102 def xyz() -> ColorProfile: 103 """Color Profile XYZ 104 105 Creates an XYZ Color Profile 106 107 Returns: 108 Graph: A graph node producing a ColorProfile. 109 """ 110 result = _internal.color_profile_x_y_z_internal() 111 112 return ColorProfile(result)
A Color Profile
23 @staticmethod 24 def aces_cg() -> ColorProfile: 25 """Color Profile ACEScg 26 27 Creates an ACEScg Color Profile 28 29 Returns: 30 Graph: A graph node producing a ColorProfile. 31 """ 32 result = _internal.color_profile_a_c_e_scg_internal() 33 34 return ColorProfile(result)
Color Profile ACEScg
Creates an ACEScg Color Profile
Returns: Graph: A graph node producing a ColorProfile.
36 @staticmethod 37 def bt709() -> ColorProfile: 38 """Color Profile BT.709 39 40 Creates a BT.709 Color Profile 41 42 Returns: 43 Graph: A graph node producing a ColorProfile. 44 """ 45 result = _internal.color_profile_b_t709_internal() 46 47 return ColorProfile(result)
Color Profile BT.709
Creates a BT.709 Color Profile
Returns: Graph: A graph node producing a ColorProfile.
49 @staticmethod 50 def ok_lab_a() -> ColorProfile: 51 """Color Profile OkLabA 52 53 Creates an OkLabA color profile. OkLab with also an alpha component. 54 55 Returns: 56 Graph: A graph node producing a ColorProfile. 57 """ 58 result = _internal.color_profile_ok_lab_a_internal() 59 60 return ColorProfile(result)
Color Profile OkLabA
Creates an OkLabA color profile. OkLab with also an alpha component.
Returns: Graph: A graph node producing a ColorProfile.
62 @staticmethod 63 def p3() -> ColorProfile: 64 """Color Profile P3 65 66 Creates a P3 Color Profile 67 68 Returns: 69 Graph: A graph node producing a ColorProfile. 70 """ 71 result = _internal.color_profile_p3_internal() 72 73 return ColorProfile(result)
Color Profile P3
Creates a P3 Color Profile
Returns: Graph: A graph node producing a ColorProfile.
75 @staticmethod 76 def png_srgb() -> ColorProfile: 77 """Color Profile PNG sRGB 78 79 Creates a color profile that is the same one as PNG sRGB. 80 81 Returns: 82 Graph: A graph node producing a ColorProfile. 83 """ 84 result = _internal.color_profile_p_n_g_s_r_g_b_internal() 85 86 return ColorProfile(result)
Color Profile PNG sRGB
Creates a color profile that is the same one as PNG sRGB.
Returns: Graph: A graph node producing a ColorProfile.
88 @staticmethod 89 def srgb() -> ColorProfile: 90 """Color Profile sRGB 91 92 Creates an sRGB Color Profile 93 94 Returns: 95 Graph: A graph node producing a ColorProfile. 96 """ 97 result = _internal.color_profile_s_r_g_b_internal() 98 99 return ColorProfile(result)
Color Profile sRGB
Creates an sRGB Color Profile
Returns: Graph: A graph node producing a ColorProfile.
101 @staticmethod 102 def xyz() -> ColorProfile: 103 """Color Profile XYZ 104 105 Creates an XYZ Color Profile 106 107 Returns: 108 Graph: A graph node producing a ColorProfile. 109 """ 110 result = _internal.color_profile_x_y_z_internal() 111 112 return ColorProfile(result)
Color Profile XYZ
Creates an XYZ Color Profile
Returns: Graph: A graph node producing a ColorProfile.
20class ColorRepresentation(_GraphWrapper): 21 """A color profile paired with a pixel encoding, describing how to interpret raw pixel values.""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 @staticmethod 29 def aces_cg() -> ColorRepresentation: 30 """Color Representation ACEScg 31 32 Creates a Color Representation using the ACEScg Color Profile with linear light, straight alpha pixel values. 33 34 Returns: 35 Graph: A graph node producing a ColorRepresentation. 36 """ 37 result = _internal.color_representation_a_c_e_scg_internal() 38 39 return ColorRepresentation(result) 40 41 @staticmethod 42 def from_color_profile_and_pixel_encoding(color_profile, pixel_encoding) -> ColorRepresentation: 43 """Color Representation From Color Profile And Pixel Encoding 44 45 Creates a Color Representation by pairing a Color Profile with a Pixel Encoding. 46 47 Args: 48 color_profile: Graph of ColorProfile 49 pixel_encoding: Graph of PixelEncoding 50 51 52 Returns: 53 Graph: A graph node producing a ColorRepresentation. 54 """ 55 color_profile_parsed = input_parsers.parse_graph(color_profile) 56 pixel_encoding_parsed = input_parsers.parse_graph(pixel_encoding) 57 result = _internal.color_representation_from_color_profile_and_pixel_encoding_internal(color_profile_parsed, pixel_encoding_parsed) 58 59 return ColorRepresentation(result) 60 61 @staticmethod 62 def oklab_a() -> ColorRepresentation: 63 """Color Representation OkLabA 64 65 Creates a Color Representation using the OkLabA Color Profile with encoded pixel values. 66 67 Returns: 68 Graph: A graph node producing a ColorRepresentation. 69 """ 70 result = _internal.color_representation_ok_lab_a_internal() 71 72 return ColorRepresentation(result) 73 74 def profile(self) -> color_profile.ColorProfile: 75 """Color Profile of a Color Representation 76 77 Given a color representation. Extracts the color profile of that color representation 78 79 Returns: 80 Graph: A graph node producing a ColorProfile. 81 """ 82 color_representation_parsed = input_parsers.parse_graph(self) 83 result = _internal.color_representation_profile_internal(color_representation_parsed) 84 85 from .color_profile import ColorProfile 86 return ColorProfile(result) 87 88 @staticmethod 89 def rgb_bt2020() -> ColorRepresentation: 90 """Color Representation BT.2020 91 92 Creates a Color Representation using the BT.2020 Color Profile with gamma-encoded pixel values. 93 94 Returns: 95 Graph: A graph node producing a ColorRepresentation. 96 """ 97 result = _internal.color_representation_r_g_b_b_t2020_internal() 98 99 return ColorRepresentation(result) 100 101 @staticmethod 102 def srgb() -> ColorRepresentation: 103 """Color Representation sRGB 104 105 Creates a Color Representation using the sRGB Color Profile with gamma-encoded pixel values. 106 107 Returns: 108 Graph: A graph node producing a ColorRepresentation. 109 """ 110 result = _internal.color_representation_s_r_g_b_internal() 111 112 return ColorRepresentation(result) 113 114 @staticmethod 115 def xyza() -> ColorRepresentation: 116 """Color Representation XYZA 117 118 Creates a Color Representation using the XYZA Color Profile with linear light, straight alpha pixel values. 119 120 Returns: 121 Graph: A graph node producing a ColorRepresentation. 122 """ 123 result = _internal.color_representation_x_y_z_a_internal() 124 125 return ColorRepresentation(result)
A color profile paired with a pixel encoding, describing how to interpret raw pixel values.
28 @staticmethod 29 def aces_cg() -> ColorRepresentation: 30 """Color Representation ACEScg 31 32 Creates a Color Representation using the ACEScg Color Profile with linear light, straight alpha pixel values. 33 34 Returns: 35 Graph: A graph node producing a ColorRepresentation. 36 """ 37 result = _internal.color_representation_a_c_e_scg_internal() 38 39 return ColorRepresentation(result)
Color Representation ACEScg
Creates a Color Representation using the ACEScg Color Profile with linear light, straight alpha pixel values.
Returns: Graph: A graph node producing a ColorRepresentation.
41 @staticmethod 42 def from_color_profile_and_pixel_encoding(color_profile, pixel_encoding) -> ColorRepresentation: 43 """Color Representation From Color Profile And Pixel Encoding 44 45 Creates a Color Representation by pairing a Color Profile with a Pixel Encoding. 46 47 Args: 48 color_profile: Graph of ColorProfile 49 pixel_encoding: Graph of PixelEncoding 50 51 52 Returns: 53 Graph: A graph node producing a ColorRepresentation. 54 """ 55 color_profile_parsed = input_parsers.parse_graph(color_profile) 56 pixel_encoding_parsed = input_parsers.parse_graph(pixel_encoding) 57 result = _internal.color_representation_from_color_profile_and_pixel_encoding_internal(color_profile_parsed, pixel_encoding_parsed) 58 59 return ColorRepresentation(result)
Color Representation From Color Profile And Pixel Encoding
Creates a Color Representation by pairing a Color Profile with a Pixel Encoding.
Args: color_profile: Graph of ColorProfile pixel_encoding: Graph of PixelEncoding
Returns: Graph: A graph node producing a ColorRepresentation.
61 @staticmethod 62 def oklab_a() -> ColorRepresentation: 63 """Color Representation OkLabA 64 65 Creates a Color Representation using the OkLabA Color Profile with encoded pixel values. 66 67 Returns: 68 Graph: A graph node producing a ColorRepresentation. 69 """ 70 result = _internal.color_representation_ok_lab_a_internal() 71 72 return ColorRepresentation(result)
Color Representation OkLabA
Creates a Color Representation using the OkLabA Color Profile with encoded pixel values.
Returns: Graph: A graph node producing a ColorRepresentation.
74 def profile(self) -> color_profile.ColorProfile: 75 """Color Profile of a Color Representation 76 77 Given a color representation. Extracts the color profile of that color representation 78 79 Returns: 80 Graph: A graph node producing a ColorProfile. 81 """ 82 color_representation_parsed = input_parsers.parse_graph(self) 83 result = _internal.color_representation_profile_internal(color_representation_parsed) 84 85 from .color_profile import ColorProfile 86 return ColorProfile(result)
Color Profile of a Color Representation
Given a color representation. Extracts the color profile of that color representation
Returns: Graph: A graph node producing a ColorProfile.
88 @staticmethod 89 def rgb_bt2020() -> ColorRepresentation: 90 """Color Representation BT.2020 91 92 Creates a Color Representation using the BT.2020 Color Profile with gamma-encoded pixel values. 93 94 Returns: 95 Graph: A graph node producing a ColorRepresentation. 96 """ 97 result = _internal.color_representation_r_g_b_b_t2020_internal() 98 99 return ColorRepresentation(result)
Color Representation BT.2020
Creates a Color Representation using the BT.2020 Color Profile with gamma-encoded pixel values.
Returns: Graph: A graph node producing a ColorRepresentation.
101 @staticmethod 102 def srgb() -> ColorRepresentation: 103 """Color Representation sRGB 104 105 Creates a Color Representation using the sRGB Color Profile with gamma-encoded pixel values. 106 107 Returns: 108 Graph: A graph node producing a ColorRepresentation. 109 """ 110 result = _internal.color_representation_s_r_g_b_internal() 111 112 return ColorRepresentation(result)
Color Representation sRGB
Creates a Color Representation using the sRGB Color Profile with gamma-encoded pixel values.
Returns: Graph: A graph node producing a ColorRepresentation.
114 @staticmethod 115 def xyza() -> ColorRepresentation: 116 """Color Representation XYZA 117 118 Creates a Color Representation using the XYZA Color Profile with linear light, straight alpha pixel values. 119 120 Returns: 121 Graph: A graph node producing a ColorRepresentation. 122 """ 123 result = _internal.color_representation_x_y_z_a_internal() 124 125 return ColorRepresentation(result)
Color Representation XYZA
Creates a Color Representation using the XYZA Color Profile with linear light, straight alpha pixel values.
Returns: Graph: A graph node producing a ColorRepresentation.
34class Composition(_GraphWrapper): 35 """A composition to create an image.""" 36 37 def execute(self, context): 38 39 return self._inner.execute(context).as_composition() 40 41 42 @staticmethod 43 def load(value) -> Composition: 44 return Composition(input_parsers.parse_composition_graph(value)) 45 46 47 def absolute_value(self) -> Composition: 48 """Composition Absolute Value 49 50 Takes the absolute value of all the pixels in the image. 51 52 Returns: 53 Graph: A graph node producing a Composition. 54 """ 55 image_parsed = input_parsers.parse_graph(self) 56 result = _internal.composition_absolute_value_internal(image_parsed) 57 58 return Composition(result) 59 60 def blend_add(self, background, foreground_transform) -> Composition: 61 """Composition Blend Add 62 63 Adds the foreground and background images together using additive blending. 64 65 Args: 66 background: Graph of Composition 67 foreground_transform: Graph of Transform2 68 69 70 Returns: 71 Graph: A graph node producing a Composition. 72 """ 73 foreground_parsed = input_parsers.parse_graph(self) 74 background_parsed = input_parsers.parse_graph(background) 75 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 76 result = _internal.composition_blend_add_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 77 78 return Composition(result) 79 80 def blend_alpha(self, background, foreground_transform) -> Composition: 81 """Composition Blend Alpha 82 83 Blends between the foreground and background using the alpha component of the foreground. 1 is foreground. 0 is background. 84 85 Args: 86 background: Graph of Composition 87 foreground_transform: Graph of Transform2 88 89 90 Returns: 91 Graph: A graph node producing a Composition. 92 """ 93 foreground_parsed = input_parsers.parse_graph(self) 94 background_parsed = input_parsers.parse_graph(background) 95 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 96 result = _internal.composition_blend_alpha_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 97 98 return Composition(result) 99 100 def blend_max(self, background, foreground_transform) -> Composition: 101 """Composition Blend Max 102 103 Blends the foreground and background images using maximum value blending. 104 105 Args: 106 background: Graph of Composition 107 foreground_transform: Graph of Transform2 108 109 110 Returns: 111 Graph: A graph node producing a Composition. 112 """ 113 foreground_parsed = input_parsers.parse_graph(self) 114 background_parsed = input_parsers.parse_graph(background) 115 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 116 result = _internal.composition_blend_max_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 117 118 return Composition(result) 119 120 def blend_min(self, background, foreground_transform) -> Composition: 121 """Composition Blend Min 122 123 Blends the foreground and background images using minimum blending, taking the minimum value for each pixel. 124 125 Args: 126 background: Graph of Composition 127 foreground_transform: Graph of Transform2 128 129 130 Returns: 131 Graph: A graph node producing a Composition. 132 """ 133 foreground_parsed = input_parsers.parse_graph(self) 134 background_parsed = input_parsers.parse_graph(background) 135 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 136 result = _internal.composition_blend_min_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 137 138 return Composition(result) 139 140 def blend_multiply(self, background, foreground_transform) -> Composition: 141 """Composition Blend Multiply 142 143 Multiplies the foreground and background images together using multiply blending. 144 145 Args: 146 background: Graph of Composition 147 foreground_transform: Graph of Transform2 148 149 150 Returns: 151 Graph: A graph node producing a Composition. 152 """ 153 foreground_parsed = input_parsers.parse_graph(self) 154 background_parsed = input_parsers.parse_graph(background) 155 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 156 result = _internal.composition_blend_multiply_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 157 158 return Composition(result) 159 160 def blend_stencil(self, background, foreground_transform) -> Composition: 161 """Composition Blend Stencil 162 163 Blends the foreground and background images using stencil blending. When the foreground is over the background, the foreground's alpha and the background's r, g and b are used. 164 165 Args: 166 background: Graph of Composition 167 foreground_transform: Graph of Transform2 168 169 170 Returns: 171 Graph: A graph node producing a Composition. 172 """ 173 foreground_parsed = input_parsers.parse_graph(self) 174 background_parsed = input_parsers.parse_graph(background) 175 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 176 result = _internal.composition_blend_stencil_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 177 178 return Composition(result) 179 180 def blend_subtract(self, background, foreground_transform) -> Composition: 181 """Composition Blend Subtract 182 183 Subtracts the foreground image from the background image using subtractive blending. 184 185 Args: 186 background: Graph of Composition 187 foreground_transform: Graph of Transform2 188 189 190 Returns: 191 Graph: A graph node producing a Composition. 192 """ 193 foreground_parsed = input_parsers.parse_graph(self) 194 background_parsed = input_parsers.parse_graph(background) 195 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 196 result = _internal.composition_blend_subtract_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 197 198 return Composition(result) 199 200 def bloom(self, threshold, sigma, intensity) -> Composition: 201 """Composition Bloom 202 203 Adds a soft bloom glow by blurring the image's bright areas and additively blending them back over the original. Threshold selects bright areas (OkLab lightness), sigma controls glow spread, intensity scales the glow strength. 204 205 Args: 206 threshold: Graph of Float 207 sigma: Graph of Float 208 intensity: Graph of Float 209 210 211 Returns: 212 Graph: A graph node producing a Composition. 213 """ 214 composition_parsed = input_parsers.parse_graph(self) 215 threshold_parsed = input_parsers.parse_float_graph(threshold) 216 sigma_parsed = input_parsers.parse_float_graph(sigma) 217 intensity_parsed = input_parsers.parse_float_graph(intensity) 218 result = _internal.composition_bloom_internal(composition_parsed, threshold_parsed, sigma_parsed, intensity_parsed) 219 220 return Composition(result) 221 222 def bounds(self) -> bounds2f.Bounds2f: 223 """Composition Bounds 224 225 Computes the bounding box of a composition. 226 227 Returns: 228 Graph: A graph node producing a Bounds2f. 229 """ 230 composition_parsed = input_parsers.parse_graph(self) 231 result = _internal.composition_bounds_internal(composition_parsed) 232 233 from .bounds2f import Bounds2f 234 return Bounds2f(result) 235 236 def box_blur(self, dimension) -> Composition: 237 """Composition Box Blur 238 239 Applies a box blur to an image. Dimension is the size. 1 corresponding to 3x3, 2 5x5 and so on. 240 241 Args: 242 dimension: Graph of Int 243 244 245 Returns: 246 Graph: A graph node producing a Composition. 247 """ 248 composition_parsed = input_parsers.parse_graph(self) 249 dimension_parsed = input_parsers.parse_int_graph(dimension) 250 result = _internal.composition_box_blur_internal(composition_parsed, dimension_parsed) 251 252 return Composition(result) 253 254 def brightness_adjust(self, scale) -> Composition: 255 """Composition Brightness Adjust 256 257 Adjusts the brightness of an image by a given factor. Internally, works by modifying the L component of OkLab by multiplying it by the scale. 258 259 Args: 260 scale: Graph of Float 261 262 263 Returns: 264 Graph: A graph node producing a Composition. 265 """ 266 composition_parsed = input_parsers.parse_graph(self) 267 scale_parsed = input_parsers.parse_float_graph(scale) 268 result = _internal.composition_brightness_adjust_internal(composition_parsed, scale_parsed) 269 270 return Composition(result) 271 272 def chroma_offset(self, offset) -> Composition: 273 """Composition Chroma Offset 274 275 Applies a chroma offset to an image. This is done by modifying the a and b components of OkLab. For the vector, X applies to a, Y to to b. 276 277 Args: 278 offset: Graph of Vector2f 279 280 281 Returns: 282 Graph: A graph node producing a Composition. 283 """ 284 composition_parsed = input_parsers.parse_graph(self) 285 offset_parsed = input_parsers.parse_graph(offset) 286 result = _internal.composition_chroma_offset_internal(composition_parsed, offset_parsed) 287 288 return Composition(result) 289 290 def color_convert(self, color_profile) -> Composition: 291 """Composition Color Convert 292 293 Converts a Composition from one color space to another. 294 295 Args: 296 color_profile: Graph of ColorProfile 297 298 299 Returns: 300 Graph: A graph node producing a Composition. 301 """ 302 composition_parsed = input_parsers.parse_graph(self) 303 color_profile_parsed = input_parsers.parse_graph(color_profile) 304 result = _internal.composition_color_convert_internal(composition_parsed, color_profile_parsed) 305 306 return Composition(result) 307 308 def color_invert(self) -> Composition: 309 """Composition Color Invert 310 311 Applies a color invert operation to a composition. Taking 1 and subtracting each RGB operation against it. Works in linear color. 312 313 Returns: 314 Graph: A graph node producing a Composition. 315 """ 316 composition_parsed = input_parsers.parse_graph(self) 317 result = _internal.composition_color_invert_internal(composition_parsed) 318 319 return Composition(result) 320 321 def color_representation(self) -> color_representation.ColorRepresentation: 322 """Composition Color Representation 323 324 Gets the color representation associated with a Composition 325 326 Returns: 327 Graph: A graph node producing a ColorRepresentation. 328 """ 329 composition_parsed = input_parsers.parse_graph(self) 330 result = _internal.composition_color_representation_internal(composition_parsed) 331 332 from .color_representation import ColorRepresentation 333 return ColorRepresentation(result) 334 335 def color_threshold(self, threshold) -> Composition: 336 """Composition Color Threshold 337 338 Applies a color threshold to a Composition 339 340 Args: 341 threshold: Graph of Float 342 343 344 Returns: 345 Graph: A graph node producing a Composition. 346 """ 347 composition_parsed = input_parsers.parse_graph(self) 348 threshold_parsed = input_parsers.parse_float_graph(threshold) 349 result = _internal.composition_color_threshold_internal(composition_parsed, threshold_parsed) 350 351 return Composition(result) 352 353 def color_transformer_shader(self, function_body, helpers, input_color_representation, output_color_representation, inputs) -> Composition: 354 """Composition Color Transformer Shader 355 356 Defines a custom shader that takes an input color and then transforms that color to an output color. 357 358 Args: 359 function_body: Graph of String 360 helpers: Graph of String 361 input_color_representation: Graph of ColorRepresentation 362 output_color_representation: Graph of ColorRepresentation 363 inputs: Graph of Dictionary 364 365 366 Returns: 367 Graph: A graph node producing a Composition. 368 """ 369 composition_parsed = input_parsers.parse_graph(self) 370 function_body_parsed = input_parsers.parse_string_graph(function_body) 371 helpers_parsed = input_parsers.parse_string_graph(helpers) 372 input_color_representation_parsed = input_parsers.parse_graph(input_color_representation) 373 output_color_representation_parsed = input_parsers.parse_graph(output_color_representation) 374 inputs_parsed = input_parsers.parse_graph(inputs) 375 result = _internal.composition_color_transformer_shader_internal(composition_parsed, function_body_parsed, helpers_parsed, input_color_representation_parsed, output_color_representation_parsed, inputs_parsed) 376 377 return Composition(result) 378 379 def connected_component_boxes(self) -> bounds2i_list.Bounds2iList: 380 """Composition Connected Component Boxes 381 382 Finds boxes with a r alpha channel value greater than 0.5 in the image. Recommended to use a binary image for this. 383 384 Returns: 385 Graph: A graph node producing a Bounds2iList. 386 """ 387 composition_parsed = input_parsers.parse_graph(self) 388 result = _internal.composition_connected_component_boxes_internal(composition_parsed) 389 390 from .bounds2i_list import Bounds2iList 391 return Bounds2iList(result) 392 393 def contrast_adjustment(self, contrast) -> Composition: 394 """Composition Contrast Adjustment 395 396 Adjusts the contrast of a Composition 397 398 Args: 399 contrast: Graph of Float 400 401 402 Returns: 403 Graph: A graph node producing a Composition. 404 """ 405 composition_parsed = input_parsers.parse_graph(self) 406 contrast_parsed = input_parsers.parse_float_graph(contrast) 407 result = _internal.composition_contrast_adjustment_internal(composition_parsed, contrast_parsed) 408 409 return Composition(result) 410 411 def convolution(self, kernel, kernel_width, kernel_height) -> Composition: 412 """Composition Convolution 413 414 Performs a convolution on an composition 415 416 Args: 417 kernel: Graph of FloatList 418 kernel_width: Graph of Int 419 kernel_height: Graph of Int 420 421 422 Returns: 423 Graph: A graph node producing a Composition. 424 """ 425 composition_parsed = input_parsers.parse_graph(self) 426 kernel_parsed = input_parsers.parse_graph(kernel) 427 kernel_width_parsed = input_parsers.parse_int_graph(kernel_width) 428 kernel_height_parsed = input_parsers.parse_int_graph(kernel_height) 429 result = _internal.composition_convolution_internal(composition_parsed, kernel_parsed, kernel_width_parsed, kernel_height_parsed) 430 431 return Composition(result) 432 433 def crop(self, rect) -> Composition: 434 """Composition Crop 435 436 Applies a crop to a Composition 437 438 Args: 439 rect: Graph of Bounds2f 440 441 442 Returns: 443 Graph: A graph node producing a Composition. 444 """ 445 composition_parsed = input_parsers.parse_graph(self) 446 rect_parsed = input_parsers.parse_graph(rect) 447 result = _internal.composition_crop_internal(composition_parsed, rect_parsed) 448 449 return Composition(result) 450 451 def duotone(self, threshold, color_1, color_2) -> Composition: 452 """Composition Duotone 453 454 Creates a duotone effect. Colors below the threshold will be color 1, colors above will be color 2. 455 456 Args: 457 threshold: Graph of Float 458 color_1: Graph of ProfiledColor 459 color_2: Graph of ProfiledColor 460 461 462 Returns: 463 Graph: A graph node producing a Composition. 464 """ 465 composition_parsed = input_parsers.parse_graph(self) 466 threshold_parsed = input_parsers.parse_float_graph(threshold) 467 color_1_parsed = input_parsers.parse_graph(color_1) 468 color_2_parsed = input_parsers.parse_graph(color_2) 469 result = _internal.composition_duotone_internal(composition_parsed, threshold_parsed, color_1_parsed, color_2_parsed) 470 471 return Composition(result) 472 473 def film_grain(self, grain_strength, fine_grain_frequency, fine_weight, medium_grain_frequency, medium_weight, high_grain_frequency, high_weight) -> Composition: 474 """Composition Film Grain 475 476 adds multi-octave value-noise film grain in OkLabA - grain_strength controls the overall intensity, and the fine/medium/high frequency and weight pairs control the size and contribution of each grain octave. 477 478 Args: 479 grain_strength: Graph of Float 480 fine_grain_frequency: Graph of Float 481 fine_weight: Graph of Float 482 medium_grain_frequency: Graph of Float 483 medium_weight: Graph of Float 484 high_grain_frequency: Graph of Float 485 high_weight: Graph of Float 486 487 488 Returns: 489 Graph: A graph node producing a Composition. 490 """ 491 composition_parsed = input_parsers.parse_graph(self) 492 grain_strength_parsed = input_parsers.parse_float_graph(grain_strength) 493 fine_grain_frequency_parsed = input_parsers.parse_float_graph(fine_grain_frequency) 494 fine_weight_parsed = input_parsers.parse_float_graph(fine_weight) 495 medium_grain_frequency_parsed = input_parsers.parse_float_graph(medium_grain_frequency) 496 medium_weight_parsed = input_parsers.parse_float_graph(medium_weight) 497 high_grain_frequency_parsed = input_parsers.parse_float_graph(high_grain_frequency) 498 high_weight_parsed = input_parsers.parse_float_graph(high_weight) 499 result = _internal.composition_film_grain_internal(composition_parsed, grain_strength_parsed, fine_grain_frequency_parsed, fine_weight_parsed, medium_grain_frequency_parsed, medium_weight_parsed, high_grain_frequency_parsed, high_weight_parsed) 500 501 return Composition(result) 502 503 def flip_horizontal(self) -> Composition: 504 """Composition Flip Horizontal 505 506 Flips the image along the horizontal axis 507 508 Returns: 509 Graph: A graph node producing a Composition. 510 """ 511 composition_parsed = input_parsers.parse_graph(self) 512 result = _internal.composition_flip_horizontal_internal(composition_parsed) 513 514 return Composition(result) 515 516 def flip_vertical(self) -> Composition: 517 """Composition Flip Vertical 518 519 Flips the image vertically 520 521 Returns: 522 Graph: A graph node producing a Composition. 523 """ 524 composition_parsed = input_parsers.parse_graph(self) 525 result = _internal.composition_flip_vertical_internal(composition_parsed) 526 527 return Composition(result) 528 529 @staticmethod 530 def from_asset(asset_id) -> Composition: 531 """Composition from Asset 532 533 Creates a composition from an asset in your catalog. 534 535 Args: 536 asset_id: Graph of Int 537 538 539 Returns: 540 Graph: A graph node producing a Composition. 541 """ 542 asset_id_parsed = input_parsers.parse_int_graph(asset_id) 543 result = _internal.composition_from_asset_internal(asset_id_parsed) 544 545 return Composition(result) 546 547 @staticmethod 548 def from_image(image) -> Composition: 549 """Composition from Image 550 551 Creates an composition out of an image 552 553 Args: 554 image: Graph of Image 555 556 557 Returns: 558 Graph: A graph node producing a Composition. 559 """ 560 image_parsed = input_parsers.parse_graph(image) 561 result = _internal.composition_from_image_internal(image_parsed) 562 563 return Composition(result) 564 565 def gaussian_blur(self, sigma) -> Composition: 566 """Composition Gaussian Blur 567 568 Applies a gaussian blur to an image. Sigma controls the blur intensity. 569 570 Args: 571 sigma: Graph of Float 572 573 574 Returns: 575 Graph: A graph node producing a Composition. 576 """ 577 composition_parsed = input_parsers.parse_graph(self) 578 sigma_parsed = input_parsers.parse_float_graph(sigma) 579 result = _internal.composition_gaussian_blur_internal(composition_parsed, sigma_parsed) 580 581 return Composition(result) 582 583 def grayscale(self) -> Composition: 584 """Composition Grayscale 585 586 Applies grayscale to a Composition 587 588 Returns: 589 Graph: A graph node producing a Composition. 590 """ 591 composition_parsed = input_parsers.parse_graph(self) 592 result = _internal.composition_grayscale_internal(composition_parsed) 593 594 return Composition(result) 595 596 def halftone(self, pixel_size, foreground_color, background_color) -> Composition: 597 """Composition Halftone 598 599 Applies a halftone effect to a composition, tiling it into cells and painting a foreground-colored dot in each cell whose radius grows as the cell darkens, over a background color. 600 601 Args: 602 pixel_size: Graph of Int 603 foreground_color: Graph of ProfiledColor 604 background_color: Graph of ProfiledColor 605 606 607 Returns: 608 Graph: A graph node producing a Composition. 609 """ 610 composition_parsed = input_parsers.parse_graph(self) 611 pixel_size_parsed = input_parsers.parse_int_graph(pixel_size) 612 foreground_color_parsed = input_parsers.parse_graph(foreground_color) 613 background_color_parsed = input_parsers.parse_graph(background_color) 614 result = _internal.composition_halftone_internal(composition_parsed, pixel_size_parsed, foreground_color_parsed, background_color_parsed) 615 616 return Composition(result) 617 618 @staticmethod 619 def if_(bool, input_1, input_2) -> Composition: 620 """Composition If 621 622 If the boolean is true returns input 1, otherwise input 2. Type: Composition 623 624 Args: 625 bool: Graph of Bool 626 input_1: Graph of Composition 627 input_2: Graph of Composition 628 629 630 Returns: 631 Graph: A graph node producing a Composition. 632 """ 633 bool_parsed = input_parsers.parse_bool_graph(bool) 634 input_1_parsed = input_parsers.parse_graph(input_1) 635 input_2_parsed = input_parsers.parse_graph(input_2) 636 result = _internal.composition_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 637 638 return Composition(result) 639 640 def kaleidoscope(self, segments, rotation, warp, warp_frequency) -> Composition: 641 """Composition Kaleidoscope 642 643 Applies a kaleidoscope effect, folding the image into mirrored wedges around the center. segments controls the number of wedges, rotation spins the pattern, and warp/warp_frequency add a radial glass-like distortion. 644 645 Args: 646 segments: Graph of Float 647 rotation: Graph of Float 648 warp: Graph of Float 649 warp_frequency: Graph of Float 650 651 652 Returns: 653 Graph: A graph node producing a Composition. 654 """ 655 composition_parsed = input_parsers.parse_graph(self) 656 segments_parsed = input_parsers.parse_float_graph(segments) 657 rotation_parsed = input_parsers.parse_float_graph(rotation) 658 warp_parsed = input_parsers.parse_float_graph(warp) 659 warp_frequency_parsed = input_parsers.parse_float_graph(warp_frequency) 660 result = _internal.composition_kaleidoscope_internal(composition_parsed, segments_parsed, rotation_parsed, warp_parsed, warp_frequency_parsed) 661 662 return Composition(result) 663 664 def l_curve(self, l_curve) -> Composition: 665 """Composition Lightness Curve 666 667 Applies a curve to the L component in an OkLab color. Adjusting the lightness of the image. 668 669 Args: 670 l_curve: Graph of Curve 671 672 673 Returns: 674 Graph: A graph node producing a Composition. 675 """ 676 composition_parsed = input_parsers.parse_graph(self) 677 l_curve_parsed = input_parsers.parse_graph(l_curve) 678 result = _internal.composition_l_curve_internal(composition_parsed, l_curve_parsed) 679 680 return Composition(result) 681 682 def lightness_threshold(self, threshold) -> Composition: 683 """Composition Lightness Threshold 684 685 Thresholds a Composition by OkLab lightness, producing an opaque white mask where lightness exceeds the threshold and transparent black elsewhere. 686 687 Args: 688 threshold: Graph of Float 689 690 691 Returns: 692 Graph: A graph node producing a Composition. 693 """ 694 composition_parsed = input_parsers.parse_graph(self) 695 threshold_parsed = input_parsers.parse_float_graph(threshold) 696 result = _internal.composition_lightness_threshold_internal(composition_parsed, threshold_parsed) 697 698 return Composition(result) 699 700 def linear_transform(self, entry_0_0, entry_0_1, entry_0_2, entry_0_3, entry_1_0, entry_1_1, entry_1_2, entry_1_3, entry_2_0, entry_2_1, entry_2_2, entry_2_3, entry_3_0, entry_3_1, entry_3_2, entry_3_3) -> Composition: 701 """Composition RGBA Linear Transform 702 703 Applies a linear transform to a Composition's RGBA values. Before application, will convert to a linear version of the color profile and will convert to an RGB profile if needed. 704 705 Args: 706 entry_0_0: Graph of Float 707 entry_0_1: Graph of Float 708 entry_0_2: Graph of Float 709 entry_0_3: Graph of Float 710 entry_1_0: Graph of Float 711 entry_1_1: Graph of Float 712 entry_1_2: Graph of Float 713 entry_1_3: Graph of Float 714 entry_2_0: Graph of Float 715 entry_2_1: Graph of Float 716 entry_2_2: Graph of Float 717 entry_2_3: Graph of Float 718 entry_3_0: Graph of Float 719 entry_3_1: Graph of Float 720 entry_3_2: Graph of Float 721 entry_3_3: Graph of Float 722 723 724 Returns: 725 Graph: A graph node producing a Composition. 726 """ 727 composition_parsed = input_parsers.parse_graph(self) 728 entry_0_0_parsed = input_parsers.parse_float_graph(entry_0_0) 729 entry_0_1_parsed = input_parsers.parse_float_graph(entry_0_1) 730 entry_0_2_parsed = input_parsers.parse_float_graph(entry_0_2) 731 entry_0_3_parsed = input_parsers.parse_float_graph(entry_0_3) 732 entry_1_0_parsed = input_parsers.parse_float_graph(entry_1_0) 733 entry_1_1_parsed = input_parsers.parse_float_graph(entry_1_1) 734 entry_1_2_parsed = input_parsers.parse_float_graph(entry_1_2) 735 entry_1_3_parsed = input_parsers.parse_float_graph(entry_1_3) 736 entry_2_0_parsed = input_parsers.parse_float_graph(entry_2_0) 737 entry_2_1_parsed = input_parsers.parse_float_graph(entry_2_1) 738 entry_2_2_parsed = input_parsers.parse_float_graph(entry_2_2) 739 entry_2_3_parsed = input_parsers.parse_float_graph(entry_2_3) 740 entry_3_0_parsed = input_parsers.parse_float_graph(entry_3_0) 741 entry_3_1_parsed = input_parsers.parse_float_graph(entry_3_1) 742 entry_3_2_parsed = input_parsers.parse_float_graph(entry_3_2) 743 entry_3_3_parsed = input_parsers.parse_float_graph(entry_3_3) 744 result = _internal.composition_linear_transform_internal(composition_parsed, entry_0_0_parsed, entry_0_1_parsed, entry_0_2_parsed, entry_0_3_parsed, entry_1_0_parsed, entry_1_1_parsed, entry_1_2_parsed, entry_1_3_parsed, entry_2_0_parsed, entry_2_1_parsed, entry_2_2_parsed, entry_2_3_parsed, entry_3_0_parsed, entry_3_1_parsed, entry_3_2_parsed, entry_3_3_parsed) 745 746 return Composition(result) 747 748 def liquify(self, amplitude, frequency) -> Composition: 749 """Composition Liquify 750 751 Applies a sinusoidal liquify distortion to this composition, displacing pixels by a wave whose size is controlled by amplitude and whose density is controlled by frequency. 752 753 Args: 754 amplitude: Graph of Float 755 frequency: Graph of Float 756 757 758 Returns: 759 Graph: A graph node producing a Composition. 760 """ 761 composition_parsed = input_parsers.parse_graph(self) 762 amplitude_parsed = input_parsers.parse_float_graph(amplitude) 763 frequency_parsed = input_parsers.parse_float_graph(frequency) 764 result = _internal.composition_liquify_internal(composition_parsed, amplitude_parsed, frequency_parsed) 765 766 return Composition(result) 767 768 def max_color(self) -> profiled_color.ProfiledColor: 769 """Composition Max Color 770 771 Computes the maximum color in a composition. Works by finding the maximum L, a and b and alpha components of an OkLabA color. 772 773 Returns: 774 Graph: A graph node producing a ProfiledColor. 775 """ 776 composition_parsed = input_parsers.parse_graph(self) 777 result = _internal.composition_max_color_internal(composition_parsed) 778 779 from .profiled_color import ProfiledColor 780 return ProfiledColor(result) 781 782 def median(self, kernel_size) -> Composition: 783 """Composition Median 784 785 Applies a per-channel median filter to a composition over a square window, reducing noise while preserving edges. kernel_size controls the window size (window width is 2*kernel_size-1). 786 787 Args: 788 kernel_size: Graph of Int 789 790 791 Returns: 792 Graph: A graph node producing a Composition. 793 """ 794 composition_parsed = input_parsers.parse_graph(self) 795 kernel_size_parsed = input_parsers.parse_int_graph(kernel_size) 796 result = _internal.composition_median_internal(composition_parsed, kernel_size_parsed) 797 798 return Composition(result) 799 800 def min_color(self) -> profiled_color.ProfiledColor: 801 """Composition Min Color 802 803 Computes the minimum color in a composition. Works by finding the minimum L, a and b and alpha components of an OkLabA color. 804 805 Returns: 806 Graph: A graph node producing a ProfiledColor. 807 """ 808 composition_parsed = input_parsers.parse_graph(self) 809 result = _internal.composition_min_color_internal(composition_parsed) 810 811 from .profiled_color import ProfiledColor 812 return ProfiledColor(result) 813 814 def min_max_colors(self) -> profiled_color_list.ProfiledColorList: 815 """Composition Min Max Colors 816 817 Computes the minimum and maximum colors in a composition. Works by finding the minimum and maximum L, a and b and alpha components of an OkLabA color. 818 819 Returns: 820 Graph: A graph node producing a ProfiledColorList. 821 """ 822 composition_parsed = input_parsers.parse_graph(self) 823 result = _internal.composition_min_max_colors_internal(composition_parsed) 824 825 from .profiled_color_list import ProfiledColorList 826 return ProfiledColorList(result) 827 828 @staticmethod 829 def monet_women_with_parasol() -> Composition: 830 """Monet's Women with a Parasol 831 832 Creates a composition from Monet's "Women with a Parasol" painting. Used frequently as a test asset. 833 834 Returns: 835 Graph: A graph node producing a Composition. 836 """ 837 result = _internal.composition_monet_women_with_parasol_internal() 838 839 return Composition(result) 840 841 def morphological_max(self, dimension) -> Composition: 842 """Composition Morphological Max 843 844 Apples a morphological max operation. 845 846 Args: 847 dimension: Graph of Int 848 849 850 Returns: 851 Graph: A graph node producing a Composition. 852 """ 853 composition_parsed = input_parsers.parse_graph(self) 854 dimension_parsed = input_parsers.parse_int_graph(dimension) 855 result = _internal.composition_morphological_max_internal(composition_parsed, dimension_parsed) 856 857 return Composition(result) 858 859 def morphological_min(self, dimension) -> Composition: 860 """Composition Morphological Min 861 862 Apples a morphological min operation. 863 864 Args: 865 dimension: Graph of Int 866 867 868 Returns: 869 Graph: A graph node producing a Composition. 870 """ 871 composition_parsed = input_parsers.parse_graph(self) 872 dimension_parsed = input_parsers.parse_int_graph(dimension) 873 result = _internal.composition_morphological_min_internal(composition_parsed, dimension_parsed) 874 875 return Composition(result) 876 877 def negative(self) -> Composition: 878 """Composition Negative 879 880 Creates the effect of a negative image by subracting from each component of the image. 881 882 Returns: 883 Graph: A graph node producing a Composition. 884 """ 885 composition_parsed = input_parsers.parse_graph(self) 886 result = _internal.composition_negative_internal(composition_parsed) 887 888 return Composition(result) 889 890 def nonlinear_rgb_blend_alpha(self, background, foreground_transform) -> Composition: 891 """Composition Nonlinear RGB Blend Alpha 892 893 A specialized version of CompositionBlendAlpha. Blends in a non-linear RGB. 894 895 Args: 896 background: Graph of Composition 897 foreground_transform: Graph of Transform2 898 899 900 Returns: 901 Graph: A graph node producing a Composition. 902 """ 903 foreground_parsed = input_parsers.parse_graph(self) 904 background_parsed = input_parsers.parse_graph(background) 905 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 906 result = _internal.composition_nonlinear_r_g_b_blend_alpha_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 907 908 return Composition(result) 909 910 def opacity_scales(self, scale) -> Composition: 911 """Composition Opacity Scale 912 913 Changes the opacity of an image by multiplying it by a scalar. 914 915 Args: 916 scale: Graph of Float 917 918 919 Returns: 920 Graph: A graph node producing a Composition. 921 """ 922 composition_parsed = input_parsers.parse_graph(self) 923 scale_parsed = input_parsers.parse_float_graph(scale) 924 result = _internal.composition_opacity_scale_internal(composition_parsed, scale_parsed) 925 926 return Composition(result) 927 928 @staticmethod 929 def painter(painter) -> Composition: 930 """Composition Painter 931 932 Creates a composition from a painter. 933 934 Args: 935 painter: Graph of Painter 936 937 938 Returns: 939 Graph: A graph node producing a Composition. 940 """ 941 painter_parsed = input_parsers.parse_graph(painter) 942 result = _internal.composition_painter_internal(painter_parsed) 943 944 return Composition(result) 945 946 def to_palette(self, size) -> profiled_color_list.ProfiledColorList: 947 """Composition Palette 948 949 Generates a palette of the most dominant colors of a composition. 950 951 Args: 952 size: Graph of Int 953 954 955 Returns: 956 Graph: A graph node producing a ProfiledColorList. 957 """ 958 composition_parsed = input_parsers.parse_graph(self) 959 size_parsed = input_parsers.parse_int_graph(size) 960 result = _internal.composition_palette_internal(composition_parsed, size_parsed) 961 962 from .profiled_color_list import ProfiledColorList 963 return ProfiledColorList(result) 964 965 def palette_reduction(self, palette) -> Composition: 966 """Composition Palette Reduction 967 968 Reduces the number of colors in a composition to a specified palette. 969 970 Args: 971 palette: Graph of ProfiledColorList 972 973 974 Returns: 975 Graph: A graph node producing a Composition. 976 """ 977 composition_parsed = input_parsers.parse_graph(self) 978 palette_parsed = input_parsers.parse_graph(palette) 979 result = _internal.composition_palette_reduction_internal(composition_parsed, palette_parsed) 980 981 return Composition(result) 982 983 def passthrough(self) -> Composition: 984 """Composition Passthrough 985 986 Responds with the value provided. Doing nothing to it. 987 988 Returns: 989 Graph: A graph node producing a Composition. 990 """ 991 value_parsed = input_parsers.parse_graph(self) 992 result = _internal.composition_passthrough_internal(value_parsed) 993 994 return Composition(result) 995 996 def pixelate(self, pixel_size) -> Composition: 997 """Composition Pixelate 998 999 Applies a pixelation effect to a composition. 1000 1001 Args: 1002 pixel_size: Graph of Int 1003 1004 1005 Returns: 1006 Graph: A graph node producing a Composition. 1007 """ 1008 composition_parsed = input_parsers.parse_graph(self) 1009 pixel_size_parsed = input_parsers.parse_int_graph(pixel_size) 1010 result = _internal.composition_pixelate_internal(composition_parsed, pixel_size_parsed) 1011 1012 return Composition(result) 1013 1014 def point_effect_shader(self, function_body, helpers, effect_center_point, effect_radius, inputs, working_color_representation) -> Composition: 1015 """Composition Point Effect Shader 1016 1017 Runs a custom shader over a circular region around an effect center point. 1018 1019 Args: 1020 function_body: Graph of String 1021 helpers: Graph of String 1022 effect_center_point: Graph of Point2f 1023 effect_radius: Graph of Float 1024 inputs: Graph of Dictionary 1025 working_color_representation: Graph of ColorRepresentation 1026 1027 1028 Returns: 1029 Graph: A graph node producing a Composition. 1030 """ 1031 composition_parsed = input_parsers.parse_graph(self) 1032 function_body_parsed = input_parsers.parse_string_graph(function_body) 1033 helpers_parsed = input_parsers.parse_string_graph(helpers) 1034 effect_center_point_parsed = input_parsers.parse_graph(effect_center_point) 1035 effect_radius_parsed = input_parsers.parse_float_graph(effect_radius) 1036 inputs_parsed = input_parsers.parse_graph(inputs) 1037 working_color_representation_parsed = input_parsers.parse_graph(working_color_representation) 1038 result = _internal.composition_point_effect_shader_internal(composition_parsed, function_body_parsed, helpers_parsed, effect_center_point_parsed, effect_radius_parsed, inputs_parsed, working_color_representation_parsed) 1039 1040 return Composition(result) 1041 1042 def r_g_b_curve(self, r_curve, g_curve, b_curve) -> Composition: 1043 """Composition RGB Curve 1044 1045 Applies a curve to the R, G, and B components 1046 1047 Args: 1048 r_curve: Graph of Curve 1049 g_curve: Graph of Curve 1050 b_curve: Graph of Curve 1051 1052 1053 Returns: 1054 Graph: A graph node producing a Composition. 1055 """ 1056 composition_parsed = input_parsers.parse_graph(self) 1057 r_curve_parsed = input_parsers.parse_graph(r_curve) 1058 g_curve_parsed = input_parsers.parse_graph(g_curve) 1059 b_curve_parsed = input_parsers.parse_graph(b_curve) 1060 result = _internal.composition_r_g_b_curve_internal(composition_parsed, r_curve_parsed, g_curve_parsed, b_curve_parsed) 1061 1062 return Composition(result) 1063 1064 def render_to_image(self) -> image.Image: 1065 """Composition Render to Image 1066 1067 Renders a Composition to an Image 1068 1069 Returns: 1070 Graph: A graph node producing a Image. 1071 """ 1072 composition_parsed = input_parsers.parse_graph(self) 1073 result = _internal.composition_render_to_image_internal(composition_parsed) 1074 1075 from .image import Image 1076 return Image(result) 1077 1078 def rotate_180(self) -> Composition: 1079 """Composition Rotate 180 1080 1081 Rotates the image 180 degrees 1082 1083 Returns: 1084 Graph: A graph node producing a Composition. 1085 """ 1086 composition_parsed = input_parsers.parse_graph(self) 1087 result = _internal.composition_rotate180_internal(composition_parsed) 1088 1089 return Composition(result) 1090 1091 def rotate_90_clockwise(self) -> Composition: 1092 """Composition Rotate 90 Clockwise 1093 1094 Rotates the image 90 degrees clockwise 1095 1096 Returns: 1097 Graph: A graph node producing a Composition. 1098 """ 1099 composition_parsed = input_parsers.parse_graph(self) 1100 result = _internal.composition_rotate90_clockwise_internal(composition_parsed) 1101 1102 return Composition(result) 1103 1104 def rotate_90_counter_clockwise(self) -> Composition: 1105 """Composition Rotate 90 Counter Clockwise 1106 1107 Rotates the image 90 degrees counter-clockwise 1108 1109 Returns: 1110 Graph: A graph node producing a Composition. 1111 """ 1112 composition_parsed = input_parsers.parse_graph(self) 1113 result = _internal.composition_rotate90_counter_clockwise_internal(composition_parsed) 1114 1115 return Composition(result) 1116 1117 def sam3_image(self, prompt, positive_points, negative_points) -> byte_list.ByteList: 1118 """Composition SAM3 Image 1119 1120 Runs the SAM3 model on an image 1121 1122 Args: 1123 prompt: Graph of String 1124 positive_points: Graph of Point2iList 1125 negative_points: Graph of Point2iList 1126 1127 1128 Returns: 1129 Graph: A graph node producing a ByteList. 1130 """ 1131 composition_parsed = input_parsers.parse_graph(self) 1132 prompt_parsed = input_parsers.parse_string_graph(prompt) 1133 positive_points_parsed = input_parsers.parse_graph(positive_points) 1134 negative_points_parsed = input_parsers.parse_graph(negative_points) 1135 result = _internal.composition_s_a_m3_image_internal(composition_parsed, prompt_parsed, positive_points_parsed, negative_points_parsed) 1136 1137 from .byte_list import ByteList 1138 return ByteList(result) 1139 1140 def saturation_adjust(self, scale) -> Composition: 1141 """Composition Saturation Adjust 1142 1143 Adjusts the saturation of an image by a given factor. Internally, scales the chroma components in OkLab color space. 1144 1145 Args: 1146 scale: Graph of Float 1147 1148 1149 Returns: 1150 Graph: A graph node producing a Composition. 1151 """ 1152 composition_parsed = input_parsers.parse_graph(self) 1153 scale_parsed = input_parsers.parse_float_graph(scale) 1154 result = _internal.composition_saturation_adjust_internal(composition_parsed, scale_parsed) 1155 1156 return Composition(result) 1157 1158 def scanlines(self, size, beam_power, line_offset, intensity) -> Composition: 1159 """Composition Scanlines 1160 1161 Applies a CRT-style scanline effect, darkening the composition in horizontal bands whose spacing is set by size, sharpness by beam power, vertical phase by line offset, and overall strength by intensity. 1162 1163 Args: 1164 size: Graph of Float 1165 beam_power: Graph of Float 1166 line_offset: Graph of Float 1167 intensity: Graph of Float 1168 1169 1170 Returns: 1171 Graph: A graph node producing a Composition. 1172 """ 1173 composition_parsed = input_parsers.parse_graph(self) 1174 size_parsed = input_parsers.parse_float_graph(size) 1175 beam_power_parsed = input_parsers.parse_float_graph(beam_power) 1176 line_offset_parsed = input_parsers.parse_float_graph(line_offset) 1177 intensity_parsed = input_parsers.parse_float_graph(intensity) 1178 result = _internal.composition_scanlines_internal(composition_parsed, size_parsed, beam_power_parsed, line_offset_parsed, intensity_parsed) 1179 1180 return Composition(result) 1181 1182 def segment(self, prompt, positive_points, negative_points) -> Composition: 1183 """Composition Segment 1184 1185 Segments objects in a composition using SAM3. Accepts a text prompt and lists of positive/negative click points. 1186 1187 Args: 1188 prompt: Graph of String 1189 positive_points: Graph of Point2iList 1190 negative_points: Graph of Point2iList 1191 1192 1193 Returns: 1194 Graph: A graph node producing a Composition. 1195 """ 1196 composition_parsed = input_parsers.parse_graph(self) 1197 prompt_parsed = input_parsers.parse_string_graph(prompt) 1198 positive_points_parsed = input_parsers.parse_graph(positive_points) 1199 negative_points_parsed = input_parsers.parse_graph(negative_points) 1200 result = _internal.composition_segment_internal(composition_parsed, prompt_parsed, positive_points_parsed, negative_points_parsed) 1201 1202 return Composition(result) 1203 1204 def sharpen(self, radius, strength) -> Composition: 1205 """Composition Sharpen 1206 1207 Applies a sharpen filter to the composition. 1208 1209 Args: 1210 radius: Graph of Float 1211 strength: Graph of Float 1212 1213 1214 Returns: 1215 Graph: A graph node producing a Composition. 1216 """ 1217 composition_parsed = input_parsers.parse_graph(self) 1218 radius_parsed = input_parsers.parse_float_graph(radius) 1219 strength_parsed = input_parsers.parse_float_graph(strength) 1220 result = _internal.composition_sharpen_internal(composition_parsed, radius_parsed, strength_parsed) 1221 1222 return Composition(result) 1223 1224 def sobel_edge_detection(self) -> Composition: 1225 """Composition Sobel Edge Detection 1226 1227 Applies Sobel edge detection to an image. 1228 1229 Returns: 1230 Graph: A graph node producing a Composition. 1231 """ 1232 composition_parsed = input_parsers.parse_graph(self) 1233 result = _internal.composition_sobel_edge_detection_internal(composition_parsed) 1234 1235 return Composition(result) 1236 1237 def spacial_effect_shader(self, function_body, helpers, max_displacement, inputs, working_color_representation) -> Composition: 1238 """Composition Spacial Effect Shader 1239 1240 Runs a custom shader over an input that can spatially displace pixels by up to a maximum displacement. 1241 1242 Args: 1243 function_body: Graph of String 1244 helpers: Graph of String 1245 max_displacement: Graph of Float 1246 inputs: Graph of Dictionary 1247 working_color_representation: Graph of ColorRepresentation 1248 1249 1250 Returns: 1251 Graph: A graph node producing a Composition. 1252 """ 1253 composition_parsed = input_parsers.parse_graph(self) 1254 function_body_parsed = input_parsers.parse_string_graph(function_body) 1255 helpers_parsed = input_parsers.parse_string_graph(helpers) 1256 max_displacement_parsed = input_parsers.parse_float_graph(max_displacement) 1257 inputs_parsed = input_parsers.parse_graph(inputs) 1258 working_color_representation_parsed = input_parsers.parse_graph(working_color_representation) 1259 result = _internal.composition_spacial_effect_shader_internal(composition_parsed, function_body_parsed, helpers_parsed, max_displacement_parsed, inputs_parsed, working_color_representation_parsed) 1260 1261 return Composition(result) 1262 1263 def swirl(self, center, radius, amount) -> Composition: 1264 """Composition Swirl 1265 1266 Applies a swirl distortion to this composition 1267 1268 Args: 1269 center: Graph of Vector2f 1270 radius: Graph of Float 1271 amount: Graph of Float 1272 1273 1274 Returns: 1275 Graph: A graph node producing a Composition. 1276 """ 1277 composition_parsed = input_parsers.parse_graph(self) 1278 center_parsed = input_parsers.parse_graph(center) 1279 radius_parsed = input_parsers.parse_float_graph(radius) 1280 amount_parsed = input_parsers.parse_float_graph(amount) 1281 result = _internal.composition_swirl_internal(composition_parsed, center_parsed, radius_parsed, amount_parsed) 1282 1283 return Composition(result) 1284 1285 def target_white_kelvin(self, kelvin) -> Composition: 1286 """Composition Target White Kelvin 1287 1288 Sets the image white point to the value specified in Kelvin. The profile connection white point is D50, so you will only see changes as you move away from that. 1289 1290 Args: 1291 kelvin: Graph of Float 1292 1293 1294 Returns: 1295 Graph: A graph node producing a Composition. 1296 """ 1297 composition_parsed = input_parsers.parse_graph(self) 1298 kelvin_parsed = input_parsers.parse_float_graph(kelvin) 1299 result = _internal.composition_target_white_kelvin_internal(composition_parsed, kelvin_parsed) 1300 1301 return Composition(result) 1302 1303 def to_ok_lab_hist(self) -> ok_lab_hist.OkLabHist: 1304 """Composition to OkLab Histogram 1305 1306 Creates an OkLab Histogram from the colors in a Composition. 1307 1308 Returns: 1309 Graph: A graph node producing a OkLabHist. 1310 """ 1311 composition_parsed = input_parsers.parse_graph(self) 1312 result = _internal.composition_to_ok_lab_hist_internal(composition_parsed) 1313 1314 from .ok_lab_hist import OkLabHist 1315 return OkLabHist(result) 1316 1317 def transform(self, transform) -> Composition: 1318 """Composition Transform 1319 1320 Applies a 2D transform to a Composition. 1321 1322 Args: 1323 transform: Graph of Transform2 1324 1325 1326 Returns: 1327 Graph: A graph node producing a Composition. 1328 """ 1329 composition_parsed = input_parsers.parse_graph(self) 1330 transform_parsed = input_parsers.parse_graph(transform) 1331 result = _internal.composition_transform_internal(composition_parsed, transform_parsed) 1332 1333 return Composition(result) 1334 1335 def vibrance_adjustment(self, strength) -> Composition: 1336 """Composition Vibrance Adjustment 1337 1338 Adjusts the vibrance of an image by a given strength. Internally, boosts chroma in OkLab color space adaptively, applying more boost to less saturated colors. 1339 1340 Args: 1341 strength: Graph of Float 1342 1343 1344 Returns: 1345 Graph: A graph node producing a Composition. 1346 """ 1347 composition_parsed = input_parsers.parse_graph(self) 1348 strength_parsed = input_parsers.parse_float_graph(strength) 1349 result = _internal.composition_vibrance_adjustment_internal(composition_parsed, strength_parsed) 1350 1351 return Composition(result) 1352 1353 def vignette(self, center, radius_x, radius_y, softness, strength) -> Composition: 1354 """Composition Vignette 1355 1356 darkens the area outside an ellipse - center is the bright spot in pixel coordinates, radius_x and radius_y are the ellipse semi-axes in pixels where the falloff starts, softness is the width of the fade-out band in pixels, and strength (0-1) defines how dark the edges become at maximum. 1357 1358 Args: 1359 center: Graph of Vector2f 1360 radius_x: Graph of Float 1361 radius_y: Graph of Float 1362 softness: Graph of Float 1363 strength: Graph of Float 1364 1365 1366 Returns: 1367 Graph: A graph node producing a Composition. 1368 """ 1369 composition_parsed = input_parsers.parse_graph(self) 1370 center_parsed = input_parsers.parse_graph(center) 1371 radius_x_parsed = input_parsers.parse_float_graph(radius_x) 1372 radius_y_parsed = input_parsers.parse_float_graph(radius_y) 1373 softness_parsed = input_parsers.parse_float_graph(softness) 1374 strength_parsed = input_parsers.parse_float_graph(strength) 1375 result = _internal.composition_vignette_internal(composition_parsed, center_parsed, radius_x_parsed, radius_y_parsed, softness_parsed, strength_parsed) 1376 1377 return Composition(result) 1378 1379 def zoom_blur(self, center, strength, falloff, effect_radius) -> Composition: 1380 """Composition Zoom Blur 1381 1382 Performs a zoom blur on this composition 1383 1384 Args: 1385 center: Graph of Vector2f 1386 strength: Graph of Float 1387 falloff: Graph of Float 1388 effect_radius: Graph of Float 1389 1390 1391 Returns: 1392 Graph: A graph node producing a Composition. 1393 """ 1394 composition_parsed = input_parsers.parse_graph(self) 1395 center_parsed = input_parsers.parse_graph(center) 1396 strength_parsed = input_parsers.parse_float_graph(strength) 1397 falloff_parsed = input_parsers.parse_float_graph(falloff) 1398 effect_radius_parsed = input_parsers.parse_float_graph(effect_radius) 1399 result = _internal.composition_zoom_blur_internal(composition_parsed, center_parsed, strength_parsed, falloff_parsed, effect_radius_parsed) 1400 1401 return Composition(result)
A composition to create an image.
47 def absolute_value(self) -> Composition: 48 """Composition Absolute Value 49 50 Takes the absolute value of all the pixels in the image. 51 52 Returns: 53 Graph: A graph node producing a Composition. 54 """ 55 image_parsed = input_parsers.parse_graph(self) 56 result = _internal.composition_absolute_value_internal(image_parsed) 57 58 return Composition(result)
Composition Absolute Value
Takes the absolute value of all the pixels in the image.
Returns: Graph: A graph node producing a Composition.
60 def blend_add(self, background, foreground_transform) -> Composition: 61 """Composition Blend Add 62 63 Adds the foreground and background images together using additive blending. 64 65 Args: 66 background: Graph of Composition 67 foreground_transform: Graph of Transform2 68 69 70 Returns: 71 Graph: A graph node producing a Composition. 72 """ 73 foreground_parsed = input_parsers.parse_graph(self) 74 background_parsed = input_parsers.parse_graph(background) 75 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 76 result = _internal.composition_blend_add_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 77 78 return Composition(result)
Composition Blend Add
Adds the foreground and background images together using additive blending.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
80 def blend_alpha(self, background, foreground_transform) -> Composition: 81 """Composition Blend Alpha 82 83 Blends between the foreground and background using the alpha component of the foreground. 1 is foreground. 0 is background. 84 85 Args: 86 background: Graph of Composition 87 foreground_transform: Graph of Transform2 88 89 90 Returns: 91 Graph: A graph node producing a Composition. 92 """ 93 foreground_parsed = input_parsers.parse_graph(self) 94 background_parsed = input_parsers.parse_graph(background) 95 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 96 result = _internal.composition_blend_alpha_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 97 98 return Composition(result)
Composition Blend Alpha
Blends between the foreground and background using the alpha component of the foreground. 1 is foreground. 0 is background.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
100 def blend_max(self, background, foreground_transform) -> Composition: 101 """Composition Blend Max 102 103 Blends the foreground and background images using maximum value blending. 104 105 Args: 106 background: Graph of Composition 107 foreground_transform: Graph of Transform2 108 109 110 Returns: 111 Graph: A graph node producing a Composition. 112 """ 113 foreground_parsed = input_parsers.parse_graph(self) 114 background_parsed = input_parsers.parse_graph(background) 115 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 116 result = _internal.composition_blend_max_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 117 118 return Composition(result)
Composition Blend Max
Blends the foreground and background images using maximum value blending.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
120 def blend_min(self, background, foreground_transform) -> Composition: 121 """Composition Blend Min 122 123 Blends the foreground and background images using minimum blending, taking the minimum value for each pixel. 124 125 Args: 126 background: Graph of Composition 127 foreground_transform: Graph of Transform2 128 129 130 Returns: 131 Graph: A graph node producing a Composition. 132 """ 133 foreground_parsed = input_parsers.parse_graph(self) 134 background_parsed = input_parsers.parse_graph(background) 135 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 136 result = _internal.composition_blend_min_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 137 138 return Composition(result)
Composition Blend Min
Blends the foreground and background images using minimum blending, taking the minimum value for each pixel.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
140 def blend_multiply(self, background, foreground_transform) -> Composition: 141 """Composition Blend Multiply 142 143 Multiplies the foreground and background images together using multiply blending. 144 145 Args: 146 background: Graph of Composition 147 foreground_transform: Graph of Transform2 148 149 150 Returns: 151 Graph: A graph node producing a Composition. 152 """ 153 foreground_parsed = input_parsers.parse_graph(self) 154 background_parsed = input_parsers.parse_graph(background) 155 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 156 result = _internal.composition_blend_multiply_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 157 158 return Composition(result)
Composition Blend Multiply
Multiplies the foreground and background images together using multiply blending.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
160 def blend_stencil(self, background, foreground_transform) -> Composition: 161 """Composition Blend Stencil 162 163 Blends the foreground and background images using stencil blending. When the foreground is over the background, the foreground's alpha and the background's r, g and b are used. 164 165 Args: 166 background: Graph of Composition 167 foreground_transform: Graph of Transform2 168 169 170 Returns: 171 Graph: A graph node producing a Composition. 172 """ 173 foreground_parsed = input_parsers.parse_graph(self) 174 background_parsed = input_parsers.parse_graph(background) 175 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 176 result = _internal.composition_blend_stencil_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 177 178 return Composition(result)
Composition Blend Stencil
Blends the foreground and background images using stencil blending. When the foreground is over the background, the foreground's alpha and the background's r, g and b are used.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
180 def blend_subtract(self, background, foreground_transform) -> Composition: 181 """Composition Blend Subtract 182 183 Subtracts the foreground image from the background image using subtractive blending. 184 185 Args: 186 background: Graph of Composition 187 foreground_transform: Graph of Transform2 188 189 190 Returns: 191 Graph: A graph node producing a Composition. 192 """ 193 foreground_parsed = input_parsers.parse_graph(self) 194 background_parsed = input_parsers.parse_graph(background) 195 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 196 result = _internal.composition_blend_subtract_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 197 198 return Composition(result)
Composition Blend Subtract
Subtracts the foreground image from the background image using subtractive blending.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
200 def bloom(self, threshold, sigma, intensity) -> Composition: 201 """Composition Bloom 202 203 Adds a soft bloom glow by blurring the image's bright areas and additively blending them back over the original. Threshold selects bright areas (OkLab lightness), sigma controls glow spread, intensity scales the glow strength. 204 205 Args: 206 threshold: Graph of Float 207 sigma: Graph of Float 208 intensity: Graph of Float 209 210 211 Returns: 212 Graph: A graph node producing a Composition. 213 """ 214 composition_parsed = input_parsers.parse_graph(self) 215 threshold_parsed = input_parsers.parse_float_graph(threshold) 216 sigma_parsed = input_parsers.parse_float_graph(sigma) 217 intensity_parsed = input_parsers.parse_float_graph(intensity) 218 result = _internal.composition_bloom_internal(composition_parsed, threshold_parsed, sigma_parsed, intensity_parsed) 219 220 return Composition(result)
Composition Bloom
Adds a soft bloom glow by blurring the image's bright areas and additively blending them back over the original. Threshold selects bright areas (OkLab lightness), sigma controls glow spread, intensity scales the glow strength.
Args: threshold: Graph of Float sigma: Graph of Float intensity: Graph of Float
Returns: Graph: A graph node producing a Composition.
222 def bounds(self) -> bounds2f.Bounds2f: 223 """Composition Bounds 224 225 Computes the bounding box of a composition. 226 227 Returns: 228 Graph: A graph node producing a Bounds2f. 229 """ 230 composition_parsed = input_parsers.parse_graph(self) 231 result = _internal.composition_bounds_internal(composition_parsed) 232 233 from .bounds2f import Bounds2f 234 return Bounds2f(result)
Composition Bounds
Computes the bounding box of a composition.
Returns: Graph: A graph node producing a Bounds2f.
236 def box_blur(self, dimension) -> Composition: 237 """Composition Box Blur 238 239 Applies a box blur to an image. Dimension is the size. 1 corresponding to 3x3, 2 5x5 and so on. 240 241 Args: 242 dimension: Graph of Int 243 244 245 Returns: 246 Graph: A graph node producing a Composition. 247 """ 248 composition_parsed = input_parsers.parse_graph(self) 249 dimension_parsed = input_parsers.parse_int_graph(dimension) 250 result = _internal.composition_box_blur_internal(composition_parsed, dimension_parsed) 251 252 return Composition(result)
Composition Box Blur
Applies a box blur to an image. Dimension is the size. 1 corresponding to 3x3, 2 5x5 and so on.
Args: dimension: Graph of Int
Returns: Graph: A graph node producing a Composition.
254 def brightness_adjust(self, scale) -> Composition: 255 """Composition Brightness Adjust 256 257 Adjusts the brightness of an image by a given factor. Internally, works by modifying the L component of OkLab by multiplying it by the scale. 258 259 Args: 260 scale: Graph of Float 261 262 263 Returns: 264 Graph: A graph node producing a Composition. 265 """ 266 composition_parsed = input_parsers.parse_graph(self) 267 scale_parsed = input_parsers.parse_float_graph(scale) 268 result = _internal.composition_brightness_adjust_internal(composition_parsed, scale_parsed) 269 270 return Composition(result)
Composition Brightness Adjust
Adjusts the brightness of an image by a given factor. Internally, works by modifying the L component of OkLab by multiplying it by the scale.
Args: scale: Graph of Float
Returns: Graph: A graph node producing a Composition.
272 def chroma_offset(self, offset) -> Composition: 273 """Composition Chroma Offset 274 275 Applies a chroma offset to an image. This is done by modifying the a and b components of OkLab. For the vector, X applies to a, Y to to b. 276 277 Args: 278 offset: Graph of Vector2f 279 280 281 Returns: 282 Graph: A graph node producing a Composition. 283 """ 284 composition_parsed = input_parsers.parse_graph(self) 285 offset_parsed = input_parsers.parse_graph(offset) 286 result = _internal.composition_chroma_offset_internal(composition_parsed, offset_parsed) 287 288 return Composition(result)
Composition Chroma Offset
Applies a chroma offset to an image. This is done by modifying the a and b components of OkLab. For the vector, X applies to a, Y to to b.
Args: offset: Graph of Vector2f
Returns: Graph: A graph node producing a Composition.
290 def color_convert(self, color_profile) -> Composition: 291 """Composition Color Convert 292 293 Converts a Composition from one color space to another. 294 295 Args: 296 color_profile: Graph of ColorProfile 297 298 299 Returns: 300 Graph: A graph node producing a Composition. 301 """ 302 composition_parsed = input_parsers.parse_graph(self) 303 color_profile_parsed = input_parsers.parse_graph(color_profile) 304 result = _internal.composition_color_convert_internal(composition_parsed, color_profile_parsed) 305 306 return Composition(result)
Composition Color Convert
Converts a Composition from one color space to another.
Args: color_profile: Graph of ColorProfile
Returns: Graph: A graph node producing a Composition.
308 def color_invert(self) -> Composition: 309 """Composition Color Invert 310 311 Applies a color invert operation to a composition. Taking 1 and subtracting each RGB operation against it. Works in linear color. 312 313 Returns: 314 Graph: A graph node producing a Composition. 315 """ 316 composition_parsed = input_parsers.parse_graph(self) 317 result = _internal.composition_color_invert_internal(composition_parsed) 318 319 return Composition(result)
Composition Color Invert
Applies a color invert operation to a composition. Taking 1 and subtracting each RGB operation against it. Works in linear color.
Returns: Graph: A graph node producing a Composition.
321 def color_representation(self) -> color_representation.ColorRepresentation: 322 """Composition Color Representation 323 324 Gets the color representation associated with a Composition 325 326 Returns: 327 Graph: A graph node producing a ColorRepresentation. 328 """ 329 composition_parsed = input_parsers.parse_graph(self) 330 result = _internal.composition_color_representation_internal(composition_parsed) 331 332 from .color_representation import ColorRepresentation 333 return ColorRepresentation(result)
Composition Color Representation
Gets the color representation associated with a Composition
Returns: Graph: A graph node producing a ColorRepresentation.
335 def color_threshold(self, threshold) -> Composition: 336 """Composition Color Threshold 337 338 Applies a color threshold to a Composition 339 340 Args: 341 threshold: Graph of Float 342 343 344 Returns: 345 Graph: A graph node producing a Composition. 346 """ 347 composition_parsed = input_parsers.parse_graph(self) 348 threshold_parsed = input_parsers.parse_float_graph(threshold) 349 result = _internal.composition_color_threshold_internal(composition_parsed, threshold_parsed) 350 351 return Composition(result)
Composition Color Threshold
Applies a color threshold to a Composition
Args: threshold: Graph of Float
Returns: Graph: A graph node producing a Composition.
353 def color_transformer_shader(self, function_body, helpers, input_color_representation, output_color_representation, inputs) -> Composition: 354 """Composition Color Transformer Shader 355 356 Defines a custom shader that takes an input color and then transforms that color to an output color. 357 358 Args: 359 function_body: Graph of String 360 helpers: Graph of String 361 input_color_representation: Graph of ColorRepresentation 362 output_color_representation: Graph of ColorRepresentation 363 inputs: Graph of Dictionary 364 365 366 Returns: 367 Graph: A graph node producing a Composition. 368 """ 369 composition_parsed = input_parsers.parse_graph(self) 370 function_body_parsed = input_parsers.parse_string_graph(function_body) 371 helpers_parsed = input_parsers.parse_string_graph(helpers) 372 input_color_representation_parsed = input_parsers.parse_graph(input_color_representation) 373 output_color_representation_parsed = input_parsers.parse_graph(output_color_representation) 374 inputs_parsed = input_parsers.parse_graph(inputs) 375 result = _internal.composition_color_transformer_shader_internal(composition_parsed, function_body_parsed, helpers_parsed, input_color_representation_parsed, output_color_representation_parsed, inputs_parsed) 376 377 return Composition(result)
Composition Color Transformer Shader
Defines a custom shader that takes an input color and then transforms that color to an output color.
Args: function_body: Graph of String helpers: Graph of String input_color_representation: Graph of ColorRepresentation output_color_representation: Graph of ColorRepresentation inputs: Graph of Dictionary
Returns: Graph: A graph node producing a Composition.
379 def connected_component_boxes(self) -> bounds2i_list.Bounds2iList: 380 """Composition Connected Component Boxes 381 382 Finds boxes with a r alpha channel value greater than 0.5 in the image. Recommended to use a binary image for this. 383 384 Returns: 385 Graph: A graph node producing a Bounds2iList. 386 """ 387 composition_parsed = input_parsers.parse_graph(self) 388 result = _internal.composition_connected_component_boxes_internal(composition_parsed) 389 390 from .bounds2i_list import Bounds2iList 391 return Bounds2iList(result)
Composition Connected Component Boxes
Finds boxes with a r alpha channel value greater than 0.5 in the image. Recommended to use a binary image for this.
Returns: Graph: A graph node producing a Bounds2iList.
393 def contrast_adjustment(self, contrast) -> Composition: 394 """Composition Contrast Adjustment 395 396 Adjusts the contrast of a Composition 397 398 Args: 399 contrast: Graph of Float 400 401 402 Returns: 403 Graph: A graph node producing a Composition. 404 """ 405 composition_parsed = input_parsers.parse_graph(self) 406 contrast_parsed = input_parsers.parse_float_graph(contrast) 407 result = _internal.composition_contrast_adjustment_internal(composition_parsed, contrast_parsed) 408 409 return Composition(result)
Composition Contrast Adjustment
Adjusts the contrast of a Composition
Args: contrast: Graph of Float
Returns: Graph: A graph node producing a Composition.
411 def convolution(self, kernel, kernel_width, kernel_height) -> Composition: 412 """Composition Convolution 413 414 Performs a convolution on an composition 415 416 Args: 417 kernel: Graph of FloatList 418 kernel_width: Graph of Int 419 kernel_height: Graph of Int 420 421 422 Returns: 423 Graph: A graph node producing a Composition. 424 """ 425 composition_parsed = input_parsers.parse_graph(self) 426 kernel_parsed = input_parsers.parse_graph(kernel) 427 kernel_width_parsed = input_parsers.parse_int_graph(kernel_width) 428 kernel_height_parsed = input_parsers.parse_int_graph(kernel_height) 429 result = _internal.composition_convolution_internal(composition_parsed, kernel_parsed, kernel_width_parsed, kernel_height_parsed) 430 431 return Composition(result)
Composition Convolution
Performs a convolution on an composition
Args: kernel: Graph of FloatList kernel_width: Graph of Int kernel_height: Graph of Int
Returns: Graph: A graph node producing a Composition.
433 def crop(self, rect) -> Composition: 434 """Composition Crop 435 436 Applies a crop to a Composition 437 438 Args: 439 rect: Graph of Bounds2f 440 441 442 Returns: 443 Graph: A graph node producing a Composition. 444 """ 445 composition_parsed = input_parsers.parse_graph(self) 446 rect_parsed = input_parsers.parse_graph(rect) 447 result = _internal.composition_crop_internal(composition_parsed, rect_parsed) 448 449 return Composition(result)
Composition Crop
Applies a crop to a Composition
Args: rect: Graph of Bounds2f
Returns: Graph: A graph node producing a Composition.
451 def duotone(self, threshold, color_1, color_2) -> Composition: 452 """Composition Duotone 453 454 Creates a duotone effect. Colors below the threshold will be color 1, colors above will be color 2. 455 456 Args: 457 threshold: Graph of Float 458 color_1: Graph of ProfiledColor 459 color_2: Graph of ProfiledColor 460 461 462 Returns: 463 Graph: A graph node producing a Composition. 464 """ 465 composition_parsed = input_parsers.parse_graph(self) 466 threshold_parsed = input_parsers.parse_float_graph(threshold) 467 color_1_parsed = input_parsers.parse_graph(color_1) 468 color_2_parsed = input_parsers.parse_graph(color_2) 469 result = _internal.composition_duotone_internal(composition_parsed, threshold_parsed, color_1_parsed, color_2_parsed) 470 471 return Composition(result)
Composition Duotone
Creates a duotone effect. Colors below the threshold will be color 1, colors above will be color 2.
Args: threshold: Graph of Float color_1: Graph of ProfiledColor color_2: Graph of ProfiledColor
Returns: Graph: A graph node producing a Composition.
473 def film_grain(self, grain_strength, fine_grain_frequency, fine_weight, medium_grain_frequency, medium_weight, high_grain_frequency, high_weight) -> Composition: 474 """Composition Film Grain 475 476 adds multi-octave value-noise film grain in OkLabA - grain_strength controls the overall intensity, and the fine/medium/high frequency and weight pairs control the size and contribution of each grain octave. 477 478 Args: 479 grain_strength: Graph of Float 480 fine_grain_frequency: Graph of Float 481 fine_weight: Graph of Float 482 medium_grain_frequency: Graph of Float 483 medium_weight: Graph of Float 484 high_grain_frequency: Graph of Float 485 high_weight: Graph of Float 486 487 488 Returns: 489 Graph: A graph node producing a Composition. 490 """ 491 composition_parsed = input_parsers.parse_graph(self) 492 grain_strength_parsed = input_parsers.parse_float_graph(grain_strength) 493 fine_grain_frequency_parsed = input_parsers.parse_float_graph(fine_grain_frequency) 494 fine_weight_parsed = input_parsers.parse_float_graph(fine_weight) 495 medium_grain_frequency_parsed = input_parsers.parse_float_graph(medium_grain_frequency) 496 medium_weight_parsed = input_parsers.parse_float_graph(medium_weight) 497 high_grain_frequency_parsed = input_parsers.parse_float_graph(high_grain_frequency) 498 high_weight_parsed = input_parsers.parse_float_graph(high_weight) 499 result = _internal.composition_film_grain_internal(composition_parsed, grain_strength_parsed, fine_grain_frequency_parsed, fine_weight_parsed, medium_grain_frequency_parsed, medium_weight_parsed, high_grain_frequency_parsed, high_weight_parsed) 500 501 return Composition(result)
Composition Film Grain
adds multi-octave value-noise film grain in OkLabA - grain_strength controls the overall intensity, and the fine/medium/high frequency and weight pairs control the size and contribution of each grain octave.
Args: grain_strength: Graph of Float fine_grain_frequency: Graph of Float fine_weight: Graph of Float medium_grain_frequency: Graph of Float medium_weight: Graph of Float high_grain_frequency: Graph of Float high_weight: Graph of Float
Returns: Graph: A graph node producing a Composition.
503 def flip_horizontal(self) -> Composition: 504 """Composition Flip Horizontal 505 506 Flips the image along the horizontal axis 507 508 Returns: 509 Graph: A graph node producing a Composition. 510 """ 511 composition_parsed = input_parsers.parse_graph(self) 512 result = _internal.composition_flip_horizontal_internal(composition_parsed) 513 514 return Composition(result)
Composition Flip Horizontal
Flips the image along the horizontal axis
Returns: Graph: A graph node producing a Composition.
516 def flip_vertical(self) -> Composition: 517 """Composition Flip Vertical 518 519 Flips the image vertically 520 521 Returns: 522 Graph: A graph node producing a Composition. 523 """ 524 composition_parsed = input_parsers.parse_graph(self) 525 result = _internal.composition_flip_vertical_internal(composition_parsed) 526 527 return Composition(result)
Composition Flip Vertical
Flips the image vertically
Returns: Graph: A graph node producing a Composition.
529 @staticmethod 530 def from_asset(asset_id) -> Composition: 531 """Composition from Asset 532 533 Creates a composition from an asset in your catalog. 534 535 Args: 536 asset_id: Graph of Int 537 538 539 Returns: 540 Graph: A graph node producing a Composition. 541 """ 542 asset_id_parsed = input_parsers.parse_int_graph(asset_id) 543 result = _internal.composition_from_asset_internal(asset_id_parsed) 544 545 return Composition(result)
Composition from Asset
Creates a composition from an asset in your catalog.
Args: asset_id: Graph of Int
Returns: Graph: A graph node producing a Composition.
547 @staticmethod 548 def from_image(image) -> Composition: 549 """Composition from Image 550 551 Creates an composition out of an image 552 553 Args: 554 image: Graph of Image 555 556 557 Returns: 558 Graph: A graph node producing a Composition. 559 """ 560 image_parsed = input_parsers.parse_graph(image) 561 result = _internal.composition_from_image_internal(image_parsed) 562 563 return Composition(result)
Composition from Image
Creates an composition out of an image
Args: image: Graph of Image
Returns: Graph: A graph node producing a Composition.
565 def gaussian_blur(self, sigma) -> Composition: 566 """Composition Gaussian Blur 567 568 Applies a gaussian blur to an image. Sigma controls the blur intensity. 569 570 Args: 571 sigma: Graph of Float 572 573 574 Returns: 575 Graph: A graph node producing a Composition. 576 """ 577 composition_parsed = input_parsers.parse_graph(self) 578 sigma_parsed = input_parsers.parse_float_graph(sigma) 579 result = _internal.composition_gaussian_blur_internal(composition_parsed, sigma_parsed) 580 581 return Composition(result)
Composition Gaussian Blur
Applies a gaussian blur to an image. Sigma controls the blur intensity.
Args: sigma: Graph of Float
Returns: Graph: A graph node producing a Composition.
583 def grayscale(self) -> Composition: 584 """Composition Grayscale 585 586 Applies grayscale to a Composition 587 588 Returns: 589 Graph: A graph node producing a Composition. 590 """ 591 composition_parsed = input_parsers.parse_graph(self) 592 result = _internal.composition_grayscale_internal(composition_parsed) 593 594 return Composition(result)
Composition Grayscale
Applies grayscale to a Composition
Returns: Graph: A graph node producing a Composition.
596 def halftone(self, pixel_size, foreground_color, background_color) -> Composition: 597 """Composition Halftone 598 599 Applies a halftone effect to a composition, tiling it into cells and painting a foreground-colored dot in each cell whose radius grows as the cell darkens, over a background color. 600 601 Args: 602 pixel_size: Graph of Int 603 foreground_color: Graph of ProfiledColor 604 background_color: Graph of ProfiledColor 605 606 607 Returns: 608 Graph: A graph node producing a Composition. 609 """ 610 composition_parsed = input_parsers.parse_graph(self) 611 pixel_size_parsed = input_parsers.parse_int_graph(pixel_size) 612 foreground_color_parsed = input_parsers.parse_graph(foreground_color) 613 background_color_parsed = input_parsers.parse_graph(background_color) 614 result = _internal.composition_halftone_internal(composition_parsed, pixel_size_parsed, foreground_color_parsed, background_color_parsed) 615 616 return Composition(result)
Composition Halftone
Applies a halftone effect to a composition, tiling it into cells and painting a foreground-colored dot in each cell whose radius grows as the cell darkens, over a background color.
Args: pixel_size: Graph of Int foreground_color: Graph of ProfiledColor background_color: Graph of ProfiledColor
Returns: Graph: A graph node producing a Composition.
618 @staticmethod 619 def if_(bool, input_1, input_2) -> Composition: 620 """Composition If 621 622 If the boolean is true returns input 1, otherwise input 2. Type: Composition 623 624 Args: 625 bool: Graph of Bool 626 input_1: Graph of Composition 627 input_2: Graph of Composition 628 629 630 Returns: 631 Graph: A graph node producing a Composition. 632 """ 633 bool_parsed = input_parsers.parse_bool_graph(bool) 634 input_1_parsed = input_parsers.parse_graph(input_1) 635 input_2_parsed = input_parsers.parse_graph(input_2) 636 result = _internal.composition_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 637 638 return Composition(result)
Composition If
If the boolean is true returns input 1, otherwise input 2. Type: Composition
Args: bool: Graph of Bool input_1: Graph of Composition input_2: Graph of Composition
Returns: Graph: A graph node producing a Composition.
640 def kaleidoscope(self, segments, rotation, warp, warp_frequency) -> Composition: 641 """Composition Kaleidoscope 642 643 Applies a kaleidoscope effect, folding the image into mirrored wedges around the center. segments controls the number of wedges, rotation spins the pattern, and warp/warp_frequency add a radial glass-like distortion. 644 645 Args: 646 segments: Graph of Float 647 rotation: Graph of Float 648 warp: Graph of Float 649 warp_frequency: Graph of Float 650 651 652 Returns: 653 Graph: A graph node producing a Composition. 654 """ 655 composition_parsed = input_parsers.parse_graph(self) 656 segments_parsed = input_parsers.parse_float_graph(segments) 657 rotation_parsed = input_parsers.parse_float_graph(rotation) 658 warp_parsed = input_parsers.parse_float_graph(warp) 659 warp_frequency_parsed = input_parsers.parse_float_graph(warp_frequency) 660 result = _internal.composition_kaleidoscope_internal(composition_parsed, segments_parsed, rotation_parsed, warp_parsed, warp_frequency_parsed) 661 662 return Composition(result)
Composition Kaleidoscope
Applies a kaleidoscope effect, folding the image into mirrored wedges around the center. segments controls the number of wedges, rotation spins the pattern, and warp/warp_frequency add a radial glass-like distortion.
Args: segments: Graph of Float rotation: Graph of Float warp: Graph of Float warp_frequency: Graph of Float
Returns: Graph: A graph node producing a Composition.
664 def l_curve(self, l_curve) -> Composition: 665 """Composition Lightness Curve 666 667 Applies a curve to the L component in an OkLab color. Adjusting the lightness of the image. 668 669 Args: 670 l_curve: Graph of Curve 671 672 673 Returns: 674 Graph: A graph node producing a Composition. 675 """ 676 composition_parsed = input_parsers.parse_graph(self) 677 l_curve_parsed = input_parsers.parse_graph(l_curve) 678 result = _internal.composition_l_curve_internal(composition_parsed, l_curve_parsed) 679 680 return Composition(result)
Composition Lightness Curve
Applies a curve to the L component in an OkLab color. Adjusting the lightness of the image.
Args: l_curve: Graph of Curve
Returns: Graph: A graph node producing a Composition.
682 def lightness_threshold(self, threshold) -> Composition: 683 """Composition Lightness Threshold 684 685 Thresholds a Composition by OkLab lightness, producing an opaque white mask where lightness exceeds the threshold and transparent black elsewhere. 686 687 Args: 688 threshold: Graph of Float 689 690 691 Returns: 692 Graph: A graph node producing a Composition. 693 """ 694 composition_parsed = input_parsers.parse_graph(self) 695 threshold_parsed = input_parsers.parse_float_graph(threshold) 696 result = _internal.composition_lightness_threshold_internal(composition_parsed, threshold_parsed) 697 698 return Composition(result)
Composition Lightness Threshold
Thresholds a Composition by OkLab lightness, producing an opaque white mask where lightness exceeds the threshold and transparent black elsewhere.
Args: threshold: Graph of Float
Returns: Graph: A graph node producing a Composition.
700 def linear_transform(self, entry_0_0, entry_0_1, entry_0_2, entry_0_3, entry_1_0, entry_1_1, entry_1_2, entry_1_3, entry_2_0, entry_2_1, entry_2_2, entry_2_3, entry_3_0, entry_3_1, entry_3_2, entry_3_3) -> Composition: 701 """Composition RGBA Linear Transform 702 703 Applies a linear transform to a Composition's RGBA values. Before application, will convert to a linear version of the color profile and will convert to an RGB profile if needed. 704 705 Args: 706 entry_0_0: Graph of Float 707 entry_0_1: Graph of Float 708 entry_0_2: Graph of Float 709 entry_0_3: Graph of Float 710 entry_1_0: Graph of Float 711 entry_1_1: Graph of Float 712 entry_1_2: Graph of Float 713 entry_1_3: Graph of Float 714 entry_2_0: Graph of Float 715 entry_2_1: Graph of Float 716 entry_2_2: Graph of Float 717 entry_2_3: Graph of Float 718 entry_3_0: Graph of Float 719 entry_3_1: Graph of Float 720 entry_3_2: Graph of Float 721 entry_3_3: Graph of Float 722 723 724 Returns: 725 Graph: A graph node producing a Composition. 726 """ 727 composition_parsed = input_parsers.parse_graph(self) 728 entry_0_0_parsed = input_parsers.parse_float_graph(entry_0_0) 729 entry_0_1_parsed = input_parsers.parse_float_graph(entry_0_1) 730 entry_0_2_parsed = input_parsers.parse_float_graph(entry_0_2) 731 entry_0_3_parsed = input_parsers.parse_float_graph(entry_0_3) 732 entry_1_0_parsed = input_parsers.parse_float_graph(entry_1_0) 733 entry_1_1_parsed = input_parsers.parse_float_graph(entry_1_1) 734 entry_1_2_parsed = input_parsers.parse_float_graph(entry_1_2) 735 entry_1_3_parsed = input_parsers.parse_float_graph(entry_1_3) 736 entry_2_0_parsed = input_parsers.parse_float_graph(entry_2_0) 737 entry_2_1_parsed = input_parsers.parse_float_graph(entry_2_1) 738 entry_2_2_parsed = input_parsers.parse_float_graph(entry_2_2) 739 entry_2_3_parsed = input_parsers.parse_float_graph(entry_2_3) 740 entry_3_0_parsed = input_parsers.parse_float_graph(entry_3_0) 741 entry_3_1_parsed = input_parsers.parse_float_graph(entry_3_1) 742 entry_3_2_parsed = input_parsers.parse_float_graph(entry_3_2) 743 entry_3_3_parsed = input_parsers.parse_float_graph(entry_3_3) 744 result = _internal.composition_linear_transform_internal(composition_parsed, entry_0_0_parsed, entry_0_1_parsed, entry_0_2_parsed, entry_0_3_parsed, entry_1_0_parsed, entry_1_1_parsed, entry_1_2_parsed, entry_1_3_parsed, entry_2_0_parsed, entry_2_1_parsed, entry_2_2_parsed, entry_2_3_parsed, entry_3_0_parsed, entry_3_1_parsed, entry_3_2_parsed, entry_3_3_parsed) 745 746 return Composition(result)
Composition RGBA Linear Transform
Applies a linear transform to a Composition's RGBA values. Before application, will convert to a linear version of the color profile and will convert to an RGB profile if needed.
Args: entry_0_0: Graph of Float entry_0_1: Graph of Float entry_0_2: Graph of Float entry_0_3: Graph of Float entry_1_0: Graph of Float entry_1_1: Graph of Float entry_1_2: Graph of Float entry_1_3: Graph of Float entry_2_0: Graph of Float entry_2_1: Graph of Float entry_2_2: Graph of Float entry_2_3: Graph of Float entry_3_0: Graph of Float entry_3_1: Graph of Float entry_3_2: Graph of Float entry_3_3: Graph of Float
Returns: Graph: A graph node producing a Composition.
748 def liquify(self, amplitude, frequency) -> Composition: 749 """Composition Liquify 750 751 Applies a sinusoidal liquify distortion to this composition, displacing pixels by a wave whose size is controlled by amplitude and whose density is controlled by frequency. 752 753 Args: 754 amplitude: Graph of Float 755 frequency: Graph of Float 756 757 758 Returns: 759 Graph: A graph node producing a Composition. 760 """ 761 composition_parsed = input_parsers.parse_graph(self) 762 amplitude_parsed = input_parsers.parse_float_graph(amplitude) 763 frequency_parsed = input_parsers.parse_float_graph(frequency) 764 result = _internal.composition_liquify_internal(composition_parsed, amplitude_parsed, frequency_parsed) 765 766 return Composition(result)
Composition Liquify
Applies a sinusoidal liquify distortion to this composition, displacing pixels by a wave whose size is controlled by amplitude and whose density is controlled by frequency.
Args: amplitude: Graph of Float frequency: Graph of Float
Returns: Graph: A graph node producing a Composition.
768 def max_color(self) -> profiled_color.ProfiledColor: 769 """Composition Max Color 770 771 Computes the maximum color in a composition. Works by finding the maximum L, a and b and alpha components of an OkLabA color. 772 773 Returns: 774 Graph: A graph node producing a ProfiledColor. 775 """ 776 composition_parsed = input_parsers.parse_graph(self) 777 result = _internal.composition_max_color_internal(composition_parsed) 778 779 from .profiled_color import ProfiledColor 780 return ProfiledColor(result)
Composition Max Color
Computes the maximum color in a composition. Works by finding the maximum L, a and b and alpha components of an OkLabA color.
Returns: Graph: A graph node producing a ProfiledColor.
782 def median(self, kernel_size) -> Composition: 783 """Composition Median 784 785 Applies a per-channel median filter to a composition over a square window, reducing noise while preserving edges. kernel_size controls the window size (window width is 2*kernel_size-1). 786 787 Args: 788 kernel_size: Graph of Int 789 790 791 Returns: 792 Graph: A graph node producing a Composition. 793 """ 794 composition_parsed = input_parsers.parse_graph(self) 795 kernel_size_parsed = input_parsers.parse_int_graph(kernel_size) 796 result = _internal.composition_median_internal(composition_parsed, kernel_size_parsed) 797 798 return Composition(result)
Composition Median
Applies a per-channel median filter to a composition over a square window, reducing noise while preserving edges. kernel_size controls the window size (window width is 2*kernel_size-1).
Args: kernel_size: Graph of Int
Returns: Graph: A graph node producing a Composition.
800 def min_color(self) -> profiled_color.ProfiledColor: 801 """Composition Min Color 802 803 Computes the minimum color in a composition. Works by finding the minimum L, a and b and alpha components of an OkLabA color. 804 805 Returns: 806 Graph: A graph node producing a ProfiledColor. 807 """ 808 composition_parsed = input_parsers.parse_graph(self) 809 result = _internal.composition_min_color_internal(composition_parsed) 810 811 from .profiled_color import ProfiledColor 812 return ProfiledColor(result)
Composition Min Color
Computes the minimum color in a composition. Works by finding the minimum L, a and b and alpha components of an OkLabA color.
Returns: Graph: A graph node producing a ProfiledColor.
814 def min_max_colors(self) -> profiled_color_list.ProfiledColorList: 815 """Composition Min Max Colors 816 817 Computes the minimum and maximum colors in a composition. Works by finding the minimum and maximum L, a and b and alpha components of an OkLabA color. 818 819 Returns: 820 Graph: A graph node producing a ProfiledColorList. 821 """ 822 composition_parsed = input_parsers.parse_graph(self) 823 result = _internal.composition_min_max_colors_internal(composition_parsed) 824 825 from .profiled_color_list import ProfiledColorList 826 return ProfiledColorList(result)
Composition Min Max Colors
Computes the minimum and maximum colors in a composition. Works by finding the minimum and maximum L, a and b and alpha components of an OkLabA color.
Returns: Graph: A graph node producing a ProfiledColorList.
828 @staticmethod 829 def monet_women_with_parasol() -> Composition: 830 """Monet's Women with a Parasol 831 832 Creates a composition from Monet's "Women with a Parasol" painting. Used frequently as a test asset. 833 834 Returns: 835 Graph: A graph node producing a Composition. 836 """ 837 result = _internal.composition_monet_women_with_parasol_internal() 838 839 return Composition(result)
Monet's Women with a Parasol
Creates a composition from Monet's "Women with a Parasol" painting. Used frequently as a test asset.
Returns: Graph: A graph node producing a Composition.
841 def morphological_max(self, dimension) -> Composition: 842 """Composition Morphological Max 843 844 Apples a morphological max operation. 845 846 Args: 847 dimension: Graph of Int 848 849 850 Returns: 851 Graph: A graph node producing a Composition. 852 """ 853 composition_parsed = input_parsers.parse_graph(self) 854 dimension_parsed = input_parsers.parse_int_graph(dimension) 855 result = _internal.composition_morphological_max_internal(composition_parsed, dimension_parsed) 856 857 return Composition(result)
Composition Morphological Max
Apples a morphological max operation.
Args: dimension: Graph of Int
Returns: Graph: A graph node producing a Composition.
859 def morphological_min(self, dimension) -> Composition: 860 """Composition Morphological Min 861 862 Apples a morphological min operation. 863 864 Args: 865 dimension: Graph of Int 866 867 868 Returns: 869 Graph: A graph node producing a Composition. 870 """ 871 composition_parsed = input_parsers.parse_graph(self) 872 dimension_parsed = input_parsers.parse_int_graph(dimension) 873 result = _internal.composition_morphological_min_internal(composition_parsed, dimension_parsed) 874 875 return Composition(result)
Composition Morphological Min
Apples a morphological min operation.
Args: dimension: Graph of Int
Returns: Graph: A graph node producing a Composition.
877 def negative(self) -> Composition: 878 """Composition Negative 879 880 Creates the effect of a negative image by subracting from each component of the image. 881 882 Returns: 883 Graph: A graph node producing a Composition. 884 """ 885 composition_parsed = input_parsers.parse_graph(self) 886 result = _internal.composition_negative_internal(composition_parsed) 887 888 return Composition(result)
Composition Negative
Creates the effect of a negative image by subracting from each component of the image.
Returns: Graph: A graph node producing a Composition.
890 def nonlinear_rgb_blend_alpha(self, background, foreground_transform) -> Composition: 891 """Composition Nonlinear RGB Blend Alpha 892 893 A specialized version of CompositionBlendAlpha. Blends in a non-linear RGB. 894 895 Args: 896 background: Graph of Composition 897 foreground_transform: Graph of Transform2 898 899 900 Returns: 901 Graph: A graph node producing a Composition. 902 """ 903 foreground_parsed = input_parsers.parse_graph(self) 904 background_parsed = input_parsers.parse_graph(background) 905 foreground_transform_parsed = input_parsers.parse_graph(foreground_transform) 906 result = _internal.composition_nonlinear_r_g_b_blend_alpha_internal(foreground_parsed, background_parsed, foreground_transform_parsed) 907 908 return Composition(result)
Composition Nonlinear RGB Blend Alpha
A specialized version of CompositionBlendAlpha. Blends in a non-linear RGB.
Args: background: Graph of Composition foreground_transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
910 def opacity_scales(self, scale) -> Composition: 911 """Composition Opacity Scale 912 913 Changes the opacity of an image by multiplying it by a scalar. 914 915 Args: 916 scale: Graph of Float 917 918 919 Returns: 920 Graph: A graph node producing a Composition. 921 """ 922 composition_parsed = input_parsers.parse_graph(self) 923 scale_parsed = input_parsers.parse_float_graph(scale) 924 result = _internal.composition_opacity_scale_internal(composition_parsed, scale_parsed) 925 926 return Composition(result)
Composition Opacity Scale
Changes the opacity of an image by multiplying it by a scalar.
Args: scale: Graph of Float
Returns: Graph: A graph node producing a Composition.
928 @staticmethod 929 def painter(painter) -> Composition: 930 """Composition Painter 931 932 Creates a composition from a painter. 933 934 Args: 935 painter: Graph of Painter 936 937 938 Returns: 939 Graph: A graph node producing a Composition. 940 """ 941 painter_parsed = input_parsers.parse_graph(painter) 942 result = _internal.composition_painter_internal(painter_parsed) 943 944 return Composition(result)
Composition Painter
Creates a composition from a painter.
Args: painter: Graph of Painter
Returns: Graph: A graph node producing a Composition.
946 def to_palette(self, size) -> profiled_color_list.ProfiledColorList: 947 """Composition Palette 948 949 Generates a palette of the most dominant colors of a composition. 950 951 Args: 952 size: Graph of Int 953 954 955 Returns: 956 Graph: A graph node producing a ProfiledColorList. 957 """ 958 composition_parsed = input_parsers.parse_graph(self) 959 size_parsed = input_parsers.parse_int_graph(size) 960 result = _internal.composition_palette_internal(composition_parsed, size_parsed) 961 962 from .profiled_color_list import ProfiledColorList 963 return ProfiledColorList(result)
Composition Palette
Generates a palette of the most dominant colors of a composition.
Args: size: Graph of Int
Returns: Graph: A graph node producing a ProfiledColorList.
965 def palette_reduction(self, palette) -> Composition: 966 """Composition Palette Reduction 967 968 Reduces the number of colors in a composition to a specified palette. 969 970 Args: 971 palette: Graph of ProfiledColorList 972 973 974 Returns: 975 Graph: A graph node producing a Composition. 976 """ 977 composition_parsed = input_parsers.parse_graph(self) 978 palette_parsed = input_parsers.parse_graph(palette) 979 result = _internal.composition_palette_reduction_internal(composition_parsed, palette_parsed) 980 981 return Composition(result)
Composition Palette Reduction
Reduces the number of colors in a composition to a specified palette.
Args: palette: Graph of ProfiledColorList
Returns: Graph: A graph node producing a Composition.
983 def passthrough(self) -> Composition: 984 """Composition Passthrough 985 986 Responds with the value provided. Doing nothing to it. 987 988 Returns: 989 Graph: A graph node producing a Composition. 990 """ 991 value_parsed = input_parsers.parse_graph(self) 992 result = _internal.composition_passthrough_internal(value_parsed) 993 994 return Composition(result)
Composition Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a Composition.
996 def pixelate(self, pixel_size) -> Composition: 997 """Composition Pixelate 998 999 Applies a pixelation effect to a composition. 1000 1001 Args: 1002 pixel_size: Graph of Int 1003 1004 1005 Returns: 1006 Graph: A graph node producing a Composition. 1007 """ 1008 composition_parsed = input_parsers.parse_graph(self) 1009 pixel_size_parsed = input_parsers.parse_int_graph(pixel_size) 1010 result = _internal.composition_pixelate_internal(composition_parsed, pixel_size_parsed) 1011 1012 return Composition(result)
Composition Pixelate
Applies a pixelation effect to a composition.
Args: pixel_size: Graph of Int
Returns: Graph: A graph node producing a Composition.
1014 def point_effect_shader(self, function_body, helpers, effect_center_point, effect_radius, inputs, working_color_representation) -> Composition: 1015 """Composition Point Effect Shader 1016 1017 Runs a custom shader over a circular region around an effect center point. 1018 1019 Args: 1020 function_body: Graph of String 1021 helpers: Graph of String 1022 effect_center_point: Graph of Point2f 1023 effect_radius: Graph of Float 1024 inputs: Graph of Dictionary 1025 working_color_representation: Graph of ColorRepresentation 1026 1027 1028 Returns: 1029 Graph: A graph node producing a Composition. 1030 """ 1031 composition_parsed = input_parsers.parse_graph(self) 1032 function_body_parsed = input_parsers.parse_string_graph(function_body) 1033 helpers_parsed = input_parsers.parse_string_graph(helpers) 1034 effect_center_point_parsed = input_parsers.parse_graph(effect_center_point) 1035 effect_radius_parsed = input_parsers.parse_float_graph(effect_radius) 1036 inputs_parsed = input_parsers.parse_graph(inputs) 1037 working_color_representation_parsed = input_parsers.parse_graph(working_color_representation) 1038 result = _internal.composition_point_effect_shader_internal(composition_parsed, function_body_parsed, helpers_parsed, effect_center_point_parsed, effect_radius_parsed, inputs_parsed, working_color_representation_parsed) 1039 1040 return Composition(result)
Composition Point Effect Shader
Runs a custom shader over a circular region around an effect center point.
Args: function_body: Graph of String helpers: Graph of String effect_center_point: Graph of Point2f effect_radius: Graph of Float inputs: Graph of Dictionary working_color_representation: Graph of ColorRepresentation
Returns: Graph: A graph node producing a Composition.
1042 def r_g_b_curve(self, r_curve, g_curve, b_curve) -> Composition: 1043 """Composition RGB Curve 1044 1045 Applies a curve to the R, G, and B components 1046 1047 Args: 1048 r_curve: Graph of Curve 1049 g_curve: Graph of Curve 1050 b_curve: Graph of Curve 1051 1052 1053 Returns: 1054 Graph: A graph node producing a Composition. 1055 """ 1056 composition_parsed = input_parsers.parse_graph(self) 1057 r_curve_parsed = input_parsers.parse_graph(r_curve) 1058 g_curve_parsed = input_parsers.parse_graph(g_curve) 1059 b_curve_parsed = input_parsers.parse_graph(b_curve) 1060 result = _internal.composition_r_g_b_curve_internal(composition_parsed, r_curve_parsed, g_curve_parsed, b_curve_parsed) 1061 1062 return Composition(result)
Composition RGB Curve
Applies a curve to the R, G, and B components
Args: r_curve: Graph of Curve g_curve: Graph of Curve b_curve: Graph of Curve
Returns: Graph: A graph node producing a Composition.
1064 def render_to_image(self) -> image.Image: 1065 """Composition Render to Image 1066 1067 Renders a Composition to an Image 1068 1069 Returns: 1070 Graph: A graph node producing a Image. 1071 """ 1072 composition_parsed = input_parsers.parse_graph(self) 1073 result = _internal.composition_render_to_image_internal(composition_parsed) 1074 1075 from .image import Image 1076 return Image(result)
Composition Render to Image
Renders a Composition to an Image
Returns: Graph: A graph node producing a Image.
1078 def rotate_180(self) -> Composition: 1079 """Composition Rotate 180 1080 1081 Rotates the image 180 degrees 1082 1083 Returns: 1084 Graph: A graph node producing a Composition. 1085 """ 1086 composition_parsed = input_parsers.parse_graph(self) 1087 result = _internal.composition_rotate180_internal(composition_parsed) 1088 1089 return Composition(result)
Composition Rotate 180
Rotates the image 180 degrees
Returns: Graph: A graph node producing a Composition.
1091 def rotate_90_clockwise(self) -> Composition: 1092 """Composition Rotate 90 Clockwise 1093 1094 Rotates the image 90 degrees clockwise 1095 1096 Returns: 1097 Graph: A graph node producing a Composition. 1098 """ 1099 composition_parsed = input_parsers.parse_graph(self) 1100 result = _internal.composition_rotate90_clockwise_internal(composition_parsed) 1101 1102 return Composition(result)
Composition Rotate 90 Clockwise
Rotates the image 90 degrees clockwise
Returns: Graph: A graph node producing a Composition.
1104 def rotate_90_counter_clockwise(self) -> Composition: 1105 """Composition Rotate 90 Counter Clockwise 1106 1107 Rotates the image 90 degrees counter-clockwise 1108 1109 Returns: 1110 Graph: A graph node producing a Composition. 1111 """ 1112 composition_parsed = input_parsers.parse_graph(self) 1113 result = _internal.composition_rotate90_counter_clockwise_internal(composition_parsed) 1114 1115 return Composition(result)
Composition Rotate 90 Counter Clockwise
Rotates the image 90 degrees counter-clockwise
Returns: Graph: A graph node producing a Composition.
1117 def sam3_image(self, prompt, positive_points, negative_points) -> byte_list.ByteList: 1118 """Composition SAM3 Image 1119 1120 Runs the SAM3 model on an image 1121 1122 Args: 1123 prompt: Graph of String 1124 positive_points: Graph of Point2iList 1125 negative_points: Graph of Point2iList 1126 1127 1128 Returns: 1129 Graph: A graph node producing a ByteList. 1130 """ 1131 composition_parsed = input_parsers.parse_graph(self) 1132 prompt_parsed = input_parsers.parse_string_graph(prompt) 1133 positive_points_parsed = input_parsers.parse_graph(positive_points) 1134 negative_points_parsed = input_parsers.parse_graph(negative_points) 1135 result = _internal.composition_s_a_m3_image_internal(composition_parsed, prompt_parsed, positive_points_parsed, negative_points_parsed) 1136 1137 from .byte_list import ByteList 1138 return ByteList(result)
Composition SAM3 Image
Runs the SAM3 model on an image
Args: prompt: Graph of String positive_points: Graph of Point2iList negative_points: Graph of Point2iList
Returns: Graph: A graph node producing a ByteList.
1140 def saturation_adjust(self, scale) -> Composition: 1141 """Composition Saturation Adjust 1142 1143 Adjusts the saturation of an image by a given factor. Internally, scales the chroma components in OkLab color space. 1144 1145 Args: 1146 scale: Graph of Float 1147 1148 1149 Returns: 1150 Graph: A graph node producing a Composition. 1151 """ 1152 composition_parsed = input_parsers.parse_graph(self) 1153 scale_parsed = input_parsers.parse_float_graph(scale) 1154 result = _internal.composition_saturation_adjust_internal(composition_parsed, scale_parsed) 1155 1156 return Composition(result)
Composition Saturation Adjust
Adjusts the saturation of an image by a given factor. Internally, scales the chroma components in OkLab color space.
Args: scale: Graph of Float
Returns: Graph: A graph node producing a Composition.
1158 def scanlines(self, size, beam_power, line_offset, intensity) -> Composition: 1159 """Composition Scanlines 1160 1161 Applies a CRT-style scanline effect, darkening the composition in horizontal bands whose spacing is set by size, sharpness by beam power, vertical phase by line offset, and overall strength by intensity. 1162 1163 Args: 1164 size: Graph of Float 1165 beam_power: Graph of Float 1166 line_offset: Graph of Float 1167 intensity: Graph of Float 1168 1169 1170 Returns: 1171 Graph: A graph node producing a Composition. 1172 """ 1173 composition_parsed = input_parsers.parse_graph(self) 1174 size_parsed = input_parsers.parse_float_graph(size) 1175 beam_power_parsed = input_parsers.parse_float_graph(beam_power) 1176 line_offset_parsed = input_parsers.parse_float_graph(line_offset) 1177 intensity_parsed = input_parsers.parse_float_graph(intensity) 1178 result = _internal.composition_scanlines_internal(composition_parsed, size_parsed, beam_power_parsed, line_offset_parsed, intensity_parsed) 1179 1180 return Composition(result)
Composition Scanlines
Applies a CRT-style scanline effect, darkening the composition in horizontal bands whose spacing is set by size, sharpness by beam power, vertical phase by line offset, and overall strength by intensity.
Args: size: Graph of Float beam_power: Graph of Float line_offset: Graph of Float intensity: Graph of Float
Returns: Graph: A graph node producing a Composition.
1182 def segment(self, prompt, positive_points, negative_points) -> Composition: 1183 """Composition Segment 1184 1185 Segments objects in a composition using SAM3. Accepts a text prompt and lists of positive/negative click points. 1186 1187 Args: 1188 prompt: Graph of String 1189 positive_points: Graph of Point2iList 1190 negative_points: Graph of Point2iList 1191 1192 1193 Returns: 1194 Graph: A graph node producing a Composition. 1195 """ 1196 composition_parsed = input_parsers.parse_graph(self) 1197 prompt_parsed = input_parsers.parse_string_graph(prompt) 1198 positive_points_parsed = input_parsers.parse_graph(positive_points) 1199 negative_points_parsed = input_parsers.parse_graph(negative_points) 1200 result = _internal.composition_segment_internal(composition_parsed, prompt_parsed, positive_points_parsed, negative_points_parsed) 1201 1202 return Composition(result)
Composition Segment
Segments objects in a composition using SAM3. Accepts a text prompt and lists of positive/negative click points.
Args: prompt: Graph of String positive_points: Graph of Point2iList negative_points: Graph of Point2iList
Returns: Graph: A graph node producing a Composition.
1204 def sharpen(self, radius, strength) -> Composition: 1205 """Composition Sharpen 1206 1207 Applies a sharpen filter to the composition. 1208 1209 Args: 1210 radius: Graph of Float 1211 strength: Graph of Float 1212 1213 1214 Returns: 1215 Graph: A graph node producing a Composition. 1216 """ 1217 composition_parsed = input_parsers.parse_graph(self) 1218 radius_parsed = input_parsers.parse_float_graph(radius) 1219 strength_parsed = input_parsers.parse_float_graph(strength) 1220 result = _internal.composition_sharpen_internal(composition_parsed, radius_parsed, strength_parsed) 1221 1222 return Composition(result)
Composition Sharpen
Applies a sharpen filter to the composition.
Args: radius: Graph of Float strength: Graph of Float
Returns: Graph: A graph node producing a Composition.
1224 def sobel_edge_detection(self) -> Composition: 1225 """Composition Sobel Edge Detection 1226 1227 Applies Sobel edge detection to an image. 1228 1229 Returns: 1230 Graph: A graph node producing a Composition. 1231 """ 1232 composition_parsed = input_parsers.parse_graph(self) 1233 result = _internal.composition_sobel_edge_detection_internal(composition_parsed) 1234 1235 return Composition(result)
Composition Sobel Edge Detection
Applies Sobel edge detection to an image.
Returns: Graph: A graph node producing a Composition.
1237 def spacial_effect_shader(self, function_body, helpers, max_displacement, inputs, working_color_representation) -> Composition: 1238 """Composition Spacial Effect Shader 1239 1240 Runs a custom shader over an input that can spatially displace pixels by up to a maximum displacement. 1241 1242 Args: 1243 function_body: Graph of String 1244 helpers: Graph of String 1245 max_displacement: Graph of Float 1246 inputs: Graph of Dictionary 1247 working_color_representation: Graph of ColorRepresentation 1248 1249 1250 Returns: 1251 Graph: A graph node producing a Composition. 1252 """ 1253 composition_parsed = input_parsers.parse_graph(self) 1254 function_body_parsed = input_parsers.parse_string_graph(function_body) 1255 helpers_parsed = input_parsers.parse_string_graph(helpers) 1256 max_displacement_parsed = input_parsers.parse_float_graph(max_displacement) 1257 inputs_parsed = input_parsers.parse_graph(inputs) 1258 working_color_representation_parsed = input_parsers.parse_graph(working_color_representation) 1259 result = _internal.composition_spacial_effect_shader_internal(composition_parsed, function_body_parsed, helpers_parsed, max_displacement_parsed, inputs_parsed, working_color_representation_parsed) 1260 1261 return Composition(result)
Composition Spacial Effect Shader
Runs a custom shader over an input that can spatially displace pixels by up to a maximum displacement.
Args: function_body: Graph of String helpers: Graph of String max_displacement: Graph of Float inputs: Graph of Dictionary working_color_representation: Graph of ColorRepresentation
Returns: Graph: A graph node producing a Composition.
1263 def swirl(self, center, radius, amount) -> Composition: 1264 """Composition Swirl 1265 1266 Applies a swirl distortion to this composition 1267 1268 Args: 1269 center: Graph of Vector2f 1270 radius: Graph of Float 1271 amount: Graph of Float 1272 1273 1274 Returns: 1275 Graph: A graph node producing a Composition. 1276 """ 1277 composition_parsed = input_parsers.parse_graph(self) 1278 center_parsed = input_parsers.parse_graph(center) 1279 radius_parsed = input_parsers.parse_float_graph(radius) 1280 amount_parsed = input_parsers.parse_float_graph(amount) 1281 result = _internal.composition_swirl_internal(composition_parsed, center_parsed, radius_parsed, amount_parsed) 1282 1283 return Composition(result)
Composition Swirl
Applies a swirl distortion to this composition
Args: center: Graph of Vector2f radius: Graph of Float amount: Graph of Float
Returns: Graph: A graph node producing a Composition.
1285 def target_white_kelvin(self, kelvin) -> Composition: 1286 """Composition Target White Kelvin 1287 1288 Sets the image white point to the value specified in Kelvin. The profile connection white point is D50, so you will only see changes as you move away from that. 1289 1290 Args: 1291 kelvin: Graph of Float 1292 1293 1294 Returns: 1295 Graph: A graph node producing a Composition. 1296 """ 1297 composition_parsed = input_parsers.parse_graph(self) 1298 kelvin_parsed = input_parsers.parse_float_graph(kelvin) 1299 result = _internal.composition_target_white_kelvin_internal(composition_parsed, kelvin_parsed) 1300 1301 return Composition(result)
Composition Target White Kelvin
Sets the image white point to the value specified in Kelvin. The profile connection white point is D50, so you will only see changes as you move away from that.
Args: kelvin: Graph of Float
Returns: Graph: A graph node producing a Composition.
1303 def to_ok_lab_hist(self) -> ok_lab_hist.OkLabHist: 1304 """Composition to OkLab Histogram 1305 1306 Creates an OkLab Histogram from the colors in a Composition. 1307 1308 Returns: 1309 Graph: A graph node producing a OkLabHist. 1310 """ 1311 composition_parsed = input_parsers.parse_graph(self) 1312 result = _internal.composition_to_ok_lab_hist_internal(composition_parsed) 1313 1314 from .ok_lab_hist import OkLabHist 1315 return OkLabHist(result)
Composition to OkLab Histogram
Creates an OkLab Histogram from the colors in a Composition.
Returns: Graph: A graph node producing a OkLabHist.
1317 def transform(self, transform) -> Composition: 1318 """Composition Transform 1319 1320 Applies a 2D transform to a Composition. 1321 1322 Args: 1323 transform: Graph of Transform2 1324 1325 1326 Returns: 1327 Graph: A graph node producing a Composition. 1328 """ 1329 composition_parsed = input_parsers.parse_graph(self) 1330 transform_parsed = input_parsers.parse_graph(transform) 1331 result = _internal.composition_transform_internal(composition_parsed, transform_parsed) 1332 1333 return Composition(result)
Composition Transform
Applies a 2D transform to a Composition.
Args: transform: Graph of Transform2
Returns: Graph: A graph node producing a Composition.
1335 def vibrance_adjustment(self, strength) -> Composition: 1336 """Composition Vibrance Adjustment 1337 1338 Adjusts the vibrance of an image by a given strength. Internally, boosts chroma in OkLab color space adaptively, applying more boost to less saturated colors. 1339 1340 Args: 1341 strength: Graph of Float 1342 1343 1344 Returns: 1345 Graph: A graph node producing a Composition. 1346 """ 1347 composition_parsed = input_parsers.parse_graph(self) 1348 strength_parsed = input_parsers.parse_float_graph(strength) 1349 result = _internal.composition_vibrance_adjustment_internal(composition_parsed, strength_parsed) 1350 1351 return Composition(result)
Composition Vibrance Adjustment
Adjusts the vibrance of an image by a given strength. Internally, boosts chroma in OkLab color space adaptively, applying more boost to less saturated colors.
Args: strength: Graph of Float
Returns: Graph: A graph node producing a Composition.
1353 def vignette(self, center, radius_x, radius_y, softness, strength) -> Composition: 1354 """Composition Vignette 1355 1356 darkens the area outside an ellipse - center is the bright spot in pixel coordinates, radius_x and radius_y are the ellipse semi-axes in pixels where the falloff starts, softness is the width of the fade-out band in pixels, and strength (0-1) defines how dark the edges become at maximum. 1357 1358 Args: 1359 center: Graph of Vector2f 1360 radius_x: Graph of Float 1361 radius_y: Graph of Float 1362 softness: Graph of Float 1363 strength: Graph of Float 1364 1365 1366 Returns: 1367 Graph: A graph node producing a Composition. 1368 """ 1369 composition_parsed = input_parsers.parse_graph(self) 1370 center_parsed = input_parsers.parse_graph(center) 1371 radius_x_parsed = input_parsers.parse_float_graph(radius_x) 1372 radius_y_parsed = input_parsers.parse_float_graph(radius_y) 1373 softness_parsed = input_parsers.parse_float_graph(softness) 1374 strength_parsed = input_parsers.parse_float_graph(strength) 1375 result = _internal.composition_vignette_internal(composition_parsed, center_parsed, radius_x_parsed, radius_y_parsed, softness_parsed, strength_parsed) 1376 1377 return Composition(result)
Composition Vignette
darkens the area outside an ellipse - center is the bright spot in pixel coordinates, radius_x and radius_y are the ellipse semi-axes in pixels where the falloff starts, softness is the width of the fade-out band in pixels, and strength (0-1) defines how dark the edges become at maximum.
Args: center: Graph of Vector2f radius_x: Graph of Float radius_y: Graph of Float softness: Graph of Float strength: Graph of Float
Returns: Graph: A graph node producing a Composition.
1379 def zoom_blur(self, center, strength, falloff, effect_radius) -> Composition: 1380 """Composition Zoom Blur 1381 1382 Performs a zoom blur on this composition 1383 1384 Args: 1385 center: Graph of Vector2f 1386 strength: Graph of Float 1387 falloff: Graph of Float 1388 effect_radius: Graph of Float 1389 1390 1391 Returns: 1392 Graph: A graph node producing a Composition. 1393 """ 1394 composition_parsed = input_parsers.parse_graph(self) 1395 center_parsed = input_parsers.parse_graph(center) 1396 strength_parsed = input_parsers.parse_float_graph(strength) 1397 falloff_parsed = input_parsers.parse_float_graph(falloff) 1398 effect_radius_parsed = input_parsers.parse_float_graph(effect_radius) 1399 result = _internal.composition_zoom_blur_internal(composition_parsed, center_parsed, strength_parsed, falloff_parsed, effect_radius_parsed) 1400 1401 return Composition(result)
Composition Zoom Blur
Performs a zoom blur on this composition
Args: center: Graph of Vector2f strength: Graph of Float falloff: Graph of Float effect_radius: Graph of Float
Returns: Graph: A graph node producing a Composition.
20class Curve(_GraphWrapper): 21 """A curve that represents a mathematical function in 2D that takes and input and maps to an output.""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 def evaluate(self, input) -> float.Float: 29 """Curve Evaluate 30 31 Evaluates a curve at a given input value. 32 33 Args: 34 input: Graph of Float 35 36 37 Returns: 38 Graph: A graph node producing a Float. 39 """ 40 curve_parsed = input_parsers.parse_graph(self) 41 input_parsed = input_parsers.parse_float_graph(input) 42 result = _internal.curve_evaluate_internal(curve_parsed, input_parsed) 43 44 from .float import Float 45 return Float(result) 46 47 @staticmethod 48 def gamma(gamma) -> Curve: 49 """Curve Gamma 50 51 A gamma curve. The gamma parameter corresponding to y=x^gamma. 52 53 Args: 54 gamma: Graph of Float 55 56 57 Returns: 58 Graph: A graph node producing a Curve. 59 """ 60 gamma_parsed = input_parsers.parse_float_graph(gamma) 61 result = _internal.curve_gamma_internal(gamma_parsed) 62 63 return Curve(result) 64 65 @staticmethod 66 def identity() -> Curve: 67 """Curve Identity 68 69 An identity curve, y=x 70 71 Returns: 72 Graph: A graph node producing a Curve. 73 """ 74 result = _internal.curve_identity_internal() 75 76 return Curve(result) 77 78 @staticmethod 79 def pivoted_sigmoid(pivot, slope) -> Curve: 80 """Curve Pivoted Sigmoid 81 82 A pivoted sigmoid contrast curve that anchors at the pivot and smoothly compresses shadows and highlights, with a slope parameter controlling midtone contrast. 83 84 Args: 85 pivot: Graph of Float 86 slope: Graph of Float 87 88 89 Returns: 90 Graph: A graph node producing a Curve. 91 """ 92 pivot_parsed = input_parsers.parse_float_graph(pivot) 93 slope_parsed = input_parsers.parse_float_graph(slope) 94 result = _internal.curve_pivoted_sigmoid_internal(pivot_parsed, slope_parsed) 95 96 return Curve(result) 97 98 @staticmethod 99 def s_curve(pivot, slope, toe, shoulder) -> Curve: 100 """Curve S 101 102 An S-curve remaps values by anchoring contrast at a chosen pivot, increasing or decreasing midtone separation via slope, gently flattening the curve near black with toe to compress or lift shadows, and softly flattening near white with shoulder to roll off highlights, while keeping black and white fixed. 103 104 Args: 105 pivot: Graph of Float 106 slope: Graph of Float 107 toe: Graph of Float 108 shoulder: Graph of Float 109 110 111 Returns: 112 Graph: A graph node producing a Curve. 113 """ 114 pivot_parsed = input_parsers.parse_float_graph(pivot) 115 slope_parsed = input_parsers.parse_float_graph(slope) 116 toe_parsed = input_parsers.parse_float_graph(toe) 117 shoulder_parsed = input_parsers.parse_float_graph(shoulder) 118 result = _internal.curve_s_curve_internal(pivot_parsed, slope_parsed, toe_parsed, shoulder_parsed) 119 120 return Curve(result)
A curve that represents a mathematical function in 2D that takes and input and maps to an output.
28 def evaluate(self, input) -> float.Float: 29 """Curve Evaluate 30 31 Evaluates a curve at a given input value. 32 33 Args: 34 input: Graph of Float 35 36 37 Returns: 38 Graph: A graph node producing a Float. 39 """ 40 curve_parsed = input_parsers.parse_graph(self) 41 input_parsed = input_parsers.parse_float_graph(input) 42 result = _internal.curve_evaluate_internal(curve_parsed, input_parsed) 43 44 from .float import Float 45 return Float(result)
Curve Evaluate
Evaluates a curve at a given input value.
Args: input: Graph of Float
Returns: Graph: A graph node producing a Float.
47 @staticmethod 48 def gamma(gamma) -> Curve: 49 """Curve Gamma 50 51 A gamma curve. The gamma parameter corresponding to y=x^gamma. 52 53 Args: 54 gamma: Graph of Float 55 56 57 Returns: 58 Graph: A graph node producing a Curve. 59 """ 60 gamma_parsed = input_parsers.parse_float_graph(gamma) 61 result = _internal.curve_gamma_internal(gamma_parsed) 62 63 return Curve(result)
Curve Gamma
A gamma curve. The gamma parameter corresponding to y=x^gamma.
Args: gamma: Graph of Float
Returns: Graph: A graph node producing a Curve.
65 @staticmethod 66 def identity() -> Curve: 67 """Curve Identity 68 69 An identity curve, y=x 70 71 Returns: 72 Graph: A graph node producing a Curve. 73 """ 74 result = _internal.curve_identity_internal() 75 76 return Curve(result)
Curve Identity
An identity curve, y=x
Returns: Graph: A graph node producing a Curve.
78 @staticmethod 79 def pivoted_sigmoid(pivot, slope) -> Curve: 80 """Curve Pivoted Sigmoid 81 82 A pivoted sigmoid contrast curve that anchors at the pivot and smoothly compresses shadows and highlights, with a slope parameter controlling midtone contrast. 83 84 Args: 85 pivot: Graph of Float 86 slope: Graph of Float 87 88 89 Returns: 90 Graph: A graph node producing a Curve. 91 """ 92 pivot_parsed = input_parsers.parse_float_graph(pivot) 93 slope_parsed = input_parsers.parse_float_graph(slope) 94 result = _internal.curve_pivoted_sigmoid_internal(pivot_parsed, slope_parsed) 95 96 return Curve(result)
Curve Pivoted Sigmoid
A pivoted sigmoid contrast curve that anchors at the pivot and smoothly compresses shadows and highlights, with a slope parameter controlling midtone contrast.
Args: pivot: Graph of Float slope: Graph of Float
Returns: Graph: A graph node producing a Curve.
98 @staticmethod 99 def s_curve(pivot, slope, toe, shoulder) -> Curve: 100 """Curve S 101 102 An S-curve remaps values by anchoring contrast at a chosen pivot, increasing or decreasing midtone separation via slope, gently flattening the curve near black with toe to compress or lift shadows, and softly flattening near white with shoulder to roll off highlights, while keeping black and white fixed. 103 104 Args: 105 pivot: Graph of Float 106 slope: Graph of Float 107 toe: Graph of Float 108 shoulder: Graph of Float 109 110 111 Returns: 112 Graph: A graph node producing a Curve. 113 """ 114 pivot_parsed = input_parsers.parse_float_graph(pivot) 115 slope_parsed = input_parsers.parse_float_graph(slope) 116 toe_parsed = input_parsers.parse_float_graph(toe) 117 shoulder_parsed = input_parsers.parse_float_graph(shoulder) 118 result = _internal.curve_s_curve_internal(pivot_parsed, slope_parsed, toe_parsed, shoulder_parsed) 119 120 return Curve(result)
Curve S
An S-curve remaps values by anchoring contrast at a chosen pivot, increasing or decreasing midtone separation via slope, gently flattening the curve near black with toe to compress or lift shadows, and softly flattening near white with shoulder to roll off highlights, while keeping black and white fixed.
Args: pivot: Graph of Float slope: Graph of Float toe: Graph of Float shoulder: Graph of Float
Returns: Graph: A graph node producing a Curve.
15class Dictionary(_GraphWrapper): 16 """A key value lookup between a name and a type in the graph""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 def add_bool_to_dictionary(self, key, value) -> Dictionary: 24 """Bool Add To Dictionary 25 26 Adds a Bool to a Dictionary 27 28 Args: 29 key: Graph of String 30 value: Graph of Bool 31 32 33 Returns: 34 Graph: A graph node producing a Dictionary. 35 """ 36 dictionary_parsed = input_parsers.parse_graph(self) 37 key_parsed = input_parsers.parse_string_graph(key) 38 value_parsed = input_parsers.parse_bool_graph(value) 39 result = _internal.bool_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 40 41 return Dictionary(result) 42 43 @staticmethod 44 def create() -> Dictionary: 45 """Dictionary Create 46 47 Creates a new dictionary 48 49 Returns: 50 Graph: A graph node producing a Dictionary. 51 """ 52 result = _internal.dictionary_create_internal() 53 54 return Dictionary(result) 55 56 def add_float_to_dictionary(self, key, value) -> Dictionary: 57 """Float Add To Dictionary 58 59 Adds a Float to a Dictionary 60 61 Args: 62 key: Graph of String 63 value: Graph of Float 64 65 66 Returns: 67 Graph: A graph node producing a Dictionary. 68 """ 69 dictionary_parsed = input_parsers.parse_graph(self) 70 key_parsed = input_parsers.parse_string_graph(key) 71 value_parsed = input_parsers.parse_float_graph(value) 72 result = _internal.float_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 73 74 return Dictionary(result) 75 76 def add_int_to_dictionary(self, key, value) -> Dictionary: 77 """Int Add To Dictionary 78 79 Adds a Int to a Dictionary 80 81 Args: 82 key: Graph of String 83 value: Graph of Int 84 85 86 Returns: 87 Graph: A graph node producing a Dictionary. 88 """ 89 dictionary_parsed = input_parsers.parse_graph(self) 90 key_parsed = input_parsers.parse_string_graph(key) 91 value_parsed = input_parsers.parse_int_graph(value) 92 result = _internal.int_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 93 94 return Dictionary(result) 95 96 def add_profiled_color_to_dictionary(self, key, value) -> Dictionary: 97 """Profiled Color Add To Dictionary 98 99 Adds a Profiled Color to a Dictionary 100 101 Args: 102 key: Graph of String 103 value: Graph of ProfiledColor 104 105 106 Returns: 107 Graph: A graph node producing a Dictionary. 108 """ 109 dictionary_parsed = input_parsers.parse_graph(self) 110 key_parsed = input_parsers.parse_string_graph(key) 111 value_parsed = input_parsers.parse_graph(value) 112 result = _internal.profiled_color_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 113 114 return Dictionary(result) 115 116 def add_r_g_b_color_to_dictionary(self, key, value) -> Dictionary: 117 """RGB Color Add To Dictionary 118 119 Adds a RGB Color to a Dictionary 120 121 Args: 122 key: Graph of String 123 value: Graph of RGBColor 124 125 126 Returns: 127 Graph: A graph node producing a Dictionary. 128 """ 129 dictionary_parsed = input_parsers.parse_graph(self) 130 key_parsed = input_parsers.parse_string_graph(key) 131 value_parsed = input_parsers.parse_graph(value) 132 result = _internal.r_g_b_color_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 133 134 return Dictionary(result) 135 136 def add_vector2f_to_dictionary(self, key, value) -> Dictionary: 137 """Vector 2 Float Add To Dictionary 138 139 Adds a Vector 2 Float to a Dictionary 140 141 Args: 142 key: Graph of String 143 value: Graph of Vector2f 144 145 146 Returns: 147 Graph: A graph node producing a Dictionary. 148 """ 149 dictionary_parsed = input_parsers.parse_graph(self) 150 key_parsed = input_parsers.parse_string_graph(key) 151 value_parsed = input_parsers.parse_graph(value) 152 result = _internal.vector2f_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 153 154 return Dictionary(result) 155 156 def add_vector2i_to_dictionary(self, key, value) -> Dictionary: 157 """Vector 2 Int Add To Dictionary 158 159 Adds a Vector 2 Int to a Dictionary 160 161 Args: 162 key: Graph of String 163 value: Graph of Vector2i 164 165 166 Returns: 167 Graph: A graph node producing a Dictionary. 168 """ 169 dictionary_parsed = input_parsers.parse_graph(self) 170 key_parsed = input_parsers.parse_string_graph(key) 171 value_parsed = input_parsers.parse_graph(value) 172 result = _internal.vector2i_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 173 174 return Dictionary(result)
A key value lookup between a name and a type in the graph
23 def add_bool_to_dictionary(self, key, value) -> Dictionary: 24 """Bool Add To Dictionary 25 26 Adds a Bool to a Dictionary 27 28 Args: 29 key: Graph of String 30 value: Graph of Bool 31 32 33 Returns: 34 Graph: A graph node producing a Dictionary. 35 """ 36 dictionary_parsed = input_parsers.parse_graph(self) 37 key_parsed = input_parsers.parse_string_graph(key) 38 value_parsed = input_parsers.parse_bool_graph(value) 39 result = _internal.bool_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 40 41 return Dictionary(result)
Bool Add To Dictionary
Adds a Bool to a Dictionary
Args: key: Graph of String value: Graph of Bool
Returns: Graph: A graph node producing a Dictionary.
43 @staticmethod 44 def create() -> Dictionary: 45 """Dictionary Create 46 47 Creates a new dictionary 48 49 Returns: 50 Graph: A graph node producing a Dictionary. 51 """ 52 result = _internal.dictionary_create_internal() 53 54 return Dictionary(result)
Dictionary Create
Creates a new dictionary
Returns: Graph: A graph node producing a Dictionary.
56 def add_float_to_dictionary(self, key, value) -> Dictionary: 57 """Float Add To Dictionary 58 59 Adds a Float to a Dictionary 60 61 Args: 62 key: Graph of String 63 value: Graph of Float 64 65 66 Returns: 67 Graph: A graph node producing a Dictionary. 68 """ 69 dictionary_parsed = input_parsers.parse_graph(self) 70 key_parsed = input_parsers.parse_string_graph(key) 71 value_parsed = input_parsers.parse_float_graph(value) 72 result = _internal.float_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 73 74 return Dictionary(result)
Float Add To Dictionary
Adds a Float to a Dictionary
Args: key: Graph of String value: Graph of Float
Returns: Graph: A graph node producing a Dictionary.
76 def add_int_to_dictionary(self, key, value) -> Dictionary: 77 """Int Add To Dictionary 78 79 Adds a Int to a Dictionary 80 81 Args: 82 key: Graph of String 83 value: Graph of Int 84 85 86 Returns: 87 Graph: A graph node producing a Dictionary. 88 """ 89 dictionary_parsed = input_parsers.parse_graph(self) 90 key_parsed = input_parsers.parse_string_graph(key) 91 value_parsed = input_parsers.parse_int_graph(value) 92 result = _internal.int_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 93 94 return Dictionary(result)
Int Add To Dictionary
Adds a Int to a Dictionary
Args: key: Graph of String value: Graph of Int
Returns: Graph: A graph node producing a Dictionary.
96 def add_profiled_color_to_dictionary(self, key, value) -> Dictionary: 97 """Profiled Color Add To Dictionary 98 99 Adds a Profiled Color to a Dictionary 100 101 Args: 102 key: Graph of String 103 value: Graph of ProfiledColor 104 105 106 Returns: 107 Graph: A graph node producing a Dictionary. 108 """ 109 dictionary_parsed = input_parsers.parse_graph(self) 110 key_parsed = input_parsers.parse_string_graph(key) 111 value_parsed = input_parsers.parse_graph(value) 112 result = _internal.profiled_color_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 113 114 return Dictionary(result)
Profiled Color Add To Dictionary
Adds a Profiled Color to a Dictionary
Args: key: Graph of String value: Graph of ProfiledColor
Returns: Graph: A graph node producing a Dictionary.
116 def add_r_g_b_color_to_dictionary(self, key, value) -> Dictionary: 117 """RGB Color Add To Dictionary 118 119 Adds a RGB Color to a Dictionary 120 121 Args: 122 key: Graph of String 123 value: Graph of RGBColor 124 125 126 Returns: 127 Graph: A graph node producing a Dictionary. 128 """ 129 dictionary_parsed = input_parsers.parse_graph(self) 130 key_parsed = input_parsers.parse_string_graph(key) 131 value_parsed = input_parsers.parse_graph(value) 132 result = _internal.r_g_b_color_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 133 134 return Dictionary(result)
RGB Color Add To Dictionary
Adds a RGB Color to a Dictionary
Args: key: Graph of String value: Graph of RGBColor
Returns: Graph: A graph node producing a Dictionary.
136 def add_vector2f_to_dictionary(self, key, value) -> Dictionary: 137 """Vector 2 Float Add To Dictionary 138 139 Adds a Vector 2 Float to a Dictionary 140 141 Args: 142 key: Graph of String 143 value: Graph of Vector2f 144 145 146 Returns: 147 Graph: A graph node producing a Dictionary. 148 """ 149 dictionary_parsed = input_parsers.parse_graph(self) 150 key_parsed = input_parsers.parse_string_graph(key) 151 value_parsed = input_parsers.parse_graph(value) 152 result = _internal.vector2f_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 153 154 return Dictionary(result)
Vector 2 Float Add To Dictionary
Adds a Vector 2 Float to a Dictionary
Args: key: Graph of String value: Graph of Vector2f
Returns: Graph: A graph node producing a Dictionary.
156 def add_vector2i_to_dictionary(self, key, value) -> Dictionary: 157 """Vector 2 Int Add To Dictionary 158 159 Adds a Vector 2 Int to a Dictionary 160 161 Args: 162 key: Graph of String 163 value: Graph of Vector2i 164 165 166 Returns: 167 Graph: A graph node producing a Dictionary. 168 """ 169 dictionary_parsed = input_parsers.parse_graph(self) 170 key_parsed = input_parsers.parse_string_graph(key) 171 value_parsed = input_parsers.parse_graph(value) 172 result = _internal.vector2i_add_to_dictionary_internal(dictionary_parsed, key_parsed, value_parsed) 173 174 return Dictionary(result)
Vector 2 Int Add To Dictionary
Adds a Vector 2 Int to a Dictionary
Args: key: Graph of String value: Graph of Vector2i
Returns: Graph: A graph node producing a Dictionary.
15class Fill(_GraphWrapper): 16 """The fill for when drawing in a 2d object.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def custom(function_body, helpers, inputs) -> Fill: 25 """Fill Custom 26 27 Creates a fill with a custom shader. 28 29 Args: 30 function_body: Graph of String 31 helpers: Graph of String 32 inputs: Graph of Dictionary 33 34 35 Returns: 36 Graph: A graph node producing a Fill. 37 """ 38 function_body_parsed = input_parsers.parse_string_graph(function_body) 39 helpers_parsed = input_parsers.parse_string_graph(helpers) 40 inputs_parsed = input_parsers.parse_graph(inputs) 41 result = _internal.fill_custom_internal(function_body_parsed, helpers_parsed, inputs_parsed) 42 43 return Fill(result) 44 45 @staticmethod 46 def solid(color) -> Fill: 47 """Fill Solid 48 49 Creates a fill with a solid color. 50 51 Args: 52 color: Graph of ProfiledColor 53 54 55 Returns: 56 Graph: A graph node producing a Fill. 57 """ 58 color_parsed = input_parsers.parse_graph(color) 59 result = _internal.fill_solid_internal(color_parsed) 60 61 return Fill(result)
The fill for when drawing in a 2d object.
23 @staticmethod 24 def custom(function_body, helpers, inputs) -> Fill: 25 """Fill Custom 26 27 Creates a fill with a custom shader. 28 29 Args: 30 function_body: Graph of String 31 helpers: Graph of String 32 inputs: Graph of Dictionary 33 34 35 Returns: 36 Graph: A graph node producing a Fill. 37 """ 38 function_body_parsed = input_parsers.parse_string_graph(function_body) 39 helpers_parsed = input_parsers.parse_string_graph(helpers) 40 inputs_parsed = input_parsers.parse_graph(inputs) 41 result = _internal.fill_custom_internal(function_body_parsed, helpers_parsed, inputs_parsed) 42 43 return Fill(result)
Fill Custom
Creates a fill with a custom shader.
Args: function_body: Graph of String helpers: Graph of String inputs: Graph of Dictionary
Returns: Graph: A graph node producing a Fill.
45 @staticmethod 46 def solid(color) -> Fill: 47 """Fill Solid 48 49 Creates a fill with a solid color. 50 51 Args: 52 color: Graph of ProfiledColor 53 54 55 Returns: 56 Graph: A graph node producing a Fill. 57 """ 58 color_parsed = input_parsers.parse_graph(color) 59 result = _internal.fill_solid_internal(color_parsed) 60 61 return Fill(result)
Fill Solid
Creates a fill with a solid color.
Args: color: Graph of ProfiledColor
Returns: Graph: A graph node producing a Fill.
22class Float(_GraphWrapper): 23 """A float""" 24 25 def execute(self, context): 26 27 return self._inner.execute(context).as_float() 28 29 30 def abs(self) -> Float: 31 """Absolute Value 32 33 Returns the absolute value of a float 34 35 Returns: 36 Graph: A graph node producing a Float. 37 """ 38 number_parsed = input_parsers.parse_float_graph(self) 39 result = _internal.abs_internal(number_parsed) 40 41 return Float(result) 42 43 def add(self, float2) -> Float: 44 """Float Add 45 46 Adds two floats together. 47 48 Args: 49 float2: Graph of Float 50 51 52 Returns: 53 Graph: A graph node producing a Float. 54 """ 55 float1_parsed = input_parsers.parse_float_graph(self) 56 float2_parsed = input_parsers.parse_float_graph(float2) 57 result = _internal.float_add_internal(float1_parsed, float2_parsed) 58 59 return Float(result) 60 61 def cos(self) -> Float: 62 """Float Cosine 63 64 Computes the cosine of a float (in radians). 65 66 Returns: 67 Graph: A graph node producing a Float. 68 """ 69 angle_parsed = input_parsers.parse_float_graph(self) 70 result = _internal.float_cos_internal(angle_parsed) 71 72 return Float(result) 73 74 def divide(self, float2) -> Float: 75 """Float Divide 76 77 Adds two floats together. 78 79 Args: 80 float2: Graph of Float 81 82 83 Returns: 84 Graph: A graph node producing a Float. 85 """ 86 float1_parsed = input_parsers.parse_float_graph(self) 87 float2_parsed = input_parsers.parse_float_graph(float2) 88 result = _internal.float_divide_internal(float1_parsed, float2_parsed) 89 90 return Float(result) 91 92 def equals(self, float_2) -> bool.Bool: 93 """Float Equals 94 95 Checks if two floats are equal 96 97 Args: 98 float_2: Graph of Float 99 100 101 Returns: 102 Graph: A graph node producing a Bool. 103 """ 104 float_1_parsed = input_parsers.parse_float_graph(self) 105 float_2_parsed = input_parsers.parse_float_graph(float_2) 106 result = _internal.float_equals_internal(float_1_parsed, float_2_parsed) 107 108 from .bool import Bool 109 return Bool(result) 110 111 def greater_than(self, float_2) -> bool.Bool: 112 """Float Greater Than 113 114 Checks if the first float is greater than the second float 115 116 Args: 117 float_2: Graph of Float 118 119 120 Returns: 121 Graph: A graph node producing a Bool. 122 """ 123 float_1_parsed = input_parsers.parse_float_graph(self) 124 float_2_parsed = input_parsers.parse_float_graph(float_2) 125 result = _internal.float_greater_than_internal(float_1_parsed, float_2_parsed) 126 127 from .bool import Bool 128 return Bool(result) 129 130 def greater_than_or_equal(self, float_2) -> bool.Bool: 131 """Float Greater Than Or Equal 132 133 Checks if the first float is greater than or equal to the second float 134 135 Args: 136 float_2: Graph of Float 137 138 139 Returns: 140 Graph: A graph node producing a Bool. 141 """ 142 float_1_parsed = input_parsers.parse_float_graph(self) 143 float_2_parsed = input_parsers.parse_float_graph(float_2) 144 result = _internal.float_greater_than_or_equal_internal(float_1_parsed, float_2_parsed) 145 146 from .bool import Bool 147 return Bool(result) 148 149 @staticmethod 150 def if_(bool, input_1, input_2) -> Float: 151 """Float If 152 153 If the boolean is true returns input 1, otherwise input 2. Type: Float 154 155 Args: 156 bool: Graph of Bool 157 input_1: Graph of Float 158 input_2: Graph of Float 159 160 161 Returns: 162 Graph: A graph node producing a Float. 163 """ 164 bool_parsed = input_parsers.parse_bool_graph(bool) 165 input_1_parsed = input_parsers.parse_float_graph(input_1) 166 input_2_parsed = input_parsers.parse_float_graph(input_2) 167 result = _internal.float_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 168 169 return Float(result) 170 171 def lerp(self, float1, float2) -> Float: 172 """Float Lerp 173 174 Lerps between two floats using the x parameter 175 176 Args: 177 float1: Graph of Float 178 float2: Graph of Float 179 180 181 Returns: 182 Graph: A graph node producing a Float. 183 """ 184 x_parsed = input_parsers.parse_float_graph(self) 185 float1_parsed = input_parsers.parse_float_graph(float1) 186 float2_parsed = input_parsers.parse_float_graph(float2) 187 result = _internal.float_lerp_internal(x_parsed, float1_parsed, float2_parsed) 188 189 return Float(result) 190 191 def less_than(self, float_2) -> bool.Bool: 192 """Float Less Than 193 194 Checks if the first float is less than the second float 195 196 Args: 197 float_2: Graph of Float 198 199 200 Returns: 201 Graph: A graph node producing a Bool. 202 """ 203 float_1_parsed = input_parsers.parse_float_graph(self) 204 float_2_parsed = input_parsers.parse_float_graph(float_2) 205 result = _internal.float_less_than_internal(float_1_parsed, float_2_parsed) 206 207 from .bool import Bool 208 return Bool(result) 209 210 def less_than_or_equal(self, float_2) -> bool.Bool: 211 """Float Less Than Or Equal 212 213 Checks if the first float is less than or equal to the second float 214 215 Args: 216 float_2: Graph of Float 217 218 219 Returns: 220 Graph: A graph node producing a Bool. 221 """ 222 float_1_parsed = input_parsers.parse_float_graph(self) 223 float_2_parsed = input_parsers.parse_float_graph(float_2) 224 result = _internal.float_less_than_or_equal_internal(float_1_parsed, float_2_parsed) 225 226 from .bool import Bool 227 return Bool(result) 228 229 def max(self, float2) -> Float: 230 """Float Max 231 232 Returns the maximum float. 233 234 Args: 235 float2: Graph of Float 236 237 238 Returns: 239 Graph: A graph node producing a Float. 240 """ 241 float1_parsed = input_parsers.parse_float_graph(self) 242 float2_parsed = input_parsers.parse_float_graph(float2) 243 result = _internal.float_max_internal(float1_parsed, float2_parsed) 244 245 return Float(result) 246 247 def min(self, float2) -> Float: 248 """Float Min 249 250 Returns the minimum float. 251 252 Args: 253 float2: Graph of Float 254 255 256 Returns: 257 Graph: A graph node producing a Float. 258 """ 259 float1_parsed = input_parsers.parse_float_graph(self) 260 float2_parsed = input_parsers.parse_float_graph(float2) 261 result = _internal.float_min_internal(float1_parsed, float2_parsed) 262 263 return Float(result) 264 265 def multiply(self, float2) -> Float: 266 """Float Multiply 267 268 Multiplies two floats together. 269 270 Args: 271 float2: Graph of Float 272 273 274 Returns: 275 Graph: A graph node producing a Float. 276 """ 277 float1_parsed = input_parsers.parse_float_graph(self) 278 float2_parsed = input_parsers.parse_float_graph(float2) 279 result = _internal.float_multiply_internal(float1_parsed, float2_parsed) 280 281 return Float(result) 282 283 def passthrough(self) -> Float: 284 """Float Passthrough 285 286 Responds with the value provided. Doing nothing to it. 287 288 Returns: 289 Graph: A graph node producing a Float. 290 """ 291 value_parsed = input_parsers.parse_float_graph(self) 292 result = _internal.float_passthrough_internal(value_parsed) 293 294 return Float(result) 295 296 def pow(self, float2) -> Float: 297 """Float Power 298 299 Raises float 1 to the power of float 2 300 301 Args: 302 float2: Graph of Float 303 304 305 Returns: 306 Graph: A graph node producing a Float. 307 """ 308 float1_parsed = input_parsers.parse_float_graph(self) 309 float2_parsed = input_parsers.parse_float_graph(float2) 310 result = _internal.float_pow_internal(float1_parsed, float2_parsed) 311 312 return Float(result) 313 314 def round_to_int(self) -> int.Int: 315 """Float Round to Int 316 317 Rounds the float to the nearest int 318 319 Returns: 320 Graph: A graph node producing a Int. 321 """ 322 float_parsed = input_parsers.parse_float_graph(self) 323 result = _internal.float_round_to_int_internal(float_parsed) 324 325 from .int import Int 326 return Int(result) 327 328 def sin(self) -> Float: 329 """Float Sine 330 331 Computes the sine of a float (in radians). 332 333 Returns: 334 Graph: A graph node producing a Float. 335 """ 336 angle_parsed = input_parsers.parse_float_graph(self) 337 result = _internal.float_sin_internal(angle_parsed) 338 339 return Float(result) 340 341 def square_root(self) -> Float: 342 """Float Square Root 343 344 Compares the square root of a number 345 346 Returns: 347 Graph: A graph node producing a Float. 348 """ 349 number_parsed = input_parsers.parse_float_graph(self) 350 result = _internal.float_square_root_internal(number_parsed) 351 352 return Float(result) 353 354 def squared(self) -> Float: 355 """Float Squared 356 357 Raises a float to the power of 2. 358 359 Returns: 360 Graph: A graph node producing a Float. 361 """ 362 number_parsed = input_parsers.parse_float_graph(self) 363 result = _internal.float_squared_internal(number_parsed) 364 365 return Float(result) 366 367 def subtract(self, float2) -> Float: 368 """Float Subtract 369 370 Adds two floats together. 371 372 Args: 373 float2: Graph of Float 374 375 376 Returns: 377 Graph: A graph node producing a Float. 378 """ 379 float1_parsed = input_parsers.parse_float_graph(self) 380 float2_parsed = input_parsers.parse_float_graph(float2) 381 result = _internal.float_subtract_internal(float1_parsed, float2_parsed) 382 383 return Float(result) 384 385 @staticmethod 386 def pi() -> Float: 387 """Pi 388 389 Returns π as a float 390 391 Returns: 392 Graph: A graph node producing a Float. 393 """ 394 result = _internal.pi_internal() 395 396 return Float(result)
A float
30 def abs(self) -> Float: 31 """Absolute Value 32 33 Returns the absolute value of a float 34 35 Returns: 36 Graph: A graph node producing a Float. 37 """ 38 number_parsed = input_parsers.parse_float_graph(self) 39 result = _internal.abs_internal(number_parsed) 40 41 return Float(result)
Absolute Value
Returns the absolute value of a float
Returns: Graph: A graph node producing a Float.
43 def add(self, float2) -> Float: 44 """Float Add 45 46 Adds two floats together. 47 48 Args: 49 float2: Graph of Float 50 51 52 Returns: 53 Graph: A graph node producing a Float. 54 """ 55 float1_parsed = input_parsers.parse_float_graph(self) 56 float2_parsed = input_parsers.parse_float_graph(float2) 57 result = _internal.float_add_internal(float1_parsed, float2_parsed) 58 59 return Float(result)
Float Add
Adds two floats together.
Args: float2: Graph of Float
Returns: Graph: A graph node producing a Float.
61 def cos(self) -> Float: 62 """Float Cosine 63 64 Computes the cosine of a float (in radians). 65 66 Returns: 67 Graph: A graph node producing a Float. 68 """ 69 angle_parsed = input_parsers.parse_float_graph(self) 70 result = _internal.float_cos_internal(angle_parsed) 71 72 return Float(result)
Float Cosine
Computes the cosine of a float (in radians).
Returns: Graph: A graph node producing a Float.
74 def divide(self, float2) -> Float: 75 """Float Divide 76 77 Adds two floats together. 78 79 Args: 80 float2: Graph of Float 81 82 83 Returns: 84 Graph: A graph node producing a Float. 85 """ 86 float1_parsed = input_parsers.parse_float_graph(self) 87 float2_parsed = input_parsers.parse_float_graph(float2) 88 result = _internal.float_divide_internal(float1_parsed, float2_parsed) 89 90 return Float(result)
Float Divide
Adds two floats together.
Args: float2: Graph of Float
Returns: Graph: A graph node producing a Float.
92 def equals(self, float_2) -> bool.Bool: 93 """Float Equals 94 95 Checks if two floats are equal 96 97 Args: 98 float_2: Graph of Float 99 100 101 Returns: 102 Graph: A graph node producing a Bool. 103 """ 104 float_1_parsed = input_parsers.parse_float_graph(self) 105 float_2_parsed = input_parsers.parse_float_graph(float_2) 106 result = _internal.float_equals_internal(float_1_parsed, float_2_parsed) 107 108 from .bool import Bool 109 return Bool(result)
Float Equals
Checks if two floats are equal
Args: float_2: Graph of Float
Returns: Graph: A graph node producing a Bool.
111 def greater_than(self, float_2) -> bool.Bool: 112 """Float Greater Than 113 114 Checks if the first float is greater than the second float 115 116 Args: 117 float_2: Graph of Float 118 119 120 Returns: 121 Graph: A graph node producing a Bool. 122 """ 123 float_1_parsed = input_parsers.parse_float_graph(self) 124 float_2_parsed = input_parsers.parse_float_graph(float_2) 125 result = _internal.float_greater_than_internal(float_1_parsed, float_2_parsed) 126 127 from .bool import Bool 128 return Bool(result)
Float Greater Than
Checks if the first float is greater than the second float
Args: float_2: Graph of Float
Returns: Graph: A graph node producing a Bool.
130 def greater_than_or_equal(self, float_2) -> bool.Bool: 131 """Float Greater Than Or Equal 132 133 Checks if the first float is greater than or equal to the second float 134 135 Args: 136 float_2: Graph of Float 137 138 139 Returns: 140 Graph: A graph node producing a Bool. 141 """ 142 float_1_parsed = input_parsers.parse_float_graph(self) 143 float_2_parsed = input_parsers.parse_float_graph(float_2) 144 result = _internal.float_greater_than_or_equal_internal(float_1_parsed, float_2_parsed) 145 146 from .bool import Bool 147 return Bool(result)
Float Greater Than Or Equal
Checks if the first float is greater than or equal to the second float
Args: float_2: Graph of Float
Returns: Graph: A graph node producing a Bool.
149 @staticmethod 150 def if_(bool, input_1, input_2) -> Float: 151 """Float If 152 153 If the boolean is true returns input 1, otherwise input 2. Type: Float 154 155 Args: 156 bool: Graph of Bool 157 input_1: Graph of Float 158 input_2: Graph of Float 159 160 161 Returns: 162 Graph: A graph node producing a Float. 163 """ 164 bool_parsed = input_parsers.parse_bool_graph(bool) 165 input_1_parsed = input_parsers.parse_float_graph(input_1) 166 input_2_parsed = input_parsers.parse_float_graph(input_2) 167 result = _internal.float_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 168 169 return Float(result)
Float If
If the boolean is true returns input 1, otherwise input 2. Type: Float
Args: bool: Graph of Bool input_1: Graph of Float input_2: Graph of Float
Returns: Graph: A graph node producing a Float.
171 def lerp(self, float1, float2) -> Float: 172 """Float Lerp 173 174 Lerps between two floats using the x parameter 175 176 Args: 177 float1: Graph of Float 178 float2: Graph of Float 179 180 181 Returns: 182 Graph: A graph node producing a Float. 183 """ 184 x_parsed = input_parsers.parse_float_graph(self) 185 float1_parsed = input_parsers.parse_float_graph(float1) 186 float2_parsed = input_parsers.parse_float_graph(float2) 187 result = _internal.float_lerp_internal(x_parsed, float1_parsed, float2_parsed) 188 189 return Float(result)
Float Lerp
Lerps between two floats using the x parameter
Args: float1: Graph of Float float2: Graph of Float
Returns: Graph: A graph node producing a Float.
191 def less_than(self, float_2) -> bool.Bool: 192 """Float Less Than 193 194 Checks if the first float is less than the second float 195 196 Args: 197 float_2: Graph of Float 198 199 200 Returns: 201 Graph: A graph node producing a Bool. 202 """ 203 float_1_parsed = input_parsers.parse_float_graph(self) 204 float_2_parsed = input_parsers.parse_float_graph(float_2) 205 result = _internal.float_less_than_internal(float_1_parsed, float_2_parsed) 206 207 from .bool import Bool 208 return Bool(result)
Float Less Than
Checks if the first float is less than the second float
Args: float_2: Graph of Float
Returns: Graph: A graph node producing a Bool.
210 def less_than_or_equal(self, float_2) -> bool.Bool: 211 """Float Less Than Or Equal 212 213 Checks if the first float is less than or equal to the second float 214 215 Args: 216 float_2: Graph of Float 217 218 219 Returns: 220 Graph: A graph node producing a Bool. 221 """ 222 float_1_parsed = input_parsers.parse_float_graph(self) 223 float_2_parsed = input_parsers.parse_float_graph(float_2) 224 result = _internal.float_less_than_or_equal_internal(float_1_parsed, float_2_parsed) 225 226 from .bool import Bool 227 return Bool(result)
Float Less Than Or Equal
Checks if the first float is less than or equal to the second float
Args: float_2: Graph of Float
Returns: Graph: A graph node producing a Bool.
229 def max(self, float2) -> Float: 230 """Float Max 231 232 Returns the maximum float. 233 234 Args: 235 float2: Graph of Float 236 237 238 Returns: 239 Graph: A graph node producing a Float. 240 """ 241 float1_parsed = input_parsers.parse_float_graph(self) 242 float2_parsed = input_parsers.parse_float_graph(float2) 243 result = _internal.float_max_internal(float1_parsed, float2_parsed) 244 245 return Float(result)
Float Max
Returns the maximum float.
Args: float2: Graph of Float
Returns: Graph: A graph node producing a Float.
247 def min(self, float2) -> Float: 248 """Float Min 249 250 Returns the minimum float. 251 252 Args: 253 float2: Graph of Float 254 255 256 Returns: 257 Graph: A graph node producing a Float. 258 """ 259 float1_parsed = input_parsers.parse_float_graph(self) 260 float2_parsed = input_parsers.parse_float_graph(float2) 261 result = _internal.float_min_internal(float1_parsed, float2_parsed) 262 263 return Float(result)
Float Min
Returns the minimum float.
Args: float2: Graph of Float
Returns: Graph: A graph node producing a Float.
265 def multiply(self, float2) -> Float: 266 """Float Multiply 267 268 Multiplies two floats together. 269 270 Args: 271 float2: Graph of Float 272 273 274 Returns: 275 Graph: A graph node producing a Float. 276 """ 277 float1_parsed = input_parsers.parse_float_graph(self) 278 float2_parsed = input_parsers.parse_float_graph(float2) 279 result = _internal.float_multiply_internal(float1_parsed, float2_parsed) 280 281 return Float(result)
Float Multiply
Multiplies two floats together.
Args: float2: Graph of Float
Returns: Graph: A graph node producing a Float.
283 def passthrough(self) -> Float: 284 """Float Passthrough 285 286 Responds with the value provided. Doing nothing to it. 287 288 Returns: 289 Graph: A graph node producing a Float. 290 """ 291 value_parsed = input_parsers.parse_float_graph(self) 292 result = _internal.float_passthrough_internal(value_parsed) 293 294 return Float(result)
Float Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a Float.
296 def pow(self, float2) -> Float: 297 """Float Power 298 299 Raises float 1 to the power of float 2 300 301 Args: 302 float2: Graph of Float 303 304 305 Returns: 306 Graph: A graph node producing a Float. 307 """ 308 float1_parsed = input_parsers.parse_float_graph(self) 309 float2_parsed = input_parsers.parse_float_graph(float2) 310 result = _internal.float_pow_internal(float1_parsed, float2_parsed) 311 312 return Float(result)
Float Power
Raises float 1 to the power of float 2
Args: float2: Graph of Float
Returns: Graph: A graph node producing a Float.
314 def round_to_int(self) -> int.Int: 315 """Float Round to Int 316 317 Rounds the float to the nearest int 318 319 Returns: 320 Graph: A graph node producing a Int. 321 """ 322 float_parsed = input_parsers.parse_float_graph(self) 323 result = _internal.float_round_to_int_internal(float_parsed) 324 325 from .int import Int 326 return Int(result)
Float Round to Int
Rounds the float to the nearest int
Returns: Graph: A graph node producing a Int.
328 def sin(self) -> Float: 329 """Float Sine 330 331 Computes the sine of a float (in radians). 332 333 Returns: 334 Graph: A graph node producing a Float. 335 """ 336 angle_parsed = input_parsers.parse_float_graph(self) 337 result = _internal.float_sin_internal(angle_parsed) 338 339 return Float(result)
Float Sine
Computes the sine of a float (in radians).
Returns: Graph: A graph node producing a Float.
341 def square_root(self) -> Float: 342 """Float Square Root 343 344 Compares the square root of a number 345 346 Returns: 347 Graph: A graph node producing a Float. 348 """ 349 number_parsed = input_parsers.parse_float_graph(self) 350 result = _internal.float_square_root_internal(number_parsed) 351 352 return Float(result)
Float Square Root
Compares the square root of a number
Returns: Graph: A graph node producing a Float.
354 def squared(self) -> Float: 355 """Float Squared 356 357 Raises a float to the power of 2. 358 359 Returns: 360 Graph: A graph node producing a Float. 361 """ 362 number_parsed = input_parsers.parse_float_graph(self) 363 result = _internal.float_squared_internal(number_parsed) 364 365 return Float(result)
Float Squared
Raises a float to the power of 2.
Returns: Graph: A graph node producing a Float.
367 def subtract(self, float2) -> Float: 368 """Float Subtract 369 370 Adds two floats together. 371 372 Args: 373 float2: Graph of Float 374 375 376 Returns: 377 Graph: A graph node producing a Float. 378 """ 379 float1_parsed = input_parsers.parse_float_graph(self) 380 float2_parsed = input_parsers.parse_float_graph(float2) 381 result = _internal.float_subtract_internal(float1_parsed, float2_parsed) 382 383 return Float(result)
Float Subtract
Adds two floats together.
Args: float2: Graph of Float
Returns: Graph: A graph node producing a Float.
15class FloatList(_GraphWrapper): 16 """List of Floats""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context).as_float_list()
List of Floats
20class Image(_GraphWrapper): 21 """An Image""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 @staticmethod 29 def from_byte_list(bytes) -> Image: 30 """Image from Bytes 31 32 Given some bytes, parses an image 33 34 Args: 35 bytes: Graph of ByteList 36 37 38 Returns: 39 Graph: A graph node producing a Image. 40 """ 41 bytes_parsed = input_parsers.parse_graph(bytes) 42 result = _internal.image_from_byte_list_internal(bytes_parsed) 43 44 return Image(result) 45 46 def to_byte_list(self) -> byte_list.ByteList: 47 """Image to Byte List 48 49 Given an image, converts it to a byte list 50 51 Returns: 52 Graph: A graph node producing a ByteList. 53 """ 54 image_parsed = input_parsers.parse_graph(self) 55 result = _internal.image_to_byte_list_internal(image_parsed) 56 57 from .byte_list import ByteList 58 return ByteList(result)
An Image
28 @staticmethod 29 def from_byte_list(bytes) -> Image: 30 """Image from Bytes 31 32 Given some bytes, parses an image 33 34 Args: 35 bytes: Graph of ByteList 36 37 38 Returns: 39 Graph: A graph node producing a Image. 40 """ 41 bytes_parsed = input_parsers.parse_graph(bytes) 42 result = _internal.image_from_byte_list_internal(bytes_parsed) 43 44 return Image(result)
Image from Bytes
Given some bytes, parses an image
Args: bytes: Graph of ByteList
Returns: Graph: A graph node producing a Image.
46 def to_byte_list(self) -> byte_list.ByteList: 47 """Image to Byte List 48 49 Given an image, converts it to a byte list 50 51 Returns: 52 Graph: A graph node producing a ByteList. 53 """ 54 image_parsed = input_parsers.parse_graph(self) 55 result = _internal.image_to_byte_list_internal(image_parsed) 56 57 from .byte_list import ByteList 58 return ByteList(result)
Image to Byte List
Given an image, converts it to a byte list
Returns: Graph: A graph node producing a ByteList.
24class Int(_GraphWrapper): 25 """An integer""" 26 27 def execute(self, context): 28 29 return self._inner.execute(context).as_int() 30 31 32 def abs(self) -> Int: 33 """Int Absolute Value 34 35 Returns the absolute value of an int 36 37 Returns: 38 Graph: A graph node producing a Int. 39 """ 40 number_parsed = input_parsers.parse_int_graph(self) 41 result = _internal.int_abs_internal(number_parsed) 42 43 return Int(result) 44 45 def add(self, int_2) -> Int: 46 """Int Add 47 48 Adds to ints together 49 50 Args: 51 int_2: Graph of Int 52 53 54 Returns: 55 Graph: A graph node producing a Int. 56 """ 57 int_1_parsed = input_parsers.parse_int_graph(self) 58 int_2_parsed = input_parsers.parse_int_graph(int_2) 59 result = _internal.int_add_internal(int_1_parsed, int_2_parsed) 60 61 return Int(result) 62 63 def equals(self, int_2) -> bool.Bool: 64 """Int Equals 65 66 Checks if two ints are equal 67 68 Args: 69 int_2: Graph of Int 70 71 72 Returns: 73 Graph: A graph node producing a Bool. 74 """ 75 int_1_parsed = input_parsers.parse_int_graph(self) 76 int_2_parsed = input_parsers.parse_int_graph(int_2) 77 result = _internal.int_equals_internal(int_1_parsed, int_2_parsed) 78 79 from .bool import Bool 80 return Bool(result) 81 82 def greater_than(self, int_2) -> bool.Bool: 83 """Int Greater Than 84 85 Checks if the first int is greater than the second int 86 87 Args: 88 int_2: Graph of Int 89 90 91 Returns: 92 Graph: A graph node producing a Bool. 93 """ 94 int_1_parsed = input_parsers.parse_int_graph(self) 95 int_2_parsed = input_parsers.parse_int_graph(int_2) 96 result = _internal.int_greater_than_internal(int_1_parsed, int_2_parsed) 97 98 from .bool import Bool 99 return Bool(result) 100 101 def greater_than_or_equal(self, int_2) -> bool.Bool: 102 """Int Greater Than Or Equal 103 104 Checks if the first int is greater than or equal to the second int 105 106 Args: 107 int_2: Graph of Int 108 109 110 Returns: 111 Graph: A graph node producing a Bool. 112 """ 113 int_1_parsed = input_parsers.parse_int_graph(self) 114 int_2_parsed = input_parsers.parse_int_graph(int_2) 115 result = _internal.int_greater_than_or_equal_internal(int_1_parsed, int_2_parsed) 116 117 from .bool import Bool 118 return Bool(result) 119 120 @staticmethod 121 def if_(bool, input_1, input_2) -> Int: 122 """Int If 123 124 If the boolean is true returns input 1, otherwise input 2. Type: Int 125 126 Args: 127 bool: Graph of Bool 128 input_1: Graph of Int 129 input_2: Graph of Int 130 131 132 Returns: 133 Graph: A graph node producing a Int. 134 """ 135 bool_parsed = input_parsers.parse_bool_graph(bool) 136 input_1_parsed = input_parsers.parse_int_graph(input_1) 137 input_2_parsed = input_parsers.parse_int_graph(input_2) 138 result = _internal.int_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 139 140 return Int(result) 141 142 def less_than(self, int_2) -> bool.Bool: 143 """Int Less Than 144 145 Checks if the first int is less than the second int 146 147 Args: 148 int_2: Graph of Int 149 150 151 Returns: 152 Graph: A graph node producing a Bool. 153 """ 154 int_1_parsed = input_parsers.parse_int_graph(self) 155 int_2_parsed = input_parsers.parse_int_graph(int_2) 156 result = _internal.int_less_than_internal(int_1_parsed, int_2_parsed) 157 158 from .bool import Bool 159 return Bool(result) 160 161 def less_than_or_equal(self, int_2) -> bool.Bool: 162 """Int Less Than Or Equal 163 164 Checks if the first int is less than or equal to the second int 165 166 Args: 167 int_2: Graph of Int 168 169 170 Returns: 171 Graph: A graph node producing a Bool. 172 """ 173 int_1_parsed = input_parsers.parse_int_graph(self) 174 int_2_parsed = input_parsers.parse_int_graph(int_2) 175 result = _internal.int_less_than_or_equal_internal(int_1_parsed, int_2_parsed) 176 177 from .bool import Bool 178 return Bool(result) 179 180 def max(self, int2) -> Int: 181 """Int Max 182 183 Returns the maximum int. 184 185 Args: 186 int2: Graph of Int 187 188 189 Returns: 190 Graph: A graph node producing a Int. 191 """ 192 int1_parsed = input_parsers.parse_int_graph(self) 193 int2_parsed = input_parsers.parse_int_graph(int2) 194 result = _internal.int_max_internal(int1_parsed, int2_parsed) 195 196 return Int(result) 197 198 def min(self, int2) -> Int: 199 """Int Min 200 201 Returns the minimum int. 202 203 Args: 204 int2: Graph of Int 205 206 207 Returns: 208 Graph: A graph node producing a Int. 209 """ 210 int1_parsed = input_parsers.parse_int_graph(self) 211 int2_parsed = input_parsers.parse_int_graph(int2) 212 result = _internal.int_min_internal(int1_parsed, int2_parsed) 213 214 return Int(result) 215 216 def multiply(self, int_2) -> Int: 217 """Int Multiply 218 219 Multiplies two integers together 220 221 Args: 222 int_2: Graph of Int 223 224 225 Returns: 226 Graph: A graph node producing a Int. 227 """ 228 int_1_parsed = input_parsers.parse_int_graph(self) 229 int_2_parsed = input_parsers.parse_int_graph(int_2) 230 result = _internal.int_multiply_internal(int_1_parsed, int_2_parsed) 231 232 return Int(result) 233 234 def passthrough(self) -> Int: 235 """Int Passthrough 236 237 Responds with the value provided. Doing nothing to it. 238 239 Returns: 240 Graph: A graph node producing a Int. 241 """ 242 value_parsed = input_parsers.parse_int_graph(self) 243 result = _internal.int_passthrough_internal(value_parsed) 244 245 return Int(result) 246 247 def subtract(self, int_2) -> Int: 248 """Int Subtract 249 250 Subtracts one int from another 251 252 Args: 253 int_2: Graph of Int 254 255 256 Returns: 257 Graph: A graph node producing a Int. 258 """ 259 int_1_parsed = input_parsers.parse_int_graph(self) 260 int_2_parsed = input_parsers.parse_int_graph(int_2) 261 result = _internal.int_subtract_internal(int_1_parsed, int_2_parsed) 262 263 return Int(result) 264 265 def to_float(self) -> float.Float: 266 """Int To Float 267 268 Converts an Int to a Float 269 270 Returns: 271 Graph: A graph node producing a Float. 272 """ 273 int_parsed = input_parsers.parse_int_graph(self) 274 result = _internal.int_to_float_internal(int_parsed) 275 276 from .float import Float 277 return Float(result) 278 279 def monet_network_download_url_from_asset_id(self) -> string.String: 280 """Monet Network Download URL from Asset ID 281 282 Creates a Download URL from asset ID in the Monet Network 283 284 Returns: 285 Graph: A graph node producing a String. 286 """ 287 asset_id_parsed = input_parsers.parse_int_graph(self) 288 result = _internal.monet_network_download_u_r_l_from_asset_i_d_internal(asset_id_parsed) 289 290 from .string import String 291 return String(result)
An integer
32 def abs(self) -> Int: 33 """Int Absolute Value 34 35 Returns the absolute value of an int 36 37 Returns: 38 Graph: A graph node producing a Int. 39 """ 40 number_parsed = input_parsers.parse_int_graph(self) 41 result = _internal.int_abs_internal(number_parsed) 42 43 return Int(result)
Int Absolute Value
Returns the absolute value of an int
Returns: Graph: A graph node producing a Int.
45 def add(self, int_2) -> Int: 46 """Int Add 47 48 Adds to ints together 49 50 Args: 51 int_2: Graph of Int 52 53 54 Returns: 55 Graph: A graph node producing a Int. 56 """ 57 int_1_parsed = input_parsers.parse_int_graph(self) 58 int_2_parsed = input_parsers.parse_int_graph(int_2) 59 result = _internal.int_add_internal(int_1_parsed, int_2_parsed) 60 61 return Int(result)
Int Add
Adds to ints together
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Int.
63 def equals(self, int_2) -> bool.Bool: 64 """Int Equals 65 66 Checks if two ints are equal 67 68 Args: 69 int_2: Graph of Int 70 71 72 Returns: 73 Graph: A graph node producing a Bool. 74 """ 75 int_1_parsed = input_parsers.parse_int_graph(self) 76 int_2_parsed = input_parsers.parse_int_graph(int_2) 77 result = _internal.int_equals_internal(int_1_parsed, int_2_parsed) 78 79 from .bool import Bool 80 return Bool(result)
Int Equals
Checks if two ints are equal
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Bool.
82 def greater_than(self, int_2) -> bool.Bool: 83 """Int Greater Than 84 85 Checks if the first int is greater than the second int 86 87 Args: 88 int_2: Graph of Int 89 90 91 Returns: 92 Graph: A graph node producing a Bool. 93 """ 94 int_1_parsed = input_parsers.parse_int_graph(self) 95 int_2_parsed = input_parsers.parse_int_graph(int_2) 96 result = _internal.int_greater_than_internal(int_1_parsed, int_2_parsed) 97 98 from .bool import Bool 99 return Bool(result)
Int Greater Than
Checks if the first int is greater than the second int
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Bool.
101 def greater_than_or_equal(self, int_2) -> bool.Bool: 102 """Int Greater Than Or Equal 103 104 Checks if the first int is greater than or equal to the second int 105 106 Args: 107 int_2: Graph of Int 108 109 110 Returns: 111 Graph: A graph node producing a Bool. 112 """ 113 int_1_parsed = input_parsers.parse_int_graph(self) 114 int_2_parsed = input_parsers.parse_int_graph(int_2) 115 result = _internal.int_greater_than_or_equal_internal(int_1_parsed, int_2_parsed) 116 117 from .bool import Bool 118 return Bool(result)
Int Greater Than Or Equal
Checks if the first int is greater than or equal to the second int
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Bool.
120 @staticmethod 121 def if_(bool, input_1, input_2) -> Int: 122 """Int If 123 124 If the boolean is true returns input 1, otherwise input 2. Type: Int 125 126 Args: 127 bool: Graph of Bool 128 input_1: Graph of Int 129 input_2: Graph of Int 130 131 132 Returns: 133 Graph: A graph node producing a Int. 134 """ 135 bool_parsed = input_parsers.parse_bool_graph(bool) 136 input_1_parsed = input_parsers.parse_int_graph(input_1) 137 input_2_parsed = input_parsers.parse_int_graph(input_2) 138 result = _internal.int_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 139 140 return Int(result)
Int If
If the boolean is true returns input 1, otherwise input 2. Type: Int
Args: bool: Graph of Bool input_1: Graph of Int input_2: Graph of Int
Returns: Graph: A graph node producing a Int.
142 def less_than(self, int_2) -> bool.Bool: 143 """Int Less Than 144 145 Checks if the first int is less than the second int 146 147 Args: 148 int_2: Graph of Int 149 150 151 Returns: 152 Graph: A graph node producing a Bool. 153 """ 154 int_1_parsed = input_parsers.parse_int_graph(self) 155 int_2_parsed = input_parsers.parse_int_graph(int_2) 156 result = _internal.int_less_than_internal(int_1_parsed, int_2_parsed) 157 158 from .bool import Bool 159 return Bool(result)
Int Less Than
Checks if the first int is less than the second int
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Bool.
161 def less_than_or_equal(self, int_2) -> bool.Bool: 162 """Int Less Than Or Equal 163 164 Checks if the first int is less than or equal to the second int 165 166 Args: 167 int_2: Graph of Int 168 169 170 Returns: 171 Graph: A graph node producing a Bool. 172 """ 173 int_1_parsed = input_parsers.parse_int_graph(self) 174 int_2_parsed = input_parsers.parse_int_graph(int_2) 175 result = _internal.int_less_than_or_equal_internal(int_1_parsed, int_2_parsed) 176 177 from .bool import Bool 178 return Bool(result)
Int Less Than Or Equal
Checks if the first int is less than or equal to the second int
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Bool.
180 def max(self, int2) -> Int: 181 """Int Max 182 183 Returns the maximum int. 184 185 Args: 186 int2: Graph of Int 187 188 189 Returns: 190 Graph: A graph node producing a Int. 191 """ 192 int1_parsed = input_parsers.parse_int_graph(self) 193 int2_parsed = input_parsers.parse_int_graph(int2) 194 result = _internal.int_max_internal(int1_parsed, int2_parsed) 195 196 return Int(result)
Int Max
Returns the maximum int.
Args: int2: Graph of Int
Returns: Graph: A graph node producing a Int.
198 def min(self, int2) -> Int: 199 """Int Min 200 201 Returns the minimum int. 202 203 Args: 204 int2: Graph of Int 205 206 207 Returns: 208 Graph: A graph node producing a Int. 209 """ 210 int1_parsed = input_parsers.parse_int_graph(self) 211 int2_parsed = input_parsers.parse_int_graph(int2) 212 result = _internal.int_min_internal(int1_parsed, int2_parsed) 213 214 return Int(result)
Int Min
Returns the minimum int.
Args: int2: Graph of Int
Returns: Graph: A graph node producing a Int.
216 def multiply(self, int_2) -> Int: 217 """Int Multiply 218 219 Multiplies two integers together 220 221 Args: 222 int_2: Graph of Int 223 224 225 Returns: 226 Graph: A graph node producing a Int. 227 """ 228 int_1_parsed = input_parsers.parse_int_graph(self) 229 int_2_parsed = input_parsers.parse_int_graph(int_2) 230 result = _internal.int_multiply_internal(int_1_parsed, int_2_parsed) 231 232 return Int(result)
Int Multiply
Multiplies two integers together
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Int.
234 def passthrough(self) -> Int: 235 """Int Passthrough 236 237 Responds with the value provided. Doing nothing to it. 238 239 Returns: 240 Graph: A graph node producing a Int. 241 """ 242 value_parsed = input_parsers.parse_int_graph(self) 243 result = _internal.int_passthrough_internal(value_parsed) 244 245 return Int(result)
Int Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a Int.
247 def subtract(self, int_2) -> Int: 248 """Int Subtract 249 250 Subtracts one int from another 251 252 Args: 253 int_2: Graph of Int 254 255 256 Returns: 257 Graph: A graph node producing a Int. 258 """ 259 int_1_parsed = input_parsers.parse_int_graph(self) 260 int_2_parsed = input_parsers.parse_int_graph(int_2) 261 result = _internal.int_subtract_internal(int_1_parsed, int_2_parsed) 262 263 return Int(result)
Int Subtract
Subtracts one int from another
Args: int_2: Graph of Int
Returns: Graph: A graph node producing a Int.
265 def to_float(self) -> float.Float: 266 """Int To Float 267 268 Converts an Int to a Float 269 270 Returns: 271 Graph: A graph node producing a Float. 272 """ 273 int_parsed = input_parsers.parse_int_graph(self) 274 result = _internal.int_to_float_internal(int_parsed) 275 276 from .float import Float 277 return Float(result)
Int To Float
Converts an Int to a Float
Returns: Graph: A graph node producing a Float.
279 def monet_network_download_url_from_asset_id(self) -> string.String: 280 """Monet Network Download URL from Asset ID 281 282 Creates a Download URL from asset ID in the Monet Network 283 284 Returns: 285 Graph: A graph node producing a String. 286 """ 287 asset_id_parsed = input_parsers.parse_int_graph(self) 288 result = _internal.monet_network_download_u_r_l_from_asset_i_d_internal(asset_id_parsed) 289 290 from .string import String 291 return String(result)
Monet Network Download URL from Asset ID
Creates a Download URL from asset ID in the Monet Network
Returns: Graph: A graph node producing a String.
20class IntList(_GraphWrapper): 21 """List of Ints""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context).as_int_list() 26 27 28 def first(self) -> int.Int: 29 """Int List First 30 31 First Item of Int List 32 33 Returns: 34 Graph: A graph node producing a Int. 35 """ 36 list_parsed = input_parsers.parse_graph(self) 37 result = _internal.int_list_first_internal(list_parsed) 38 39 from .int import Int 40 return Int(result)
List of Ints
28 def first(self) -> int.Int: 29 """Int List First 30 31 First Item of Int List 32 33 Returns: 34 Graph: A graph node producing a Int. 35 """ 36 list_parsed = input_parsers.parse_graph(self) 37 result = _internal.int_list_first_internal(list_parsed) 38 39 from .int import Int 40 return Int(result)
Int List First
First Item of Int List
Returns: Graph: A graph node producing a Int.
15class Null(_GraphWrapper): 16 """An unconnected input""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
An unconnected input
15class OkLabA(_GraphWrapper): 16 """An OkLab color with an alpha component.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context).as_ok_lab_a()
An OkLab color with an alpha component.
15class OkLabColor(_GraphWrapper): 16 """A color in the OkLab color space, which is designed to be perceptually uniform. L represents lightness. Negative "a" for green. Positive "a" for red. Negative "b" for blue. Positive "b" for yellow.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def from_components(l, a, b) -> OkLabColor: 25 """OkLab Color from Components 26 27 Given the L, a and b creates the color 28 29 Args: 30 l: Graph of Float 31 a: Graph of Float 32 b: Graph of Float 33 34 35 Returns: 36 Graph: A graph node producing a OkLabColor. 37 """ 38 l_parsed = input_parsers.parse_float_graph(l) 39 a_parsed = input_parsers.parse_float_graph(a) 40 b_parsed = input_parsers.parse_float_graph(b) 41 result = _internal.ok_lab_color_from_components_internal(l_parsed, a_parsed, b_parsed) 42 43 return OkLabColor(result)
A color in the OkLab color space, which is designed to be perceptually uniform. L represents lightness. Negative "a" for green. Positive "a" for red. Negative "b" for blue. Positive "b" for yellow.
23 @staticmethod 24 def from_components(l, a, b) -> OkLabColor: 25 """OkLab Color from Components 26 27 Given the L, a and b creates the color 28 29 Args: 30 l: Graph of Float 31 a: Graph of Float 32 b: Graph of Float 33 34 35 Returns: 36 Graph: A graph node producing a OkLabColor. 37 """ 38 l_parsed = input_parsers.parse_float_graph(l) 39 a_parsed = input_parsers.parse_float_graph(a) 40 b_parsed = input_parsers.parse_float_graph(b) 41 result = _internal.ok_lab_color_from_components_internal(l_parsed, a_parsed, b_parsed) 42 43 return OkLabColor(result)
OkLab Color from Components
Given the L, a and b creates the color
Args: l: Graph of Float a: Graph of Float b: Graph of Float
Returns: Graph: A graph node producing a OkLabColor.
20class OkLabHist(_GraphWrapper): 21 """A histogram in various dimensions over the OkLab color space.""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 def lightness_percentile(self, quantile) -> float.Float: 29 """OkLab Histogram Lightness Quantile 30 31 Given an OkLab histogram and a quantile, returns the lightness value that corresponds to the quantile. 32 33 Args: 34 quantile: Graph of Float 35 36 37 Returns: 38 Graph: A graph node producing a Float. 39 """ 40 hist_parsed = input_parsers.parse_graph(self) 41 quantile_parsed = input_parsers.parse_float_graph(quantile) 42 result = _internal.ok_lab_hist_lightness_quantile_internal(hist_parsed, quantile_parsed) 43 44 from .float import Float 45 return Float(result)
A histogram in various dimensions over the OkLab color space.
28 def lightness_percentile(self, quantile) -> float.Float: 29 """OkLab Histogram Lightness Quantile 30 31 Given an OkLab histogram and a quantile, returns the lightness value that corresponds to the quantile. 32 33 Args: 34 quantile: Graph of Float 35 36 37 Returns: 38 Graph: A graph node producing a Float. 39 """ 40 hist_parsed = input_parsers.parse_graph(self) 41 quantile_parsed = input_parsers.parse_float_graph(quantile) 42 result = _internal.ok_lab_hist_lightness_quantile_internal(hist_parsed, quantile_parsed) 43 44 from .float import Float 45 return Float(result)
OkLab Histogram Lightness Quantile
Given an OkLab histogram and a quantile, returns the lightness value that corresponds to the quantile.
Args: quantile: Graph of Float
Returns: Graph: A graph node producing a Float.
15class Painter(_GraphWrapper): 16 """Can draw in 2D. Using paths, brushes, fills and transforms to create your artwork.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 def add_ellipse_with_render_style(self, center, dimensions, rotation, render_style, instances) -> Painter: 24 """Painter Add Ellipse with Render Style 25 26 Adds an ellipse to the painter and draws it with the render style. Set some transforms on the ellipse as well. 27 28 Args: 29 center: Graph of Point2f 30 dimensions: Graph of Vector2f 31 rotation: Graph of Float 32 render_style: Graph of RenderStyle 33 instances: Graph of Transform2List 34 35 36 Returns: 37 Graph: A graph node producing a Painter. 38 """ 39 painter_parsed = input_parsers.parse_graph(self) 40 center_parsed = input_parsers.parse_graph(center) 41 dimensions_parsed = input_parsers.parse_graph(dimensions) 42 rotation_parsed = input_parsers.parse_float_graph(rotation) 43 render_style_parsed = input_parsers.parse_graph(render_style) 44 instances_parsed = input_parsers.parse_graph(instances) 45 result = _internal.painter_add_ellipse_with_render_style_internal(painter_parsed, center_parsed, dimensions_parsed, rotation_parsed, render_style_parsed, instances_parsed) 46 47 return Painter(result) 48 49 def add_path_with_render_style(self, path, render_style, instances) -> Painter: 50 """Painter Add Path with Render Style 51 52 Adds a path to the painter and draws it with the render style. Set some transforms on the path as well. 53 54 Args: 55 path: Graph of Path 56 render_style: Graph of RenderStyle 57 instances: Graph of Transform2List 58 59 60 Returns: 61 Graph: A graph node producing a Painter. 62 """ 63 painter_parsed = input_parsers.parse_graph(self) 64 path_parsed = input_parsers.parse_graph(path) 65 render_style_parsed = input_parsers.parse_graph(render_style) 66 instances_parsed = input_parsers.parse_graph(instances) 67 result = _internal.painter_add_path_with_render_style_internal(painter_parsed, path_parsed, render_style_parsed, instances_parsed) 68 69 return Painter(result) 70 71 def add_rectangle_with_render_style(self, center, dimensions, rotation, render_style, instances) -> Painter: 72 """Painter Add Rectangle with Render Style 73 74 Adds a rectangle to the painter and draws it with the render style. Set some transforms on the rectangle as well. 75 76 Args: 77 center: Graph of Point2f 78 dimensions: Graph of Vector2f 79 rotation: Graph of Float 80 render_style: Graph of RenderStyle 81 instances: Graph of Transform2List 82 83 84 Returns: 85 Graph: A graph node producing a Painter. 86 """ 87 painter_parsed = input_parsers.parse_graph(self) 88 center_parsed = input_parsers.parse_graph(center) 89 dimensions_parsed = input_parsers.parse_graph(dimensions) 90 rotation_parsed = input_parsers.parse_float_graph(rotation) 91 render_style_parsed = input_parsers.parse_graph(render_style) 92 instances_parsed = input_parsers.parse_graph(instances) 93 result = _internal.painter_add_rectangle_with_render_style_internal(painter_parsed, center_parsed, dimensions_parsed, rotation_parsed, render_style_parsed, instances_parsed) 94 95 return Painter(result) 96 97 @staticmethod 98 def new() -> Painter: 99 """Painter New 100 101 Creates a new painter. 102 103 Returns: 104 Graph: A graph node producing a Painter. 105 """ 106 result = _internal.painter_new_internal() 107 108 return Painter(result)
Can draw in 2D. Using paths, brushes, fills and transforms to create your artwork.
23 def add_ellipse_with_render_style(self, center, dimensions, rotation, render_style, instances) -> Painter: 24 """Painter Add Ellipse with Render Style 25 26 Adds an ellipse to the painter and draws it with the render style. Set some transforms on the ellipse as well. 27 28 Args: 29 center: Graph of Point2f 30 dimensions: Graph of Vector2f 31 rotation: Graph of Float 32 render_style: Graph of RenderStyle 33 instances: Graph of Transform2List 34 35 36 Returns: 37 Graph: A graph node producing a Painter. 38 """ 39 painter_parsed = input_parsers.parse_graph(self) 40 center_parsed = input_parsers.parse_graph(center) 41 dimensions_parsed = input_parsers.parse_graph(dimensions) 42 rotation_parsed = input_parsers.parse_float_graph(rotation) 43 render_style_parsed = input_parsers.parse_graph(render_style) 44 instances_parsed = input_parsers.parse_graph(instances) 45 result = _internal.painter_add_ellipse_with_render_style_internal(painter_parsed, center_parsed, dimensions_parsed, rotation_parsed, render_style_parsed, instances_parsed) 46 47 return Painter(result)
Painter Add Ellipse with Render Style
Adds an ellipse to the painter and draws it with the render style. Set some transforms on the ellipse as well.
Args: center: Graph of Point2f dimensions: Graph of Vector2f rotation: Graph of Float render_style: Graph of RenderStyle instances: Graph of Transform2List
Returns: Graph: A graph node producing a Painter.
49 def add_path_with_render_style(self, path, render_style, instances) -> Painter: 50 """Painter Add Path with Render Style 51 52 Adds a path to the painter and draws it with the render style. Set some transforms on the path as well. 53 54 Args: 55 path: Graph of Path 56 render_style: Graph of RenderStyle 57 instances: Graph of Transform2List 58 59 60 Returns: 61 Graph: A graph node producing a Painter. 62 """ 63 painter_parsed = input_parsers.parse_graph(self) 64 path_parsed = input_parsers.parse_graph(path) 65 render_style_parsed = input_parsers.parse_graph(render_style) 66 instances_parsed = input_parsers.parse_graph(instances) 67 result = _internal.painter_add_path_with_render_style_internal(painter_parsed, path_parsed, render_style_parsed, instances_parsed) 68 69 return Painter(result)
Painter Add Path with Render Style
Adds a path to the painter and draws it with the render style. Set some transforms on the path as well.
Args: path: Graph of Path render_style: Graph of RenderStyle instances: Graph of Transform2List
Returns: Graph: A graph node producing a Painter.
71 def add_rectangle_with_render_style(self, center, dimensions, rotation, render_style, instances) -> Painter: 72 """Painter Add Rectangle with Render Style 73 74 Adds a rectangle to the painter and draws it with the render style. Set some transforms on the rectangle as well. 75 76 Args: 77 center: Graph of Point2f 78 dimensions: Graph of Vector2f 79 rotation: Graph of Float 80 render_style: Graph of RenderStyle 81 instances: Graph of Transform2List 82 83 84 Returns: 85 Graph: A graph node producing a Painter. 86 """ 87 painter_parsed = input_parsers.parse_graph(self) 88 center_parsed = input_parsers.parse_graph(center) 89 dimensions_parsed = input_parsers.parse_graph(dimensions) 90 rotation_parsed = input_parsers.parse_float_graph(rotation) 91 render_style_parsed = input_parsers.parse_graph(render_style) 92 instances_parsed = input_parsers.parse_graph(instances) 93 result = _internal.painter_add_rectangle_with_render_style_internal(painter_parsed, center_parsed, dimensions_parsed, rotation_parsed, render_style_parsed, instances_parsed) 94 95 return Painter(result)
Painter Add Rectangle with Render Style
Adds a rectangle to the painter and draws it with the render style. Set some transforms on the rectangle as well.
Args: center: Graph of Point2f dimensions: Graph of Vector2f rotation: Graph of Float render_style: Graph of RenderStyle instances: Graph of Transform2List
Returns: Graph: A graph node producing a Painter.
97 @staticmethod 98 def new() -> Painter: 99 """Painter New 100 101 Creates a new painter. 102 103 Returns: 104 Graph: A graph node producing a Painter. 105 """ 106 result = _internal.painter_new_internal() 107 108 return Painter(result)
Painter New
Creates a new painter.
Returns: Graph: A graph node producing a Painter.
15class Path(_GraphWrapper): 16 """A 2D path that can be used to be rendered.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 def cardinal_cubic_to_point(self, point, tension) -> Path: 24 """Path Cardinal Cubic to Point 25 26 Moves the path from it's current point to another with a Cardinal Cubic spline. 27 28 Args: 29 point: Graph of Point2f 30 tension: Graph of Float 31 32 33 Returns: 34 Graph: A graph node producing a Path. 35 """ 36 path_parsed = input_parsers.parse_graph(self) 37 point_parsed = input_parsers.parse_graph(point) 38 tension_parsed = input_parsers.parse_float_graph(tension) 39 result = _internal.path_cardinal_cubic_to_point_internal(path_parsed, point_parsed, tension_parsed) 40 41 return Path(result) 42 43 def catmull_rom_to_point(self, point) -> Path: 44 """Path Catmull-Rom to Point 45 46 Moves the path from it's current point to another with a Catmull-Rom spline. 47 48 Args: 49 point: Graph of Point2f 50 51 52 Returns: 53 Graph: A graph node producing a Path. 54 """ 55 path_parsed = input_parsers.parse_graph(self) 56 point_parsed = input_parsers.parse_graph(point) 57 result = _internal.path_catmull_rom_to_point_internal(path_parsed, point_parsed) 58 59 return Path(result) 60 61 def line_to_point(self, point) -> Path: 62 """Path Line to Point 63 64 Moves the path from it's current point to another at another point with a line. 65 66 Args: 67 point: Graph of Point2f 68 69 70 Returns: 71 Graph: A graph node producing a Path. 72 """ 73 path_parsed = input_parsers.parse_graph(self) 74 point_parsed = input_parsers.parse_graph(point) 75 result = _internal.path_line_to_point_internal(path_parsed, point_parsed) 76 77 return Path(result) 78 79 def move_to_point(self, point) -> Path: 80 """Path Move to Point 81 82 Moves the path to a specified point without drawing anything. 83 84 Args: 85 point: Graph of Point2f 86 87 88 Returns: 89 Graph: A graph node producing a Path. 90 """ 91 path_parsed = input_parsers.parse_graph(self) 92 point_parsed = input_parsers.parse_graph(point) 93 result = _internal.path_move_to_point_internal(path_parsed, point_parsed) 94 95 return Path(result) 96 97 @staticmethod 98 def new() -> Path: 99 """Path New 100 101 Creates a new empty path. 102 103 Returns: 104 Graph: A graph node producing a Path. 105 """ 106 result = _internal.path_new_internal() 107 108 return Path(result)
A 2D path that can be used to be rendered.
23 def cardinal_cubic_to_point(self, point, tension) -> Path: 24 """Path Cardinal Cubic to Point 25 26 Moves the path from it's current point to another with a Cardinal Cubic spline. 27 28 Args: 29 point: Graph of Point2f 30 tension: Graph of Float 31 32 33 Returns: 34 Graph: A graph node producing a Path. 35 """ 36 path_parsed = input_parsers.parse_graph(self) 37 point_parsed = input_parsers.parse_graph(point) 38 tension_parsed = input_parsers.parse_float_graph(tension) 39 result = _internal.path_cardinal_cubic_to_point_internal(path_parsed, point_parsed, tension_parsed) 40 41 return Path(result)
Path Cardinal Cubic to Point
Moves the path from it's current point to another with a Cardinal Cubic spline.
Args: point: Graph of Point2f tension: Graph of Float
Returns: Graph: A graph node producing a Path.
43 def catmull_rom_to_point(self, point) -> Path: 44 """Path Catmull-Rom to Point 45 46 Moves the path from it's current point to another with a Catmull-Rom spline. 47 48 Args: 49 point: Graph of Point2f 50 51 52 Returns: 53 Graph: A graph node producing a Path. 54 """ 55 path_parsed = input_parsers.parse_graph(self) 56 point_parsed = input_parsers.parse_graph(point) 57 result = _internal.path_catmull_rom_to_point_internal(path_parsed, point_parsed) 58 59 return Path(result)
Path Catmull-Rom to Point
Moves the path from it's current point to another with a Catmull-Rom spline.
Args: point: Graph of Point2f
Returns: Graph: A graph node producing a Path.
61 def line_to_point(self, point) -> Path: 62 """Path Line to Point 63 64 Moves the path from it's current point to another at another point with a line. 65 66 Args: 67 point: Graph of Point2f 68 69 70 Returns: 71 Graph: A graph node producing a Path. 72 """ 73 path_parsed = input_parsers.parse_graph(self) 74 point_parsed = input_parsers.parse_graph(point) 75 result = _internal.path_line_to_point_internal(path_parsed, point_parsed) 76 77 return Path(result)
Path Line to Point
Moves the path from it's current point to another at another point with a line.
Args: point: Graph of Point2f
Returns: Graph: A graph node producing a Path.
79 def move_to_point(self, point) -> Path: 80 """Path Move to Point 81 82 Moves the path to a specified point without drawing anything. 83 84 Args: 85 point: Graph of Point2f 86 87 88 Returns: 89 Graph: A graph node producing a Path. 90 """ 91 path_parsed = input_parsers.parse_graph(self) 92 point_parsed = input_parsers.parse_graph(point) 93 result = _internal.path_move_to_point_internal(path_parsed, point_parsed) 94 95 return Path(result)
Path Move to Point
Moves the path to a specified point without drawing anything.
Args: point: Graph of Point2f
Returns: Graph: A graph node producing a Path.
97 @staticmethod 98 def new() -> Path: 99 """Path New 100 101 Creates a new empty path. 102 103 Returns: 104 Graph: A graph node producing a Path. 105 """ 106 result = _internal.path_new_internal() 107 108 return Path(result)
Path New
Creates a new empty path.
Returns: Graph: A graph node producing a Path.
15class PixelEncoding(_GraphWrapper): 16 """How pixel values are encoded (gamma/other encoded, linear straight alpha, or linear premultiplied alpha).""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def encoded() -> PixelEncoding: 25 """Pixel Encoding Encoded 26 27 Creates a Pixel Encoding representing gamma or other non-linear encoded values. 28 29 Returns: 30 Graph: A graph node producing a PixelEncoding. 31 """ 32 result = _internal.pixel_encoding_encoded_internal() 33 34 return PixelEncoding(result) 35 36 @staticmethod 37 def linear() -> PixelEncoding: 38 """Pixel Encoding Linear 39 40 Creates a Pixel Encoding representing linear light, straight alpha values. 41 42 Returns: 43 Graph: A graph node producing a PixelEncoding. 44 """ 45 result = _internal.pixel_encoding_linear_internal() 46 47 return PixelEncoding(result) 48 49 @staticmethod 50 def premultiplied_alpha() -> PixelEncoding: 51 """Pixel Encoding Premultiplied Alpha 52 53 Creates a Pixel Encoding representing linear light, premultiplied alpha values. 54 55 Returns: 56 Graph: A graph node producing a PixelEncoding. 57 """ 58 result = _internal.pixel_encoding_premultiplied_alpha_internal() 59 60 return PixelEncoding(result)
How pixel values are encoded (gamma/other encoded, linear straight alpha, or linear premultiplied alpha).
23 @staticmethod 24 def encoded() -> PixelEncoding: 25 """Pixel Encoding Encoded 26 27 Creates a Pixel Encoding representing gamma or other non-linear encoded values. 28 29 Returns: 30 Graph: A graph node producing a PixelEncoding. 31 """ 32 result = _internal.pixel_encoding_encoded_internal() 33 34 return PixelEncoding(result)
Pixel Encoding Encoded
Creates a Pixel Encoding representing gamma or other non-linear encoded values.
Returns: Graph: A graph node producing a PixelEncoding.
36 @staticmethod 37 def linear() -> PixelEncoding: 38 """Pixel Encoding Linear 39 40 Creates a Pixel Encoding representing linear light, straight alpha values. 41 42 Returns: 43 Graph: A graph node producing a PixelEncoding. 44 """ 45 result = _internal.pixel_encoding_linear_internal() 46 47 return PixelEncoding(result)
Pixel Encoding Linear
Creates a Pixel Encoding representing linear light, straight alpha values.
Returns: Graph: A graph node producing a PixelEncoding.
49 @staticmethod 50 def premultiplied_alpha() -> PixelEncoding: 51 """Pixel Encoding Premultiplied Alpha 52 53 Creates a Pixel Encoding representing linear light, premultiplied alpha values. 54 55 Returns: 56 Graph: A graph node producing a PixelEncoding. 57 """ 58 result = _internal.pixel_encoding_premultiplied_alpha_internal() 59 60 return PixelEncoding(result)
Pixel Encoding Premultiplied Alpha
Creates a Pixel Encoding representing linear light, premultiplied alpha values.
Returns: Graph: A graph node producing a PixelEncoding.
22class Point2f(_GraphWrapper): 23 """A point with an x and y as floats""" 24 25 def execute(self, context): 26 27 return self._inner.execute(context) 28 29 30 def distance(self, rhs) -> float.Float: 31 """Point 2 Float Distance 32 33 The Euclidean distance between two Point 2 Floats. 34 35 Args: 36 rhs: Graph of Point2f 37 38 39 Returns: 40 Graph: A graph node producing a Float. 41 """ 42 lhs_parsed = input_parsers.parse_graph(self) 43 rhs_parsed = input_parsers.parse_graph(rhs) 44 result = _internal.point2f_distance_internal(lhs_parsed, rhs_parsed) 45 46 from .float import Float 47 return Float(result) 48 49 @staticmethod 50 def from_components(x, y) -> Point2f: 51 """Point 2 Float from Components 52 53 Given an x and y creates a point 54 55 Args: 56 x: Graph of Float 57 y: Graph of Float 58 59 60 Returns: 61 Graph: A graph node producing a Point2f. 62 """ 63 x_parsed = input_parsers.parse_float_graph(x) 64 y_parsed = input_parsers.parse_float_graph(y) 65 result = _internal.point2f_from_components_internal(x_parsed, y_parsed) 66 67 return Point2f(result) 68 69 def to_list(self) -> point2f_list.Point2fList: 70 """Point 2 Float to List 71 72 Converts Point 2 Float to a single item list 73 74 Returns: 75 Graph: A graph node producing a Point2fList. 76 """ 77 item_parsed = input_parsers.parse_graph(self) 78 result = _internal.point2f_to_list_internal(item_parsed) 79 80 from .point2f_list import Point2fList 81 return Point2fList(result)
A point with an x and y as floats
30 def distance(self, rhs) -> float.Float: 31 """Point 2 Float Distance 32 33 The Euclidean distance between two Point 2 Floats. 34 35 Args: 36 rhs: Graph of Point2f 37 38 39 Returns: 40 Graph: A graph node producing a Float. 41 """ 42 lhs_parsed = input_parsers.parse_graph(self) 43 rhs_parsed = input_parsers.parse_graph(rhs) 44 result = _internal.point2f_distance_internal(lhs_parsed, rhs_parsed) 45 46 from .float import Float 47 return Float(result)
Point 2 Float Distance
The Euclidean distance between two Point 2 Floats.
Args: rhs: Graph of Point2f
Returns: Graph: A graph node producing a Float.
49 @staticmethod 50 def from_components(x, y) -> Point2f: 51 """Point 2 Float from Components 52 53 Given an x and y creates a point 54 55 Args: 56 x: Graph of Float 57 y: Graph of Float 58 59 60 Returns: 61 Graph: A graph node producing a Point2f. 62 """ 63 x_parsed = input_parsers.parse_float_graph(x) 64 y_parsed = input_parsers.parse_float_graph(y) 65 result = _internal.point2f_from_components_internal(x_parsed, y_parsed) 66 67 return Point2f(result)
Point 2 Float from Components
Given an x and y creates a point
Args: x: Graph of Float y: Graph of Float
Returns: Graph: A graph node producing a Point2f.
69 def to_list(self) -> point2f_list.Point2fList: 70 """Point 2 Float to List 71 72 Converts Point 2 Float to a single item list 73 74 Returns: 75 Graph: A graph node producing a Point2fList. 76 """ 77 item_parsed = input_parsers.parse_graph(self) 78 result = _internal.point2f_to_list_internal(item_parsed) 79 80 from .point2f_list import Point2fList 81 return Point2fList(result)
Point 2 Float to List
Converts Point 2 Float to a single item list
Returns: Graph: A graph node producing a Point2fList.
22class Point2fList(_GraphWrapper): 23 """List of Point 2 Floats""" 24 25 def execute(self, context): 26 27 return self._inner.execute(context) 28 29 30 def first(self) -> point2f.Point2f: 31 """Point 2 Float List First 32 33 First Item of Point 2 Float List 34 35 Returns: 36 Graph: A graph node producing a Point2f. 37 """ 38 list_parsed = input_parsers.parse_graph(self) 39 result = _internal.point2f_list_first_internal(list_parsed) 40 41 from .point2f import Point2f 42 return Point2f(result) 43 44 def to_stream(self) -> point2f_stream.Point2fStream: 45 """Point 2 Float List to Stream 46 47 Converts Point 2 Float list to a stream 48 49 Returns: 50 Graph: A graph node producing a Point2fStream. 51 """ 52 list_parsed = input_parsers.parse_graph(self) 53 result = _internal.point2f_list_to_stream_internal(list_parsed) 54 55 from .point2f_stream import Point2fStream 56 return Point2fStream(result)
List of Point 2 Floats
30 def first(self) -> point2f.Point2f: 31 """Point 2 Float List First 32 33 First Item of Point 2 Float List 34 35 Returns: 36 Graph: A graph node producing a Point2f. 37 """ 38 list_parsed = input_parsers.parse_graph(self) 39 result = _internal.point2f_list_first_internal(list_parsed) 40 41 from .point2f import Point2f 42 return Point2f(result)
Point 2 Float List First
First Item of Point 2 Float List
Returns: Graph: A graph node producing a Point2f.
44 def to_stream(self) -> point2f_stream.Point2fStream: 45 """Point 2 Float List to Stream 46 47 Converts Point 2 Float list to a stream 48 49 Returns: 50 Graph: A graph node producing a Point2fStream. 51 """ 52 list_parsed = input_parsers.parse_graph(self) 53 result = _internal.point2f_list_to_stream_internal(list_parsed) 54 55 from .point2f_stream import Point2fStream 56 return Point2fStream(result)
Point 2 Float List to Stream
Converts Point 2 Float list to a stream
Returns: Graph: A graph node producing a Point2fStream.
20class Point2fStream(_GraphWrapper): 21 """Stream of Point 2 Floats""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 def filter(self, start, end) -> Point2fStream: 29 """Point 2 Float Stream Filter 30 31 Filters Point 2 Float Stream stream 32 33 Args: 34 start: Graph of Point2f 35 end: Graph of Bool 36 37 38 Returns: 39 Graph: A graph node producing a Point2fStream. 40 """ 41 stream_parsed = input_parsers.parse_graph(self) 42 start_parsed = input_parsers.parse_graph(start) 43 end_parsed = input_parsers.parse_bool_graph(end) 44 result = _internal.point2f_stream_filter_internal(stream_parsed, start_parsed, end_parsed) 45 46 return Point2fStream(result) 47 48 def map(self, input_location, output_location) -> any_stream.AnyStream: 49 """Point2fStream Map 50 51 Point2fStream Maps Each Value of the Stream 52 53 Args: 54 input_location: Graph of Point2f 55 output_location: Graph of Any 56 57 58 Returns: 59 Graph: A graph node producing a AnyStream. 60 """ 61 stream_parsed = input_parsers.parse_graph(self) 62 input_location_parsed = input_parsers.parse_graph(input_location) 63 output_location_parsed = input_parsers.parse_graph(output_location) 64 result = _internal.point2f_stream_map_internal(stream_parsed, input_location_parsed, output_location_parsed) 65 66 from .any_stream import AnyStream 67 return AnyStream(result)
Stream of Point 2 Floats
28 def filter(self, start, end) -> Point2fStream: 29 """Point 2 Float Stream Filter 30 31 Filters Point 2 Float Stream stream 32 33 Args: 34 start: Graph of Point2f 35 end: Graph of Bool 36 37 38 Returns: 39 Graph: A graph node producing a Point2fStream. 40 """ 41 stream_parsed = input_parsers.parse_graph(self) 42 start_parsed = input_parsers.parse_graph(start) 43 end_parsed = input_parsers.parse_bool_graph(end) 44 result = _internal.point2f_stream_filter_internal(stream_parsed, start_parsed, end_parsed) 45 46 return Point2fStream(result)
Point 2 Float Stream Filter
Filters Point 2 Float Stream stream
Args: start: Graph of Point2f end: Graph of Bool
Returns: Graph: A graph node producing a Point2fStream.
48 def map(self, input_location, output_location) -> any_stream.AnyStream: 49 """Point2fStream Map 50 51 Point2fStream Maps Each Value of the Stream 52 53 Args: 54 input_location: Graph of Point2f 55 output_location: Graph of Any 56 57 58 Returns: 59 Graph: A graph node producing a AnyStream. 60 """ 61 stream_parsed = input_parsers.parse_graph(self) 62 input_location_parsed = input_parsers.parse_graph(input_location) 63 output_location_parsed = input_parsers.parse_graph(output_location) 64 result = _internal.point2f_stream_map_internal(stream_parsed, input_location_parsed, output_location_parsed) 65 66 from .any_stream import AnyStream 67 return AnyStream(result)
Point2fStream Map
Point2fStream Maps Each Value of the Stream
Args: input_location: Graph of Point2f output_location: Graph of Any
Returns: Graph: A graph node producing a AnyStream.
20class Point2i(_GraphWrapper): 21 """A point with an x and y as ints""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 def distance(self, rhs) -> float.Float: 29 """Point 2 Int Distance 30 31 The Euclidean distance between two Point 2 Ints, returned as a Float. 32 33 Args: 34 rhs: Graph of Point2i 35 36 37 Returns: 38 Graph: A graph node producing a Float. 39 """ 40 lhs_parsed = input_parsers.parse_graph(self) 41 rhs_parsed = input_parsers.parse_graph(rhs) 42 result = _internal.point2i_distance_internal(lhs_parsed, rhs_parsed) 43 44 from .float import Float 45 return Float(result) 46 47 @staticmethod 48 def from_components(x, y) -> Point2i: 49 """Point 2 Int from Components 50 51 Given an x and y creates a point 52 53 Args: 54 x: Graph of Int 55 y: Graph of Int 56 57 58 Returns: 59 Graph: A graph node producing a Point2i. 60 """ 61 x_parsed = input_parsers.parse_int_graph(x) 62 y_parsed = input_parsers.parse_int_graph(y) 63 result = _internal.point2i_from_components_internal(x_parsed, y_parsed) 64 65 return Point2i(result)
A point with an x and y as ints
28 def distance(self, rhs) -> float.Float: 29 """Point 2 Int Distance 30 31 The Euclidean distance between two Point 2 Ints, returned as a Float. 32 33 Args: 34 rhs: Graph of Point2i 35 36 37 Returns: 38 Graph: A graph node producing a Float. 39 """ 40 lhs_parsed = input_parsers.parse_graph(self) 41 rhs_parsed = input_parsers.parse_graph(rhs) 42 result = _internal.point2i_distance_internal(lhs_parsed, rhs_parsed) 43 44 from .float import Float 45 return Float(result)
Point 2 Int Distance
The Euclidean distance between two Point 2 Ints, returned as a Float.
Args: rhs: Graph of Point2i
Returns: Graph: A graph node producing a Float.
47 @staticmethod 48 def from_components(x, y) -> Point2i: 49 """Point 2 Int from Components 50 51 Given an x and y creates a point 52 53 Args: 54 x: Graph of Int 55 y: Graph of Int 56 57 58 Returns: 59 Graph: A graph node producing a Point2i. 60 """ 61 x_parsed = input_parsers.parse_int_graph(x) 62 y_parsed = input_parsers.parse_int_graph(y) 63 result = _internal.point2i_from_components_internal(x_parsed, y_parsed) 64 65 return Point2i(result)
Point 2 Int from Components
Given an x and y creates a point
Args: x: Graph of Int y: Graph of Int
Returns: Graph: A graph node producing a Point2i.
15class Point2iList(_GraphWrapper): 16 """List of Point 2 Ints""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
List of Point 2 Ints
24class ProfiledColor(_GraphWrapper): 25 """A color with an associated color representation.""" 26 27 def execute(self, context): 28 29 return self._inner.execute(context) 30 31 32 @staticmethod 33 def blackbody(kelvin) -> ProfiledColor: 34 """Profiled Color Blackbody 35 36 Creates a profiled color that is the color of a blackbody emitter at a given kelvin. 37 38 Args: 39 kelvin: Graph of Float 40 41 42 Returns: 43 Graph: A graph node producing a ProfiledColor. 44 """ 45 kelvin_parsed = input_parsers.parse_float_graph(kelvin) 46 result = _internal.profiled_color_blackbody_internal(kelvin_parsed) 47 48 return ProfiledColor(result) 49 50 def brightness_adjust(self, offset) -> ProfiledColor: 51 """Profiled Color Brightness Adjust 52 53 Adjusts a profiled color's lightness in OkLab. 54 55 Args: 56 offset: Graph of Float 57 58 59 Returns: 60 Graph: A graph node producing a ProfiledColor. 61 """ 62 profiled_color_parsed = input_parsers.parse_graph(self) 63 offset_parsed = input_parsers.parse_float_graph(offset) 64 result = _internal.profiled_color_brightness_adjust_internal(profiled_color_parsed, offset_parsed) 65 66 return ProfiledColor(result) 67 68 def chroma_offset(self, offset) -> ProfiledColor: 69 """Profiled Color Chroma Offset 70 71 Applies an offset to the a and b chroma components of a profiled color in OkLab. 72 73 Args: 74 offset: Graph of Vector2f 75 76 77 Returns: 78 Graph: A graph node producing a ProfiledColor. 79 """ 80 profiled_color_parsed = input_parsers.parse_graph(self) 81 offset_parsed = input_parsers.parse_graph(offset) 82 result = _internal.profiled_color_chroma_offset_internal(profiled_color_parsed, offset_parsed) 83 84 return ProfiledColor(result) 85 86 def exposure_adjust(self, steps) -> ProfiledColor: 87 """Profiled Color Exposure Adjust 88 89 Updates a profiled color's exposure by multiplying linear RGB values by 2^steps. 90 91 Args: 92 steps: Graph of Float 93 94 95 Returns: 96 Graph: A graph node producing a ProfiledColor. 97 """ 98 profiled_color_parsed = input_parsers.parse_graph(self) 99 steps_parsed = input_parsers.parse_float_graph(steps) 100 result = _internal.profiled_color_exposure_adjust_internal(profiled_color_parsed, steps_parsed) 101 102 return ProfiledColor(result) 103 104 @staticmethod 105 def from_ok_lab_a(ok_lab_a) -> ProfiledColor: 106 """Profiled Color from OkLab with Alpha 107 108 Creates a profiled color from OkLab channels and alpha. 109 110 Args: 111 ok_lab_a: Graph of OkLabA 112 113 114 Returns: 115 Graph: A graph node producing a ProfiledColor. 116 """ 117 ok_lab_a_parsed = input_parsers.parse_graph(ok_lab_a) 118 result = _internal.profiled_color_from_ok_lab_a_internal(ok_lab_a_parsed) 119 120 return ProfiledColor(result) 121 122 @staticmethod 123 def from_rgba_aces_cg(rgba) -> ProfiledColor: 124 """Profiled Color from RGBA ACEScg 125 126 Creates a profiled color from linear ACEScg RGBA channels. 127 128 Args: 129 rgba: Graph of RGBAColor 130 131 132 Returns: 133 Graph: A graph node producing a ProfiledColor. 134 """ 135 rgba_parsed = input_parsers.parse_graph(rgba) 136 result = _internal.profiled_color_from_rgba_aces_cg_internal(rgba_parsed) 137 138 return ProfiledColor(result) 139 140 @staticmethod 141 def from_rgba_srgb(rgba) -> ProfiledColor: 142 """Profiled Color from RGBA sRGB 143 144 Creates a profiled color from encoded sRGB RGBA channels. 145 146 Args: 147 rgba: Graph of RGBAColor 148 149 150 Returns: 151 Graph: A graph node producing a ProfiledColor. 152 """ 153 rgba_parsed = input_parsers.parse_graph(rgba) 154 result = _internal.profiled_color_from_rgba_srgb_internal(rgba_parsed) 155 156 return ProfiledColor(result) 157 158 @staticmethod 159 def from_rgba_srgb_linear(rgba) -> ProfiledColor: 160 """Profiled Color from RGBA linear sRGB 161 162 Creates a profiled color from linear sRGB RGBA channels. 163 164 Args: 165 rgba: Graph of RGBAColor 166 167 168 Returns: 169 Graph: A graph node producing a ProfiledColor. 170 """ 171 rgba_parsed = input_parsers.parse_graph(rgba) 172 result = _internal.profiled_color_from_rgba_srgb_linear_internal(rgba_parsed) 173 174 return ProfiledColor(result) 175 176 @staticmethod 177 def from_xyz_a(xyza) -> ProfiledColor: 178 """Profiled Color from XYZ with Alpha 179 180 Creates a profiled color from XYZ channels and alpha. 181 182 Args: 183 xyza: Graph of XYZA 184 185 186 Returns: 187 Graph: A graph node producing a ProfiledColor. 188 """ 189 xyza_parsed = input_parsers.parse_graph(xyza) 190 result = _internal.profiled_color_from_xyz_a_internal(xyza_parsed) 191 192 return ProfiledColor(result) 193 194 def grayscale(self) -> ProfiledColor: 195 """Profiled Color Grayscale 196 197 Removes chroma from a profiled color. 198 199 Returns: 200 Graph: A graph node producing a ProfiledColor. 201 """ 202 profiled_color_parsed = input_parsers.parse_graph(self) 203 result = _internal.profiled_color_grayscale_internal(profiled_color_parsed) 204 205 return ProfiledColor(result) 206 207 def lightness_curve(self, l_curve) -> ProfiledColor: 208 """Profiled Color Lightness Curve 209 210 Applies a curve to the L component of a profiled color in OkLab. 211 212 Args: 213 l_curve: Graph of Curve 214 215 216 Returns: 217 Graph: A graph node producing a ProfiledColor. 218 """ 219 profiled_color_parsed = input_parsers.parse_graph(self) 220 l_curve_parsed = input_parsers.parse_graph(l_curve) 221 result = _internal.profiled_color_lightness_curve_internal(profiled_color_parsed, l_curve_parsed) 222 223 return ProfiledColor(result) 224 225 def saturation_adjust(self, scale) -> ProfiledColor: 226 """Profiled Color Saturation Adjust 227 228 Scales the chroma components of a profiled color in OkLab. 229 230 Args: 231 scale: Graph of Float 232 233 234 Returns: 235 Graph: A graph node producing a ProfiledColor. 236 """ 237 profiled_color_parsed = input_parsers.parse_graph(self) 238 scale_parsed = input_parsers.parse_float_graph(scale) 239 result = _internal.profiled_color_saturation_adjust_internal(profiled_color_parsed, scale_parsed) 240 241 return ProfiledColor(result) 242 243 def target_white(self, target_white) -> ProfiledColor: 244 """Profiled Color Target White 245 246 Adapts a profiled color to the specified XYZ white point. 247 248 Args: 249 target_white: Graph of XYZ 250 251 252 Returns: 253 Graph: A graph node producing a ProfiledColor. 254 """ 255 profiled_color_parsed = input_parsers.parse_graph(self) 256 target_white_parsed = input_parsers.parse_graph(target_white) 257 result = _internal.profiled_color_target_white_internal(profiled_color_parsed, target_white_parsed) 258 259 return ProfiledColor(result) 260 261 def to_ok_lab_a(self) -> ok_lab_a.OkLabA: 262 """Profiled Color to OkLab with Alpha 263 264 Converts a profiled color to OkLab channels with alpha. 265 266 Returns: 267 Graph: A graph node producing a OkLabA. 268 """ 269 profiled_color_parsed = input_parsers.parse_graph(self) 270 result = _internal.profiled_color_to_ok_lab_a_internal(profiled_color_parsed) 271 272 from .ok_lab_a import OkLabA 273 return OkLabA(result) 274 275 def to_rgb_encoded_with_color_profile(self, color_profile) -> r_g_b_a_color.RGBAColor: 276 """Profiled Color to Encoded RGB with Color Profile 277 278 Converts a profiled color to encoded RGB channels using the specified RGB color profile. 279 280 Args: 281 color_profile: Graph of ColorProfile 282 283 284 Returns: 285 Graph: A graph node producing a RGBAColor. 286 """ 287 profiled_color_parsed = input_parsers.parse_graph(self) 288 color_profile_parsed = input_parsers.parse_graph(color_profile) 289 result = _internal.profiled_color_to_rgb_encoded_with_color_profile_internal(profiled_color_parsed, color_profile_parsed) 290 291 from .r_g_b_a_color import RGBAColor 292 return RGBAColor(result) 293 294 def to_rgb_linear_with_color_profile(self, color_profile) -> r_g_b_a_color.RGBAColor: 295 """Profiled Color to Linear RGB with Color Profile 296 297 Converts a profiled color to linear RGB channels using the specified RGB color profile. 298 299 Args: 300 color_profile: Graph of ColorProfile 301 302 303 Returns: 304 Graph: A graph node producing a RGBAColor. 305 """ 306 profiled_color_parsed = input_parsers.parse_graph(self) 307 color_profile_parsed = input_parsers.parse_graph(color_profile) 308 result = _internal.profiled_color_to_rgb_linear_with_color_profile_internal(profiled_color_parsed, color_profile_parsed) 309 310 from .r_g_b_a_color import RGBAColor 311 return RGBAColor(result) 312 313 def to_xyz_a(self) -> x_y_z_a.XYZA: 314 """Profiled Color to XYZ with Alpha 315 316 Converts a profiled color to XYZ channels with alpha. 317 318 Returns: 319 Graph: A graph node producing a XYZA. 320 """ 321 profiled_color_parsed = input_parsers.parse_graph(self) 322 result = _internal.profiled_color_to_xyz_a_internal(profiled_color_parsed) 323 324 from .x_y_z_a import XYZA 325 return XYZA(result)
A color with an associated color representation.
32 @staticmethod 33 def blackbody(kelvin) -> ProfiledColor: 34 """Profiled Color Blackbody 35 36 Creates a profiled color that is the color of a blackbody emitter at a given kelvin. 37 38 Args: 39 kelvin: Graph of Float 40 41 42 Returns: 43 Graph: A graph node producing a ProfiledColor. 44 """ 45 kelvin_parsed = input_parsers.parse_float_graph(kelvin) 46 result = _internal.profiled_color_blackbody_internal(kelvin_parsed) 47 48 return ProfiledColor(result)
Profiled Color Blackbody
Creates a profiled color that is the color of a blackbody emitter at a given kelvin.
Args: kelvin: Graph of Float
Returns: Graph: A graph node producing a ProfiledColor.
50 def brightness_adjust(self, offset) -> ProfiledColor: 51 """Profiled Color Brightness Adjust 52 53 Adjusts a profiled color's lightness in OkLab. 54 55 Args: 56 offset: Graph of Float 57 58 59 Returns: 60 Graph: A graph node producing a ProfiledColor. 61 """ 62 profiled_color_parsed = input_parsers.parse_graph(self) 63 offset_parsed = input_parsers.parse_float_graph(offset) 64 result = _internal.profiled_color_brightness_adjust_internal(profiled_color_parsed, offset_parsed) 65 66 return ProfiledColor(result)
Profiled Color Brightness Adjust
Adjusts a profiled color's lightness in OkLab.
Args: offset: Graph of Float
Returns: Graph: A graph node producing a ProfiledColor.
68 def chroma_offset(self, offset) -> ProfiledColor: 69 """Profiled Color Chroma Offset 70 71 Applies an offset to the a and b chroma components of a profiled color in OkLab. 72 73 Args: 74 offset: Graph of Vector2f 75 76 77 Returns: 78 Graph: A graph node producing a ProfiledColor. 79 """ 80 profiled_color_parsed = input_parsers.parse_graph(self) 81 offset_parsed = input_parsers.parse_graph(offset) 82 result = _internal.profiled_color_chroma_offset_internal(profiled_color_parsed, offset_parsed) 83 84 return ProfiledColor(result)
Profiled Color Chroma Offset
Applies an offset to the a and b chroma components of a profiled color in OkLab.
Args: offset: Graph of Vector2f
Returns: Graph: A graph node producing a ProfiledColor.
86 def exposure_adjust(self, steps) -> ProfiledColor: 87 """Profiled Color Exposure Adjust 88 89 Updates a profiled color's exposure by multiplying linear RGB values by 2^steps. 90 91 Args: 92 steps: Graph of Float 93 94 95 Returns: 96 Graph: A graph node producing a ProfiledColor. 97 """ 98 profiled_color_parsed = input_parsers.parse_graph(self) 99 steps_parsed = input_parsers.parse_float_graph(steps) 100 result = _internal.profiled_color_exposure_adjust_internal(profiled_color_parsed, steps_parsed) 101 102 return ProfiledColor(result)
Profiled Color Exposure Adjust
Updates a profiled color's exposure by multiplying linear RGB values by 2^steps.
Args: steps: Graph of Float
Returns: Graph: A graph node producing a ProfiledColor.
104 @staticmethod 105 def from_ok_lab_a(ok_lab_a) -> ProfiledColor: 106 """Profiled Color from OkLab with Alpha 107 108 Creates a profiled color from OkLab channels and alpha. 109 110 Args: 111 ok_lab_a: Graph of OkLabA 112 113 114 Returns: 115 Graph: A graph node producing a ProfiledColor. 116 """ 117 ok_lab_a_parsed = input_parsers.parse_graph(ok_lab_a) 118 result = _internal.profiled_color_from_ok_lab_a_internal(ok_lab_a_parsed) 119 120 return ProfiledColor(result)
Profiled Color from OkLab with Alpha
Creates a profiled color from OkLab channels and alpha.
Args: ok_lab_a: Graph of OkLabA
Returns: Graph: A graph node producing a ProfiledColor.
122 @staticmethod 123 def from_rgba_aces_cg(rgba) -> ProfiledColor: 124 """Profiled Color from RGBA ACEScg 125 126 Creates a profiled color from linear ACEScg RGBA channels. 127 128 Args: 129 rgba: Graph of RGBAColor 130 131 132 Returns: 133 Graph: A graph node producing a ProfiledColor. 134 """ 135 rgba_parsed = input_parsers.parse_graph(rgba) 136 result = _internal.profiled_color_from_rgba_aces_cg_internal(rgba_parsed) 137 138 return ProfiledColor(result)
Profiled Color from RGBA ACEScg
Creates a profiled color from linear ACEScg RGBA channels.
Args: rgba: Graph of RGBAColor
Returns: Graph: A graph node producing a ProfiledColor.
140 @staticmethod 141 def from_rgba_srgb(rgba) -> ProfiledColor: 142 """Profiled Color from RGBA sRGB 143 144 Creates a profiled color from encoded sRGB RGBA channels. 145 146 Args: 147 rgba: Graph of RGBAColor 148 149 150 Returns: 151 Graph: A graph node producing a ProfiledColor. 152 """ 153 rgba_parsed = input_parsers.parse_graph(rgba) 154 result = _internal.profiled_color_from_rgba_srgb_internal(rgba_parsed) 155 156 return ProfiledColor(result)
Profiled Color from RGBA sRGB
Creates a profiled color from encoded sRGB RGBA channels.
Args: rgba: Graph of RGBAColor
Returns: Graph: A graph node producing a ProfiledColor.
158 @staticmethod 159 def from_rgba_srgb_linear(rgba) -> ProfiledColor: 160 """Profiled Color from RGBA linear sRGB 161 162 Creates a profiled color from linear sRGB RGBA channels. 163 164 Args: 165 rgba: Graph of RGBAColor 166 167 168 Returns: 169 Graph: A graph node producing a ProfiledColor. 170 """ 171 rgba_parsed = input_parsers.parse_graph(rgba) 172 result = _internal.profiled_color_from_rgba_srgb_linear_internal(rgba_parsed) 173 174 return ProfiledColor(result)
Profiled Color from RGBA linear sRGB
Creates a profiled color from linear sRGB RGBA channels.
Args: rgba: Graph of RGBAColor
Returns: Graph: A graph node producing a ProfiledColor.
176 @staticmethod 177 def from_xyz_a(xyza) -> ProfiledColor: 178 """Profiled Color from XYZ with Alpha 179 180 Creates a profiled color from XYZ channels and alpha. 181 182 Args: 183 xyza: Graph of XYZA 184 185 186 Returns: 187 Graph: A graph node producing a ProfiledColor. 188 """ 189 xyza_parsed = input_parsers.parse_graph(xyza) 190 result = _internal.profiled_color_from_xyz_a_internal(xyza_parsed) 191 192 return ProfiledColor(result)
Profiled Color from XYZ with Alpha
Creates a profiled color from XYZ channels and alpha.
Args: xyza: Graph of XYZA
Returns: Graph: A graph node producing a ProfiledColor.
194 def grayscale(self) -> ProfiledColor: 195 """Profiled Color Grayscale 196 197 Removes chroma from a profiled color. 198 199 Returns: 200 Graph: A graph node producing a ProfiledColor. 201 """ 202 profiled_color_parsed = input_parsers.parse_graph(self) 203 result = _internal.profiled_color_grayscale_internal(profiled_color_parsed) 204 205 return ProfiledColor(result)
Profiled Color Grayscale
Removes chroma from a profiled color.
Returns: Graph: A graph node producing a ProfiledColor.
207 def lightness_curve(self, l_curve) -> ProfiledColor: 208 """Profiled Color Lightness Curve 209 210 Applies a curve to the L component of a profiled color in OkLab. 211 212 Args: 213 l_curve: Graph of Curve 214 215 216 Returns: 217 Graph: A graph node producing a ProfiledColor. 218 """ 219 profiled_color_parsed = input_parsers.parse_graph(self) 220 l_curve_parsed = input_parsers.parse_graph(l_curve) 221 result = _internal.profiled_color_lightness_curve_internal(profiled_color_parsed, l_curve_parsed) 222 223 return ProfiledColor(result)
Profiled Color Lightness Curve
Applies a curve to the L component of a profiled color in OkLab.
Args: l_curve: Graph of Curve
Returns: Graph: A graph node producing a ProfiledColor.
225 def saturation_adjust(self, scale) -> ProfiledColor: 226 """Profiled Color Saturation Adjust 227 228 Scales the chroma components of a profiled color in OkLab. 229 230 Args: 231 scale: Graph of Float 232 233 234 Returns: 235 Graph: A graph node producing a ProfiledColor. 236 """ 237 profiled_color_parsed = input_parsers.parse_graph(self) 238 scale_parsed = input_parsers.parse_float_graph(scale) 239 result = _internal.profiled_color_saturation_adjust_internal(profiled_color_parsed, scale_parsed) 240 241 return ProfiledColor(result)
Profiled Color Saturation Adjust
Scales the chroma components of a profiled color in OkLab.
Args: scale: Graph of Float
Returns: Graph: A graph node producing a ProfiledColor.
243 def target_white(self, target_white) -> ProfiledColor: 244 """Profiled Color Target White 245 246 Adapts a profiled color to the specified XYZ white point. 247 248 Args: 249 target_white: Graph of XYZ 250 251 252 Returns: 253 Graph: A graph node producing a ProfiledColor. 254 """ 255 profiled_color_parsed = input_parsers.parse_graph(self) 256 target_white_parsed = input_parsers.parse_graph(target_white) 257 result = _internal.profiled_color_target_white_internal(profiled_color_parsed, target_white_parsed) 258 259 return ProfiledColor(result)
Profiled Color Target White
Adapts a profiled color to the specified XYZ white point.
Args: target_white: Graph of XYZ
Returns: Graph: A graph node producing a ProfiledColor.
261 def to_ok_lab_a(self) -> ok_lab_a.OkLabA: 262 """Profiled Color to OkLab with Alpha 263 264 Converts a profiled color to OkLab channels with alpha. 265 266 Returns: 267 Graph: A graph node producing a OkLabA. 268 """ 269 profiled_color_parsed = input_parsers.parse_graph(self) 270 result = _internal.profiled_color_to_ok_lab_a_internal(profiled_color_parsed) 271 272 from .ok_lab_a import OkLabA 273 return OkLabA(result)
Profiled Color to OkLab with Alpha
Converts a profiled color to OkLab channels with alpha.
Returns: Graph: A graph node producing a OkLabA.
275 def to_rgb_encoded_with_color_profile(self, color_profile) -> r_g_b_a_color.RGBAColor: 276 """Profiled Color to Encoded RGB with Color Profile 277 278 Converts a profiled color to encoded RGB channels using the specified RGB color profile. 279 280 Args: 281 color_profile: Graph of ColorProfile 282 283 284 Returns: 285 Graph: A graph node producing a RGBAColor. 286 """ 287 profiled_color_parsed = input_parsers.parse_graph(self) 288 color_profile_parsed = input_parsers.parse_graph(color_profile) 289 result = _internal.profiled_color_to_rgb_encoded_with_color_profile_internal(profiled_color_parsed, color_profile_parsed) 290 291 from .r_g_b_a_color import RGBAColor 292 return RGBAColor(result)
Profiled Color to Encoded RGB with Color Profile
Converts a profiled color to encoded RGB channels using the specified RGB color profile.
Args: color_profile: Graph of ColorProfile
Returns: Graph: A graph node producing a RGBAColor.
294 def to_rgb_linear_with_color_profile(self, color_profile) -> r_g_b_a_color.RGBAColor: 295 """Profiled Color to Linear RGB with Color Profile 296 297 Converts a profiled color to linear RGB channels using the specified RGB color profile. 298 299 Args: 300 color_profile: Graph of ColorProfile 301 302 303 Returns: 304 Graph: A graph node producing a RGBAColor. 305 """ 306 profiled_color_parsed = input_parsers.parse_graph(self) 307 color_profile_parsed = input_parsers.parse_graph(color_profile) 308 result = _internal.profiled_color_to_rgb_linear_with_color_profile_internal(profiled_color_parsed, color_profile_parsed) 309 310 from .r_g_b_a_color import RGBAColor 311 return RGBAColor(result)
Profiled Color to Linear RGB with Color Profile
Converts a profiled color to linear RGB channels using the specified RGB color profile.
Args: color_profile: Graph of ColorProfile
Returns: Graph: A graph node producing a RGBAColor.
313 def to_xyz_a(self) -> x_y_z_a.XYZA: 314 """Profiled Color to XYZ with Alpha 315 316 Converts a profiled color to XYZ channels with alpha. 317 318 Returns: 319 Graph: A graph node producing a XYZA. 320 """ 321 profiled_color_parsed = input_parsers.parse_graph(self) 322 result = _internal.profiled_color_to_xyz_a_internal(profiled_color_parsed) 323 324 from .x_y_z_a import XYZA 325 return XYZA(result)
Profiled Color to XYZ with Alpha
Converts a profiled color to XYZ channels with alpha.
Returns: Graph: A graph node producing a XYZA.
20class ProfiledColorList(_GraphWrapper): 21 """List of Profiled Colors""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 def first(self) -> profiled_color.ProfiledColor: 29 """Profiled Color List First 30 31 First Item of Profiled Color List 32 33 Returns: 34 Graph: A graph node producing a ProfiledColor. 35 """ 36 list_parsed = input_parsers.parse_graph(self) 37 result = _internal.profiled_color_list_first_internal(list_parsed) 38 39 from .profiled_color import ProfiledColor 40 return ProfiledColor(result)
List of Profiled Colors
28 def first(self) -> profiled_color.ProfiledColor: 29 """Profiled Color List First 30 31 First Item of Profiled Color List 32 33 Returns: 34 Graph: A graph node producing a ProfiledColor. 35 """ 36 list_parsed = input_parsers.parse_graph(self) 37 result = _internal.profiled_color_list_first_internal(list_parsed) 38 39 from .profiled_color import ProfiledColor 40 return ProfiledColor(result)
Profiled Color List First
First Item of Profiled Color List
Returns: Graph: A graph node producing a ProfiledColor.
15class RGBAColor(_GraphWrapper): 16 """A color with a red, green, blue, and alpha component""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context).as_rgba_color() 21 22 23 @staticmethod 24 def from_components(r, g, b, a) -> RGBAColor: 25 """RGBA Color from Components 26 27 Given the r, g, b and a creates the color 28 29 Args: 30 r: Graph of Float 31 g: Graph of Float 32 b: Graph of Float 33 a: Graph of Float 34 35 36 Returns: 37 Graph: A graph node producing a RGBAColor. 38 """ 39 r_parsed = input_parsers.parse_float_graph(r) 40 g_parsed = input_parsers.parse_float_graph(g) 41 b_parsed = input_parsers.parse_float_graph(b) 42 a_parsed = input_parsers.parse_float_graph(a) 43 result = _internal.r_g_b_a_color_from_components_internal(r_parsed, g_parsed, b_parsed, a_parsed) 44 45 return RGBAColor(result) 46 47 def passthrough(self) -> RGBAColor: 48 """RGBA Color Passthrough 49 50 Responds with the value provided. Doing nothing to it. 51 52 Returns: 53 Graph: A graph node producing a RGBAColor. 54 """ 55 value_parsed = input_parsers.parse_graph(self) 56 result = _internal.r_g_b_a_color_passthrough_internal(value_parsed) 57 58 return RGBAColor(result)
A color with a red, green, blue, and alpha component
23 @staticmethod 24 def from_components(r, g, b, a) -> RGBAColor: 25 """RGBA Color from Components 26 27 Given the r, g, b and a creates the color 28 29 Args: 30 r: Graph of Float 31 g: Graph of Float 32 b: Graph of Float 33 a: Graph of Float 34 35 36 Returns: 37 Graph: A graph node producing a RGBAColor. 38 """ 39 r_parsed = input_parsers.parse_float_graph(r) 40 g_parsed = input_parsers.parse_float_graph(g) 41 b_parsed = input_parsers.parse_float_graph(b) 42 a_parsed = input_parsers.parse_float_graph(a) 43 result = _internal.r_g_b_a_color_from_components_internal(r_parsed, g_parsed, b_parsed, a_parsed) 44 45 return RGBAColor(result)
RGBA Color from Components
Given the r, g, b and a creates the color
Args: r: Graph of Float g: Graph of Float b: Graph of Float a: Graph of Float
Returns: Graph: A graph node producing a RGBAColor.
47 def passthrough(self) -> RGBAColor: 48 """RGBA Color Passthrough 49 50 Responds with the value provided. Doing nothing to it. 51 52 Returns: 53 Graph: A graph node producing a RGBAColor. 54 """ 55 value_parsed = input_parsers.parse_graph(self) 56 result = _internal.r_g_b_a_color_passthrough_internal(value_parsed) 57 58 return RGBAColor(result)
RGBA Color Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a RGBAColor.
15class RGBColor(_GraphWrapper): 16 """A color with a red, green and blue component""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def from_components(r, g, b) -> RGBColor: 25 """RGB Color from Components 26 27 Given the r, g and b creates the color 28 29 Args: 30 r: Graph of Float 31 g: Graph of Float 32 b: Graph of Float 33 34 35 Returns: 36 Graph: A graph node producing a RGBColor. 37 """ 38 r_parsed = input_parsers.parse_float_graph(r) 39 g_parsed = input_parsers.parse_float_graph(g) 40 b_parsed = input_parsers.parse_float_graph(b) 41 result = _internal.r_g_b_color_from_components_internal(r_parsed, g_parsed, b_parsed) 42 43 return RGBColor(result) 44 45 def passthrough(self) -> RGBColor: 46 """RGB Color Passthrough 47 48 Responds with the value provided. Doing nothing to it. 49 50 Returns: 51 Graph: A graph node producing a RGBColor. 52 """ 53 value_parsed = input_parsers.parse_graph(self) 54 result = _internal.r_g_b_color_passthrough_internal(value_parsed) 55 56 return RGBColor(result)
A color with a red, green and blue component
23 @staticmethod 24 def from_components(r, g, b) -> RGBColor: 25 """RGB Color from Components 26 27 Given the r, g and b creates the color 28 29 Args: 30 r: Graph of Float 31 g: Graph of Float 32 b: Graph of Float 33 34 35 Returns: 36 Graph: A graph node producing a RGBColor. 37 """ 38 r_parsed = input_parsers.parse_float_graph(r) 39 g_parsed = input_parsers.parse_float_graph(g) 40 b_parsed = input_parsers.parse_float_graph(b) 41 result = _internal.r_g_b_color_from_components_internal(r_parsed, g_parsed, b_parsed) 42 43 return RGBColor(result)
RGB Color from Components
Given the r, g and b creates the color
Args: r: Graph of Float g: Graph of Float b: Graph of Float
Returns: Graph: A graph node producing a RGBColor.
45 def passthrough(self) -> RGBColor: 46 """RGB Color Passthrough 47 48 Responds with the value provided. Doing nothing to it. 49 50 Returns: 51 Graph: A graph node producing a RGBColor. 52 """ 53 value_parsed = input_parsers.parse_graph(self) 54 result = _internal.r_g_b_color_passthrough_internal(value_parsed) 55 56 return RGBColor(result)
RGB Color Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a RGBColor.
15class RenderStyle(_GraphWrapper): 16 """Combining a fill and brush into a render style to create a 2D object.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context) 21 22 23 @staticmethod 24 def brush_and_fill(brush, fill) -> RenderStyle: 25 """Render Style Brush and Fill 26 27 Creates a render style that will have a brush and a fill. 28 29 Args: 30 brush: Graph of Brush 31 fill: Graph of Fill 32 33 34 Returns: 35 Graph: A graph node producing a RenderStyle. 36 """ 37 brush_parsed = input_parsers.parse_graph(brush) 38 fill_parsed = input_parsers.parse_graph(fill) 39 result = _internal.render_style_brush_and_fill_internal(brush_parsed, fill_parsed) 40 41 return RenderStyle(result) 42 43 @staticmethod 44 def brush_only(brush) -> RenderStyle: 45 """Render Style Brush Only 46 47 Creates a render style that will only have a brush. 48 49 Args: 50 brush: Graph of Brush 51 52 53 Returns: 54 Graph: A graph node producing a RenderStyle. 55 """ 56 brush_parsed = input_parsers.parse_graph(brush) 57 result = _internal.render_style_brush_only_internal(brush_parsed) 58 59 return RenderStyle(result) 60 61 @staticmethod 62 def fill_only(fill) -> RenderStyle: 63 """Render Style Fill Only 64 65 Creates a render style that will only have a fill. 66 67 Args: 68 fill: Graph of Fill 69 70 71 Returns: 72 Graph: A graph node producing a RenderStyle. 73 """ 74 fill_parsed = input_parsers.parse_graph(fill) 75 result = _internal.render_style_fill_only_internal(fill_parsed) 76 77 return RenderStyle(result)
Combining a fill and brush into a render style to create a 2D object.
23 @staticmethod 24 def brush_and_fill(brush, fill) -> RenderStyle: 25 """Render Style Brush and Fill 26 27 Creates a render style that will have a brush and a fill. 28 29 Args: 30 brush: Graph of Brush 31 fill: Graph of Fill 32 33 34 Returns: 35 Graph: A graph node producing a RenderStyle. 36 """ 37 brush_parsed = input_parsers.parse_graph(brush) 38 fill_parsed = input_parsers.parse_graph(fill) 39 result = _internal.render_style_brush_and_fill_internal(brush_parsed, fill_parsed) 40 41 return RenderStyle(result)
Render Style Brush and Fill
Creates a render style that will have a brush and a fill.
Args: brush: Graph of Brush fill: Graph of Fill
Returns: Graph: A graph node producing a RenderStyle.
43 @staticmethod 44 def brush_only(brush) -> RenderStyle: 45 """Render Style Brush Only 46 47 Creates a render style that will only have a brush. 48 49 Args: 50 brush: Graph of Brush 51 52 53 Returns: 54 Graph: A graph node producing a RenderStyle. 55 """ 56 brush_parsed = input_parsers.parse_graph(brush) 57 result = _internal.render_style_brush_only_internal(brush_parsed) 58 59 return RenderStyle(result)
Render Style Brush Only
Creates a render style that will only have a brush.
Args: brush: Graph of Brush
Returns: Graph: A graph node producing a RenderStyle.
61 @staticmethod 62 def fill_only(fill) -> RenderStyle: 63 """Render Style Fill Only 64 65 Creates a render style that will only have a fill. 66 67 Args: 68 fill: Graph of Fill 69 70 71 Returns: 72 Graph: A graph node producing a RenderStyle. 73 """ 74 fill_parsed = input_parsers.parse_graph(fill) 75 result = _internal.render_style_fill_only_internal(fill_parsed) 76 77 return RenderStyle(result)
Render Style Fill Only
Creates a render style that will only have a fill.
Args: fill: Graph of Fill
Returns: Graph: A graph node producing a RenderStyle.
24class Sequence(_GraphWrapper): 25 """A sequence with a bunch of operations to render a movie""" 26 27 def execute(self, context): 28 29 return self._inner.execute(context).as_sequence() 30 31 32 def adjust_speed(self, factor) -> Sequence: 33 """Sequence Adjust Speed 34 35 Adjusts the speed of a sequence by a speed factor. 36 37 Args: 38 factor: Graph of Float 39 40 41 Returns: 42 Graph: A graph node producing a Sequence. 43 """ 44 sequence_parsed = input_parsers.parse_graph(self) 45 factor_parsed = input_parsers.parse_float_graph(factor) 46 result = _internal.sequence_adjust_speed_internal(sequence_parsed, factor_parsed) 47 48 return Sequence(result) 49 50 def composition_at_time(self, time) -> composition.Composition: 51 """Sequence Composition at Time 52 53 Extracts an composition from a sequence at a particular time 54 55 Args: 56 time: Graph of Float 57 58 59 Returns: 60 Graph: A graph node producing a Composition. 61 """ 62 sequence_parsed = input_parsers.parse_graph(self) 63 time_parsed = input_parsers.parse_float_graph(time) 64 result = _internal.sequence_composition_at_time_internal(sequence_parsed, time_parsed) 65 66 from .composition import Composition 67 return Composition(result) 68 69 def concatenate(self, sequence_2) -> Sequence: 70 """Sequence Concatenate 71 72 Given two sequences, combines them into one by playing the first one and then the second one. 73 74 Args: 75 sequence_2: Graph of Sequence 76 77 78 Returns: 79 Graph: A graph node producing a Sequence. 80 """ 81 sequence_1_parsed = input_parsers.parse_graph(self) 82 sequence_2_parsed = input_parsers.parse_graph(sequence_2) 83 result = _internal.sequence_concatenate_internal(sequence_1_parsed, sequence_2_parsed) 84 85 return Sequence(result) 86 87 def duration(self) -> float.Float: 88 """Sequence Duration 89 90 Gets the duration from a sequence 91 92 Returns: 93 Graph: A graph node producing a Float. 94 """ 95 sequence_parsed = input_parsers.parse_graph(self) 96 result = _internal.sequence_duration_internal(sequence_parsed) 97 98 from .float import Float 99 return Float(result) 100 101 @staticmethod 102 def from_composition_and_duration(composition, duration) -> Sequence: 103 """Sequence from Composition and Duration 104 105 Give a Composition and a Duration. Returns a Sequence. 106 107 Args: 108 composition: Graph of Composition 109 duration: Graph of Float 110 111 112 Returns: 113 Graph: A graph node producing a Sequence. 114 """ 115 composition_parsed = input_parsers.parse_graph(composition) 116 duration_parsed = input_parsers.parse_float_graph(duration) 117 result = _internal.sequence_from_composition_and_duration_internal(composition_parsed, duration_parsed) 118 119 return Sequence(result) 120 121 @staticmethod 122 def from_url(url) -> Sequence: 123 """Sequence from URL 124 125 Creates a sequence from URL 126 127 Args: 128 url: Graph of String 129 130 131 Returns: 132 Graph: A graph node producing a Sequence. 133 """ 134 url_parsed = input_parsers.parse_string_graph(url) 135 result = _internal.sequence_from_u_r_l_internal(url_parsed) 136 137 return Sequence(result) 138 139 @staticmethod 140 def graph(duration, time, frame) -> Sequence: 141 """Sequence Graph 142 143 Creates a sequence that runs the graph to get the duration and the frame for each time. 144 145 Args: 146 duration: Graph of Float 147 time: Graph of Float 148 frame: Graph of Composition 149 150 151 Returns: 152 Graph: A graph node producing a Sequence. 153 """ 154 duration_parsed = input_parsers.parse_float_graph(duration) 155 time_parsed = input_parsers.parse_float_graph(time) 156 frame_parsed = input_parsers.parse_graph(frame) 157 result = _internal.sequence_graph_internal(duration_parsed, time_parsed, frame_parsed) 158 159 return Sequence(result) 160 161 def grayscale(self) -> Sequence: 162 """Sequence Grayscale 163 164 Creates a sequence that converts the video to grayscale 165 166 Returns: 167 Graph: A graph node producing a Sequence. 168 """ 169 sequence_parsed = input_parsers.parse_graph(self) 170 result = _internal.sequence_grayscale_internal(sequence_parsed) 171 172 return Sequence(result) 173 174 def passthrough(self) -> Sequence: 175 """Sequence Passthrough 176 177 Responds with the value provided. Doing nothing to it. 178 179 Returns: 180 Graph: A graph node producing a Sequence. 181 """ 182 value_parsed = input_parsers.parse_graph(self) 183 result = _internal.sequence_passthrough_internal(value_parsed) 184 185 return Sequence(result) 186 187 def reverse(self) -> Sequence: 188 """Sequence Reverse 189 190 Given a sequence. Reverses it. 191 192 Returns: 193 Graph: A graph node producing a Sequence. 194 """ 195 sequence_parsed = input_parsers.parse_graph(self) 196 result = _internal.sequence_reverse_internal(sequence_parsed) 197 198 return Sequence(result) 199 200 def to_mp4(self, frame_rate) -> byte_list.ByteList: 201 """Sequence To MP4 202 203 Given a sequence. Converts it to MP4 return a local file to where that MP4 is stored. 204 205 Args: 206 frame_rate: Graph of Int 207 208 209 Returns: 210 Graph: A graph node producing a ByteList. 211 """ 212 sequence_parsed = input_parsers.parse_graph(self) 213 frame_rate_parsed = input_parsers.parse_int_graph(frame_rate) 214 result = _internal.sequence_to_mp4_internal(sequence_parsed, frame_rate_parsed) 215 216 from .byte_list import ByteList 217 return ByteList(result) 218 219 def trim_back(self, amount) -> Sequence: 220 """Sequence Trim Back 221 222 Given a sequence. Trims from the back. 223 224 Args: 225 amount: Graph of Float 226 227 228 Returns: 229 Graph: A graph node producing a Sequence. 230 """ 231 sequence_parsed = input_parsers.parse_graph(self) 232 amount_parsed = input_parsers.parse_float_graph(amount) 233 result = _internal.sequence_trim_back_internal(sequence_parsed, amount_parsed) 234 235 return Sequence(result) 236 237 def trim_front(self, amount) -> Sequence: 238 """Sequence Trim Front 239 240 Given a sequence. Trims from the front. 241 242 Args: 243 amount: Graph of Float 244 245 246 Returns: 247 Graph: A graph node producing a Sequence. 248 """ 249 sequence_parsed = input_parsers.parse_graph(self) 250 amount_parsed = input_parsers.parse_float_graph(amount) 251 result = _internal.sequence_trim_front_internal(sequence_parsed, amount_parsed) 252 253 return Sequence(result)
A sequence with a bunch of operations to render a movie
32 def adjust_speed(self, factor) -> Sequence: 33 """Sequence Adjust Speed 34 35 Adjusts the speed of a sequence by a speed factor. 36 37 Args: 38 factor: Graph of Float 39 40 41 Returns: 42 Graph: A graph node producing a Sequence. 43 """ 44 sequence_parsed = input_parsers.parse_graph(self) 45 factor_parsed = input_parsers.parse_float_graph(factor) 46 result = _internal.sequence_adjust_speed_internal(sequence_parsed, factor_parsed) 47 48 return Sequence(result)
Sequence Adjust Speed
Adjusts the speed of a sequence by a speed factor.
Args: factor: Graph of Float
Returns: Graph: A graph node producing a Sequence.
50 def composition_at_time(self, time) -> composition.Composition: 51 """Sequence Composition at Time 52 53 Extracts an composition from a sequence at a particular time 54 55 Args: 56 time: Graph of Float 57 58 59 Returns: 60 Graph: A graph node producing a Composition. 61 """ 62 sequence_parsed = input_parsers.parse_graph(self) 63 time_parsed = input_parsers.parse_float_graph(time) 64 result = _internal.sequence_composition_at_time_internal(sequence_parsed, time_parsed) 65 66 from .composition import Composition 67 return Composition(result)
Sequence Composition at Time
Extracts an composition from a sequence at a particular time
Args: time: Graph of Float
Returns: Graph: A graph node producing a Composition.
69 def concatenate(self, sequence_2) -> Sequence: 70 """Sequence Concatenate 71 72 Given two sequences, combines them into one by playing the first one and then the second one. 73 74 Args: 75 sequence_2: Graph of Sequence 76 77 78 Returns: 79 Graph: A graph node producing a Sequence. 80 """ 81 sequence_1_parsed = input_parsers.parse_graph(self) 82 sequence_2_parsed = input_parsers.parse_graph(sequence_2) 83 result = _internal.sequence_concatenate_internal(sequence_1_parsed, sequence_2_parsed) 84 85 return Sequence(result)
Sequence Concatenate
Given two sequences, combines them into one by playing the first one and then the second one.
Args: sequence_2: Graph of Sequence
Returns: Graph: A graph node producing a Sequence.
87 def duration(self) -> float.Float: 88 """Sequence Duration 89 90 Gets the duration from a sequence 91 92 Returns: 93 Graph: A graph node producing a Float. 94 """ 95 sequence_parsed = input_parsers.parse_graph(self) 96 result = _internal.sequence_duration_internal(sequence_parsed) 97 98 from .float import Float 99 return Float(result)
Sequence Duration
Gets the duration from a sequence
Returns: Graph: A graph node producing a Float.
101 @staticmethod 102 def from_composition_and_duration(composition, duration) -> Sequence: 103 """Sequence from Composition and Duration 104 105 Give a Composition and a Duration. Returns a Sequence. 106 107 Args: 108 composition: Graph of Composition 109 duration: Graph of Float 110 111 112 Returns: 113 Graph: A graph node producing a Sequence. 114 """ 115 composition_parsed = input_parsers.parse_graph(composition) 116 duration_parsed = input_parsers.parse_float_graph(duration) 117 result = _internal.sequence_from_composition_and_duration_internal(composition_parsed, duration_parsed) 118 119 return Sequence(result)
Sequence from Composition and Duration
Give a Composition and a Duration. Returns a Sequence.
Args: composition: Graph of Composition duration: Graph of Float
Returns: Graph: A graph node producing a Sequence.
121 @staticmethod 122 def from_url(url) -> Sequence: 123 """Sequence from URL 124 125 Creates a sequence from URL 126 127 Args: 128 url: Graph of String 129 130 131 Returns: 132 Graph: A graph node producing a Sequence. 133 """ 134 url_parsed = input_parsers.parse_string_graph(url) 135 result = _internal.sequence_from_u_r_l_internal(url_parsed) 136 137 return Sequence(result)
Sequence from URL
Creates a sequence from URL
Args: url: Graph of String
Returns: Graph: A graph node producing a Sequence.
139 @staticmethod 140 def graph(duration, time, frame) -> Sequence: 141 """Sequence Graph 142 143 Creates a sequence that runs the graph to get the duration and the frame for each time. 144 145 Args: 146 duration: Graph of Float 147 time: Graph of Float 148 frame: Graph of Composition 149 150 151 Returns: 152 Graph: A graph node producing a Sequence. 153 """ 154 duration_parsed = input_parsers.parse_float_graph(duration) 155 time_parsed = input_parsers.parse_float_graph(time) 156 frame_parsed = input_parsers.parse_graph(frame) 157 result = _internal.sequence_graph_internal(duration_parsed, time_parsed, frame_parsed) 158 159 return Sequence(result)
Sequence Graph
Creates a sequence that runs the graph to get the duration and the frame for each time.
Args: duration: Graph of Float time: Graph of Float frame: Graph of Composition
Returns: Graph: A graph node producing a Sequence.
161 def grayscale(self) -> Sequence: 162 """Sequence Grayscale 163 164 Creates a sequence that converts the video to grayscale 165 166 Returns: 167 Graph: A graph node producing a Sequence. 168 """ 169 sequence_parsed = input_parsers.parse_graph(self) 170 result = _internal.sequence_grayscale_internal(sequence_parsed) 171 172 return Sequence(result)
Sequence Grayscale
Creates a sequence that converts the video to grayscale
Returns: Graph: A graph node producing a Sequence.
174 def passthrough(self) -> Sequence: 175 """Sequence Passthrough 176 177 Responds with the value provided. Doing nothing to it. 178 179 Returns: 180 Graph: A graph node producing a Sequence. 181 """ 182 value_parsed = input_parsers.parse_graph(self) 183 result = _internal.sequence_passthrough_internal(value_parsed) 184 185 return Sequence(result)
Sequence Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a Sequence.
187 def reverse(self) -> Sequence: 188 """Sequence Reverse 189 190 Given a sequence. Reverses it. 191 192 Returns: 193 Graph: A graph node producing a Sequence. 194 """ 195 sequence_parsed = input_parsers.parse_graph(self) 196 result = _internal.sequence_reverse_internal(sequence_parsed) 197 198 return Sequence(result)
Sequence Reverse
Given a sequence. Reverses it.
Returns: Graph: A graph node producing a Sequence.
200 def to_mp4(self, frame_rate) -> byte_list.ByteList: 201 """Sequence To MP4 202 203 Given a sequence. Converts it to MP4 return a local file to where that MP4 is stored. 204 205 Args: 206 frame_rate: Graph of Int 207 208 209 Returns: 210 Graph: A graph node producing a ByteList. 211 """ 212 sequence_parsed = input_parsers.parse_graph(self) 213 frame_rate_parsed = input_parsers.parse_int_graph(frame_rate) 214 result = _internal.sequence_to_mp4_internal(sequence_parsed, frame_rate_parsed) 215 216 from .byte_list import ByteList 217 return ByteList(result)
Sequence To MP4
Given a sequence. Converts it to MP4 return a local file to where that MP4 is stored.
Args: frame_rate: Graph of Int
Returns: Graph: A graph node producing a ByteList.
219 def trim_back(self, amount) -> Sequence: 220 """Sequence Trim Back 221 222 Given a sequence. Trims from the back. 223 224 Args: 225 amount: Graph of Float 226 227 228 Returns: 229 Graph: A graph node producing a Sequence. 230 """ 231 sequence_parsed = input_parsers.parse_graph(self) 232 amount_parsed = input_parsers.parse_float_graph(amount) 233 result = _internal.sequence_trim_back_internal(sequence_parsed, amount_parsed) 234 235 return Sequence(result)
Sequence Trim Back
Given a sequence. Trims from the back.
Args: amount: Graph of Float
Returns: Graph: A graph node producing a Sequence.
237 def trim_front(self, amount) -> Sequence: 238 """Sequence Trim Front 239 240 Given a sequence. Trims from the front. 241 242 Args: 243 amount: Graph of Float 244 245 246 Returns: 247 Graph: A graph node producing a Sequence. 248 """ 249 sequence_parsed = input_parsers.parse_graph(self) 250 amount_parsed = input_parsers.parse_float_graph(amount) 251 result = _internal.sequence_trim_front_internal(sequence_parsed, amount_parsed) 252 253 return Sequence(result)
Sequence Trim Front
Given a sequence. Trims from the front.
Args: amount: Graph of Float
Returns: Graph: A graph node producing a Sequence.
20class String(_GraphWrapper): 21 """a string""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context).as_string() 26 27 28 @staticmethod 29 def if_(bool, input_1, input_2) -> String: 30 """String If 31 32 If the boolean is true returns input 1, otherwise input 2. Type: String 33 34 Args: 35 bool: Graph of Bool 36 input_1: Graph of String 37 input_2: Graph of String 38 39 40 Returns: 41 Graph: A graph node producing a String. 42 """ 43 bool_parsed = input_parsers.parse_bool_graph(bool) 44 input_1_parsed = input_parsers.parse_string_graph(input_1) 45 input_2_parsed = input_parsers.parse_string_graph(input_2) 46 result = _internal.string_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 47 48 return String(result) 49 50 def upload_file_path(self, url, content_type) -> void.Void: 51 """Upload File Path 52 53 Reads a file from a local path on disk and uploads its contents to a URL via PUT request 54 55 Args: 56 url: Graph of String 57 content_type: Graph of String 58 59 60 Returns: 61 Graph: A graph node producing a Void. 62 """ 63 path_parsed = input_parsers.parse_string_graph(self) 64 url_parsed = input_parsers.parse_string_graph(url) 65 content_type_parsed = input_parsers.parse_string_graph(content_type) 66 result = _internal.upload_file_path_internal(path_parsed, url_parsed, content_type_parsed) 67 68 from .void import Void 69 return Void(result)
a string
28 @staticmethod 29 def if_(bool, input_1, input_2) -> String: 30 """String If 31 32 If the boolean is true returns input 1, otherwise input 2. Type: String 33 34 Args: 35 bool: Graph of Bool 36 input_1: Graph of String 37 input_2: Graph of String 38 39 40 Returns: 41 Graph: A graph node producing a String. 42 """ 43 bool_parsed = input_parsers.parse_bool_graph(bool) 44 input_1_parsed = input_parsers.parse_string_graph(input_1) 45 input_2_parsed = input_parsers.parse_string_graph(input_2) 46 result = _internal.string_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 47 48 return String(result)
String If
If the boolean is true returns input 1, otherwise input 2. Type: String
Args: bool: Graph of Bool input_1: Graph of String input_2: Graph of String
Returns: Graph: A graph node producing a String.
50 def upload_file_path(self, url, content_type) -> void.Void: 51 """Upload File Path 52 53 Reads a file from a local path on disk and uploads its contents to a URL via PUT request 54 55 Args: 56 url: Graph of String 57 content_type: Graph of String 58 59 60 Returns: 61 Graph: A graph node producing a Void. 62 """ 63 path_parsed = input_parsers.parse_string_graph(self) 64 url_parsed = input_parsers.parse_string_graph(url) 65 content_type_parsed = input_parsers.parse_string_graph(content_type) 66 result = _internal.upload_file_path_internal(path_parsed, url_parsed, content_type_parsed) 67 68 from .void import Void 69 return Void(result)
Upload File Path
Reads a file from a local path on disk and uploads its contents to a URL via PUT request
Args: url: Graph of String content_type: Graph of String
Returns: Graph: A graph node producing a Void.
20class Transform2(_GraphWrapper): 21 """A 2D Transformation""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context) 26 27 28 @staticmethod 29 def identity() -> Transform2: 30 """Transform 2D Identity 31 32 Creates a 2D transform that is the identity transform. 33 34 Returns: 35 Graph: A graph node producing a Transform2. 36 """ 37 result = _internal.transform2_identity_internal() 38 39 return Transform2(result) 40 41 @staticmethod 42 def if_(bool, input_1, input_2) -> Transform2: 43 """Transform 2D If 44 45 If the boolean is true returns input 1, otherwise input 2. Type: Transform2 46 47 Args: 48 bool: Graph of Bool 49 input_1: Graph of Transform2 50 input_2: Graph of Transform2 51 52 53 Returns: 54 Graph: A graph node producing a Transform2. 55 """ 56 bool_parsed = input_parsers.parse_bool_graph(bool) 57 input_1_parsed = input_parsers.parse_graph(input_1) 58 input_2_parsed = input_parsers.parse_graph(input_2) 59 result = _internal.transform2_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 60 61 return Transform2(result) 62 63 def rotate(self, angle) -> Transform2: 64 """Transform 2D Rotate 65 66 Applies a rotation to a 2D transform. Rotation is in radians. 67 68 Args: 69 angle: Graph of Float 70 71 72 Returns: 73 Graph: A graph node producing a Transform2. 74 """ 75 transform_parsed = input_parsers.parse_graph(self) 76 angle_parsed = input_parsers.parse_float_graph(angle) 77 result = _internal.transform2_rotate_internal(transform_parsed, angle_parsed) 78 79 return Transform2(result) 80 81 def scale(self, scale) -> Transform2: 82 """Transform 2D Scale 83 84 Applies a scale to a 2D transform. 85 86 Args: 87 scale: Graph of Vector2f 88 89 90 Returns: 91 Graph: A graph node producing a Transform2. 92 """ 93 transform_parsed = input_parsers.parse_graph(self) 94 scale_parsed = input_parsers.parse_graph(scale) 95 result = _internal.transform2_scale_internal(transform_parsed, scale_parsed) 96 97 return Transform2(result) 98 99 def to_list(self) -> transform2_list.Transform2List: 100 """Transform 2D to List 101 102 Converts Transform 2D to a single item list 103 104 Returns: 105 Graph: A graph node producing a Transform2List. 106 """ 107 item_parsed = input_parsers.parse_graph(self) 108 result = _internal.transform2_to_list_internal(item_parsed) 109 110 from .transform2_list import Transform2List 111 return Transform2List(result) 112 113 def translation(self, translation) -> Transform2: 114 """Transform 2D Translation 115 116 Applies a translation to a 2D transform. 117 118 Args: 119 translation: Graph of Vector2f 120 121 122 Returns: 123 Graph: A graph node producing a Transform2. 124 """ 125 transform_parsed = input_parsers.parse_graph(self) 126 translation_parsed = input_parsers.parse_graph(translation) 127 result = _internal.transform2_translation_internal(transform_parsed, translation_parsed) 128 129 return Transform2(result)
A 2D Transformation
28 @staticmethod 29 def identity() -> Transform2: 30 """Transform 2D Identity 31 32 Creates a 2D transform that is the identity transform. 33 34 Returns: 35 Graph: A graph node producing a Transform2. 36 """ 37 result = _internal.transform2_identity_internal() 38 39 return Transform2(result)
Transform 2D Identity
Creates a 2D transform that is the identity transform.
Returns: Graph: A graph node producing a Transform2.
41 @staticmethod 42 def if_(bool, input_1, input_2) -> Transform2: 43 """Transform 2D If 44 45 If the boolean is true returns input 1, otherwise input 2. Type: Transform2 46 47 Args: 48 bool: Graph of Bool 49 input_1: Graph of Transform2 50 input_2: Graph of Transform2 51 52 53 Returns: 54 Graph: A graph node producing a Transform2. 55 """ 56 bool_parsed = input_parsers.parse_bool_graph(bool) 57 input_1_parsed = input_parsers.parse_graph(input_1) 58 input_2_parsed = input_parsers.parse_graph(input_2) 59 result = _internal.transform2_if_internal(bool_parsed, input_1_parsed, input_2_parsed) 60 61 return Transform2(result)
Transform 2D If
If the boolean is true returns input 1, otherwise input 2. Type: Transform2
Args: bool: Graph of Bool input_1: Graph of Transform2 input_2: Graph of Transform2
Returns: Graph: A graph node producing a Transform2.
63 def rotate(self, angle) -> Transform2: 64 """Transform 2D Rotate 65 66 Applies a rotation to a 2D transform. Rotation is in radians. 67 68 Args: 69 angle: Graph of Float 70 71 72 Returns: 73 Graph: A graph node producing a Transform2. 74 """ 75 transform_parsed = input_parsers.parse_graph(self) 76 angle_parsed = input_parsers.parse_float_graph(angle) 77 result = _internal.transform2_rotate_internal(transform_parsed, angle_parsed) 78 79 return Transform2(result)
Transform 2D Rotate
Applies a rotation to a 2D transform. Rotation is in radians.
Args: angle: Graph of Float
Returns: Graph: A graph node producing a Transform2.
81 def scale(self, scale) -> Transform2: 82 """Transform 2D Scale 83 84 Applies a scale to a 2D transform. 85 86 Args: 87 scale: Graph of Vector2f 88 89 90 Returns: 91 Graph: A graph node producing a Transform2. 92 """ 93 transform_parsed = input_parsers.parse_graph(self) 94 scale_parsed = input_parsers.parse_graph(scale) 95 result = _internal.transform2_scale_internal(transform_parsed, scale_parsed) 96 97 return Transform2(result)
Transform 2D Scale
Applies a scale to a 2D transform.
Args: scale: Graph of Vector2f
Returns: Graph: A graph node producing a Transform2.
99 def to_list(self) -> transform2_list.Transform2List: 100 """Transform 2D to List 101 102 Converts Transform 2D to a single item list 103 104 Returns: 105 Graph: A graph node producing a Transform2List. 106 """ 107 item_parsed = input_parsers.parse_graph(self) 108 result = _internal.transform2_to_list_internal(item_parsed) 109 110 from .transform2_list import Transform2List 111 return Transform2List(result)
Transform 2D to List
Converts Transform 2D to a single item list
Returns: Graph: A graph node producing a Transform2List.
113 def translation(self, translation) -> Transform2: 114 """Transform 2D Translation 115 116 Applies a translation to a 2D transform. 117 118 Args: 119 translation: Graph of Vector2f 120 121 122 Returns: 123 Graph: A graph node producing a Transform2. 124 """ 125 transform_parsed = input_parsers.parse_graph(self) 126 translation_parsed = input_parsers.parse_graph(translation) 127 result = _internal.transform2_translation_internal(transform_parsed, translation_parsed) 128 129 return Transform2(result)
Transform 2D Translation
Applies a translation to a 2D transform.
Args: translation: Graph of Vector2f
Returns: Graph: A graph node producing a Transform2.
15class Transform2List(_GraphWrapper): 16 """List of Transform 2Ds""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
List of Transform 2Ds
20class Vector2f(_GraphWrapper): 21 """A vector with two elements of Floats""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context).as_vector2f() 26 27 28 def add(self, rhs) -> Vector2f: 29 """Vector 2 Float Add 30 31 Add two Vector 2s of Floats 32 33 Args: 34 rhs: Graph of Vector2f 35 36 37 Returns: 38 Graph: A graph node producing a Vector2f. 39 """ 40 lhs_parsed = input_parsers.parse_graph(self) 41 rhs_parsed = input_parsers.parse_graph(rhs) 42 result = _internal.vector2f_add_internal(lhs_parsed, rhs_parsed) 43 44 return Vector2f(result) 45 46 @staticmethod 47 def from_components(x, y) -> Vector2f: 48 """Vector 2 Float from Components 49 50 Given an x and y creates a vector. 51 52 Args: 53 x: Graph of Float 54 y: Graph of Float 55 56 57 Returns: 58 Graph: A graph node producing a Vector2f. 59 """ 60 x_parsed = input_parsers.parse_float_graph(x) 61 y_parsed = input_parsers.parse_float_graph(y) 62 result = _internal.vector2f_from_components_internal(x_parsed, y_parsed) 63 64 return Vector2f(result) 65 66 def normalize(self) -> Vector2f: 67 """Vector 2 Float Normalize 68 69 Normalizes a Vector. Converting it's length to 1. 70 71 Returns: 72 Graph: A graph node producing a Vector2f. 73 """ 74 vector_parsed = input_parsers.parse_graph(self) 75 result = _internal.vector2f_normalize_internal(vector_parsed) 76 77 return Vector2f(result) 78 79 def passthrough(self) -> Vector2f: 80 """Vector 2 Float Passthrough 81 82 Responds with the value provided. Doing nothing to it. 83 84 Returns: 85 Graph: A graph node producing a Vector2f. 86 """ 87 value_parsed = input_parsers.parse_graph(self) 88 result = _internal.vector2f_passthrough_internal(value_parsed) 89 90 return Vector2f(result) 91 92 def scalar_multiply(self, scalar) -> Vector2f: 93 """Vector 2 Float Scalar Multiply 94 95 Multiplies each element of the Vector as a scalar 96 97 Args: 98 scalar: Graph of Float 99 100 101 Returns: 102 Graph: A graph node producing a Vector2f. 103 """ 104 vector_parsed = input_parsers.parse_graph(self) 105 scalar_parsed = input_parsers.parse_float_graph(scalar) 106 result = _internal.vector2f_scalar_multiply_internal(vector_parsed, scalar_parsed) 107 108 return Vector2f(result) 109 110 def x(self) -> float.Float: 111 """Vector 2 Float get X 112 113 Retrieves the X component of a Vector 2 Float. 114 115 Returns: 116 Graph: A graph node producing a Float. 117 """ 118 vector_parsed = input_parsers.parse_graph(self) 119 result = _internal.vector2f_x_internal(vector_parsed) 120 121 from .float import Float 122 return Float(result) 123 124 def y(self) -> float.Float: 125 """Vector 2 Float get Y 126 127 Retrieves the Y component of a Vector 2 Float. 128 129 Returns: 130 Graph: A graph node producing a Float. 131 """ 132 vector_parsed = input_parsers.parse_graph(self) 133 result = _internal.vector2f_y_internal(vector_parsed) 134 135 from .float import Float 136 return Float(result)
A vector with two elements of Floats
28 def add(self, rhs) -> Vector2f: 29 """Vector 2 Float Add 30 31 Add two Vector 2s of Floats 32 33 Args: 34 rhs: Graph of Vector2f 35 36 37 Returns: 38 Graph: A graph node producing a Vector2f. 39 """ 40 lhs_parsed = input_parsers.parse_graph(self) 41 rhs_parsed = input_parsers.parse_graph(rhs) 42 result = _internal.vector2f_add_internal(lhs_parsed, rhs_parsed) 43 44 return Vector2f(result)
Vector 2 Float Add
Add two Vector 2s of Floats
Args: rhs: Graph of Vector2f
Returns: Graph: A graph node producing a Vector2f.
46 @staticmethod 47 def from_components(x, y) -> Vector2f: 48 """Vector 2 Float from Components 49 50 Given an x and y creates a vector. 51 52 Args: 53 x: Graph of Float 54 y: Graph of Float 55 56 57 Returns: 58 Graph: A graph node producing a Vector2f. 59 """ 60 x_parsed = input_parsers.parse_float_graph(x) 61 y_parsed = input_parsers.parse_float_graph(y) 62 result = _internal.vector2f_from_components_internal(x_parsed, y_parsed) 63 64 return Vector2f(result)
Vector 2 Float from Components
Given an x and y creates a vector.
Args: x: Graph of Float y: Graph of Float
Returns: Graph: A graph node producing a Vector2f.
66 def normalize(self) -> Vector2f: 67 """Vector 2 Float Normalize 68 69 Normalizes a Vector. Converting it's length to 1. 70 71 Returns: 72 Graph: A graph node producing a Vector2f. 73 """ 74 vector_parsed = input_parsers.parse_graph(self) 75 result = _internal.vector2f_normalize_internal(vector_parsed) 76 77 return Vector2f(result)
Vector 2 Float Normalize
Normalizes a Vector. Converting it's length to 1.
Returns: Graph: A graph node producing a Vector2f.
79 def passthrough(self) -> Vector2f: 80 """Vector 2 Float Passthrough 81 82 Responds with the value provided. Doing nothing to it. 83 84 Returns: 85 Graph: A graph node producing a Vector2f. 86 """ 87 value_parsed = input_parsers.parse_graph(self) 88 result = _internal.vector2f_passthrough_internal(value_parsed) 89 90 return Vector2f(result)
Vector 2 Float Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a Vector2f.
92 def scalar_multiply(self, scalar) -> Vector2f: 93 """Vector 2 Float Scalar Multiply 94 95 Multiplies each element of the Vector as a scalar 96 97 Args: 98 scalar: Graph of Float 99 100 101 Returns: 102 Graph: A graph node producing a Vector2f. 103 """ 104 vector_parsed = input_parsers.parse_graph(self) 105 scalar_parsed = input_parsers.parse_float_graph(scalar) 106 result = _internal.vector2f_scalar_multiply_internal(vector_parsed, scalar_parsed) 107 108 return Vector2f(result)
Vector 2 Float Scalar Multiply
Multiplies each element of the Vector as a scalar
Args: scalar: Graph of Float
Returns: Graph: A graph node producing a Vector2f.
110 def x(self) -> float.Float: 111 """Vector 2 Float get X 112 113 Retrieves the X component of a Vector 2 Float. 114 115 Returns: 116 Graph: A graph node producing a Float. 117 """ 118 vector_parsed = input_parsers.parse_graph(self) 119 result = _internal.vector2f_x_internal(vector_parsed) 120 121 from .float import Float 122 return Float(result)
Vector 2 Float get X
Retrieves the X component of a Vector 2 Float.
Returns: Graph: A graph node producing a Float.
124 def y(self) -> float.Float: 125 """Vector 2 Float get Y 126 127 Retrieves the Y component of a Vector 2 Float. 128 129 Returns: 130 Graph: A graph node producing a Float. 131 """ 132 vector_parsed = input_parsers.parse_graph(self) 133 result = _internal.vector2f_y_internal(vector_parsed) 134 135 from .float import Float 136 return Float(result)
Vector 2 Float get Y
Retrieves the Y component of a Vector 2 Float.
Returns: Graph: A graph node producing a Float.
22class Vector2i(_GraphWrapper): 23 """A vector with two elements of Ints""" 24 25 def execute(self, context): 26 27 return self._inner.execute(context).as_vector2i() 28 29 30 def vector2int_to_vector2float(self) -> vector2f.Vector2f: 31 """Vector 2 Int to Vector 2 Float 32 33 Given a Vector 2 Int. Creates a Vector 2 Float. 34 35 Returns: 36 Graph: A graph node producing a Vector2f. 37 """ 38 vector_parsed = input_parsers.parse_graph(self) 39 result = _internal.vector2_int_to_vector2_float_internal(vector_parsed) 40 41 from .vector2f import Vector2f 42 return Vector2f(result) 43 44 def add(self, rhs) -> Vector2i: 45 """Vector 2 Int Add 46 47 Add two Vector 2s of Ints 48 49 Args: 50 rhs: Graph of Vector2i 51 52 53 Returns: 54 Graph: A graph node producing a Vector2i. 55 """ 56 lhs_parsed = input_parsers.parse_graph(self) 57 rhs_parsed = input_parsers.parse_graph(rhs) 58 result = _internal.vector2i_add_internal(lhs_parsed, rhs_parsed) 59 60 return Vector2i(result) 61 62 @staticmethod 63 def from_components(x, y) -> Vector2i: 64 """Vector 2 Int from Components 65 66 Given an x and y creates a vector. 67 68 Args: 69 x: Graph of Int 70 y: Graph of Int 71 72 73 Returns: 74 Graph: A graph node producing a Vector2i. 75 """ 76 x_parsed = input_parsers.parse_int_graph(x) 77 y_parsed = input_parsers.parse_int_graph(y) 78 result = _internal.vector2i_from_components_internal(x_parsed, y_parsed) 79 80 return Vector2i(result) 81 82 def passthrough(self) -> Vector2i: 83 """Vector 2 Int Passthrough 84 85 Responds with the value provided. Doing nothing to it. 86 87 Returns: 88 Graph: A graph node producing a Vector2i. 89 """ 90 value_parsed = input_parsers.parse_graph(self) 91 result = _internal.vector2i_passthrough_internal(value_parsed) 92 93 return Vector2i(result) 94 95 def to_vector2f(self) -> vector2f.Vector2f: 96 """Vector 2 Int to Vector 2 Float 97 98 Given a Vector 2 Int. Creates a Vector 2 Float. 99 100 Returns: 101 Graph: A graph node producing a Vector2f. 102 """ 103 vector_parsed = input_parsers.parse_graph(self) 104 result = _internal.vector2i_to_vector2f_internal(vector_parsed) 105 106 from .vector2f import Vector2f 107 return Vector2f(result) 108 109 def x(self) -> int.Int: 110 """Vector 2 Int get X 111 112 Retrieves the X component of a Vector 2 Int. 113 114 Returns: 115 Graph: A graph node producing a Int. 116 """ 117 vector_parsed = input_parsers.parse_graph(self) 118 result = _internal.vector2i_x_internal(vector_parsed) 119 120 from .int import Int 121 return Int(result) 122 123 def y(self) -> int.Int: 124 """Vector 2 Int get Y 125 126 Retrieves the Y component of a Vector 2 Int. 127 128 Returns: 129 Graph: A graph node producing a Int. 130 """ 131 vector_parsed = input_parsers.parse_graph(self) 132 result = _internal.vector2i_y_internal(vector_parsed) 133 134 from .int import Int 135 return Int(result)
A vector with two elements of Ints
30 def vector2int_to_vector2float(self) -> vector2f.Vector2f: 31 """Vector 2 Int to Vector 2 Float 32 33 Given a Vector 2 Int. Creates a Vector 2 Float. 34 35 Returns: 36 Graph: A graph node producing a Vector2f. 37 """ 38 vector_parsed = input_parsers.parse_graph(self) 39 result = _internal.vector2_int_to_vector2_float_internal(vector_parsed) 40 41 from .vector2f import Vector2f 42 return Vector2f(result)
Vector 2 Int to Vector 2 Float
Given a Vector 2 Int. Creates a Vector 2 Float.
Returns: Graph: A graph node producing a Vector2f.
44 def add(self, rhs) -> Vector2i: 45 """Vector 2 Int Add 46 47 Add two Vector 2s of Ints 48 49 Args: 50 rhs: Graph of Vector2i 51 52 53 Returns: 54 Graph: A graph node producing a Vector2i. 55 """ 56 lhs_parsed = input_parsers.parse_graph(self) 57 rhs_parsed = input_parsers.parse_graph(rhs) 58 result = _internal.vector2i_add_internal(lhs_parsed, rhs_parsed) 59 60 return Vector2i(result)
Vector 2 Int Add
Add two Vector 2s of Ints
Args: rhs: Graph of Vector2i
Returns: Graph: A graph node producing a Vector2i.
62 @staticmethod 63 def from_components(x, y) -> Vector2i: 64 """Vector 2 Int from Components 65 66 Given an x and y creates a vector. 67 68 Args: 69 x: Graph of Int 70 y: Graph of Int 71 72 73 Returns: 74 Graph: A graph node producing a Vector2i. 75 """ 76 x_parsed = input_parsers.parse_int_graph(x) 77 y_parsed = input_parsers.parse_int_graph(y) 78 result = _internal.vector2i_from_components_internal(x_parsed, y_parsed) 79 80 return Vector2i(result)
Vector 2 Int from Components
Given an x and y creates a vector.
Args: x: Graph of Int y: Graph of Int
Returns: Graph: A graph node producing a Vector2i.
82 def passthrough(self) -> Vector2i: 83 """Vector 2 Int Passthrough 84 85 Responds with the value provided. Doing nothing to it. 86 87 Returns: 88 Graph: A graph node producing a Vector2i. 89 """ 90 value_parsed = input_parsers.parse_graph(self) 91 result = _internal.vector2i_passthrough_internal(value_parsed) 92 93 return Vector2i(result)
Vector 2 Int Passthrough
Responds with the value provided. Doing nothing to it.
Returns: Graph: A graph node producing a Vector2i.
95 def to_vector2f(self) -> vector2f.Vector2f: 96 """Vector 2 Int to Vector 2 Float 97 98 Given a Vector 2 Int. Creates a Vector 2 Float. 99 100 Returns: 101 Graph: A graph node producing a Vector2f. 102 """ 103 vector_parsed = input_parsers.parse_graph(self) 104 result = _internal.vector2i_to_vector2f_internal(vector_parsed) 105 106 from .vector2f import Vector2f 107 return Vector2f(result)
Vector 2 Int to Vector 2 Float
Given a Vector 2 Int. Creates a Vector 2 Float.
Returns: Graph: A graph node producing a Vector2f.
109 def x(self) -> int.Int: 110 """Vector 2 Int get X 111 112 Retrieves the X component of a Vector 2 Int. 113 114 Returns: 115 Graph: A graph node producing a Int. 116 """ 117 vector_parsed = input_parsers.parse_graph(self) 118 result = _internal.vector2i_x_internal(vector_parsed) 119 120 from .int import Int 121 return Int(result)
Vector 2 Int get X
Retrieves the X component of a Vector 2 Int.
Returns: Graph: A graph node producing a Int.
123 def y(self) -> int.Int: 124 """Vector 2 Int get Y 125 126 Retrieves the Y component of a Vector 2 Int. 127 128 Returns: 129 Graph: A graph node producing a Int. 130 """ 131 vector_parsed = input_parsers.parse_graph(self) 132 result = _internal.vector2i_y_internal(vector_parsed) 133 134 from .int import Int 135 return Int(result)
Vector 2 Int get Y
Retrieves the Y component of a Vector 2 Int.
Returns: Graph: A graph node producing a Int.
20class Vector3f(_GraphWrapper): 21 """A vector with three elements of Float""" 22 23 def execute(self, context): 24 25 return self._inner.execute(context).as_vector3f() 26 27 28 def add(self, rhs) -> Vector3f: 29 """Vector 3 Float Add 30 31 Add two Vector 3s of Floats 32 33 Args: 34 rhs: Graph of Vector3f 35 36 37 Returns: 38 Graph: A graph node producing a Vector3f. 39 """ 40 lhs_parsed = input_parsers.parse_graph(self) 41 rhs_parsed = input_parsers.parse_graph(rhs) 42 result = _internal.vector3f_add_internal(lhs_parsed, rhs_parsed) 43 44 return Vector3f(result) 45 46 @staticmethod 47 def from_components(x, y, z) -> Vector3f: 48 """Vector 3 Float from Components 49 50 Given an x, y and z creates a vector floats. 51 52 Args: 53 x: Graph of Float 54 y: Graph of Float 55 z: Graph of Float 56 57 58 Returns: 59 Graph: A graph node producing a Vector3f. 60 """ 61 x_parsed = input_parsers.parse_float_graph(x) 62 y_parsed = input_parsers.parse_float_graph(y) 63 z_parsed = input_parsers.parse_float_graph(z) 64 result = _internal.vector3f_from_components_internal(x_parsed, y_parsed, z_parsed) 65 66 return Vector3f(result) 67 68 def normalize(self) -> Vector3f: 69 """Vector 3 Normalize 70 71 Normalizes a Vector 3 Float. Converting it's length to 1. 72 73 Returns: 74 Graph: A graph node producing a Vector3f. 75 """ 76 vector_parsed = input_parsers.parse_graph(self) 77 result = _internal.vector3f_normalize_internal(vector_parsed) 78 79 return Vector3f(result) 80 81 def x(self) -> float.Float: 82 """Vector 3D Float X 83 84 Gets the value in the x component for the provided vector 85 86 Returns: 87 Graph: A graph node producing a Float. 88 """ 89 vector_parsed = input_parsers.parse_graph(self) 90 result = _internal.vector3f_x_internal(vector_parsed) 91 92 from .float import Float 93 return Float(result) 94 95 def y(self) -> float.Float: 96 """Vector 3D Y Float 97 98 Gets the value in the y component for the provided vector 99 100 Returns: 101 Graph: A graph node producing a Float. 102 """ 103 vector_parsed = input_parsers.parse_graph(self) 104 result = _internal.vector3f_y_internal(vector_parsed) 105 106 from .float import Float 107 return Float(result) 108 109 def z(self) -> float.Float: 110 """Vector 3D Float Z 111 112 Gets the value in the z component for the provided vector 113 114 Returns: 115 Graph: A graph node producing a Float. 116 """ 117 vector_parsed = input_parsers.parse_graph(self) 118 result = _internal.vector3f_z_internal(vector_parsed) 119 120 from .float import Float 121 return Float(result)
A vector with three elements of Float
28 def add(self, rhs) -> Vector3f: 29 """Vector 3 Float Add 30 31 Add two Vector 3s of Floats 32 33 Args: 34 rhs: Graph of Vector3f 35 36 37 Returns: 38 Graph: A graph node producing a Vector3f. 39 """ 40 lhs_parsed = input_parsers.parse_graph(self) 41 rhs_parsed = input_parsers.parse_graph(rhs) 42 result = _internal.vector3f_add_internal(lhs_parsed, rhs_parsed) 43 44 return Vector3f(result)
Vector 3 Float Add
Add two Vector 3s of Floats
Args: rhs: Graph of Vector3f
Returns: Graph: A graph node producing a Vector3f.
46 @staticmethod 47 def from_components(x, y, z) -> Vector3f: 48 """Vector 3 Float from Components 49 50 Given an x, y and z creates a vector floats. 51 52 Args: 53 x: Graph of Float 54 y: Graph of Float 55 z: Graph of Float 56 57 58 Returns: 59 Graph: A graph node producing a Vector3f. 60 """ 61 x_parsed = input_parsers.parse_float_graph(x) 62 y_parsed = input_parsers.parse_float_graph(y) 63 z_parsed = input_parsers.parse_float_graph(z) 64 result = _internal.vector3f_from_components_internal(x_parsed, y_parsed, z_parsed) 65 66 return Vector3f(result)
Vector 3 Float from Components
Given an x, y and z creates a vector floats.
Args: x: Graph of Float y: Graph of Float z: Graph of Float
Returns: Graph: A graph node producing a Vector3f.
68 def normalize(self) -> Vector3f: 69 """Vector 3 Normalize 70 71 Normalizes a Vector 3 Float. Converting it's length to 1. 72 73 Returns: 74 Graph: A graph node producing a Vector3f. 75 """ 76 vector_parsed = input_parsers.parse_graph(self) 77 result = _internal.vector3f_normalize_internal(vector_parsed) 78 79 return Vector3f(result)
Vector 3 Normalize
Normalizes a Vector 3 Float. Converting it's length to 1.
Returns: Graph: A graph node producing a Vector3f.
81 def x(self) -> float.Float: 82 """Vector 3D Float X 83 84 Gets the value in the x component for the provided vector 85 86 Returns: 87 Graph: A graph node producing a Float. 88 """ 89 vector_parsed = input_parsers.parse_graph(self) 90 result = _internal.vector3f_x_internal(vector_parsed) 91 92 from .float import Float 93 return Float(result)
Vector 3D Float X
Gets the value in the x component for the provided vector
Returns: Graph: A graph node producing a Float.
95 def y(self) -> float.Float: 96 """Vector 3D Y Float 97 98 Gets the value in the y component for the provided vector 99 100 Returns: 101 Graph: A graph node producing a Float. 102 """ 103 vector_parsed = input_parsers.parse_graph(self) 104 result = _internal.vector3f_y_internal(vector_parsed) 105 106 from .float import Float 107 return Float(result)
Vector 3D Y Float
Gets the value in the y component for the provided vector
Returns: Graph: A graph node producing a Float.
109 def z(self) -> float.Float: 110 """Vector 3D Float Z 111 112 Gets the value in the z component for the provided vector 113 114 Returns: 115 Graph: A graph node producing a Float. 116 """ 117 vector_parsed = input_parsers.parse_graph(self) 118 result = _internal.vector3f_z_internal(vector_parsed) 119 120 from .float import Float 121 return Float(result)
Vector 3D Float Z
Gets the value in the z component for the provided vector
Returns: Graph: A graph node producing a Float.
15class Void(_GraphWrapper): 16 """The absence of a value""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
The absence of a value
15class XYZ(_GraphWrapper): 16 """A color in the CIE XYZ color space.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
A color in the CIE XYZ color space.
15class XYZA(_GraphWrapper): 16 """A CIE XYZ color with an alpha component.""" 17 18 def execute(self, context): 19 20 return self._inner.execute(context)
A CIE XYZ color with an alpha component.