Closed Montspy closed 2 years ago
I think the count function at the bottom has a problem that there isn't filename, and maybe doesn't check for variations considering the background colors. I double checked my traits.py to the example, and I don't see a difference in the function. Is there a traits.example.py
update that didn't get committed maybe?
Traceback (most recent call last):
File "/var/www/html/generator/generate.py", line 248, in <module>
main()
File "/var/www/html/generator/generate.py", line 123, in main
if total_image > traits.get_variation_cnt():
File "/var/www/html/generator/traits.py", line 161, in get_variation_cnt
cnt *= len(l["filenames"])
KeyError: 'filenames'
There's always a change I forget to propagate to traits.examples.py
...
Fixed in 7b22591971705fe94018909ac68e9a8dd1947145
Feature looks good. We will need to do some explanation on this in the Wiki for those that are not familiar with rgba, but otherwise I love the implementation and I'm gonna merge into main
.
I think I'm gonna move traits over to json next to avoid the traits confusion as well :+1:
The only potential thing I can see needing to be done here is after switching traits to JSON. I don't think we can put tuples as a JSON object, so will need to convert a list object to tuple when we grab the info.
Adds ability to pick background color or transparent background. Can also add a set of colors and weights for random generation. Example with random red/green/blue color: