Objects
OBJECT UTILITIES
PhotoshopHandler
Bases: Application
Wrapper for the Photoshop Application object to maintain a single instance globally, caching mechanisms, app instance refresh, etc.
Source code in src/utils/objects.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
CharIDToTypeID(index)
cached
Utility definition redirecting to charIDToTypeID.
Source code in src/utils/objects.py
93 94 95 96 |
|
ExecuteAction(event_id, descriptor, dialogs=DialogModes.DisplayNoDialogs)
Utility definition rerouting to original executeAction function.
Source code in src/utils/objects.py
171 172 173 174 175 176 177 |
|
StringIDToTypeID(index)
cached
Utility definition redirecting to stringIDTotypeID.
Source code in src/utils/objects.py
128 129 130 131 |
|
__new__(version=None)
Always return the same Photoshop Application instance on successive calls.
Source code in src/utils/objects.py
44 45 46 47 48 49 50 51 52 53 54 |
|
cID(index)
cached
Shorthand for charIDToTypeID.
Source code in src/utils/objects.py
98 99 100 101 |
|
charIDToTypeID(index)
cached
Caching handler for charIDToTypeID. @param index: ID to convert to TypeID.
Source code in src/utils/objects.py
85 86 87 88 89 90 91 |
|
executeAction(event_id, descriptor, dialogs=DialogModes.DisplayNoDialogs)
Middleware to allow all dialogs when an error occurs upon calling executeAction in development mode. @param event_id: Action descriptor event ID. @param descriptor: Main action descriptor tree to execute. @param dialogs: DialogMode which governs whether to display dialogs.
Source code in src/utils/objects.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
is_running()
classmethod
Check if the current Photoshop Application instance is still valid.
Source code in src/utils/objects.py
73 74 75 76 77 78 79 |
|
refresh_app()
Replace the existing Photoshop Application instance with a new one.
Source code in src/utils/objects.py
60 61 62 63 64 65 66 67 68 69 70 71 |
|
sID(index)
cached
Shorthand for stringIDToTypeID.
Source code in src/utils/objects.py
133 134 135 136 |
|
scale_by_dpi(value)
Scales a value by comparing document DPI to ideal DPI. @param value: Integer or float value to adjust by DPI ratio. @return: Adjusted value as an integer.
Source code in src/utils/objects.py
220 221 222 223 224 225 226 |
|
stringIDToTypeID(index)
cached
Caching handler for stringIDToTypeID. @param index: ID to convert to TypeID.
Source code in src/utils/objects.py
120 121 122 123 124 125 126 |
|
supports_generative_fill()
cached
Checks if Photoshop version supports Generative Fill. @return: True if supported.
Source code in src/utils/objects.py
199 200 201 202 203 204 205 |
|
supports_target_text_replace()
cached
Checks if Photoshop version supports targeted text replacement. @return: True if supported.
Source code in src/utils/objects.py
183 184 185 186 187 188 189 |
|
supports_webp()
cached
Checks if Photoshop version supports WEBP files. @return: True if supported.
Source code in src/utils/objects.py
191 192 193 194 195 196 197 |
|
t2c(index)
cached
Shorthand for typeIDToCharID.
Source code in src/utils/objects.py
111 112 113 114 |
|
t2s(index)
cached
Shorthand for typeIDToStringID.
Source code in src/utils/objects.py
146 147 148 149 |
|
typeIDToCharID(index)
cached
Caching handler for typeIDToCharID. @param index: ID to convert to CharID.
Source code in src/utils/objects.py
103 104 105 106 107 108 109 |
|
typeIDToStringID(index)
cached
Caching handler for typeIDToStringID. @param index: ID to convert to StringID.
Source code in src/utils/objects.py
138 139 140 141 142 143 144 |
|
version_meets_requirement(value)
Checks if Photoshop version meets or exceeds required value. @return: True if supported.
Source code in src/utils/objects.py
207 208 209 210 211 212 213 214 |
|
Singleton
Bases: type
Maintains a single instance of any child class.
Source code in src/utils/objects.py
24 25 26 27 28 29 30 31 |
|