mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-04-16 05:26:03 +02:00
Only send events to the active MeshDataInstance gizmo from mdr ed's plugin.
This commit is contained in:
parent
1773be1b9b
commit
4ef0a39fa2
@ -92,40 +92,41 @@ func unregister_gizmo(gizmo):
|
|||||||
return
|
return
|
||||||
|
|
||||||
func set_translate(on : bool) -> void:
|
func set_translate(on : bool) -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_translate(on)
|
current_mesh_data_instance.gizmo.set_translate(on)
|
||||||
|
|
||||||
func set_scale(on : bool) -> void:
|
func set_scale(on : bool) -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_scale(on)
|
current_mesh_data_instance.gizmo.set_scale(on)
|
||||||
|
|
||||||
func set_rotate(on : bool) -> void:
|
func set_rotate(on : bool) -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_rotate(on)
|
current_mesh_data_instance.gizmo.set_rotate(on)
|
||||||
|
|
||||||
func set_axis_x(on : bool) -> void:
|
func set_axis_x(on : bool) -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_axis_x(on)
|
current_mesh_data_instance.gizmo.set_axis_x(on)
|
||||||
|
|
||||||
func set_axis_y(on : bool) -> void:
|
func set_axis_y(on : bool) -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_axis_y(on)
|
current_mesh_data_instance.gizmo.set_axis_y(on)
|
||||||
|
|
||||||
func set_axis_z(on : bool) -> void:
|
func set_axis_z(on : bool) -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_axis_z(on)
|
current_mesh_data_instance.gizmo.set_axis_z(on)
|
||||||
|
|
||||||
func set_selection_mode_vertex() -> void:
|
func set_selection_mode_vertex() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_selection_mode_vertex()
|
current_mesh_data_instance.gizmo.set_selection_mode_vertex()
|
||||||
|
|
||||||
|
|
||||||
func set_selection_mode_edge() -> void:
|
func set_selection_mode_edge() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_selection_mode_edge()
|
current_mesh_data_instance.gizmo.set_selection_mode_edge()
|
||||||
|
|
||||||
func set_selection_mode_face() -> void:
|
func set_selection_mode_face() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_selection_mode_face()
|
current_mesh_data_instance.gizmo.set_selection_mode_face()
|
||||||
|
|
||||||
func get_mdr() -> MeshDataResource:
|
func get_mdr() -> MeshDataResource:
|
||||||
if current_mesh_data_instance:
|
if current_mesh_data_instance:
|
||||||
@ -142,104 +143,110 @@ func get_mdr() -> MeshDataResource:
|
|||||||
# return false
|
# return false
|
||||||
|
|
||||||
func forward_spatial_gui_input(index, camera, event):
|
func forward_spatial_gui_input(index, camera, event):
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
if g.forward_spatial_gui_input(index, camera, event):
|
if current_mesh_data_instance.gizmo.forward_spatial_gui_input(index, camera, event):
|
||||||
return true
|
return true
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
func add_box() -> void:
|
func add_box() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.add_box()
|
current_mesh_data_instance.gizmo.add_box()
|
||||||
|
|
||||||
func add_triangle() -> void:
|
func add_triangle() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.add_triangle()
|
current_mesh_data_instance.gizmo.add_triangle()
|
||||||
|
|
||||||
func add_quad() -> void:
|
func add_quad() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.add_quad()
|
current_mesh_data_instance.gizmo.add_quad()
|
||||||
|
|
||||||
func add_triangle_at() -> void:
|
func add_triangle_at() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.add_triangle_at()
|
current_mesh_data_instance.gizmo.add_triangle_at()
|
||||||
|
|
||||||
func add_quad_at() -> void:
|
func add_quad_at() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.add_quad_at()
|
current_mesh_data_instance.gizmo.add_quad_at()
|
||||||
|
|
||||||
func split():
|
func split():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.split()
|
current_mesh_data_instance.gizmo.split()
|
||||||
|
|
||||||
func connect_action():
|
func connect_action():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.connect_action()
|
current_mesh_data_instance.gizmo.connect_action()
|
||||||
|
|
||||||
func disconnect_action():
|
func disconnect_action():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.disconnect_action()
|
current_mesh_data_instance.gizmo.disconnect_action()
|
||||||
|
|
||||||
func create_face():
|
func create_face():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.create_face()
|
current_mesh_data_instance.gizmo.create_face()
|
||||||
|
|
||||||
func delete_selected():
|
func delete_selected():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.delete_selected()
|
current_mesh_data_instance.gizmo.delete_selected()
|
||||||
|
|
||||||
func generate_normals():
|
func generate_normals():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.generate_normals()
|
current_mesh_data_instance.gizmo.generate_normals()
|
||||||
|
|
||||||
func remove_doubles():
|
func remove_doubles():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.remove_doubles()
|
current_mesh_data_instance.gizmo.remove_doubles()
|
||||||
|
|
||||||
func merge_optimize():
|
func merge_optimize():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.merge_optimize()
|
current_mesh_data_instance.gizmo.merge_optimize()
|
||||||
|
|
||||||
func generate_tangents():
|
func generate_tangents():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.generate_tangents()
|
current_mesh_data_instance.gizmo.generate_tangents()
|
||||||
|
|
||||||
func onnect_to_first_selected():
|
func onnect_to_first_selected():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.onnect_to_first_selected()
|
current_mesh_data_instance.gizmo.onnect_to_first_selected()
|
||||||
|
|
||||||
func connect_to_avg():
|
func connect_to_avg():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.connect_to_avg()
|
current_mesh_data_instance.gizmo.connect_to_avg()
|
||||||
|
|
||||||
func connect_to_last_selected():
|
func connect_to_last_selected():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.connect_to_last_selected()
|
current_mesh_data_instance.gizmo.connect_to_last_selected()
|
||||||
|
|
||||||
func mark_seam():
|
func mark_seam():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.mark_seam()
|
current_mesh_data_instance.gizmo.mark_seam()
|
||||||
|
|
||||||
func unmark_seam():
|
func unmark_seam():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.unmark_seam()
|
current_mesh_data_instance.gizmo.unmark_seam()
|
||||||
|
|
||||||
func apply_seam():
|
func apply_seam():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.apply_seam()
|
current_mesh_data_instance.gizmo.apply_seam()
|
||||||
|
|
||||||
func uv_unwrap() -> void:
|
func uv_unwrap() -> void:
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.uv_unwrap()
|
current_mesh_data_instance.gizmo.set_spivot_averaged()
|
||||||
|
|
||||||
func set_spivot_averaged():
|
func set_spivot_averaged():
|
||||||
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
|
current_mesh_data_instance.gizmo.set_selection_mode_face()
|
||||||
|
|
||||||
for g in active_gizmos:
|
for g in active_gizmos:
|
||||||
|
if g.active:
|
||||||
g.set_spivot_averaged()
|
g.set_spivot_averaged()
|
||||||
|
return
|
||||||
|
|
||||||
func set_pivot_mdi_origin():
|
func set_pivot_mdi_origin():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_pivot_mdi_origin()
|
current_mesh_data_instance.gizmo.set_pivot_mdi_origin()
|
||||||
|
|
||||||
func set_pivot_world_origin():
|
func set_pivot_world_origin():
|
||||||
for g in active_gizmos:
|
if current_mesh_data_instance && current_mesh_data_instance.gizmo:
|
||||||
g.set_pivot_world_origin()
|
current_mesh_data_instance.gizmo.set_pivot_world_origin()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user