[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1851] contrib/py/scripts/addons/ texpaint_ui.py: Fix for SAVE ALL GENERATED failing on some images.
michael williamson
michaelw at cowtoolsmedia.co.uk
Tue Apr 19 20:54:13 CEST 2011
Revision: 1851
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1851
Author: michaelw
Date: 2011-04-19 18:54:12 +0000 (Tue, 19 Apr 2011)
Log Message:
-----------
Fix for SAVE ALL GENERATED failing on some images.
Modified Paths:
--------------
contrib/py/scripts/addons/texpaint_ui.py
Modified: contrib/py/scripts/addons/texpaint_ui.py
===================================================================
--- contrib/py/scripts/addons/texpaint_ui.py 2011-04-19 13:18:13 UTC (rev 1850)
+++ contrib/py/scripts/addons/texpaint_ui.py 2011-04-19 18:54:12 UTC (rev 1851)
@@ -569,17 +569,19 @@
bpy.context.scene.render.color_mode = 'RGBA'
fp =bpy.path.abspath(sep + sep +'textures' + sep + name)
+ try:
+ i.save_render(fp)
+ i.source = 'FILE'
+ if bpy.context.user_preferences.filepaths.use_relative_paths:
+ i.filepath = bpy.path.relpath(fp)
+ else:
+ i.filepath = fp
+ i.name = name
+ except:
+ print("something wrong with", fp)
- i.save_render(fp)
- i.source = 'FILE'
- if bpy.context.user_preferences.filepaths.use_relative_paths:
- i.filepath = bpy.path.relpath(fp)
- else:
- i.filepath = fp
- i.name = name
-
def save_active_paint():
#for materials in current object
ob = bpy.context.object
More information about the Bf-extensions-cvs
mailing list