Blender  V3.3
DNA_color_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2006 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "DNA_defs.h"
11 #include "DNA_vec_types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /* general defines for kernel functions */
18 #define CM_RESOL 32
19 #define CM_TABLE 256
20 #define CM_TABLEDIV (1.0f / 256.0f)
21 
22 #define CM_TOT 4
23 
24 typedef struct CurveMapPoint {
25  float x, y;
27  short flag, shorty;
29 
31 enum {
32  CUMA_SELECT = (1 << 0),
33  CUMA_HANDLE_VECTOR = (1 << 1),
35 };
36 
37 typedef struct CurveMap {
38  short totpoint;
39  short flag DNA_DEPRECATED;
40 
42  float range;
46  float ext_in[2], ext_out[2];
51 
55  float premul_ext_in[2];
56  float premul_ext_out[2];
58 
59 typedef struct CurveMapping {
61  int flag, cur;
62  int preset;
64 
67 
71  float black[3], white[3];
73  float bwmul[3];
74 
76  float sample[3];
77 
78  short tone;
79  char _pad[6];
81 
83 typedef enum eCurveMappingFlags {
84  CUMA_DO_CLIP = (1 << 0),
85  CUMA_PREMULLED = (1 << 1),
86  CUMA_DRAW_CFRA = (1 << 2),
87  CUMA_DRAW_SAMPLE = (1 << 3),
88 
92 
94 typedef enum eCurveMappingPreset {
105 
107 typedef enum eCurveMappingTone {
111 
113 enum {
120 };
121 
122 enum {
123  HISTO_FLAG_LINE = (1 << 0),
125 };
126 
127 typedef struct Histogram {
128  int channels;
130  float data_luma[256];
131  float data_r[256];
132  float data_g[256];
133  float data_b[256];
134  float data_a[256];
135  float xmax, ymax;
136  short mode;
137  short flag;
138  int height;
139 
141  float co[2][2];
143 
144 typedef struct Scopes {
145  int ok;
148  float accuracy;
155  float minmax[3][2];
156  struct Histogram hist;
157  float *waveform_1;
158  float *waveform_2;
159  float *waveform_3;
160  float *vecscope;
162  char _pad[4];
164 
166 enum {
173 };
174 
175 typedef struct ColorManagedViewSettings {
176  int flag;
177  char _pad[4];
180  char look[64];
182  char view_transform[64];
184  float exposure;
186  float gamma;
189  void *_pad2;
191 
193  char display_device[64];
195 
198  char name[64];
200 
202 enum {
204 };
205 
206 #ifdef __cplusplus
207 }
208 #endif
eCurveMappingFlags
@ CUMA_PREMULLED
@ CUMA_EXTEND_EXTRAPOLATE
@ CUMA_DO_CLIP
@ CUMA_DRAW_CFRA
@ CUMA_DRAW_SAMPLE
struct CurveMapping CurveMapping
struct Histogram Histogram
struct CurveMap CurveMap
struct ColorManagedViewSettings ColorManagedViewSettings
struct CurveMapPoint CurveMapPoint
@ SCOPES_WAVEFRM_YCC_JPEG
@ SCOPES_WAVEFRM_RGB
@ SCOPES_WAVEFRM_YCC_601
@ SCOPES_WAVEFRM_YCC_709
@ SCOPES_WAVEFRM_LUMA
@ SCOPES_WAVEFRM_RGB_PARADE
@ HISTO_MODE_B
@ HISTO_MODE_G
@ HISTO_MODE_LUMA
@ HISTO_MODE_RGB
@ HISTO_MODE_ALPHA
@ HISTO_MODE_R
struct Scopes Scopes
@ CUMA_HANDLE_AUTO_ANIM
@ CUMA_SELECT
@ CUMA_HANDLE_VECTOR
struct ColorManagedColorspaceSettings ColorManagedColorspaceSettings
@ HISTO_FLAG_LINE
@ HISTO_FLAG_SAMPLELINE
struct ColorManagedDisplaySettings ColorManagedDisplaySettings
eCurveMappingTone
@ CURVE_TONE_STANDARD
@ CURVE_TONE_FILMLIKE
eCurveMappingPreset
@ CURVE_PRESET_ROOT
@ CURVE_PRESET_GAUSS
@ CURVE_PRESET_SMOOTH
@ CURVE_PRESET_ROUND
@ CURVE_PRESET_LINE
@ CURVE_PRESET_SHARP
@ CURVE_PRESET_MID9
@ CURVE_PRESET_BELL
@ CURVE_PRESET_MAX
@ COLORMANAGE_VIEW_USE_CURVES
struct CurveMapping * curve_mapping
CurveMapPoint * table
float maxtable
short flag DNA_DEPRECATED
short totpoint
CurveMapPoint * curve
CurveMapPoint * premultable
float mintable
float ext_out[2]
float ext_in[2]
float premul_ext_out[2]
float premul_ext_in[2]
float sample[3]
float bwmul[3]
float white[3]
CurveMap cm[4]
float black[3]
float data_a[256]
float data_luma[256]
float data_r[256]
float co[2][2]
float data_b[256]
float data_g[256]
int waveform_tot
int wavefrm_height
int wavefrm_mode
float wavefrm_yfac
float * waveform_3
char _pad[4]
float * waveform_2
int sample_full
int vecscope_height
float wavefrm_alpha
float minmax[3][2]
float vecscope_alpha
float * waveform_1
int sample_lines
float * vecscope
float accuracy
struct Histogram hist