C++ API Reference: MColorPickerUtilities Class Reference
Introduced in 2019.0
More...
#include <MColorPickerUtilities.h>
Introduced in 2019.0
2019.0: Introduced in this version.
Utilities for implementing Color Pickers. See also MColorMixingSpaceHelper
Color transform direction.
Enumerator kForward
apply the color transform
kInverse
invert the color transform
bool isRegisteredToColorPicking
(
QWidget *
widget )
static
Returns whether the widget registered to the Color Picking mechanism.
Note The widget could be either the registered one or one of its parent.
Parameters
[in] widget The widget to test
Note The widget could the one picked or one of its parent. It allows to register the third-party main window and click on a specific child of that window (instead of registering all children).
Returns true if widget is registered
Registers a widget that can be used to pick a color with an eye dropper.
Parameters
[in] widget The widget to register
[in] callback The callback to get a color at a specifc position
Note Registering a widget only means that itself or one of its children could be selected for the color computation.
The callback instance creation/deletion must be managed by the caller.
Returns status code
Status Codes:
MS::kSuccess operation successful
MS::kFailure operation failed - the callback object has already been registered
MS::kInvalidParameter invalid widget or callback object provided
MStatus unregisterFromColorPicking
(
QWidget *
widget )
static
Unregisters a widget that was registed with doRegisterToColorPicking.
Parameters
[in] widget The widget to unregister
Returns status code
Status Codes:
MS::kSuccess operation successful
MS::kFailure operation failed - the callback object has already been unregistered
MS::kInvalidParameter invalid callback object provided
Introduced in 2023.0
Applies a colour transform from the rendering colour space to the (display, view) space using the color management settings from Maya.
2023.0: Introduced in this version.
Parameters
[in] inputColor The input color to transform
[in] direction The direction of the transform,
Returns Returns the transformed color, or the input color unmodified if color management is turned off
Introduced in 2023.0
Run the eye dropper tool to pick a color on screen with the mouse.
2023.0: Introduced in this version.
Parameters
[out] returnedStatus MS::kFailure if a aborted, otherwise MS::kSuccess
Returns Returns the picked color. If cancelled, the color returned will have all components set to zero and returnedStatus will be set to MS::kFailure
const char * className
(
)
static
Returns the name of this class.
Returns The name of this class.
The documentation for this class was generated from the following files:
MColorPickerUtilities.h
MColorPickerUtilities.cpp