mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-01-22 02:17:18 +01:00
Reset selection after appending triangles or quads. Also don't rely on the changed event during these methods.
This commit is contained in:
parent
c3c35c7e37
commit
def030986a
@ -575,8 +575,14 @@ func add_triangle_at() -> void:
|
||||
#todo
|
||||
pass
|
||||
elif selection_mode == SelectionMode.SELECTION_MODE_EDGE:
|
||||
_mdr.disconnect("changed", self, "on_mdr_changed")
|
||||
|
||||
for sp in _selected_points:
|
||||
add_triangle_to_edge(sp)
|
||||
|
||||
_selected_points.resize(0)
|
||||
_mdr.connect("changed", self, "on_mdr_changed")
|
||||
on_mdr_changed()
|
||||
else:
|
||||
add_triangle()
|
||||
|
||||
@ -588,8 +594,14 @@ func add_quad_at() -> void:
|
||||
#todo
|
||||
pass
|
||||
elif selection_mode == SelectionMode.SELECTION_MODE_EDGE:
|
||||
_mdr.disconnect("changed", self, "on_mdr_changed")
|
||||
|
||||
for sp in _selected_points:
|
||||
add_quad_to_edge(sp)
|
||||
|
||||
_selected_points.resize(0)
|
||||
_mdr.connect("changed", self, "on_mdr_changed")
|
||||
on_mdr_changed()
|
||||
else:
|
||||
add_triangle()
|
||||
|
||||
@ -611,6 +623,7 @@ func create_face():
|
||||
return
|
||||
|
||||
if selection_mode == SelectionMode.SELECTION_MODE_VERTEX:
|
||||
_mdr.disconnect("changed", self, "on_mdr_changed")
|
||||
|
||||
var points : PoolVector3Array = PoolVector3Array()
|
||||
|
||||
@ -618,7 +631,10 @@ func create_face():
|
||||
points.push_back(_handle_points[sp])
|
||||
|
||||
MDRMeshUtils.add_triangulated_mesh_from_points(_mdr, points, _last_known_camera_facing)
|
||||
|
||||
|
||||
_selected_points.resize(0)
|
||||
_mdr.connect("changed", self, "on_mdr_changed")
|
||||
on_mdr_changed()
|
||||
elif selection_mode == SelectionMode.SELECTION_MODE_EDGE:
|
||||
pass
|
||||
elif selection_mode == SelectionMode.SELECTION_MODE_FACE:
|
||||
|
Loading…
Reference in New Issue
Block a user