-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(Photoshop): Restructure logic that establishes a Dispatch object #318
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Investigamer
force-pushed
the
main
branch
3 times, most recently
from
November 5, 2023 03:33
b076c6f
to
4f477c0
Compare
Additional Commit:
|
… initialize a valid Dispatch object The goal of restructuring is to hopefully reduce the recent issues arising from broken or mismatched registry data that results in the API failing to establish a valid Dispatch object. These recent occurences appear to coincide with Photoshop's rollover to v25 and the occurence of mixed registry data between Photoshop and Photoshop beta. This commit also attempts to refactor for readability and performance. Additionally: I deprecated the use of `GetActiveObject`, at the time I introduced it I didn't realize this spawner *only* seems to work for the initial Application object, so spawning any other object (ActionDescriptor, SolidCOlor, etc) just pads the execution time with zero benefit. We should definitely cut it loose. Signed-off-by: MrTeferi <[email protected]>
… subscriptable types Signed-off-by: MrTeferi <[email protected]>
…ath objects for app.load, wrap colorSettings exceptions Additionally make some grammar corrections and reinforce type declarations Signed-off-by: MrTeferi <[email protected]>
Signed-off-by: MrTeferi <[email protected]>
Investigamer
changed the title
refactor(Photoshop) Restructure logic that establishes a Dispatch object
refactor(Photoshop): Restructure logic that establishes a Dispatch object
Nov 5, 2023
…), add support for Python 3.12 Additionally attempt to fix mkdocs error Signed-off-by: MrTeferi <[email protected]>
Signed-off-by: MrTeferi <[email protected]>
Additional Commit: Deprecate Python 3.7
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this Commit
After the popularity of Photoshop Beta due to the Generative Fill feature, as well as the Photoshop version rollover from v24 to v25, there has been increased occurrence of strange issues such as:
Dispatch
object, despite Photoshop being installedDispatch
objects that conflict with one another, likely due to a version conflict i.e. having two versions of Photoshop installed, or having lingering registry data from an uninstalled version of Photoshop.Goals of this Commit
Dispatch
object inPhotoshop.__init__()
, ensuring the sequence is optimized. My current solution:Dispatch
object using this version.Dispatch
object, with the last attempt being an empty version (e.g.Photoshop.Application
).Dispatch
object fail, raise aPhotoshopPythonAPIError
.Note on Limitations
These changes surely don't address every
Dispatch
related issue we've seen, and unfortunately I cannot replicate many of these reported issues on a local system, so its impossible for me to test each scenario. Nevertheless, I put in a few days of deep dive research into the topic, and I'm confident my proposed methodology is a step in the right direction.