mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-26 01:54:44 -04:00
Added option to affect all projects in the HSVDialog
HSVDialog should be ready now. These options will also appear in the rest of the image effects.
This commit is contained in:
parent
95ccd42e48
commit
2cb07fb848
4 changed files with 51 additions and 38 deletions
|
@ -45,17 +45,27 @@ func _on_Apply_pressed() -> void:
|
|||
Global.canvas.handle_undo("Draw")
|
||||
DrawingAlgos.adjust_hsv(current_cel, hue_slider.value, sat_slider.value, val_slider.value, pixels)
|
||||
Global.canvas.handle_redo("Draw")
|
||||
|
||||
elif affect == FRAME:
|
||||
Global.canvas.handle_undo("Draw", Global.current_project, -1)
|
||||
for cel in Global.current_project.frames[Global.current_project.current_frame].cels:
|
||||
DrawingAlgos.adjust_hsv(cel.image, hue_slider.value, sat_slider.value, val_slider.value, pixels)
|
||||
Global.canvas.handle_redo("Draw", Global.current_project, -1)
|
||||
|
||||
elif affect == ALL_FRAMES:
|
||||
Global.canvas.handle_undo("Draw", Global.current_project, -1, -1)
|
||||
for frame in Global.current_project.frames:
|
||||
for cel in frame.cels:
|
||||
DrawingAlgos.adjust_hsv(cel.image, hue_slider.value, sat_slider.value, val_slider.value, pixels)
|
||||
Global.canvas.handle_redo("Draw", Global.current_project, -1, -1)
|
||||
|
||||
elif affect == ALL_PROJECTS:
|
||||
for project in Global.projects:
|
||||
Global.canvas.handle_undo("Draw", project, -1, -1)
|
||||
for frame in project.frames:
|
||||
for cel in frame.cels:
|
||||
DrawingAlgos.adjust_hsv(cel.image, hue_slider.value, sat_slider.value, val_slider.value, pixels)
|
||||
Global.canvas.handle_redo("Draw", project, -1, -1)
|
||||
reset()
|
||||
visible = false
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ margin_right = 263.0
|
|||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Current cel"
|
||||
items = [ "Current cel", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, true, 3, null ]
|
||||
items = [ "Current cel", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
|
||||
selected = 0
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue