Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-11-26 21:40:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-11-26 21:40:04 +0300
commitd2c482115ea9baea80ea82807380049d9072c21f (patch)
tree9c6377259d0cb0386ef49c175cd2cf8e0cddf965 /release/scripts/image_edit.py
parente4c3d77e9f8ba2502b9ca69ba392b6f765e9ba3d (diff)
minor change so other scripts can call image_edit.edit_extern(img) to edit an image in the gimp, photoshop etc.
Diffstat (limited to 'release/scripts/image_edit.py')
-rw-r--r--release/scripts/image_edit.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/release/scripts/image_edit.py b/release/scripts/image_edit.py
index 4e78b201ad8..e478c587d41 100644
--- a/release/scripts/image_edit.py
+++ b/release/scripts/image_edit.py
@@ -58,8 +58,11 @@ except:
import Blender
from Blender import Image, sys, Draw, Registry
-def main():
- image = Image.GetCurrent()
+def edit_extern(image=None):
+
+ if not image:
+ image = Image.GetCurrent()
+
if not image: # Image is None
Draw.PupMenu('ERROR: You must select an active Image.')
return
@@ -122,5 +125,10 @@ def main():
print '\tediting image with command "%s"' % appstring
os.system(appstring)
+
+def main():
+ edit_extern()
+
+
if __name__ == '__main__' and os != None:
main() \ No newline at end of file