Skip to content

exporting data from pencil_2d (en)

nklbdev edited this page Aug 1, 2023 · 2 revisions

About importing data from Pencil2D

en ru

Logo

Pencil2D is a simple and very responsive animation editor. It is the easiest way to start creating your first cartoons or even game assets.

<p-align="center"> Logo

Pencil2D's problems

No way to specify multiple animations in Timeline window

To export a Pencil2D document as a series of animations, Godot's Import Options window has an option called "Pencil2D -> Animations Parameters" which is an array of strings.

Each row in the array represents an animation that will be exported from the document. Enter the following format strings into this array:

<animation_name> -f:<frames_count> [-d:<direction>] [-r:<repeat_count>]

Where:

  • frames_count - number of animation frames - integer greater than zero
  • repeat_count - the number of repetitions of the animation - if set to 0, the animation will loop indefinitely
  • direction - animation direction. Possible values:
    • f (forward) - forward
    • r (reverse) - back
    • pp (ping-pong) - forward and then back
    • ppr (ping-pong reverse) - first back and then forward

For example:

Idle -f:4 -r:0
Walk -f:8 -r:0
Jump -f:2 -r:1
Crouch -f:2 -r:1
Hurt -f:2 -r:1
Die -f:8 -r:1
Special -f:6 -d:pp -r:0

Inconvenient to specify frame range for playback

To do this, find and set the "Range" checkbox on the frame scale, and next to it in the numeric fields indicate the start and end frames of the cycle.

Camera Layers

They work very incomprehensibly. What is especially confusing is that the layer of the very first camera is scaled separately from the picture, and the rest of the camera layers are scaled along with the picture.

Clone this wiki locally