Comments (4)
Seems like it might be breaking down somewhere around these lines
https://github.com/sk33z3r/LooPyGen/blob/main/generator/generate.py#L166-L169
But I don't see how exactly. Otherwise I don't really see how it's mis-matching in the code unless I have something set wrong in traits. Just for posterity, here's the whole file. I'm baffled why layer00-layer03 works, but layer04 fails.
## Give the collection a name
COLLECTION_NAME="Tropical JEFF"
## Layers dictionary
layers = [
{ # Background color
"layer_name": "Background color",
"rgba": {
"Red": (192, 54, 54, 255),
"Green": ( 54, 192, 54, 255),
"Blue": ( 54, 54, 192, 255),
"None": ( 0, 0, 0, 0),
"Black": ( 0, 0, 0, 255),
"White": (255, 255, 255, 255)
},
"weights": [
2,
2,
2,
1,
3,
4
],
"size": (4820, 4873) # Adjust to the size of your images
},
{ # layer01
"layer_name": "Body",
"filenames": {
"JEFF": "01-base.png"
},
"weights": [
100
]
},
{ # layer02
"layer_name": "Top",
"filenames": {
"Purple Bra": "05-shirt.png",
"Green Bra": "06-shirt.png",
"Peach Bra": "07-shirt.png",
"Yellow Bra": "08-shirt.png",
"Red Bra": "09-shirt.png",
"Pink Bra": "10-shirt.png",
"Pink Shirt": "11-shirt.png",
"Green Shirt": "12-shirt.png",
"Blue Shirt": "13-shirt.png",
"Purple Shirt": "14-shirt.png",
"Orange Shirt": "15-shirt.png"
},
"weights": [
1,
2,
4,
3,
2,
2,
4,
3,
1,
1,
2
]
},
{ # layer03
"layer_name": "Pants",
"filenames": {
"Blue Swimpants": "swimpants/01-swimpant.png",
"Green Speedo": "swimpants/02-swimpant.png",
"Pink Speedo": "swimpants/03-swimpant.png",
"Orange Speedo": "swimpants/04-swimpant.png",
"Red Speedo": "swimpants/05-swimpant.png",
"Blue Speedo": "swimpants/06-swimpant.png",
"Green Swimpants": "swimpants/07-swimpant.png",
"Yellow Swimpants": "swimpants/08-swimpant.png",
"Orange Swimpants": "swimpants/09-swimpant.png",
"Red Swimpants": "swimpants/10-swimpant.png",
"Hula Skirt 01": "hula-skirt/01-skirt.png",
"Hula Skirt 02": "hula-skirt/02-skirt.png",
"Hula Skirt 03": "hula-skirt/03-skirt.png",
"Hula Skirt 04": "hula-skirt/04-skirt.png",
"Hula Skirt 05": "hula-skirt/05-skirt.png",
"Hula Skirt 06": "hula-skirt/06-skirt.png",
"Hula Skirt 07": "hula-skirt/07-skirt.png",
"Hula Skirt 08": "hula-skirt/08-skirt.png",
"Hula Skirt 09": "hula-skirt/09-skirt.png",
"Hula Skirt 10": "hula-skirt/10-skirt.png",
"Hula Skirt 11": "hula-skirt/11-skirt.png",
"Hula Skirt 12": "hula-skirt/12-skirt.png",
"Hula Skirt 13": "hula-skirt/13-skirt.png",
"Hula Skirt 14": "hula-skirt/14-skirt.png",
"Hula Skirt 15": "hula-skirt/15-skirt.png",
"Hula Skirt 16": "hula-skirt/16-skirt.png",
"Green Pants": "pants/01-pants.png",
"Teal Pants": "pants/02-pants.png",
"Purple Pants": "pants/03-pants.png",
"Red Pants": "pants/04-pants.png",
"Yellow Pants": "pants/05-pants.png",
"Orange Pants": "pants/06-pants.png",
"Blue Pants": "pants/07-pants.png"
},
"weights": [
25,
15,
15,
15,
15,
15,
25,
25,
25,
25,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
40,
40,
40,
40,
40,
40,
40
]
},
{ # layer04
"layer_name": "Belt",
"filenames": {
"Black Belt": "01-belt.png",
"Purple Belt": "02-belt.png",
"Red Belt": "03-belt.png",
"Green Belt": "04-belt.png",
"Yellow Belt": "05-belt.png",
"Purple Belt": "06-belt.png"
},
"weights": [
1,
2,
4,
3,
2,
2
]
}
]
def get_variation_cnt():
cnt = 1
for l in layers:
cnt *= len(l["weights"])
return cnt
from loopygen.
I am testing a fix for #25 and noticed that even when I take out layer00 (Background Color), the weights still seem to be mismatched if I have layer04 in there. So it doesn't seem to have anything to do with the actual amount of layers. Still thinking there's an issue I am overlooking in my layer04 syntax, though.
from loopygen.
Dictionary keys need to be unique. You have 2 "Purple belts" in your layer04 definition
"filenames": {
"Black Belt": "01-belt.png",
"Purple Belt": "02-belt.png",
"Red Belt": "03-belt.png",
"Green Belt": "04-belt.png",
"Yellow Belt": "05-belt.png",
"Purple Belt": "06-belt.png"
},
from loopygen.
Some times a second pair of eyes is all you need, closing
from loopygen.
Related Issues (20)
- companion: Add a "Open collections folder" button
- php: simplify maintenance for traits setup/edit pages
- Batch Mint folder of already uploaded metadata
- If a whole layer is skipped, it should still be added to the metadata
- Animated PNG
- generate: choose correct framerate for GIF compositing
- Is minting with hashlips build folder assets possible?
- [UI] Prevent creation of collection with duplicate layer names or variation names
- [transfer][mint] Add "waiting for gas to drop" feature when minting or transferring
- [transfer] Add optional quantity in wallets list for random mode
- [transfer] Optimize transfers by grouping by `to` address and `nftid`
- python: metadata generation fails without thumbnails
- ui: modal stays open when going back HOT 1
- Option to choose nftFactory address HOT 1
- Variation conditionals HOT 5
- Export Stats Button HOT 1
- MintTracker HOT 1
- Rarity Percentage doesn't handle float values
- ui: Fill variation name (if empty) with file name HOT 1
- python/ui: whole layer rarity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopygen.