Closed philmoz closed 7 years ago
PRs this big, Github has a really hard time showing the diff and the browser locks up on me. Help me some out:
I see no changes to code.
Both DefaultDelegates.lua and DefaultPointRenderer.lua were updated to accomodate the file name/location changes.
I use SourceTree - it provides a better UI.
I explained the redundancy of the images in the PR a few days ago. They are redundant in the current chosen design and may not be redundant in a future design. We may very well want to have completely new corner and center designs in the future. Think Face Recognition etc. Given the small amount of place these images are wasting right now, I don't see the need to reduce the universality of the current code just to win 50 K.
50K? On my Mac this change reduces the plugin size by 6MB and removes 1,444 redundant image files!
It does not preclude adding non-symmetrical, mirrored images in future should the need ever arise - the additional code required to support this would be quite simple.
Why not just move the currently unneeded icon sets to another folder outside of the .lrdevplugin ? This will remove the most part of the unneeded stuff and will not remove a feature which we could use soon.
The source images and script have been moved to the top level build/imgs folder (out of the plugin). Everything in the assets/imgs folder is created from these source images - why keep something that can be re-created at any time? Why keep redundant images when a few lines of code can take care of them and produce the same result?
The point is that it happens that the current images are symmetrical. I dont see any reason to change a universal script to a particular script that works only because of the current particularity of the images. And the size problem is to me a non issue, 6 MB being 1/3th to 1/5th of what only one image weights nowadays.
Glad to see you guys are discussing reasonably. If an agreed upon decision doesn't happen, I'll weigh in in a couple days.
I suspect the mirrorred/rotated icons are the main sticking point, so lets break it down into pieces.
Which of the following are you happy with:
If you really want to keep the mirrored corner images, I don't have a problem with that. I can't envision a scenario where the red center dot would need to be replaced with something more complex so I think point 4 makes sense as well.
ok. So I weighted back and forth other ways of reducing the number of images while retaining the universality. I went the way to integrate the image name calculation function to the template table. This works, but because of lua's lack of support for inline ifs, this is just hideous and really not a better solution than yours. So, I am for merging this PR as is.
Thanks guys. Here's what I'm going to do as well: I will make a git tag as the code stands today as stable-001 release. If minds ever change, git will have all the history of the code and files. It will be very easy to revert this out.
in branch called "asset_reduction" until I can QA. I will merge it over from there tomorrow (or the next day)
The rotated & mirrored center images were redundant, replaced these with single images. Only the red center images were used so removed the black, grey and yellow ones. Since the corner images are symmetrical, the mirrored corner images were duplicated by the rotated images. The code now selects an alternate rotation angle if mirroring is needed. The source images and build script don't need to be in the plugin directory, I moved these to the top level of the project. Created sub-directories for the various images instead of having them all in one directory.