Correctly pass size when exporting textures

This commit is contained in:
Rodolphe Suescun 2018-08-23 17:01:24 +02:00
parent 22e87276ff
commit 7e92831226
3 changed files with 4 additions and 4 deletions

View File

@ -196,7 +196,7 @@ func export_textures(size = 512):
var prefix = save_path.left(save_path.rfind("."))
for c in get_children():
if c is GraphNode && c.has_method("export_textures"):
c.export_textures(prefix)
c.export_textures(prefix, size)
# Cut / copy / paste

View File

@ -112,7 +112,7 @@ func close_material():
func export_material():
var graph_edit = $VBoxContainer/HBoxContainer/Projects.get_current_tab_control()
if graph_edit != null:
graph_edit.export_textures(2048)
graph_edit.export_textures(256)
func quit():
if Engine.editor_hint:

View File

@ -97,6 +97,6 @@ func do_update_materials(material_list):
else:
m.depth_enabled = false
func export_textures(prefix):
func export_textures(prefix, size = 1024):
for t in TEXTURE_LIST:
get_parent().export_texture(get_source(t.port), "%s_%s.png" % [ prefix, t.texture ], 1024)
get_parent().export_texture(get_source(t.port), "%s_%s.png" % [ prefix, t.texture ], size)