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