forked from bartvdbraak/blender
minor change so other scripts can call image_edit.edit_extern(img) to edit an image in the gimp, photoshop etc.
This commit is contained in:
parent
e4c3d77e9f
commit
d2c482115e
@ -58,8 +58,11 @@ except:
|
|||||||
import Blender
|
import Blender
|
||||||
from Blender import Image, sys, Draw, Registry
|
from Blender import Image, sys, Draw, Registry
|
||||||
|
|
||||||
def main():
|
def edit_extern(image=None):
|
||||||
|
|
||||||
|
if not image:
|
||||||
image = Image.GetCurrent()
|
image = Image.GetCurrent()
|
||||||
|
|
||||||
if not image: # Image is None
|
if not image: # Image is None
|
||||||
Draw.PupMenu('ERROR: You must select an active Image.')
|
Draw.PupMenu('ERROR: You must select an active Image.')
|
||||||
return
|
return
|
||||||
@ -122,5 +125,10 @@ def main():
|
|||||||
print '\tediting image with command "%s"' % appstring
|
print '\tediting image with command "%s"' % appstring
|
||||||
os.system(appstring)
|
os.system(appstring)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
edit_extern()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__' and os != None:
|
if __name__ == '__main__' and os != None:
|
||||||
main()
|
main()
|
Loading…
Reference in New Issue
Block a user