The color space global returns a structure that contains function pointers to the LightWave color space conversion functions. These functions allow the user to change their color values to those selected in the color space of LightWave.
Bases: object
Proxy of C++ PCore::LWColorSpaceFuncs class
Gets the file of the current color space of the type
specified, where it can be one of:
lwsdk.lwcst_viewer
Viewer color space.
lwsdk.lwcst_surface_color
Surface color space.
lwsdk.lwcst_palette_files
Palette files color space.
lwsdk.lwcst_8bit_files
8-bit files color space.
lwsdk.lwcst_float_files
Float files color space.
lwsdk.lwcst_alpha_files
Alpha files color space.
lwsdk.lwcst_output
Output files color space.
lwsdk.lwcst_output_alpha
Output alpha files color space.
lwsdk.lwcst_light_color
Light color space.
Gets the name of the current color space of the type
specified.
type
can be one of:
lwsdk.lwcst_viewer
Viewer color space.
lwsdk.lwcst_surface_color
Surface color space.
lwsdk.lwcst_palette_files
Palette files color space.
lwsdk.lwcst_8bit_files
8-bit files color space.
lwsdk.lwcst_float_files
Float files color space.
lwsdk.lwcst_alpha_files
Alpha files color space.
lwsdk.lwcst_output
Output files color space.
lwsdk.lwcst_output_alpha
Output alpha files color space.
lwsdk.lwcst_light_color
Light color space.
layer
can be one of:
lwsdk.lwcsl_RGB
RGB Channel.
lwsdk.lwcsl_Alpha
Alpha Channel.
space
can be one of:
lwsdk.lwcs_linear
LightWave linear color space.
lwsdk.lwcs_sRGB
Standard RGB color space.
lwsdk.lwcs_rec709
Recommendation BT.709, HDTV.
lwsdk.lwcs_cineon
Eastman Kodak Co.
lwsdk.lwcs_ciexyz
CIE XYZ.
Returns the color space setting of the specified color space type
.
type
can be one of:
lwsdk.LW_COLORSPACE_VIEWER
lwsdk.LW_COLORSPACE_SURFACE_COLOR
lwsdk.LW_COLORSPACE_LIGHT_COLOR
lwsdk.LW_COLORSPACE_PALETTE_FILES
lwsdk.LW_COLORSPACE_8BIT_FILES
lwsdk.LW_COLORSPACE_FLOAT_FILES
lwsdk.LW_COLORSPACE_ALPHA
lwsdk.LW_COLORSPACE_OUTPUT
lwsdk.LW_COLORSPACE_OUTPUT_ALPHA
lwsdk.LW_COLORSPACE_AUTO_SENSE
lwsdk.LW_COLORSPACE_CORRECT_OPENGL
lwsdk.LW_COLORSPACE_AFFECT_PICKER
lwsdk.LW_COLORSPACE_8BIT_TO_FLOAT
Returns the state of a color space check box.
type
can be one of:
lwsdk.LW_COLORSPACE_VIEWER
lwsdk.LW_COLORSPACE_SURFACE_COLOR
lwsdk.LW_COLORSPACE_LIGHT_COLOR
lwsdk.LW_COLORSPACE_PALETTE_FILES
lwsdk.LW_COLORSPACE_8BIT_FILES
lwsdk.LW_COLORSPACE_FLOAT_FILES
lwsdk.LW_COLORSPACE_ALPHA
lwsdk.LW_COLORSPACE_OUTPUT
lwsdk.LW_COLORSPACE_OUTPUT_ALPHA
lwsdk.LW_COLORSPACE_AUTO_SENSE
lwsdk.LW_COLORSPACE_CORRECT_OPENGL
lwsdk.LW_COLORSPACE_AFFECT_PICKER
lwsdk.LW_COLORSPACE_8BIT_TO_FLOAT
Used to convert from indexes of pop-ups to color spaces.
layer
can be one of:
lwsdk.lwcsl_RGB
RGB Channel.
lwsdk.lwcsl_Alpha
Alpha Channel.
File name.
Gets the name of the color space in the layer.
layer
can be one of:
lwsdk.lwcsl_RGB
RGB Channel.
lwsdk.lwcsl_Alpha
Alpha Channel.
Returns the color space of the given color space name
.
The return value will be one of:
lwsdk.lwcs_linear
LightWave linear color space.
lwsdk.lwcs_sRGB
Standard RGB color space.
lwsdk.lwcs_rec709
Recommendation BT.709, HDTV.
lwsdk.lwcs_cineon
Eastman Kodak Co.
lwsdk.lwcs_ciexyz
CIE XYZ.
Note that a return value of lwsdk.lwcs_linear
indicates there is no conversion.
Gets the number of loaded color spaces in the layer
.
layer
can be one of:
lwsdk.lwcsl_RGB
RGB Channel.
lwsdk.lwcsl_Alpha
Alpha Channel.
This function collapses the two-step process of first acquiring the conversion instance and function pointer using the SDK LWColorSpaceFuncs.getPixelConversionAlpha()
function to perform the color space conversion.
space
can be one of:
lwsdk.lwcs_linear
LightWave linear color space.
lwsdk.lwcs_sRGB
Standard RGB color space.
lwsdk.lwcs_rec709
Recommendation BT.709, HDTV.
lwsdk.lwcs_cineon
Eastman Kodak Co.
lwsdk.lwcs_ciexyz
CIE XYZ.
conversion
can be one of:
lwsdk.lwcsc_colorspaceToLinear
Convert from non-linear to linear.
lwsdk.lwcsc_linearToColorspace
Convert from linear to non-linear.
Note that the provided alpha
value can either be a 4-element sequence, or a single floating-point alpha value. The output value will mirror the input -- i.e., if you provide a sequence, a sequence will be returned, otherwise a single value will be returned.
This function collapses the two-step process of first acquiring the conversion instance and function pointer using the SDK LWColorSpaceFuncs.getPixelConversionRGB()
function to perform the color space conversion.
space
can be one of:
lwsdk.lwcs_linear
LightWave linear color space.
lwsdk.lwcs_sRGB
Standard RGB color space.
lwsdk.lwcs_rec709
Recommendation BT.709, HDTV.
lwsdk.lwcs_cineon
Eastman Kodak Co.
lwsdk.lwcs_ciexyz
CIE XYZ.
conversion
can be one of:
lwsdk.lwcsc_colorspaceToLinear
Convert from non-linear to linear.
lwsdk.lwcsc_linearToColorspace
Convert from linear to non-linear.
Note that the provided rgb
value can either be a 3-element sequence, or a single floating-point rgb value in the range 0.0-1.0. If you provide only a single color value, the remaining elements will use the same value (i.e., your RGB will be grey scaled). The output value will mirror the input -- i.e., if you provide a sequence, a sequence will be returned, otherwise a single value will be returned.
type
can be one of:
lwsdk.LW_COLORSPACE_VIEWER
lwsdk.LW_COLORSPACE_SURFACE_COLOR
lwsdk.LW_COLORSPACE_LIGHT_COLOR
lwsdk.LW_COLORSPACE_PALETTE_FILES
lwsdk.LW_COLORSPACE_8BIT_FILES
lwsdk.LW_COLORSPACE_FLOAT_FILES
lwsdk.LW_COLORSPACE_ALPHA
lwsdk.LW_COLORSPACE_OUTPUT
lwsdk.LW_COLORSPACE_OUTPUT_ALPHA
lwsdk.LW_COLORSPACE_AUTO_SENSE
lwsdk.LW_COLORSPACE_CORRECT_OPENGL
lwsdk.LW_COLORSPACE_AFFECT_PICKER
lwsdk.LW_COLORSPACE_8BIT_TO_FLOAT
space
can be one of:
lwsdk.lwcs_linear
LightWave linear color space.
lwsdk.lwcs_sRGB
Standard RGB color space.
lwsdk.lwcs_rec709
Recommendation BT.709, HDTV.
lwsdk.lwcs_cineon
Eastman Kodak Co.
lwsdk.lwcs_ciexyz
CIE XYZ.
Sets the state of a color space check box.
type
can be one of:
lwsdk.LW_COLORSPACE_VIEWER
lwsdk.LW_COLORSPACE_SURFACE_COLOR
lwsdk.LW_COLORSPACE_LIGHT_COLOR
lwsdk.LW_COLORSPACE_PALETTE_FILES
lwsdk.LW_COLORSPACE_8BIT_FILES
lwsdk.LW_COLORSPACE_FLOAT_FILES
lwsdk.LW_COLORSPACE_ALPHA
lwsdk.LW_COLORSPACE_OUTPUT
lwsdk.LW_COLORSPACE_OUTPUT_ALPHA
lwsdk.LW_COLORSPACE_AUTO_SENSE
lwsdk.LW_COLORSPACE_CORRECT_OPENGL
lwsdk.LW_COLORSPACE_AFFECT_PICKER
lwsdk.LW_COLORSPACE_8BIT_TO_FLOAT
space
can be one of:
lwsdk.lwcs_linear
LightWave linear color space.
lwsdk.lwcs_sRGB
Standard RGB color space.
lwsdk.lwcs_rec709
Recommendation BT.709, HDTV.
lwsdk.lwcs_cineon
Eastman Kodak Co.
lwsdk.lwcs_ciexyz
CIE XYZ.