Skip to content

Comments

Add feature: predefined-art-position#15

Open
HelixVita wants to merge 3 commits intoInvestigamer:mainfrom
HelixVita:predefined-art-position
Open

Add feature: predefined-art-position#15
HelixVita wants to merge 3 commits intoInvestigamer:mainfrom
HelixVita:predefined-art-position

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