|
| 1 | +# https://theiviaxx.github.io/photoshop-docs/Photoshop/BatchOptions.html |
| 2 | +# Import local modules |
| 3 | +from photoshop.api._core import Photoshop |
| 4 | + |
| 5 | + |
| 6 | +class BatchOptions(Photoshop): |
| 7 | + object_name = "BatchOptions" |
| 8 | + |
| 9 | + def __init__(self): |
| 10 | + super().__init__() |
| 11 | + |
| 12 | + @property |
| 13 | + def destination(self): |
| 14 | + """The type of destination for the processed files.""" |
| 15 | + return self.app.destination |
| 16 | + |
| 17 | + @destination.setter |
| 18 | + def destination(self, value): |
| 19 | + self.app.destination = value |
| 20 | + |
| 21 | + @property |
| 22 | + def destinationFolder(self): |
| 23 | + """The folder location for the processed files. Valid only when ‘destination’ = folder.""" |
| 24 | + return self.app.destinationFolder |
| 25 | + |
| 26 | + @destinationFolder.setter |
| 27 | + def destinationFolder(self, path): |
| 28 | + self.app.destinationFolder = path |
| 29 | + |
| 30 | + @property |
| 31 | + def errorFile(self): |
| 32 | + """The file in which to log errors encountered. |
| 33 | + To display errors on the screen and stop batch processing when errors occur, leave blank.""" |
| 34 | + return self.app.errorFile |
| 35 | + |
| 36 | + @errorFile.setter |
| 37 | + def errorFile(self, file_path): |
| 38 | + self.app.errorFile = file_path |
| 39 | + |
| 40 | + @property |
| 41 | + def fileNaming(self) -> list: |
| 42 | + """A list of file naming options. Maximum: 6.""" |
| 43 | + return self.app.fileNaming |
| 44 | + |
| 45 | + @fileNaming.setter |
| 46 | + def fileNaming(self, file_naming: list): |
| 47 | + self.app.fileNaming = file_naming |
| 48 | + |
| 49 | + @property |
| 50 | + def macintoshCompatible(self) -> bool: |
| 51 | + """If true, the final file names are Macintosh compatible.""" |
| 52 | + return self.app.macintoshCompatible |
| 53 | + |
| 54 | + @macintoshCompatible.setter |
| 55 | + def macintoshCompatible(self, value: bool): |
| 56 | + self.app.macintoshCompatible = value |
| 57 | + |
| 58 | + @property |
| 59 | + def overrideOpen(self) -> bool: |
| 60 | + """If true, overrides action open commands.""" |
| 61 | + return self.app.overrideOpen |
| 62 | + |
| 63 | + @overrideOpen.setter |
| 64 | + def overrideOpen(self, value: bool): |
| 65 | + self.app.overrideOpen = value |
| 66 | + |
| 67 | + @property |
| 68 | + def overrideSave(self) -> bool: |
| 69 | + """If true, overrides save as action steps with the specified destination.""" |
| 70 | + return self.app.overrideSave |
| 71 | + |
| 72 | + @overrideSave.setter |
| 73 | + def overrideSave(self, value: bool): |
| 74 | + self.app.overrideSave = value |
| 75 | + |
| 76 | + @property |
| 77 | + def startingSerial(self) -> int: |
| 78 | + """The starting serial number to use in naming files.""" |
| 79 | + return self.app.startingSerial |
| 80 | + |
| 81 | + @startingSerial.setter |
| 82 | + def startingSerial(self, value: int): |
| 83 | + self.app.startingSerial = value |
| 84 | + |
| 85 | + @property |
| 86 | + def suppressOpen(self) -> bool: |
| 87 | + """If true, suppresses file open options dialogs.""" |
| 88 | + return self.app.suppressOpen |
| 89 | + |
| 90 | + @suppressOpen.setter |
| 91 | + def suppressOpen(self, value: bool): |
| 92 | + self.app.suppressOpen = value |
| 93 | + |
| 94 | + @property |
| 95 | + def suppressProfile(self) -> bool: |
| 96 | + """If true, suppresses color profile warnings.""" |
| 97 | + return self.app.suppressProfile |
| 98 | + |
| 99 | + @suppressProfile.setter |
| 100 | + def suppressProfile(self, value: bool): |
| 101 | + self.app.suppressProfile = value |
| 102 | + |
| 103 | + @property |
| 104 | + def unixCompatible(self) -> bool: |
| 105 | + """If true, the final file names are Unix compatible.""" |
| 106 | + return self.app.unixCompatible |
| 107 | + |
| 108 | + @unixCompatible.setter |
| 109 | + def unixCompatible(self, value: bool): |
| 110 | + self.app.unixCompatible = value |
| 111 | + |
| 112 | + @property |
| 113 | + def windowsCompatible(self) -> bool: |
| 114 | + """If true, the final file names are Windows compatible.""" |
| 115 | + return self.app.windowsCompatible |
| 116 | + |
| 117 | + @windowsCompatible.setter |
| 118 | + def windowsCompatible(self, value: bool): |
| 119 | + self.app.windowsCompatible = value |
0 commit comments