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_material_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_material_api.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_material_api.c b/source/blender/makesrna/intern/rna_material_api.c
index 03eba157bf3..43c1a9be765 100644
--- a/source/blender/makesrna/intern/rna_material_api.c
+++ b/source/blender/makesrna/intern/rna_material_api.c
@@ -42,7 +42,7 @@
Adds material to the first free texture slot.
If all slots are busy, replaces the first.
*/
-static void rna_Material_add_texture(Material *ma, Tex *tex, int mapto, int texco)
+static void rna_Material_add_texture(Material *ma, Tex *tex, int texco, int mapto)
{
int i;
MTex *mtex;
@@ -71,8 +71,8 @@ static void rna_Material_add_texture(Material *ma, Tex *tex, int mapto, int texc
if (tex)
id_us_plus(&tex->id);
- mtex->texco= mapto;
- mtex->mapto= texco;
+ mtex->texco= texco;
+ mtex->mapto= mapto;
}
#else
@@ -121,6 +121,7 @@ void RNA_api_material(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_enum(func, "texture_coordinates", prop_texture_coordinates_items, TEXCO_UV, "", "Source of texture coordinate information."); /* optional */
parm= RNA_def_enum(func, "map_to", prop_texture_mapto_items, MAP_COL, "", "Controls which material property the texture affects."); /* optional */
+ RNA_def_property_flag(parm, PROP_ENUM_FLAG);
}
#endif