1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Add serialize() to AnimationTag

This commit is contained in:
Emmanouil Papadeas 2024-03-23 02:17:55 +02:00
parent acce1dda2e
commit 54142eb048
2 changed files with 5 additions and 13 deletions

View file

@ -59,6 +59,10 @@ func _init(_name: String, _color: Color, _from: int, _to: int) -> void:
to = _to
func serialize() -> Dictionary:
return {"name": name, "color": color.to_html(), "from": from, "to": to}
func get_size() -> int:
return to - from + 1

View file

@ -211,21 +211,9 @@ func serialize() -> Dictionary:
for layer in layers:
layer_data.append(layer.serialize())
layer_data[-1]["metadata"] = _serialize_metadata(layer)
var tag_data := []
for tag in animation_tags:
(
tag_data
. append(
{
"name": tag.name,
"color": tag.color.to_html(),
"from": tag.from,
"to": tag.to,
}
)
)
tag_data.append(tag.serialize())
var guide_data := []
for guide in guides:
if guide is SymmetryGuide: