- feat(conversion): 新增 Any to Any 通配透传节点 - feat(int): 新增 Int Mask/Audio/Text Count,并统一计数共享层 - feat(logic): Multi Switch Select 支持 a/all 全选 - feat(io): Load PS 预览默认开启并抑制 psd_tools INFO 噪音;Save Audio 默认 mp3,播放器兼容 Nodes 2.0 - fix(multi): Multi String Join 的 string_1 改为纯插槽,修复动态端口错位 - refactor(shared): 复用 parse_pad_color / pad_to_rgb - docs: 同步中英文节点文档、README 列表与 v4.1.0 日志 - test: 新增/更新相关回归测试
1.8 KiB
1.8 KiB
Int Text Count - Count non-empty text-like inputs
Node Purpose: Int Text Count counts non-empty STRING / INT / FLOAT inputs from dynamic wildcard text_1..text_N ports. Emptiness follows Any Empty Bool: blank strings, 0 / 0.0, and False are ignored; True counts as one. Other value types (images, masks, audio, dictionaries, …) are not counted.
Inputs
| Name | Port | Type | Default | Range | Description |
|---|---|---|---|---|---|
text_1 |
optional | ANY (*) |
- | - | First text-like input; the frontend dynamically appends text_2..text_N as connections are made. |
Outputs
| Name | Type | Description |
|---|---|---|
int |
INT | Number of non-empty text-like inputs. |
Features
- Dynamic inputs: connecting the last
text_Xport automatically appends the next text port. - Wildcard ports: connect STRING, INT, or FLOAT (BOOLEAN is treated as an integer) to the same socket family.
- Emptiness follows
Any Empty Bool:"", whitespace-only strings,0,0.0, andFalseare empty. - List-aware: a string list (OUTPUT_IS_LIST, e.g. from
List Custom String) contributes one count per non-empty element. - Single pass: list inputs are counted inside one execution instead of mapping the node per item.
Typical Usage
- Optional text count: count how many reference texts or numeric parameters were actually supplied.
- Dynamic parameters: drive downstream integer controls from the number of non-empty text inputs.
Notes & Tips
- Because
0counts as empty, a numeric zero is treated as "not provided". UseAny Empty Intif a different mapping is needed. - Non-text values are ignored rather than raising an error, so a stray IMAGE/MASK connection simply does not contribute.
- The node does not measure character length or line count; it counts inputs.