[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26669] trunk/blender: mat/lamp/world. textures -> texture_slots
Campbell Barton
ideasman42 at gmail.com
Sun Feb 7 13:51:47 CET 2010
Revision: 26669
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26669
Author: campbellbarton
Date: 2010-02-07 13:51:47 +0100 (Sun, 07 Feb 2010)
Log Message:
-----------
mat/lamp/world.textures -> texture_slots
object.materials -> material_slots
since neither contain textures or materials directly.
Modified Paths:
--------------
trunk/blender/release/scripts/io/export_3ds.py
trunk/blender/release/scripts/io/export_obj.py
trunk/blender/source/blender/makesrna/intern/rna_material.c
trunk/blender/source/blender/makesrna/intern/rna_object.c
trunk/blender/source/blender/makesrna/intern/rna_texture.c
Modified: trunk/blender/release/scripts/io/export_3ds.py
===================================================================
--- trunk/blender/release/scripts/io/export_3ds.py 2010-02-07 12:30:55 UTC (rev 26668)
+++ trunk/blender/release/scripts/io/export_3ds.py 2010-02-07 12:51:47 UTC (rev 26669)
@@ -460,7 +460,7 @@
def get_material_images(material):
# blender utility func.
if material:
- return [s.texture.image for s in material.textures if s and s.texture.type == 'IMAGE' and s.texture.image]
+ return [s.texture.image for s in material.texture_slots if s and s.texture.type == 'IMAGE' and s.texture.image]
return []
# images = []
Modified: trunk/blender/release/scripts/io/export_obj.py
===================================================================
--- trunk/blender/release/scripts/io/export_obj.py 2010-02-07 12:30:55 UTC (rev 26668)
+++ trunk/blender/release/scripts/io/export_obj.py 2010-02-07 12:51:47 UTC (rev 26669)
@@ -134,7 +134,7 @@
# file.write('map_Kd %s\n' % img.filename.split('\\')[-1].split('/')[-1]) # Diffuse mapping image
elif mat: # No face image. if we havea material search for MTex image.
- for mtex in mat.textures:
+ for mtex in mat.texture_slots:
if mtex and mtex.texture.type == 'IMAGE':
try:
filename = copy_image(mtex.texture.image)
@@ -176,7 +176,7 @@
# Get MTex images
if mat:
- for mtex in mat.textures:
+ for mtex in mat.texture_slots:
if mtex and mtex.texture.type == 'IMAGE':
image_tex = mtex.texture.image
if image_tex:
Modified: trunk/blender/source/blender/makesrna/intern/rna_material.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_material.c 2010-02-07 12:30:55 UTC (rev 26668)
+++ trunk/blender/source/blender/makesrna/intern/rna_material.c 2010-02-07 12:51:47 UTC (rev 26669)
@@ -1749,7 +1749,7 @@
PropertyRNA *prop;
/* mtex */
- prop= RNA_def_property(srna, "textures", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, structname);
RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0);
RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures.");
Modified: trunk/blender/source/blender/makesrna/intern/rna_object.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_object.c 2010-02-07 12:30:55 UTC (rev 26668)
+++ trunk/blender/source/blender/makesrna/intern/rna_object.c 2010-02-07 12:51:47 UTC (rev 26669)
@@ -1522,11 +1522,11 @@
RNA_def_property_ui_text(prop, "Proxy Group", "Library group duplicator object this proxy object controls.");
/* materials */
- prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "MaterialSlot");
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", 0, 0, 0); /* don't dereference pointer! */
- RNA_def_property_ui_text(prop, "Materials", "Material slots in the object.");
+ RNA_def_property_ui_text(prop, "Material Slots", "Material slots in the object.");
prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
Modified: trunk/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_texture.c 2010-02-07 12:30:55 UTC (rev 26668)
+++ trunk/blender/source/blender/makesrna/intern/rna_texture.c 2010-02-07 12:51:47 UTC (rev 26669)
@@ -195,22 +195,22 @@
/* find the 'textures' property of the ID-struct */
RNA_id_pointer_create(ptr->id.data, &id_ptr);
- prop= RNA_struct_find_property(&id_ptr, "textures");
+ prop= RNA_struct_find_property(&id_ptr, "texture_slots");
/* get an iterator for this property, and try to find the relevant index */
if (prop) {
int index= RNA_property_collection_lookup_index(&id_ptr, prop, ptr);
if (index >= 0)
- return BLI_sprintfN("textures[%d]", index);
+ return BLI_sprintfN("texture_slots[%d]", index);
}
}
/* this is a compromise for the remaining cases... */
if (mtex->tex)
- return BLI_sprintfN("textures[\"%s\"]", mtex->tex->id.name+2);
+ return BLI_sprintfN("texture_slots[\"%s\"]", mtex->tex->id.name+2);
else
- return BLI_strdup("textures[0]");
+ return BLI_strdup("texture_slots[0]");
}
static int rna_TextureSlot_name_length(PointerRNA *ptr)
More information about the Bf-blender-cvs
mailing list