Blender  V3.3
rna_texture.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include <float.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 
11 #include "DNA_brush_types.h"
12 #include "DNA_light_types.h"
13 #include "DNA_material_types.h"
14 #include "DNA_node_types.h"
15 #include "DNA_object_types.h"
16 #include "DNA_particle_types.h"
17 #include "DNA_scene_types.h" /* MAXFRAME only */
18 #include "DNA_texture_types.h"
19 #include "DNA_world_types.h"
20 
21 #include "BLI_utildefines.h"
22 
23 #include "BKE_node.h"
24 #include "BKE_node_tree_update.h"
25 #include "BKE_paint.h"
26 
27 #include "RNA_define.h"
28 #include "RNA_enum_types.h"
29 
30 #include "rna_internal.h"
31 
32 #include "WM_api.h"
33 #include "WM_types.h"
34 
35 #ifndef RNA_RUNTIME
37  {TXF_BOX, "BOX", 0, "Box", ""},
38  {TXF_EWA, "EWA", 0, "EWA", ""},
39  {TXF_FELINE, "FELINE", 0, "FELINE", ""},
40  {TXF_AREA, "AREA", 0, "Area", ""},
41  {0, NULL, 0, NULL, NULL},
42 };
43 #endif
44 
46  {0, "NONE", 0, "None", ""},
47  {TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", "Procedural - create a ramp texture"},
48  {TEX_CLOUDS,
49  "CLOUDS",
50  ICON_TEXTURE,
51  "Clouds",
52  "Procedural - create a cloud-like fractal noise texture"},
54  "DISTORTED_NOISE",
55  ICON_TEXTURE,
56  "Distorted Noise",
57  "Procedural - noise texture distorted by two noise algorithms"},
58  {TEX_IMAGE,
59  "IMAGE",
60  ICON_IMAGE_DATA,
61  "Image or Movie",
62  "Allow for images or movies to be used as textures"},
63  {TEX_MAGIC,
64  "MAGIC",
65  ICON_TEXTURE,
66  "Magic",
67  "Procedural - color texture based on trigonometric functions"},
68  {TEX_MARBLE,
69  "MARBLE",
70  ICON_TEXTURE,
71  "Marble",
72  "Procedural - marble-like noise texture with wave generated bands"},
73  {TEX_MUSGRAVE,
74  "MUSGRAVE",
75  ICON_TEXTURE,
76  "Musgrave",
77  "Procedural - highly flexible fractal noise texture"},
78  {TEX_NOISE,
79  "NOISE",
80  ICON_TEXTURE,
81  "Noise",
82  "Procedural - random noise, gives a different result every time, for every frame, for every "
83  "pixel"},
84  {TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", "Procedural - create a fractal noise texture"},
85  {TEX_VORONOI,
86  "VORONOI",
87  ICON_TEXTURE,
88  "Voronoi",
89  "Procedural - create cell-like patterns based on Worley noise"},
90  {TEX_WOOD,
91  "WOOD",
92  ICON_TEXTURE,
93  "Wood",
94  "Procedural - wave generated bands or rings, with optional noise"},
95  {0, NULL, 0, NULL, NULL},
96 };
97 
98 #ifndef RNA_RUNTIME
100  {MTEX_BLEND, "MIX", 0, "Mix", ""},
102  {MTEX_DARK, "DARKEN", 0, "Darken", ""},
103  {MTEX_MUL, "MULTIPLY", 0, "Multiply", ""},
105  {MTEX_LIGHT, "LIGHTEN", 0, "Lighten", ""},
106  {MTEX_SCREEN, "SCREEN", 0, "Screen", ""},
107  {MTEX_ADD, "ADD", 0, "Add", ""},
109  {MTEX_OVERLAY, "OVERLAY", 0, "Overlay", ""},
110  {MTEX_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
111  {MTEX_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
113  {MTEX_DIFF, "DIFFERENCE", 0, "Difference", ""},
114  {MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
115  {MTEX_DIV, "DIVIDE", 0, "Divide", ""},
117  {MTEX_BLEND_HUE, "HUE", 0, "Hue", ""},
118  {MTEX_BLEND_SAT, "SATURATION", 0, "Saturation", ""},
119  {MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
120  {MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
121  {0, NULL, 0, NULL, NULL},
122 };
123 #endif
124 
125 #ifdef RNA_RUNTIME
126 
127 # include "MEM_guardedalloc.h"
128 
129 # include "RNA_access.h"
130 
131 # include "BKE_colorband.h"
132 # include "BKE_context.h"
133 # include "BKE_image.h"
134 # include "BKE_main.h"
135 # include "BKE_texture.h"
136 
137 # include "DEG_depsgraph.h"
138 # include "DEG_depsgraph_build.h"
139 
140 # include "ED_node.h"
141 # include "ED_render.h"
142 
143 static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
144 {
145  Tex *tex = (Tex *)ptr->data;
146 
147  switch (tex->type) {
148  case TEX_BLEND:
149  return &RNA_BlendTexture;
150  case TEX_CLOUDS:
151  return &RNA_CloudsTexture;
152  case TEX_DISTNOISE:
153  return &RNA_DistortedNoiseTexture;
154  case TEX_IMAGE:
155  return &RNA_ImageTexture;
156  case TEX_MAGIC:
157  return &RNA_MagicTexture;
158  case TEX_MARBLE:
159  return &RNA_MarbleTexture;
160  case TEX_MUSGRAVE:
161  return &RNA_MusgraveTexture;
162  case TEX_NOISE:
163  return &RNA_NoiseTexture;
164  case TEX_STUCCI:
165  return &RNA_StucciTexture;
166  case TEX_VORONOI:
167  return &RNA_VoronoiTexture;
168  case TEX_WOOD:
169  return &RNA_WoodTexture;
170  default:
171  return &RNA_Texture;
172  }
173 }
174 
175 static void rna_Texture_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
176 {
177  ID *id = ptr->owner_id;
178 
179  if (GS(id->name) == ID_TE) {
180  Tex *tex = (Tex *)ptr->owner_id;
181 
182  DEG_id_tag_update(&tex->id, 0);
186  }
187  else if (GS(id->name) == ID_NT) {
190  }
191 }
192 
193 static void rna_Texture_mapping_update(Main *bmain, Scene *scene, PointerRNA *ptr)
194 {
195  ID *id = ptr->owner_id;
196  TexMapping *texmap = ptr->data;
197  BKE_texture_mapping_init(texmap);
198 
199  if (GS(id->name) == ID_NT) {
201  /* Try to find and tag the node that this #TexMapping belongs to. */
203  /* This assumes that the #TexMapping is stored at the beginning of the node storage. This is
204  * generally true, see #NodeTexBase. If the assumption happens to be false, there might be a
205  * missing update. */
206  if (node->storage == texmap) {
208  }
209  }
210  }
211 
212  rna_Texture_update(bmain, scene, ptr);
213 }
214 
215 static void rna_Color_mapping_update(Main *UNUSED(bmain),
216  Scene *UNUSED(scene),
218 {
219  /* nothing to do */
220 }
221 
222 /* Used for Texture Properties, used (also) for/in Nodes */
223 static void rna_Texture_nodes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
224 {
225  Tex *tex = (Tex *)ptr->owner_id;
226 
227  DEG_id_tag_update(&tex->id, 0);
230 }
231 
232 static void rna_Texture_type_set(PointerRNA *ptr, int value)
233 {
234  Tex *tex = (Tex *)ptr->data;
235 
236  BKE_texture_type_set(tex, value);
237 }
238 
239 void rna_TextureSlotTexture_update(bContext *C, PointerRNA *ptr)
240 {
243 }
244 
246 {
247  ID *id = ptr->owner_id;
248 
249  DEG_id_tag_update(id, 0);
250 
251  switch (GS(id->name)) {
252  case ID_MA:
255  break;
256  case ID_WO:
258  break;
259  case ID_LA:
262  break;
263  case ID_BR: {
265  MTex *mtex = ptr->data;
266  ViewLayer *view_layer = CTX_data_view_layer(C);
267  BKE_paint_invalidate_overlay_tex(scene, view_layer, mtex->tex);
269  break;
270  }
271  case ID_LS:
273  break;
274  case ID_PA: {
275  MTex *mtex = ptr->data;
276  int recalc = ID_RECALC_GEOMETRY;
277 
278  if (mtex->mapto & PAMAP_INIT) {
279  recalc |= ID_RECALC_PSYS_RESET;
280  }
281  if (mtex->mapto & PAMAP_CHILD) {
282  recalc |= ID_RECALC_PSYS_CHILD;
283  }
284 
285  DEG_id_tag_update(id, recalc);
287  break;
288  }
289  default:
290  break;
291  }
292 }
293 
294 char *rna_TextureSlot_path(const PointerRNA *ptr)
295 {
296  MTex *mtex = ptr->data;
297 
298  /* if there is ID-data, resolve the path using the index instead of by name,
299  * since the name used is the name of the texture assigned, but the texture
300  * may be used multiple times in the same stack
301  */
302  if (ptr->owner_id) {
303  if (GS(ptr->owner_id->name) == ID_BR) {
304  return BLI_strdup("texture_slot");
305  }
306  else {
307  PointerRNA id_ptr;
308  PropertyRNA *prop;
309 
310  /* find the 'textures' property of the ID-struct */
312  prop = RNA_struct_find_property(&id_ptr, "texture_slots");
313 
314  /* get an iterator for this property, and try to find the relevant index */
315  if (prop) {
316  int index = RNA_property_collection_lookup_index(&id_ptr, prop, ptr);
317 
318  if (index != -1) {
319  return BLI_sprintfN("texture_slots[%d]", index);
320  }
321  }
322  }
323  }
324 
325  /* this is a compromise for the remaining cases... */
326  if (mtex->tex) {
327  char name_esc[(sizeof(mtex->tex->id.name) - 2) * 2];
328 
329  BLI_str_escape(name_esc, mtex->tex->id.name + 2, sizeof(name_esc));
330  return BLI_sprintfN("texture_slots[\"%s\"]", name_esc);
331  }
332  else {
333  return BLI_strdup("texture_slots[0]");
334  }
335 }
336 
337 static int rna_TextureSlot_name_length(PointerRNA *ptr)
338 {
339  MTex *mtex = ptr->data;
340 
341  if (mtex->tex) {
342  return strlen(mtex->tex->id.name + 2);
343  }
344 
345  return 0;
346 }
347 
348 static void rna_TextureSlot_name_get(PointerRNA *ptr, char *str)
349 {
350  MTex *mtex = ptr->data;
351 
352  if (mtex->tex) {
353  strcpy(str, mtex->tex->id.name + 2);
354  }
355  else {
356  str[0] = '\0';
357  }
358 }
359 
360 static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
361 {
362  MTex *mtex = ptr->data;
363  Tex *tex = mtex->tex;
364  int cur = mtex->which_output;
365 
366  if (tex) {
368  bNode *node;
369  if (ntree) {
370  for (node = ntree->nodes.first; node; node = node->next) {
371  if (node->type == TEX_NODE_OUTPUT) {
372  if (cur == node->custom1) {
373  return cur;
374  }
375  }
376  }
377  }
378  }
379 
380  mtex->which_output = 0;
381  return 0;
382 }
383 
384 static const EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *UNUSED(C),
385  PointerRNA *ptr,
386  PropertyRNA *UNUSED(prop),
387  bool *r_free)
388 {
389  MTex *mtex = ptr->data;
390  Tex *tex = mtex->tex;
391  EnumPropertyItem *item = NULL;
392  int totitem = 0;
393 
394  if (tex) {
396  if (ntree) {
397  EnumPropertyItem tmp = {0, "", 0, "", ""};
398  bNode *node;
399 
400  tmp.value = 0;
401  tmp.name = "Not Specified";
402  tmp.identifier = "NOT_SPECIFIED";
403  RNA_enum_item_add(&item, &totitem, &tmp);
404 
405  for (node = ntree->nodes.first; node; node = node->next) {
406  if (node->type == TEX_NODE_OUTPUT) {
407  tmp.value = node->custom1;
408  tmp.name = ((TexNodeOutput *)node->storage)->name;
409  tmp.identifier = tmp.name;
410  RNA_enum_item_add(&item, &totitem, &tmp);
411  }
412  }
413  }
414  }
415 
416  RNA_enum_item_end(&item, &totitem);
417  *r_free = true;
418 
419  return item;
420 }
421 
422 static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, bool value)
423 {
424  Tex *tex = (Tex *)ptr->data;
425 
426  if (value) {
427  tex->flag |= TEX_COLORBAND;
428  }
429  else {
430  tex->flag &= ~TEX_COLORBAND;
431  }
432 
433  if ((tex->flag & TEX_COLORBAND) && tex->coba == NULL) {
434  tex->coba = BKE_colorband_add(false);
435  }
436 }
437 
438 static void rna_Texture_use_nodes_update(bContext *C, PointerRNA *ptr)
439 {
440  Tex *tex = (Tex *)ptr->data;
441 
442  if (tex->use_nodes) {
443  tex->type = 0;
444 
445  if (tex->nodetree == NULL) {
447  }
448  }
449 
450  rna_Texture_nodes_update(CTX_data_main(C), CTX_data_scene(C), ptr);
451 }
452 
453 static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, bool value)
454 {
455  Tex *tex = (Tex *)ptr->data;
456 
457  if (value) {
458  tex->imaflag |= TEX_MIPMAP;
459  }
460  else {
461  tex->imaflag &= ~TEX_MIPMAP;
462  }
463 }
464 
465 #else
466 
467 static void rna_def_texmapping(BlenderRNA *brna)
468 {
469  static const EnumPropertyItem prop_mapping_items[] = {
470  {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
471  {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
472  {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
473  {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Map with Z as central axis"},
474  {0, NULL, 0, NULL, NULL},
475  };
476 
477  static const EnumPropertyItem prop_xyz_mapping_items[] = {
478  {0, "NONE", 0, "None", ""},
479  {1, "X", 0, "X", ""},
480  {2, "Y", 0, "Y", ""},
481  {3, "Z", 0, "Z", ""},
482  {0, NULL, 0, NULL, NULL},
483  };
484 
485  StructRNA *srna;
486  PropertyRNA *prop;
487 
488  srna = RNA_def_struct(brna, "TexMapping", NULL);
489  RNA_def_struct_ui_text(srna, "Texture Mapping", "Texture coordinate mapping settings");
490 
491  prop = RNA_def_property(srna, "vector_type", PROP_ENUM, PROP_NONE);
492  RNA_def_property_enum_sdna(prop, NULL, "type");
494  RNA_def_property_ui_text(prop, "Type", "Type of vector that the mapping transforms");
495  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
496 
497  prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION);
498  RNA_def_property_float_sdna(prop, NULL, "loc");
499  RNA_def_property_ui_text(prop, "Location", "");
500  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
501  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
502 
503  /* Not PROP_XYZ, this is now in radians, no more degrees */
504  prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER);
505  RNA_def_property_float_sdna(prop, NULL, "rot");
506  RNA_def_property_ui_text(prop, "Rotation", "");
507  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
508 
509  prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
510  RNA_def_property_float_sdna(prop, NULL, "size");
512  RNA_def_property_ui_text(prop, "Scale", "");
513  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
514 
515  prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_XYZ);
516  RNA_def_property_float_sdna(prop, NULL, "min");
517  RNA_def_property_ui_text(prop, "Minimum", "Minimum value for clipping");
518  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
519 
520  prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_XYZ);
521  RNA_def_property_float_sdna(prop, NULL, "max");
522  RNA_def_property_ui_text(prop, "Maximum", "Maximum value for clipping");
523  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
524 
525  prop = RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
527  RNA_def_property_ui_text(prop, "Has Minimum", "Whether to use minimum clipping value");
528  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
529 
530  prop = RNA_def_property(srna, "use_max", PROP_BOOLEAN, PROP_NONE);
532  RNA_def_property_ui_text(prop, "Has Maximum", "Whether to use maximum clipping value");
533  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
534 
535  prop = RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
536  RNA_def_property_enum_sdna(prop, NULL, "projx");
537  RNA_def_property_enum_items(prop, prop_xyz_mapping_items);
538  RNA_def_property_ui_text(prop, "X Mapping", "");
539  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
540 
541  prop = RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
542  RNA_def_property_enum_sdna(prop, NULL, "projy");
543  RNA_def_property_enum_items(prop, prop_xyz_mapping_items);
544  RNA_def_property_ui_text(prop, "Y Mapping", "");
545  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
546 
547  prop = RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
548  RNA_def_property_enum_sdna(prop, NULL, "projz");
549  RNA_def_property_enum_items(prop, prop_xyz_mapping_items);
550  RNA_def_property_ui_text(prop, "Z Mapping", "");
551  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
552 
553  prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
554  RNA_def_property_enum_items(prop, prop_mapping_items);
555  RNA_def_property_ui_text(prop, "Mapping", "");
556  RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
557 }
558 
560 {
561  StructRNA *srna;
562  PropertyRNA *prop;
563 
564  srna = RNA_def_struct(brna, "ColorMapping", NULL);
565  RNA_def_struct_ui_text(srna, "Color Mapping", "Color mapping settings");
566 
567  prop = RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
569  RNA_def_property_ui_text(prop, "Use Color Ramp", "Toggle color ramp operations");
570  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
571 
572  prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
573  RNA_def_property_pointer_sdna(prop, NULL, "coba");
574  RNA_def_property_struct_type(prop, "ColorRamp");
575  RNA_def_property_ui_text(prop, "Color Ramp", "");
576  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
577 
578  prop = RNA_def_property(srna, "brightness", PROP_FLOAT, PROP_NONE);
579  RNA_def_property_float_sdna(prop, NULL, "bright");
580  RNA_def_property_range(prop, 0, 2);
581  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
582  RNA_def_property_ui_text(prop, "Brightness", "Adjust the brightness of the texture");
583  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
584 
585  prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
586  RNA_def_property_range(prop, 0.0, 5);
587  RNA_def_property_ui_range(prop, 0, 5, 1, 3);
588  RNA_def_property_ui_text(prop, "Contrast", "Adjust the contrast of the texture");
589  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
590 
591  prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
592  RNA_def_property_range(prop, 0, 2);
593  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
594  RNA_def_property_ui_text(prop, "Saturation", "Adjust the saturation of colors in the texture");
595  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
596 
597  prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
599  RNA_def_property_ui_text(prop, "Blend Type", "Mode used to mix with texture output color");
600  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
601 
602  prop = RNA_def_property(srna, "blend_color", PROP_FLOAT, PROP_COLOR);
603  RNA_def_property_array(prop, 3);
604  RNA_def_property_ui_text(prop, "Color", "Blend color to mix with texture output color");
605  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
606 
607  prop = RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
608  RNA_def_property_ui_text(prop, "Blend Factor", "");
609  RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
610 }
611 
612 static void rna_def_mtex(BlenderRNA *brna)
613 {
614  StructRNA *srna;
615  PropertyRNA *prop;
616 
617  static const EnumPropertyItem output_node_items[] = {
618  {0, "DUMMY", 0, "Dummy", ""},
619  {0, NULL, 0, NULL, NULL},
620  };
621 
622  srna = RNA_def_struct(brna, "TextureSlot", NULL);
623  RNA_def_struct_sdna(srna, "MTex");
625  srna, "Texture Slot", "Texture slot defining the mapping and influence of a texture");
626  RNA_def_struct_path_func(srna, "rna_TextureSlot_path");
627  RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
628 
629  prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
630  RNA_def_property_pointer_sdna(prop, NULL, "tex");
631  RNA_def_property_struct_type(prop, "Texture");
634  RNA_def_property_ui_text(prop, "Texture", "Texture data-block used by this texture slot");
635  RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, "rna_TextureSlotTexture_update");
636 
637  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
639  prop, "rna_TextureSlot_name_get", "rna_TextureSlot_name_length", NULL);
640  RNA_def_property_ui_text(prop, "Name", "Texture slot name");
643  RNA_def_struct_name_property(srna, prop);
644  RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
645 
646  /* mapping */
647  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
648  RNA_def_property_float_sdna(prop, NULL, "ofs");
652  prop, "Offset", "Fine tune of the texture mapping X, Y and Z locations");
653  RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
654 
655  prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
656  RNA_def_property_float_sdna(prop, NULL, "size");
658  RNA_def_property_ui_range(prop, -100, 100, 10, 2);
659  RNA_def_property_ui_text(prop, "Size", "Set scaling for the texture's X, Y and Z sizes");
660  RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
661 
662  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
663  RNA_def_property_float_sdna(prop, NULL, "r");
664  RNA_def_property_array(prop, 3);
667  prop,
668  "Color",
669  "Default color for textures that don't return RGB or when RGB to intensity is enabled");
670  RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
671 
672  prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
673  RNA_def_property_enum_sdna(prop, NULL, "blendtype");
676  RNA_def_property_ui_text(prop, "Blend Type", "Mode used to apply the texture");
677  RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
678 
679  prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
680  RNA_def_property_float_sdna(prop, NULL, "def_var");
682  RNA_def_property_ui_range(prop, 0, 1, 10, 3);
684  prop,
685  "Default Value",
686  "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard");
687  RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
688 
689  prop = RNA_def_property(srna, "output_node", PROP_ENUM, PROP_NONE);
690  RNA_def_property_enum_sdna(prop, NULL, "which_output");
691  RNA_def_property_enum_items(prop, output_node_items);
694  prop, "rna_TextureSlot_output_node_get", NULL, "rna_TextureSlot_output_node_itemf");
696  prop, "Output Node", "Which output node to use, for node-based textures");
697  RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
698 }
699 
701 {
702  PropertyRNA *prop;
703 
704  prop = RNA_def_property(srna, "use_mipmap", PROP_BOOLEAN, PROP_NONE);
705  RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_MIPMAP);
706  RNA_def_property_boolean_funcs(prop, NULL, "rna_ImageTexture_mipmap_set");
707  RNA_def_property_ui_text(prop, "MIP Map", "Use auto-generated MIP maps for the image");
708  RNA_def_property_update(prop, 0, "rna_Texture_update");
709 
710  prop = RNA_def_property(srna, "use_mipmap_gauss", PROP_BOOLEAN, PROP_NONE);
713  prop, "MIP Map Gaussian filter", "Use Gauss filter to sample down MIP maps");
714  RNA_def_property_update(prop, 0, "rna_Texture_update");
715 
716  prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
717  RNA_def_property_enum_sdna(prop, NULL, "texfilter");
719  RNA_def_property_ui_text(prop, "Filter", "Texture filter to use for sampling image");
720  RNA_def_property_update(prop, 0, "rna_Texture_update");
721 
722  prop = RNA_def_property(srna, "filter_lightprobes", PROP_INT, PROP_NONE);
723  RNA_def_property_int_sdna(prop, NULL, "afmax");
724  RNA_def_property_range(prop, 1, 256);
726  prop,
727  "Filter Probes",
728  "Maximum number of samples (higher gives less blur at distant/oblique angles, "
729  "but is also slower)");
730  RNA_def_property_update(prop, 0, "rna_Texture_update");
731 
732  prop = RNA_def_property(srna, "filter_eccentricity", PROP_INT, PROP_NONE);
733  RNA_def_property_int_sdna(prop, NULL, "afmax");
734  RNA_def_property_range(prop, 1, 256);
736  prop,
737  "Filter Eccentricity",
738  "Maximum eccentricity (higher gives less blur at distant/oblique angles, "
739  "but is also slower)");
740  RNA_def_property_update(prop, 0, "rna_Texture_update");
741 
742  prop = RNA_def_property(srna, "use_filter_size_min", PROP_BOOLEAN, PROP_NONE);
745  prop, "Minimum Filter Size", "Use Filter Size as a minimal filter value in pixels");
746  RNA_def_property_update(prop, 0, "rna_Texture_update");
747 
748  prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
749  RNA_def_property_float_sdna(prop, NULL, "filtersize");
750  RNA_def_property_range(prop, 0.1, 50.0);
751  RNA_def_property_ui_range(prop, 0.1, 50.0, 1, 2);
753  prop, "Filter Size", "Multiply the filter size used by MIP Map and Interpolation");
754  RNA_def_property_update(prop, 0, "rna_Texture_update");
755 }
756 
758  {TEX_BLENDER,
759  "BLENDER_ORIGINAL",
760  0,
761  "Blender Original",
762  "Noise algorithm - Blender original: Smooth interpolated noise"},
763  {TEX_STDPERLIN,
764  "ORIGINAL_PERLIN",
765  0,
766  "Original Perlin",
767  "Noise algorithm - Original Perlin: Smooth interpolated noise"},
768  {TEX_NEWPERLIN,
769  "IMPROVED_PERLIN",
770  0,
771  "Improved Perlin",
772  "Noise algorithm - Improved Perlin: Smooth interpolated noise"},
774  "VORONOI_F1",
775  0,
776  "Voronoi F1",
777  "Noise algorithm - Voronoi F1: Returns distance to the closest feature point"},
779  "VORONOI_F2",
780  0,
781  "Voronoi F2",
782  "Noise algorithm - Voronoi F2: Returns distance to the 2nd closest feature point"},
784  "VORONOI_F3",
785  0,
786  "Voronoi F3",
787  "Noise algorithm - Voronoi F3: Returns distance to the 3rd closest feature point"},
789  "VORONOI_F4",
790  0,
791  "Voronoi F4",
792  "Noise algorithm - Voronoi F4: Returns distance to the 4th closest feature point"},
793  {TEX_VORONOI_F2F1, "VORONOI_F2_F1", 0, "Voronoi F2-F1", "Noise algorithm - Voronoi F1-F2"},
795  "VORONOI_CRACKLE",
796  0,
797  "Voronoi Crackle",
798  "Noise algorithm - Voronoi Crackle: Voronoi tessellation with sharp edges"},
799  {TEX_CELLNOISE,
800  "CELL_NOISE",
801  0,
802  "Cell Noise",
803  "Noise algorithm - Cell Noise: Square cell tessellation"},
804  {0, NULL, 0, NULL, NULL},
805 };
806 
808  {TEX_NOISESOFT, "SOFT_NOISE", 0, "Soft", "Generate soft noise (smooth transitions)"},
809  {TEX_NOISEPERL, "HARD_NOISE", 0, "Hard", "Generate hard noise (sharp transitions)"},
810  {0, NULL, 0, NULL, NULL},
811 };
812 
814 {
815  StructRNA *srna;
816  PropertyRNA *prop;
817 
818  static const EnumPropertyItem prop_clouds_stype[] = {
819  {TEX_DEFAULT, "GRAYSCALE", 0, "Grayscale", ""},
820  {TEX_COLOR, "COLOR", 0, "Color", ""},
821  {0, NULL, 0, NULL, NULL},
822  };
823 
824  srna = RNA_def_struct(brna, "CloudsTexture", "Texture");
825  RNA_def_struct_ui_text(srna, "Clouds Texture", "Procedural noise texture");
826  RNA_def_struct_sdna(srna, "Tex");
827 
828  prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
829  RNA_def_property_float_sdna(prop, NULL, "noisesize");
830  RNA_def_property_range(prop, 0.0001, FLT_MAX);
831  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
832  RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
833  RNA_def_property_update(prop, 0, "rna_Texture_update");
834 
835  prop = RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
836  RNA_def_property_int_sdna(prop, NULL, "noisedepth");
837  RNA_def_property_range(prop, 0, 30);
838  RNA_def_property_ui_range(prop, 0, 24, 1, 2);
839  RNA_def_property_ui_text(prop, "Noise Depth", "Depth of the cloud calculation");
840  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
841 
842  prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
843  RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
845  RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
846  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
847 
848  prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
849  RNA_def_property_enum_sdna(prop, NULL, "noisetype");
851  RNA_def_property_ui_text(prop, "Noise Type", "");
852  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
853 
854  prop = RNA_def_property(srna, "cloud_type", PROP_ENUM, PROP_NONE);
855  RNA_def_property_enum_sdna(prop, NULL, "stype");
856  RNA_def_property_enum_items(prop, prop_clouds_stype);
858  prop, "Color", "Determine whether Noise returns grayscale or RGB values");
859  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
860 
861  prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
862  RNA_def_property_range(prop, 0.001, 0.1);
863  RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
864  RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
865  RNA_def_property_update(prop, 0, "rna_Texture_update");
866 }
867 
869 {
870  StructRNA *srna;
871  PropertyRNA *prop;
872 
873  static const EnumPropertyItem prop_wood_stype[] = {
874  {TEX_BAND, "BANDS", 0, "Bands", "Use standard wood texture in bands"},
875  {TEX_RING, "RINGS", 0, "Rings", "Use wood texture in rings"},
876  {TEX_BANDNOISE, "BANDNOISE", 0, "Band Noise", "Add noise to standard wood"},
877  {TEX_RINGNOISE, "RINGNOISE", 0, "Ring Noise", "Add noise to rings"},
878  {0, NULL, 0, NULL, NULL},
879  };
880 
881  static const EnumPropertyItem prop_wood_noisebasis2[] = {
882  {TEX_SIN, "SIN", 0, "Sine", "Use a sine wave to produce bands"},
883  {TEX_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"},
884  {TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
885  {0, NULL, 0, NULL, NULL},
886  };
887 
888  srna = RNA_def_struct(brna, "WoodTexture", "Texture");
889  RNA_def_struct_ui_text(srna, "Wood Texture", "Procedural noise texture");
890  RNA_def_struct_sdna(srna, "Tex");
891 
892  prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
893  RNA_def_property_float_sdna(prop, NULL, "noisesize");
894  RNA_def_property_range(prop, 0.0001, FLT_MAX);
895  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
896  RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
897  RNA_def_property_update(prop, 0, "rna_Texture_update");
898 
899  prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
900  RNA_def_property_float_sdna(prop, NULL, "turbul");
901  RNA_def_property_range(prop, 0.0001, FLT_MAX);
902  RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
903  RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the bandnoise and ringnoise types");
904  RNA_def_property_update(prop, 0, "rna_Texture_update");
905 
906  prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
907  RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
909  RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
910  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
911 
912  prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
913  RNA_def_property_enum_sdna(prop, NULL, "noisetype");
915  RNA_def_property_ui_text(prop, "Noise Type", "");
916  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
917 
918  prop = RNA_def_property(srna, "wood_type", PROP_ENUM, PROP_NONE);
919  RNA_def_property_enum_sdna(prop, NULL, "stype");
920  RNA_def_property_enum_items(prop, prop_wood_stype);
921  RNA_def_property_ui_text(prop, "Pattern", "");
922  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
923 
924  prop = RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
925  RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
926  RNA_def_property_enum_items(prop, prop_wood_noisebasis2);
927  RNA_def_property_ui_text(prop, "Noise Basis 2", "");
928  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
929 
930  prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
931  RNA_def_property_range(prop, 0.001, 0.1);
932  RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
933  RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
934  RNA_def_property_update(prop, 0, "rna_Texture_update");
935 }
936 
938 {
939  StructRNA *srna;
940  PropertyRNA *prop;
941 
942  static const EnumPropertyItem prop_marble_stype[] = {
943  {TEX_SOFT, "SOFT", 0, "Soft", "Use soft marble"},
944  {TEX_SHARP, "SHARP", 0, "Sharp", "Use more clearly defined marble"},
945  {TEX_SHARPER, "SHARPER", 0, "Sharper", "Use very clearly defined marble"},
946  {0, NULL, 0, NULL, NULL},
947  };
948 
949  static const EnumPropertyItem prop_marble_noisebasis2[] = {
950  {TEX_SIN, "SIN", 0, "Sin", "Use a sine wave to produce bands"},
951  {TEX_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"},
952  {TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
953  {0, NULL, 0, NULL, NULL},
954  };
955 
956  srna = RNA_def_struct(brna, "MarbleTexture", "Texture");
957  RNA_def_struct_ui_text(srna, "Marble Texture", "Procedural noise texture");
958  RNA_def_struct_sdna(srna, "Tex");
959 
960  prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
961  RNA_def_property_float_sdna(prop, NULL, "noisesize");
962  RNA_def_property_range(prop, 0.0001, FLT_MAX);
963  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
964  RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
965  RNA_def_property_update(prop, 0, "rna_Texture_update");
966 
967  prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
968  RNA_def_property_float_sdna(prop, NULL, "turbul");
969  RNA_def_property_range(prop, 0.0001, FLT_MAX);
970  RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
971  RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the bandnoise and ringnoise types");
972  RNA_def_property_update(prop, 0, "rna_Texture_update");
973 
974  prop = RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
975  RNA_def_property_int_sdna(prop, NULL, "noisedepth");
976  RNA_def_property_range(prop, 0, 30);
977  RNA_def_property_ui_range(prop, 0, 24, 1, 2);
978  RNA_def_property_ui_text(prop, "Noise Depth", "Depth of the cloud calculation");
979  RNA_def_property_update(prop, 0, "rna_Texture_update");
980 
981  prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
982  RNA_def_property_enum_sdna(prop, NULL, "noisetype");
984  RNA_def_property_ui_text(prop, "Noise Type", "");
985  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
986 
987  prop = RNA_def_property(srna, "marble_type", PROP_ENUM, PROP_NONE);
988  RNA_def_property_enum_sdna(prop, NULL, "stype");
989  RNA_def_property_enum_items(prop, prop_marble_stype);
990  RNA_def_property_ui_text(prop, "Pattern", "");
991  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
992 
993  prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
994  RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
996  RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
997  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
998 
999  prop = RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
1000  RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
1001  RNA_def_property_enum_items(prop, prop_marble_noisebasis2);
1002  RNA_def_property_ui_text(prop, "Noise Basis 2", "");
1003  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
1004 
1005  prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
1006  RNA_def_property_range(prop, 0.001, 0.1);
1007  RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
1008  RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
1009  RNA_def_property_update(prop, 0, "rna_Texture_update");
1010 }
1011 
1013 {
1014  StructRNA *srna;
1015  PropertyRNA *prop;
1016 
1017  srna = RNA_def_struct(brna, "MagicTexture", "Texture");
1018  RNA_def_struct_ui_text(srna, "Magic Texture", "Procedural noise texture");
1019  RNA_def_struct_sdna(srna, "Tex");
1020 
1021  prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
1022  RNA_def_property_float_sdna(prop, NULL, "turbul");
1023  RNA_def_property_range(prop, 0.0001, FLT_MAX);
1024  RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
1025  RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the noise");
1026  RNA_def_property_update(prop, 0, "rna_Texture_update");
1027 
1028  prop = RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
1029  RNA_def_property_int_sdna(prop, NULL, "noisedepth");
1030  RNA_def_property_range(prop, 0, 30);
1031  RNA_def_property_ui_range(prop, 0, 24, 1, 2);
1032  RNA_def_property_ui_text(prop, "Noise Depth", "Depth of the noise");
1033  RNA_def_property_update(prop, 0, "rna_Texture_update");
1034 }
1035 
1037 {
1038  StructRNA *srna;
1039  PropertyRNA *prop;
1040 
1041  static const EnumPropertyItem prop_blend_progression[] = {
1042  {TEX_LIN, "LINEAR", 0, "Linear", "Create a linear progression"},
1043  {TEX_QUAD, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"},
1044  {TEX_EASE, "EASING", 0, "Easing", "Create a progression easing from one step to the next"},
1045  {TEX_DIAG, "DIAGONAL", 0, "Diagonal", "Create a diagonal progression"},
1046  {TEX_SPHERE, "SPHERICAL", 0, "Spherical", "Create a spherical progression"},
1047  {TEX_HALO,
1048  "QUADRATIC_SPHERE",
1049  0,
1050  "Quadratic Sphere",
1051  "Create a quadratic progression in the shape of a sphere"},
1052  {TEX_RAD, "RADIAL", 0, "Radial", "Create a radial progression"},
1053  {0, NULL, 0, NULL, NULL},
1054  };
1055 
1056  static const EnumPropertyItem prop_flip_axis_items[] = {
1057  {0, "HORIZONTAL", 0, "Horizontal", "No flipping"},
1058  {TEX_FLIPBLEND, "VERTICAL", 0, "Vertical", "Flip the texture's X and Y axis"},
1059  {0, NULL, 0, NULL, NULL},
1060  };
1061 
1062  srna = RNA_def_struct(brna, "BlendTexture", "Texture");
1063  RNA_def_struct_ui_text(srna, "Blend Texture", "Procedural color blending texture");
1064  RNA_def_struct_sdna(srna, "Tex");
1065 
1066  prop = RNA_def_property(srna, "progression", PROP_ENUM, PROP_NONE);
1067  RNA_def_property_enum_sdna(prop, NULL, "stype");
1068  RNA_def_property_enum_items(prop, prop_blend_progression);
1069  RNA_def_property_ui_text(prop, "Progression", "Style of the color blending");
1070  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
1071 
1072  prop = RNA_def_property(srna, "use_flip_axis", PROP_ENUM, PROP_NONE);
1074  RNA_def_property_enum_items(prop, prop_flip_axis_items);
1075  RNA_def_property_ui_text(prop, "Flip Axis", "Flip the texture's X and Y axis");
1076  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
1077 }
1078 
1080 {
1081  StructRNA *srna;
1082  PropertyRNA *prop;
1083 
1084  static const EnumPropertyItem prop_stucci_stype[] = {
1085  {TEX_PLASTIC, "PLASTIC", 0, "Plastic", "Use standard stucci"},
1086  {TEX_WALLIN, "WALL_IN", 0, "Wall In", "Create Dimples"},
1087  {TEX_WALLOUT, "WALL_OUT", 0, "Wall Out", "Create Ridges"},
1088  {0, NULL, 0, NULL, NULL},
1089  };
1090 
1091  srna = RNA_def_struct(brna, "StucciTexture", "Texture");
1092  RNA_def_struct_ui_text(srna, "Stucci Texture", "Procedural noise texture");
1093  RNA_def_struct_sdna(srna, "Tex");
1094 
1095  prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
1096  RNA_def_property_float_sdna(prop, NULL, "turbul");
1097  RNA_def_property_range(prop, 0.0001, FLT_MAX);
1098  RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
1099  RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the noise");
1100  RNA_def_property_update(prop, 0, "rna_Texture_update");
1101 
1102  prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
1103  RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
1105  RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
1106  RNA_def_property_update(prop, 0, "rna_Texture_update");
1107 
1108  prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
1109  RNA_def_property_float_sdna(prop, NULL, "noisesize");
1110  RNA_def_property_range(prop, 0.0001, FLT_MAX);
1111  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
1112  RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
1113  RNA_def_property_update(prop, 0, "rna_Texture_update");
1114 
1115  prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
1116  RNA_def_property_enum_sdna(prop, NULL, "noisetype");
1118  RNA_def_property_ui_text(prop, "Noise Type", "");
1119  RNA_def_property_update(prop, 0, "rna_Texture_update");
1120 
1121  prop = RNA_def_property(srna, "stucci_type", PROP_ENUM, PROP_NONE);
1122  RNA_def_property_enum_sdna(prop, NULL, "stype");
1123  RNA_def_property_enum_items(prop, prop_stucci_stype);
1124  RNA_def_property_ui_text(prop, "Pattern", "");
1125  RNA_def_property_update(prop, 0, "rna_Texture_update");
1126 }
1127 
1129 {
1130  StructRNA *srna;
1131 
1132  srna = RNA_def_struct(brna, "NoiseTexture", "Texture");
1133  RNA_def_struct_ui_text(srna, "Noise Texture", "Procedural noise texture");
1134  RNA_def_struct_sdna(srna, "Tex");
1135 }
1136 
1138 {
1139  StructRNA *srna;
1140  PropertyRNA *prop;
1141 
1142  static const EnumPropertyItem prop_image_extension[] = {
1143  {TEX_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"},
1144  {TEX_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"},
1145  {TEX_CLIPCUBE,
1146  "CLIP_CUBE",
1147  0,
1148  "Clip Cube",
1149  "Clip to cubic-shaped area around the image and set exterior pixels as transparent"},
1150  {TEX_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"},
1151  {TEX_CHECKER, "CHECKER", 0, "Checker", "Cause the image to repeat in checker board pattern"},
1152  {0, NULL, 0, NULL, NULL},
1153  };
1154 
1155  srna = RNA_def_struct(brna, "ImageTexture", "Texture");
1156  RNA_def_struct_ui_text(srna, "Image Texture", "");
1157  RNA_def_struct_sdna(srna, "Tex");
1158 
1159  prop = RNA_def_property(srna, "use_interpolation", PROP_BOOLEAN, PROP_NONE);
1160  RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_INTERPOL);
1161  RNA_def_property_ui_text(prop, "Interpolation", "Interpolate pixels using selected filter");
1162  RNA_def_property_update(prop, 0, "rna_Texture_update");
1163 
1164  /* XXX: I think flip_axis should be a generic Texture property,
1165  * enabled for all the texture types. */
1166  prop = RNA_def_property(srna, "use_flip_axis", PROP_BOOLEAN, PROP_NONE);
1167  RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_IMAROT);
1168  RNA_def_property_ui_text(prop, "Flip Axis", "Flip the texture's X and Y axis");
1169  RNA_def_property_update(prop, 0, "rna_Texture_update");
1170 
1171  prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
1172  RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_USEALPHA);
1173  RNA_def_property_ui_text(prop, "Use Alpha", "Use the alpha channel information in the image");
1174  RNA_def_property_update(prop, 0, "rna_Texture_update");
1175 
1176  prop = RNA_def_property(srna, "use_calculate_alpha", PROP_BOOLEAN, PROP_NONE);
1179  prop, "Calculate Alpha", "Calculate an alpha channel based on RGB values in the image");
1180  RNA_def_property_update(prop, 0, "rna_Texture_update");
1181 
1182  prop = RNA_def_property(srna, "invert_alpha", PROP_BOOLEAN, PROP_NONE);
1184  RNA_def_property_ui_text(prop, "Invert Alpha", "Invert all the alpha values in the image");
1185  RNA_def_property_update(prop, 0, "rna_Texture_update");
1186 
1187  rna_def_filter_common(srna);
1188 
1189  prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
1190  RNA_def_property_enum_sdna(prop, NULL, "extend");
1191  RNA_def_property_enum_items(prop, prop_image_extension);
1193  prop, "Extension", "How the image is extrapolated past its original bounds");
1194  RNA_def_property_update(prop, 0, "rna_Texture_update");
1195 
1196  prop = RNA_def_property(srna, "repeat_x", PROP_INT, PROP_NONE);
1197  RNA_def_property_int_sdna(prop, NULL, "xrepeat");
1198  RNA_def_property_range(prop, 1, 512);
1199  RNA_def_property_ui_text(prop, "Repeat X", "Repetition multiplier in the X direction");
1200  RNA_def_property_update(prop, 0, "rna_Texture_update");
1201 
1202  prop = RNA_def_property(srna, "repeat_y", PROP_INT, PROP_NONE);
1203  RNA_def_property_int_sdna(prop, NULL, "yrepeat");
1204  RNA_def_property_range(prop, 1, 512);
1205  RNA_def_property_ui_text(prop, "Repeat Y", "Repetition multiplier in the Y direction");
1206  RNA_def_property_update(prop, 0, "rna_Texture_update");
1207 
1208  prop = RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
1210  RNA_def_property_ui_text(prop, "Mirror X", "Mirror the image repetition on the X direction");
1211  RNA_def_property_update(prop, 0, "rna_Texture_update");
1212 
1213  prop = RNA_def_property(srna, "use_mirror_y", PROP_BOOLEAN, PROP_NONE);
1215  RNA_def_property_ui_text(prop, "Mirror Y", "Mirror the image repetition on the Y direction");
1216  RNA_def_property_update(prop, 0, "rna_Texture_update");
1217 
1218  prop = RNA_def_property(srna, "use_checker_odd", PROP_BOOLEAN, PROP_NONE);
1220  RNA_def_property_ui_text(prop, "Checker Odd", "Odd checker tiles");
1221  RNA_def_property_update(prop, 0, "rna_Texture_update");
1222 
1223  prop = RNA_def_property(srna, "use_checker_even", PROP_BOOLEAN, PROP_NONE);
1225  RNA_def_property_ui_text(prop, "Checker Even", "Even checker tiles");
1226  RNA_def_property_update(prop, 0, "rna_Texture_update");
1227 
1228  prop = RNA_def_property(srna, "checker_distance", PROP_FLOAT, PROP_NONE);
1229  RNA_def_property_float_sdna(prop, NULL, "checkerdist");
1230  RNA_def_property_range(prop, 0.0, 0.99);
1231  RNA_def_property_ui_range(prop, 0.0, 0.99, 0.1, 2);
1232  RNA_def_property_ui_text(prop, "Checker Distance", "Distance between checker tiles");
1233  RNA_def_property_update(prop, 0, "rna_Texture_update");
1234 
1235 # if 0
1236 
1237  /* XXX: did this as an array, but needs better descriptions than "1 2 3 4"
1238  * perhaps a new subtype could be added?
1239  * --I actually used single values for this, maybe change later with a RNA_Rect thing? */
1240  prop = RNA_def_property(srna, "crop_rectangle", PROP_FLOAT, PROP_NONE);
1241  RNA_def_property_float_sdna(prop, NULL, "cropxmin");
1242  RNA_def_property_array(prop, 4);
1243  RNA_def_property_range(prop, -10, 10);
1244  RNA_def_property_ui_text(prop, "Crop Rectangle", "");
1245  RNA_def_property_update(prop, 0, "rna_Texture_update");
1246 
1247 # endif
1248 
1249  prop = RNA_def_property(srna, "crop_min_x", PROP_FLOAT, PROP_NONE);
1250  RNA_def_property_float_sdna(prop, NULL, "cropxmin");
1251  RNA_def_property_range(prop, -10.0, 10.0);
1252  RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 2);
1253  RNA_def_property_ui_text(prop, "Crop Minimum X", "Minimum X value to crop the image");
1254  RNA_def_property_update(prop, 0, "rna_Texture_update");
1255 
1256  prop = RNA_def_property(srna, "crop_min_y", PROP_FLOAT, PROP_NONE);
1257  RNA_def_property_float_sdna(prop, NULL, "cropymin");
1258  RNA_def_property_range(prop, -10.0, 10.0);
1259  RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 2);
1260  RNA_def_property_ui_text(prop, "Crop Minimum Y", "Minimum Y value to crop the image");
1261  RNA_def_property_update(prop, 0, "rna_Texture_update");
1262 
1263  prop = RNA_def_property(srna, "crop_max_x", PROP_FLOAT, PROP_NONE);
1264  RNA_def_property_float_sdna(prop, NULL, "cropxmax");
1265  RNA_def_property_range(prop, -10.0, 10.0);
1266  RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 2);
1267  RNA_def_property_ui_text(prop, "Crop Maximum X", "Maximum X value to crop the image");
1268  RNA_def_property_update(prop, 0, "rna_Texture_update");
1269 
1270  prop = RNA_def_property(srna, "crop_max_y", PROP_FLOAT, PROP_NONE);
1271  RNA_def_property_float_sdna(prop, NULL, "cropymax");
1272  RNA_def_property_range(prop, -10.0, 10.0);
1273  RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 2);
1274  RNA_def_property_ui_text(prop, "Crop Maximum Y", "Maximum Y value to crop the image");
1275  RNA_def_property_update(prop, 0, "rna_Texture_update");
1276 
1277  prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
1278  RNA_def_property_pointer_sdna(prop, NULL, "ima");
1279  RNA_def_property_struct_type(prop, "Image");
1282  RNA_def_property_ui_text(prop, "Image", "");
1283  RNA_def_property_update(prop, 0, "rna_Texture_update");
1284 
1285  prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
1286  RNA_def_property_pointer_sdna(prop, NULL, "iuser");
1288  prop,
1289  "Image User",
1290  "Parameters defining which layer, pass and frame of the image is displayed");
1291  RNA_def_property_update(prop, 0, "rna_Texture_update");
1292 
1293  /* Normal Map */
1294  prop = RNA_def_property(srna, "use_normal_map", PROP_BOOLEAN, PROP_NONE);
1296  RNA_def_property_ui_text(prop, "Normal Map", "Use image RGB values for normal mapping");
1297  RNA_def_property_update(prop, 0, "rna_Texture_update");
1298 }
1299 
1301 {
1302  StructRNA *srna;
1303  PropertyRNA *prop;
1304 
1305  static const EnumPropertyItem prop_musgrave_type[] = {
1306  {TEX_MFRACTAL, "MULTIFRACTAL", 0, "Multifractal", "Use Perlin noise as a basis"},
1307  {TEX_RIDGEDMF,
1308  "RIDGED_MULTIFRACTAL",
1309  0,
1310  "Ridged Multifractal",
1311  "Use Perlin noise with inflection as a basis"},
1312  {TEX_HYBRIDMF,
1313  "HYBRID_MULTIFRACTAL",
1314  0,
1315  "Hybrid Multifractal",
1316  "Use Perlin noise as a basis, with extended controls"},
1317  {TEX_FBM, "FBM", 0, "fBM", "Fractal Brownian Motion, use Brownian noise as a basis"},
1318  {TEX_HTERRAIN, "HETERO_TERRAIN", 0, "Hetero Terrain", "Similar to multifractal"},
1319  {0, NULL, 0, NULL, NULL},
1320  };
1321 
1322  srna = RNA_def_struct(brna, "MusgraveTexture", "Texture");
1323  RNA_def_struct_ui_text(srna, "Musgrave", "Procedural musgrave texture");
1324  RNA_def_struct_sdna(srna, "Tex");
1325 
1326  prop = RNA_def_property(srna, "musgrave_type", PROP_ENUM, PROP_NONE);
1327  RNA_def_property_enum_sdna(prop, NULL, "stype");
1328  RNA_def_property_enum_items(prop, prop_musgrave_type);
1329  RNA_def_property_ui_text(prop, "Type", "Fractal noise algorithm");
1330  RNA_def_property_update(prop, 0, "rna_Texture_update");
1331 
1332  prop = RNA_def_property(srna, "dimension_max", PROP_FLOAT, PROP_NONE);
1333  RNA_def_property_float_sdna(prop, NULL, "mg_H");
1334  RNA_def_property_range(prop, 0.0001, 2);
1335  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
1336  RNA_def_property_ui_text(prop, "Highest Dimension", "Highest fractal dimension");
1337  RNA_def_property_update(prop, 0, "rna_Texture_update");
1338 
1339  prop = RNA_def_property(srna, "lacunarity", PROP_FLOAT, PROP_NONE);
1340  RNA_def_property_float_sdna(prop, NULL, "mg_lacunarity");
1341  RNA_def_property_range(prop, 0, 6);
1342  RNA_def_property_ui_range(prop, 0, 6, 1, 2);
1343  RNA_def_property_ui_text(prop, "Lacunarity", "Gap between successive frequencies");
1344  RNA_def_property_update(prop, 0, "rna_Texture_update");
1345 
1346  prop = RNA_def_property(srna, "octaves", PROP_FLOAT, PROP_NONE);
1347  RNA_def_property_float_sdna(prop, NULL, "mg_octaves");
1348  RNA_def_property_range(prop, 0, 8);
1349  RNA_def_property_ui_range(prop, 0, 8, 1, 2);
1350  RNA_def_property_ui_text(prop, "Octaves", "Number of frequencies used");
1351  RNA_def_property_update(prop, 0, "rna_Texture_update");
1352 
1353  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
1354  RNA_def_property_float_sdna(prop, NULL, "mg_offset");
1355  RNA_def_property_range(prop, 0, 6);
1356  RNA_def_property_ui_range(prop, 0, 6, 1, 2);
1357  RNA_def_property_ui_text(prop, "Offset", "The fractal offset");
1358  RNA_def_property_update(prop, 0, "rna_Texture_update");
1359 
1360  prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
1361  RNA_def_property_float_sdna(prop, NULL, "mg_gain");
1362  RNA_def_property_range(prop, 0, 6);
1363  RNA_def_property_ui_range(prop, 0, 6, 1, 2);
1364  RNA_def_property_ui_text(prop, "Gain", "The gain multiplier");
1365  RNA_def_property_update(prop, 0, "rna_Texture_update");
1366 
1367  prop = RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
1368  RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
1369  RNA_def_property_range(prop, 0, 10);
1370  RNA_def_property_ui_range(prop, 0, 10, 1, 2);
1371  RNA_def_property_ui_text(prop, "Noise Intensity", "Intensity of the noise");
1372  RNA_def_property_update(prop, 0, "rna_Texture_update");
1373 
1374  prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
1375  RNA_def_property_float_sdna(prop, NULL, "noisesize");
1376  RNA_def_property_range(prop, 0.0001, FLT_MAX);
1377  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
1378  RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
1379  RNA_def_property_update(prop, 0, "rna_Texture_update");
1380 
1381  prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
1382  RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
1384  RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
1385  RNA_def_property_update(prop, 0, "rna_Texture_update");
1386 
1387  prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
1388  RNA_def_property_range(prop, 0.001, 0.1);
1389  RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
1390  RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
1391  RNA_def_property_update(prop, 0, "rna_Texture_update");
1392 }
1393 
1395 {
1396  StructRNA *srna;
1397  PropertyRNA *prop;
1398 
1399  static const EnumPropertyItem prop_distance_metric_items[] = {
1400  {TEX_DISTANCE, "DISTANCE", 0, "Actual Distance", "sqrt(x*x+y*y+z*z)"},
1401  {TEX_DISTANCE_SQUARED, "DISTANCE_SQUARED", 0, "Distance Squared", "(x*x+y*y+z*z)"},
1402  {TEX_MANHATTAN,
1403  "MANHATTAN",
1404  0,
1405  "Manhattan",
1406  "The length of the distance in axial directions"},
1407  {TEX_CHEBYCHEV, "CHEBYCHEV", 0, "Chebychev", "The length of the longest Axial journey"},
1408  {TEX_MINKOVSKY_HALF, "MINKOVSKY_HALF", 0, "Minkowski 1/2", "Set Minkowski variable to 0.5"},
1409  {TEX_MINKOVSKY_FOUR, "MINKOVSKY_FOUR", 0, "Minkowski 4", "Set Minkowski variable to 4"},
1410  {TEX_MINKOVSKY,
1411  "MINKOVSKY",
1412  0,
1413  "Minkowski",
1414  "Use the Minkowski function to calculate distance "
1415  "(exponent value determines the shape of the boundaries)"},
1416  {0, NULL, 0, NULL, NULL},
1417  };
1418 
1419  static const EnumPropertyItem prop_coloring_items[] = {
1420  /* XXX: OK names / descriptions? */
1421  {TEX_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity"},
1422  {TEX_COL1, "POSITION", 0, "Position", "Color cells by position"},
1423  {TEX_COL2,
1424  "POSITION_OUTLINE",
1425  0,
1426  "Position and Outline",
1427  "Use position plus an outline based on F2-F1"},
1428  {TEX_COL3,
1429  "POSITION_OUTLINE_INTENSITY",
1430  0,
1431  "Position, Outline, and Intensity",
1432  "Multiply position and outline by intensity"},
1433  {0, NULL, 0, NULL, NULL},
1434  };
1435 
1436  srna = RNA_def_struct(brna, "VoronoiTexture", "Texture");
1437  RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture");
1438  RNA_def_struct_sdna(srna, "Tex");
1439 
1440  prop = RNA_def_property(srna, "weight_1", PROP_FLOAT, PROP_NONE);
1441  RNA_def_property_float_sdna(prop, NULL, "vn_w1");
1442  RNA_def_property_range(prop, -2, 2);
1443  RNA_def_property_ui_text(prop, "Weight 1", "Voronoi feature weight 1");
1444  RNA_def_property_update(prop, 0, "rna_Texture_update");
1445 
1446  prop = RNA_def_property(srna, "weight_2", PROP_FLOAT, PROP_NONE);
1447  RNA_def_property_float_sdna(prop, NULL, "vn_w2");
1448  RNA_def_property_range(prop, -2, 2);
1449  RNA_def_property_ui_text(prop, "Weight 2", "Voronoi feature weight 2");
1450  RNA_def_property_update(prop, 0, "rna_Texture_update");
1451 
1452  prop = RNA_def_property(srna, "weight_3", PROP_FLOAT, PROP_NONE);
1453  RNA_def_property_float_sdna(prop, NULL, "vn_w3");
1454  RNA_def_property_range(prop, -2, 2);
1455  RNA_def_property_ui_text(prop, "Weight 3", "Voronoi feature weight 3");
1456  RNA_def_property_update(prop, 0, "rna_Texture_update");
1457 
1458  prop = RNA_def_property(srna, "weight_4", PROP_FLOAT, PROP_NONE);
1459  RNA_def_property_float_sdna(prop, NULL, "vn_w4");
1460  RNA_def_property_range(prop, -2, 2);
1461  RNA_def_property_ui_text(prop, "Weight 4", "Voronoi feature weight 4");
1462  RNA_def_property_update(prop, 0, "rna_Texture_update");
1463 
1464  prop = RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE);
1465  RNA_def_property_float_sdna(prop, NULL, "vn_mexp");
1466  RNA_def_property_range(prop, 0.01, 10);
1467  RNA_def_property_ui_text(prop, "Minkowski Exponent", "Minkowski exponent");
1468  RNA_def_property_update(prop, 0, "rna_Texture_update");
1469 
1470  prop = RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE);
1471  RNA_def_property_enum_sdna(prop, NULL, "vn_distm");
1472  RNA_def_property_enum_items(prop, prop_distance_metric_items);
1474  prop,
1475  "Distance Metric",
1476  "Algorithm used to calculate distance of sample points to feature points");
1477  RNA_def_property_update(prop, 0, "rna_Texture_update");
1478 
1479  prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
1480  RNA_def_property_enum_sdna(prop, NULL, "vn_coltype");
1481  RNA_def_property_enum_items(prop, prop_coloring_items);
1482  RNA_def_property_ui_text(prop, "Coloring", "");
1483  RNA_def_property_update(prop, 0, "rna_Texture_update");
1484 
1485  prop = RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
1486  RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
1487  RNA_def_property_range(prop, 0.01, 10);
1488  RNA_def_property_ui_text(prop, "Noise Intensity", "Scales the intensity of the noise");
1489  RNA_def_property_update(prop, 0, "rna_Texture_update");
1490 
1491  prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
1492  RNA_def_property_float_sdna(prop, NULL, "noisesize");
1493  RNA_def_property_range(prop, 0.0001, FLT_MAX);
1494  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
1495  RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
1496  RNA_def_property_update(prop, 0, "rna_Texture_update");
1497 
1498  prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
1499  RNA_def_property_range(prop, 0.001, 0.1);
1500  RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
1501  RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
1502  RNA_def_property_update(prop, 0, "rna_Texture_update");
1503 }
1504 
1506 {
1507  StructRNA *srna;
1508  PropertyRNA *prop;
1509 
1510  srna = RNA_def_struct(brna, "DistortedNoiseTexture", "Texture");
1511  RNA_def_struct_ui_text(srna, "Distorted Noise", "Procedural distorted noise texture");
1512  RNA_def_struct_sdna(srna, "Tex");
1513 
1514  prop = RNA_def_property(srna, "distortion", PROP_FLOAT, PROP_NONE);
1515  RNA_def_property_float_sdna(prop, NULL, "dist_amount");
1516  RNA_def_property_range(prop, 0, 10);
1517  RNA_def_property_ui_text(prop, "Distortion Amount", "Amount of distortion");
1518  RNA_def_property_update(prop, 0, "rna_Texture_update");
1519 
1520  prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
1521  RNA_def_property_float_sdna(prop, NULL, "noisesize");
1522  RNA_def_property_range(prop, 0.0001, FLT_MAX);
1523  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
1524  RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
1525  RNA_def_property_update(prop, 0, "rna_Texture_update");
1526 
1527  prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
1528  RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
1530  RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
1531  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
1532 
1533  prop = RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE);
1534  RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
1536  RNA_def_property_ui_text(prop, "Noise Distortion", "Noise basis for the distortion");
1537  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
1538 
1539  prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
1540  RNA_def_property_range(prop, 0.001, 0.1);
1541  RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
1542  RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
1543  RNA_def_property_update(prop, 0, "rna_Texture_update");
1544 }
1545 
1546 static void rna_def_texture(BlenderRNA *brna)
1547 {
1548  StructRNA *srna;
1549  PropertyRNA *prop;
1550 
1551  srna = RNA_def_struct(brna, "Texture", "ID");
1552  RNA_def_struct_sdna(srna, "Tex");
1554  srna, "Texture", "Texture data-block used by materials, lights, worlds and brushes");
1555  RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
1556  RNA_def_struct_refine_func(srna, "rna_Texture_refine");
1557 
1558  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
1559  // RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1560  RNA_def_property_enum_sdna(prop, NULL, "type");
1562  RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL);
1563  RNA_def_property_ui_text(prop, "Type", "");
1564  RNA_def_property_update(prop, 0, "rna_Texture_update");
1565 
1566  prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE);
1569  "Clamp",
1570  "Set negative texture RGB and intensity values to zero, for some uses "
1571  "like displacement this option can be disabled to get the full range");
1572  RNA_def_property_update(prop, 0, "rna_Texture_update");
1573 
1574  prop = RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
1576  RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_color_ramp_set");
1578  "Use Color Ramp",
1579  "Map the texture intensity to the color ramp. "
1580  "Note that the alpha value is used for image textures, "
1581  "enable \"Calculate Alpha\" for images without an alpha channel");
1582  RNA_def_property_update(prop, 0, "rna_Texture_update");
1583 
1584  prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
1585  RNA_def_property_pointer_sdna(prop, NULL, "coba");
1586  RNA_def_property_struct_type(prop, "ColorRamp");
1587  RNA_def_property_ui_text(prop, "Color Ramp", "");
1588  RNA_def_property_update(prop, 0, "rna_Texture_update");
1589 
1590  prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
1591  RNA_def_property_float_sdna(prop, NULL, "bright");
1592  RNA_def_property_range(prop, 0, 2);
1593  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
1594  RNA_def_property_ui_text(prop, "Brightness", "Adjust the brightness of the texture");
1595  RNA_def_property_update(prop, 0, "rna_Texture_update");
1596 
1597  prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
1598  RNA_def_property_range(prop, 0.0, 5);
1599  RNA_def_property_ui_range(prop, 0, 5, 1, 3);
1600  RNA_def_property_ui_text(prop, "Contrast", "Adjust the contrast of the texture");
1601  RNA_def_property_update(prop, 0, "rna_Texture_update");
1602 
1603  prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
1604  RNA_def_property_range(prop, 0, 2);
1605  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
1606  RNA_def_property_ui_text(prop, "Saturation", "Adjust the saturation of colors in the texture");
1607  RNA_def_property_update(prop, 0, "rna_Texture_update");
1608 
1609  /* RGB Factor */
1610  prop = RNA_def_property(srna, "factor_red", PROP_FLOAT, PROP_NONE);
1611  RNA_def_property_float_sdna(prop, NULL, "rfac");
1612  RNA_def_property_range(prop, 0, 2);
1613  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
1614  RNA_def_property_ui_text(prop, "Factor Red", "");
1615  RNA_def_property_update(prop, 0, "rna_Texture_update");
1616 
1617  prop = RNA_def_property(srna, "factor_green", PROP_FLOAT, PROP_NONE);
1618  RNA_def_property_float_sdna(prop, NULL, "gfac");
1619  RNA_def_property_range(prop, 0, 2);
1620  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
1621  RNA_def_property_ui_text(prop, "Factor Green", "");
1622  RNA_def_property_update(prop, 0, "rna_Texture_update");
1623 
1624  prop = RNA_def_property(srna, "factor_blue", PROP_FLOAT, PROP_NONE);
1625  RNA_def_property_float_sdna(prop, NULL, "bfac");
1626  RNA_def_property_range(prop, 0, 2);
1627  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
1628  RNA_def_property_ui_text(prop, "Factor Blue", "");
1629  RNA_def_property_update(prop, 0, "rna_Texture_update");
1630 
1631  /* Alpha for preview render */
1632  prop = RNA_def_property(srna, "use_preview_alpha", PROP_BOOLEAN, PROP_NONE);
1634  RNA_def_property_ui_text(prop, "Show Alpha", "Show Alpha in Preview Render");
1635  RNA_def_property_update(prop, 0, "rna_Texture_update");
1636 
1637  /* nodetree */
1638  prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
1639  RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
1641  RNA_def_property_ui_text(prop, "Use Nodes", "Make this a node-based texture");
1642  RNA_def_property_update(prop, 0, "rna_Texture_use_nodes_update");
1643 
1644  prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
1645  RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
1648  RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node-based textures");
1649  RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
1650 
1652 
1653  /* specific types */
1654  rna_def_texture_clouds(brna);
1655  rna_def_texture_wood(brna);
1656  rna_def_texture_marble(brna);
1657  rna_def_texture_magic(brna);
1658  rna_def_texture_blend(brna);
1659  rna_def_texture_stucci(brna);
1660  rna_def_texture_noise(brna);
1661  rna_def_texture_image(brna);
1665  /* XXX add more types here. */
1666 
1667  RNA_api_texture(srna);
1668 }
1669 
1671 {
1672  rna_def_texture(brna);
1673  rna_def_mtex(brna);
1674  rna_def_texmapping(brna);
1675  rna_def_colormapping(brna);
1676 }
1677 
1678 #endif
struct ColorBand * BKE_colorband_add(bool rangetype)
Definition: colorband.c:296
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1090
struct ViewLayer * CTX_data_view_layer(const bContext *C)
Definition: context.c:1100
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1074
#define TEX_NODE_OUTPUT
Definition: BKE_node.h:1347
void BKE_ntree_update_tag_node_property(struct bNodeTree *ntree, struct bNode *node)
void BKE_paint_invalidate_overlay_tex(struct Scene *scene, struct ViewLayer *view_layer, const struct Tex *tex)
void BKE_texture_mapping_init(struct TexMapping *texmap)
Definition: texture.c:253
void BKE_texture_type_set(struct Tex *tex, int type)
Definition: texture.c:366
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:42
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
Definition: string.c:250
#define UNUSED(x)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_PSYS_CHILD
Definition: DNA_ID.h:802
@ ID_RECALC_EDITORS
Definition: DNA_ID.h:828
@ ID_RECALC_PSYS_RESET
Definition: DNA_ID.h:800
@ ID_RECALC_GEOMETRY
Definition: DNA_ID.h:791
@ ID_TE
Definition: DNA_ID_enums.h:52
@ ID_NT
Definition: DNA_ID_enums.h:68
@ ID_LA
Definition: DNA_ID_enums.h:55
@ ID_LS
Definition: DNA_ID_enums.h:75
@ ID_BR
Definition: DNA_ID_enums.h:69
@ ID_WO
Definition: DNA_ID_enums.h:59
@ ID_MA
Definition: DNA_ID_enums.h:51
@ ID_PA
Definition: DNA_ID_enums.h:70
Object is a sort of wrapper for general info.
@ PAMAP_CHILD
@ PAMAP_INIT
#define MTEX_LIGHT
#define TEX_NOISEPERL
#define TEX_RAD
#define MTEX_MUL
#define TXF_AREA
#define TEX_CHECKER_EVEN
#define MTEX_BLEND_VAL
#define TEX_SHARPER
#define TEX_REPEAT_YMIR
#define TEX_COL3
#define TEX_COLOR
#define TEX_SPHERE
#define TEX_BLENDER
#define TEX_MINKOVSKY_FOUR
#define TEX_DISTANCE_SQUARED
#define TEX_EXTEND
#define TEX_PRV_ALPHA
#define TEX_CLOUDS
#define TEX_COLORBAND
#define TEX_HYBRIDMF
#define TEX_MINKOVSKY_HALF
#define TEX_TRI
#define TEX_LIN
#define MTEX_OVERLAY
#define TEX_BLEND
#define TXF_EWA
#define MTEX_DIV
#define TEX_USEALPHA
#define TEX_STDPERLIN
#define MTEX_BLEND_HUE
#define TEX_DEFAULT
#define TEX_RIDGEDMF
#define TEX_IMAROT
#define TEX_MINKOVSKY
#define TEX_CHECKER
#define TEX_DISTANCE
#define TEX_RINGNOISE
#define MTEX_SPHERE
#define TEX_WALLOUT
#define TEX_COL1
#define TEX_GAUSS_MIP
#define TEX_COL2
#define MTEX_TUBE
#define TEX_REPEAT
#define TEX_VORONOI_CRACKLE
#define TEX_BAND
#define TEX_VORONOI_F2F1
#define TEX_CALCALPHA
#define TEX_VORONOI_F4
#define MTEX_SUB
#define TEX_NORMALMAP
#define TEX_NO_CLAMP
#define TEX_DISTNOISE
#define TEX_SAW
#define TEX_PLASTIC
#define TEX_SOFT
#define TEX_SHARP
#define MTEX_SCREEN
#define MTEX_LIN_LIGHT
#define TEX_STUCCI
#define TEX_VORONOI_F3
#define TEX_NEWPERLIN
#define TEX_RING
#define TXF_BOX
#define TXF_FELINE
#define TEX_NEGALPHA
#define TEX_INTENSITY
#define TEX_CELLNOISE
#define TEX_FBM
#define TEX_MUSGRAVE
#define TEX_MFRACTAL
#define TEX_HALO
#define TEX_MANHATTAN
#define TEX_CHEBYCHEV
#define TEX_BANDNOISE
#define MTEX_DIFF
#define TEX_CHECKER_ODD
#define TEX_EASE
#define MTEX_BLEND_SAT
#define COLORMAP_USE_RAMP
#define MTEX_BLEND
#define TEX_REPEAT_XMIR
#define TEX_DIAG
#define TEX_VORONOI_F1
#define TEXMAP_CLIP_MIN
#define MTEX_SOFT_LIGHT
#define TEX_MARBLE
#define TEXMAP_CLIP_MAX
#define TEX_QUAD
#define TEX_HTERRAIN
#define MTEX_BLEND_COLOR
#define TEX_SIN
#define MTEX_ADD
#define MTEX_FLAT
#define TEX_NOISESOFT
#define TEX_CLIP
#define TEX_WALLIN
#define TEX_MIPMAP
#define TEX_MAGIC
#define TEX_INTERPOL
#define TEX_CLIPCUBE
#define TEX_FILTER_MIN
#define TEX_WOOD
#define MTEX_CUBE
#define MTEX_DARK
#define TEX_VORONOI_F2
#define TEX_FLIPBLEND
void ED_node_texture_default(const struct bContext *C, struct Tex *tex)
void ED_node_tree_propagate_change(const struct bContext *C, struct Main *bmain, struct bNodeTree *ntree)
Read Guarded memory(de)allocation.
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 Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise TEX_VORONOI
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 Sky Generate a procedural sky texture TEX_NOISE
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 TEX_IMAGE
@ PROP_FLOAT
Definition: RNA_types.h:61
@ PROP_BOOLEAN
Definition: RNA_types.h:59
@ PROP_ENUM
Definition: RNA_types.h:63
@ PROP_INT
Definition: RNA_types.h:60
@ PROP_STRING
Definition: RNA_types.h:62
@ PROP_POINTER
Definition: RNA_types.h:64
#define RNA_ENUM_ITEM_SEPR
Definition: RNA_types.h:483
#define RNA_TRANSLATION_PREC_DEFAULT
Definition: RNA_types.h:117
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition: RNA_types.h:312
@ PROP_CONTEXT_UPDATE
Definition: RNA_types.h:269
@ PROP_PROPORTIONAL
Definition: RNA_types.h:223
@ PROP_EDITABLE
Definition: RNA_types.h:189
@ PROP_NEVER_NULL
Definition: RNA_types.h:239
@ PROP_PTR_NO_OWNERSHIP
Definition: RNA_types.h:257
@ PROP_XYZ
Definition: RNA_types.h:162
@ PROP_COLOR
Definition: RNA_types.h:153
@ PROP_EULER
Definition: RNA_types.h:159
@ PROP_NONE
Definition: RNA_types.h:126
@ PROP_TRANSLATION
Definition: RNA_types.h:154
#define C
Definition: RandGen.cpp:25
#define NC_WORLD
Definition: WM_types.h:337
#define ND_SHADING
Definition: WM_types.h:425
#define NC_BRUSH
Definition: WM_types.h:335
#define ND_LIGHTING_DRAW
Definition: WM_types.h:432
#define NC_LINESTYLE
Definition: WM_types.h:350
#define ND_NODES
Definition: WM_types.h:384
#define NA_EDITED
Definition: WM_types.h:523
#define ND_PARTICLE
Definition: WM_types.h:414
#define NC_MATERIAL
Definition: WM_types.h:330
#define NC_LAMP
Definition: WM_types.h:332
#define NC_TEXTURE
Definition: WM_types.h:331
#define ND_LIGHTING
Definition: WM_types.h:431
#define NC_OBJECT
Definition: WM_types.h:329
#define ND_SHADING_LINKS
Definition: WM_types.h:427
#define ND_SHADING_DRAW
Definition: WM_types.h:426
OperationNode * node
Scene scene
bNodeTree * ntree
#define str(s)
#define GS(x)
Definition: iris.c:225
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
Definition: rna_access.c:112
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, const PointerRNA *t_ptr)
Definition: rna_access.c:4059
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
Definition: rna_access.c:717
void rna_def_animdata_common(StructRNA *srna)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
Definition: rna_define.c:1148
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2740
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
Definition: rna_define.c:1193
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2236
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3285
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1645
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1237
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2944
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1872
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1048
void RNA_def_property_array(PropertyRNA *prop, int length)
Definition: rna_define.c:1539
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1737
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1772
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2900
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3224
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1257
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2669
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4487
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1103
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1495
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1028
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2601
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4436
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
Definition: rna_define.c:1245
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2493
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1664
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2343
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2327
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
Definition: rna_define.c:1503
void rna_TextureSlot_update(struct bContext *C, struct PointerRNA *ptr)
char * rna_TextureSlot_path(const struct PointerRNA *ptr)
void RNA_api_texture(struct StructRNA *srna)
const EnumPropertyItem rna_enum_mapping_type_items[]
Definition: rna_nodetree.c:133
static void rna_def_texture_wood(BlenderRNA *brna)
Definition: rna_texture.c:868
static void rna_def_texture_magic(BlenderRNA *brna)
Definition: rna_texture.c:1012
static const EnumPropertyItem blend_type_items[]
Definition: rna_texture.c:99
static void rna_def_colormapping(BlenderRNA *brna)
Definition: rna_texture.c:559
static const EnumPropertyItem prop_noise_basis_items[]
Definition: rna_texture.c:757
static void rna_def_texture_musgrave(BlenderRNA *brna)
Definition: rna_texture.c:1300
static void rna_def_texture_clouds(BlenderRNA *brna)
Definition: rna_texture.c:813
static void rna_def_texture_blend(BlenderRNA *brna)
Definition: rna_texture.c:1036
static void rna_def_texture_distorted_noise(BlenderRNA *brna)
Definition: rna_texture.c:1505
static const EnumPropertyItem texture_filter_items[]
Definition: rna_texture.c:36
static void rna_def_texture_marble(BlenderRNA *brna)
Definition: rna_texture.c:937
static void rna_def_texture(BlenderRNA *brna)
Definition: rna_texture.c:1546
static void rna_def_filter_common(StructRNA *srna)
Definition: rna_texture.c:700
static void rna_def_mtex(BlenderRNA *brna)
Definition: rna_texture.c:612
static const EnumPropertyItem prop_noise_type[]
Definition: rna_texture.c:807
static void rna_def_texture_noise(BlenderRNA *brna)
Definition: rna_texture.c:1128
void RNA_def_texture(BlenderRNA *brna)
Definition: rna_texture.c:1670
static void rna_def_texmapping(BlenderRNA *brna)
Definition: rna_texture.c:467
static void rna_def_texture_voronoi(BlenderRNA *brna)
Definition: rna_texture.c:1394
static void rna_def_texture_image(BlenderRNA *brna)
Definition: rna_texture.c:1137
const EnumPropertyItem rna_enum_texture_type_items[]
Definition: rna_texture.c:45
static void rna_def_texture_stucci(BlenderRNA *brna)
Definition: rna_texture.c:1079
const char * identifier
Definition: RNA_types.h:461
const char * name
Definition: RNA_types.h:465
Definition: DNA_ID.h:368
char name[66]
Definition: DNA_ID.h:378
void * first
Definition: DNA_listBase.h:31
short which_output
short mapto
struct Tex * tex
Definition: BKE_main.h:121
void * data
Definition: RNA_types.h:38
struct ID * owner_id
Definition: RNA_types.h:36
short imaflag
char use_nodes
struct ColorBand * coba
short flag
short type
struct bNodeTree * nodetree
ListBase nodes
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3480