mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-23 14:03:13 +00:00
Fix crash when using the 3D shape edit tool on a group layer
This commit is contained in:
parent
692aa8dc1f
commit
7630dd8716
1 changed files with 8 additions and 0 deletions
|
@ -103,6 +103,8 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func draw_start(position: Vector2) -> void:
|
||||
if not Global.current_project.get_current_cel() is Cel3D:
|
||||
return
|
||||
if not cel.layer.can_layer_get_drawn():
|
||||
return
|
||||
var found_cel := false
|
||||
|
@ -128,6 +130,8 @@ func draw_start(position: Vector2) -> void:
|
|||
|
||||
|
||||
func draw_move(position: Vector2) -> void:
|
||||
if not Global.current_project.get_current_cel() is Cel3D:
|
||||
return
|
||||
var camera: Camera = cel.camera
|
||||
if _dragging:
|
||||
_has_been_dragged = true
|
||||
|
@ -138,6 +142,8 @@ func draw_move(position: Vector2) -> void:
|
|||
|
||||
|
||||
func draw_end(_position: Vector2) -> void:
|
||||
if not Global.current_project.get_current_cel() is Cel3D:
|
||||
return
|
||||
_dragging = false
|
||||
if is_instance_valid(cel.selected) and _has_been_dragged:
|
||||
cel.selected.finish_changing_property()
|
||||
|
@ -146,6 +152,8 @@ func draw_end(_position: Vector2) -> void:
|
|||
|
||||
func cursor_move(position: Vector2) -> void:
|
||||
.cursor_move(position)
|
||||
if not Global.current_project.get_current_cel() is Cel3D:
|
||||
return
|
||||
# Hover logic
|
||||
var camera: Camera = cel.camera
|
||||
var ray_from := camera.project_ray_origin(position)
|
||||
|
|
Loading…
Add table
Reference in a new issue