Nodes/Avatar Graph/ENUM (Blender)
ComfyUI Node

ENUM (Blender)

Feeding a dynamic string into any of this pack's enum fields

By avatechai·Created 3 years ago·Updated 2 years ago· 264
ENUM (Blender)
    • B_ENUM
    value

    A small utility node from Avatar Graph, avatech.ai's pack for rigging character art into interactive avatars inside ComfyUI. It's a primitive: it takes a plain string and outputs it as a B_ENUM-typed value, so you can plug a dynamically produced string into any of this pack's blender-category nodes that normally expect an enum choice - things like a UV projection's direction, an object hierarchy walk's direction, a transform pivot's pivot, or an export node's model_type.

    Why you'd want this instead of just picking from the dropdown

    Most of the time, an enum field in this pack is a fixed dropdown and you just pick the value you want directly on that node - there's no reason to route through this node for a static choice. B_ENUM earns its place when the choice isn't static: when you want another part of the graph (a string coming out of some other node, or a value you're computing) to decide which enum option gets used at runtime, rather than hard-coding it. Blender's own enum properties are just named strings under the hood, which is exactly why this works - this node is a thin bridge letting a raw string masquerade as a typed enum value wherever this pack expects one.

    Inputs and outputs

    One required field: value, a plain single-line string with no default - you have to type something in, or feed it from an upstream string output. The output is a single B_ENUM socket, which you then wire into whatever enum-typed input elsewhere in the pack you're trying to drive dynamically.

    Because this node doesn't validate the string against any particular node's actual allowed choices - it can't, since it doesn't know which downstream node it'll be plugged into - the burden's on you to type (or generate) exactly the value that node expects. Get it wrong and the operator it feeds into typically just does nothing, the same silent-failure pattern you'll see across most of this pack's blender-category nodes.

    Installing it

    Search avatar-graph-comfyui in ComfyUI Manager, or install by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/avatechai/avatar-graph-comfyui
    cd avatar-graph-comfyui && python -m pip install -r requirements.txt
    

    This node itself is trivial, but it ships as part of a pack that's entirely built on bpy - Blender packaged as a pip module - and bpy only installs against Python 3.10.x. That's the real install requirement to plan around: a dedicated conda environment pinned to 3.10 on Mac/Linux, or the README's prebuilt Windows Python 3.10 ComfyUI zip, rather than your regular ComfyUI Python. Restart with --enable-cors-header afterward if you're using the pack's live avatar preview.

    Troubleshooting

    If whatever this feeds into doesn't behave the way you expect, the first thing to check is spelling and casing of the string you typed - Blender's enum identifiers are exact and case-sensitive (PARENT and parent are not the same thing to the underlying operator), and there's no dropdown here to catch a mistake before it runs. Beyond that, this is one of the more obscure corners of an already-niche pack - Avatar Graph had its visible moment back in October 2023 and has stayed quiet since, so there's essentially no community discussion of this specific node to reference; when in doubt, check what values the target node's own dropdown offers by temporarily wiring it without B_ENUM first, then match that exact string here.

    Categoryblender

    Inputs (1)

    NameTypeDefaultDescription
    valueSTRING

    Outputs (1)

    NameTypeDescription
    B_ENUMB_ENUM