fix [#26782] Missing settings in some texture nodes.

also rename noisebasis_2 --> noise_basis_2
This commit is contained in:
Campbell Barton 2011-04-05 06:05:55 +00:00
parent db6ea4d3a5
commit dcb26e4e47
4 changed files with 36 additions and 8 deletions

@ -237,14 +237,16 @@ data_path_update = [
("ImageTexture", "mirror_y", "use_mirror_y"),
("ImageTexture", "normal_map", "use_normal_map"),
("MarbleTexture", "noise_size", "noise_scale"),
("MarbleTexture", "noisebasis2", "noisebasis_2"),
("MarbleTexture", "noisebasis2", "noise_basis_2"),
("MarbleTexture", "noisebasis_2", "noise_basis_2"),
("MusgraveTexture", "highest_dimension", "dimension_max"),
("MusgraveTexture", "noise_size", "noise_scale"),
("StucciTexture", "noise_size", "noise_scale"),
("VoronoiTexture", "coloring", "color_mode"),
("VoronoiTexture", "noise_size", "noise_scale"),
("WoodTexture", "noise_size", "noise_scale"),
("WoodTexture", "noisebasis2", "noisebasis_2"),
("WoodTexture", "noisebasis2", "noise_basis_2"),
("WoodTexture", "noisebasis_2", "noise_basis_2"),
("World", "blend_sky", "use_sky_blend"),
("World", "paper_sky", "use_sky_paper"),
("World", "real_sky", "use_sky_real"),

@ -257,7 +257,7 @@ class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
tex = context.texture
layout.prop(tex, "noisebasis_2", expand=True)
layout.prop(tex, "noise_basis_2", expand=True)
layout.prop(tex, "wood_type", expand=True)
col = layout.column()
@ -287,7 +287,7 @@ class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
tex = context.texture
layout.prop(tex, "marble_type", expand=True)
layout.prop(tex, "noisebasis_2", expand=True)
layout.prop(tex, "noise_basis_2", expand=True)
layout.label(text="Noise:")
layout.prop(tex, "noise_type", text="Type", expand=True)
layout.prop(tex, "noise_basis", text="Basis")

@ -1227,14 +1227,28 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
row= uiLayoutRow(col, 0);
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
row= uiLayoutRow(col, 0);
uiItemR(row, &tex_ptr, "noisebasis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(row, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
row= uiLayoutRow(col, 0);
uiItemR(row, &tex_ptr, "noise_basis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
break;
case TEX_MAGIC:
uiItemR(col, &tex_ptr, "noise_depth", 0, NULL, ICON_NONE);
break;
case TEX_STUCCI:
row= uiLayoutRow(col, 0);
uiItemR(row, &tex_ptr, "stucci_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
row= uiLayoutRow(col, 0);
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
break;
case TEX_WOOD:
uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
uiItemR(col, &tex_ptr, "wood_type", 0, "", ICON_NONE);
row= uiLayoutRow(col, 0);
uiItemR(row, &tex_ptr, "noisebasis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(row, &tex_ptr, "noise_basis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
row= uiLayoutRow(col, 0);
uiLayoutSetActive(row, !(RNA_enum_get(&tex_ptr, "wood_type")==TEX_BAND || RNA_enum_get(&tex_ptr, "wood_type")==TEX_RING));
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@ -1253,6 +1267,18 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
uiItemR(col, &tex_ptr, "noise_distortion", 0, "", ICON_NONE);
break;
case TEX_MUSGRAVE:
uiItemR(col, &tex_ptr, "musgrave_type", 0, "", ICON_NONE);
uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
break;
case TEX_VORONOI:
uiItemR(col, &tex_ptr, "distance_metric", 0, "", ICON_NONE);
if(tex->vn_distm == TEX_MINKOVSKY) {
uiItemR(col, &tex_ptr, "minkovsky_exponent", 0, NULL, ICON_NONE);
}
uiItemR(col, &tex_ptr, "color_mode", 0, "", ICON_NONE);
break;
}
}

@ -790,7 +790,7 @@ static void rna_def_texture_wood(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pattern", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
prop= RNA_def_property(srna, "noisebasis_2", PROP_ENUM, PROP_NONE);
prop= RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_wood_noisebasis2);
RNA_def_property_ui_text(prop, "Noise Basis 2", "");
@ -864,7 +864,7 @@ static void rna_def_texture_marble(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
prop= RNA_def_property(srna, "noisebasis_2", PROP_ENUM, PROP_NONE);
prop= RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_marble_noisebasis2);
RNA_def_property_ui_text(prop, "Noise Basis 2", "");