1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Fix top color picking (#854)

* fix tool

* fix default color picking
This commit is contained in:
Variable 2023-05-06 16:50:37 +05:00 committed by GitHub
parent 6dac85486a
commit d266c87269
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ func _pick_color(position: Vector2) -> void:
var curr_frame: Frame = project.frames[project.current_frame]
for layer in project.layers.size():
var idx = (project.layers.size() - 1) - layer
if project.layers[idx].can_layer_get_drawn():
if project.layers[idx].is_visible_in_hierarchy():
image = curr_frame.cels[idx].get_image()
image.lock()
color = image.get_pixelv(position)

View file

@ -690,7 +690,7 @@ func _pick_color(position: Vector2) -> void:
var curr_frame: Frame = project.frames[project.current_frame]
for layer in project.layers.size():
var idx = (project.layers.size() - 1) - layer
if project.layers[idx].can_layer_get_drawn():
if project.layers[idx].is_visible_in_hierarchy():
image = curr_frame.cels[idx].get_image()
image.lock()
color = image.get_pixelv(position)