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

Fix errors when attempting to draw on a 3D cel

Can occur when multiple cels are selected, some of them 3D and some of them pixel
This commit is contained in:
Emmanouil Papadeas 2023-03-29 00:07:33 +03:00
parent 85be0be2b5
commit c2f6bf0f3f
2 changed files with 4 additions and 4 deletions

View file

@ -260,7 +260,8 @@ func _get_selected_draw_images() -> Array: # Array of Images
var project: Project = Global.current_project
for cel_index in project.selected_cels:
var cel: BaseCel = project.frames[cel_index[0]].cels[cel_index[1]]
if project.layers[cel_index[1]].can_layer_get_drawn():
if not cel is PixelCel:
continue
images.append(cel.get_image())
return images

View file

@ -653,7 +653,6 @@ func _get_selected_draw_images() -> Array: # Array of Image(s)
var cel: BaseCel = project.frames[cel_index[0]].cels[cel_index[1]]
if not cel is PixelCel:
continue
if project.layers[cel_index[1]].can_layer_get_drawn():
images.append(cel.image)
return images