Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r--source/blender/makesrna/intern/rna_texture.c59
1 files changed, 27 insertions, 32 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 567166fd15f..7c83676113d 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -128,7 +128,7 @@ static void rna_Texture_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Tex *tex= ptr->id.data;
- DAG_id_flush_update(&tex->id, 0);
+ DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE, tex);
}
@@ -148,12 +148,13 @@ static void rna_Texture_voxeldata_image_update(Main *bmain, Scene *scene, Pointe
rna_Texture_voxeldata_update(bmain, scene, ptr);
}
+
/* Used for Texture Properties, used (also) for/in Nodes */
static void rna_Texture_nodes_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Tex *tex= ptr->id.data;
- DAG_id_flush_update(&tex->id, 0);
+ DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE|ND_NODES, tex);
}
@@ -168,11 +169,12 @@ void rna_TextureSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
- DAG_id_flush_update(id, 0);
+ DAG_id_tag_update(id, 0);
switch(GS(id->name)) {
case ID_MA:
WM_main_add_notifier(NC_MATERIAL|ND_SHADING, id);
+ WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, id);
break;
case ID_WO:
WM_main_add_notifier(NC_WORLD, id);
@@ -325,9 +327,6 @@ static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value)
if(value) tex->imaflag |= TEX_MIPMAP;
else tex->imaflag &= ~TEX_MIPMAP;
-
- if(tex->imaflag & TEX_MIPMAP)
- tex->texfilter = TXF_EWA;
}
static void rna_Envmap_source_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -363,6 +362,16 @@ static void rna_PointDensity_psys_set(PointerRNA *ptr, PointerRNA value)
pd->psys= BLI_findindex(&ob->particlesystem, value.data) + 1;
}
+static char *rna_PointDensity_path(PointerRNA *ptr)
+{
+ return BLI_sprintfN("point_density");
+}
+
+static char *rna_VoxelData_path(PointerRNA *ptr)
+{
+ return BLI_sprintfN("voxel_data");
+}
+
#else
static void rna_def_texmapping(BlenderRNA *brna)
@@ -429,8 +438,8 @@ static void rna_def_mtex(BlenderRNA *brna)
{MTEX_BLEND_SAT, "SATURATION", 0, "Saturation", ""},
{MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
{MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
- {MTEX_SOFT_LIGHT, "SOFT LIGHT", 0, "Soft Light", ""},
- {MTEX_LIN_LIGHT , "LINEAR LIGHT", 0, "Linear Light", ""},
+ {MTEX_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
+ {MTEX_LIN_LIGHT , "LINEAR_LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem output_node_items[] = {
@@ -473,7 +482,7 @@ static void rna_def_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB");
+ RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB or when RGB to intensity is enabled");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
@@ -676,8 +685,8 @@ static void rna_def_texture_clouds(BlenderRNA *brna)
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_range(prop, 0, 6, 0, 2);
+ RNA_def_property_range(prop, 0, 30);
+ RNA_def_property_ui_range(prop, 0, 24, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
@@ -811,8 +820,8 @@ static void rna_def_texture_marble(BlenderRNA *brna)
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_range(prop, 0, 6, 0, 2);
+ RNA_def_property_range(prop, 0, 30);
+ RNA_def_property_ui_range(prop, 0, 24, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
RNA_def_property_update(prop, 0, "rna_Texture_update");
@@ -866,8 +875,8 @@ static void rna_def_texture_magic(BlenderRNA *brna)
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_range(prop, 0, 6, 0, 2);
+ RNA_def_property_range(prop, 0, 30);
+ RNA_def_property_ui_range(prop, 0, 24, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -979,13 +988,6 @@ static void rna_def_texture_image(BlenderRNA *brna)
{TEX_REPEAT, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
{TEX_CHECKER, "CHECKER", 0, "Checker", "Causes the image to repeat in checker board pattern"},
{0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem prop_normal_space[] = {
- {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Camera", ""},
- {MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""},
- {MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""},
- {MTEX_NSPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
- {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ImageTexture", "Texture");
RNA_def_struct_ui_text(srna, "Image Texture", "");
@@ -1123,15 +1125,6 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for normal mapping");
RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- /* not sure why this goes in mtex instead of texture directly? */
- RNA_def_struct_sdna(srna, "MTex");
-
- prop= RNA_def_property(srna, "normal_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "normapspace");
- RNA_def_property_enum_items(prop, prop_normal_space);
- RNA_def_property_ui_text(prop, "Normal Space", "Sets space of normal map image");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_plugin(BlenderRNA *brna)
@@ -1432,6 +1425,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PointDensity", NULL);
RNA_def_struct_sdna(srna, "PointDensity");
RNA_def_struct_ui_text(srna, "PointDensity", "Point density settings");
+ RNA_def_struct_path_func(srna, "rna_PointDensity_path");
prop= RNA_def_property(srna, "point_source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "source");
@@ -1520,7 +1514,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
prop= RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noise_depth");
- RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
@@ -1584,6 +1578,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
srna= RNA_def_struct(brna, "VoxelData", NULL);
RNA_def_struct_sdna(srna, "VoxelData");
RNA_def_struct_ui_text(srna, "VoxelData", "Voxel data settings");
+ RNA_def_struct_path_func(srna, "rna_VoxelData_path");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "interp_type");