Print 3D utils: make default exported file name translatable

Following up to D15868, use the translation of the already extracted
message "untitled" as the name of the exported STL file.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D15960
This commit is contained in:
Damien Picard 2022-10-05 17:32:19 +02:00 committed by Bastien Montagne
parent 106cb51ab9
commit 4814761082
1 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,10 @@
import bpy
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import (
pgettext_tip as tip_,
pgettext_data as data_,
)
def image_get(mat):
@ -73,7 +76,7 @@ def write_mesh(context, report_cb):
name = os.path.basename(bpy.data.filepath)
name = os.path.splitext(name)[0]
else:
name = "untitled"
name = data_("untitled")
# add object name
name += f"-{bpy.path.clean_name(obj.name)}"