Nodes/ComfyUI-3D-MeshTool/array1 number to angle
ComfyUI Node

array1 number to angle

Turn raw numbers into camera-ready degrees

By 807502278·Created 2 years ago·Updated 2 years ago· 23
array1 number to angle
  • array
  • array_angle
half_angletrue

Angles are the currency of camera work, and they come in two flavors: 0–360 or −180 to 180. array1 number to angle exists to convert your raw numbers into proper degree values and to pick which flavor you want - with a one-click toggle. If you're feeding elevations or azimuths into a camera-pose generator, this is the node that makes sure a "350°" means the same thing as a "−10°" to whatever consumes it.

The inputs are array (a LIST) and half_angle, a boolean that defaults to true and is labeled 180° / 360°. The math is simple and worth internalizing. First the node does value % 360, wrapping everything into 0–360. Then, if half_angle is on (the 180° mode), any value above 180 gets shifted down by 360: 350 becomes −10, 270 becomes −90. So you get values in the symmetric −180..180 range, which is what most 3D renderers and camera conventions want - "half angle" meaning half the full circle on each side of zero. With half_angle off (360° mode), values just stay wrapped in 0–360.

The single output is array_angle (a LIST), with every element converted. Because the conversion is element-wise via numpy, it works on nested lists too, not just flat ones - handy when your pose data is already 2D.

The practical use is obvious once you see it: you generate a sweep with array1 end increment (say 0 to 350 in 10s), run it through here with half_angle on, and you get −180..180 values that won't confuse camera interpolation at the 359/0 seam. That's the real value - not the arithmetic, which you could do yourself, but making sure angles stay consistent where the wrap-around would normally bite you.

This lives in 807502278/ComfyUI-3D-MeshTool, a one-developer 3D utility pack. Pure Python, no models. Install via ComfyUI Manager (search "ComfyUI-3D-MeshTool") and restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-3D-MeshTool
cd ComfyUI-3D-MeshTool
pip install -r requirements.txt

Usual pack quirk: renamed nodes go red on old workflows - recreate and reconnect. And when your render's camera does a weird flip at the seam, this node with 180° on is usually the cure.

Category3D_MeshTool/Array/list_edit

Inputs (2)

NameTypeDefaultDescription
arrayLIST
half_angleBOOLEANtrue

Outputs (1)

NameTypeDescription
array_angleLIST