Yotsuba Games
Back to Node List

Variant Select

variant_select

Selects one variant record and exposes its snapshot and metadata

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
ใƒใƒชใ‚ขใƒณใƒˆไธ€่ฆง
variants
List<VariantRecord>
Required
้ธๆŠžๅ…ƒใฎ variant record ไธ€่ฆงใงใ™

Output Ports

NameTypeDescription
ใƒฌใ‚ณใƒผใƒ‰
record
VariantRecord
้ธใฐใ‚ŒใŸ variant record ใงใ™
ใ‚นใƒŠใƒƒใƒ—ใ‚ทใƒงใƒƒใƒˆ
snapshot
VariantSnapshot
้ธใฐใ‚ŒใŸ record ใฎ snapshot ใงใ™
ใƒฌใ‚ทใƒ”
recipe
VariantRecipe
้ธใฐใ‚ŒใŸ record ใซ recipe ใŒใ‚ใ‚Œใฐ่ฟ”ใ—ใพใ™
ๅ€คใƒžใƒƒใƒ—
values
Map
snapshot ใฎๅ€คใ‚’ๅฑ•้–‹ใ—ใŸใƒžใƒƒใƒ—ใงใ™
ๅๅ‰
name
Text
้ธใฐใ‚ŒใŸ record ใฎๅๅ‰ใงใ™
ใŠๆฐ—ใซๅ…ฅใ‚Š
favorite
Bool
้ธใฐใ‚ŒใŸ record ใŒ favorite ใ‹ใฉใ†ใ‹ใงใ™
ๅ€™่ฃœๆ•ฐ
count
Int
้ธๆŠžๅ…ƒใฎๅ€™่ฃœๆ•ฐใงใ™

Parameters

NameTypeDefaultRangeDescription / Options
ใ‚คใƒณใƒ‡ใƒƒใ‚ฏใ‚น
index
Int
00โ€“1024

้ธใถ variant ใฎ็•ชๅทใงใ™ใ€‚็ฏ„ๅ›ฒๅค–ใฎๅ€คใฏๅ…ˆ้ ญ/ๆœซๅฐพใซใ‚ฏใƒฉใƒณใƒ—ใ•ใ‚Œใพใ™

Overview

Selects one entry by index from a list of variant candidates. Its main job is to step through candidates from variant_range / seed_range with index and visually compare which value works best.

Usage tips

  • The basic comparison flow is variant_range โ†’ variant_select โ†’ variant_value_get โ†’ the node that consumes the typed value. Change index, then read the chosen snapshot key in the type required downstream.
  • The values output (Map) is convenient when you only need values. The node also outputs names and favorite state, supporting uses similar to a candidate-management UI.
  • To output every candidate at once, use batch_render. Variant Select is for inspecting candidates one at a time.

Related nodes

  • variant_range / seed_range โ€” generate candidates
  • batch_render โ€” output every candidate in a batch
  • variant_value_get โ€” extract a typed value from the selected snapshot or values Map
  • value_select โ€” simple N-way selection without variants
  • cartesian_product โ€” expand candidates along multiple axes

Read this first

  • VariantSelect selects only one candidate.
  • It does more than select one: importantly, it breaks the candidate into convenient outputs.

Understanding the outputs

Output Contents Use
record Complete saved form of the candidate Save in a UI or work with named entries
snapshot Lightweight key=value form Pass to BatchRender or another downstream node
values Map containing only the expanded snapshot values When you only need the values
name Candidate name List or label display
favorite Favorite state UI display or management
count Total number of candidates Index control or display

Start with this example

Suppose a preceding VariantRange creates candidates with these settings:

  • key = value
  • start = 0
  • end = 1
  • count = 5

The candidates are:

[0.0, 0.25, 0.5, 0.75, 1.0]

Setting VariantSelect.index = 2 selects the third candidate, 0.5.

record

{
  "version": 1,
  "id": "range:value:2",
  "name": "value=0.500",
  "favorite": false,
  "snapshot": {
    "version": 1,
    "values": { "value": 0.5 }
  },
  "recipe": {
    "version": 1,
    "kind": "range",
    "label": "value",
    "parameters": {
      "key": "value",
      "start": 0.0,
      "end": 1.0,
      "count": 5,
      "value_type": "Float"
    }
  },
  "note": null
}

snapshot

{
  "version": 1,
  "values": { "value": 0.5 }
}

values

{ "value": 0.5 }

name / favorite / count

name = "value=0.500"
favorite = false
count = 5

Common uses

  • Select one candidate created by VariantRange or SeedRange.
  • Move index to compare candidates.
  • Pass values downstream when you need only the values.

Notes

  • The Inspector automatically adjusts the maximum index to the number of input candidates.
  • For an empty list, the node returns only count=0 and does not send other outputs.
Back to Node List
Variant Select โ€” PixPipeline Node Reference