Blender  V2.93
DNA_shader_fx_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #include "DNA_defs.h"
24 #include "DNA_listBase.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct DRWShadingGroup;
31 
32 /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE!
33  * (ONLY ADD NEW ITEMS AT THE END)
34  */
35 
36 typedef enum ShaderFxType {
40  eShaderFxType_Light_deprecated = 3, /* DEPRECATED (replaced by scene lights) */
48  /* Keep last. */
51 
52 typedef enum ShaderFxMode {
57  eShaderFxMode_Expanded_DEPRECATED = (1 << 3),
58 #endif
60 
61 typedef enum {
62  /* This fx has been inserted in local override, and hence can be fully edited. */
64 } ShaderFxFlag;
65 
66 typedef struct ShaderFxData {
67  struct ShaderFxData *next, *prev;
68 
69  int type, mode;
70  char _pad0[4];
71  short flag;
72  /* An "expand" bit for each of the constraint's (sub)panels (uiPanelDataExpansion). */
75  char name[64];
76 
77  char *error;
79 
80 /* Runtime temp data */
81 typedef struct ShaderFxData_Runtime {
82  float loc[3];
83  char _pad[4];
88 
89 typedef struct BlurShaderFxData {
91  float radius[2];
93  int flag;
95  int samples;
97  float rotation;
98  char _pad[4];
99 
102 
103 typedef enum eBlurShaderFx_Flag {
104  FX_BLUR_DOF_MODE = (1 << 0),
106 
107 typedef struct ColorizeShaderFxData {
109  int mode;
110  float low_color[4];
111  float high_color[4];
112  float factor;
114  int flag;
115  char _pad[4];
116 
119 
120 typedef enum ColorizeShaderFxModes {
127 
128 typedef struct FlipShaderFxData {
131  int flag;
133  int flipmode;
136 
137 typedef enum eFlipShaderFx_Flag {
138  FX_FLIP_HORIZONTAL = (1 << 0),
139  FX_FLIP_VERTICAL = (1 << 1),
141 
142 typedef struct GlowShaderFxData {
144  float glow_color[4];
145  float select_color[3];
146  float threshold;
148  int flag;
149  int mode;
150  float blur[2];
151  int samples;
153  float rotation;
156  char _pad[4];
157 
160 
161 typedef enum GlowShaderFxModes {
165 
166 typedef enum eGlowShaderFx_Flag {
167  FX_GLOW_USE_ALPHA = (1 << 0),
169 
170 typedef struct PixelShaderFxData {
173  int size[3];
175  int flag;
176  float rgba[4];
179 
180 typedef enum ePixelShaderFx_Flag {
183 
184 typedef struct RimShaderFxData {
186  int offset[2];
188  int flag;
189  float rim_rgb[3];
190  float mask_rgb[3];
191  int mode;
192  int blur[2];
193  int samples;
194  char _pad[4];
197 
198 typedef enum RimShaderFxModes {
206 
207 typedef struct ShadowShaderFxData {
209  struct Object *object;
210  int offset[2];
212  int flag;
213  float shadow_rgba[4];
214  float amplitude;
215  float period;
216  float phase;
218  float scale[2];
219  float rotation;
220  int blur[2];
221  int samples;
222  char _pad[4];
225 
226 typedef enum eShadowShaderFx_Flag {
228  FX_SHADOW_USE_WAVE = (1 << 1),
230 
231 typedef struct SwirlShaderFxData {
233  struct Object *object;
235  int flag;
236  int radius;
237  float angle;
242 
243 typedef enum eSwirlShaderFx_Flag {
246 
247 typedef struct WaveShaderFxData {
249  float amplitude;
250  float period;
251  float phase;
254  int flag;
255  char _pad[4];
258 
259 #ifdef __cplusplus
260 }
261 #endif
These structs are the foundation for all linked lists in the library system.
eBlurShaderFx_Flag
@ FX_BLUR_DOF_MODE
struct RimShaderFxData RimShaderFxData
ShaderFxFlag
@ eShaderFxFlag_OverrideLibrary_Local
struct GlowShaderFxData GlowShaderFxData
eShadowShaderFx_Flag
@ FX_SHADOW_USE_OBJECT
@ FX_SHADOW_USE_WAVE
ShaderFxMode
@ eShaderFxMode_Realtime
@ eShaderFxMode_Editmode
@ eShaderFxMode_Render
struct FlipShaderFxData FlipShaderFxData
GlowShaderFxModes
@ eShaderFxGlowMode_Luminance
@ eShaderFxGlowMode_Color
ColorizeShaderFxModes
@ eShaderFxColorizeMode_Custom
@ eShaderFxColorizeMode_GrayScale
@ eShaderFxColorizeMode_Transparent
@ eShaderFxColorizeMode_Duotone
@ eShaderFxColorizeMode_Sepia
eSwirlShaderFx_Flag
@ FX_SWIRL_MAKE_TRANSPARENT
struct WaveShaderFxData WaveShaderFxData
struct SwirlShaderFxData SwirlShaderFxData
RimShaderFxModes
@ eShaderFxRimMode_Multiply
@ eShaderFxRimMode_Add
@ eShaderFxRimMode_Normal
@ eShaderFxRimMode_Overlay
@ eShaderFxRimMode_Subtract
@ eShaderFxRimMode_Divide
ePixelShaderFx_Flag
@ FX_PIXEL_FILTER_NEAREST
struct BlurShaderFxData BlurShaderFxData
struct ColorizeShaderFxData ColorizeShaderFxData
struct ShaderFxData ShaderFxData
struct ShaderFxData_Runtime ShaderFxData_Runtime
eFlipShaderFx_Flag
@ FX_FLIP_HORIZONTAL
@ FX_FLIP_VERTICAL
eGlowShaderFx_Flag
@ FX_GLOW_USE_ALPHA
struct ShadowShaderFxData ShadowShaderFxData
ShaderFxType
@ eShaderFxType_Pixel
@ eShaderFxType_Rim
@ eShaderFxType_None
@ eShaderFxType_Swirl
@ eShaderFxType_Glow
@ eShaderFxType_Light_deprecated
@ eShaderFxType_Flip
@ NUM_SHADER_FX_TYPES
@ eShaderFxType_Blur
@ eShaderFxType_Shadow
@ eShaderFxType_Colorize
@ eShaderFxType_Wave
struct PixelShaderFxData PixelShaderFxData
#define DNA_DEPRECATED_ALLOW
Definition: action.c:32
ShaderFxData_Runtime runtime
ShaderFxData_Runtime runtime
ShaderFxData_Runtime runtime
ShaderFxData_Runtime runtime
ShaderFxData_Runtime runtime
ShaderFxData_Runtime runtime
struct DRWShadingGroup * fx_sh_b
struct DRWShadingGroup * fx_sh_c
struct DRWShadingGroup * fx_sh
struct ShaderFxData * prev
struct ShaderFxData * next
struct Object * object
ShaderFxData_Runtime runtime
struct Object * object
ShaderFxData_Runtime runtime
ShaderFxData_Runtime runtime