Blender V5.3
DNA_color_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2006 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_defs.h"
12#include "DNA_vec_types.h"
13
14#include "BLI_enum_flags.hh"
15
16namespace blender {
17
18/* general defines for kernel functions */
19#define CM_RESOL 32
20#define CM_TABLE 256
21#define CM_TABLEDIV (1.0f / 256.0f)
22
23#define CM_TOT 4
24
25#define GPU_SKY_WIDTH 512
26#define GPU_SKY_HEIGHT 256
27
29enum eCurveMapPoint_Flag : short {
30 CUMA_SELECT = (1 << 0),
34 CUMA_REMOVE = (1 << 3),
36 CUMA_ACTIVE = (1 << 4),
37};
39
40
42 CUMA_DO_CLIP = (1 << 0),
43 CUMA_PREMULLED = (1 << 1),
44 CUMA_DRAW_CFRA = (1 << 2),
45 CUMA_DRAW_SAMPLE = (1 << 3),
46
50};
52
53
66
72
82
84enum eHistogram_Flag : short {
85 HISTO_FLAG_LINE = (1 << 0),
87};
89
90
99
105
111
117 /* Only work as pure view transform and look, no other settings.
118 * Not user editable, but fixed depending on where settings are stored. */
120};
122
124 float x = 0, y = 0;
127 short shorty = 0;
128};
129
130struct CurveMap {
132
133 short totpoint = 0;
135
137 float range = 0;
139 float mintable = 0, maxtable = 0;
141 float ext_in[2] = {}, ext_out[2] = {};
146
150 float premul_ext_in[2] = {};
151 float premul_ext_out[2] = {};
153 char _pad[6] = {};
154};
155
158
159
161 int cur = 0;
164
166 rctf curr = {}, clipr = {};
167
171 float black[3] = {}, white[3] = {};
173 float bwmul[3] = {};
174
176 float sample[3] = {};
177
179 char _pad[6] = {};
180};
181
182struct Histogram {
183 int channels = 0;
185 float data_luma[256] = {};
186 float data_r[256] = {};
187 float data_g[256] = {};
188 float data_b[256] = {};
189 float data_a[256] = {};
190 float xmax = 0, ymax = 0;
193 int height = 0;
194
196 float co[2][2] = {};
197};
198
199struct Scopes {
200 int ok = 0;
201 int sample_full = 0;
208 float accuracy = 0;
209 float wavefrm_alpha = 0;
210 float wavefrm_yfac = 0;
211 float vecscope_alpha = 0;
212 float minmax[3][2] = {};
214 float *waveform_1 = nullptr;
215 float *waveform_2 = nullptr;
216 float *waveform_3 = nullptr;
217 float *vecscope = nullptr;
218 float *vecscope_rgb = nullptr;
219};
220
223 char _pad[4] = {};
226 char look[64] = "";
228 char view_transform[64] = "";
230 float exposure = 0;
232 float gamma = 0;
234 float temperature = 0;
235 float tint = 0;
237 struct CurveMapping *curve_mapping = nullptr;
238 void *_pad2 = nullptr;
239};
240
246
249 char name[/*MAX_COLORSPACE_NAME*/ 64] = "";
253 char interop_id[/*MAX_COLORSPACE_NAME*/ 64] = "";
254};
255
256} // namespace blender
#define ENUM_OPERATORS(_enum_type)
#define DNA_DEFINE_CXX_METHODS(class_name)
Definition DNA_defs.h:104
#define DNA_DEPRECATED
Definition DNA_defs.h:21
BMesh Iterators.
@ COLORMANAGE_VIEW_USE_WHITE_BALANCE
@ COLORMANAGE_VIEW_USE_CURVES
@ COLORMANAGE_VIEW_USE_DEPRECATED
@ COLORMANAGE_VIEW_ONLY_VIEW_LOOK
@ CURVE_TONE_STANDARD
@ CURVE_TONE_FILMLIKE
@ HISTO_FLAG_SAMPLELINE
@ SCOPES_WAVEFRM_LUMA
@ SCOPES_WAVEFRM_YCC_601
@ SCOPES_WAVEFRM_YCC_709
@ SCOPES_WAVEFRM_RGB_PARADE
@ SCOPES_WAVEFRM_YCC_JPEG
@ CURVE_PRESET_SMOOTH
@ CURVE_PRESET_CONSTANT_MEDIAN
@ CUMA_HANDLE_AUTO_ANIM
eColorManageDisplay_Emulation
@ COLORMANAGE_DISPLAY_EMULATION_OFF
@ COLORMANAGE_DISPLAY_EMULATION_AUTO
@ CUMA_EXTEND_EXTRAPOLATE
eColorManageDisplay_Emulation emulation
struct CurveMapping * curve_mapping
eCurveMapPoint_Flag flag
CurveMapPoint * curve
eCurveMapPoint_Flag default_handle_type
CurveMapPoint * table
DNA_DEPRECATED short flag
CurveMapPoint * premultable
eCurveMappingTone tone
eCurveMappingFlags flag
eCurveMappingPreset preset
eHistogram_Mode mode
eHistogram_Flag flag
eScopes_WaveformMode wavefrm_mode
struct Histogram hist
eScopes_VecscopeMode vecscope_mode