~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to release/scripts/addons/texture_paint_layer_manager.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
559
559
                        name = name +'.tga' 
560
560
                        
561
561
                    bpy.context.scene.render.image_settings.color_mode = 'RGBA'                          
562
 
                    fp =bpy.path.abspath('//textures' + sep + name)
 
562
                    fp = bpy.path.abspath('//textures' + sep + name)
563
563
                    try:
564
564
                        i.save_render(fp)
565
565
                        i.source = 'FILE'
566
566
                        if bpy.context.user_preferences.filepaths.use_relative_paths:
567
 
                            i.filepath = bpy.path.relpath(fp) 
 
567
                            # can't always find the relative path (between drive letters on windows)
 
568
                            try:
 
569
                                i.filepath = bpy.path.relpath(fp)
 
570
                            except ValueError:
 
571
                                i.filepath = fp
568
572
                        else:
569
573
                            i.filepath = fp
570
574
                        i.name = name