mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-07 16:54:49 -04:00
The structure of the .pxo files is now consisted of a JSON-structured metadata part, where all the data that can be stored as text are, and a binary part, that contain all the actual image data for each cel and project brush. This makes it easier for users to understand the .pxo structure, easier to add more changes without having to check versions for backwards compatibility, easier to be opened by third-party apps and it allows us to make an "Export JSON metadata" option, that will export just the metadata in JSON format, without the binary image data. It's backwards compatible and .pxo files from as far as v0.5 are still supported.
19 lines
556 B
GDScript
19 lines
556 B
GDScript
class_name Layer extends Reference
|
|
# A class for layer properties.
|
|
|
|
|
|
var name := ""
|
|
var visible := true
|
|
var locked := false
|
|
var frame_container : HBoxContainer
|
|
var new_cels_linked := false
|
|
var linked_cels := [] # Array of Frames
|
|
|
|
|
|
func _init(_name := tr("Layer") + " 0", _visible := true, _locked := false, _frame_container := HBoxContainer.new(), _new_cels_linked := false, _linked_cels := []) -> void:
|
|
name = _name
|
|
visible = _visible
|
|
locked = _locked
|
|
frame_container = _frame_container
|
|
new_cels_linked = _new_cels_linked
|
|
linked_cels = _linked_cels
|