Frame properties (#357)

* Sync for my local files to my repository

* This is frame properties update, it works but I can't be stored while
saving or loading and that makes crashes just the beggining :)

* I forgot this files :P

* Frame Properties update.

* Updating frame properties

* Update Translations.pot

* Changes to CanvasPreview and CelButton change
This commit is contained in:
PinyaColada 2020-10-19 16:57:40 +02:00 committed by GitHub
parent f5cf3f3ca7
commit 852365c38f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 183 additions and 20 deletions

View file

@ -213,16 +213,16 @@ func export_gif(args: Dictionary) -> void:
match direction:
AnimationDirection.FORWARD:
for i in range(processed_images.size()):
write_frame_to_gif(processed_images[i], Global.animation_timer.wait_time, exporter, args["export_dialog"])
write_frame_to_gif(processed_images[i], Global.current_project.frame_duration[i] * (1 / Global.animation_timeline.fps), exporter, args["export_dialog"])
AnimationDirection.BACKWARDS:
for i in range(processed_images.size() - 1, -1, -1):
write_frame_to_gif(processed_images[i], Global.animation_timer.wait_time, exporter, args["export_dialog"])
write_frame_to_gif(processed_images[i], Global.current_project.frame_duration[i] * (1 / Global.animation_timeline.fps), exporter, args["export_dialog"])
AnimationDirection.PING_PONG:
export_progress_fraction = 100 / (processed_images.size() * 2)
for i in range(0, processed_images.size()):
write_frame_to_gif(processed_images[i], Global.animation_timer.wait_time, exporter, args["export_dialog"])
write_frame_to_gif(processed_images[i], Global.current_project.frame_duration[i] * (1 / Global.animation_timeline.fps), exporter, args["export_dialog"])
for i in range(processed_images.size() - 2, 0, -1):
write_frame_to_gif(processed_images[i], Global.animation_timer.wait_time, exporter, args["export_dialog"])
write_frame_to_gif(processed_images[i], Global.current_project.frame_duration[i] * (1 / Global.animation_timeline.fps), exporter, args["export_dialog"])
if OS.get_name() == "HTML5":
Html5FileExchange.save_gif(exporter.export_file_data(), args["export_paths"][0])

View file

@ -127,6 +127,7 @@ var patterns_popup : Popup
var animation_timeline : Panel
var animation_timer : Timer
var frame_properties : ConfirmationDialog
var frame_ids : HBoxContainer
var current_frame_mark_label : Label
var onion_skinning_button : BaseButton
@ -221,6 +222,7 @@ func _ready() -> void:
patterns_popup = find_node_by_name(root, "PatternsPopup")
animation_timeline = find_node_by_name(root, "AnimationTimeline")
frame_properties = find_node_by_name(root, "FrameProperties")
layers_container = find_node_by_name(animation_timeline, "LayersContainer")
frames_container = find_node_by_name(animation_timeline, "FramesContainer")