# Auto-generated by `python -m gen` — do not edit manually.

from typing import TYPE_CHECKING, Literal

import bpy

from ...builder import BaseNode, SocketAccessor

from ...types import (
    InputBoolean,
    InputColor,
    InputFloat,
    InputFont,
    InputInteger,
    InputMenu,
    InputString,
)

from ...builder.socket import (
    BooleanSocket,
    ColorSocket,
    FloatSocket,
    FontSocket,
    IntegerSocket,
    MenuSocket,
    StringSocket,
    VectorSocket,
)


class BlankImage(BaseNode):
    """
    Returns an image with the given size and constant color

    Parameters
    ----------
    color : InputColor
        Color
    size : InputInteger
        Size

    Inputs
    ------
    i.color : ColorSocket
        Color
    i.size : IntegerSocket
        Size

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeBlankImage"
    node: bpy.types.CompositorNodeBlankImage

    class _Inputs(SocketAccessor):
        color: ColorSocket
        """Color"""
        size: IntegerSocket
        """Size"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        color: InputColor = None,
        size: InputInteger = None,
    ):
        super().__init__()
        key_args = {"Color": color, "Size": size}

        self._establish_links(**key_args)


class BokehImage(BaseNode):
    """
    Generate image with bokeh shape for use with the Bokeh Blur filter node

    Parameters
    ----------
    flaps : InputInteger
        Flaps
    angle : InputFloat
        Angle
    roundness : InputFloat
        Roundness
    catadioptric_size : InputFloat
        Catadioptric Size
    color_shift : InputFloat
        Color Shift

    Inputs
    ------
    i.flaps : IntegerSocket
        Flaps
    i.angle : FloatSocket
        Angle
    i.roundness : FloatSocket
        Roundness
    i.catadioptric_size : FloatSocket
        Catadioptric Size
    i.color_shift : FloatSocket
        Color Shift

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeBokehImage"
    node: bpy.types.CompositorNodeBokehImage

    class _Inputs(SocketAccessor):
        flaps: IntegerSocket
        """Flaps"""
        angle: FloatSocket
        """Angle"""
        roundness: FloatSocket
        """Roundness"""
        catadioptric_size: FloatSocket
        """Catadioptric Size"""
        color_shift: FloatSocket
        """Color Shift"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        flaps: InputInteger = 5,
        angle: InputFloat = 0.0,
        roundness: InputFloat = 0.0,
        catadioptric_size: InputFloat = 0.0,
        color_shift: InputFloat = 0.0,
    ):
        super().__init__()
        key_args = {
            "Flaps": flaps,
            "Angle": angle,
            "Roundness": roundness,
            "Catadioptric Size": catadioptric_size,
            "Color Shift": color_shift,
        }

        self._establish_links(**key_args)


class Color(BaseNode):
    """
    A color picker

    Outputs
    -------
    o.color : ColorSocket
        Color
    """

    _bl_idname = "CompositorNodeRGB"
    node: bpy.types.CompositorNodeRGB

    class _Inputs(SocketAccessor):
        pass

    class _Outputs(SocketAccessor):
        color: ColorSocket
        """Color"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self):
        super().__init__()
        key_args = {}

        self._establish_links(**key_args)


class ImageCoordinates(BaseNode):
    """
    Returns the coordinates of the pixels of an image

    Parameters
    ----------
    image : InputColor
        Image

    Inputs
    ------
    i.image : ColorSocket
        Image

    Outputs
    -------
    o.uniform : VectorSocket
        Uniform
    o.normalized : VectorSocket
        Normalized
    o.pixel : IntegerSocket
        Pixel
    """

    _bl_idname = "CompositorNodeImageCoordinates"
    node: bpy.types.CompositorNodeImageCoordinates

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    class _Outputs(SocketAccessor):
        uniform: VectorSocket
        """Uniform"""
        normalized: VectorSocket
        """Normalized"""
        pixel: IntegerSocket
        """Pixel"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self, image: InputColor = None):
        super().__init__()
        key_args = {"Image": image}

        self._establish_links(**key_args)


