Code: Select all
from PSPApp import *
# Set values below for title_description, instructions_text, author_name, copyright_notice.
def ScriptProperties():
return {
'Author': author_name,
'Copyright': author_name',
'Description': u'Adds Image Author EXIF Information',
'Host': u'PaintShop Pro',
'Host Version': u'15.00'
}
def Do(Environment):
# EnableOptimizedScriptUndo
App.Do( Environment, 'EnableOptimizedScriptUndo', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((15,0,0),1)
}
})
# ImageInfo
App.Do( Environment, 'ImageInfo', {
'ArtistName': author_name,
'CopyrightHolder': copyright_notice,
'Description': instructions_text,
'Title': title_description,
'DisplayArtist': True,
'DisplayConditions': True,
'DisplayDate': True,
'DisplayGPS': True,
'DisplayImage': True,
'DisplayInput': True,
'DisplayMakernote': True,
'DisplayDataOnly': True,
'ExifTitle': title_description,
'ExifArtistName': author_name,
'ExifCopyright': copyright_notice,
'ExifComments': instructions_text,
'ActivePage': App.Constants.ImageInfoPropertySheet.CreatorPage,
'City': u'Fairfax',
'State': u'VA',
'Country': u'USA',
'Credit': author_name,
'Source': None,
'Headline': title_description,
'DescWriter': None,
'Instructions': instructions_text,
'TransRef': None,
'Urgency': None,
'ExifOrientation': 1,
'ExifDateTimeDigitized': None,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((15,0,0),1)
}
})
ImageInfo = App.Do( Environment, 'ReturnImageInfo' )
CurFileName = ImageInfo['FileName']
print "[------ Finished File: ",CurFileName," ------]"
John
PS - If someone has documentation on the functions in PaintShop Pro X5 Ultimate callable from Python and can pass it along, that would be great!
