mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix frame and layer clamping in ExtensionsAPI's get_cel_at()
This commit is contained in:
parent
e14a506d2c
commit
f70f3d3458
|
@ -430,8 +430,8 @@ class ProjectAPI:
|
|||
|
||||
func get_cel_at(project: Project, frame: int, layer: int) -> BaseCel:
|
||||
# frames from left to right, layers from bottom to top
|
||||
clamp(frame, 0, project.frames.size() - 1)
|
||||
clamp(layer, 0, project.layers.size() - 1)
|
||||
frame = clamp(frame, 0, project.frames.size() - 1)
|
||||
layer = clamp(layer, 0, project.layers.size() - 1)
|
||||
return project.frames[frame].cels[layer]
|
||||
|
||||
func set_pixelcel_image(image: Image, frame: int, layer: int) -> void:
|
||||
|
|
Loading…
Reference in a new issue