class ImageInfo(BaseNode):
    """
    Returns information about an image

    Parameters
    ----------
    image : InputColor
        Image

    Inputs
    ------
    i.image : ColorSocket
        Image

    Outputs
    -------
    o.dimensions : IntegerSocket
        Dimensions
    o.resolution : IntegerSocket
        Resolution
    o.location : VectorSocket
        Location
    o.rotation : FloatSocket
        Rotation
    o.scale : VectorSocket
        Scale
    """

    _bl_idname = "CompositorNodeImageInfo"
    node: bpy.types.CompositorNodeImageInfo

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    class _Outputs(SocketAccessor):
        dimensions: IntegerSocket
        """Dimensions"""
        resolution: IntegerSocket
        """Resolution"""
        location: VectorSocket
        """Location"""
        rotation: FloatSocket
        """Rotation"""
        scale: VectorSocket
        """Scale"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self, image: InputColor = None):
        super().__init__()
        key_args = {"Image": image}

        self._establish_links(**key_args)


class Mask(BaseNode):
    """
    Input mask from a mask data-block, created in the image editor

    Parameters
    ----------
    size_source : InputMenu | Literal['Scene Size', 'Fixed', 'Fixed/Scene']
        Size Source
    size_x : InputInteger
        Size X
    size_y : InputInteger
        Size Y
    feather : InputBoolean
        Feather
    motion_blur : InputBoolean
        Motion Blur
    motion_blur_samples : InputInteger
        Samples
    motion_blur_shutter : InputFloat
        Shutter

    Inputs
    ------
    i.size_source : MenuSocket
        Size Source
    i.size_x : IntegerSocket
        Size X
    i.size_y : IntegerSocket
        Size Y
    i.feather : BooleanSocket
        Feather
    i.motion_blur : BooleanSocket
        Motion Blur
    i.motion_blur_samples : IntegerSocket
        Samples
    i.motion_blur_shutter : FloatSocket
        Shutter

    Outputs
    -------
    o.mask : FloatSocket
        Mask
    """

    _bl_idname = "CompositorNodeMask"
    node: bpy.types.CompositorNodeMask

    class _Inputs(SocketAccessor):
        size_source: MenuSocket
        """Size Source"""
        size_x: IntegerSocket
        """Size X"""
        size_y: IntegerSocket
        """Size Y"""
        feather: BooleanSocket
        """Feather"""
        motion_blur: BooleanSocket
        """Motion Blur"""
        motion_blur_samples: IntegerSocket
        """Samples"""
        motion_blur_shutter: FloatSocket
        """Shutter"""

    class _Outputs(SocketAccessor):
        mask: FloatSocket
        """Mask"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        size_source: InputMenu
        | Literal["Scene Size", "Fixed", "Fixed/Scene"] = "Scene Size",
        size_x: InputInteger = 256,
        size_y: InputInteger = 256,
        feather: InputBoolean = True,
        motion_blur: InputBoolean = False,
        motion_blur_samples: InputInteger = 16,
        motion_blur_shutter: InputFloat = 0.5,
    ):
        super().__init__()
        key_args = {
            "Size Source": size_source,
            "Size X": size_x,
            "Size Y": size_y,
            "Feather": feather,
            "Motion Blur": motion_blur,
            "Motion Blur Samples": motion_blur_samples,
            "Motion Blur Shutter": motion_blur_shutter,
        }

        self._establish_links(**key_args)


class MovieClip(BaseNode):
    """
    Input image or movie from a movie clip data-block, typically used for motion tracking

    Outputs
    -------
    o.image : ColorSocket
        Image
    o.alpha : FloatSocket
        Alpha
    o.offset_x : FloatSocket
        Offset X
    o.offset_y : FloatSocket
        Offset Y
    o.scale : FloatSocket
        Scale
    o.angle : FloatSocket
        Angle
    """

    _bl_idname = "CompositorNodeMovieClip"
    node: bpy.types.CompositorNodeMovieClip

    class _Inputs(SocketAccessor):
        pass

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        alpha: FloatSocket
        """Alpha"""
        offset_x: FloatSocket
        """Offset X"""
        offset_y: FloatSocket
        """Offset Y"""
        scale: FloatSocket
        """Scale"""
        angle: FloatSocket
        """Angle"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self):
        super().__init__()
        key_args = {}

        self._establish_links(**key_args)


class Normal(BaseNode):
    """
    Input normalized normal values to other nodes in the tree

    Outputs
    -------
    o.normal : VectorSocket
        Normal
    """

    _bl_idname = "CompositorNodeNormal"
    node: bpy.types.CompositorNodeNormal

    class _Inputs(SocketAccessor):
        pass

    class _Outputs(SocketAccessor):
        normal: VectorSocket
        """Normal"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self):
        super().__init__()
        key_args = {}

        self._establish_links(**key_args)


