@@ -7,7 +7,8 @@ const PREVIEW_SIZES : Array[int] = [ 0, 64, 128, 192]
7
7
func _ready () -> void :
8
8
super ._ready ()
9
9
close_button .visible = false
10
- set_theme_type ("Reroute" )
10
+ theme_type_variation = "MM_Reroute"
11
+ # set_theme_type("Reroute")
11
12
on_connections_changed .call_deferred ()
12
13
13
14
func set_generator (g : MMGenBase ) -> void :
@@ -16,12 +17,13 @@ func set_generator(g : MMGenBase) -> void:
16
17
await set_preview (g .get_parameter ("preview" ))
17
18
update_node ()
18
19
19
- func set_theme_type (type : StringName ):
20
- var current_theme : Theme = mm_globals .main_window .theme
21
- for constant in current_theme .get_constant_list (type ):
22
- add_theme_constant_override (constant , current_theme .get_constant (constant , type ))
23
- for stylebox in current_theme .get_stylebox_list (type ):
24
- add_theme_stylebox_override (stylebox , current_theme .get_stylebox (stylebox , type ))
20
+
21
+ # func set_theme_type(type : StringName):
22
+ # var current_theme : Theme = mm_globals.main_window.theme
23
+ # for constant in current_theme.get_constant_list(type):
24
+ # add_theme_constant_override(constant, current_theme.get_constant(constant, type))
25
+ # for stylebox in current_theme.get_stylebox_list(type):
26
+ # add_theme_stylebox_override(stylebox, current_theme.get_stylebox(stylebox, type))
25
27
26
28
func on_connections_changed ():
27
29
var graph_edit = get_parent ()
@@ -95,7 +97,8 @@ func set_preview(v : int):
95
97
if v == 0 :
96
98
if preview :
97
99
preview .queue_free ()
98
- set_theme_type ("Reroute" )
100
+ theme_type_variation = "MM_Reroute"
101
+ # set_theme_type("Reroute")
99
102
else :
100
103
if ! preview :
101
104
preview = preload ("res://material_maker/panels/preview_2d/preview_2d_node.tscn" ).instantiate ()
@@ -104,6 +107,7 @@ func set_preview(v : int):
104
107
update_preview (preview )
105
108
var preview_size : int = PREVIEW_SIZES [v ]
106
109
preview .custom_minimum_size = Vector2 (preview_size , preview_size )
107
- set_theme_type ("ReroutePreview" )
110
+ # set_theme_type("ReroutePreview")
111
+ theme_type_variation = "MM_ReroutePreview"
108
112
await get_tree ().process_frame
109
113
size = Vector2 (0 , 0 )
0 commit comments