Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions material_maker/panels/graph_edit/graph_edit.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
extends GraphEdit
class_name MMGraphEdit

const ZOOM_MIN := 0.05
const ZOOM_MAX := 4.0

class Preview:
var generator
Expand Down Expand Up @@ -54,6 +56,8 @@ signal preview_changed

func _ready() -> void:
OS.low_processor_usage_mode = true
zoom_min = ZOOM_MIN
zoom_max = ZOOM_MAX
center_view()
for t in range(41):
add_valid_connection_type(t, 42)
Expand Down
2 changes: 1 addition & 1 deletion material_maker/panels/graph_edit/graph_zoom_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func _on_zoom_reset_pressed() -> void:


func update_zoom() -> void:
zoom_level = clamp(zoom_level, 0.25, 2)
zoom_level = clamp(zoom_level, MMGraphEdit.ZOOM_MIN, MMGraphEdit.ZOOM_MAX)
%ZoomLabel.text = str(zoom_level*100).pad_decimals(0)+"%"
var graph_edit : GraphEdit = mm_globals.main_window.get_current_graph_edit()
if graph_edit:
Expand Down