class RenderLayers(BaseNode):
    """
    Input render passes from a scene render

    Outputs
    -------
    o.image : ColorSocket
        Image
    o.alpha : FloatSocket
        Alpha
    """

    _bl_idname = "CompositorNodeRLayers"
    node: bpy.types.CompositorNodeRLayers

    class _Inputs(SocketAccessor):
        pass

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        alpha: FloatSocket
        """Alpha"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self, layer: str = "ViewLayer"):
        super().__init__()
        key_args = {}
        self.layer = layer
        self._establish_links(**key_args)

    @property
    def layer(self) -> str:
        return self.node.layer

    @layer.setter
    def layer(self, value: str):
        self.node.layer = value  # ty: ignore[invalid-assignment]


class SceneTime(BaseNode):
    """
    Input the current scene time in seconds or frames

    Outputs
    -------
    o.seconds : FloatSocket
        Seconds
    o.frame : FloatSocket
        Frame
    """

    _bl_idname = "CompositorNodeSceneTime"
    node: bpy.types.CompositorNodeSceneTime

    class _Inputs(SocketAccessor):
        pass

    class _Outputs(SocketAccessor):
        seconds: FloatSocket
        """Seconds"""
        frame: FloatSocket
        """Frame"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self):
        super().__init__()
        key_args = {}

        self._establish_links(**key_args)


