Studio Yotsuba
Back to Node List

Path Transform

path_transform

Move, scale, and rotate a bezier path

Reviewed
Guide available

Input Ports

NameTypeDescription
Path
path
Path
Required
Input bezier path

Output Ports

NameTypeDescription
Path
path
Path
Transformed path

Parameters

NameTypeDefaultRangeDescription / Options
Offset X
offset_x
Int
0-4096–4096

Horizontal offset in pixels

Offset Y
offset_y
Int
0-4096–4096

Vertical offset in pixels

Scale X
scale_x
Float
1-10–10 / step 0.01

Horizontal scale factor. Negative values mirror horizontally

Scale Y
scale_y
Float
1-10–10 / step 0.01

Vertical scale factor. Negative values mirror vertically

Skew X
skew_x
Float
0-85–85 / step 1

Horizontal shear angle in degrees, applied after scale and before rotation

Skew Y
skew_y
Float
0-85–85 / step 1

Vertical shear angle in degrees, applied after scale and before rotation

Rotation
rotation
Angle
0— / step 1

Rotation angle in degrees

Pivot
pivot_mode
Enum
Center—

Pivot used for scale and rotation

  • CenterCenter
    Use the center of the exact curve-extrema bounds
  • OriginOrigin
    Use the world origin (0,0)
  • CanvasCenterCanvasCenter
    Use the path canvas center when available
  • CustomCustom
    Use manually specified pivot coordinates
Pivot X
pivot_x
Float
0-4096–4096 / step 0.5

Custom pivot X coordinate

Pivot Y
pivot_y
Float
0-4096–4096 / step 0.5

Custom pivot Y coordinate

What is it for?

  • Move a shape path to another position
  • Reuse the same shape with rotation or scaling
  • Prepare a path before passing it to PathMask or Shape Sweep

Overview

Moves, scales, and rotates a path. Unlike image transform, it operates at the vector stage, so rotation and non-integer scaling do not degrade the shape. The right order is to adjust the shape before rasterizing with path_stroke/fill.

  • Version: 3

Usage tips

  • Rotating with this node while still a path produces cleaner lines than rasterizing first and applying pixel_rotate, because rasterization runs against the rotated shape.
  • The go-to animation chain is waveform-driven rotation or offset → rasterization → animation_render. Sword swings and pendulums retain vector quality.
  • pivot_mode is the most important setting for how rotation looks. For a pendulum, specify its support point with Custom.

Common pitfalls

  • Rotation sends the shape to an unexpected position: the pivot is not what you intended. Try Center first, then set the support explicitly with Custom.
  • A positive angle looks clockwise: image coordinates point downward on Y, so a positive rotation appears clockwise on screen.
  • Scaling moves the shape beyond the canvas: path coordinates are not constrained or clipped by the canvas. Expand the rasterization canvas or bring the path back with an offset.

Pivot meanings

Value Description
Center Use the bounds center computed from the actual Bézier curve extrema, not the control-point box
Origin Use the origin (0, 0)
CanvasCenter Use pixel-center coordinates ((width - 1) / 2, (height - 1) / 2); even dimensions place it between pixels
Custom Set it with pivot_x / pivot_y

Examples

  1. Shape.path -> Path Transform -> PathMask
    • Move the same shape to create a mask elsewhere.
  2. rotation = 45°
    • Turn a rectangular path into a diagonal band.
  3. scale_x = 2.0, scale_y = 0.5
    • Make the shape wide and short.
  4. pivot_mode = Origin
    • Rotate around the origin.

Related nodes

  • path_array — repeat placement while transforming
  • path_combine — merge multiple transformed paths
  • transform / pixel_rotate — transform at the image stage when a path is unavailable
  • path_sample / path_tangent — extract numeric position or direction along a path
Back to Node List