Fix #30803: shader node Mapping location property conflicted with based class

location property (for the node editor), now renamed to "translation".
This commit is contained in:
Brecht Van Lommel 2012-04-04 16:11:39 +00:00
parent 503785649d
commit d7d8c668ca
5 changed files with 6 additions and 6 deletions

@ -727,7 +727,7 @@ class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
row = layout.row()
row.column().prop(mapping, "location")
row.column().prop(mapping, "translation")
row.column().prop(mapping, "rotation")
row.column().prop(mapping, "scale")

@ -80,7 +80,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping)
if(!b_mapping)
return;
mapping->translation = get_float3(b_mapping.location());
mapping->translation = get_float3(b_mapping.translation());
mapping->rotation = get_float3(b_mapping.rotation());
mapping->scale = get_float3(b_mapping.scale());
@ -94,7 +94,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_map
if(!b_mapping)
return;
mapping->translation = get_float3(b_mapping.location());
mapping->translation = get_float3(b_mapping.translation());
mapping->rotation = get_float3(b_mapping.rotation());
mapping->scale = get_float3(b_mapping.scale());
}

@ -1035,7 +1035,7 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemL(layout, "Location:", ICON_NONE);
row= uiLayoutRow(layout, 1);
uiItemR(row, ptr, "location", 0, "", ICON_NONE);
uiItemR(row, ptr, "translation", 0, "", ICON_NONE);
uiItemL(layout, "Rotation:", ICON_NONE);
row= uiLayoutRow(layout, 1);

@ -1173,7 +1173,7 @@ static void def_sh_mapping(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "TexMapping", "storage");
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");

@ -468,7 +468,7 @@ static void rna_def_texmapping(BlenderRNA *brna)
srna = RNA_def_struct(brna, "TexMapping", NULL);
RNA_def_struct_ui_text(srna, "Texture Mapping", "Texture coordinate mapping settings");
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");