FEDictUnpacker
Pull named fields out of a dictionary
- input_dict
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
- field
FEDictUnpacker does for dictionaries what FEDataUnpacker does for lists: one dict in, and each field you name comes out on its own output socket. You tell it which keys you want with a comma-separated string - a,b by default - and the node hands you input_dict["a"] on one output, input_dict["b"] on another.
It's the natural consumption side of the pack's dict machinery. FEDictPacker builds a named dict, FEDictCombine merges dicts, FEAnyToDict wraps values into dicts - and when you finally need the values back out as separate wires, this is the exit. Type a field name, get a value. You don't have to name all the dict's keys, only the ones you want; the outputs are dynamic, trimmed to what you've connected, so you see exactly the fields you asked for.
The inputs
- input_dict -
*-typed, the dictionary to read from. - out_field - the comma-separated key names, default
"a,b".
Outputs are named field, type *, one per key in out_field, in the order you listed them. Wire each to its consumer.
The gotchas are the same family as the rest of the pack but worth stating plainly:
- Keys must exist. The code does
input_dict.get(key)- a missing key gives youNoneon the wire, silently. If a field name is typo'd or the upstream dict didn't set it, you get a null flowing into a node that then throws somewhere else. There's no error here, and that's the trap. - Spacing matters.
a, byields a key of" b"because it splits on commas without trimming. Writea,b. *-type flexibility cuts both ways. It'll accept anything asinput_dict; if what arrives isn't actually a dict,getfails loudly at execution time.
The pairing with FEDictPacker is the headline use: pack data in one place, ship it around as a single wire, unpack it where it's needed. It keeps the graph from becoming a spaghetti of parallel wires, which is worth a lot in a big workflow. Just remember that named access is only as reliable as the upstream keys - verify the field names match exactly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input_dict | * | — | |
| out_field | STRING | a,b | — |
Outputs (32)
| Name | Type | Description |
|---|---|---|
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |
| field | * | — |