mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-21 21:13:14 +00:00
Add serialize()
to AnimationTag
This commit is contained in:
parent
acce1dda2e
commit
54142eb048
2 changed files with 5 additions and 13 deletions
|
@ -59,6 +59,10 @@ func _init(_name: String, _color: Color, _from: int, _to: int) -> void:
|
||||||
to = _to
|
to = _to
|
||||||
|
|
||||||
|
|
||||||
|
func serialize() -> Dictionary:
|
||||||
|
return {"name": name, "color": color.to_html(), "from": from, "to": to}
|
||||||
|
|
||||||
|
|
||||||
func get_size() -> int:
|
func get_size() -> int:
|
||||||
return to - from + 1
|
return to - from + 1
|
||||||
|
|
||||||
|
|
|
@ -211,21 +211,9 @@ func serialize() -> Dictionary:
|
||||||
for layer in layers:
|
for layer in layers:
|
||||||
layer_data.append(layer.serialize())
|
layer_data.append(layer.serialize())
|
||||||
layer_data[-1]["metadata"] = _serialize_metadata(layer)
|
layer_data[-1]["metadata"] = _serialize_metadata(layer)
|
||||||
|
|
||||||
var tag_data := []
|
var tag_data := []
|
||||||
for tag in animation_tags:
|
for tag in animation_tags:
|
||||||
(
|
tag_data.append(tag.serialize())
|
||||||
tag_data
|
|
||||||
. append(
|
|
||||||
{
|
|
||||||
"name": tag.name,
|
|
||||||
"color": tag.color.to_html(),
|
|
||||||
"from": tag.from,
|
|
||||||
"to": tag.to,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
var guide_data := []
|
var guide_data := []
|
||||||
for guide in guides:
|
for guide in guides:
|
||||||
if guide is SymmetryGuide:
|
if guide is SymmetryGuide:
|
||||||
|
|
Loading…
Add table
Reference in a new issue