# 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 (
    InputColor,
    InputFloat,
    InputString,
    InputVector,
)

from ...builder.socket import (
    ColorSocket,
    FloatSocket,
    ShaderSocket,
    StringSocket,
    VectorSocket,
)


class PrincipledVolume(BaseNode):
    """
    Combine all volume shading components into a single easy to use node

    Parameters
    ----------
    color : InputColor
        Color
    color_attribute : InputString
        Color Attribute
    density : InputFloat
        Density
    density_attribute : InputString
        Density Attribute
    anisotropy : InputFloat
        Anisotropy
    absorption_color : InputColor
        Absorption Color
    emission_strength : InputFloat
        Emission Strength
    emission_color : InputColor
        Emission Color
    blackbody_intensity : InputFloat
        Blackbody Intensity
    blackbody_tint : InputColor
        Blackbody Tint
    temperature : InputFloat
        Temperature
    temperature_attribute : InputString
        Temperature Attribute
    weight : InputFloat
        Weight

    Inputs
    ------
    i.color : ColorSocket
        Color
    i.color_attribute : StringSocket
        Color Attribute
    i.density : FloatSocket
        Density
    i.density_attribute : StringSocket
        Density Attribute
    i.anisotropy : FloatSocket
        Anisotropy
    i.absorption_color : ColorSocket
        Absorption Color
    i.emission_strength : FloatSocket
        Emission Strength
    i.emission_color : ColorSocket
        Emission Color
    i.blackbody_intensity : FloatSocket
        Blackbody Intensity
    i.blackbody_tint : ColorSocket
        Blackbody Tint
    i.temperature : FloatSocket
        Temperature
    i.temperature_attribute : StringSocket
        Temperature Attribute
    i.weight : FloatSocket
        Weight

    Outputs
    -------
    o.volume : ShaderSocket
        Volume
    """

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

    class _Inputs(SocketAccessor):
        color: ColorSocket
        """Color"""
        color_attribute: StringSocket
        """Color Attribute"""
        density: FloatSocket
        """Density"""
        density_attribute: StringSocket
        """Density Attribute"""
        anisotropy: FloatSocket
        """Anisotropy"""
        absorption_color: ColorSocket
        """Absorption Color"""
        emission_strength: FloatSocket
        """Emission Strength"""
        emission_color: ColorSocket
        """Emission Color"""
        blackbody_intensity: FloatSocket
        """Blackbody Intensity"""
        blackbody_tint: ColorSocket
        """Blackbody Tint"""
        temperature: FloatSocket
        """Temperature"""
        temperature_attribute: StringSocket
        """Temperature Attribute"""
        weight: FloatSocket
        """Weight"""

    class _Outputs(SocketAccessor):
        volume: ShaderSocket
        """Volume"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        color: InputColor = None,
        color_attribute: InputString = "",
        density: InputFloat = 1.0,
        density_attribute: InputString = "density",
        anisotropy: InputFloat = 0.0,
        absorption_color: InputColor = None,
        emission_strength: InputFloat = 0.0,
        emission_color: InputColor = None,
        blackbody_intensity: InputFloat = 0.0,
        blackbody_tint: InputColor = None,
        temperature: InputFloat = 1000.0,
        temperature_attribute: InputString = "temperature",
        weight: InputFloat = 0.0,
    ):
        super().__init__()
        key_args = {
            "Color": color,
            "Color Attribute": color_attribute,
            "Density": density,
            "Density Attribute": density_attribute,
            "Anisotropy": anisotropy,
            "Absorption Color": absorption_color,
            "Emission Strength": emission_strength,
            "Emission Color": emission_color,
            "Blackbody Intensity": blackbody_intensity,
            "Blackbody Tint": blackbody_tint,
            "Temperature": temperature,
            "Temperature Attribute": temperature_attribute,
            "Weight": weight,
        }

        self._establish_links(**key_args)


class VolumeAbsorption(BaseNode):
    """
    Absorb light as it passes through the volume

    Parameters
    ----------
    color : InputColor
        Color
    density : InputFloat
        Density
    weight : InputFloat
        Weight

    Inputs
    ------
    i.color : ColorSocket
        Color
    i.density : FloatSocket
        Density
    i.weight : FloatSocket
        Weight

    Outputs
    -------
    o.volume : ShaderSocket
        Volume
    """

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

    class _Inputs(SocketAccessor):
        color: ColorSocket
        """Color"""
        density: FloatSocket
        """Density"""
        weight: FloatSocket
        """Weight"""

    class _Outputs(SocketAccessor):
        volume: ShaderSocket
        """Volume"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        color: InputColor = None,
        density: InputFloat = 1.0,
        weight: InputFloat = 0.0,
    ):
        super().__init__()
        key_args = {"Color": color, "Density": density, "Weight": weight}

        self._establish_links(**key_args)


class VolumeCoefficients(BaseNode):
    """
    Model all three physical processes in a volume, represented by their coefficients

    Parameters
    ----------
    weight : InputFloat
        Weight
    absorption_coefficients : InputVector
        Absorption Coefficients
    scatter_coefficients : InputVector
        Scatter Coefficients
    anisotropy : InputFloat
        Anisotropy
    ior : InputFloat
        IOR
    backscatter : InputFloat
        Backscatter
    alpha : InputFloat
        Alpha
    diameter : InputFloat
        Diameter
    emission_coefficients : InputVector
        Emission Coefficients

    Inputs
    ------
    i.weight : FloatSocket
        Weight
    i.absorption_coefficients : VectorSocket
        Absorption Coefficients
    i.scatter_coefficients : VectorSocket
        Scatter Coefficients
    i.anisotropy : FloatSocket
        Anisotropy
    i.ior : FloatSocket
        IOR
    i.backscatter : FloatSocket
        Backscatter
    i.alpha : FloatSocket
        Alpha
    i.diameter : FloatSocket
        Diameter
    i.emission_coefficients : VectorSocket
        Emission Coefficients

    Outputs
    -------
    o.volume : ShaderSocket
        Volume
    """

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

    class _Inputs(SocketAccessor):
        weight: FloatSocket
        """Weight"""
        absorption_coefficients: VectorSocket
        """Absorption Coefficients"""
        scatter_coefficients: VectorSocket
        """Scatter Coefficients"""
        anisotropy: FloatSocket
        """Anisotropy"""
        ior: FloatSocket
        """IOR"""
        backscatter: FloatSocket
        """Backscatter"""
        alpha: FloatSocket
        """Alpha"""
        diameter: FloatSocket
        """Diameter"""
        emission_coefficients: VectorSocket
        """Emission Coefficients"""

    class _Outputs(SocketAccessor):
        volume: ShaderSocket
        """Volume"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        weight: InputFloat = 0.0,
        absorption_coefficients: InputVector = None,
        scatter_coefficients: InputVector = None,
        anisotropy: InputFloat = 0.0,
        ior: InputFloat = 1.33,
        backscatter: InputFloat = 0.1,
        alpha: InputFloat = 0.5,
        diameter: InputFloat = 20.0,
        emission_coefficients: InputVector = None,
        *,
        phase: Literal[
            "HENYEY_GREENSTEIN", "FOURNIER_FORAND", "DRAINE", "RAYLEIGH", "MIE"
        ] = "HENYEY_GREENSTEIN",
    ):
        super().__init__()
        key_args = {
            "Weight": weight,
            "Absorption Coefficients": absorption_coefficients,
            "Scatter Coefficients": scatter_coefficients,
            "Anisotropy": anisotropy,
            "IOR": ior,
            "Backscatter": backscatter,
            "Alpha": alpha,
            "Diameter": diameter,
            "Emission Coefficients": emission_coefficients,
        }
        self.phase = phase
        self._establish_links(**key_args)

    @property
    def phase(
        self,
    ) -> Literal["HENYEY_GREENSTEIN", "FOURNIER_FORAND", "DRAINE", "RAYLEIGH", "MIE"]:
        return self.node.phase

    @phase.setter
    def phase(
        self,
        value: Literal[
            "HENYEY_GREENSTEIN", "FOURNIER_FORAND", "DRAINE", "RAYLEIGH", "MIE"
        ],
    ):
        self.node.phase = value


class VolumeInfo(BaseNode):
    """
    Read volume data attributes from volume grids

    Outputs
    -------
    o.color : ColorSocket
        Color
    o.density : FloatSocket
        Density
    o.flame : FloatSocket
        Flame
    o.temperature : FloatSocket
        Temperature
    """

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

    class _Inputs(SocketAccessor):
        pass

    class _Outputs(SocketAccessor):
        color: ColorSocket
        """Color"""
        density: FloatSocket
        """Density"""
        flame: FloatSocket
        """Flame"""
        temperature: FloatSocket
        """Temperature"""

    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 VolumeScatter(BaseNode):
    """
    Scatter light as it passes through the volume, often used to add fog to a scene

    Parameters
    ----------
    color : InputColor
        Color
    density : InputFloat
        Density
    anisotropy : InputFloat
        Anisotropy
    ior : InputFloat
        IOR
    backscatter : InputFloat
        Backscatter
    alpha : InputFloat
        Alpha
    diameter : InputFloat
        Diameter
    weight : InputFloat
        Weight

    Inputs
    ------
    i.color : ColorSocket
        Color
    i.density : FloatSocket
        Density
    i.anisotropy : FloatSocket
        Anisotropy
    i.ior : FloatSocket
        IOR
    i.backscatter : FloatSocket
        Backscatter
    i.alpha : FloatSocket
        Alpha
    i.diameter : FloatSocket
        Diameter
    i.weight : FloatSocket
        Weight

    Outputs
    -------
    o.volume : ShaderSocket
        Volume
    """

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

    class _Inputs(SocketAccessor):
        color: ColorSocket
        """Color"""
        density: FloatSocket
        """Density"""
        anisotropy: FloatSocket
        """Anisotropy"""
        ior: FloatSocket
        """IOR"""
        backscatter: FloatSocket
        """Backscatter"""
        alpha: FloatSocket
        """Alpha"""
        diameter: FloatSocket
        """Diameter"""
        weight: FloatSocket
        """Weight"""

    class _Outputs(SocketAccessor):
        volume: ShaderSocket
        """Volume"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        color: InputColor = None,
        density: InputFloat = 1.0,
        anisotropy: InputFloat = 0.0,
        ior: InputFloat = 1.33,
        backscatter: InputFloat = 0.1,
        alpha: InputFloat = 0.5,
        diameter: InputFloat = 20.0,
        weight: InputFloat = 0.0,
        *,
        phase: Literal[
            "HENYEY_GREENSTEIN", "FOURNIER_FORAND", "DRAINE", "RAYLEIGH", "MIE"
        ] = "HENYEY_GREENSTEIN",
    ):
        super().__init__()
        key_args = {
            "Color": color,
            "Density": density,
            "Anisotropy": anisotropy,
            "IOR": ior,
            "Backscatter": backscatter,
            "Alpha": alpha,
            "Diameter": diameter,
            "Weight": weight,
        }
        self.phase = phase
        self._establish_links(**key_args)

    @property
    def phase(
        self,
    ) -> Literal["HENYEY_GREENSTEIN", "FOURNIER_FORAND", "DRAINE", "RAYLEIGH", "MIE"]:
        return self.node.phase

    @phase.setter
    def phase(
        self,
        value: Literal[
            "HENYEY_GREENSTEIN", "FOURNIER_FORAND", "DRAINE", "RAYLEIGH", "MIE"
        ],
    ):
        self.node.phase = value
