Blender V4.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
9#pragma once
10
11#include "DNA_ID.h"
12#include "DNA_defs.h"
13#include "DNA_image_types.h" /* ImageUser */
14
15struct AnimData;
16struct ColorBand;
17struct CurveMapping;
18struct Image;
19struct Ipo;
20struct Object;
21struct PreviewImage;
22struct Tex;
23
24/* -------------------------------------------------------------------- */
28typedef struct MTex {
30
32 char _pad2[2];
33 struct Object *object;
34 struct Tex *tex;
36 char uvname[68];
37
38 char projx, projy, projz, mapping;
40
46
47 float ofs[3], size[3], rot, random_angle;
48
49 float r, g, b, k;
50 float def_var;
51
52 /* common */
53 float colfac;
54 float alphafac;
55
56 /* particles */
60 float twistfac;
62
65/* -------------------------------------------------------------------- */
69#ifndef DNA_USHORT_FIX
70# define DNA_USHORT_FIX
76typedef unsigned short dna_ushort_fix;
77#endif
78
79typedef struct CBData {
80 float r, g, b, a, pos;
81 int cur;
83
88typedef struct ColorBand {
89 short tot, cur;
90 char ipotype, ipotype_hue;
92 char _pad[1];
93
94 CBData data[32];
96
99/* -------------------------------------------------------------------- */
103typedef struct PointDensity {
105
106 short flag;
107
108 short falloff_type;
109 float falloff_softness;
110 float radius;
111 short source;
112 char _pad0[2];
113
115 short color_source;
116 short ob_color_source;
117
118 int totpoints;
119
121 struct Object *object;
123 int psys;
125 short psys_cache_space;
127 short ob_cache_space;
129 char vertex_attribute_name[68];
130 char _pad1[4];
131
133 void *point_tree;
135 float *point_data;
136
137 float noise_size;
138 short noise_depth;
139 short noise_influence;
140 short noise_basis;
141 char _pad2[6];
142 float noise_fac;
143
144 float speed_scale, falloff_speed_scale;
145 char _pad3[4];
147 struct ColorBand *coba;
148
150 struct CurveMapping *falloff_curve;
152
155/* -------------------------------------------------------------------- */
159typedef struct Tex {
161
162 ID id;
164 struct AnimData *adt;
169 DrawDataList drawdata;
170
171 float noisesize, turbul;
172 float bright, contrast, saturation, rfac, gfac, bfac;
173 float filtersize;
174 char _pad2[4];
175
176 /* newnoise: musgrave parameters */
177 float mg_H, mg_lacunarity, mg_octaves, mg_offset, mg_gain;
178
179 /* newnoise: distorted noise amount, musgrave & voronoi output scale */
180 float dist_amount, ns_outscale;
181
182 /* newnoise: voronoi nearest neighbor weights, minkovsky exponent,
183 * distance metric & color type */
184 float vn_w1;
185 float vn_w2;
186 float vn_w3;
187 float vn_w4;
188 float vn_mexp;
189 short vn_distm, vn_coltype;
190
191 /* noisedepth MUST be <= 30 else we get floating point exceptions */
192 short noisedepth, noisetype;
193
194 /* newnoise: noisebasis type for clouds/marble/etc, noisebasis2 only used for distorted noise */
195 short noisebasis, noisebasis2;
196
197 short imaflag, flag;
198 short type, stype;
199
200 float cropxmin, cropymin, cropxmax, cropymax;
201 int texfilter;
203 int afmax;
204 short xrepeat, yrepeat;
205 short extend;
206
207 /* Variables only used for versioning, moved to struct member `iuser`. */
208 short _pad0;
210 int frames DNA_DEPRECATED;
211 int offset DNA_DEPRECATED;
213
214 float checkerdist, nabla;
215 char _pad1[4];
216
217 struct ImageUser iuser;
218
219 struct bNodeTree *nodetree;
220 /* old animation system, deprecated for 2.5 */
221 struct Ipo *ipo DNA_DEPRECATED;
222 struct Image *ima;
223 struct ColorBand *coba;
224 struct PreviewImage *preview;
225
226 char use_nodes;
227 char _pad[7];
228
230
232typedef struct TexMapping {
233 float loc[3];
235 float rot[3];
236 float size[3];
237 int flag;
238 char projx, projy, projz, mapping;
239 int type;
240
241 float mat[4][4];
242 float min[3], max[3];
243 struct Object *ob;
244
246
247typedef struct ColorMapping {
248 struct ColorBand coba;
249
250 float bright, contrast, saturation;
251 int flag;
252
253 float blend_color[3];
256 char _pad[4];
258
261/* -------------------------------------------------------------------- */
266enum {
270};
271
273enum {
278};
279
281enum {
283};
284
287/* -------------------------------------------------------------------- */
292enum {
293 TEX_CLOUDS = 1,
294 TEX_WOOD = 2,
295 TEX_MARBLE = 3,
296 TEX_MAGIC = 4,
297 TEX_BLEND = 5,
298 TEX_STUCCI = 6,
299 TEX_NOISE = 7,
301 // TEX_PLUGIN = 9, /* Deprecated */
302 // TEX_ENVMAP = 10, /* Deprecated */
303 TEX_MUSGRAVE = 11,
304 TEX_VORONOI = 12,
305 TEX_DISTNOISE = 13,
306 // TEX_POINTDENSITY = 14, /* Deprecated */
307 // TEX_VOXELDATA = 15, /* Deprecated */
308 // TEX_OCEAN = 16, /* Deprecated */
309};
310
312enum {
318};
319
321enum {
332};
333
335enum {
343};
344
346enum {
347 TEX_INTERPOL = 1 << 0,
348 TEX_USEALPHA = 1 << 1,
349 TEX_MIPMAP = 1 << 2,
350 TEX_IMAROT = 1 << 4,
352 TEX_NORMALMAP = 1 << 11,
353 TEX_GAUSS_MIP = 1 << 12,
354 TEX_FILTER_MIN = 1 << 13,
356};
357
359enum {
360 TXF_BOX = 0, /* Blender's old texture filtering method. */
364};
365
367enum {
370 TEX_NEGALPHA = 1 << 2,
374 TEX_PRV_NOR = 1 << 6,
378 TEX_NO_CLAMP = 1 << 10,
379};
380
382enum {
388};
389
391enum {
394};
395
397enum {
401};
402
404enum {
409};
410
412enum {
415};
416
418enum {
422};
423
425enum {
433};
434
436enum {
440};
441
443enum {
448};
449
451enum {
454};
455
462enum {
466};
467
470/* -------------------------------------------------------------------- */
479enum {
484};
485
488/* -------------------------------------------------------------------- */
493enum {
498};
499
501enum {
518};
519
521enum {
528};
529
531enum {
534};
535
538/* -------------------------------------------------------------------- */
543enum {
547};
548
550enum {
556};
557
559enum {
564};
565
568/* -------------------------------------------------------------------- */
573enum {
577};
578
580enum {
588};
589
591enum {
595};
596
598enum {
601};
602
604enum {
606 // TEX_PD_NOISE_VEL = 1, /* Deprecated. */
607 // TEX_PD_NOISE_AGE = 2, /* Deprecated. */
608 // TEX_PD_NOISE_TIME = 3, /* Deprecated. */
609};
610
612enum {
614 /* color_source: particles */
618 /* color_source: vertices */
622};
623
ID and Library types, which are fundamental for SDNA.
enum eAnimEdit_AutoSnap DNA_DEPRECATED
#define DNA_DEFINE_CXX_METHODS(class_name)
Definition DNA_defs.h:66
@ TEX_IMAGE
@ TEX_PR_OTHER
@ TEX_PR_BOTH
@ TEX_PR_TEXTURE
@ TEX_COL2
@ TEX_COL1
@ TEX_COL3
@ TEX_INTENSITY
unsigned short dna_ushort_fix
@ TEX_BLENDER
@ TEX_STDPERLIN
@ TEX_VORONOI_CRACKLE
@ TEX_VORONOI_F2
@ TEX_VORONOI_F2F1
@ TEX_NEWPERLIN
@ TEX_VORONOI_F1
@ TEX_VORONOI_F4
@ TEX_VORONOI_F3
@ TEX_CELLNOISE
@ MTEX_FLAT
@ MTEX_SPHERE
@ MTEX_CUBE
@ MTEX_TUBE
@ TEX_SHARPER
@ TEX_SOFT
@ TEX_SHARP
@ TEXMAP_CLIP_MIN
@ TEXMAP_UNIT_MATRIX
@ TEXMAP_CLIP_MAX
@ TEX_INT
@ TEX_RGB
@ COLBAND_HUE_FAR
@ COLBAND_HUE_CW
@ COLBAND_HUE_NEAR
@ COLBAND_HUE_CCW
@ MTEX_DIFF
@ MTEX_DIV
@ MTEX_BLEND_VAL
@ MTEX_MUL
@ MTEX_DARK
@ MTEX_BLEND_HUE
@ MTEX_LIGHT
@ MTEX_BLEND_COLOR
@ MTEX_BLEND
@ MTEX_SOFT_LIGHT
@ MTEX_LIN_LIGHT
@ MTEX_SUB
@ MTEX_ADD
@ MTEX_OVERLAY
@ MTEX_SCREEN
@ MTEX_BLEND_SAT
@ TEX_SIN
@ TEX_SAW
@ TEX_TRI
@ MTEX_MAP_MODE_AREA
@ MTEX_MAP_MODE_3D
@ MTEX_MAP_MODE_STENCIL
@ MTEX_MAP_MODE_TILED
@ MTEX_MAP_MODE_RANDOM
@ MTEX_MAP_MODE_VIEW
struct ColorBand ColorBand
@ TEX_PD_FALLOFF_CURVE
@ TEX_PD_TURBULENCE
struct TexMapping TexMapping
@ TEX_BANDNOISE
@ TEX_RINGNOISE
@ TEX_RING
@ TEX_BAND
@ TEX_DIAG
@ TEX_EASE
@ TEX_HALO
@ TEX_QUAD
@ TEX_RAD
@ TEX_SPHERE
@ TEX_LIN
@ TEX_PD_FALLOFF_PARTICLE_VEL
@ TEX_PD_FALLOFF_PARTICLE_AGE
@ TEX_PD_FALLOFF_ROOT
@ TEX_PD_FALLOFF_STD
@ TEX_PD_FALLOFF_SMOOTH
@ TEX_PD_FALLOFF_SOFT
@ TEX_PD_FALLOFF_CONSTANT
@ COLBAND_BLEND_RGB
@ COLBAND_BLEND_HSL
@ COLBAND_BLEND_HSV
@ COLBAND_INTERP_LINEAR
@ COLBAND_INTERP_CONSTANT
@ COLBAND_INTERP_B_SPLINE
@ COLBAND_INTERP_EASE
@ COLBAND_INTERP_CARDINAL
@ TEX_PD_OBJECTSPACE
@ TEX_PD_OBJECTLOC
@ TEX_PD_WORLDSPACE
struct ColorMapping ColorMapping
@ TEXMAP_TYPE_NORMAL
@ TEXMAP_TYPE_POINT
@ TEXMAP_TYPE_TEXTURE
@ TEXMAP_TYPE_VECTOR
@ MTEX_ANGLE_RANDOM
@ MTEX_ANGLE_RAKE
@ TEX_NO_CLAMP
@ TEX_DS_EXPAND
@ TEX_REPEAT_YMIR
@ TEX_CHECKER_EVEN
@ TEX_PRV_NOR
@ TEX_FLIPBLEND
@ TEX_PRV_ALPHA
@ TEX_NEGALPHA
@ TEX_COLORBAND
@ TEX_REPEAT_XMIR
@ TEX_CHECKER_ODD
@ TEX_HYBRIDMF
@ TEX_MFRACTAL
@ TEX_HTERRAIN
@ TEX_FBM
@ TEX_RIDGEDMF
@ TEX_CHEBYCHEV
@ TEX_DISTANCE_SQUARED
@ TEX_MINKOVSKY_FOUR
@ TEX_MINKOVSKY_HALF
@ TEX_MANHATTAN
@ TEX_DISTANCE
@ TEX_MINKOVSKY
@ TEX_DEFAULT
@ TEX_COLOR
@ TEX_PD_NOISE_STATIC
@ TEX_PLASTIC
@ TEX_WALLIN
@ TEX_WALLOUT
struct CBData CBData
@ TEX_NOISEPERL
@ TEX_NOISESOFT
@ TXF_FELINE
@ TXF_BOX
@ TXF_AREA
@ TXF_EWA
@ COLORMAP_USE_RAMP
@ TEX_PD_COLOR_VERTWEIGHT
@ TEX_PD_COLOR_VERTNOR
@ TEX_PD_COLOR_VERTCOL
@ TEX_PD_COLOR_PARTAGE
@ TEX_PD_COLOR_CONSTANT
@ TEX_PD_COLOR_PARTVEL
@ TEX_PD_COLOR_PARTSPEED
@ TEX_PD_OBJECT
@ TEX_PD_FILE
@ TEX_PD_PSYS
@ TEX_USEALPHA
@ TEX_MIPMAP
@ TEX_CALCALPHA
@ TEX_INTERPOL
@ TEX_GAUSS_MIP
@ TEX_FILTER_MIN
@ TEX_IMAROT
@ TEX_DERIVATIVEMAP
@ TEX_NORMALMAP
@ TEX_CLIP
@ TEX_EXTEND
@ TEX_CHECKER
@ TEX_REPEAT
@ TEX_CLIPCUBE
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its saturation
local_group_size(16, 16) .push_constant(Type b
int len
#define rot(x, k)
#define min(a, b)
Definition sort.c:32
Definition DNA_ID.h:413
short texco
float fieldfac
char brush_angle_mode
float roughfac
float kinkampfac
float colfac
float lifefac
float padensfac
char brush_map_mode
short blendtype
float kinkfac
float dampfac
float def_var
char _pad2[2]
float clumpfac
float ivelfac
short which_output
float ofs[3]
short mapto
float timefac
float alphafac
float lengthfac
float gravityfac
float random_angle
char uvname[68]
float twistfac
float sizefac
struct Tex * tex
struct Object * ob
uint8_t flag
Definition wm_window.cc:138