Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update opacity across selected frames #865

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/UI/Timeline/AnimationTimeline.gd
Expand Up @@ -867,10 +867,15 @@ func _on_MergeDownLayer_pressed() -> void:
project.undo_redo.commit_action()


func _on_OpacitySlider_value_changed(value) -> void:
var current_frame: Frame = Global.current_project.frames[Global.current_project.current_frame]
var cel: BaseCel = current_frame.cels[Global.current_project.current_layer]
cel.opacity = value / 100
func _on_OpacitySlider_value_changed(value: float) -> void:
var new_opacity := value / 100
var current_layer_idx := Global.current_project.current_layer
# Also update all selected frames.
for idx_pair in Global.current_project.selected_cels:
if idx_pair[1] == current_layer_idx:
var frame: Frame = Global.current_project.frames[idx_pair[0]]
var cel: BaseCel = frame.cels[current_layer_idx]
cel.opacity = new_opacity
Global.canvas.update()


Expand Down