class SequencerStripInfo(BaseNode):
    """
    Returns information about the active strip of the modifier

    Outputs
    -------
    o.start_frame : IntegerSocket
        Start Frame
    o.end_frame : IntegerSocket
        End Frame
    o.location : VectorSocket
        Location
    o.rotation : FloatSocket
        Rotation
    o.scale : VectorSocket
        Scale
    """

    _bl_idname = "CompositorNodeSequencerStripInfo"
    node: bpy.types.CompositorNodeSequencerStripInfo

    class _Inputs(SocketAccessor):
        pass

    class _Outputs(SocketAccessor):
        start_frame: IntegerSocket
        """Start Frame"""
        end_frame: IntegerSocket
        """End Frame"""
        location: VectorSocket
        """Location"""
        rotation: FloatSocket
        """Rotation"""
        scale: VectorSocket
        """Scale"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self):
        super().__init__()
        key_args = {}

        self._establish_links(**key_args)


class StringToImage(BaseNode):
    """
    Generates an image containing the given paragraph of text

    Parameters
    ----------
    string : InputString
        String
    font : InputFont
        Font
    size : InputFloat
        Size
    horizontal_alignment : InputMenu | Literal['Left', 'Center', 'Right']
        Horizontal Alignment
    vertical_alignment : InputMenu | Literal['Top', 'Top Baseline', 'Middle', 'Bottom Baseline', 'Bottom']
        Vertical Alignment
    wrap : InputBoolean
        Wrap
    wrap_width : InputInteger
        Width

    Inputs
    ------
    i.string : StringSocket
        String
    i.font : FontSocket
        Font
    i.size : FloatSocket
        Size
    i.horizontal_alignment : MenuSocket
        Horizontal Alignment
    i.vertical_alignment : MenuSocket
        Vertical Alignment
    i.wrap : BooleanSocket
        Wrap
    i.wrap_width : IntegerSocket
        Width

    Outputs
    -------
    o.image : FloatSocket
        Image
    """

    _bl_idname = "CompositorNodeStringToImage"
    node: bpy.types.CompositorNodeStringToImage

    class _Inputs(SocketAccessor):
        string: StringSocket
        """String"""
        font: FontSocket
        """Font"""
        size: FloatSocket
        """Size"""
        horizontal_alignment: MenuSocket
        """Horizontal Alignment"""
        vertical_alignment: MenuSocket
        """Vertical Alignment"""
        wrap: BooleanSocket
        """Wrap"""
        wrap_width: IntegerSocket
        """Width"""

    class _Outputs(SocketAccessor):
        image: FloatSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        string: InputString = "",
        font: InputFont = None,
        size: InputFloat = 128.0,
        horizontal_alignment: InputMenu | Literal["Left", "Center", "Right"] = "Center",
        vertical_alignment: InputMenu
        | Literal[
            "Top", "Top Baseline", "Middle", "Bottom Baseline", "Bottom"
        ] = "Middle",
        wrap: InputBoolean = True,
        wrap_width: InputInteger = 1920,
    ):
        super().__init__()
        key_args = {
            "String": string,
            "Font": font,
            "Size": size,
            "Horizontal Alignment": horizontal_alignment,
            "Vertical Alignment": vertical_alignment,
            "Wrap": wrap,
            "Wrap Width": wrap_width,
        }

        self._establish_links(**key_args)


class TimeCurve(BaseNode):
    """
    Generate a factor value (from 0.0 to 1.0) between scene start and end time, using a curve mapping

    Parameters
    ----------
    start_frame : InputInteger
        Start Frame
    end_frame : InputInteger
        End Frame

    Inputs
    ------
    i.start_frame : IntegerSocket
        Start Frame
    i.end_frame : IntegerSocket
        End Frame

    Outputs
    -------
    o.fac : FloatSocket
        Factor
    """

    _bl_idname = "CompositorNodeTime"
    node: bpy.types.CompositorNodeTime

    class _Inputs(SocketAccessor):
        start_frame: IntegerSocket
        """Start Frame"""
        end_frame: IntegerSocket
        """End Frame"""

    class _Outputs(SocketAccessor):
        fac: FloatSocket
        """Factor"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        start_frame: InputInteger = 1,
        end_frame: InputInteger = 250,
    ):
        super().__init__()
        key_args = {"Start Frame": start_frame, "End Frame": end_frame}

        self._establish_links(**key_args)


class TrackPosition(BaseNode):
    """
    Provide information about motion tracking points, such as x and y values

    Parameters
    ----------
    mode : InputMenu | Literal['Absolute', 'Relative Start', 'Relative Frame', 'Absolute Frame']
        Mode
    frame : InputInteger
        Frame

    Inputs
    ------
    i.mode : MenuSocket
        Mode
    i.frame : IntegerSocket
        Frame

    Outputs
    -------
    o.x : FloatSocket
        X
    o.y : FloatSocket
        Y
    o.speed : VectorSocket
        Speed
    """

    _bl_idname = "CompositorNodeTrackPos"
    node: bpy.types.CompositorNodeTrackPos

    class _Inputs(SocketAccessor):
        mode: MenuSocket
        """Mode"""
        frame: IntegerSocket
        """Frame"""

    class _Outputs(SocketAccessor):
        x: FloatSocket
        """X"""
        y: FloatSocket
        """Y"""
        speed: VectorSocket
        """Speed"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        mode: InputMenu
        | Literal[
            "Absolute", "Relative Start", "Relative Frame", "Absolute Frame"
        ] = "Absolute",
        frame: InputInteger = 0,
        *,
        tracking_object: str = "",
        track_name: str = "",
    ):
        super().__init__()
        key_args = {"Mode": mode, "Frame": frame}
        self.tracking_object = tracking_object
        self.track_name = track_name
        self._establish_links(**key_args)

    @property
    def tracking_object(self) -> str:
        return self.node.tracking_object

    @tracking_object.setter
    def tracking_object(self, value: str):
        self.node.tracking_object = value

    @property
    def track_name(self) -> str:
        return self.node.track_name

    @track_name.setter
    def track_name(self, value: str):
        self.node.track_name = value
