Blender V5.3
DNA_texture_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_enum_flags.hh"
12#include "BLI_math_constants.hh"
13
14#include "DNA_ID.h"
15#include "DNA_colorband_types.h"
16#include "DNA_defs.h"
17#include "DNA_image_types.h" /* ImageUser */
18#include "DNA_material_types.h"
19
20namespace blender {
21
22struct AnimData;
23struct ColorBand;
24struct CurveMapping;
25struct Image;
26struct Object;
27struct PreviewImage;
28struct Tex;
29
30/* -------------------------------------------------------------------- */
33
35enum eTexMapping_Flag : int {
39};
41
42
49
55
56
57
58/* -------------------------------------------------------------------- */
61
62
63enum eTex_Type : short {
72 // TEX_PLUGIN = 9, /* Deprecated */
73 // TEX_ENVMAP = 10, /* Deprecated */
77 // TEX_POINTDENSITY = 14, /* Deprecated */
78 // TEX_VOXELDATA = 15, /* Deprecated */
79 // TEX_OCEAN = 16, /* Deprecated */
80};
81
90
104
115
117enum eTex_ImaFlag : short {
118 TEX_INTERPOL = 1 << 0,
119 TEX_USEALPHA = 1 << 1,
120 TEX_IMAROT = 1 << 4,
122 TEX_NORMALMAP = 1 << 11,
124};
126
127
128enum eTex_Flag : short {
131 TEX_NEGALPHA = 1 << 2,
135 TEX_PRV_NOR = 1 << 6,
139 TEX_NO_CLAMP = 1 << 10,
140};
142
143
151
157
159enum eTex_WoodWaveform : short {
163};
164
172
174enum eTex_CloudType : short {
177};
178
180enum eTex_MarbleType : short {
184};
185
196
203
205
206/* -------------------------------------------------------------------- */
209
217
219enum eTex_ReturnValue : short {
222};
223
235
241enum eTex_Projection : char {
246};
247
249
250/* -------------------------------------------------------------------- */
253
261
281
291
298
299
300
301/* -------------------------------------------------------------------- */
304
305struct MTex {
307
310 char _pad2[2] = {};
311 struct Object *object = nullptr;
312 struct Tex *tex = nullptr;
313 char uvname[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68] = "";
314
319
324 short which_output = 0;
325
326 float ofs[3] = {0.0f, 0.0f, 0.0f};
327 float size[3] = {1.0f, 1.0f, 1.0f};
328 float rot = 0, random_angle = 2.0f * float(M_PI);
329
330 float r = 1.0, g = 0.0, b = 1.0, k = 1.0;
331 float def_var = 1.0;
332
333 /* common */
334 float colfac = 1.0;
335 float alphafac = 1.0f;
336
337 /* particles */
338 float timefac = 1.0f, lengthfac = 1.0f, clumpfac = 1.0f, dampfac = 1.0f;
339 float kinkfac = 1.0f, kinkampfac = 1.0f, roughfac = 1.0f, padensfac = 1.0f, gravityfac = 1.0f;
340 float lifefac = 1.0f, sizefac = 1.0f, ivelfac = 1.0f, fieldfac = 1.0f;
341 float twistfac = 1.0f;
342};
343
345
346/* -------------------------------------------------------------------- */
349
351 /* The Depsgraph::update_count when this ID was last updated. Covers any IDRecalcFlag. */
353};
354
355struct Tex {
356#ifdef __cplusplus
359 static constexpr ID_Type id_type = ID_TE;
360#endif
361
364 struct AnimData *adt = nullptr;
365
366 void *_pad3 = nullptr;
367
368 float noisesize = 0.25, turbul = 5.0;
369 float bright = 1.0, contrast = 1.0, saturation = 1.0, rfac = 1.0, gfac = 1.0, bfac = 1.0;
370 float filtersize = 1.0;
371
372 /* newnoise: musgrave parameters */
373 float mg_H = 1.0, mg_lacunarity = 2.0, mg_octaves = 2.0, mg_offset = 1.0, mg_gain = 1.0;
374
375 /* newnoise: distorted noise amount, musgrave & voronoi output scale */
376 float dist_amount = 1.0, ns_outscale = 1.0;
377
378 /* newnoise: voronoi nearest neighbor weights, minkovsky exponent,
379 * distance metric & color type */
380 float vn_w1 = 1.0;
381 float vn_w2 = 0.0;
382 float vn_w3 = 0.0;
383 float vn_w4 = 0.0;
384 float vn_mexp = 2.5;
387
388 /* noisedepth MUST be <= 30 else we get floating point exceptions */
389 short noisedepth = 2;
391
392 /* newnoise: noisebasis type for clouds/marble/etc, noisebasis2 only used for distorted noise */
394
398 short stype = 0;
399
400 float cropxmin = 0.0, cropymin = 0.0, cropxmax = 1.0, cropymax = 1.0;
401 short xrepeat = 1, yrepeat = 1;
403
404 /* Variables only used for versioning, moved to struct member `iuser`. */
405 short _pad0 = {};
410
411 float checkerdist = 0, nabla = 0.025; /* also in do_versions. */
412
414
415 struct bNodeTree *nodetree = nullptr;
416 struct Image *ima = nullptr;
417 struct ColorBand *coba = nullptr;
418 struct PreviewImage *preview = nullptr;
419
420 char use_nodes = 0;
421 char _pad[7] = {};
422
424};
425
428 float loc[3] = {};
430 float rot[3] = {};
431 float size[3] = {};
434 char mapping = 0;
436
437 float mat[4][4] = {};
438 float min[3] = {}, max[3] = {};
439 struct Object *ob = nullptr;
440};
441
444
445 float bright = 0, contrast = 0, saturation = 0;
447
448 float blend_color[3] = {};
449 float blend_factor = 0;
450 int blend_type = 0;
451 char _pad[4] = {};
452};
453
455
456} // namespace blender
#define ENUM_OPERATORS(_enum_type)
#define M_PI
ID and Library types, which are fundamental for SDNA.
#define DNA_DEFINE_CXX_METHODS(class_name)
Definition DNA_defs.h:104
#define DNA_DEPRECATED
Definition DNA_defs.h:21
btScalar max
BMesh Iterators.
unsigned __int64 uint64_t
Definition BKE_text.h:91
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eColorMapping_Flag flag
eTex_Projection projz
eTex_Projection projy
eMTex_BrushMapMode brush_map_mode
eMTex_BrushAngleMode brush_angle_mode
eMTex_BlendType blendtype
eTex_Projection projx
eMTex_Mapping mapping
eTexMapping_Type type
eTexMapping_Flag flag
Tex_Runtime runtime
struct PreviewImage * preview
DNA_DEPRECATED int sfra
eTex_VoronoiDistMetric vn_distm
struct ColorBand * coba
eTex_NoiseType noisetype
eTex_VoronoiColType vn_coltype
struct ImageUser iuser
struct Image * ima
eTex_ImaFlag imaflag
DNA_DEPRECATED int len
eTex_Extend extend
struct bNodeTree * nodetree
DNA_DEPRECATED int frames
DNA_DEPRECATED int offset
eTex_NoiseBasis noisebasis
struct AnimData * adt
eTex_NoiseBasis noisebasis2