mirror of
https://github.com/Relintai/material-maker.git
synced 2025-01-09 05:39:38 +01:00
Fixed tab labels not updating when a filename changes
This commit is contained in:
parent
64ebbe6434
commit
f1eb5a97e1
@ -1 +1 @@
|
||||
{"connections":[{"from":"Warp","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_0","to_port":2},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"Warp","from_port":0,"to":"blend_2","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_2","to_port":1},{"from":"blend_2","from_port":0,"to":"colorize_6","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_1","to_port":0},{"from":"Perlin","from_port":0,"to":"colorize_0","to_port":0},{"from":"perlin_0","from_port":0,"to":"Warp","to_port":1},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"blend_2","from_port":0,"to":"colorize_4","to_port":0},{"from":"voronoi_0","from_port":1,"to":"colorize_5","to_port":0},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"colorize_2","from_port":0,"to":"colorize_7","to_port":0},{"from":"colorize_7","from_port":0,"to":"Material","to_port":2},{"from":"Bricks","from_port":0,"to":"Warp","to_port":0},{"from":"Bricks","from_port":1,"to":"blend_1","to_port":1},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":0},{"from":"colorize_4","from_port":0,"to":"Material","to_port":5},{"from":"uniform_0","from_port":0,"to":"combine_0","to_port":0},{"from":"colorize_7","from_port":0,"to":"combine_0","to_port":1},{"from":"combine_0","from_port":0,"to":"export_0","to_port":0},{"from":"colorize_6","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4}],"nodes":[{"intensity":1,"name":"voronoi_0","node_position":{"x":-288,"y":-107},"scale_x":8,"scale_y":8,"type":"voronoi"},{"gradient":[{"b":0,"g":0,"pos":0.027273,"r":0},{"b":1,"g":1,"pos":0.1,"r":1}],"name":"colorize_5","node_position":{"x":-104,"y":-87},"type":"colorize"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":1,"r":1}],"name":"colorize_0","node_position":{"x":560.943665,"y":50},"type":"colorize"},{"iterations":4,"name":"perlin_0","node_position":{"x":97,"y":211},"persistence":0.75,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0.557292,"g":0.557292,"pos":0,"r":0.557292},{"b":0.180664,"g":0.22934,"pos":0.145455,"r":0.234375},{"b":0.585504,"g":0.672174,"pos":0.345455,"r":0.739583},{"b":0.144423,"g":0.184147,"pos":0.545455,"r":0.229167},{"b":0.447537,"g":0.553291,"pos":0.745455,"r":0.588542},{"b":0.199002,"g":0.342478,"pos":1,"r":0.682292}],"name":"colorize_1","node_position":{"x":393.943665,"y":-124},"type":"colorize"},{"amount":0.5,"blend_type":6,"name":"blend_1","node_position":{"x":293,"y":99},"type":"blend"},{"iterations":8,"name":"Perlin","node_position":{"x":74,"y":-255},"persistence":0.8,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":0.045455,"r":1}],"name":"colorize_2","node_position":{"x":535.943665,"y":163},"type":"colorize"},{"bevel":0.15,"columns":3,"mortar":0.05,"name":"Bricks","node_position":{"x":-94,"y":17},"pattern":0,"repeat":1,"row_offset":0.5,"rows":6,"type":"bricks"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_6","node_position":{"x":742,"y":216},"type":"colorize"},{"amount":0.5,"blend_type":0,"name":"blend_0","node_position":{"x":763.943726,"y":13},"type":"blend"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_0","node_position":{"x":931,"y":95},"type":"uniform"},{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":0.2,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":1161,"y":114},"normal_scale":1,"resolution":1,"roughness":1,"type":"material"},{"name":"combine_0","node_position":{"x":1119.687012,"y":-22.258774},"type":"combine"},{"name":"export_0","node_position":{"x":1268.687012,"y":7.741226},"resolution":1,"suffix":"mr","type":"export"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0.479167,"g":0.479167,"pos":0.136364,"r":0.479167}],"name":"colorize_7","node_position":{"x":915.356934,"y":149},"type":"colorize"},{"gradient":[{"b":0.770833,"g":0.770833,"pos":0,"r":0.770833},{"b":1,"g":1,"pos":0.463636,"r":1}],"name":"colorize_4","node_position":{"x":772,"y":288},"type":"colorize"},{"amount":0.5,"name":"normal_map_0","node_position":{"x":940.587036,"y":225.716217},"size":4,"type":"normal_map"},{"amount":0.1,"name":"Warp","node_position":{"x":384,"y":10.75},"type":"warp"},{"amount":0.5,"blend_type":0,"name":"blend_2","node_position":{"x":537,"y":264},"type":"blend"}]}
|
||||
{"connections":[{"from":"Warp","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_0","to_port":2},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"Warp","from_port":0,"to":"blend_2","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_2","to_port":1},{"from":"blend_2","from_port":0,"to":"colorize_6","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_1","to_port":0},{"from":"Perlin","from_port":0,"to":"colorize_0","to_port":0},{"from":"perlin_0","from_port":0,"to":"Warp","to_port":1},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"blend_2","from_port":0,"to":"colorize_4","to_port":0},{"from":"voronoi_0","from_port":1,"to":"colorize_5","to_port":0},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"colorize_2","from_port":0,"to":"colorize_7","to_port":0},{"from":"colorize_7","from_port":0,"to":"Material","to_port":2},{"from":"Bricks","from_port":0,"to":"Warp","to_port":0},{"from":"Bricks","from_port":1,"to":"blend_1","to_port":1},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":0},{"from":"colorize_4","from_port":0,"to":"Material","to_port":5},{"from":"uniform_0","from_port":0,"to":"combine_0","to_port":0},{"from":"colorize_7","from_port":0,"to":"combine_0","to_port":1},{"from":"combine_0","from_port":0,"to":"export_0","to_port":0},{"from":"colorize_6","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4}],"nodes":[{"intensity":1,"name":"voronoi_0","node_position":{"x":-288,"y":-107},"scale_x":8,"scale_y":8,"type":"voronoi"},{"gradient":[{"b":0,"g":0,"pos":0.027273,"r":0},{"b":1,"g":1,"pos":0.1,"r":1}],"name":"colorize_5","node_position":{"x":-104,"y":-87},"type":"colorize"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":1,"r":1}],"name":"colorize_0","node_position":{"x":560.943665,"y":50},"type":"colorize"},{"iterations":4,"name":"perlin_0","node_position":{"x":97,"y":211},"persistence":0.75,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0.557292,"g":0.557292,"pos":0,"r":0.557292},{"b":0.180664,"g":0.22934,"pos":0.145455,"r":0.234375},{"b":0.585504,"g":0.672174,"pos":0.345455,"r":0.739583},{"b":0.144423,"g":0.184147,"pos":0.545455,"r":0.229167},{"b":0.447537,"g":0.553291,"pos":0.745455,"r":0.588542},{"b":0.199002,"g":0.342478,"pos":1,"r":0.682292}],"name":"colorize_1","node_position":{"x":393.943665,"y":-124},"type":"colorize"},{"amount":0.5,"blend_type":6,"name":"blend_1","node_position":{"x":293,"y":99},"type":"blend"},{"iterations":8,"name":"Perlin","node_position":{"x":74,"y":-255},"persistence":0.8,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":0.045455,"r":1}],"name":"colorize_2","node_position":{"x":535.943665,"y":163},"type":"colorize"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_6","node_position":{"x":742,"y":216},"type":"colorize"},{"amount":0.5,"blend_type":0,"name":"blend_0","node_position":{"x":763.943726,"y":13},"type":"blend"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_0","node_position":{"x":931,"y":95},"type":"uniform"},{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":0.2,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":1161,"y":114},"normal_scale":1,"resolution":1,"roughness":1,"type":"material"},{"name":"combine_0","node_position":{"x":1119.687012,"y":-22.258774},"type":"combine"},{"name":"export_0","node_position":{"x":1268.687012,"y":7.741226},"resolution":1,"suffix":"mr","type":"export"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0.479167,"g":0.479167,"pos":0.136364,"r":0.479167}],"name":"colorize_7","node_position":{"x":915.356934,"y":149},"type":"colorize"},{"gradient":[{"b":0.770833,"g":0.770833,"pos":0,"r":0.770833},{"b":1,"g":1,"pos":0.454545,"r":1}],"name":"colorize_4","node_position":{"x":772,"y":288},"type":"colorize"},{"amount":0.5,"name":"normal_map_0","node_position":{"x":940.587036,"y":225.716217},"size":4,"type":"normal_map"},{"amount":0.1,"name":"Warp","node_position":{"x":384,"y":10.75},"type":"warp"},{"amount":0.5,"blend_type":0,"name":"blend_2","node_position":{"x":537,"y":264},"type":"blend"},{"bevel":0.15,"columns":3,"mortar":0.05,"name":"Bricks","node_position":{"x":-56,"y":-6},"pattern":0,"repeat":1,"row_offset":0.5,"rows":6,"type":"bricks"}]}
|
@ -74,8 +74,8 @@ func update_tab_title():
|
||||
title = save_path.right(save_path.rfind("/")+1)
|
||||
if need_save:
|
||||
title += " *"
|
||||
get_parent().set_tab_title(get_index(), title)
|
||||
get_parent().update()
|
||||
if get_parent().has_method("set_tab_title"):
|
||||
get_parent().set_tab_title(get_index(), title)
|
||||
|
||||
func set_need_save(ns):
|
||||
if ns != need_save:
|
||||
@ -83,12 +83,11 @@ func set_need_save(ns):
|
||||
update_tab_title()
|
||||
|
||||
func set_save_path(path):
|
||||
print("Setting save path to "+path+" (was "+str(save_path)+")")
|
||||
if path != save_path:
|
||||
save_path = path
|
||||
if get_parent() is TabContainer:
|
||||
update_tab_title()
|
||||
else:
|
||||
emit_signal("save_path_changed", self, path)
|
||||
update_tab_title()
|
||||
emit_signal("save_path_changed", self, path)
|
||||
|
||||
func clear_material():
|
||||
clear_connections()
|
||||
|
@ -15,7 +15,7 @@ run/main_scene="res://addons/procedural_material/main_window.tscn"
|
||||
config/use_custom_user_dir=true
|
||||
config/custom_user_dir_name="material_maker"
|
||||
config/icon="res://icon.png"
|
||||
config/release="0.3p1"
|
||||
config/release="0.4"
|
||||
|
||||
[display]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user