def n_check_data(self, n_data):
     TestBaseTexture.n_check_data(self, n_data)
     n_geom = n_data.roots[0].children[0]
     nose.tools.assert_equal(n_geom.num_properties, 2)
     self.n_check_texturing_property(n_geom.properties[0])
     TestMaterialProperty.n_check_material_property(self,
                                                    n_geom.properties[1])
 def b_check_data(self, b_obj):
     TestMaterialProperty.b_check_data(self, b_obj)
     b_mesh = b_obj.data
     b_mat = b_mesh.materials[0]
     
     nose.tools.assert_equal(b_mat.texture_slots[0] != None, True) 
     b_mat_texslot = b_mat.texture_slots[0]
     nose.tools.assert_equal(b_mat_texslot.use, True)
     nose.tools.assert_is_instance(b_mat_texslot.texture, bpy.types.ImageTexture)
     #nose.tools.assert_equal(b_mat_texslot.texture.image.filepath, self.texture_filepath)
     nose.tools.assert_equal(b_mat_texslot.texture_coords, 'UV')
     nose.tools.assert_equal(b_mat_texslot.use_map_color_diffuse, True)
    def b_check_data(self, b_obj):
        TestMaterialProperty.b_check_data(self, b_obj)
        b_mesh = b_obj.data
        b_mat = b_mesh.materials[0]

        nose.tools.assert_equal(b_mat.texture_slots[0] != None, True)
        b_mat_texslot = b_mat.texture_slots[0]
        nose.tools.assert_equal(b_mat_texslot.use, True)
        nose.tools.assert_is_instance(b_mat_texslot.texture,
                                      bpy.types.ImageTexture)
        #nose.tools.assert_equal(b_mat_texslot.texture.image.filepath, self.texture_filepath)
        nose.tools.assert_equal(b_mat_texslot.texture_coords, 'UV')
        nose.tools.assert_equal(b_mat_texslot.use_map_color_diffuse, True)
    def b_create_object(self):
        #create material texture slot
        b_obj = TestMaterialProperty.b_create_object(self)
        b_mat = b_obj.data.materials[0]
        b_mat_texslot = b_mat.texture_slots.create(0)
        
        #user manually selects Image Type then loads image
        b_mat_texslot.texture = bpy.data.textures.new(name='BaseTexture', type='IMAGE')
        b_mat_texslot.texture.image = bpy.data.images.load(self.texture_filepath)
        b_mat_texslot.use = True
        
        #Mapping
        b_mat_texslot.texture_coords = 'UV'
        b_mat_texslot.uv_layer = 'UVMap'
        
        #Influence
        b_mat_texslot.use_map_color_diffuse = True

        #bpy.ops.wm.save_mainfile(filepath="test/autoblend/" + self.n_name)
        return b_obj
    def b_create_object(self):
        #create material texture slot
        b_obj = TestMaterialProperty.b_create_object(self)
        b_mat = b_obj.data.materials[0]
        b_mat_texslot = b_mat.texture_slots.create(0)

        #user manually selects Image Type then loads image
        b_mat_texslot.texture = bpy.data.textures.new(name='BaseTexture',
                                                      type='IMAGE')
        b_mat_texslot.texture.image = bpy.data.images.load(
            self.texture_filepath)
        b_mat_texslot.use = True

        #Mapping
        b_mat_texslot.texture_coords = 'UV'
        b_mat_texslot.uv_layer = 'UVMap'

        #Influence
        b_mat_texslot.use_map_color_diffuse = True

        #bpy.ops.wm.save_mainfile(filepath="test/autoblend/" + self.n_name)
        return b_obj
 def n_check_data(self, n_data):
     n_geom = n_data.roots[0].children[0]
     nose.tools.assert_equal(n_geom.num_properties, 2)
     self.n_check_texturing_property(n_geom.properties[0])
     TestMaterialProperty.n_check_material_property(self, n_geom.properties[1])