Merge pull request #116451 from YeldhamDev/animation_auto_translation
Improve auto-translation in the Animation editor
This commit is contained in:
commit
70771e3290
3 changed files with 163 additions and 141 deletions
|
|
@ -50,7 +50,6 @@ void AnimationLibraryEditor::set_animation_mixer(Object *p_mixer) {
|
|||
}
|
||||
|
||||
void AnimationLibraryEditor::_add_library() {
|
||||
add_library_dialog->set_title(TTR("Library Name:"));
|
||||
add_library_name->set_text("");
|
||||
add_library_dialog->popup_centered();
|
||||
add_library_name->grab_focus();
|
||||
|
|
@ -542,7 +541,6 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
|
|||
Ref<AnimationLibrary> al = mixer->get_animation_library(lib_name);
|
||||
switch (p_id) {
|
||||
case LIB_BUTTON_ADD: {
|
||||
add_library_dialog->set_title(TTR("Animation Name:"));
|
||||
add_library_name->set_text("");
|
||||
add_library_dialog->popup_centered();
|
||||
add_library_name->grab_focus();
|
||||
|
|
@ -917,7 +915,12 @@ void AnimationLibraryEditor::_notification(int p_what) {
|
|||
case NOTIFICATION_THEME_CHANGED: {
|
||||
new_library_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
|
||||
load_library_button->set_button_icon(get_editor_theme_icon(SNAME("Load")));
|
||||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
tree->set_column_title(0, TTR("Resource"));
|
||||
tree->set_column_title(1, TTR("Storage"));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -952,7 +955,7 @@ void AnimationLibraryEditor::_bind_methods() {
|
|||
}
|
||||
|
||||
AnimationLibraryEditor::AnimationLibraryEditor() {
|
||||
set_title(TTR("Edit Animation Libraries"));
|
||||
set_title(TTRC("Edit Animation Libraries"));
|
||||
set_process_shortcut_input(true);
|
||||
|
||||
file_dialog = memnew(EditorFileDialog);
|
||||
|
|
@ -961,6 +964,8 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
|
|||
file_dialog->connect("files_selected", callable_mp(this, &AnimationLibraryEditor::_load_files));
|
||||
|
||||
add_library_dialog = memnew(ConfirmationDialog);
|
||||
add_library_dialog->set_title(TTRC("Library Name:"));
|
||||
|
||||
VBoxContainer *dialog_vb = memnew(VBoxContainer);
|
||||
add_library_name = memnew(LineEdit);
|
||||
dialog_vb->add_child(add_library_name);
|
||||
|
|
@ -976,12 +981,12 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
|
|||
VBoxContainer *vb = memnew(VBoxContainer);
|
||||
HBoxContainer *hb = memnew(HBoxContainer);
|
||||
hb->add_spacer(true);
|
||||
new_library_button = memnew(Button(TTR("New Library")));
|
||||
new_library_button->set_tooltip_text(TTR("Create new empty animation library."));
|
||||
new_library_button = memnew(Button(TTRC("New Library")));
|
||||
new_library_button->set_tooltip_text(TTRC("Create new empty animation library."));
|
||||
new_library_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationLibraryEditor::_add_library));
|
||||
hb->add_child(new_library_button);
|
||||
load_library_button = memnew(Button(TTR("Load Library")));
|
||||
load_library_button->set_tooltip_text(TTR("Load animation library from disk."));
|
||||
load_library_button = memnew(Button(TTRC("Load Library")));
|
||||
load_library_button->set_tooltip_text(TTRC("Load animation library from disk."));
|
||||
load_library_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationLibraryEditor::_load_library));
|
||||
hb->add_child(load_library_button);
|
||||
vb->add_child(hb);
|
||||
|
|
@ -992,8 +997,6 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
|
|||
tree->set_theme_type_variation("TreeTable");
|
||||
tree->set_columns(2);
|
||||
tree->set_column_titles_visible(true);
|
||||
tree->set_column_title(0, TTR("Resource"));
|
||||
tree->set_column_title(1, TTR("Storage"));
|
||||
tree->set_column_expand(0, true);
|
||||
tree->set_column_custom_minimum_width(1, EDSCALE * 250);
|
||||
tree->set_column_expand(1, false);
|
||||
|
|
@ -1012,6 +1015,6 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
|
|||
add_child(vb);
|
||||
|
||||
error_dialog = memnew(AcceptDialog);
|
||||
error_dialog->set_title(TTR("Error:"));
|
||||
error_dialog->set_title(TTRC("Error:"));
|
||||
add_child(error_dialog);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2096,7 +2096,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
frame->set_custom_minimum_size(Size2(80, 0) * EDSCALE);
|
||||
frame->set_stretch_ratio(2);
|
||||
frame->set_step(0.0001);
|
||||
frame->set_tooltip_text(TTR("Animation position (in seconds)."));
|
||||
frame->set_tooltip_text(TTRC("Animation position (in seconds)."));
|
||||
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -2104,7 +2104,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
hb->add_child(scale);
|
||||
scale->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
scale->set_stretch_ratio(1);
|
||||
scale->set_tooltip_text(TTR("Scale animation playback globally for the node."));
|
||||
scale->set_tooltip_text(TTRC("Scale animation playback globally for the node."));
|
||||
scale->hide();
|
||||
|
||||
delete_dialog = memnew(ConfirmationDialog);
|
||||
|
|
@ -2114,8 +2114,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
tool_anim = memnew(MenuButton);
|
||||
tool_anim->set_shortcut_context(this);
|
||||
tool_anim->set_flat(false);
|
||||
tool_anim->set_tooltip_text(TTR("Animation Tools"));
|
||||
tool_anim->set_text(TTR("Animation"));
|
||||
tool_anim->set_tooltip_text(TTRC("Animation Tools"));
|
||||
tool_anim->set_text(TTRC("Animation"));
|
||||
tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/new_animation", TTRC("New...")), TOOL_NEW_ANIM);
|
||||
tool_anim->get_popup()->add_separator();
|
||||
tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/animation_libraries", TTRC("Manage Animations...")), TOOL_ANIM_LIBRARY);
|
||||
|
|
@ -2135,14 +2135,14 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
hb->add_child(animation);
|
||||
animation->set_accessibility_name(TTRC("Animation"));
|
||||
animation->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
animation->set_tooltip_text(TTR("Display list of animations in player."));
|
||||
animation->set_tooltip_text(TTRC("Display list of animations in player."));
|
||||
animation->set_clip_text(true);
|
||||
animation->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
||||
autoplay = memnew(Button);
|
||||
autoplay->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hb->add_child(autoplay);
|
||||
autoplay->set_tooltip_text(TTR("Autoplay on Load"));
|
||||
autoplay->set_tooltip_text(TTRC("Autoplay on Load"));
|
||||
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -2154,7 +2154,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
onion_toggle = memnew(Button);
|
||||
onion_toggle->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
onion_toggle->set_toggle_mode(true);
|
||||
onion_toggle->set_tooltip_text(TTR("Enable Onion Skinning"));
|
||||
onion_toggle->set_tooltip_text(TTRC("Enable Onion Skinning"));
|
||||
onion_toggle->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu).bind(ONION_SKINNING_ENABLE));
|
||||
hb->add_child(onion_toggle);
|
||||
|
||||
|
|
@ -2162,22 +2162,22 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
onion_skinning->set_accessibility_name(TTRC("Onion Skinning Options"));
|
||||
onion_skinning->set_flat(false);
|
||||
onion_skinning->set_theme_type_variation("FlatMenuButton");
|
||||
onion_skinning->set_tooltip_text(TTR("Onion Skinning Options"));
|
||||
onion_skinning->get_popup()->add_separator(TTR("Directions"));
|
||||
onion_skinning->set_tooltip_text(TTRC("Onion Skinning Options"));
|
||||
onion_skinning->get_popup()->add_separator(TTRC("Directions"));
|
||||
// TRANSLATORS: Opposite of "Future", refers to a direction in animation onion skinning.
|
||||
onion_skinning->get_popup()->add_check_item(TTR("Past"), ONION_SKINNING_PAST);
|
||||
onion_skinning->get_popup()->add_check_item(TTRC("Past"), ONION_SKINNING_PAST);
|
||||
onion_skinning->get_popup()->set_item_checked(-1, true);
|
||||
// TRANSLATORS: Opposite of "Past", refers to a direction in animation onion skinning.
|
||||
onion_skinning->get_popup()->add_check_item(TTR("Future"), ONION_SKINNING_FUTURE);
|
||||
onion_skinning->get_popup()->add_separator(TTR("Depth"));
|
||||
onion_skinning->get_popup()->add_radio_check_item(TTR("1 step"), ONION_SKINNING_1_STEP);
|
||||
onion_skinning->get_popup()->add_check_item(TTRC("Future"), ONION_SKINNING_FUTURE);
|
||||
onion_skinning->get_popup()->add_separator(TTRC("Depth"));
|
||||
onion_skinning->get_popup()->add_radio_check_item(TTRC("1 step"), ONION_SKINNING_1_STEP);
|
||||
onion_skinning->get_popup()->set_item_checked(-1, true);
|
||||
onion_skinning->get_popup()->add_radio_check_item(TTR("2 steps"), ONION_SKINNING_2_STEPS);
|
||||
onion_skinning->get_popup()->add_radio_check_item(TTR("3 steps"), ONION_SKINNING_3_STEPS);
|
||||
onion_skinning->get_popup()->add_radio_check_item(TTRC("2 steps"), ONION_SKINNING_2_STEPS);
|
||||
onion_skinning->get_popup()->add_radio_check_item(TTRC("3 steps"), ONION_SKINNING_3_STEPS);
|
||||
onion_skinning->get_popup()->add_separator();
|
||||
onion_skinning->get_popup()->add_check_item(TTR("Differences Only"), ONION_SKINNING_DIFFERENCES_ONLY);
|
||||
onion_skinning->get_popup()->add_check_item(TTR("Force White Modulate"), ONION_SKINNING_FORCE_WHITE_MODULATE);
|
||||
onion_skinning->get_popup()->add_check_item(TTR("Include Gizmos (3D)"), ONION_SKINNING_INCLUDE_GIZMOS);
|
||||
onion_skinning->get_popup()->add_check_item(TTRC("Differences Only"), ONION_SKINNING_DIFFERENCES_ONLY);
|
||||
onion_skinning->get_popup()->add_check_item(TTRC("Force White Modulate"), ONION_SKINNING_FORCE_WHITE_MODULATE);
|
||||
onion_skinning->get_popup()->add_check_item(TTRC("Include Gizmos (3D)"), ONION_SKINNING_INCLUDE_GIZMOS);
|
||||
onion_skinning->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
|
||||
hb->add_child(onion_skinning);
|
||||
|
||||
|
|
@ -2186,7 +2186,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
pin = memnew(Button);
|
||||
pin->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
pin->set_toggle_mode(true);
|
||||
pin->set_tooltip_text(TTR("Pin AnimationPlayer"));
|
||||
pin->set_tooltip_text(TTRC("Pin AnimationPlayer"));
|
||||
hb->add_child(pin);
|
||||
pin->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_pin_pressed));
|
||||
|
||||
|
|
@ -2194,13 +2194,13 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
add_child(file);
|
||||
|
||||
name_dialog = memnew(ConfirmationDialog);
|
||||
name_dialog->set_title(TTR("Create New Animation"));
|
||||
name_dialog->set_title(TTRC("Create New Animation"));
|
||||
name_dialog->set_hide_on_ok(false);
|
||||
add_child(name_dialog);
|
||||
VBoxContainer *vb = memnew(VBoxContainer);
|
||||
name_dialog->add_child(vb);
|
||||
|
||||
name_title = memnew(Label(TTR("Animation Name:")));
|
||||
name_title = memnew(Label(TTRC("Animation Name:")));
|
||||
vb->add_child(name_title);
|
||||
|
||||
HBoxContainer *name_hb = memnew(HBoxContainer);
|
||||
|
|
@ -2214,15 +2214,15 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
name_dialog->register_text_enter(name);
|
||||
|
||||
error_dialog = memnew(AcceptDialog);
|
||||
error_dialog->set_ok_button_text(TTR("Close"));
|
||||
error_dialog->set_title(TTR("Error!"));
|
||||
error_dialog->set_ok_button_text(TTRC("Close"));
|
||||
error_dialog->set_title(TTRC("Error!"));
|
||||
name_dialog->add_child(error_dialog);
|
||||
|
||||
name_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationPlayerEditor::_animation_name_edited));
|
||||
|
||||
blend_editor.dialog = memnew(AcceptDialog);
|
||||
blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times"));
|
||||
blend_editor.dialog->set_ok_button_text(TTR("Close"));
|
||||
blend_editor.dialog->set_title(TTRC("Cross-Animation Blend Times"));
|
||||
blend_editor.dialog->set_ok_button_text(TTRC("Close"));
|
||||
blend_editor.dialog->set_hide_on_ok(true);
|
||||
add_child(blend_editor.dialog);
|
||||
|
||||
|
|
@ -2237,13 +2237,13 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
blend_editor.tree->set_column_clip_content(0, true);
|
||||
blend_editor.tree->set_column_expand_ratio(1, 3);
|
||||
blend_editor.tree->set_column_clip_content(1, true);
|
||||
blend_vb->add_margin_child(TTR("Blend Times:"), blend_editor.tree, true);
|
||||
blend_vb->add_margin_child(TTRC("Blend Times:"), blend_editor.tree, true);
|
||||
blend_editor.tree->connect(SNAME("item_edited"), callable_mp(this, &AnimationPlayerEditor::_blend_edited));
|
||||
|
||||
blend_editor.next = memnew(OptionButton);
|
||||
blend_editor.next->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
blend_editor.next->connect(SceneStringName(item_selected), callable_mp(this, &AnimationPlayerEditor::_blend_editor_next_changed));
|
||||
blend_vb->add_margin_child(TTR("Next (Auto Queue):"), blend_editor.next);
|
||||
blend_vb->add_margin_child(TTRC("Next (Auto Queue):"), blend_editor.next);
|
||||
|
||||
autoplay->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_autoplay_pressed));
|
||||
autoplay->set_toggle_mode(true);
|
||||
|
|
|
|||
|
|
@ -1464,15 +1464,15 @@ void AnimationTimelineEdit::_notification(int p_what) {
|
|||
filter_track->set_right_icon(get_editor_theme_icon(SNAME("Search")));
|
||||
|
||||
add_track->get_popup()->clear();
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyValue")), TTR("Property Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyXPosition")), TTR("3D Position Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyXRotation")), TTR("3D Rotation Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyXScale")), TTR("3D Scale Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyBlendShape")), TTR("Blend Shape Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyCall")), TTR("Call Method Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyBezier")), TTR("Bezier Curve Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyAudio")), TTR("Audio Playback Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyAnimation")), TTR("Animation Playback Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyValue")), TTRC("Property Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyXPosition")), TTRC("3D Position Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyXRotation")), TTRC("3D Rotation Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyXScale")), TTRC("3D Scale Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyBlendShape")), TTRC("Blend Shape Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyCall")), TTRC("Call Method Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyBezier")), TTRC("Bezier Curve Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyAudio")), TTRC("Audio Playback Track..."));
|
||||
add_track->get_popup()->add_icon_item(get_editor_theme_icon(SNAME("KeyAnimation")), TTRC("Animation Playback Track..."));
|
||||
|
||||
timeline_resize_rect.size = get_editor_theme_icon(SNAME("TimelineHandle"))->get_size();
|
||||
} break;
|
||||
|
|
@ -2065,14 +2065,14 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
|
|||
add_child(add_track_hb);
|
||||
|
||||
add_track = memnew(MenuButton);
|
||||
add_track->set_tooltip_text(TTR("Select a new track by type to add to this animation."));
|
||||
add_track->set_tooltip_text(TTRC("Select a new track by type to add to this animation."));
|
||||
add_track->set_position(Vector2(0, 0));
|
||||
add_track_hb->add_child(add_track);
|
||||
filter_track = memnew(LineEdit);
|
||||
filter_track->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
filter_track->set_custom_minimum_size(Vector2(120 * EDSCALE, 0));
|
||||
filter_track->set_placeholder(TTR("Filter Tracks"));
|
||||
filter_track->set_tooltip_text(TTR("Filter tracks by entering part of their node name or property."));
|
||||
filter_track->set_placeholder(TTRC("Filter Tracks"));
|
||||
filter_track->set_tooltip_text(TTRC("Filter tracks by entering part of their node name or property."));
|
||||
filter_track->connect(SceneStringName(text_changed), callable_mp((AnimationTrackEditor *)this, &AnimationTrackEditor::_on_filter_updated));
|
||||
filter_track->set_clear_button_enabled(true);
|
||||
filter_track->hide();
|
||||
|
|
@ -2087,7 +2087,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
|
|||
|
||||
time_icon = memnew(TextureRect);
|
||||
time_icon->set_v_size_flags(SIZE_SHRINK_CENTER);
|
||||
time_icon->set_tooltip_text(TTR("Animation length (seconds)"));
|
||||
time_icon->set_tooltip_text(TTRC("Animation length (seconds)"));
|
||||
len_hb->add_child(time_icon);
|
||||
|
||||
length = memnew(EditorSpinSlider);
|
||||
|
|
@ -2097,14 +2097,14 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
|
|||
length->set_allow_greater(true);
|
||||
length->set_custom_minimum_size(Vector2(70 * EDSCALE, 0));
|
||||
length->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
|
||||
length->set_tooltip_text(TTR("Animation length (seconds)"));
|
||||
length->set_tooltip_text(TTRC("Animation length (seconds)"));
|
||||
length->set_accessibility_name(TTRC("Animation length (seconds)"));
|
||||
length->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTimelineEdit::_anim_length_changed));
|
||||
len_hb->add_child(length);
|
||||
|
||||
loop = memnew(Button);
|
||||
loop->set_flat(true);
|
||||
loop->set_tooltip_text(TTR("Animation Looping"));
|
||||
loop->set_tooltip_text(TTRC("Animation Looping"));
|
||||
loop->connect(SceneStringName(pressed), callable_mp(this, &AnimationTimelineEdit::_anim_loop_pressed));
|
||||
loop->set_toggle_mode(true);
|
||||
len_hb->add_child(loop);
|
||||
|
|
@ -5571,6 +5571,25 @@ void AnimationTrackEditor::_notification(int p_what) {
|
|||
bezier_key_mode->set_item_text(bezier_key_mode->get_item_index(Animation::HANDLE_MODE_BALANCED), TTR("Balanced", "Bezier Handle Mode"));
|
||||
bezier_key_mode->set_item_text(bezier_key_mode->get_item_index(Animation::HANDLE_MODE_MIRRORED), TTR("Mirrored", "Bezier Handle Mode"));
|
||||
bezier_key_mode->set_tooltip_text(TTR("Bezier Default Mode") + "\n" + TTR("Set the default handle mode of new bezier keys."));
|
||||
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_LINEAR), TTR("Linear", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_QUINT), TTR("Quint", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_QUART), TTR("Quart", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_QUAD), TTR("Quad", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_EXPO), TTR("Expo", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_ELASTIC), TTR("Elastic", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_CUBIC), TTR("Cubic", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_CIRC), TTR("Circ", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_BOUNCE), TTR("Bounce", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_BACK), TTR("Back", "Transition Type"));
|
||||
transition_selection->set_item_text(transition_selection->get_item_index(Tween::TRANS_SPRING), TTR("Spring", "Transition Type"));
|
||||
|
||||
ease_selection->set_item_text(ease_selection->get_item_index(Tween::EASE_IN), TTR("Ease In", "Ease Type"));
|
||||
ease_selection->set_item_text(ease_selection->get_item_index(Tween::EASE_OUT), TTR("Ease Out", "Ease Type"));
|
||||
ease_selection->set_item_text(ease_selection->get_item_index(Tween::EASE_IN_OUT), TTR("Ease In-Out", "Ease Type"));
|
||||
ease_selection->set_item_text(ease_selection->get_item_index(Tween::EASE_OUT_IN), TTR("Ease Out-In", "Ease Type"));
|
||||
|
||||
_update_nearest_fps_label();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
@ -8035,7 +8054,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
info_message = memnew(Label);
|
||||
info_message_vbox->add_child(info_message);
|
||||
info_message->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
info_message->set_text(TTR("Select an AnimationPlayer node to create and edit animations."));
|
||||
info_message->set_text(TTRC("Select an AnimationPlayer node to create and edit animations."));
|
||||
info_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
info_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
|
@ -8044,8 +8063,8 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
|
||||
add_animation_player = memnew(Button);
|
||||
info_message_vbox->add_child(add_animation_player);
|
||||
add_animation_player->set_text(TTR("Add AnimationPlayer"));
|
||||
add_animation_player->set_tooltip_text(TTR("Add a new AnimationPlayer node to the scene."));
|
||||
add_animation_player->set_text(TTRC("Add AnimationPlayer"));
|
||||
add_animation_player->set_tooltip_text(TTRC("Add a new AnimationPlayer node to the scene."));
|
||||
add_animation_player->set_h_size_flags(SIZE_SHRINK_CENTER);
|
||||
add_animation_player->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_add_animation_player));
|
||||
|
||||
|
|
@ -8130,22 +8149,22 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
|
||||
imported_anim_warning = memnew(Button);
|
||||
imported_anim_warning->hide();
|
||||
imported_anim_warning->set_text(TTR("Imported Animation"));
|
||||
imported_anim_warning->set_tooltip_text(TTR("Warning: Editing imported animation"));
|
||||
imported_anim_warning->set_text(TTRC("Imported Animation"));
|
||||
imported_anim_warning->set_tooltip_text(TTRC("Warning: Editing imported animation"));
|
||||
imported_anim_warning->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_show_imported_anim_warning));
|
||||
bottom_hf->add_child(imported_anim_warning);
|
||||
|
||||
dummy_player_warning = memnew(Button);
|
||||
dummy_player_warning->hide();
|
||||
dummy_player_warning->set_text(TTR("Dummy Player"));
|
||||
dummy_player_warning->set_tooltip_text(TTR("Warning: Editing dummy AnimationPlayer"));
|
||||
dummy_player_warning->set_text(TTRC("Dummy Player"));
|
||||
dummy_player_warning->set_tooltip_text(TTRC("Warning: Editing dummy AnimationPlayer"));
|
||||
dummy_player_warning->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_show_dummy_player_warning));
|
||||
bottom_hf->add_child(dummy_player_warning);
|
||||
|
||||
inactive_player_warning = memnew(Button);
|
||||
inactive_player_warning->hide();
|
||||
inactive_player_warning->set_text(TTR("Inactive Player"));
|
||||
inactive_player_warning->set_tooltip_text(TTR("Warning: AnimationPlayer is inactive"));
|
||||
inactive_player_warning->set_text(TTRC("Inactive Player"));
|
||||
inactive_player_warning->set_tooltip_text(TTRC("Warning: AnimationPlayer is inactive"));
|
||||
inactive_player_warning->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_show_inactive_player_warning));
|
||||
bottom_hf->add_child(inactive_player_warning);
|
||||
|
||||
|
|
@ -8171,7 +8190,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
bezier_edit_icon->set_disabled(true);
|
||||
bezier_edit_icon->set_toggle_mode(true);
|
||||
bezier_edit_icon->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_toggle_bezier_edit));
|
||||
bezier_edit_icon->set_tooltip_text(TTR("Toggle between the bezier curve editor and track editor."));
|
||||
bezier_edit_icon->set_tooltip_text(TTRC("Toggle between the bezier curve editor and track editor."));
|
||||
|
||||
bottom_hf->add_child(bezier_edit_icon);
|
||||
|
||||
|
|
@ -8189,7 +8208,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
selected_filter->set_flat(true);
|
||||
selected_filter->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); // Same function works the same.
|
||||
selected_filter->set_toggle_mode(true);
|
||||
selected_filter->set_tooltip_text(TTR("Only show tracks from nodes selected in tree."));
|
||||
selected_filter->set_tooltip_text(TTRC("Only show tracks from nodes selected in tree."));
|
||||
|
||||
bottom_hf->add_child(selected_filter);
|
||||
|
||||
|
|
@ -8197,7 +8216,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
alphabetic_sorting->set_flat(true);
|
||||
alphabetic_sorting->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_update_tracks));
|
||||
alphabetic_sorting->set_toggle_mode(true);
|
||||
alphabetic_sorting->set_tooltip_text(TTR("Sort tracks/groups alphabetically.\nIf disabled, tracks are shown in the order they are added and can be reordered using drag-and-drop."));
|
||||
alphabetic_sorting->set_tooltip_text(TTRC("Sort tracks/groups alphabetically.\nIf disabled, tracks are shown in the order they are added and can be reordered using drag-and-drop."));
|
||||
|
||||
bottom_hf->add_child(alphabetic_sorting);
|
||||
|
||||
|
|
@ -8205,7 +8224,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
view_group->set_flat(true);
|
||||
view_group->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_view_group_toggle));
|
||||
view_group->set_toggle_mode(true);
|
||||
view_group->set_tooltip_text(TTR("Group tracks by node or display them as plain list."));
|
||||
view_group->set_tooltip_text(TTRC("Group tracks by node or display them as plain list."));
|
||||
|
||||
bottom_hf->add_child(view_group);
|
||||
|
||||
|
|
@ -8223,7 +8242,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
snap_timeline->set_flat(true);
|
||||
snap_timeline->set_disabled(true);
|
||||
snap_timeline->set_toggle_mode(true);
|
||||
snap_timeline->set_tooltip_text(TTR("Apply snapping to timeline cursor."));
|
||||
snap_timeline->set_tooltip_text(TTRC("Apply snapping to timeline cursor."));
|
||||
snap_timeline->set_pressed(EditorSettings::get_singleton()->get_project_metadata("animation_track_editor", "snap_timeline", false));
|
||||
bottom_hf->add_child(snap_timeline);
|
||||
snap_timeline->connect(SceneStringName(toggled), callable_mp(this, &AnimationTrackEditor::_store_snap_states).unbind(1));
|
||||
|
|
@ -8232,7 +8251,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
snap_keys->set_flat(true);
|
||||
snap_keys->set_disabled(true);
|
||||
snap_keys->set_toggle_mode(true);
|
||||
snap_keys->set_tooltip_text(TTR("Apply snapping to selected key(s)."));
|
||||
snap_keys->set_tooltip_text(TTRC("Apply snapping to selected key(s)."));
|
||||
snap_keys->set_pressed(EditorSettings::get_singleton()->get_project_metadata("animation_track_editor", "snap_keys", true));
|
||||
bottom_hf->add_child(snap_keys);
|
||||
snap_keys->connect(SceneStringName(toggled), callable_mp(this, &AnimationTrackEditor::_store_snap_states).unbind(1));
|
||||
|
|
@ -8243,7 +8262,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
fps_compat->set_disabled(true);
|
||||
fps_compat->set_toggle_mode(true);
|
||||
fps_compat->set_pressed(true);
|
||||
fps_compat->set_tooltip_text(TTR("Apply snapping to the nearest integer FPS."));
|
||||
fps_compat->set_tooltip_text(TTRC("Apply snapping to the nearest integer FPS."));
|
||||
fps_compat->connect(SceneStringName(toggled), callable_mp(this, &AnimationTrackEditor::_update_fps_compat_mode));
|
||||
|
||||
nearest_fps_label = memnew(Label);
|
||||
|
|
@ -8257,15 +8276,15 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
step->set_step(SECOND_DECIMAL);
|
||||
step->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
|
||||
step->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
|
||||
step->set_tooltip_text(TTR("Animation step value."));
|
||||
step->set_tooltip_text(TTRC("Animation step value."));
|
||||
step->set_accessibility_name(TTRC("Animation step value."));
|
||||
bottom_hf->add_child(step);
|
||||
step->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTrackEditor::_update_step));
|
||||
step->set_read_only(true);
|
||||
|
||||
snap_mode = memnew(OptionButton);
|
||||
snap_mode->add_item(TTR("Seconds"));
|
||||
snap_mode->add_item(TTR("FPS"));
|
||||
snap_mode->add_item(TTRC("Seconds"));
|
||||
snap_mode->add_item(TTRC("FPS"));
|
||||
snap_mode->set_accessibility_name(TTRC("Snap Mode"));
|
||||
snap_mode->set_disabled(true);
|
||||
bottom_hf->add_child(snap_mode);
|
||||
|
|
@ -8308,21 +8327,21 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
|
||||
edit = memnew(MenuButton);
|
||||
edit->set_shortcut_context(this);
|
||||
edit->set_text(TTR("Edit"));
|
||||
edit->set_text(TTRC("Edit"));
|
||||
edit->set_flat(false);
|
||||
edit->set_disabled(true);
|
||||
edit->set_tooltip_text(TTR("Animation properties."));
|
||||
edit->set_tooltip_text(TTRC("Animation properties."));
|
||||
edit->set_accessibility_name(TTRC("Animation properties."));
|
||||
edit->get_popup()->add_item(TTR("Copy Tracks..."), EDIT_COPY_TRACKS);
|
||||
edit->get_popup()->add_item(TTR("Paste Tracks"), EDIT_PASTE_TRACKS);
|
||||
edit->get_popup()->add_item(TTRC("Copy Tracks..."), EDIT_COPY_TRACKS);
|
||||
edit->get_popup()->add_item(TTRC("Paste Tracks"), EDIT_PASTE_TRACKS);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_item(TTR("Scale Selection..."), EDIT_SCALE_SELECTION);
|
||||
edit->get_popup()->add_item(TTR("Scale From Cursor..."), EDIT_SCALE_FROM_CURSOR);
|
||||
edit->get_popup()->add_item(TTRC("Scale Selection..."), EDIT_SCALE_SELECTION);
|
||||
edit->get_popup()->add_item(TTRC("Scale From Cursor..."), EDIT_SCALE_FROM_CURSOR);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/set_start_offset", TTRC("Set Start Offset (Audio)"), KeyModifierMask::CMD_OR_CTRL | Key::BRACKETLEFT), EDIT_SET_START_OFFSET);
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/set_end_offset", TTRC("Set End Offset (Audio)"), KeyModifierMask::CMD_OR_CTRL | Key::BRACKETRIGHT), EDIT_SET_END_OFFSET);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_item(TTR("Make Easing Selection..."), EDIT_EASE_SELECTION);
|
||||
edit->get_popup()->add_item(TTRC("Make Easing Selection..."), EDIT_EASE_SELECTION);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/duplicate_selected_keys", TTRC("Duplicate Selected Keys"), KeyModifierMask::CMD_OR_CTRL | Key::D), EDIT_DUPLICATE_SELECTED_KEYS);
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/cut_selected_keys", TTRC("Cut Selected Keys"), KeyModifierMask::CMD_OR_CTRL | Key::X), EDIT_CUT_KEYS);
|
||||
|
|
@ -8346,16 +8365,16 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/add_reset_value", TTRC("Add tracks to RESET")), EDIT_ADD_RESET_KEY);
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/apply_reset", TTRC("Apply RESET")), EDIT_APPLY_RESET);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_item(TTR("Bake Animation..."), EDIT_BAKE_ANIMATION);
|
||||
edit->get_popup()->add_item(TTR("Optimize Animation (no undo)..."), EDIT_OPTIMIZE_ANIMATION);
|
||||
edit->get_popup()->add_item(TTR("Clean-Up Animation (no undo)..."), EDIT_CLEAN_UP_ANIMATION);
|
||||
edit->get_popup()->add_item(TTRC("Bake Animation..."), EDIT_BAKE_ANIMATION);
|
||||
edit->get_popup()->add_item(TTRC("Optimize Animation (no undo)..."), EDIT_OPTIMIZE_ANIMATION);
|
||||
edit->get_popup()->add_item(TTRC("Clean-Up Animation (no undo)..."), EDIT_CLEAN_UP_ANIMATION);
|
||||
|
||||
edit->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed));
|
||||
edit->get_popup()->connect("about_to_popup", callable_mp(this, &AnimationTrackEditor::_edit_menu_about_to_popup));
|
||||
|
||||
pick_track = memnew(SceneTreeDialog);
|
||||
add_child(pick_track);
|
||||
pick_track->set_title(TTR("Pick a node to animate:"));
|
||||
pick_track->set_title(TTRC("Pick a node to animate:"));
|
||||
pick_track->connect("selected", callable_mp(this, &AnimationTrackEditor::_new_track_node_selected));
|
||||
pick_track->get_filter_line_edit()->connect(SceneStringName(text_changed), callable_mp(this, &AnimationTrackEditor::_pick_track_filter_text_changed));
|
||||
|
||||
|
|
@ -8380,11 +8399,11 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
HBoxContainer *ichb = memnew(HBoxContainer);
|
||||
icvb->add_child(ichb);
|
||||
insert_confirm_bezier = memnew(CheckBox);
|
||||
insert_confirm_bezier->set_text(TTR("Use Bezier Curves"));
|
||||
insert_confirm_bezier->set_text(TTRC("Use Bezier Curves"));
|
||||
insert_confirm_bezier->set_pressed(EDITOR_GET("editors/animation/default_create_bezier_tracks"));
|
||||
ichb->add_child(insert_confirm_bezier);
|
||||
insert_confirm_reset = memnew(CheckBox);
|
||||
insert_confirm_reset->set_text(TTR("Create RESET Track(s)", ""));
|
||||
insert_confirm_reset->set_text(TTRC("Create RESET Track(s)"));
|
||||
insert_confirm_reset->set_pressed(EDITOR_GET("editors/animation/default_create_reset_tracks"));
|
||||
ichb->add_child(insert_confirm_reset);
|
||||
|
||||
|
|
@ -8404,7 +8423,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
|
||||
optimize_dialog = memnew(ConfirmationDialog);
|
||||
add_child(optimize_dialog);
|
||||
optimize_dialog->set_title(TTR("Animation Optimizer"));
|
||||
optimize_dialog->set_title(TTRC("Animation Optimizer"));
|
||||
VBoxContainer *optimize_vb = memnew(VBoxContainer);
|
||||
optimize_dialog->add_child(optimize_vb);
|
||||
|
||||
|
|
@ -8414,23 +8433,23 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
optimize_velocity_error->set_step(0.001);
|
||||
optimize_velocity_error->set_value(0.01);
|
||||
optimize_velocity_error->set_accessibility_name(TTRC("Max Velocity Error:"));
|
||||
optimize_vb->add_margin_child(TTR("Max Velocity Error:"), optimize_velocity_error);
|
||||
optimize_vb->add_margin_child(TTRC("Max Velocity Error:"), optimize_velocity_error);
|
||||
optimize_angular_error = memnew(SpinBox);
|
||||
optimize_angular_error->set_max(1.0);
|
||||
optimize_angular_error->set_min(0.001);
|
||||
optimize_angular_error->set_step(0.001);
|
||||
optimize_angular_error->set_value(0.01);
|
||||
optimize_angular_error->set_accessibility_name(TTRC("Max Angular Error:"));
|
||||
optimize_vb->add_margin_child(TTR("Max Angular Error:"), optimize_angular_error);
|
||||
optimize_vb->add_margin_child(TTRC("Max Angular Error:"), optimize_angular_error);
|
||||
optimize_precision_error = memnew(SpinBox);
|
||||
optimize_precision_error->set_max(6);
|
||||
optimize_precision_error->set_min(1);
|
||||
optimize_precision_error->set_step(1);
|
||||
optimize_precision_error->set_value(3);
|
||||
optimize_precision_error->set_accessibility_name(TTRC("Max Precision Error:"));
|
||||
optimize_vb->add_margin_child(TTR("Max Precision Error:"), optimize_precision_error);
|
||||
optimize_vb->add_margin_child(TTRC("Max Precision Error:"), optimize_precision_error);
|
||||
|
||||
optimize_dialog->set_ok_button_text(TTR("Optimize"));
|
||||
optimize_dialog->set_ok_button_text(TTRC("Optimize"));
|
||||
optimize_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_OPTIMIZE_ANIMATION_CONFIRM));
|
||||
|
||||
//
|
||||
|
|
@ -8440,31 +8459,31 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
cleanup_dialog->add_child(cleanup_vb);
|
||||
|
||||
cleanup_keys_with_trimming_head = memnew(CheckBox);
|
||||
cleanup_keys_with_trimming_head->set_text(TTR("Trim keys placed in negative time"));
|
||||
cleanup_keys_with_trimming_head->set_text(TTRC("Trim keys placed in negative time"));
|
||||
cleanup_keys_with_trimming_head->set_pressed(true);
|
||||
cleanup_vb->add_child(cleanup_keys_with_trimming_head);
|
||||
|
||||
cleanup_keys_with_trimming_end = memnew(CheckBox);
|
||||
cleanup_keys_with_trimming_end->set_text(TTR("Trim keys placed exceed the animation length"));
|
||||
cleanup_keys_with_trimming_end->set_text(TTRC("Trim keys placed exceed the animation length"));
|
||||
cleanup_keys_with_trimming_end->set_pressed(true);
|
||||
cleanup_vb->add_child(cleanup_keys_with_trimming_end);
|
||||
|
||||
cleanup_keys = memnew(CheckBox);
|
||||
cleanup_keys->set_text(TTR("Remove invalid keys"));
|
||||
cleanup_keys->set_text(TTRC("Remove invalid keys"));
|
||||
cleanup_keys->set_pressed(true);
|
||||
cleanup_vb->add_child(cleanup_keys);
|
||||
|
||||
cleanup_tracks = memnew(CheckBox);
|
||||
cleanup_tracks->set_text(TTR("Remove unresolved and empty tracks"));
|
||||
cleanup_tracks->set_text(TTRC("Remove unresolved and empty tracks"));
|
||||
cleanup_tracks->set_pressed(true);
|
||||
cleanup_vb->add_child(cleanup_tracks);
|
||||
|
||||
cleanup_all = memnew(CheckBox);
|
||||
cleanup_all->set_text(TTR("Clean-up all animations"));
|
||||
cleanup_all->set_text(TTRC("Clean-up all animations"));
|
||||
cleanup_vb->add_child(cleanup_all);
|
||||
|
||||
cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)"));
|
||||
cleanup_dialog->set_ok_button_text(TTR("Clean-Up"));
|
||||
cleanup_dialog->set_title(TTRC("Clean-Up Animation(s) (NO UNDO!)"));
|
||||
cleanup_dialog->set_ok_button_text(TTRC("Clean-Up"));
|
||||
|
||||
cleanup_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
|
||||
|
||||
|
|
@ -8479,7 +8498,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
scale->set_step(0.001);
|
||||
scale->set_select_all_on_focus(true);
|
||||
scale->set_accessibility_name(TTRC("Scale Ratio"));
|
||||
vbc->add_margin_child(TTR("Scale Ratio:"), scale);
|
||||
vbc->add_margin_child(TTRC("Scale Ratio:"), scale);
|
||||
scale_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_SCALE_CONFIRM), CONNECT_DEFERRED);
|
||||
add_child(scale_dialog);
|
||||
|
||||
|
|
@ -8487,7 +8506,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
|
||||
//
|
||||
ease_dialog = memnew(ConfirmationDialog);
|
||||
ease_dialog->set_title(TTR("Select Transition and Easing"));
|
||||
ease_dialog->set_title(TTRC("Select Transition and Easing"));
|
||||
ease_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_EASE_CONFIRM));
|
||||
add_child(ease_dialog);
|
||||
GridContainer *ease_grid = memnew(GridContainer);
|
||||
|
|
@ -8495,27 +8514,27 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
ease_dialog->add_child(ease_grid);
|
||||
transition_selection = memnew(OptionButton);
|
||||
transition_selection->set_accessibility_name(TTRC("Transition Type:"));
|
||||
transition_selection->add_item(TTR("Linear", "Transition Type"), Tween::TRANS_LINEAR);
|
||||
transition_selection->add_item(TTR("Sine", "Transition Type"), Tween::TRANS_SINE);
|
||||
transition_selection->add_item(TTR("Quint", "Transition Type"), Tween::TRANS_QUINT);
|
||||
transition_selection->add_item(TTR("Quart", "Transition Type"), Tween::TRANS_QUART);
|
||||
transition_selection->add_item(TTR("Quad", "Transition Type"), Tween::TRANS_QUAD);
|
||||
transition_selection->add_item(TTR("Expo", "Transition Type"), Tween::TRANS_EXPO);
|
||||
transition_selection->add_item(TTR("Elastic", "Transition Type"), Tween::TRANS_ELASTIC);
|
||||
transition_selection->add_item(TTR("Cubic", "Transition Type"), Tween::TRANS_CUBIC);
|
||||
transition_selection->add_item(TTR("Circ", "Transition Type"), Tween::TRANS_CIRC);
|
||||
transition_selection->add_item(TTR("Bounce", "Transition Type"), Tween::TRANS_BOUNCE);
|
||||
transition_selection->add_item(TTR("Back", "Transition Type"), Tween::TRANS_BACK);
|
||||
transition_selection->add_item(TTR("Spring", "Transition Type"), Tween::TRANS_SPRING);
|
||||
transition_selection->select(Tween::TRANS_LINEAR); // Default
|
||||
transition_selection->add_item(String(), Tween::TRANS_LINEAR);
|
||||
transition_selection->add_item(String(), Tween::TRANS_SINE);
|
||||
transition_selection->add_item(String(), Tween::TRANS_QUINT);
|
||||
transition_selection->add_item(String(), Tween::TRANS_QUART);
|
||||
transition_selection->add_item(String(), Tween::TRANS_QUAD);
|
||||
transition_selection->add_item(String(), Tween::TRANS_EXPO);
|
||||
transition_selection->add_item(String(), Tween::TRANS_ELASTIC);
|
||||
transition_selection->add_item(String(), Tween::TRANS_CUBIC);
|
||||
transition_selection->add_item(String(), Tween::TRANS_CIRC);
|
||||
transition_selection->add_item(String(), Tween::TRANS_BOUNCE);
|
||||
transition_selection->add_item(String(), Tween::TRANS_BACK);
|
||||
transition_selection->add_item(String(), Tween::TRANS_SPRING);
|
||||
transition_selection->select(Tween::TRANS_LINEAR); // Default.
|
||||
transition_selection->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Translation context is needed.
|
||||
ease_selection = memnew(OptionButton);
|
||||
ease_selection->set_accessibility_name(TTRC("Ease Type:"));
|
||||
ease_selection->add_item(TTR("Ease In", "Ease Type"), Tween::EASE_IN);
|
||||
ease_selection->add_item(TTR("Ease Out", "Ease Type"), Tween::EASE_OUT);
|
||||
ease_selection->add_item(TTR("Ease In-Out", "Ease Type"), Tween::EASE_IN_OUT);
|
||||
ease_selection->add_item(TTR("Ease Out-In", "Ease Type"), Tween::EASE_OUT_IN);
|
||||
ease_selection->select(Tween::EASE_IN_OUT); // Default
|
||||
ease_selection->add_item(String(), Tween::EASE_IN);
|
||||
ease_selection->add_item(String(), Tween::EASE_OUT);
|
||||
ease_selection->add_item(String(), Tween::EASE_IN_OUT);
|
||||
ease_selection->add_item(String(), Tween::EASE_OUT_IN);
|
||||
ease_selection->select(Tween::EASE_IN_OUT); // Default.
|
||||
ease_selection->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Translation context is needed.
|
||||
ease_fps = memnew(SpinBox);
|
||||
ease_fps->set_min(FPS_DECIMAL);
|
||||
|
|
@ -8523,16 +8542,16 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
ease_fps->set_step(FPS_DECIMAL);
|
||||
ease_fps->set_value(30); // Default
|
||||
ease_fps->set_accessibility_name(TTRC("FPS:"));
|
||||
ease_grid->add_child(memnew(Label(TTR("Transition Type:"))));
|
||||
ease_grid->add_child(memnew(Label(TTRC("Transition Type:"))));
|
||||
ease_grid->add_child(transition_selection);
|
||||
ease_grid->add_child(memnew(Label(TTR("Ease Type:"))));
|
||||
ease_grid->add_child(memnew(Label(TTRC("Ease Type:"))));
|
||||
ease_grid->add_child(ease_selection);
|
||||
ease_grid->add_child(memnew(Label(TTR("FPS:"))));
|
||||
ease_grid->add_child(memnew(Label(TTRC("FPS:"))));
|
||||
ease_grid->add_child(ease_fps);
|
||||
|
||||
//
|
||||
bake_dialog = memnew(ConfirmationDialog);
|
||||
bake_dialog->set_title(TTR("Animation Baker"));
|
||||
bake_dialog->set_title(TTRC("Animation Baker"));
|
||||
bake_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_BAKE_ANIMATION_CONFIRM));
|
||||
add_child(bake_dialog);
|
||||
GridContainer *bake_grid = memnew(GridContainer);
|
||||
|
|
@ -8553,25 +8572,25 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
bake_fps->set_max(999);
|
||||
bake_fps->set_step(FPS_DECIMAL);
|
||||
bake_fps->set_value(30); // Default
|
||||
bake_grid->add_child(memnew(Label(TTR("3D Pos/Rot/Scl Track:"))));
|
||||
bake_grid->add_child(memnew(Label(TTRC("3D Pos/Rot/Scl Track:"))));
|
||||
bake_grid->add_child(bake_trs);
|
||||
bake_grid->add_child(memnew(Label(TTR("Blendshape Track:"))));
|
||||
bake_grid->add_child(memnew(Label(TTRC("Blendshape Track:"))));
|
||||
bake_grid->add_child(bake_blendshape);
|
||||
bake_grid->add_child(memnew(Label(TTR("Value Track:"))));
|
||||
bake_grid->add_child(memnew(Label(TTRC("Value Track:"))));
|
||||
bake_grid->add_child(bake_value);
|
||||
bake_grid->add_child(memnew(Label(TTR("FPS:"))));
|
||||
bake_grid->add_child(memnew(Label(TTRC("FPS:"))));
|
||||
bake_grid->add_child(bake_fps);
|
||||
|
||||
track_copy_dialog = memnew(ConfirmationDialog);
|
||||
add_child(track_copy_dialog);
|
||||
track_copy_dialog->set_title(TTR("Select Tracks to Copy"));
|
||||
track_copy_dialog->set_ok_button_text(TTR("Copy"));
|
||||
track_copy_dialog->set_title(TTRC("Select Tracks to Copy"));
|
||||
track_copy_dialog->set_ok_button_text(TTRC("Copy"));
|
||||
|
||||
VBoxContainer *track_copy_vbox = memnew(VBoxContainer);
|
||||
track_copy_dialog->add_child(track_copy_vbox);
|
||||
|
||||
Button *select_all_button = memnew(Button);
|
||||
select_all_button->set_text(TTR("Select All/None"));
|
||||
select_all_button->set_text(TTRC("Select All/None"));
|
||||
select_all_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationTrackEditor::_select_all_tracks_for_copy));
|
||||
track_copy_vbox->add_child(select_all_button);
|
||||
|
||||
|
|
@ -9057,14 +9076,14 @@ void AnimationMarkerEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||
bool selected = _try_select_at_ui_pos(pos, mb->is_command_or_control_pressed() || mb->is_shift_pressed(), false);
|
||||
|
||||
menu->clear();
|
||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Key")), TTR("Insert Marker..."), MENU_KEY_INSERT);
|
||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Key")), TTRC("Insert Marker..."), MENU_KEY_INSERT);
|
||||
|
||||
if (selected || selection.size() > 0) {
|
||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Edit")), TTR("Rename Marker"), MENU_KEY_RENAME);
|
||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Remove")), TTR("Delete Marker(s)"), MENU_KEY_DELETE);
|
||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Edit")), TTRC("Rename Marker"), MENU_KEY_RENAME);
|
||||
menu->add_icon_item(get_editor_theme_icon(SNAME("Remove")), TTRC("Delete Marker(s)"), MENU_KEY_DELETE);
|
||||
}
|
||||
|
||||
menu->add_icon_item(get_editor_theme_icon(should_show_all_marker_names ? SNAME("GuiChecked") : SNAME("GuiUnchecked")), TTR("Show All Marker Names"), MENU_KEY_TOGGLE_MARKER_NAMES);
|
||||
menu->add_icon_item(get_editor_theme_icon(should_show_all_marker_names ? SNAME("GuiChecked") : SNAME("GuiUnchecked")), TTRC("Show All Marker Names"), MENU_KEY_TOGGLE_MARKER_NAMES);
|
||||
menu->reset_size();
|
||||
|
||||
menu->set_position(get_screen_position() + get_local_mouse_position());
|
||||
|
|
@ -9644,7 +9663,7 @@ AnimationMarkerEdit::AnimationMarkerEdit() {
|
|||
menu->add_shortcut(ED_SHORTCUT("animation_marker_edit/toggle_marker_names", TTRC("Show All Marker Names"), Key::M), MENU_KEY_TOGGLE_MARKER_NAMES);
|
||||
|
||||
marker_insert_confirm = memnew(ConfirmationDialog);
|
||||
marker_insert_confirm->set_title(TTR("Insert Marker"));
|
||||
marker_insert_confirm->set_title(TTRC("Insert Marker"));
|
||||
marker_insert_confirm->set_hide_on_ok(false);
|
||||
marker_insert_confirm->connect(SceneStringName(confirmed), callable_mp(this, &AnimationMarkerEdit::_marker_insert_confirmed));
|
||||
add_child(marker_insert_confirm);
|
||||
|
|
@ -9654,18 +9673,18 @@ AnimationMarkerEdit::AnimationMarkerEdit() {
|
|||
marker_insert_new_name = memnew(LineEdit);
|
||||
marker_insert_new_name->connect(SceneStringName(text_changed), callable_mp(this, &AnimationMarkerEdit::_marker_insert_new_name_changed));
|
||||
marker_insert_confirm->register_text_enter(marker_insert_new_name);
|
||||
marker_insert_vbox->add_child(_create_hbox_labeled_control(TTR("Marker Name"), marker_insert_new_name));
|
||||
marker_insert_vbox->add_child(_create_hbox_labeled_control(TTRC("Marker Name"), marker_insert_new_name));
|
||||
marker_insert_color = memnew(ColorPickerButton);
|
||||
marker_insert_color->set_edit_alpha(false);
|
||||
marker_insert_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(marker_insert_color->get_picker()));
|
||||
marker_insert_vbox->add_child(_create_hbox_labeled_control(TTR("Marker Color"), marker_insert_color));
|
||||
marker_insert_vbox->add_child(_create_hbox_labeled_control(TTRC("Marker Color"), marker_insert_color));
|
||||
marker_insert_error_dialog = memnew(AcceptDialog);
|
||||
marker_insert_error_dialog->set_ok_button_text(TTR("Close"));
|
||||
marker_insert_error_dialog->set_title(TTR("Error!"));
|
||||
marker_insert_error_dialog->set_ok_button_text(TTRC("Close"));
|
||||
marker_insert_error_dialog->set_title(TTRC("Error!"));
|
||||
marker_insert_confirm->add_child(marker_insert_error_dialog);
|
||||
|
||||
marker_rename_confirm = memnew(ConfirmationDialog);
|
||||
marker_rename_confirm->set_title(TTR("Rename Marker"));
|
||||
marker_rename_confirm->set_title(TTRC("Rename Marker"));
|
||||
marker_rename_confirm->set_hide_on_ok(false);
|
||||
marker_rename_confirm->connect(SceneStringName(confirmed), callable_mp(this, &AnimationMarkerEdit::_marker_rename_confirmed));
|
||||
add_child(marker_rename_confirm);
|
||||
|
|
@ -9673,7 +9692,7 @@ AnimationMarkerEdit::AnimationMarkerEdit() {
|
|||
marker_rename_vbox->set_anchors_and_offsets_preset(Control::LayoutPreset::PRESET_FULL_RECT);
|
||||
marker_rename_confirm->add_child(marker_rename_vbox);
|
||||
Label *marker_rename_new_name_label = memnew(Label);
|
||||
marker_rename_new_name_label->set_text(TTR("Change Marker Name:"));
|
||||
marker_rename_new_name_label->set_text(TTRC("Change Marker Name:"));
|
||||
marker_rename_vbox->add_child(marker_rename_new_name_label);
|
||||
marker_rename_new_name = memnew(LineEdit);
|
||||
marker_rename_new_name->set_accessibility_name(TTRC("Change Marker Name:"));
|
||||
|
|
@ -9682,8 +9701,8 @@ AnimationMarkerEdit::AnimationMarkerEdit() {
|
|||
marker_rename_vbox->add_child(marker_rename_new_name);
|
||||
|
||||
marker_rename_error_dialog = memnew(AcceptDialog);
|
||||
marker_rename_error_dialog->set_ok_button_text(TTR("Close"));
|
||||
marker_rename_error_dialog->set_title(TTR("Error!"));
|
||||
marker_rename_error_dialog->set_ok_button_text(TTRC("Close"));
|
||||
marker_rename_error_dialog->set_title(TTRC("Error!"));
|
||||
marker_rename_confirm->add_child(marker_rename_error_dialog);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue