Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/material_maker/nodes/scale.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"control": "P1.y",
"default": 0,
"label": "Center Y",
"longdesc": "The poisition of the scale center",
"longdesc": "The position of the scale center",
"max": 1,
"min": -1,
"name": "cy",
Expand Down Expand Up @@ -96,4 +96,4 @@
"shortdesc": "Scale"
},
"type": "shader"
}
}
10 changes: 5 additions & 5 deletions material_maker/main_window.gd
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,14 @@ func set_current_mode(mode : String) -> void:
func create_menu_load_recent(menu) -> void:
menu.clear()
if recent_files.is_empty():
menu.add_item("No items found", 0)
menu.add_item(tr("No items found"), 0)
menu.set_item_disabled(0, true)
else:
for i in recent_files.size():
menu.add_item(recent_files[i], i)
menu.connect_id_pressed(self._on_LoadRecent_id_pressed)
menu.add_separator()
menu.add_item("Clear recent files", RECENTS_MENU_CLEAR)
menu.add_item(tr("Clear recent files"), RECENTS_MENU_CLEAR)

func _on_LoadRecent_id_pressed(id) -> void:
match id:
Expand Down Expand Up @@ -655,16 +655,16 @@ func create_menu_show_panels(menu : MMMenuManager.MenuBase) -> void:
menu.clear()
var panels = layout.get_panel_list()
for i in range(panels.size()):
menu.add_check_item(panels[i], i)
menu.add_check_item(tr(panels[i]), i)
menu.set_item_checked(i, layout.is_panel_visible(panels[i]))
if current_mode:
menu.set_item_disabled(i, panels[i] in layout.HIDE_PANELS[current_mode])
menu.connect_id_pressed(self._on_ShowPanels_id_pressed)

func create_menu_panels_preset(menu : MMMenuManager.MenuBase) -> void:
menu.clear()
menu.add_item("Save Preset", MENU_SAVE_PRESET)
menu.add_item("Manage Presets", MENU_MANAGE_PRESETS)
menu.add_item(tr("Save Preset"), MENU_SAVE_PRESET)
menu.add_item(tr("Manage Presets"), MENU_MANAGE_PRESETS)
if not layout.presets.is_empty():
menu.add_separator()
for id in layout.presets.size():
Expand Down
8 changes: 4 additions & 4 deletions material_maker/panels/library/library.gd
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ func _on_Libraries_about_to_show():
if i > 1:
unload.add_item(library_manager.get_child(i).library_name, i)
if not unload.item_count:
unload.add_item("No custom library loaded")
unload.add_item(tr("No custom library loaded"))
unload.set_item_disabled(0, true)
popup.add_separator()
popup.add_item("Create library", MENU_CREATE_LIBRARY)
popup.add_item("Load library", MENU_LOAD_LIBRARY)
popup.add_item(tr("Create library"), MENU_CREATE_LIBRARY)
popup.add_item(tr("Load library"), MENU_LOAD_LIBRARY)
popup.add_submenu_item("Unload", "Unload")
if not popup.window_input.is_connected(_on_Libraries_window_input):
popup.window_input.connect(_on_Libraries_window_input.bind(popup))
Expand Down Expand Up @@ -440,7 +440,7 @@ func _on_PopupMenu_index_pressed(index):
dialog.content_scale_factor = mm_globals.ui_scale_factor()
dialog.min_size = Vector2(400, 90) * dialog.content_scale_factor
add_child(dialog)
var status = await dialog.enter_text("Library item aliases", "Updated aliases for "+item_path, aliases)
var status = await dialog.enter_text(tr("Library item aliases"), tr("Updated aliases for %s") % [item_path], aliases)
if ! status.ok:
return
library_manager.set_aliases(item_path, status.text)
Expand Down
9 changes: 2 additions & 7 deletions material_maker/projects_panel.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ keycode = 93
events = [SubResource("InputEventKey_lbgjg")]

[node name="ProjectsPanel" type="Control" unique_id=235293066]
clip_contents = true
custom_minimum_size = Vector2(100, 100)
clip_contents = true
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
Expand Down Expand Up @@ -302,7 +302,6 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "Direct Connections"
tooltip_auto_translate_mode = 2
toggle_mode = true
button_group = ExtResource("10_lbgjg")
shortcut = SubResource("Shortcut_7tisq")
Expand All @@ -316,7 +315,6 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "Bezier Connections"
tooltip_auto_translate_mode = 2
toggle_mode = true
button_pressed = true
button_group = ExtResource("10_lbgjg")
Expand All @@ -331,7 +329,6 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "Rounded Connections"
tooltip_auto_translate_mode = 2
toggle_mode = true
button_group = ExtResource("10_lbgjg")
shortcut = SubResource("Shortcut_7tisq")
Expand All @@ -345,7 +342,6 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "Manhattan Connections"
tooltip_auto_translate_mode = 2
toggle_mode = true
button_group = ExtResource("10_lbgjg")
shortcut = SubResource("Shortcut_7tisq")
Expand All @@ -359,7 +355,6 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "Diagonal Connections"
tooltip_auto_translate_mode = 2
toggle_mode = true
button_group = ExtResource("10_lbgjg")
shortcut = SubResource("Shortcut_7tisq")
Expand All @@ -376,7 +371,7 @@ layout_mode = 2

[node name="ThicknessLabel" type="Label" parent="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel/VBoxContainer/VBoxContainer2/Thickness" unique_id=537020243]
layout_mode = 2
text = "Thickness"
text = "Line Radius"

[node name="LineThickness" parent="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel/VBoxContainer/VBoxContainer2/Thickness" unique_id=688868721 instance=ExtResource("8_1w3oe")]
unique_name_in_owner = true
Expand Down
16 changes: 12 additions & 4 deletions material_maker/tools/library_manager/library.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
class_name Library
extends Node

var library_path : String = ""
Expand All @@ -10,6 +11,12 @@ var read_only : bool = false
func _ready():
pass

static func translate_item_path(from_item_path : String) -> String:
var path_items : PackedStringArray = from_item_path.split("/")
for n in path_items.size():
path_items[n] = str(TranslationServer.translate(path_items[n]))
return "/".join(path_items)

func create_library(path : String, lib_name : String) -> void:
library_path = path
library_name = lib_name
Expand Down Expand Up @@ -73,21 +80,21 @@ func get_items(filter : String, disabled_sections : Array, aliased_items : Array
var result_quality := 1.0
if filter:
include = false
if i.display_name.to_lower().begins_with(filter) or " "+filter in i.display_name.to_lower():
if tr(i.display_name).to_lower().begins_with(filter) or " "+filter in tr(i.display_name).to_lower():
include = true

if not include:
include = true
result_quality = 0.8
for word in filter.split(" "):
if not word in i.display_name.to_lower():
if not word in tr(i.display_name).to_lower():
include = false

if (not include) and i.has("name"):
include = true
result_quality = 0.8
for word in filter.split(" "):
if not word in i.name.to_lower():
if not word in tr(i.name).to_lower():
include = false

if not include:
Expand All @@ -102,8 +109,9 @@ func get_items(filter : String, disabled_sections : Array, aliased_items : Array
if not include:
include = true
result_quality = 0.4

for word in filter.split(" "):
if not word in i.tree_item.to_lower():
if not word in i.tree_item.to_lower() or not word in translate_item_path(i.tree_item).to_lower():
include = false

if include:
Expand Down
2 changes: 1 addition & 1 deletion material_maker/windows/about/about.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CONTRIBUTORS = [
{ name="Easynam", contribution="Propagate Changes function in subgraph nodes", url="https://github.com/RodZill4/material-maker/commits/master/?author=easynam" },
{ name="Zhibade", contribution="Auto size new comment nodes to current selection", url="https://github.com/RodZill4/material-maker/commits/master/?author=Zhibade" },
{ name="paddy-exe", contribution="New modes in the Blend node", url="https://github.com/RodZill4/material-maker/commits/master/?author=paddy-exe" },
{ name="Variable", contribution="UI fixes", url="https://github.com/RodZill4/material-maker/commits/master/?author=Variable-ind" },
{ name="Variable-ind", contribution="UI fixes", url="https://github.com/RodZill4/material-maker/commits/master/?author=Variable-ind" },
{ name="jeremybeier", contribution="Unity export fixes", url="https://github.com/RodZill4/material-maker/commits/master/?author=jeremybeier" },
{ name="Caroline Tilly", contribution="Steam trailer production and music for all showreels", url="https://tilcamusic.com/" },
{ name="Margot Rindone", contribution="Steam achievements icons", url="https://www.artstation.com/margot_rindone" },
Expand Down
2 changes: 1 addition & 1 deletion material_maker/windows/add_node_popup/add_node_popup.gd
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func update_list(filter_text : String = "") -> void:
var _name : String = obj.display_name
_name = obj.tree_item# + "("+str(i.quality)+")" + " ("+str(i.idx)+")"

%List.add_item(_name, i.icon)
%List.add_item(Library.translate_item_path(_name), i.icon)
%List.set_item_custom_fg_color(idx, color)
%List.set_item_metadata(idx, i)
%List.set_item_tooltip_enabled(idx, false)
Expand Down