Blender  V2.93
DNA_light_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  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "DNA_ID.h"
27 #include "DNA_defs.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #ifndef MAX_MTEX
34 # define MAX_MTEX 18
35 #endif
36 
37 struct AnimData;
38 struct CurveMapping;
39 struct Ipo;
40 struct bNodeTree;
41 
42 typedef struct Light {
43  ID id;
45  struct AnimData *adt;
46 
47  short type, flag;
48  int mode;
49 
50  float r, g, b, k;
52 
54 
56  float att1, att2;
58  char _pad0[4];
60  short falloff_type;
61  char _pad2[2];
62 
63  float clipsta, clipend;
64  float bias;
65  float soft; /* DEPRECATED kept for compatibility. */
66  float bleedbias; /* DEPRECATED kept for compatibility. */
67  float bleedexp; /* DEPRECATED kept for compatibility. */
70 
71  short area_shape;
73  float area_spread;
74 
75  float sun_angle;
76 
77  /* texact is for buttons */
79 
81  struct Ipo *ipo DNA_DEPRECATED;
83  char _pad6[4];
84 
85  /* Eevee */
88  float cascade_fade;
90 
91  float contact_dist;
92  float contact_bias;
93  float contact_spread; /* DEPRECATED kept for compatibility. */
95 
98 
99  /* preview */
101 
102  /* nodes */
105 
106 /* **************** LIGHT ********************* */
107 
108 /* flag */
109 #define LA_DS_EXPAND (1 << 0)
110 /* NOTE: this must have the same value as MA_DS_SHOW_TEXS,
111  * otherwise anim-editors will not read correctly
112  */
113 #define LA_DS_SHOW_TEXS (1 << 2)
114 
115 /* type */
116 #define LA_LOCAL 0
117 #define LA_SUN 1
118 #define LA_SPOT 2
119 /* #define LA_HEMI 3 */ /* not used anymore */
120 #define LA_AREA 4
121 
122 /* mode */
123 #define LA_SHADOW (1 << 0)
124 /* #define LA_HALO (1 << 1) */ /* not used anymore */
125 /* #define LA_LAYER (1 << 2) */ /* not used anymore */
126 /* #define LA_QUAD (1 << 3) */ /* not used anymore */
127 /* #define LA_NEG (1 << 4) */ /* not used anymore */
128 /* #define LA_ONLYSHADOW(1 << 5) */ /* not used anymore */
129 /* #define LA_SPHERE (1 << 6) */ /* not used anymore */
130 #define LA_SQUARE (1 << 7)
131 /* #define LA_TEXTURE (1 << 8) */ /* not used anymore */
132 /* #define LA_OSATEX (1 << 9) */ /* not used anymore */
133 /* #define LA_DEEP_SHADOW (1 << 10) */ /* not used anywhere */
134 /* #define LA_NO_DIFF (1 << 11) */ /* not used anywhere */
135 /* #define LA_NO_SPEC (1 << 12) */ /* not used anywhere */
136 /* #define LA_SHAD_RAY (1 << 13) */ /* not used anywhere - cleaned */
137 /* yafray: light shadowbuffer flag, softlight */
138 /* Since it is used with LOCAL light, can't use LA_SHAD */
139 /* #define LA_YF_SOFT (1 << 14) */ /* not used anymore */
140 /* #define LA_LAYER_SHADOW (1 << 15) */ /* not used anymore */
141 /* #define LA_SHAD_TEX (1 << 16) */ /* not used anymore */
142 #define LA_SHOW_CONE (1 << 17)
143 /* #define LA_SHOW_SHADOW_BOX (1 << 18) */
144 #define LA_SHAD_CONTACT (1 << 19)
145 #define LA_CUSTOM_ATTENUATION (1 << 20)
146 
147 /* falloff_type */
148 #define LA_FALLOFF_CONSTANT 0
149 #define LA_FALLOFF_INVLINEAR 1
150 #define LA_FALLOFF_INVSQUARE 2
151 #define LA_FALLOFF_CURVE 3
152 #define LA_FALLOFF_SLIDERS 4
153 #define LA_FALLOFF_INVCOEFFICIENTS 5
154 
155 /* area shape */
156 #define LA_AREA_SQUARE 0
157 #define LA_AREA_RECT 1
158 /* #define LA_AREA_CUBE 2 */ /* UNUSED */
159 /* #define LA_AREA_BOX 3 */ /* UNUSED */
160 #define LA_AREA_DISK 4
161 #define LA_AREA_ELLIPSE 5
162 
163 #ifdef __cplusplus
164 }
165 #endif
ID and Library types, which are fundamental for sdna.
struct Light Light
Definition: DNA_ID.h:273
float coeff_const
float att2
float contact_thickness
float coeff_lin
float cascade_exponent
float sun_angle
float r
float contact_dist
float energy
short bufsize
float shdwpad
float att_dist
short texact
char bufflag
struct PreviewImage * preview
float coeff_quad
float dist
float clipend
float att1
short shadhalostep
float area_sizez
int cascade_count
char _pad2[2]
float area_spread
struct AnimData * adt
float spec_fac
short use_nodes
float contact_spread
float bleedbias
float bleedexp
char _pad0[4]
float soft
float area_sizey
char _pad6[4]
short samp
float shdwg
short area_shape
char buftype
float clipsta
float spotblend
float g
short falloff_type
float contact_bias
float spotsize
struct CurveMapping * curfalloff
struct bNodeTree * nodetree
float area_size
float cascade_max_dist
short filtertype
float k
float shdwr
float b
float shdwb
float cascade_fade
float volume_fac
short type
short pr_texture
float bias
float diff_fac
short buffers
short flag
struct Ipo *ipo DNA_DEPRECATED