Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_colortools.h')
-rw-r--r--source/blender/blenkernel/BKE_colortools.h75
1 files changed, 65 insertions, 10 deletions
diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h
index 109947cece4..17fb48cdd27 100644
--- a/source/blender/blenkernel/BKE_colortools.h
+++ b/source/blender/blenkernel/BKE_colortools.h
@@ -59,40 +59,85 @@ enum {
CURVEMAP_SLOPE_POS_NEG = 2,
};
+/**
+ * Reset the view for current curve.
+ */
void BKE_curvemapping_reset_view(struct CurveMapping *cumap);
void BKE_curvemap_reset(struct CurveMap *cuma, const struct rctf *clipr, int preset, int slope);
+/**
+ * Removes with flag set.
+ */
void BKE_curvemap_remove(struct CurveMap *cuma, const short flag);
+/**
+ * Remove specified point.
+ */
bool BKE_curvemap_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp);
struct CurveMapPoint *BKE_curvemap_insert(struct CurveMap *cuma, float x, float y);
+/**
+ * \param type: #eBezTriple_Handle
+ */
void BKE_curvemap_handle_set(struct CurveMap *cuma, int type);
+/**
+ * \note only does current curvemap!.
+ */
void BKE_curvemapping_changed(struct CurveMapping *cumap, const bool rem_doubles);
void BKE_curvemapping_changed_all(struct CurveMapping *cumap);
-/* call before _all_ evaluation functions */
+/**
+ * Call before _all_ evaluation functions.
+ */
void BKE_curvemapping_init(struct CurveMapping *cumap);
-/* keep these (const CurveMap) - to help with thread safety */
-/* single curve, no table check */
+/**
+ * Keep these `const CurveMap` - to help with thread safety.
+ * \note Single curve, no table check.
+ * \note Table should be verified.
+ */
float BKE_curvemap_evaluateF(const struct CurveMapping *cumap,
const struct CurveMap *cuma,
float value);
-/* single curve, with table check */
+/**
+ * Single curve, with table check.
+ * Works with curve 'cur'.
+ */
float BKE_curvemapping_evaluateF(const struct CurveMapping *cumap, int cur, float value);
+/**
+ * Vector case.
+ */
void BKE_curvemapping_evaluate3F(const struct CurveMapping *cumap,
float vecout[3],
const float vecin[3]);
+/**
+ * RGB case, no black/white points, no pre-multiply.
+ */
void BKE_curvemapping_evaluateRGBF(const struct CurveMapping *cumap,
float vecout[3],
const float vecin[3]);
+/**
+ * Byte version of #BKE_curvemapping_evaluateRGBF.
+ */
void BKE_curvemapping_evaluate_premulRGB(const struct CurveMapping *cumap,
unsigned char vecout_byte[3],
const unsigned char vecin_byte[3]);
+/**
+ * Same as #BKE_curvemapping_evaluate_premulRGBF
+ * but black/bwmul are passed as args for the compositor
+ * where they can change per pixel.
+ *
+ * Use in conjunction with #BKE_curvemapping_set_black_white_ex
+ *
+ * \param black: Use instead of cumap->black
+ * \param bwmul: Use instead of cumap->bwmul
+ */
void BKE_curvemapping_evaluate_premulRGBF_ex(const struct CurveMapping *cumap,
float vecout[3],
const float vecin[3],
const float black[3],
const float bwmul[3]);
+/**
+ * RGB with black/white points and pre-multiply. tables are checked.
+ */
void BKE_curvemapping_evaluate_premulRGBF(const struct CurveMapping *cumap,
float vecout[3],
const float vecin[3]);
@@ -100,12 +145,18 @@ bool BKE_curvemapping_RGBA_does_something(const struct CurveMapping *cumap);
void BKE_curvemapping_table_F(const struct CurveMapping *cumap, float **array, int *size);
void BKE_curvemapping_table_RGBA(const struct CurveMapping *cumap, float **array, int *size);
-/* non-const, these modify the curve */
-void BKE_curvemapping_premultiply(struct CurveMapping *cumap, int restore);
+/**
+ * Call when you do images etc, needs restore too. also verifies tables.
+ * non-const (these modify the curve).
+ */
+void BKE_curvemapping_premultiply(struct CurveMapping *cumap, bool restore);
void BKE_curvemapping_blend_write(struct BlendWriter *writer, const struct CurveMapping *cumap);
void BKE_curvemapping_curves_blend_write(struct BlendWriter *writer,
const struct CurveMapping *cumap);
+/**
+ * \note `cumap` itself has been read already.
+ */
void BKE_curvemapping_blend_read(struct BlendDataReader *reader, struct CurveMapping *cumap);
void BKE_histogram_update_sample_line(struct Histogram *hist,
@@ -123,16 +174,20 @@ void BKE_color_managed_display_settings_init(struct ColorManagedDisplaySettings
void BKE_color_managed_display_settings_copy(struct ColorManagedDisplaySettings *new_settings,
const struct ColorManagedDisplaySettings *settings);
-/* Initialize view settings to be best suitable for render type of viewing.
+/**
+ * Initialize view settings to be best suitable for render type of viewing.
* This will use default view transform from the OCIO configuration if none
- * is specified. */
+ * is specified.
+ */
void BKE_color_managed_view_settings_init_render(
struct ColorManagedViewSettings *settings,
const struct ColorManagedDisplaySettings *display_settings,
const char *view_transform);
-/* Initialize view settings which are best suitable for viewing non-render
- * images. For example,s movie clips while tracking. */
+/**
+ * Initialize view settings which are best suitable for viewing non-render images.
+ * For example,s movie clips while tracking.
+ */
void BKE_color_managed_view_settings_init_default(
struct ColorManagedViewSettings *settings,
const struct ColorManagedDisplaySettings *display_settings);