mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Correctly pass size when exporting textures
This commit is contained in:
parent
22e87276ff
commit
7e92831226
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user