Skip to content
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

Add feature: predefined-art-position #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

HelixVita
Copy link
Contributor

@HelixVita HelixVita commented Jul 30, 2022

What is the purpose of this pull request?

I do not expect this to be merged into main "as is" (or necessarily in any form), as this is very much a minimum viable product kind of thing. I made zero effort to make the code look neat or match the design patterns of the overall proxyshop codebase (for laziness reasons). I'm creating this Pull Request purely in the spirit of sharing code that might benefit others.

How does this feature work?

This makes it so that any adjustments one makes to the art layer while in "Manual Edit Mode" get automatically recorded and saved to a csv so that Proxyshop remembers the art position next time a card is rendered with the same template and art with same filename.

This means that if the same card is rendered again using art with a different filename, then it will not use those values stored in the csv. (Unless of course you tell it to 'remember' these ones as well). This is intentional, so as to allow the existence of any number of art variations (upscaled, crop variations, content-aware-filled, etc.) most of which will likely require different positioning.

Instructions for use:

  • For the art position to be read/written from/to csv, it requires the existence of a csv file with the five headers filename, x, y, w, h and the name of this csv file must be the same as the name of the template's psd file, with .csv instead of .psd. Example: masterpiece.csv
  • Each template requires its own csv file (though you can of course copy values from one to the other)
  • The csv files are placed in a folder named predefined-art-positions which is placed in the art folder

image

Credit to @preshtildeath for ideas and guidance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant