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 
17 /** \file
18  * \ingroup DNA
19  */
20 
21 #pragma once
22 
23 /* Struct members on own line. */
24 /* clang-format off */
25 
26 /* -------------------------------------------------------------------- */
27 /** \name Texture Struct
28  * \{ */
29 
30 #define _DNA_DEFAULT_MTex \
31   { \
32     .texco = TEXCO_UV, \
33     .mapto = MAP_COL, \
34     .object = NULL, \
35     .projx = PROJ_X, \
36     .projy = PROJ_Y, \
37     .projz = PROJ_Z, \
38     .mapping = MTEX_FLAT, \
39     .ofs[0] = 0.0, \
40     .ofs[1] = 0.0, \
41     .ofs[2] = 0.0, \
42     .size[0] = 1.0, \
43     .size[1] = 1.0, \
44     .size[2] = 1.0, \
45     .tex = NULL, \
46     .colormodel = 0, \
47     .r = 1.0, \
48     .g = 0.0, \
49     .b = 1.0, \
50     .k = 1.0, \
51     .def_var = 1.0, \
52     .blendtype = MTEX_BLEND, \
53     .colfac = 1.0, \
54     .norfac = 1.0, \
55     .varfac = 1.0, \
56     .dispfac = 0.2, \
57     .colspecfac = 1.0f, \
58     .mirrfac = 1.0f, \
59     .alphafac = 1.0f, \
60     .difffac = 1.0f, \
61     .specfac = 1.0f, \
62     .emitfac = 1.0f, \
63     .hardfac = 1.0f, \
64     .raymirrfac = 1.0f, \
65     .translfac = 1.0f, \
66     .ambfac = 1.0f, \
67     .colemitfac = 1.0f, \
68     .colreflfac = 1.0f, \
69     .coltransfac = 1.0f, \
70     .densfac = 1.0f, \
71     .scatterfac = 1.0f, \
72     .reflfac = 1.0f, \
73     .shadowfac = 1.0f, \
74     .zenupfac = 1.0f, \
75     .zendownfac = 1.0f, \
76     .blendfac = 1.0f, \
77     .timefac = 1.0f, \
78     .lengthfac = 1.0f, \
79     .clumpfac = 1.0f, \
80     .kinkfac = 1.0f, \
81     .kinkampfac = 1.0f, \
82     .roughfac = 1.0f, \
83     .twistfac = 1.0f, \
84     .padensfac = 1.0f, \
85     .lifefac = 1.0f, \
86     .sizefac = 1.0f, \
87     .ivelfac = 1.0f, \
88     .dampfac = 1.0f, \
89     .gravityfac = 1.0f, \
90     .fieldfac = 1.0f, \
91     .normapspace = MTEX_NSPACE_TANGENT, \
92     .brush_map_mode = MTEX_MAP_MODE_TILED, \
93     .random_angle = 2.0f * (float)M_PI, \
94     .brush_angle_mode = 0, \
95   } \
96 
97 #define _DNA_DEFAULT_Tex \
98   { \
99     .type = TEX_IMAGE, \
100     .ima = NULL, \
101     .stype = 0, \
102     .flag = TEX_CHECKER_ODD, \
103     .imaflag = TEX_INTERPOL | TEX_MIPMAP | TEX_USEALPHA, \
104     .extend = TEX_REPEAT, \
105     .cropxmin = 0.0, \
106     .cropymin = 0.0, \
107     .cropxmax = 1.0, \
108     .cropymax = 1.0, \
109     .texfilter = TXF_EWA, \
110     .afmax = 8, \
111     .xrepeat = 1, \
112     .yrepeat = 1, \
113     .sfra = 1, \
114     .frames = 0, \
115     .offset = 0, \
116     .noisesize = 0.25, \
117     .noisedepth = 2, \
118     .turbul = 5.0, \
119     .nabla = 0.025,  /* also in do_versions. */ \
120     .bright = 1.0, \
121     .contrast = 1.0, \
122     .saturation = 1.0, \
123     .filtersize = 1.0, \
124     .rfac = 1.0, \
125     .gfac = 1.0, \
126     .bfac = 1.0, \
127     /* newnoise: init. */ \
128     .noisebasis = 0, \
129     .noisebasis2 = 0, \
130     /* musgrave */ \
131     .mg_H = 1.0, \
132     .mg_lacunarity = 2.0, \
133     .mg_octaves = 2.0, \
134     .mg_offset = 1.0, \
135     .mg_gain = 1.0, \
136     .ns_outscale = 1.0, \
137     /* distnoise */ \
138     .dist_amount = 1.0, \
139     /* voronoi */ \
140     .vn_w1 = 1.0, \
141     .vn_w2 = 0.0, \
142     .vn_w3 = 0.0, \
143     .vn_w4 = 0.0, \
144     .vn_mexp = 2.5, \
145     .vn_distm = 0, \
146     .vn_coltype = 0, \
147     .preview = NULL, \
148   }
149 
150 /** \} */
151 
152 /* clang-format on */
153