1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Make "similar colors" mode in the Bucket tool change the same color in all selected cels

This commit is contained in:
Emmanouil Papadeas 2024-06-30 13:27:15 +03:00
parent 7a13e4c3eb
commit 896d714a9e

View file

@ -180,11 +180,11 @@ func draw_end(pos: Vector2i) -> void:
func fill_in_color(pos: Vector2i) -> void: func fill_in_color(pos: Vector2i) -> void:
var project := Global.current_project var project := Global.current_project
var color := project.get_current_cel().get_image().get_pixelv(pos)
var images := _get_selected_draw_images() var images := _get_selected_draw_images()
for image in images: for image in images:
if Tools.check_alpha_lock(image, pos): if Tools.check_alpha_lock(image, pos):
continue continue
var color: Color = image.get_pixelv(pos)
var pattern_image: Image var pattern_image: Image
if _fill_with == FillWith.COLOR or _pattern == null: if _fill_with == FillWith.COLOR or _pattern == null:
if tool_slot.color.is_equal_approx(color): if tool_slot.color.is_equal_approx(color):