27 {0,
"NONE", 0,
"None",
""},
28 {
TEX_BLEND,
"BLEND", ICON_TEXTURE,
"Blend",
"Procedural - create a ramp texture"},
33 "Procedural - create a cloud-like fractal noise texture"},
38 "Procedural - noise texture distorted by two noise algorithms"},
43 "Allow for images or movies to be used as textures"},
48 "Procedural - color texture based on trigonometric functions"},
53 "Procedural - marble-like noise texture with wave generated bands"},
58 "Procedural - highly flexible fractal noise texture"},
63 "Procedural - random noise, gives a different result every time, for every frame, for every "
65 {
TEX_STUCCI,
"STUCCI", ICON_TEXTURE,
"Stucci",
"Procedural - create a fractal noise texture"},
70 "Procedural - create cell-like patterns based on Worley noise"},
75 "Procedural - wave generated bands or rings, with optional noise"},
76 {0,
nullptr, 0,
nullptr,
nullptr},
84 {
MTEX_MUL,
"MULTIPLY", 0,
"Multiply",
""},
94 {
MTEX_DIFF,
"DIFFERENCE", 0,
"Difference",
""},
95 {
MTEX_SUB,
"SUBTRACT", 0,
"Subtract",
""},
96 {
MTEX_DIV,
"DIVIDE", 0,
"Divide",
""},
102 {0,
nullptr, 0,
nullptr,
nullptr},
108# include <fmt/format.h>
139 return &RNA_BlendTexture;
141 return &RNA_CloudsTexture;
143 return &RNA_DistortedNoiseTexture;
145 return &RNA_ImageTexture;
147 return &RNA_MagicTexture;
149 return &RNA_MarbleTexture;
151 return &RNA_MusgraveTexture;
153 return &RNA_NoiseTexture;
155 return &RNA_StucciTexture;
157 return &RNA_VoronoiTexture;
159 return &RNA_WoodTexture;
167 ID *
id =
ptr->owner_id;
185 ID *
id =
ptr->owner_id;
192 for (
bNode *node : ntree->all_nodes()) {
196 if (node->storage == texmap) {
202 rna_Texture_update(bmain, scene,
ptr);
235 ID *
id =
ptr->owner_id;
293 return "texture_slot";
307 return fmt::format(
"texture_slots[{}]", index);
315 char name_esc[(
sizeof(mtex->
tex->
id.
name) - 2) * 2];
318 return fmt::format(
"texture_slots[\"{}\"]", name_esc);
321 return "texture_slots[0]";
335static void rna_TextureSlot_name_get(
PointerRNA *
ptr,
char *value)
388 tmp.
name =
"Not Specified";
409static void rna_Texture_use_color_ramp_set(
PointerRNA *
ptr,
bool value)
445 {
MTEX_FLAT,
"FLAT", 0,
"Flat",
"Map X and Y coordinates directly"},
446 {
MTEX_CUBE,
"CUBE", 0,
"Cube",
"Map using the normal vector"},
447 {
MTEX_TUBE,
"TUBE", 0,
"Tube",
"Map with Z as central axis"},
448 {
MTEX_SPHERE,
"SPHERE", 0,
"Sphere",
"Map with Z as central axis"},
449 {0,
nullptr, 0,
nullptr,
nullptr},
453 {0,
"NONE", 0,
"None",
""},
454 {1,
"X", 0,
"X",
""},
455 {2,
"Y", 0,
"Y",
""},
456 {3,
"Z", 0,
"Z",
""},
457 {0,
nullptr, 0,
nullptr,
nullptr},
597 srna,
"Texture Slot",
"Texture slot defining the mapping and influence of a texture");
611 prop,
"rna_TextureSlot_name_get",
"rna_TextureSlot_name_length",
nullptr);
624 prop,
"Offset",
"Fine tune of the texture mapping X, Y and Z locations");
641 "Default color for textures that don't return RGB or when RGB to intensity is enabled");
658 "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard");
666 prop,
"rna_TextureSlot_output_node_get",
nullptr,
"rna_TextureSlot_output_node_itemf");
668 prop,
"Output Node",
"Which output node to use, for node-based textures");
688 "Noise algorithm - Blender original: Smooth interpolated noise"},
693 "Noise algorithm - Original Perlin: Smooth interpolated noise"},
698 "Noise algorithm - Improved Perlin: Smooth interpolated noise"},
703 "Noise algorithm - Voronoi F1: Returns distance to the closest feature point"},
708 "Noise algorithm - Voronoi F2: Returns distance to the 2nd closest feature point"},
713 "Noise algorithm - Voronoi F3: Returns distance to the 3rd closest feature point"},
718 "Noise algorithm - Voronoi F4: Returns distance to the 4th closest feature point"},
719 {
TEX_VORONOI_F2F1,
"VORONOI_F2_F1", 0,
"Voronoi F2-F1",
"Noise algorithm - Voronoi F1-F2"},
724 "Noise algorithm - Voronoi Crackle: Voronoi tessellation with sharp edges"},
729 "Noise algorithm - Cell Noise: Square cell tessellation"},
730 {0,
nullptr, 0,
nullptr,
nullptr},
734 {
TEX_NOISESOFT,
"SOFT_NOISE", 0,
"Soft",
"Generate soft noise (smooth transitions)"},
735 {
TEX_NOISEPERL,
"HARD_NOISE", 0,
"Hard",
"Generate hard noise (sharp transitions)"},
736 {0,
nullptr, 0,
nullptr,
nullptr},
747 {0,
nullptr, 0,
nullptr,
nullptr},
784 prop,
"Color",
"Determine whether Noise returns grayscale or RGB values");
800 {
TEX_BAND,
"BANDS", 0,
"Bands",
"Use standard wood texture in bands"},
801 {
TEX_RING,
"RINGS", 0,
"Rings",
"Use wood texture in rings"},
802 {
TEX_BANDNOISE,
"BANDNOISE", 0,
"Band Noise",
"Add noise to standard wood"},
803 {
TEX_RINGNOISE,
"RINGNOISE", 0,
"Ring Noise",
"Add noise to rings"},
804 {0,
nullptr, 0,
nullptr,
nullptr},
808 {
TEX_SIN,
"SIN", 0,
"Sine",
"Use a sine wave to produce bands"},
809 {
TEX_SAW,
"SAW", 0,
"Saw",
"Use a saw wave to produce bands"},
810 {
TEX_TRI,
"TRI", 0,
"Tri",
"Use a triangle wave to produce bands"},
811 {0,
nullptr, 0,
nullptr,
nullptr},
870 {
TEX_SOFT,
"SOFT", 0,
"Soft",
"Use soft marble"},
871 {
TEX_SHARP,
"SHARP", 0,
"Sharp",
"Use more clearly defined marble"},
872 {
TEX_SHARPER,
"SHARPER", 0,
"Sharper",
"Use very clearly defined marble"},
873 {0,
nullptr, 0,
nullptr,
nullptr},
877 {
TEX_SIN,
"SIN", 0,
"Sin",
"Use a sine wave to produce bands"},
878 {
TEX_SAW,
"SAW", 0,
"Saw",
"Use a saw wave to produce bands"},
879 {
TEX_TRI,
"TRI", 0,
"Tri",
"Use a triangle wave to produce bands"},
880 {0,
nullptr, 0,
nullptr,
nullptr},
970 {
TEX_LIN,
"LINEAR", 0,
"Linear",
"Create a linear progression"},
971 {
TEX_QUAD,
"QUADRATIC", 0,
"Quadratic",
"Create a quadratic progression"},
972 {
TEX_EASE,
"EASING", 0,
"Easing",
"Create a progression easing from one step to the next"},
973 {
TEX_DIAG,
"DIAGONAL", 0,
"Diagonal",
"Create a diagonal progression"},
974 {
TEX_SPHERE,
"SPHERICAL", 0,
"Spherical",
"Create a spherical progression"},
979 "Create a quadratic progression in the shape of a sphere"},
980 {
TEX_RAD,
"RADIAL", 0,
"Radial",
"Create a radial progression"},
981 {0,
nullptr, 0,
nullptr,
nullptr},
985 {0,
"HORIZONTAL", 0,
"Horizontal",
"No flipping"},
986 {
TEX_FLIPBLEND,
"VERTICAL", 0,
"Vertical",
"Flip the texture's X and Y axis"},
987 {0,
nullptr, 0,
nullptr,
nullptr},
1013 {
TEX_PLASTIC,
"PLASTIC", 0,
"Plastic",
"Use standard stucci"},
1014 {
TEX_WALLIN,
"WALL_IN", 0,
"Wall In",
"Create Dimples"},
1015 {
TEX_WALLOUT,
"WALL_OUT", 0,
"Wall Out",
"Create Ridges"},
1016 {0,
nullptr, 0,
nullptr,
nullptr},
1072 {
TEX_EXTEND,
"EXTEND", 0,
"Extend",
"Extend by repeating edge pixels of the image"},
1073 {
TEX_CLIP,
"CLIP", 0,
"Clip",
"Clip to image size and set exterior pixels as transparent"},
1078 "Clip to cubic-shaped area around the image and set exterior pixels as transparent"},
1079 {
TEX_REPEAT,
"REPEAT", 0,
"Repeat",
"Cause the image to repeat horizontally and vertically"},
1080 {
TEX_CHECKER,
"CHECKER", 0,
"Checker",
"Cause the image to repeat in checker board pattern"},
1081 {0,
nullptr, 0,
nullptr,
nullptr},
1108 prop,
"Calculate Alpha",
"Calculate an alpha channel based on RGB values in the image");
1122 prop,
"Extension",
"How the image is extrapolated past its original bounds");
1220 "Parameters defining which layer, pass and frame of the image is displayed");
1236 {
TEX_MFRACTAL,
"MULTIFRACTAL", 0,
"Multifractal",
"Use Perlin noise as a basis"},
1238 "RIDGED_MULTIFRACTAL",
1240 "Ridged Multifractal",
1241 "Use Perlin noise with inflection as a basis"},
1243 "HYBRID_MULTIFRACTAL",
1245 "Hybrid Multifractal",
1246 "Use Perlin noise as a basis, with extended controls"},
1247 {
TEX_FBM,
"FBM", 0,
"fBM",
"Fractal Brownian Motion, use Brownian noise as a basis"},
1248 {
TEX_HTERRAIN,
"HETERO_TERRAIN", 0,
"Hetero Terrain",
"Similar to multifractal"},
1249 {0,
nullptr, 0,
nullptr,
nullptr},
1330 {
TEX_DISTANCE,
"DISTANCE", 0,
"Actual Distance",
"sqrt(x*x+y*y+z*z)"},
1336 "The length of the distance in axial directions"},
1337 {
TEX_CHEBYCHEV,
"CHEBYCHEV", 0,
"Chebychev",
"The length of the longest Axial journey"},
1338 {
TEX_MINKOVSKY_HALF,
"MINKOVSKY_HALF", 0,
"Minkowski 1/2",
"Set Minkowski variable to 0.5"},
1339 {
TEX_MINKOVSKY_FOUR,
"MINKOVSKY_FOUR", 0,
"Minkowski 4",
"Set Minkowski variable to 4"},
1344 "Use the Minkowski function to calculate distance "
1345 "(exponent value determines the shape of the boundaries)"},
1346 {0,
nullptr, 0,
nullptr,
nullptr},
1351 {
TEX_INTENSITY,
"INTENSITY", 0,
"Intensity",
"Only calculate intensity"},
1352 {
TEX_COL1,
"POSITION", 0,
"Position",
"Color cells by position"},
1356 "Position and Outline",
1357 "Use position plus an outline based on F2-F1"},
1359 "POSITION_OUTLINE_INTENSITY",
1361 "Position, Outline, and Intensity",
1362 "Multiply position and outline by intensity"},
1363 {0,
nullptr, 0,
nullptr,
nullptr},
1406 "Algorithm used to calculate distance of sample points to feature points");
1484 srna,
"Texture",
"Texture data-block used by materials, lights, worlds and brushes");
1500 "Set negative texture RGB and intensity values to zero, for some uses "
1501 "like displacement this option can be disabled to get the full range");
1509 "Map the texture intensity to the color ramp. "
1510 "Note that the alpha value is used for image textures, "
1511 "enable \"Calculate Alpha\" for images without an alpha channel.");
void BKE_brush_tag_unsaved_changes(Brush *brush)
ColorBand * BKE_colorband_add(bool rangetype)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_main_ensure_invariants(Main &bmain, std::optional< blender::Span< ID * > > modified_ids=std::nullopt)
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
void BKE_paint_invalidate_overlay_tex(Scene *scene, ViewLayer *view_layer, const Tex *tex)
void BKE_texture_mapping_init(struct TexMapping *texmap)
void BKE_texture_type_set(struct Tex *tex, int type)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define BLT_I18NCONTEXT_ID_IMAGE
#define BLT_I18NCONTEXT_ID_TEXTURE
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
void ED_node_texture_default(const bContext *C, Tex *tex)
Read Guarded memory(de)allocation.
#define RNA_ENUM_ITEM_SEPR
#define RNA_TRANSLATION_PREC_DEFAULT
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, const PointerRNA *t_ptr)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
PointerRNA RNA_id_pointer_create(ID *id)
void rna_def_animdata_common(StructRNA *srna)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
std::optional< std::string > rna_TextureSlot_path(const PointerRNA *ptr)
void RNA_api_texture(StructRNA *srna)
void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
const EnumPropertyItem rna_enum_mapping_type_items[]
static const EnumPropertyItem prop_image_extension[]
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
static void rna_def_texture_wood(BlenderRNA *brna)
static void rna_def_texture_magic(BlenderRNA *brna)
static const EnumPropertyItem blend_type_items[]
static void rna_def_colormapping(BlenderRNA *brna)
static const EnumPropertyItem prop_noise_basis_items[]
static void rna_def_texture_musgrave(BlenderRNA *brna)
static void rna_def_texture_clouds(BlenderRNA *brna)
static void rna_def_texture_blend(BlenderRNA *brna)
static void rna_def_texture_distorted_noise(BlenderRNA *brna)
static void rna_def_texture_marble(BlenderRNA *brna)
static void rna_def_texture(BlenderRNA *brna)
static void rna_def_filter_common(StructRNA *srna)
static void rna_def_mtex(BlenderRNA *brna)
static const EnumPropertyItem prop_noise_type[]
static void rna_def_texture_noise(BlenderRNA *brna)
void RNA_def_texture(BlenderRNA *brna)
static void rna_def_texmapping(BlenderRNA *brna)
static void rna_def_texture_voronoi(BlenderRNA *brna)
static void rna_def_texture_image(BlenderRNA *brna)
const EnumPropertyItem rna_enum_texture_type_items[]
static void rna_def_texture_stucci(BlenderRNA *brna)
struct bNodeTree * nodetree
void WM_main_add_notifier(uint type, void *reference)