[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27569] trunk/blender/release/scripts/op/ image.py: Fix [#21553] Re-Projection just opening the image editor but not the image.

JS jsplifer at yahoo.com
Fri Mar 19 04:12:15 CET 2010


This was working splendid the other day, great tool!!! But I seem to be getting an error now on osx when using gimp as my image editor, not sure if it was this commit or one of the previous others in the last two days.

Here is the error from console.
3/18/10 11:05:33 PM login[15790] USER_PROCESS: 15790 ttys000 
3/18/10 11:07:56 PM [0x0-0xa90a9].gimp-2.6[15814] Unknown option -psn_0_692393 
3/18/10 11:07:56 PM com.apple.launchd[115] ([0x0-0xa90a9].gimp-2.6[15814]) Exited with exit code: 1 
3/18/10 11:07:56 PM com.apple.launchd[115] ([0x0-0xa90a9].gimp-2.6[15814]) Exited with exit code: 1 
3/18/10 11:07:56 PM [0x0-0x91091].org.blenderfoundation.blender[15558] LSOpenFromURLSpec() failed with error -10810 for the file /Users/jsplifer/Desktop/PrivateDick/Models/animals_moth_animals_moth005.png. 

Thanks,
jsplifer



----- Original Message ----
From: Matt Ebb <matt at mke3.net>
To: bf-blender-cvs at blender.org
Sent: Tue, March 16, 2010 11:08:11 PM
Subject: [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27569] trunk/blender/release/scripts/op/ image.py: Fix [#21553] Re-Projection just opening the image editor but not the image.

Revision: 27569
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27569
Author:   broken
Date:     2010-03-17 04:07:37 +0100 (Wed, 17 Mar 2010)

Log Message:
-----------
Fix [#21553] Re-Projection just opening the image editor but not the image.

Campbell please check/beautify if you like, but it works properly on OS X, either
opening Preview with the 'open' command or Photoshop, when the path is set 
in user preferences.

Modified Paths:
--------------
    trunk/blender/release/scripts/op/image.py

Modified: trunk/blender/release/scripts/op/image.py
===================================================================
--- trunk/blender/release/scripts/op/image.py    2010-03-17 01:56:41 UTC (rev 27568)
+++ trunk/blender/release/scripts/op/image.py    2010-03-17 03:07:37 UTC (rev 27569)
@@ -22,19 +22,25 @@


def image_editor_guess(context):
+    import platform
+    system = platform.system()
+    
     image_editor = context.user_preferences.filepaths.image_editor

     # use image editor in the preferences when available.
     if not image_editor:
-        import platform
-        system = platform.system()
-
         if system == 'Windows':
-            image_editor = "start" # not tested!
+            image_editor = ["start"] # not tested!
         elif system == 'Darwin':
-            image_editor = "open"
+            image_editor = ["open"]
         else:
-            image_editor = "gimp"
+            image_editor = ["gimp"]
+    else:
+        if system == 'Darwin':
+            # blender file selector treats .app as a folder
+            # and will include a trailing backslash, so we strip it.
+            image_editor.rstrip('\\')
+            image_editor = ["open", "-a", image_editor]

     return image_editor

@@ -118,8 +124,12 @@
         image_new.file_format = 'PNG'
         image_new.save()

-        subprocess.Popen([image_editor, bpy.utils.expandpath(filename_final)])
+        cmd = []
+        cmd.extend(image_editor)
+        cmd.append(bpy.utils.expandpath(filename_final))

+        subprocess.Popen(cmd)
+
         return {'FINISHED'}




_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs at blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs



      



More information about the Bf-committers mailing list