mat/lamp/world.textures -> texture_slots
authorCampbell Barton <ideasman42@gmail.com>
Sun, 7 Feb 2010 12:51:47 +0000 (12:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 7 Feb 2010 12:51:47 +0000 (12:51 +0000)
object.materials -> material_slots

since neither contain textures or materials directly.

release/scripts/io/export_3ds.py
release/scripts/io/export_obj.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_texture.py
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_texture.c

index ff93670076d7b2ccaa2c3f1f806a998ccfc199c8..409976d4c7c168132a77ba5277f8bbb993eb82d2 100644 (file)
@@ -460,7 +460,7 @@ class _3ds_chunk(object):
 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 = []
index 241325c7d339d6491ba9be08ca053f0dfa8248f7..81af5d3551dd9572ef85cde34c2e825e732916ba 100644 (file)
@@ -134,7 +134,7 @@ def write_mtl(scene, filename, copy_images):
 #                      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 @@ def copy_images(dest_dir):
 
         # 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:
index dfd182283e84472074ea043e78e4dc9b8e6dbd07..46f43014d6210eea099d55b358b314ff3519e592 100644 (file)
@@ -98,7 +98,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
         if ob:
             row = layout.row()
 
-            row.template_list(ob, "materials", ob, "active_material_index", rows=2)
+            row.template_list(ob, "material_slots", ob, "active_material_index", rows=2)
 
             col = row.column(align=True)
             col.operator("object.material_slot_add", icon='ZOOMIN', text="")
index 7de0df2dfe4cdd9297084fa9267244000ab47d91..f52cb9840c6415c725f65cffef733d7436a422a0 100644 (file)
@@ -98,7 +98,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
         if tex_collection:
             row = layout.row()
 
-            row.template_list(idblock, "textures", idblock, "active_texture_index", rows=2)
+            row.template_list(idblock, "texture_slots", idblock, "active_texture_index", rows=2)
 
             col = row.column(align=True)
             col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
index 635879ce9ec962b62269b2a2b6831ab7ccb2c538..ea750e94fbabe1a6ea81c92975e0a9206fb30b82 100644 (file)
@@ -1749,7 +1749,7 @@ void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeg
        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.");
index 53e9dae546bd572ed0bb4daa1eb0dd5ceafb95eb..cb0239eeadd812e5634b01ae1d2dcba511a9327c 100644 (file)
@@ -1522,11 +1522,11 @@ static void rna_def_object(BlenderRNA *brna)
        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");
index f4b081b273edc1995e82eb68ad2757e99735fd08..453b0caab1680142e219e44d8620cab843f3beee 100644 (file)
@@ -195,22 +195,22 @@ char *rna_TextureSlot_path(PointerRNA *ptr)
                
                /* 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)