summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/SCsub26
-rw-r--r--editor/animation_bezier_editor.cpp118
-rw-r--r--editor/animation_bezier_editor.h2
-rw-r--r--editor/animation_track_editor.cpp717
-rw-r--r--editor/animation_track_editor.h4
-rw-r--r--editor/animation_track_editor_plugins.cpp156
-rw-r--r--editor/array_property_edit.cpp40
-rw-r--r--editor/array_property_edit.h1
-rw-r--r--editor/audio_stream_preview.cpp18
-rw-r--r--editor/code_editor.cpp178
-rw-r--r--editor/code_editor.h3
-rw-r--r--editor/connections_dialog.cpp133
-rw-r--r--editor/connections_dialog.h3
-rw-r--r--editor/create_dialog.cpp205
-rw-r--r--editor/create_dialog.h1
-rw-r--r--editor/debugger/editor_debugger_inspector.cpp33
-rw-r--r--editor/debugger/editor_debugger_inspector.h5
-rw-r--r--editor/debugger/editor_debugger_node.cpp74
-rw-r--r--editor/debugger/editor_debugger_node.h6
-rw-r--r--editor/debugger/editor_debugger_server.cpp1
-rw-r--r--editor/debugger/editor_debugger_server.h1
-rw-r--r--editor/debugger/editor_debugger_tree.cpp26
-rw-r--r--editor/debugger/editor_debugger_tree.h1
-rw-r--r--editor/debugger/editor_network_profiler.cpp7
-rw-r--r--editor/debugger/editor_network_profiler.h1
-rw-r--r--editor/debugger/editor_profiler.cpp90
-rw-r--r--editor/debugger/editor_profiler.h4
-rw-r--r--editor/debugger/editor_visual_profiler.cpp70
-rw-r--r--editor/debugger/editor_visual_profiler.h2
-rw-r--r--editor/debugger/script_editor_debugger.cpp202
-rw-r--r--editor/debugger/script_editor_debugger.h1
-rw-r--r--editor/dependency_editor.cpp87
-rw-r--r--editor/dictionary_property_edit.cpp24
-rw-r--r--editor/doc_data.cpp289
-rw-r--r--editor/doc_data.h30
-rw-r--r--editor/editor_about.cpp14
-rw-r--r--editor/editor_about.h1
-rw-r--r--editor/editor_asset_installer.cpp28
-rw-r--r--editor/editor_asset_installer.h1
-rw-r--r--editor/editor_atlas_packer.cpp24
-rw-r--r--editor/editor_audio_buses.cpp160
-rw-r--r--editor/editor_audio_buses.h13
-rw-r--r--editor/editor_autoload_settings.cpp108
-rw-r--r--editor/editor_autoload_settings.h1
-rw-r--r--editor/editor_data.cpp281
-rw-r--r--editor/editor_data.h11
-rw-r--r--editor/editor_dir_dialog.cpp25
-rw-r--r--editor/editor_export.cpp270
-rw-r--r--editor/editor_export.h22
-rw-r--r--editor/editor_feature_profile.cpp81
-rw-r--r--editor/editor_feature_profile.h4
-rw-r--r--editor/editor_file_dialog.cpp246
-rw-r--r--editor/editor_file_dialog.h1
-rw-r--r--editor/editor_file_system.cpp273
-rw-r--r--editor/editor_file_system.h5
-rw-r--r--editor/editor_folding.cpp17
-rw-r--r--editor/editor_folding.h1
-rw-r--r--editor/editor_help.cpp327
-rw-r--r--editor/editor_help.h2
-rw-r--r--editor/editor_help_search.cpp187
-rw-r--r--editor/editor_help_search.h3
-rw-r--r--editor/editor_inspector.cpp335
-rw-r--r--editor/editor_inspector.h1
-rw-r--r--editor/editor_layouts_dialog.cpp19
-rw-r--r--editor/editor_layouts_dialog.h1
-rw-r--r--editor/editor_log.cpp16
-rw-r--r--editor/editor_log.h1
-rw-r--r--editor/editor_node.cpp786
-rw-r--r--editor/editor_node.h13
-rw-r--r--editor/editor_path.cpp53
-rw-r--r--editor/editor_path.h1
-rw-r--r--editor/editor_plugin.cpp106
-rw-r--r--editor/editor_plugin.h14
-rw-r--r--editor/editor_plugin_settings.cpp13
-rw-r--r--editor/editor_plugin_settings.h1
-rw-r--r--editor/editor_properties.cpp445
-rw-r--r--editor/editor_properties.h3
-rw-r--r--editor/editor_properties_array_dict.cpp72
-rw-r--r--editor/editor_properties_array_dict.h2
-rw-r--r--editor/editor_resource_preview.cpp43
-rw-r--r--editor/editor_resource_preview.h2
-rw-r--r--editor/editor_run.cpp15
-rw-r--r--editor/editor_run_native.cpp26
-rw-r--r--editor/editor_run_native.h1
-rw-r--r--editor/editor_run_script.cpp8
-rw-r--r--editor/editor_run_script.h1
-rw-r--r--editor/editor_scale.cpp3
-rw-r--r--editor/editor_sectioned_inspector.cpp80
-rw-r--r--editor/editor_sectioned_inspector.h3
-rw-r--r--editor/editor_settings.cpp179
-rw-r--r--editor/editor_settings.h33
-rw-r--r--editor/editor_spin_slider.cpp39
-rw-r--r--editor/editor_sub_scene.cpp31
-rw-r--r--editor/editor_sub_scene.h1
-rw-r--r--editor/editor_themes.cpp3
-rw-r--r--editor/editor_vcs_interface.cpp26
-rw-r--r--editor/editor_vcs_interface.h1
-rw-r--r--editor/export_template_manager.cpp24
-rw-r--r--editor/fileserver/editor_file_server.cpp19
-rw-r--r--editor/fileserver/editor_file_server.h2
-rw-r--r--editor/filesystem_dock.cpp150
-rw-r--r--editor/filesystem_dock.h6
-rw-r--r--editor/find_in_files.cpp68
-rw-r--r--editor/groups_editor.cpp34
-rw-r--r--editor/groups_editor.h2
-rw-r--r--editor/icons/CameraEffects.svg1
-rw-r--r--editor/icons/Cubemap.svg (renamed from editor/icons/CubeMap.svg)0
-rw-r--r--editor/icons/CubemapArray.svg1
-rw-r--r--editor/icons/LightmapProbe.svg1
-rw-r--r--editor/icons/PanoramaSky.svg1
-rw-r--r--editor/icons/PanoramaSkyMaterial.svg1
-rw-r--r--editor/icons/PhysicalSkyMaterial.svg1
-rw-r--r--editor/icons/ProceduralSky.svg1
-rw-r--r--editor/icons/ProceduralSkyMaterial.svg1
-rw-r--r--editor/icons/RootMotionView.svg1
-rw-r--r--editor/icons/SCsub9
-rw-r--r--editor/icons/ShaderGlobalsOverride.svg1
-rw-r--r--editor/import/collada.cpp611
-rw-r--r--editor/import/collada.h237
-rw-r--r--editor/import/editor_import_collada.cpp306
-rw-r--r--editor/import/editor_import_collada.h1
-rw-r--r--editor/import/editor_import_plugin.cpp3
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp381
-rw-r--r--editor/import/editor_scene_importer_gltf.h150
-rw-r--r--editor/import/resource_importer_bitmask.cpp15
-rw-r--r--editor/import/resource_importer_csv.cpp8
-rw-r--r--editor/import/resource_importer_csv_translation.cpp13
-rw-r--r--editor/import/resource_importer_image.cpp9
-rw-r--r--editor/import/resource_importer_layered_texture.cpp26
-rw-r--r--editor/import/resource_importer_obj.cpp41
-rw-r--r--editor/import/resource_importer_obj.h1
-rw-r--r--editor/import/resource_importer_scene.cpp278
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/import/resource_importer_shader_file.cpp10
-rw-r--r--editor/import/resource_importer_texture.cpp58
-rw-r--r--editor/import/resource_importer_texture.h2
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp31
-rw-r--r--editor/import/resource_importer_wav.cpp37
-rw-r--r--editor/import/resource_importer_wav.h20
-rw-r--r--editor/import_dock.cpp45
-rw-r--r--editor/inspector_dock.cpp45
-rw-r--r--editor/inspector_dock.h1
-rw-r--r--editor/multi_node_edit.cpp41
-rw-r--r--editor/multi_node_edit.h1
-rw-r--r--editor/node_3d_editor_gizmos.cpp493
-rw-r--r--editor/node_3d_editor_gizmos.h23
-rw-r--r--editor/node_dock.cpp11
-rw-r--r--editor/node_dock.h1
-rw-r--r--editor/pane_drag.cpp15
-rw-r--r--editor/pane_drag.h1
-rw-r--r--editor/plugin_config_dialog.cpp4
-rw-r--r--editor/plugin_config_dialog.h1
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp184
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.h25
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp30
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.h1
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp59
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.h1
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp61
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.h1
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp268
-rw-r--r--editor/plugins/animation_player_editor_plugin.h3
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp92
-rw-r--r--editor/plugins/animation_state_machine_editor.h1
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp24
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h2
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp103
-rw-r--r--editor/plugins/asset_library_editor_plugin.h5
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp23
-rw-r--r--editor/plugins/audio_stream_editor_plugin.h2
-rw-r--r--editor/plugins/baked_lightmap_editor_plugin.cpp12
-rw-r--r--editor/plugins/baked_lightmap_editor_plugin.h1
-rw-r--r--editor/plugins/camera_3d_editor_plugin.cpp14
-rw-r--r--editor/plugins/camera_3d_editor_plugin.h2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp522
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h29
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.h2
-rw-r--r--editor/plugins/collision_polygon_3d_editor_plugin.cpp93
-rw-r--r--editor/plugins/collision_polygon_3d_editor_plugin.h2
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp27
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.cpp26
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.h1
-rw-r--r--editor/plugins/cpu_particles_3d_editor_plugin.cpp13
-rw-r--r--editor/plugins/cpu_particles_3d_editor_plugin.h2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp78
-rw-r--r--editor/plugins/debugger_editor_plugin.cpp34
-rw-r--r--editor/plugins/debugger_editor_plugin.h1
-rw-r--r--editor/plugins/editor_preview_plugins.cpp91
-rw-r--r--editor/plugins/editor_preview_plugins.h4
-rw-r--r--editor/plugins/gi_probe_editor_plugin.cpp12
-rw-r--r--editor/plugins/gi_probe_editor_plugin.h1
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.cpp42
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.h1
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp65
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.h3
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp9
-rw-r--r--editor/plugins/gradient_editor_plugin.h1
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp103
-rw-r--r--editor/plugins/item_list_editor_plugin.h6
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp30
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.h2
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp6
-rw-r--r--editor/plugins/line_2d_editor_plugin.h2
-rw-r--r--editor/plugins/material_editor_plugin.cpp44
-rw-r--r--editor/plugins/material_editor_plugin.h2
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp16
-rw-r--r--editor/plugins/mesh_editor_plugin.h2
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp53
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.h2
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp61
-rw-r--r--editor/plugins/mesh_library_editor_plugin.h2
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp44
-rw-r--r--editor/plugins/multimesh_editor_plugin.h2
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp25
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp1176
-rw-r--r--editor/plugins/node_3d_editor_plugin.h17
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp88
-rw-r--r--editor/plugins/path_2d_editor_plugin.h2
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp117
-rw-r--r--editor/plugins/path_3d_editor_plugin.h3
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.cpp11
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.h6
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp166
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h2
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp66
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.h2
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp18
-rw-r--r--editor/plugins/script_editor_plugin.cpp423
-rw-r--r--editor/plugins/script_editor_plugin.h5
-rw-r--r--editor/plugins/script_text_editor.cpp253
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/shader_editor_plugin.cpp77
-rw-r--r--editor/plugins/shader_editor_plugin.h3
-rw-r--r--editor/plugins/shader_file_editor_plugin.cpp17
-rw-r--r--editor/plugins/shader_file_editor_plugin.h2
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp10
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.h2
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp561
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.h154
-rw-r--r--editor/plugins/skeleton_ik_3d_editor_plugin.cpp19
-rw-r--r--editor/plugins/skeleton_ik_3d_editor_plugin.h1
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp56
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.h2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp162
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h2
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp10
-rw-r--r--editor/plugins/style_box_editor_plugin.h2
-rw-r--r--editor/plugins/text_editor.cpp64
-rw-r--r--editor/plugins/text_editor.h1
-rw-r--r--editor/plugins/texture_editor_plugin.cpp26
-rw-r--r--editor/plugins/texture_editor_plugin.h2
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp28
-rw-r--r--editor/plugins/texture_layered_editor_plugin.h8
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp208
-rw-r--r--editor/plugins/texture_region_editor_plugin.h1
-rw-r--r--editor/plugins/theme_editor_plugin.cpp67
-rw-r--r--editor/plugins/theme_editor_plugin.h2
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp373
-rw-r--r--editor/plugins/tile_map_editor_plugin.h32
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp296
-rw-r--r--editor/plugins/tile_set_editor_plugin.h4
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp58
-rw-r--r--editor/plugins/version_control_editor_plugin.h1
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp203
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h5
-rw-r--r--editor/progress_dialog.cpp37
-rw-r--r--editor/progress_dialog.h4
-rw-r--r--editor/project_export.cpp194
-rw-r--r--editor/project_export.h1
-rw-r--r--editor/project_manager.cpp176
-rw-r--r--editor/project_manager.h2
-rw-r--r--editor/project_settings_editor.cpp244
-rw-r--r--editor/project_settings_editor.h1
-rw-r--r--editor/property_editor.cpp342
-rw-r--r--editor/property_editor.h4
-rw-r--r--editor/property_selector.cpp99
-rw-r--r--editor/pvrtc_compress.cpp13
-rw-r--r--editor/quick_open.cpp51
-rw-r--r--editor/quick_open.h1
-rw-r--r--editor/rename_dialog.cpp28
-rw-r--r--editor/rename_dialog.h5
-rw-r--r--editor/reparent_dialog.cpp10
-rw-r--r--editor/reparent_dialog.h1
-rw-r--r--editor/run_settings_dialog.cpp14
-rw-r--r--editor/run_settings_dialog.h1
-rw-r--r--editor/scene_tree_dock.cpp486
-rw-r--r--editor/scene_tree_dock.h1
-rw-r--r--editor/scene_tree_editor.cpp273
-rw-r--r--editor/scene_tree_editor.h2
-rw-r--r--editor/script_create_dialog.cpp76
-rw-r--r--editor/settings_config_dialog.cpp52
-rw-r--r--editor/settings_config_dialog.h1
-rw-r--r--editor/shader_globals_editor.cpp7
-rw-r--r--editor/shader_globals_editor.h1
-rw-r--r--editor/translations/af.po110
-rw-r--r--editor/translations/ar.po842
-rw-r--r--editor/translations/bg.po111
-rw-r--r--editor/translations/bn.po129
-rw-r--r--editor/translations/ca.po370
-rw-r--r--editor/translations/cs.po208
-rw-r--r--editor/translations/da.po119
-rw-r--r--editor/translations/de.po319
-rw-r--r--editor/translations/de_CH.po12956
-rw-r--r--editor/translations/editor.pot93
-rw-r--r--editor/translations/el.po142
-rw-r--r--editor/translations/eo.po129
-rw-r--r--editor/translations/es.po183
-rw-r--r--editor/translations/es_AR.po158
-rw-r--r--editor/translations/et.po572
-rw-r--r--editor/translations/eu.po739
-rw-r--r--editor/translations/fa.po115
-rw-r--r--editor/translations/fi.po165
-rw-r--r--editor/translations/fil.po93
-rw-r--r--editor/translations/fr.po333
-rw-r--r--editor/translations/ga.po104
-rw-r--r--editor/translations/he.po211
-rw-r--r--editor/translations/hi.po119
-rw-r--r--editor/translations/hr.po99
-rw-r--r--editor/translations/hu.po128
-rw-r--r--editor/translations/id.po182
-rw-r--r--editor/translations/is.po93
-rw-r--r--editor/translations/it.po404
-rw-r--r--editor/translations/ja.po172
-rw-r--r--editor/translations/ka.po105
-rw-r--r--editor/translations/ko.po154
-rw-r--r--editor/translations/lt.po105
-rw-r--r--editor/translations/lv.po1025
-rw-r--r--editor/translations/mi.po93
-rw-r--r--editor/translations/ml.po93
-rw-r--r--editor/translations/mr.po93
-rw-r--r--editor/translations/ms.po93
-rw-r--r--editor/translations/nb.po156
-rw-r--r--editor/translations/nl.po147
-rw-r--r--editor/translations/or.po93
-rw-r--r--editor/translations/pl.po148
-rw-r--r--editor/translations/pr.po104
-rw-r--r--editor/translations/pt_BR.po206
-rw-r--r--editor/translations/pt_PT.po170
-rw-r--r--editor/translations/ro.po121
-rw-r--r--editor/translations/ru.po184
-rw-r--r--editor/translations/si.po96
-rw-r--r--editor/translations/sk.po751
-rw-r--r--editor/translations/sl.po127
-rw-r--r--editor/translations/sq.po117
-rw-r--r--editor/translations/sr_Cyrl.po3470
-rw-r--r--editor/translations/sr_Latn.po100
-rw-r--r--editor/translations/sv.po268
-rw-r--r--editor/translations/ta.po93
-rw-r--r--editor/translations/te.po93
-rw-r--r--editor/translations/th.po206
-rw-r--r--editor/translations/tr.po219
-rw-r--r--editor/translations/uk.po211
-rw-r--r--editor/translations/ur_PK.po107
-rw-r--r--editor/translations/vi.po115
-rw-r--r--editor/translations/zh_CN.po222
-rw-r--r--editor/translations/zh_HK.po115
-rw-r--r--editor/translations/zh_TW.po5883
359 files changed, 21293 insertions, 32998 deletions
diff --git a/editor/SCsub b/editor/SCsub
index 13ae85bbf0..651dd5fffd 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -6,6 +6,7 @@ env.editor_sources = []
import os
import os.path
+import glob
from platform_methods import run_in_subprocess
import editor_builders
@@ -40,20 +41,21 @@ if env["tools"]:
f.write(reg_exporters_inc)
f.write(reg_exporters)
- # API documentation
+ # Core API documentation.
docs = []
- doc_dirs = ["doc/classes"]
+ docs += Glob("#doc/classes/*.xml")
- for p in env.doc_class_path.values():
- if p not in doc_dirs:
- doc_dirs.append(p)
+ # Module API documentation.
+ module_dirs = []
+ for d in env.doc_class_path.values():
+ if d not in module_dirs:
+ module_dirs.append(d)
- for d in doc_dirs:
- try:
- for f in os.listdir(os.path.join(env.Dir("#").abspath, d)):
- docs.append("#" + os.path.join(d, f))
- except OSError:
- pass
+ for d in module_dirs:
+ if not os.path.isabs(d):
+ docs += Glob("#" + d + "/*.xml") # Built-in.
+ else:
+ docs += Glob(d + "/*.xml") # Custom.
_make_doc_data_class_path(os.path.join(env.Dir("#").abspath, "editor"))
@@ -61,8 +63,6 @@ if env["tools"]:
env.Depends("#editor/doc_data_compressed.gen.h", docs)
env.CommandNoCache("#editor/doc_data_compressed.gen.h", docs, run_in_subprocess(editor_builders.make_doc_header))
- import glob
-
path = env.Dir(".").abspath
# Editor translations
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 57c63dd40d..f880ece88b 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -51,7 +51,6 @@ static _FORCE_INLINE_ Vector2 _bezier_interp(real_t t, const Vector2 &start, con
}
void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) {
-
float scale = timeline->get_zoom_scale();
int limit = timeline->get_name_limit();
int right_limit = get_size().width - timeline->get_buttons_width();
@@ -69,11 +68,11 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) {
}
for (Map<float, int>::Element *E = key_order.front(); E; E = E->next()) {
-
int i = E->get();
- if (!E->next())
+ if (!E->next()) {
break;
+ }
int i_n = E->next()->get();
@@ -113,11 +112,13 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) {
int to_x = (offset_n - timeline->get_value()) * scale + limit;
int point_end = to_x;
- if (from_x > right_limit) //not visible
+ if (from_x > right_limit) { //not visible
continue;
+ }
- if (to_x < limit) //not visible
+ if (to_x < limit) { //not visible
continue;
+ }
from_x = MAX(from_x, limit);
to_x = MIN(to_x, right_limit);
@@ -127,7 +128,6 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) {
Vector2 prev_pos;
for (int j = from_x; j <= to_x; j++) {
-
float t = (j - limit) / scale + timeline->get_value();
float h;
@@ -144,7 +144,6 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) {
//narrow high and low as much as possible
for (int k = 0; k < iterations; k++) {
-
middle = (low + high) / 2;
Vector2 interp = _bezier_interp(middle, start, out_handle, in_handle, end);
@@ -183,21 +182,23 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) {
}
void AnimationBezierTrackEdit::_draw_line_clipped(const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, int p_clip_left, int p_clip_right) {
-
Vector2 from = p_from;
Vector2 to = p_to;
- if (from.x == to.x)
+ if (from.x == to.x) {
return;
+ }
if (to.x < from.x) {
SWAP(to, from);
}
- if (to.x < p_clip_left)
+ if (to.x < p_clip_left) {
return;
+ }
- if (from.x > p_clip_right)
+ if (from.x > p_clip_right) {
return;
+ }
if (to.x > p_clip_right) {
float c = (p_clip_right - from.x) / (to.x - from.x);
@@ -213,7 +214,6 @@ void AnimationBezierTrackEdit::_draw_line_clipped(const Vector2 &p_from, const V
}
void AnimationBezierTrackEdit::_notification(int p_what) {
-
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
bezier_icon = get_theme_icon("KeyBezierPoint", "EditorIcons");
bezier_handle_icon = get_theme_icon("KeyBezierHandle", "EditorIcons");
@@ -225,7 +225,6 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
}
}
if (p_what == NOTIFICATION_RESIZED) {
-
int right_limit = get_size().width - timeline->get_buttons_width();
int hsep = get_theme_constant("hseparation", "ItemList");
int vsep = get_theme_constant("vseparation", "ItemList");
@@ -234,8 +233,9 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
handle_mode_option->set_size(Vector2(timeline->get_buttons_width() - hsep * 2, handle_mode_option->get_combined_minimum_size().height));
}
if (p_what == NOTIFICATION_DRAW) {
- if (animation.is_null())
+ if (animation.is_null()) {
return;
+ }
int limit = timeline->get_name_limit();
@@ -316,11 +316,13 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
subtracks.clear();
for (int i = 0; i < animation->get_track_count(); i++) {
- if (animation->track_get_type(i) != Animation::TYPE_BEZIER)
+ if (animation->track_get_type(i) != Animation::TYPE_BEZIER) {
continue;
+ }
String path = animation->track_get_path(i);
- if (!path.begins_with(base_path))
+ if (!path.begins_with(base_path)) {
continue; //another node
+ }
path = path.replace_first(base_path, "");
Color cc = color;
@@ -365,16 +367,15 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
bool first = true;
int prev_iv = 0;
for (int i = font->get_height(); i < get_size().height; i++) {
-
float ofs = get_size().height / 2 - i;
ofs *= v_zoom;
ofs += v_scroll;
int iv = int(ofs / scale);
- if (ofs < 0)
+ if (ofs < 0) {
iv -= 1;
+ }
if (!first && iv != prev_iv) {
-
Color lc = linecolor;
lc.a *= 0.5;
draw_line(Point2(limit, i), Point2(right_limit, i), lc);
@@ -393,11 +394,9 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
float scale = timeline->get_zoom_scale();
Ref<Texture2D> point = get_theme_icon("KeyValue", "EditorIcons");
for (Map<int, Color>::Element *E = subtrack_colors.front(); E; E = E->next()) {
-
_draw_track(E->key(), E->get());
for (int i = 0; i < animation->track_get_key_count(E->key()); i++) {
-
float offset = animation->track_get_key_time(E->key(), i);
float value = animation->bezier_track_get_key_value(E->key(), i);
@@ -416,12 +415,10 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
//draw editor handles
{
-
float scale = timeline->get_zoom_scale();
edit_points.clear();
for (int i = 0; i < animation->track_get_key_count(track); i++) {
-
float offset = animation->track_get_key_time(track, i);
float value = animation->bezier_track_get_key_value(track, i);
@@ -499,20 +496,20 @@ Ref<Animation> AnimationBezierTrackEdit::get_animation() const {
}
void AnimationBezierTrackEdit::set_animation_and_track(const Ref<Animation> &p_animation, int p_track) {
-
animation = p_animation;
track = p_track;
- if (is_connected_compat("select_key", editor, "_key_selected"))
+ if (is_connected_compat("select_key", editor, "_key_selected")) {
disconnect_compat("select_key", editor, "_key_selected");
- if (is_connected_compat("deselect_key", editor, "_key_deselected"))
+ }
+ if (is_connected_compat("deselect_key", editor, "_key_deselected")) {
disconnect_compat("deselect_key", editor, "_key_deselected");
+ }
connect_compat("select_key", editor, "_key_selected", varray(p_track), CONNECT_DEFERRED);
connect_compat("deselect_key", editor, "_key_deselected", varray(p_track), CONNECT_DEFERRED);
update();
}
Size2 AnimationBezierTrackEdit::get_minimum_size() const {
-
return Vector2(1, 1);
}
@@ -524,15 +521,16 @@ void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
timeline->connect("zoom_changed", callable_mp(this, &AnimationBezierTrackEdit::_zoom_changed));
}
+
void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
connect_compat("clear_selection", editor, "_clear_selection", varray(false));
}
void AnimationBezierTrackEdit::_play_position_draw() {
-
- if (!animation.is_valid() || play_position_pos < 0)
+ if (!animation.is_valid() || play_position_pos < 0) {
return;
+ }
float scale = timeline->get_zoom_scale();
int h = get_size().height;
@@ -546,7 +544,6 @@ void AnimationBezierTrackEdit::_play_position_draw() {
}
void AnimationBezierTrackEdit::set_play_position(float p_pos) {
-
play_position_pos = p_pos;
play_position->update();
}
@@ -558,12 +555,12 @@ void AnimationBezierTrackEdit::update_play_position() {
void AnimationBezierTrackEdit::set_root(Node *p_root) {
root = p_root;
}
+
void AnimationBezierTrackEdit::_zoom_changed() {
update();
}
String AnimationBezierTrackEdit::get_tooltip(const Point2 &p_pos) const {
-
return Control::get_tooltip(p_pos);
}
@@ -574,17 +571,17 @@ void AnimationBezierTrackEdit::_clear_selection() {
}
void AnimationBezierTrackEdit::_clear_selection_for_anim(const Ref<Animation> &p_anim) {
-
- if (!(animation == p_anim))
+ if (!(animation == p_anim)) {
return;
+ }
//selection.clear();
_clear_selection();
}
void AnimationBezierTrackEdit::_select_at_anim(const Ref<Animation> &p_anim, int p_track, float p_pos) {
-
- if (!(animation == p_anim))
+ if (!(animation == p_anim)) {
return;
+ }
int idx = animation->track_find_key(p_track, p_pos, true);
ERR_FAIL_COND(idx < 0);
@@ -595,7 +592,6 @@ void AnimationBezierTrackEdit::_select_at_anim(const Ref<Animation> &p_anim, int
}
void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
-
if (p_event->is_pressed()) {
if (ED_GET_SHORTCUT("animation_editor/duplicate_selection")->is_shortcut(p_event)) {
duplicate_selection();
@@ -636,7 +632,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (mb.is_valid() && mb->get_button_index() == BUTTON_MIDDLE) {
-
if (mb->is_pressed()) {
int x = mb->get_position().x - timeline->get_name_limit();
panning_timeline_from = x / timeline->get_zoom_scale();
@@ -648,7 +643,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (mb.is_valid() && mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
-
menu_insert_key = mb->get_position();
if (menu_insert_key.x >= timeline->get_name_limit() && menu_insert_key.x <= get_size().width - timeline->get_buttons_width()) {
Vector2 popup_pos = get_global_transform().xform(mb->get_position());
@@ -669,7 +663,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
if (close_icon_rect.has_point(mb->get_position())) {
emit_signal("close_request");
return;
@@ -683,7 +676,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
for (int i = 0; i < edit_points.size(); i++) {
-
//first check point
//command makes it ignore the main point, so control point editors can be force-edited
//path 2D editing in the 3D and 2D editors works the same way
@@ -706,7 +698,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
select_single_attempt = i;
update();
} else {
-
moving_selection_attempt = true;
moving_selection = true;
moving_selection_from_key = i;
@@ -741,7 +732,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
//insert new point
if (mb->get_command() && mb->get_position().x >= timeline->get_name_limit() && mb->get_position().x < get_size().width - timeline->get_buttons_width()) {
-
Array new_point;
new_point.resize(5);
@@ -790,7 +780,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (box_selecting_attempt && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
if (box_selecting) {
//do actual select
if (!box_selecting_add) {
@@ -808,7 +797,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
Rect2 selection_rect(bs_from, bs_to - bs_from);
for (int i = 0; i < edit_points.size(); i++) {
-
if (edit_points[i].point_rect.intersects(selection_rect)) {
selection.insert(i);
}
@@ -822,7 +810,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (moving_handle != 0 && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
undo_redo->create_action(TTR("Move Bezier Points"));
undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_in_handle", track, moving_handle_key, moving_handle_left);
undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_out_handle", track, moving_handle_key, moving_handle_right);
@@ -835,7 +822,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (moving_selection_attempt && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
if (moving_selection) {
//combit it
@@ -844,20 +830,20 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
List<AnimMoveRestore> to_restore;
// 1-remove the keys
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
undo_redo->add_do_method(animation.ptr(), "track_remove_key", track, E->get());
}
// 2- remove overlapped keys
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
float newtime = editor->snap_time(animation->track_get_key_time(track, E->get()) + moving_selection_offset.x);
int idx = animation->track_find_key(track, newtime, true);
- if (idx == -1)
+ if (idx == -1) {
continue;
+ }
- if (selection.has(idx))
+ if (selection.has(idx)) {
continue; //already in selection, don't save
+ }
undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_position", track, newtime);
AnimMoveRestore amr;
@@ -871,7 +857,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
// 3-move the keys (re insert them)
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
float newpos = editor->snap_time(animation->track_get_key_time(track, E->get()) + moving_selection_offset.x);
/*
if (newpos<0)
@@ -886,7 +871,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
// 4-(undo) remove inserted keys
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
float newpos = editor->snap_time(animation->track_get_key_time(track, E->get()) + moving_selection_offset.x);
/*
if (newpos<0)
@@ -897,14 +881,12 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
// 5-(undo) reinsert keys
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
float oldpos = animation->track_get_key_time(track, E->get());
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, oldpos, animation->track_get_key_value(track, E->get()), 1);
}
// 6-(undo) reinsert overlapped keys
for (List<AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
-
AnimMoveRestore &amr = E->get();
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, 1);
}
@@ -915,7 +897,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
// 7-reselect
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
float oldpos = animation->track_get_key_time(track, E->get());
float newpos = editor->snap_time(oldpos + moving_selection_offset.x);
@@ -938,10 +919,12 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_MIDDLE) {
v_scroll += mm->get_relative().y * v_zoom;
- if (v_scroll > 100000)
+ if (v_scroll > 100000) {
v_scroll = 100000;
- if (v_scroll < -100000)
+ }
+ if (v_scroll < -100000) {
v_scroll = -100000;
+ }
int x = mm->get_position().x - timeline->get_name_limit();
float ofs = x / timeline->get_zoom_scale();
@@ -951,7 +934,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
update();
}
if (moving_selection_attempt && mm.is_valid()) {
-
if (!moving_selection) {
moving_selection = true;
select_single_attempt = -1;
@@ -965,7 +947,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (box_selecting_attempt && mm.is_valid()) {
-
if (!box_selecting) {
box_selecting = true;
box_selecting_add = mm->get_shift();
@@ -981,7 +962,6 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (moving_handle != 0 && mm.is_valid()) {
-
float y = (get_size().height / 2 - mm->get_position().y) * v_zoom + v_scroll;
float x = ((mm->get_position().x - timeline->get_name_limit()) / timeline->get_zoom_scale()) + timeline->get_value();
@@ -1026,10 +1006,8 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
void AnimationBezierTrackEdit::_menu_selected(int p_index) {
-
switch (p_index) {
case MENU_KEY_INSERT: {
-
Array new_point;
new_point.resize(5);
@@ -1062,16 +1040,16 @@ void AnimationBezierTrackEdit::_menu_selected(int p_index) {
}
void AnimationBezierTrackEdit::duplicate_selection() {
-
- if (selection.size() == 0)
+ if (selection.size() == 0) {
return;
+ }
float top_time = 1e10;
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
float t = animation->track_get_key_time(track, E->get());
- if (t < top_time)
+ if (t < top_time) {
top_time = t;
+ }
}
undo_redo->create_action(TTR("Anim Duplicate Keys"));
@@ -1079,7 +1057,6 @@ void AnimationBezierTrackEdit::duplicate_selection() {
List<Pair<int, float>> new_selection_values;
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
float t = animation->track_get_key_time(track, E->get());
float dst_time = t + (timeline->get_play_position() - top_time);
int existing_idx = animation->track_find_key(track, dst_time, true);
@@ -1093,7 +1070,6 @@ void AnimationBezierTrackEdit::duplicate_selection() {
new_selection_values.push_back(p);
if (existing_idx != -1) {
-
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, dst_time, animation->track_get_key_value(track, existing_idx), animation->track_get_key_transition(track, existing_idx));
}
}
@@ -1104,14 +1080,14 @@ void AnimationBezierTrackEdit::duplicate_selection() {
selection.clear();
for (List<Pair<int, float>>::Element *E = new_selection_values.front(); E; E = E->next()) {
-
int track = E->get().first;
float time = E->get().second;
int existing_idx = animation->track_find_key(track, time, true);
- if (existing_idx == -1)
+ if (existing_idx == -1) {
continue;
+ }
selection.insert(existing_idx);
}
@@ -1124,7 +1100,6 @@ void AnimationBezierTrackEdit::delete_selection() {
undo_redo->create_action(TTR("Anim Delete Keys"));
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
-
undo_redo->add_do_method(animation.ptr(), "track_remove_key", track, E->get());
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, animation->track_get_key_time(track, E->get()), animation->track_get_key_value(track, E->get()), 1);
}
@@ -1140,7 +1115,6 @@ void AnimationBezierTrackEdit::set_block_animation_update_ptr(bool *p_block_ptr)
}
void AnimationBezierTrackEdit::_bind_methods() {
-
ClassDB::bind_method("_gui_input", &AnimationBezierTrackEdit::_gui_input);
ClassDB::bind_method("_clear_selection", &AnimationBezierTrackEdit::_clear_selection);
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h
index 2be388fd57..1c1cde47b4 100644
--- a/editor/animation_bezier_editor.h
+++ b/editor/animation_bezier_editor.h
@@ -34,7 +34,6 @@
#include "animation_track_editor.h"
class AnimationBezierTrackEdit : public Control {
-
GDCLASS(AnimationBezierTrackEdit, Control);
enum HandleMode {
@@ -112,7 +111,6 @@ class AnimationBezierTrackEdit : public Control {
Vector2 menu_insert_key;
struct AnimMoveRestore {
-
int track;
float time;
Variant key;
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index da81732a01..8fd1f5951e 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -41,7 +41,6 @@
#include "servers/audio/audio_stream.h"
class AnimationTrackKeyEdit : public Object {
-
GDCLASS(AnimationTrackKeyEdit, Object);
public:
@@ -56,7 +55,6 @@ public:
}
static void _bind_methods() {
-
ClassDB::bind_method("_update_obj", &AnimationTrackKeyEdit::_update_obj);
ClassDB::bind_method("_key_ofs_changed", &AnimationTrackKeyEdit::_key_ofs_changed);
ClassDB::bind_method("_hide_script_from_inspector", &AnimationTrackKeyEdit::_hide_script_from_inspector);
@@ -65,11 +63,11 @@ public:
}
void _fix_node_path(Variant &value) {
-
NodePath np = value;
- if (np == NodePath())
+ if (np == NodePath()) {
return;
+ }
Node *root = EditorNode::get_singleton()->get_tree()->get_root();
@@ -83,34 +81,33 @@ public:
}
void _update_obj(const Ref<Animation> &p_anim) {
-
- if (setting || animation != p_anim)
+ if (setting || animation != p_anim) {
return;
+ }
notify_change();
}
void _key_ofs_changed(const Ref<Animation> &p_anim, float from, float to) {
-
- if (animation != p_anim || from != key_ofs)
+ if (animation != p_anim || from != key_ofs) {
return;
+ }
key_ofs = to;
- if (setting)
+ if (setting) {
return;
+ }
notify_change();
}
bool _set(const StringName &p_name, const Variant &p_value) {
-
int key = animation->track_find_key(track, key_ofs, true);
ERR_FAIL_COND_V(key == -1, false);
String name = p_name;
if (name == "time" || name == "frame") {
-
float new_time = p_value;
if (name == "frame") {
@@ -121,8 +118,9 @@ public:
new_time /= fps;
}
- if (new_time == key_ofs)
+ if (new_time == key_ofs) {
return true;
+ }
int existing = animation->track_find_key(track, new_time, true);
@@ -151,7 +149,6 @@ public:
}
if (name == "easing") {
-
float val = p_value;
float prev_val = animation->track_get_key_transition(track, key);
setting = true;
@@ -167,9 +164,7 @@ public:
}
switch (animation->track_get_type(track)) {
-
case Animation::TYPE_TRANSFORM: {
-
Dictionary d_old = animation->track_get_key_value(track, key);
Dictionary d_new = d_old.duplicate();
d_new[p_name] = p_value;
@@ -185,9 +180,7 @@ public:
return true;
} break;
case Animation::TYPE_VALUE: {
-
if (name == "value") {
-
Variant value = p_value;
if (value.get_type() == Variant::NODE_PATH) {
@@ -208,7 +201,6 @@ public:
}
} break;
case Animation::TYPE_METHOD: {
-
Dictionary d_old = animation->track_get_key_value(track, key);
Dictionary d_new = d_old.duplicate();
@@ -216,16 +208,13 @@ public:
bool mergeable = false;
if (name == "name") {
-
d_new["method"] = p_value;
} else if (name == "arg_count") {
-
Vector<Variant> args = d_old["args"];
args.resize(p_value);
d_new["args"] = args;
change_notify_deserved = true;
} else if (name.begins_with("args/")) {
-
Vector<Variant> args = d_old["args"];
int idx = name.get_slice("/", 1).to_int();
ERR_FAIL_INDEX_V(idx, args.size(), false);
@@ -241,17 +230,14 @@ public:
Variant *ptrs[1] = { &old };
args.write[idx] = Variant::construct(t, (const Variant **)ptrs, 1, err);
} else {
-
args.write[idx] = Variant::construct(t, nullptr, 0, err);
}
change_notify_deserved = true;
d_new["args"] = args;
}
} else if (what == "value") {
-
Variant value = p_value;
if (value.get_type() == Variant::NODE_PATH) {
-
_fix_node_path(value);
}
@@ -261,10 +247,11 @@ public:
}
}
- if (mergeable)
+ if (mergeable) {
undo_redo->create_action(TTR("Anim Change Call"), UndoRedo::MERGE_ENDS);
- else
+ } else {
undo_redo->create_action(TTR("Anim Change Call"));
+ }
setting = true;
undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new);
@@ -274,14 +261,13 @@ public:
undo_redo->commit_action();
setting = false;
- if (change_notify_deserved)
+ if (change_notify_deserved) {
notify_change();
+ }
return true;
} break;
case Animation::TYPE_BEZIER: {
-
if (name == "value") {
-
const Variant &value = p_value;
setting = true;
@@ -298,7 +284,6 @@ public:
}
if (name == "in_handle") {
-
const Variant &value = p_value;
setting = true;
@@ -315,7 +300,6 @@ public:
}
if (name == "out_handle") {
-
const Variant &value = p_value;
setting = true;
@@ -332,9 +316,7 @@ public:
}
} break;
case Animation::TYPE_AUDIO: {
-
if (name == "stream") {
-
Ref<AudioStream> stream = p_value;
setting = true;
@@ -351,7 +333,6 @@ public:
}
if (name == "start_offset") {
-
float value = p_value;
setting = true;
@@ -368,7 +349,6 @@ public:
}
if (name == "end_offset") {
-
float value = p_value;
setting = true;
@@ -385,9 +365,7 @@ public:
}
} break;
case Animation::TYPE_ANIMATION: {
-
if (name == "animation") {
-
StringName anim_name = p_value;
setting = true;
@@ -409,7 +387,6 @@ public:
}
bool _get(const StringName &p_name, Variant &r_ret) const {
-
int key = animation->track_find_key(track, key_ofs, true);
ERR_FAIL_COND_V(key == -1, false);
@@ -420,7 +397,6 @@ public:
}
if (name == "frame") {
-
float fps = animation->get_step();
if (fps > 0) {
fps = 1.0 / fps;
@@ -436,7 +412,6 @@ public:
switch (animation->track_get_type(track)) {
case Animation::TYPE_TRANSFORM: {
-
Dictionary d = animation->track_get_key_value(track, key);
ERR_FAIL_COND_V(!d.has(name), false);
r_ret = d[p_name];
@@ -444,7 +419,6 @@ public:
} break;
case Animation::TYPE_VALUE: {
-
if (name == "value") {
r_ret = animation->track_get_key_value(track, key);
return true;
@@ -452,11 +426,9 @@ public:
} break;
case Animation::TYPE_METHOD: {
-
Dictionary d = animation->track_get_key_value(track, key);
if (name == "name") {
-
ERR_FAIL_COND_V(!d.has("method"), false);
r_ret = d["method"];
return true;
@@ -472,7 +444,6 @@ public:
}
if (name.begins_with("args/")) {
-
int idx = name.get_slice("/", 1).to_int();
ERR_FAIL_INDEX_V(idx, args.size(), false);
@@ -490,7 +461,6 @@ public:
} break;
case Animation::TYPE_BEZIER: {
-
if (name == "value") {
r_ret = animation->bezier_track_get_key_value(track, key);
return true;
@@ -508,7 +478,6 @@ public:
} break;
case Animation::TYPE_AUDIO: {
-
if (name == "stream") {
r_ret = animation->audio_track_get_key_stream(track, key);
return true;
@@ -526,7 +495,6 @@ public:
} break;
case Animation::TYPE_ANIMATION: {
-
if (name == "animation") {
r_ret = animation->animation_track_get_key_animation(track, key);
return true;
@@ -538,9 +506,9 @@ public:
return false;
}
void _get_property_list(List<PropertyInfo> *p_list) const {
-
- if (animation.is_null())
+ if (animation.is_null()) {
return;
+ }
ERR_FAIL_INDEX(track, animation->get_track_count());
int key = animation->track_find_key(track, key_ofs, true);
@@ -554,25 +522,20 @@ public:
}
switch (animation->track_get_type(track)) {
-
case Animation::TYPE_TRANSFORM: {
-
p_list->push_back(PropertyInfo(Variant::VECTOR3, "location"));
p_list->push_back(PropertyInfo(Variant::QUAT, "rotation"));
p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale"));
} break;
case Animation::TYPE_VALUE: {
-
Variant v = animation->track_get_key_value(track, key);
if (hint.type != Variant::NIL) {
-
PropertyInfo pi = hint;
pi.name = "value";
p_list->push_back(pi);
} else {
-
PropertyHint hint = PROPERTY_HINT_NONE;
String hint_string;
@@ -580,19 +543,18 @@ public:
//could actually check the object property if exists..? yes i will!
Ref<Resource> res = v;
if (res.is_valid()) {
-
hint = PROPERTY_HINT_RESOURCE_TYPE;
hint_string = res->get_class();
}
}
- if (v.get_type() != Variant::NIL)
+ if (v.get_type() != Variant::NIL) {
p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string));
+ }
}
} break;
case Animation::TYPE_METHOD: {
-
p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1"));
@@ -601,40 +563,36 @@ public:
Vector<Variant> args = d["args"];
String vtypes;
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
-
- if (i > 0)
+ if (i > 0) {
vtypes += ",";
+ }
vtypes += Variant::get_type_name(Variant::Type(i));
}
for (int i = 0; i < args.size(); i++) {
-
p_list->push_back(PropertyInfo(Variant::INT, "args/" + itos(i) + "/type", PROPERTY_HINT_ENUM, vtypes));
- if (args[i].get_type() != Variant::NIL)
+ if (args[i].get_type() != Variant::NIL) {
p_list->push_back(PropertyInfo(args[i].get_type(), "args/" + itos(i) + "/value"));
+ }
}
} break;
case Animation::TYPE_BEZIER: {
-
p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
} break;
case Animation::TYPE_AUDIO: {
-
p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
} break;
case Animation::TYPE_ANIMATION: {
-
String animations;
if (root_path && root_path->has_node(animation->track_get_path(track))) {
-
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(root_path->get_node(animation->track_get_path(track)));
if (ap) {
List<StringName> anims;
@@ -675,7 +633,6 @@ public:
bool use_fps;
void notify_change() {
-
_change_notify();
}
@@ -698,7 +655,6 @@ public:
};
class AnimationMultiTrackKeyEdit : public Object {
-
GDCLASS(AnimationMultiTrackKeyEdit, Object);
public:
@@ -713,7 +669,6 @@ public:
}
static void _bind_methods() {
-
ClassDB::bind_method("_update_obj", &AnimationMultiTrackKeyEdit::_update_obj);
ClassDB::bind_method("_key_ofs_changed", &AnimationMultiTrackKeyEdit::_key_ofs_changed);
ClassDB::bind_method("_hide_script_from_inspector", &AnimationMultiTrackKeyEdit::_hide_script_from_inspector);
@@ -722,11 +677,11 @@ public:
}
void _fix_node_path(Variant &value, NodePath &base) {
-
NodePath np = value;
- if (np == NodePath())
+ if (np == NodePath()) {
return;
+ }
Node *root = EditorNode::get_singleton()->get_tree()->get_root();
@@ -740,23 +695,21 @@ public:
}
void _update_obj(const Ref<Animation> &p_anim) {
-
- if (setting || animation != p_anim)
+ if (setting || animation != p_anim) {
return;
+ }
notify_change();
}
void _key_ofs_changed(const Ref<Animation> &p_anim, float from, float to) {
-
- if (animation != p_anim)
+ if (animation != p_anim) {
return;
+ }
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
-
int key = 0;
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
-
float key_ofs = F->get();
if (from != key_ofs) {
key++;
@@ -766,8 +719,9 @@ public:
int track = E->key();
key_ofs_map[track][key] = to;
- if (setting)
+ if (setting) {
return;
+ }
notify_change();
@@ -777,21 +731,17 @@ public:
}
bool _set(const StringName &p_name, const Variant &p_value) {
-
bool update_obj = false;
bool change_notify_deserved = false;
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
-
int track = E->key();
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
-
float key_ofs = F->get();
int key = animation->track_find_key(track, key_ofs, true);
ERR_FAIL_COND_V(key == -1, false);
String name = p_name;
if (name == "time" || name == "frame") {
-
float new_time = p_value;
if (name == "frame") {
@@ -825,7 +775,6 @@ public:
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, new_time, v, trans);
}
} else if (name == "easing") {
-
float val = p_value;
float prev_val = animation->track_get_key_transition(track, key);
@@ -839,9 +788,7 @@ public:
}
switch (animation->track_get_type(track)) {
-
case Animation::TYPE_TRANSFORM: {
-
Dictionary d_old = animation->track_get_key_value(track, key);
Dictionary d_new = d_old.duplicate();
d_new[p_name] = p_value;
@@ -855,9 +802,7 @@ public:
update_obj = true;
} break;
case Animation::TYPE_VALUE: {
-
if (name == "value") {
-
Variant value = p_value;
if (value.get_type() == Variant::NODE_PATH) {
@@ -875,23 +820,19 @@ public:
}
} break;
case Animation::TYPE_METHOD: {
-
Dictionary d_old = animation->track_get_key_value(track, key);
Dictionary d_new = d_old.duplicate();
bool mergeable = false;
if (name == "name") {
-
d_new["method"] = p_value;
} else if (name == "arg_count") {
-
Vector<Variant> args = d_old["args"];
args.resize(p_value);
d_new["args"] = args;
change_notify_deserved = true;
} else if (name.begins_with("args/")) {
-
Vector<Variant> args = d_old["args"];
int idx = name.get_slice("/", 1).to_int();
ERR_FAIL_INDEX_V(idx, args.size(), false);
@@ -907,17 +848,14 @@ public:
Variant *ptrs[1] = { &old };
args.write[idx] = Variant::construct(t, (const Variant **)ptrs, 1, err);
} else {
-
args.write[idx] = Variant::construct(t, nullptr, 0, err);
}
change_notify_deserved = true;
d_new["args"] = args;
}
} else if (what == "value") {
-
Variant value = p_value;
if (value.get_type() == Variant::NODE_PATH) {
-
_fix_node_path(value, base_map[track]);
}
@@ -930,10 +868,11 @@ public:
Variant prev = animation->track_get_key_value(track, key);
if (!setting) {
- if (mergeable)
+ if (mergeable) {
undo_redo->create_action(TTR("Anim Multi Change Call"), UndoRedo::MERGE_ENDS);
- else
+ } else {
undo_redo->create_action(TTR("Anim Multi Change Call"));
+ }
setting = true;
}
@@ -943,9 +882,7 @@ public:
update_obj = true;
} break;
case Animation::TYPE_BEZIER: {
-
if (name == "value") {
-
const Variant &value = p_value;
if (!setting) {
@@ -957,7 +894,6 @@ public:
undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_value", track, key, prev);
update_obj = true;
} else if (name == "in_handle") {
-
const Variant &value = p_value;
if (!setting) {
@@ -969,7 +905,6 @@ public:
undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_in_handle", track, key, prev);
update_obj = true;
} else if (name == "out_handle") {
-
const Variant &value = p_value;
if (!setting) {
@@ -983,9 +918,7 @@ public:
}
} break;
case Animation::TYPE_AUDIO: {
-
if (name == "stream") {
-
Ref<AudioStream> stream = p_value;
if (!setting) {
@@ -997,7 +930,6 @@ public:
undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev);
update_obj = true;
} else if (name == "start_offset") {
-
float value = p_value;
if (!setting) {
@@ -1009,7 +941,6 @@ public:
undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, prev);
update_obj = true;
} else if (name == "end_offset") {
-
float value = p_value;
if (!setting) {
@@ -1023,9 +954,7 @@ public:
}
} break;
case Animation::TYPE_ANIMATION: {
-
if (name == "animation") {
-
StringName anim_name = p_value;
if (!setting) {
@@ -1043,7 +972,6 @@ public:
}
if (setting) {
-
if (update_obj) {
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
@@ -1052,8 +980,9 @@ public:
undo_redo->commit_action();
setting = false;
- if (change_notify_deserved)
+ if (change_notify_deserved) {
notify_change();
+ }
return true;
}
@@ -1062,12 +991,9 @@ public:
}
bool _get(const StringName &p_name, Variant &r_ret) const {
-
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
-
int track = E->key();
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
-
float key_ofs = F->get();
int key = animation->track_find_key(track, key_ofs, true);
ERR_CONTINUE(key == -1);
@@ -1079,7 +1005,6 @@ public:
}
if (name == "frame") {
-
float fps = animation->get_step();
if (fps > 0) {
fps = 1.0 / fps;
@@ -1094,9 +1019,7 @@ public:
}
switch (animation->track_get_type(track)) {
-
case Animation::TYPE_TRANSFORM: {
-
Dictionary d = animation->track_get_key_value(track, key);
ERR_FAIL_COND_V(!d.has(name), false);
r_ret = d[p_name];
@@ -1104,7 +1027,6 @@ public:
} break;
case Animation::TYPE_VALUE: {
-
if (name == "value") {
r_ret = animation->track_get_key_value(track, key);
return true;
@@ -1112,11 +1034,9 @@ public:
} break;
case Animation::TYPE_METHOD: {
-
Dictionary d = animation->track_get_key_value(track, key);
if (name == "name") {
-
ERR_FAIL_COND_V(!d.has("method"), false);
r_ret = d["method"];
return true;
@@ -1127,13 +1047,11 @@ public:
Vector<Variant> args = d["args"];
if (name == "arg_count") {
-
r_ret = args.size();
return true;
}
if (name.begins_with("args/")) {
-
int idx = name.get_slice("/", 1).to_int();
ERR_FAIL_INDEX_V(idx, args.size(), false);
@@ -1151,7 +1069,6 @@ public:
} break;
case Animation::TYPE_BEZIER: {
-
if (name == "value") {
r_ret = animation->bezier_track_get_key_value(track, key);
return true;
@@ -1169,7 +1086,6 @@ public:
} break;
case Animation::TYPE_AUDIO: {
-
if (name == "stream") {
r_ret = animation->audio_track_get_key_stream(track, key);
return true;
@@ -1187,7 +1103,6 @@ public:
} break;
case Animation::TYPE_ANIMATION: {
-
if (name == "animation") {
r_ret = animation->animation_track_get_key_animation(track, key);
return true;
@@ -1201,9 +1116,9 @@ public:
return false;
}
void _get_property_list(List<PropertyInfo> *p_list) const {
-
- if (animation.is_null())
+ if (animation.is_null()) {
return;
+ }
int first_track = -1;
float first_key = -1.0;
@@ -1212,38 +1127,38 @@ public:
bool same_track_type = true;
bool same_key_type = true;
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
-
int track = E->key();
ERR_FAIL_INDEX(track, animation->get_track_count());
- if (first_track < 0)
+ if (first_track < 0) {
first_track = track;
+ }
- if (show_time && E->value().size() > 1)
+ if (show_time && E->value().size() > 1) {
show_time = false;
+ }
if (same_track_type) {
-
if (animation->track_get_type(first_track) != animation->track_get_type(track)) {
same_track_type = false;
same_key_type = false;
}
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
-
int key = animation->track_find_key(track, F->get(), true);
ERR_FAIL_COND(key == -1);
- if (first_key < 0)
+ if (first_key < 0) {
first_key = key;
+ }
- if (animation->track_get_key_value(first_track, first_key).get_type() != animation->track_get_key_value(track, key).get_type())
+ if (animation->track_get_key_value(first_track, first_key).get_type() != animation->track_get_key_value(track, key).get_type()) {
same_key_type = false;
+ }
}
}
}
if (show_time) {
-
if (use_fps && animation->get_step() > 0) {
float max_frame = animation->get_length() / animation->get_step();
p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
@@ -1254,27 +1169,23 @@ public:
if (same_track_type) {
switch (animation->track_get_type(first_track)) {
-
case Animation::TYPE_TRANSFORM: {
-
p_list->push_back(PropertyInfo(Variant::VECTOR3, "location"));
p_list->push_back(PropertyInfo(Variant::QUAT, "rotation"));
p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale"));
} break;
case Animation::TYPE_VALUE: {
-
- if (!same_key_type)
+ if (!same_key_type) {
break;
+ }
Variant v = animation->track_get_key_value(first_track, first_key);
if (hint.type != Variant::NIL) {
-
PropertyInfo pi = hint;
pi.name = "value";
p_list->push_back(pi);
} else {
-
PropertyHint hint = PROPERTY_HINT_NONE;
String hint_string;
@@ -1282,20 +1193,19 @@ public:
//could actually check the object property if exists..? yes i will!
Ref<Resource> res = v;
if (res.is_valid()) {
-
hint = PROPERTY_HINT_RESOURCE_TYPE;
hint_string = res->get_class();
}
}
- if (v.get_type() != Variant::NIL)
+ if (v.get_type() != Variant::NIL) {
p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string));
+ }
}
p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING));
} break;
case Animation::TYPE_METHOD: {
-
p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1"));
@@ -1304,40 +1214,37 @@ public:
Vector<Variant> args = d["args"];
String vtypes;
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
-
- if (i > 0)
+ if (i > 0) {
vtypes += ",";
+ }
vtypes += Variant::get_type_name(Variant::Type(i));
}
for (int i = 0; i < args.size(); i++) {
-
p_list->push_back(PropertyInfo(Variant::INT, "args/" + itos(i) + "/type", PROPERTY_HINT_ENUM, vtypes));
- if (args[i].get_type() != Variant::NIL)
+ if (args[i].get_type() != Variant::NIL) {
p_list->push_back(PropertyInfo(args[i].get_type(), "args/" + itos(i) + "/value"));
+ }
}
} break;
case Animation::TYPE_BEZIER: {
-
p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
} break;
case Animation::TYPE_AUDIO: {
-
p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
} break;
case Animation::TYPE_ANIMATION: {
-
- if (key_ofs_map.size() > 1)
+ if (key_ofs_map.size() > 1) {
break;
+ }
String animations;
if (root_path && root_path->has_node(animation->track_get_path(first_track))) {
-
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(root_path->get_node(animation->track_get_path(first_track)));
if (ap) {
List<StringName> anims;
@@ -1376,7 +1283,6 @@ public:
UndoRedo *undo_redo;
void notify_change() {
-
_change_notify();
}
@@ -1397,14 +1303,12 @@ public:
};
void AnimationTimelineEdit::_zoom_changed(double) {
-
update();
play_position->update();
emit_signal("zoom_changed");
}
float AnimationTimelineEdit::get_zoom_scale() const {
-
float zv = zoom->get_max() - zoom->get_value();
if (zv < 1) {
zv = 1.0 - zv;
@@ -1415,9 +1319,9 @@ float AnimationTimelineEdit::get_zoom_scale() const {
}
void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
-
- if (editing)
+ if (editing) {
return;
+ }
p_new_len = MAX(0.001, p_new_len);
if (use_fps && animation->get_step() > 0) {
@@ -1436,7 +1340,6 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
}
void AnimationTimelineEdit::_anim_loop_pressed() {
-
undo_redo->create_action(TTR("Change Animation Loop"));
undo_redo->add_do_method(animation.ptr(), "set_loop", loop->is_pressed());
undo_redo->add_undo_method(animation.ptr(), "set_loop", animation->has_loop());
@@ -1444,7 +1347,6 @@ void AnimationTimelineEdit::_anim_loop_pressed() {
}
int AnimationTimelineEdit::get_buttons_width() const {
-
Ref<Texture2D> interp_mode = get_theme_icon("TrackContinuous", "EditorIcons");
Ref<Texture2D> interp_type = get_theme_icon("InterpRaw", "EditorIcons");
Ref<Texture2D> loop_type = get_theme_icon("InterpWrapClamp", "EditorIcons");
@@ -1458,7 +1360,6 @@ int AnimationTimelineEdit::get_buttons_width() const {
}
int AnimationTimelineEdit::get_name_limit() const {
-
Ref<Texture2D> hsize_icon = get_theme_icon("Hsize", "EditorIcons");
int limit = MAX(name_limit, add_track->get_minimum_size().width + hsize_icon->get_width());
@@ -1469,7 +1370,6 @@ int AnimationTimelineEdit::get_name_limit() const {
}
void AnimationTimelineEdit::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
add_track->set_icon(get_theme_icon("Add", "EditorIcons"));
loop->set_icon(get_theme_icon("Loop", "EditorIcons"));
@@ -1490,11 +1390,11 @@ void AnimationTimelineEdit::_notification(int p_what) {
}
if (p_what == NOTIFICATION_DRAW) {
-
int key_range = get_size().width - get_buttons_width() - get_name_limit();
- if (!animation.is_valid())
+ if (!animation.is_valid()) {
return;
+ }
Ref<Font> font = get_theme_font("font", "Label");
Color color = get_theme_color("font_color", "Label");
@@ -1504,8 +1404,9 @@ void AnimationTimelineEdit::_notification(int p_what) {
int h = get_size().height;
float l = animation->get_length();
- if (l <= 0)
+ if (l <= 0) {
l = 0.001; //avoid crashor
+ }
Ref<Texture2D> hsize_icon = get_theme_icon("Hsize", "EditorIcons");
hsize_rect = Rect2(get_name_limit() - hsize_icon->get_width() - 2 * EDSCALE, (get_size().height - hsize_icon->get_height()) / 2, hsize_icon->get_width(), hsize_icon->get_height());
@@ -1515,24 +1416,24 @@ void AnimationTimelineEdit::_notification(int p_what) {
float time_min = 0;
float time_max = animation->get_length();
for (int i = 0; i < animation->get_track_count(); i++) {
-
if (animation->track_get_key_count(i) > 0) {
-
float beg = animation->track_get_key_time(i, 0);
/*if (animation->track_get_type(i) == Animation::TYPE_BEZIER) {
beg += animation->bezier_track_get_key_in_handle(i, 0).x;
}* not worth it since they have no use */
- if (beg < time_min)
+ if (beg < time_min) {
time_min = beg;
+ }
float end = animation->track_get_key_time(i, animation->track_get_key_count(i) - 1);
/*if (animation->track_get_type(i) == Animation::TYPE_BEZIER) {
end += animation->bezier_track_get_key_out_handle(i, animation->track_get_key_count(i) - 1).x;
} not worth it since they have no use */
- if (end > time_max)
+ if (end > time_max) {
time_max = end;
+ }
}
}
@@ -1548,7 +1449,6 @@ void AnimationTimelineEdit::_notification(int p_what) {
hscroll->show();
} else {
-
hscroll->hide();
}
}
@@ -1564,15 +1464,15 @@ void AnimationTimelineEdit::_notification(int p_what) {
linecolor.a = 0.2;
{
-
draw_rect(Rect2(Point2(get_name_limit(), 0), Point2(zoomw - 1, h)), notimecol);
if (begin_px < zoomw && end_px > 0) {
-
- if (begin_px < 0)
+ if (begin_px < 0) {
begin_px = 0;
- if (end_px > zoomw)
+ }
+ if (end_px > zoomw) {
end_px = zoomw;
+ }
draw_rect(Rect2(Point2(get_name_limit() + begin_px, 0), Point2(end_px - begin_px - 1, h)), timecolor);
}
@@ -1598,37 +1498,35 @@ void AnimationTimelineEdit::_notification(int p_what) {
const int max_sc_width = String::num(max_sc).length() * max_digit_width;
while (!step_found) {
-
min = max_sc_width;
- if (decimals > 0)
+ if (decimals > 0) {
min += period_width + max_digit_width * decimals;
+ }
static const int _multp[3] = { 1, 2, 5 };
for (int i = 0; i < 3; i++) {
-
step = (_multp[i] * dec);
if (step * scale / SC_ADJ > min) {
step_found = true;
break;
}
}
- if (step_found)
+ if (step_found) {
break;
+ }
dec *= 10;
decimals--;
- if (decimals < 0)
+ if (decimals < 0) {
decimals = 0;
+ }
}
if (use_fps) {
-
float step_size = animation->get_step();
if (step_size > 0) {
-
int prev_frame_ofs = -10000000;
for (int i = 0; i < zoomw; i++) {
-
float pos = get_value() + double(i) / scale;
float prev = get_value() + (double(i) - 1.0) / scale;
@@ -1638,7 +1536,6 @@ void AnimationTimelineEdit::_notification(int p_what) {
bool sub = Math::floor(prev) == Math::floor(pos);
if (frame != prev_frame && i >= prev_frame_ofs) {
-
draw_line(Point2(get_name_limit() + i, 0), Point2(get_name_limit() + i, h), linecolor, Math::round(EDSCALE));
draw_string(font, Point2(get_name_limit() + i + 3 * EDSCALE, (h - font->get_height()) / 2 + font->get_ascent()).floor(), itos(frame), sub ? color_time_dec : color_time_sec, zoomw - i);
@@ -1649,7 +1546,6 @@ void AnimationTimelineEdit::_notification(int p_what) {
} else {
for (int i = 0; i < zoomw; i++) {
-
float pos = get_value() + double(i) / scale;
float prev = get_value() + (double(i) - 1.0) / scale;
@@ -1658,7 +1554,6 @@ void AnimationTimelineEdit::_notification(int p_what) {
bool sub = (sc % SC_ADJ);
if ((sc / step) != (prev_sc / step) || (prev_sc < 0 && sc >= 0)) {
-
int scd = sc < 0 ? prev_sc : sc;
draw_line(Point2(get_name_limit() + i, 0), Point2(get_name_limit() + i, h), linecolor, Math::round(EDSCALE));
draw_string(font, Point2(get_name_limit() + i + 3, (h - font->get_height()) / 2 + font->get_ascent()).floor(), String::num((scd - (scd % step)) / double(SC_ADJ), decimals), sub ? color_time_dec : color_time_sec, zoomw - i);
@@ -1686,7 +1581,6 @@ void AnimationTimelineEdit::set_animation(const Ref<Animation> &p_animation) {
}
Size2 AnimationTimelineEdit::get_minimum_size() const {
-
Size2 ms = add_track->get_minimum_size();
Ref<Font> font = get_theme_font("font", "Label");
ms.height = MAX(ms.height, font->get_height());
@@ -1704,7 +1598,6 @@ void AnimationTimelineEdit::set_zoom(Range *p_zoom) {
}
void AnimationTimelineEdit::set_play_position(float p_pos) {
-
play_position_pos = p_pos;
play_position->update();
}
@@ -1718,9 +1611,9 @@ void AnimationTimelineEdit::update_play_position() {
}
void AnimationTimelineEdit::update_values() {
-
- if (!animation.is_valid() || editing)
+ if (!animation.is_valid() || editing) {
return;
+ }
editing = true;
if (use_fps && animation->get_step() > 0) {
@@ -1739,9 +1632,9 @@ void AnimationTimelineEdit::update_values() {
}
void AnimationTimelineEdit::_play_position_draw() {
-
- if (!animation.is_valid() || play_position_pos < 0)
+ if (!animation.is_valid() || play_position_pos < 0) {
return;
+ }
float scale = get_zoom_scale();
int h = play_position->get_size().height;
@@ -1759,11 +1652,9 @@ void AnimationTimelineEdit::_play_position_draw() {
}
void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && hsize_rect.has_point(mb->get_position())) {
-
dragging_hsize = true;
dragging_hsize_from = mb->get_position().x;
dragging_hsize_at = name_limit;
@@ -1773,7 +1664,6 @@ void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
dragging_hsize = false;
}
if (mb.is_valid() && mb->get_position().x > get_name_limit() && mb->get_position().x < (get_size().width - get_buttons_width())) {
-
if (!panning_timeline && mb->get_button_index() == BUTTON_LEFT) {
int x = mb->get_position().x - get_name_limit();
@@ -1800,7 +1690,6 @@ void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
-
if (hsize_rect.has_point(mm->get_position())) {
// Change the cursor to indicate that the track name column's width can be adjusted
set_default_cursor_shape(Control::CURSOR_HSIZE);
@@ -1834,12 +1723,12 @@ void AnimationTimelineEdit::set_use_fps(bool p_use_fps) {
update_values();
update();
}
+
bool AnimationTimelineEdit::is_using_fps() const {
return use_fps;
}
void AnimationTimelineEdit::set_hscroll(HScrollBar *p_hscroll) {
-
hscroll = p_hscroll;
}
@@ -1858,7 +1747,6 @@ void AnimationTimelineEdit::_bind_methods() {
}
AnimationTimelineEdit::AnimationTimelineEdit() {
-
use_fps = false;
editing = false;
name_limit = 150 * EDSCALE;
@@ -1914,11 +1802,10 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
////////////////////////////////////
void AnimationTrackEdit::_notification(int p_what) {
-
if (p_what == NOTIFICATION_DRAW) {
-
- if (animation.is_null())
+ if (animation.is_null()) {
return;
+ }
ERR_FAIL_INDEX(track, animation->get_track_count());
int limit = timeline->get_name_limit();
@@ -1947,7 +1834,6 @@ void AnimationTrackEdit::_notification(int p_what) {
// NAMES AND ICONS //
{
-
Ref<Texture2D> check = animation->track_is_enabled(track) ? get_theme_icon("checked", "CheckBox") : get_theme_icon("unchecked", "CheckBox");
int ofs = in_group ? check->get_width() : 0; //not the best reference for margin but..
@@ -1973,7 +1859,6 @@ void AnimationTrackEdit::_notification(int p_what) {
}
if (in_group) {
-
if (animation->track_get_type(track) == Animation::TYPE_METHOD) {
text = TTR("Functions:");
} else if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
@@ -2020,14 +1905,12 @@ void AnimationTrackEdit::_notification(int p_what) {
int limit_end = get_size().width - timeline->get_buttons_width();
for (int i = 0; i < animation->track_get_key_count(track); i++) {
-
float offset = animation->track_get_key_time(track, i) - timeline->get_value();
if (editor->is_key_selected(track, i) && editor->is_moving_selection()) {
offset = editor->snap_time(offset + editor->get_moving_selection_offset(), true);
}
offset = offset * scale + limit;
if (i < animation->track_get_key_count(track) - 1) {
-
float offset_n = animation->track_get_key_time(track, i + 1) - timeline->get_value();
if (editor->is_key_selected(track, i + 1) && editor->is_moving_selection()) {
offset_n = editor->snap_time(offset_n + editor->get_moving_selection_offset());
@@ -2046,7 +1929,6 @@ void AnimationTrackEdit::_notification(int p_what) {
// BUTTONS //
{
-
Ref<Texture2D> wrap_icon[2] = {
get_theme_icon("InterpWrapClamp", "EditorIcons"),
get_theme_icon("InterpWrapLoop", "EditorIcons"),
@@ -2220,15 +2102,17 @@ void AnimationTrackEdit::_notification(int p_what) {
}
int AnimationTrackEdit::get_key_height() const {
- if (!animation.is_valid())
+ if (!animation.is_valid()) {
return 0;
+ }
return type_icon->get_height();
}
-Rect2 AnimationTrackEdit::get_key_rect(int p_index, float p_pixels_sec) {
- if (!animation.is_valid())
+Rect2 AnimationTrackEdit::get_key_rect(int p_index, float p_pixels_sec) {
+ if (!animation.is_valid()) {
return Rect2();
+ }
Rect2 rect = Rect2(-type_icon->get_width() / 2, 0, type_icon->get_width(), get_size().height);
//make it a big easier to click
@@ -2242,15 +2126,18 @@ bool AnimationTrackEdit::is_key_selectable_by_distance() const {
}
void AnimationTrackEdit::draw_key_link(int p_index, float p_pixels_sec, int p_x, int p_next_x, int p_clip_left, int p_clip_right) {
- if (p_next_x < p_clip_left)
+ if (p_next_x < p_clip_left) {
return;
- if (p_x > p_clip_right)
+ }
+ if (p_x > p_clip_right) {
return;
+ }
Variant current = animation->track_get_key_value(get_track(), p_index);
Variant next = animation->track_get_key_value(get_track(), p_index + 1);
- if (current != next)
+ if (current != next) {
return;
+ }
Color color = get_theme_color("font_color", "Label");
color.a = 0.5;
@@ -2262,12 +2149,13 @@ void AnimationTrackEdit::draw_key_link(int p_index, float p_pixels_sec, int p_x,
}
void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
-
- if (!animation.is_valid())
+ if (!animation.is_valid()) {
return;
+ }
- if (p_x < p_clip_left || p_x > p_clip_right)
+ if (p_x < p_clip_left || p_x > p_clip_right) {
return;
+ }
Ref<Texture2D> icon_to_draw = p_selected ? selected_icon : type_icon;
@@ -2290,16 +2178,18 @@ void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool
Dictionary d = animation->track_get_key_value(track, p_index);
String text;
- if (d.has("method"))
+ if (d.has("method")) {
text += String(d["method"]);
+ }
text += "(";
Vector<Variant> args;
- if (d.has("args"))
+ if (d.has("args")) {
args = d["args"];
+ }
for (int i = 0; i < args.size(); i++) {
-
- if (i > 0)
+ if (i > 0) {
text += ", ";
+ }
text += String(args[i]);
}
text += ")";
@@ -2315,14 +2205,15 @@ void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool
//helper
void AnimationTrackEdit::draw_rect_clipped(const Rect2 &p_rect, const Color &p_color, bool p_filled) {
-
int clip_left = timeline->get_name_limit();
int clip_right = get_size().width - timeline->get_buttons_width();
- if (p_rect.position.x > clip_right)
+ if (p_rect.position.x > clip_right) {
return;
- if (p_rect.position.x + p_rect.size.x < clip_left)
+ }
+ if (p_rect.position.x + p_rect.size.x < clip_left) {
return;
+ }
Rect2 clip = Rect2(clip_left, 0, clip_right - clip_left, get_size().height);
draw_rect(clip.clip(p_rect), p_color, p_filled);
}
@@ -2334,20 +2225,20 @@ void AnimationTrackEdit::draw_fg(int p_clip_left, int p_clip_right) {
}
void AnimationTrackEdit::draw_texture_clipped(const Ref<Texture2D> &p_texture, const Vector2 &p_pos) {
-
draw_texture_region_clipped(p_texture, Rect2(p_pos, p_texture->get_size()), Rect2(Point2(), p_texture->get_size()));
}
void AnimationTrackEdit::draw_texture_region_clipped(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, const Rect2 &p_region) {
-
int clip_left = timeline->get_name_limit();
int clip_right = get_size().width - timeline->get_buttons_width();
//clip left and right
- if (clip_left > p_rect.position.x + p_rect.size.x)
+ if (clip_left > p_rect.position.x + p_rect.size.x) {
return;
- if (clip_right < p_rect.position.x)
+ }
+ if (clip_right < p_rect.position.x) {
return;
+ }
Rect2 rect = p_rect;
Rect2 region = p_region;
@@ -2364,7 +2255,6 @@ void AnimationTrackEdit::draw_texture_region_clipped(const Ref<Texture2D> &p_tex
}
if (clip_right < rect.position.x + rect.size.x) {
-
int rect_pixels = rect.position.x + rect.size.x - clip_right;
int region_pixels = rect_pixels * region.size.x / rect.size.x;
@@ -2384,7 +2274,6 @@ Ref<Animation> AnimationTrackEdit::get_animation() const {
}
void AnimationTrackEdit::set_animation_and_track(const Ref<Animation> &p_animation, int p_track) {
-
animation = p_animation;
track = p_track;
update();
@@ -2410,7 +2299,6 @@ NodePath AnimationTrackEdit::get_path() const {
}
Size2 AnimationTrackEdit::get_minimum_size() const {
-
Ref<Texture2D> texture = get_theme_icon("Object", "EditorIcons");
Ref<Font> font = get_theme_font("font", "Label");
int separation = get_theme_constant("vseparation", "ItemList");
@@ -2430,14 +2318,15 @@ void AnimationTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline->connect("zoom_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed));
timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed));
}
+
void AnimationTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
}
void AnimationTrackEdit::_play_position_draw() {
-
- if (!animation.is_valid() || play_position_pos < 0)
+ if (!animation.is_valid() || play_position_pos < 0) {
return;
+ }
float scale = timeline->get_zoom_scale();
int h = get_size().height;
@@ -2451,7 +2340,6 @@ void AnimationTrackEdit::_play_position_draw() {
}
void AnimationTrackEdit::set_play_position(float p_pos) {
-
play_position_pos = p_pos;
play_position->update();
}
@@ -2478,9 +2366,9 @@ void AnimationTrackEdit::_path_entered(const String &p_text) {
}
bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const {
-
- if (root == nullptr)
+ if (root == nullptr) {
return false;
+ }
RES res;
Vector<StringName> leftover_path;
@@ -2502,7 +2390,6 @@ bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant
}
String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
-
if (check_rect.has_point(p_pos)) {
return TTR("Toggle this track on/off.");
}
@@ -2534,20 +2421,17 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
int limit_start_hitbox = limit - type_icon->get_width();
if (p_pos.x >= limit_start_hitbox && p_pos.x <= limit_end) {
-
int key_idx = -1;
float key_distance = 1e20;
// Select should happen in the opposite order of drawing for more accurate overlap select.
for (int i = animation->track_get_key_count(track) - 1; i >= 0; i--) {
-
Rect2 rect = const_cast<AnimationTrackEdit *>(this)->get_key_rect(i, timeline->get_zoom_scale());
float offset = animation->track_get_key_time(track, i) - timeline->get_value();
offset = offset * timeline->get_zoom_scale() + limit;
rect.position.x += offset;
if (rect.has_point(p_pos)) {
-
if (const_cast<AnimationTrackEdit *>(this)->is_key_selectable_by_distance()) {
float distance = ABS(offset - p_pos.x);
if (key_idx == -1 || distance < key_distance) {
@@ -2562,22 +2446,21 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
}
if (key_idx != -1) {
-
String text = TTR("Time (s): ") + rtos(animation->track_get_key_time(track, key_idx)) + "\n";
switch (animation->track_get_type(track)) {
-
case Animation::TYPE_TRANSFORM: {
-
Dictionary d = animation->track_get_key_value(track, key_idx);
- if (d.has("location"))
+ if (d.has("location")) {
text += "Pos: " + String(d["location"]) + "\n";
- if (d.has("rotation"))
+ }
+ if (d.has("rotation")) {
text += "Rot: " + String(d["rotation"]) + "\n";
- if (d.has("scale"))
+ }
+ if (d.has("scale")) {
text += "Scale: " + String(d["scale"]) + "\n";
+ }
} break;
case Animation::TYPE_VALUE: {
-
const Variant &v = animation->track_get_key_value(track, key_idx);
text += "Type: " + Variant::get_type_name(v.get_type()) + "\n";
Variant::Type valid_type = Variant::NIL;
@@ -2590,25 +2473,25 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
} break;
case Animation::TYPE_METHOD: {
-
Dictionary d = animation->track_get_key_value(track, key_idx);
- if (d.has("method"))
+ if (d.has("method")) {
text += String(d["method"]);
+ }
text += "(";
Vector<Variant> args;
- if (d.has("args"))
+ if (d.has("args")) {
args = d["args"];
+ }
for (int i = 0; i < args.size(); i++) {
-
- if (i > 0)
+ if (i > 0) {
text += ", ";
+ }
text += String(args[i]);
}
text += ")\n";
} break;
case Animation::TYPE_BEZIER: {
-
float h = animation->bezier_track_get_key_value(track, key_idx);
text += "Value: " + rtos(h) + "\n";
Vector2 ih = animation->bezier_track_get_key_in_handle(track, key_idx);
@@ -2617,7 +2500,6 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
text += "Out-Handle: " + oh + "\n";
} break;
case Animation::TYPE_AUDIO: {
-
String stream_name = "null";
RES stream = animation->audio_track_get_key_stream(track, key_idx);
if (stream.is_valid()) {
@@ -2637,7 +2519,6 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
text += "End (s): " + rtos(eo) + "\n";
} break;
case Animation::TYPE_ANIMATION: {
-
String name = animation->animation_track_get_key_animation(track, key_idx);
text += "Animation Clip: " + name + "\n";
} break;
@@ -2760,20 +2641,17 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
int limit_start_hitbox = limit - type_icon->get_width();
if (pos.x >= limit_start_hitbox && pos.x <= limit_end) {
-
int key_idx = -1;
float key_distance = 1e20;
// Select should happen in the opposite order of drawing for more accurate overlap select.
for (int i = animation->track_get_key_count(track) - 1; i >= 0; i--) {
-
Rect2 rect = get_key_rect(i, scale);
float offset = animation->track_get_key_time(track, i) - timeline->get_value();
offset = offset * scale + limit;
rect.position.x += offset;
if (rect.has_point(pos)) {
-
if (is_key_selectable_by_distance()) {
float distance = ABS(offset - pos.x);
if (key_idx == -1 || distance < key_distance) {
@@ -2845,7 +2723,6 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && clicking_on_name) {
-
if (!path) {
path_popup = memnew(Popup);
path_popup->set_wrap_controls(true);
@@ -2867,7 +2744,6 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (mb.is_valid() && moving_selection_attempt) {
-
if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
moving_selection_attempt = false;
if (moving_selection) {
@@ -2880,7 +2756,6 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
if (moving_selection && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) {
-
moving_selection_attempt = false;
moving_selection = false;
emit_signal("move_selection_cancel");
@@ -2889,7 +2764,6 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT && moving_selection_attempt) {
-
if (!moving_selection) {
moving_selection = true;
emit_signal("move_selection_begin");
@@ -2901,9 +2775,9 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
}
Variant AnimationTrackEdit::get_drag_data(const Point2 &p_point) {
-
- if (!clicking_on_name)
+ if (!clicking_on_name) {
return Variant();
+ }
Dictionary drag_data;
drag_data["type"] = "animation_track";
@@ -2923,7 +2797,6 @@ Variant AnimationTrackEdit::get_drag_data(const Point2 &p_point) {
}
bool AnimationTrackEdit::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
-
Dictionary d = p_data;
if (!d.has("type")) {
return false;
@@ -2954,8 +2827,8 @@ bool AnimationTrackEdit::can_drop_data(const Point2 &p_point, const Variant &p_d
return true;
}
-void AnimationTrackEdit::drop_data(const Point2 &p_point, const Variant &p_data) {
+void AnimationTrackEdit::drop_data(const Point2 &p_point, const Variant &p_data) {
Dictionary d = p_data;
if (!d.has("type")) {
return;
@@ -2985,13 +2858,11 @@ void AnimationTrackEdit::drop_data(const Point2 &p_point, const Variant &p_data)
}
void AnimationTrackEdit::_menu_selected(int p_index) {
-
switch (p_index) {
case MENU_CALL_MODE_CONTINUOUS:
case MENU_CALL_MODE_DISCRETE:
case MENU_CALL_MODE_TRIGGER:
case MENU_CALL_MODE_CAPTURE: {
-
Animation::UpdateMode update_mode = Animation::UpdateMode(p_index);
undo_redo->create_action(TTR("Change Animation Update Mode"));
undo_redo->add_do_method(animation.ptr(), "value_track_set_update_mode", track, update_mode);
@@ -3003,7 +2874,6 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
case MENU_INTERPOLATION_NEAREST:
case MENU_INTERPOLATION_LINEAR:
case MENU_INTERPOLATION_CUBIC: {
-
Animation::InterpolationType interp_mode = Animation::InterpolationType(p_index - MENU_INTERPOLATION_NEAREST);
undo_redo->create_action(TTR("Change Animation Interpolation Mode"));
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_type", track, interp_mode);
@@ -3013,7 +2883,6 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
} break;
case MENU_LOOP_WRAP:
case MENU_LOOP_CLAMP: {
-
bool loop_wrap = p_index == MENU_LOOP_WRAP;
undo_redo->create_action(TTR("Change Animation Loop Mode"));
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_loop_wrap", track, loop_wrap);
@@ -3042,6 +2911,7 @@ void AnimationTrackEdit::cancel_drop() {
update();
}
}
+
void AnimationTrackEdit::set_in_group(bool p_enable) {
in_group = p_enable;
update();
@@ -3055,23 +2925,22 @@ void AnimationTrackEdit::append_to_selection(const Rect2 &p_box, bool p_deselect
// Select should happen in the opposite order of drawing for more accurate overlap select.
for (int i = animation->track_get_key_count(track) - 1; i >= 0; i--) {
-
Rect2 rect = const_cast<AnimationTrackEdit *>(this)->get_key_rect(i, timeline->get_zoom_scale());
float offset = animation->track_get_key_time(track, i) - timeline->get_value();
offset = offset * timeline->get_zoom_scale() + timeline->get_name_limit();
rect.position.x += offset;
if (select_rect.intersects(rect)) {
- if (p_deselection)
+ if (p_deselection) {
emit_signal("deselect_key", i);
- else
+ } else {
emit_signal("select_key", i, false);
+ }
}
}
}
void AnimationTrackEdit::_bind_methods() {
-
ClassDB::bind_method("_gui_input", &AnimationTrackEdit::_gui_input);
ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
@@ -3147,7 +3016,6 @@ AnimationTrackEdit *AnimationTrackEditPlugin::create_value_track_edit(Object *p_
}
AnimationTrackEdit *AnimationTrackEditPlugin::create_audio_track_edit() {
-
if (get_script_instance()) {
return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_audio_track_edit").operator Object *());
}
@@ -3164,7 +3032,6 @@ AnimationTrackEdit *AnimationTrackEditPlugin::create_animation_track_edit(Object
///////////////////////////////////////
void AnimationTrackEditGroup::_notification(int p_what) {
-
if (p_what == NOTIFICATION_DRAW) {
Ref<Font> font = get_theme_font("font", "Label");
int separation = get_theme_constant("hseparation", "ItemList");
@@ -3210,7 +3077,6 @@ void AnimationTrackEditGroup::set_type_and_name(const Ref<Texture2D> &p_type, co
}
Size2 AnimationTrackEditGroup::get_minimum_size() const {
-
Ref<Font> font = get_theme_font("font", "Label");
int separation = get_theme_constant("vseparation", "ItemList");
@@ -3242,19 +3108,17 @@ AnimationTrackEditGroup::AnimationTrackEditGroup() {
//////////////////////////////////////
void AnimationTrackEditor::add_track_edit_plugin(const Ref<AnimationTrackEditPlugin> &p_plugin) {
-
- if (track_edit_plugins.find(p_plugin) != -1)
+ if (track_edit_plugins.find(p_plugin) != -1) {
return;
+ }
track_edit_plugins.push_back(p_plugin);
}
void AnimationTrackEditor::remove_track_edit_plugin(const Ref<AnimationTrackEditPlugin> &p_plugin) {
-
track_edit_plugins.erase(p_plugin);
}
void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) {
-
if (animation != p_anim && _get_track_selected() >= 0) {
track_edits[_get_track_selected()]->release_focus();
}
@@ -3302,7 +3166,6 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) {
}
Ref<Animation> AnimationTrackEditor::get_current_animation() const {
-
return animation;
}
@@ -3325,24 +3188,25 @@ void AnimationTrackEditor::set_root(Node *p_root) {
}
Node *AnimationTrackEditor::get_root() const {
-
return root;
}
void AnimationTrackEditor::update_keying() {
bool keying_enabled = is_visible_in_tree() && animation.is_valid();
- if (keying_enabled == keying)
+ if (keying_enabled == keying) {
return;
+ }
keying = keying_enabled;
- //_update_menu();
+
emit_signal("keying_changed");
}
bool AnimationTrackEditor::has_keying() const {
return keying;
}
+
Dictionary AnimationTrackEditor::get_state() const {
Dictionary state;
state["fps_mode"] = timeline->is_using_fps();
@@ -3351,6 +3215,7 @@ Dictionary AnimationTrackEditor::get_state() const {
state["v_scroll"] = scroll->get_v_scrollbar()->get_value();
return state;
}
+
void AnimationTrackEditor::set_state(const Dictionary &p_state) {
if (p_state.has("fps_mode")) {
bool fps_mode = p_state["fps_mode"];
@@ -3386,22 +3251,18 @@ void AnimationTrackEditor::cleanup() {
}
void AnimationTrackEditor::_name_limit_changed() {
-
for (int i = 0; i < track_edits.size(); i++) {
track_edits[i]->update();
}
}
void AnimationTrackEditor::_timeline_changed(float p_new_pos, bool p_drag) {
-
emit_signal("timeline_changed", p_new_pos, p_drag);
}
void AnimationTrackEditor::_track_remove_request(int p_track) {
-
int idx = p_track;
if (idx >= 0 && idx < animation->get_track_count()) {
-
undo_redo->create_action(TTR("Remove Anim Track"));
undo_redo->add_do_method(this, "_clear_selection", false);
undo_redo->add_do_method(animation.ptr(), "remove_track", idx);
@@ -3410,7 +3271,6 @@ void AnimationTrackEditor::_track_remove_request(int p_track) {
// TODO interpolation.
for (int i = 0; i < animation->track_get_key_count(idx); i++) {
-
Variant v = animation->track_get_key_value(idx, i);
float time = animation->track_get_key_time(idx, i);
float trans = animation->track_get_key_transition(idx, i);
@@ -3429,14 +3289,13 @@ void AnimationTrackEditor::_track_remove_request(int p_track) {
}
void AnimationTrackEditor::_track_grab_focus(int p_track) {
-
// Don't steal focus if not working with the track editor.
- if (Object::cast_to<AnimationTrackEdit>(get_focus_owner()))
+ if (Object::cast_to<AnimationTrackEdit>(get_focus_owner())) {
track_edits[p_track]->grab_focus();
+ }
}
void AnimationTrackEditor::set_anim_pos(float p_pos) {
-
timeline->set_play_position(p_pos);
for (int i = 0; i < track_edits.size(); i++) {
track_edits[i]->set_play_position(p_pos);
@@ -3448,11 +3307,11 @@ void AnimationTrackEditor::set_anim_pos(float p_pos) {
}
void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
-
if (insert_frame != Engine::get_singleton()->get_frames_drawn()) {
//clear insert list for the frame if frame changed
- if (insert_confirm->is_visible())
+ if (insert_confirm->is_visible()) {
return; //do nothing
+ }
insert_data.clear();
insert_query = false;
}
@@ -3460,8 +3319,9 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
for (List<InsertData>::Element *E = insert_data.front(); E; E = E->next()) {
//prevent insertion of multiple tracks
- if (E->get().path == p_id.path)
+ if (E->get().path == p_id.path) {
return; //already inserted a track for this on this frame
+ }
}
insert_data.push_back(p_id);
@@ -3472,14 +3332,17 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
int num_tracks = 0;
bool all_bezier = true;
for (int i = 0; i < insert_data.size(); i++) {
- if (insert_data[i].type != Animation::TYPE_VALUE && insert_data[i].type != Animation::TYPE_BEZIER)
+ if (insert_data[i].type != Animation::TYPE_VALUE && insert_data[i].type != Animation::TYPE_BEZIER) {
all_bezier = false;
+ }
- if (insert_data[i].track_idx == -1)
+ if (insert_data[i].track_idx == -1) {
++num_tracks;
+ }
- if (insert_data[i].type != Animation::TYPE_VALUE)
+ if (insert_data[i].type != Animation::TYPE_VALUE) {
continue;
+ }
switch (insert_data[i].value.get_type()) {
case Variant::INT:
@@ -3497,10 +3360,11 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
}
}
- if (num_tracks == 1)
+ if (num_tracks == 1) {
insert_confirm_text->set_text(vformat(TTR("Create NEW track for %s and insert key?"), p_id.query));
- else
+ } else {
insert_confirm_text->set_text(vformat(TTR("Create %d NEW tracks and insert keys?"), num_tracks));
+ }
insert_confirm_bezier->set_visible(all_bezier);
insert_confirm->get_ok()->set_text(TTR("Create"));
@@ -3520,7 +3384,6 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
}
void AnimationTrackEditor::_insert_delay() {
-
if (insert_query) {
//discard since it's entered into query mode
insert_queue = false;
@@ -3532,9 +3395,9 @@ void AnimationTrackEditor::_insert_delay() {
int last_track = animation->get_track_count();
bool advance = false;
while (insert_data.size()) {
-
- if (insert_data.front()->get().advance)
+ if (insert_data.front()->get().advance) {
advance = true;
+ }
last_track = _confirm_insert(insert_data.front()->get(), last_track);
insert_data.pop_front();
}
@@ -3543,14 +3406,16 @@ void AnimationTrackEditor::_insert_delay() {
if (advance) {
float step = animation->get_step();
- if (step == 0)
+ if (step == 0) {
step = 1;
+ }
float pos = timeline->get_play_position();
pos = Math::stepify(pos + step, step);
- if (pos > animation->get_length())
+ if (pos > animation->get_length()) {
pos = animation->get_length();
+ }
set_anim_pos(pos);
emit_signal("timeline_changed", pos, true);
}
@@ -3558,28 +3423,31 @@ void AnimationTrackEditor::_insert_delay() {
}
void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_sub, const Transform &p_xform) {
-
- if (!keying)
+ if (!keying) {
return;
- if (!animation.is_valid())
+ }
+ if (!animation.is_valid()) {
return;
+ }
ERR_FAIL_COND(!root);
//let's build a node path
String path = root->get_path_to(p_node);
- if (p_sub != "")
+ if (p_sub != "") {
path += ":" + p_sub;
+ }
NodePath np = path;
int track_idx = -1;
for (int i = 0; i < animation->get_track_count(); i++) {
-
- if (animation->track_get_type(i) != Animation::TYPE_TRANSFORM)
+ if (animation->track_get_type(i) != Animation::TYPE_TRANSFORM) {
continue;
- if (animation->track_get_path(i) != np)
+ }
+ if (animation->track_get_path(i) != np) {
continue;
+ }
track_idx = i;
break;
@@ -3601,12 +3469,10 @@ void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_
}
void AnimationTrackEditor::_insert_animation_key(NodePath p_path, const Variant &p_value) {
-
String path = p_path;
//animation property is a special case, always creates an animation track
for (int i = 0; i < animation->get_track_count(); i++) {
-
String np = animation->track_get_path(i);
if (path == np && animation->track_get_type(i) == Animation::TYPE_ANIMATION) {
@@ -3636,7 +3502,6 @@ void AnimationTrackEditor::_insert_animation_key(NodePath p_path, const Variant
}
void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_property, const Variant &p_value, bool p_only_if_exists) {
-
ERR_FAIL_COND(!root);
//let's build a node path
@@ -3655,7 +3520,6 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
EditorHistory *history = EditorNode::get_singleton()->get_editor_history();
for (int i = 1; i < history->get_path_size(); i++) {
-
String prop = history->get_path_property(i);
ERR_FAIL_COND(prop == "");
path += ":" + prop;
@@ -3670,10 +3534,10 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
bool inserted = false;
for (int i = 0; i < animation->get_track_count(); i++) {
-
if (animation->track_get_type(i) == Animation::TYPE_VALUE) {
- if (animation->track_get_path(i) != np)
+ if (animation->track_get_path(i) != np) {
continue;
+ }
InsertData id;
id.path = np;
@@ -3686,7 +3550,6 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
_query_insert(id);
inserted = true;
} else if (animation->track_get_type(i) == Animation::TYPE_BEZIER) {
-
Variant value;
String track_path = animation->track_get_path(i);
if (track_path == np) {
@@ -3698,10 +3561,12 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
if (base_path == np) {
String value_name = track_path.substr(sep + 1);
value = p_value.get(value_name);
- } else
+ } else {
continue;
- } else
+ }
+ } else {
continue;
+ }
}
InsertData id;
@@ -3717,8 +3582,9 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
}
}
- if (inserted || p_only_if_exists)
+ if (inserted || p_only_if_exists) {
return;
+ }
InsertData id;
id.path = np;
id.track_idx = -1;
@@ -3731,7 +3597,6 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
}
void AnimationTrackEditor::insert_value_key(const String &p_property, const Variant &p_value, bool p_advance) {
-
EditorHistory *history = EditorNode::get_singleton()->get_editor_history();
ERR_FAIL_COND(!root);
@@ -3754,7 +3619,6 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
}
for (int i = 1; i < history->get_path_size(); i++) {
-
String prop = history->get_path_property(i);
ERR_FAIL_COND(prop == "");
path += ":" + prop;
@@ -3769,10 +3633,10 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
bool inserted = false;
for (int i = 0; i < animation->get_track_count(); i++) {
-
if (animation->track_get_type(i) == Animation::TYPE_VALUE) {
- if (animation->track_get_path(i) != np)
+ if (animation->track_get_path(i) != np) {
continue;
+ }
InsertData id;
id.path = np;
@@ -3785,7 +3649,6 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
_query_insert(id);
inserted = true;
} else if (animation->track_get_type(i) == Animation::TYPE_BEZIER) {
-
Variant value;
if (animation->track_get_path(i) == np) {
value = p_value; //all good
@@ -3827,12 +3690,10 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
}
void AnimationTrackEditor::_confirm_insert_list() {
-
undo_redo->create_action(TTR("Anim Create & Insert"));
int last_track = animation->get_track_count();
while (insert_data.size()) {
-
last_track = _confirm_insert(insert_data.front()->get(), last_track, insert_confirm_bezier->is_pressed());
insert_data.pop_front();
}
@@ -3841,7 +3702,6 @@ void AnimationTrackEditor::_confirm_insert_list() {
}
PropertyInfo AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath &r_base_path, Variant *r_current_val) {
-
r_base_path = NodePath();
ERR_FAIL_COND_V(!animation.is_valid(), PropertyInfo());
ERR_FAIL_INDEX_V(p_idx, animation->get_track_count(), PropertyInfo());
@@ -3896,7 +3756,6 @@ PropertyInfo AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath &r_b
property_info_base.get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
-
if (E->get().name == leftover_path[leftover_path.size() - 1]) {
return E->get();
}
@@ -3955,13 +3814,12 @@ static Vector<String> _get_bezier_subindices_for_type(Variant::Type p_type, bool
}
int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, bool p_create_beziers) {
-
- if (p_last_track == -1)
+ if (p_last_track == -1) {
p_last_track = animation->get_track_count();
+ }
bool created = false;
if (p_id.track_idx < 0) {
-
if (p_create_beziers) {
bool valid;
Vector<String> subindices = _get_bezier_subindices_for_type(p_id.value.get_type(), &valid);
@@ -4002,7 +3860,6 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
h.type == Variant::PLANE ||
h.type == Variant::TRANSFORM2D ||
h.type == Variant::TRANSFORM) {
-
update_mode = Animation::UPDATE_CONTINUOUS;
}
@@ -4016,8 +3873,9 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
undo_redo->add_do_method(animation.ptr(), "add_track", p_id.type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", p_id.track_idx, p_id.path);
- if (p_id.type == Animation::TYPE_VALUE)
+ if (p_id.type == Animation::TYPE_VALUE) {
undo_redo->add_do_method(animation.ptr(), "value_track_set_update_mode", p_id.track_idx, update_mode);
+ }
} else {
undo_redo->create_action(TTR("Anim Insert Key"));
@@ -4027,14 +3885,11 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
Variant value;
switch (p_id.type) {
-
case Animation::TYPE_VALUE: {
-
value = p_id.value;
} break;
case Animation::TYPE_TRANSFORM: {
-
Transform tr = p_id.value;
Dictionary d;
d["location"] = tr.origin;
@@ -4063,13 +3918,11 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
undo_redo->add_do_method(animation.ptr(), "track_insert_key", p_id.track_idx, time, value);
if (created) {
-
// Just remove the track.
undo_redo->add_undo_method(this, "_clear_selection", false);
undo_redo->add_undo_method(animation.ptr(), "remove_track", animation->get_track_count());
p_last_track++;
} else {
-
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", p_id.track_idx, time);
int existing = animation->track_find_key(p_id.track_idx, time, true);
if (existing != -1) {
@@ -4085,12 +3938,10 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
}
void AnimationTrackEditor::show_select_node_warning(bool p_show) {
-
info_message->set_visible(p_show);
}
bool AnimationTrackEditor::is_key_selected(int p_track, int p_key) const {
-
SelectedKey sk;
sk.key = p_key;
sk.track = p_track;
@@ -4107,7 +3958,6 @@ bool AnimationTrackEditor::is_snap_enabled() const {
}
void AnimationTrackEditor::_update_tracks() {
-
int selected = _get_track_selected();
while (track_vbox->get_child_count()) {
@@ -4117,8 +3967,9 @@ void AnimationTrackEditor::_update_tracks() {
track_edits.clear();
groups.clear();
- if (animation.is_null())
+ if (animation.is_null()) {
return;
+ }
Map<String, VBoxContainer *> group_sort;
@@ -4145,7 +3996,6 @@ void AnimationTrackEditor::_update_tracks() {
}
if (animation->track_get_type(i) == Animation::TYPE_VALUE) {
-
NodePath path = animation->track_get_path(i);
if (root && root->has_node_and_resource(path)) {
@@ -4175,7 +4025,6 @@ void AnimationTrackEditor::_update_tracks() {
}
}
if (animation->track_get_type(i) == Animation::TYPE_AUDIO) {
-
for (int j = 0; j < track_edit_plugins.size(); j++) {
track_edit = track_edit_plugins.write[j]->create_audio_track_edit();
if (track_edit) {
@@ -4277,7 +4126,6 @@ void AnimationTrackEditor::_update_tracks() {
}
void AnimationTrackEditor::_animation_changed() {
-
if (animation_changing_awaiting_update) {
return; //all will be updated, don't bother with anything
}
@@ -4285,10 +4133,11 @@ void AnimationTrackEditor::_animation_changed() {
if (key_edit && key_edit->setting) {
//if editing a key, just update the edited track, makes refresh less costly
if (key_edit->track < track_edits.size()) {
- if (animation->track_get_type(key_edit->track) == Animation::TYPE_BEZIER)
+ if (animation->track_get_type(key_edit->track) == Animation::TYPE_BEZIER) {
bezier_edit->update();
- else
+ } else {
track_edits[key_edit->track]->update();
+ }
}
return;
}
@@ -4298,7 +4147,6 @@ void AnimationTrackEditor::_animation_changed() {
}
void AnimationTrackEditor::_snap_mode_changed(int p_mode) {
-
timeline->set_use_fps(p_mode == 1);
if (key_edit) {
key_edit->set_use_fps(p_mode == 1);
@@ -4325,8 +4173,8 @@ void AnimationTrackEditor::_update_step_spinbox() {
step->set_block_signals(false);
}
-void AnimationTrackEditor::_animation_update() {
+void AnimationTrackEditor::_animation_update() {
timeline->update();
timeline->update_values();
@@ -4405,7 +4253,6 @@ void AnimationTrackEditor::_update_scroll(double) {
}
void AnimationTrackEditor::_update_step(double p_new_step) {
-
undo_redo->create_action(TTR("Change Animation Step"));
float step_value = p_new_step;
if (timeline->is_using_fps()) {
@@ -4422,7 +4269,6 @@ void AnimationTrackEditor::_update_step(double p_new_step) {
}
void AnimationTrackEditor::_update_length(double p_new_len) {
-
emit_signal("animation_len_changed", p_new_len);
}
@@ -4443,7 +4289,6 @@ void AnimationTrackEditor::_dropped_track(int p_from_track, int p_to_track) {
}
void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
-
ERR_FAIL_COND(!root);
Node *node = get_node(p_path);
ERR_FAIL_COND(!node);
@@ -4462,7 +4307,6 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
} break;
case Animation::TYPE_TRANSFORM:
case Animation::TYPE_METHOD: {
-
undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);
@@ -4471,7 +4315,6 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
} break;
case Animation::TYPE_BEZIER: {
-
Vector<Variant::Type> filter;
filter.push_back(Variant::INT);
filter.push_back(Variant::FLOAT);
@@ -4486,7 +4329,6 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
prop_selector->select_property_from_instance(node);
} break;
case Animation::TYPE_AUDIO: {
-
if (!node->is_class("AudioStreamPlayer") && !node->is_class("AudioStreamPlayer2D") && !node->is_class("AudioStreamPlayer3D")) {
EditorNode::get_singleton()->show_warning(TTR("Audio tracks can only point to nodes of type:\n-AudioStreamPlayer\n-AudioStreamPlayer2D\n-AudioStreamPlayer3D"));
return;
@@ -4500,7 +4342,6 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
} break;
case Animation::TYPE_ANIMATION: {
-
if (!node->is_class("AnimationPlayer")) {
EditorNode::get_singleton()->show_warning(TTR("Animation tracks can only point to AnimationPlayer nodes."));
return;
@@ -4531,11 +4372,9 @@ void AnimationTrackEditor::_add_track(int p_type) {
}
void AnimationTrackEditor::_new_track_property_selected(String p_name) {
-
String full_path = String(adding_track_path) + ":" + p_name;
if (adding_track_type == Animation::TYPE_VALUE) {
-
Animation::UpdateMode update_mode = Animation::UPDATE_DISCRETE;
{
//hack
@@ -4554,7 +4393,6 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
h.type == Variant::PLANE ||
h.type == Variant::TRANSFORM2D ||
h.type == Variant::TRANSFORM) {
-
update_mode = Animation::UPDATE_CONTINUOUS;
}
@@ -4598,7 +4436,6 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
}
void AnimationTrackEditor::_timeline_value_changed(double) {
-
timeline->update_play_position();
for (int i = 0; i < track_edits.size(); i++) {
@@ -4615,17 +4452,16 @@ void AnimationTrackEditor::_timeline_value_changed(double) {
}
int AnimationTrackEditor::_get_track_selected() {
-
for (int i = 0; i < track_edits.size(); i++) {
- if (track_edits[i]->has_focus())
+ if (track_edits[i]->has_focus()) {
return i;
+ }
}
return -1;
}
void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
-
ERR_FAIL_INDEX(p_track, animation->get_track_count());
if (snap->is_pressed() && step->get_value() != 0) {
@@ -4661,7 +4497,6 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
} break;
case Animation::TYPE_VALUE: {
-
NodePath bp;
Variant value;
_find_hint_for_track(p_track, bp, &value);
@@ -4687,7 +4522,6 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
} break;
case Animation::TYPE_BEZIER: {
-
NodePath bp;
Variant value;
_find_hint_for_track(p_track, bp, &value);
@@ -4706,7 +4540,6 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
} break;
case Animation::TYPE_AUDIO: {
-
Dictionary ak;
ak["stream"] = RES();
ak["start_offset"] = 0;
@@ -4718,7 +4551,6 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
undo_redo->commit_action();
} break;
case Animation::TYPE_ANIMATION: {
-
StringName anim = "[stop]";
undo_redo->create_action(TTR("Add Track Key"));
@@ -4730,7 +4562,6 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
}
void AnimationTrackEditor::_add_method_key(const String &p_method) {
-
if (!root->has_node(animation->track_get_path(insert_key_from_track_call_track))) {
EditorNode::get_singleton()->show_warning(TTR("Track path is invalid, so can't add a method key."));
return;
@@ -4742,14 +4573,12 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) {
for (List<MethodInfo>::Element *E = minfo.front(); E; E = E->next()) {
if (E->get().name == p_method) {
-
Dictionary d;
d["method"] = p_method;
Array params;
int first_defarg = E->get().arguments.size() - E->get().default_arguments.size();
for (int i = 0; i < E->get().arguments.size(); i++) {
-
if (i >= first_defarg) {
Variant arg = E->get().default_arguments[i - first_defarg];
params.push_back(arg);
@@ -4774,7 +4603,6 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) {
}
void AnimationTrackEditor::_key_selected(int p_key, bool p_single, int p_track) {
-
ERR_FAIL_INDEX(p_track, animation->get_track_count());
ERR_FAIL_INDEX(p_key, animation->track_get_key_count(p_track));
@@ -4798,7 +4626,6 @@ void AnimationTrackEditor::_key_selected(int p_key, bool p_single, int p_track)
}
void AnimationTrackEditor::_key_deselected(int p_key, int p_track) {
-
ERR_FAIL_INDEX(p_track, animation->get_track_count());
ERR_FAIL_INDEX(p_key, animation->track_get_key_count(p_track));
@@ -4829,7 +4656,6 @@ void AnimationTrackEditor::_move_selection(float p_offset) {
}
struct _AnimMoveRestore {
-
int track;
float time;
Variant key;
@@ -4860,7 +4686,6 @@ void AnimationTrackEditor::_clear_key_edit() {
}
void AnimationTrackEditor::_clear_selection(bool p_update) {
-
selection.clear();
if (p_update) {
@@ -4873,13 +4698,12 @@ void AnimationTrackEditor::_clear_selection(bool p_update) {
}
void AnimationTrackEditor::_update_key_edit() {
-
_clear_key_edit();
- if (!animation.is_valid())
+ if (!animation.is_valid()) {
return;
+ }
if (selection.size() == 1) {
-
key_edit = memnew(AnimationTrackKeyEdit);
key_edit->animation = animation;
key_edit->track = selection.front()->key().track;
@@ -4896,7 +4720,6 @@ void AnimationTrackEditor::_update_key_edit() {
EditorNode::get_singleton()->push_item(key_edit);
} else if (selection.size() > 1) {
-
multi_key_edit = memnew(AnimationMultiTrackKeyEdit);
multi_key_edit->animation = animation;
@@ -4904,10 +4727,10 @@ void AnimationTrackEditor::_update_key_edit() {
Map<int, NodePath> base_map;
int first_track = -1;
for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) {
-
int track = E->key().track;
- if (first_track < 0)
+ if (first_track < 0) {
first_track = track;
+ }
if (!key_ofs_map.has(track)) {
key_ofs_map[track] = List<float>();
@@ -4931,17 +4754,17 @@ void AnimationTrackEditor::_update_key_edit() {
}
void AnimationTrackEditor::_clear_selection_for_anim(const Ref<Animation> &p_anim) {
-
- if (animation != p_anim)
+ if (animation != p_anim) {
return;
+ }
_clear_selection();
}
void AnimationTrackEditor::_select_at_anim(const Ref<Animation> &p_anim, int p_track, float p_pos) {
-
- if (animation != p_anim)
+ if (animation != p_anim) {
return;
+ }
int idx = animation->track_find_key(p_track, p_pos, true);
ERR_FAIL_COND(idx < 0);
@@ -4956,7 +4779,6 @@ void AnimationTrackEditor::_select_at_anim(const Ref<Animation> &p_anim, int p_t
}
void AnimationTrackEditor::_move_selection_commit() {
-
undo_redo->create_action(TTR("Anim Move Keys"));
List<_AnimMoveRestore> to_restore;
@@ -4964,21 +4786,21 @@ void AnimationTrackEditor::_move_selection_commit() {
float motion = moving_selection_offset;
// 1 - remove the keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key);
}
// 2 - remove overlapped keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float newtime = snap_time(E->get().pos + motion);
int idx = animation->track_find_key(E->key().track, newtime, true);
- if (idx == -1)
+ if (idx == -1) {
continue;
+ }
SelectedKey sk;
sk.key = idx;
sk.track = E->key().track;
- if (selection.has(sk))
+ if (selection.has(sk)) {
continue; //already in selection, don't save
+ }
undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newtime);
_AnimMoveRestore amr;
@@ -4993,27 +4815,23 @@ void AnimationTrackEditor::_move_selection_commit() {
// 3 - move the keys (re insert them)
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float newpos = snap_time(E->get().pos + motion);
undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
}
// 4 - (undo) remove inserted keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float newpos = snap_time(E->get().pos + motion);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newpos);
}
// 5 - (undo) reinsert keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
}
// 6 - (undo) reinsert overlapped keys
for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
-
_AnimMoveRestore &amr = E->get();
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
}
@@ -5023,7 +4841,6 @@ void AnimationTrackEditor::_move_selection_commit() {
// 7 - reselect
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float oldpos = E->get().pos;
float newpos = snap_time(oldpos + motion);
@@ -5040,8 +4857,8 @@ void AnimationTrackEditor::_move_selection_commit() {
_update_key_edit();
}
-void AnimationTrackEditor::_move_selection_cancel() {
+void AnimationTrackEditor::_move_selection_cancel() {
moving_selection = false;
for (int i = 0; i < track_edits.size(); i++) {
track_edits[i]->update();
@@ -5051,29 +4868,26 @@ void AnimationTrackEditor::_move_selection_cancel() {
bool AnimationTrackEditor::is_moving_selection() const {
return moving_selection;
}
+
float AnimationTrackEditor::get_moving_selection_offset() const {
return moving_selection_offset;
}
void AnimationTrackEditor::_box_selection_draw() {
-
const Rect2 selection_rect = Rect2(Point2(), box_selection->get_size());
box_selection->draw_rect(selection_rect, get_theme_color("box_selection_fill_color", "Editor"));
box_selection->draw_rect(selection_rect, get_theme_color("box_selection_stroke_color", "Editor"), false, Math::round(EDSCALE));
}
void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> mb = p_event;
- if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
-
+ if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_UP) {
timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() * 1.05);
scroll->accept_event();
}
- if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_UP) {
-
+ if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() / 1.05);
scroll->accept_event();
}
@@ -5084,11 +4898,9 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
box_selecting_from = scroll->get_global_transform().xform(mb->get_position());
box_select_rect = Rect2();
} else if (box_selecting) {
-
if (box_selection->is_visible_in_tree()) {
//only if moved
for (int i = 0; i < track_edits.size(); i++) {
-
Rect2 local_rect = box_select_rect;
local_rect.position -= track_edits[i]->get_global_position();
track_edits[i]->append_to_selection(local_rect, mb->get_command());
@@ -5109,12 +4921,10 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_MIDDLE) {
-
timeline->set_value(timeline->get_value() - mm->get_relative().x / timeline->get_zoom_scale());
}
if (mm.is_valid() && box_selecting) {
-
if (!(mm->get_button_mask() & BUTTON_MASK_LEFT)) {
//no longer
box_selection->hide();
@@ -5161,7 +4971,6 @@ void AnimationTrackEditor::_cancel_bezier_edit() {
}
void AnimationTrackEditor::_bezier_edit(int p_for_track) {
-
_clear_selection(); //bezier probably wants to use a separate selection mode
bezier_edit->set_root(root);
bezier_edit->set_animation_and_track(animation, p_for_track);
@@ -5173,18 +4982,18 @@ void AnimationTrackEditor::_bezier_edit(int p_for_track) {
void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
//duplicait!
if (selection.size() && animation.is_valid() && (!transpose || (_get_track_selected() >= 0 && _get_track_selected() < animation->get_track_count()))) {
-
int top_track = 0x7FFFFFFF;
float top_time = 1e10;
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
const SelectedKey &sk = E->key();
float t = animation->track_get_key_time(sk.track, sk.key);
- if (t < top_time)
+ if (t < top_time) {
top_time = t;
- if (sk.track < top_track)
+ }
+ if (sk.track < top_track) {
top_track = sk.track;
+ }
}
ERR_FAIL_COND(top_track == 0x7FFFFFFF || top_time == 1e10);
@@ -5197,7 +5006,6 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
List<Pair<int, float>> new_selection_values;
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
const SelectedKey &sk = E->key();
float t = animation->track_get_key_time(sk.track, sk.key);
@@ -5205,11 +5013,13 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
float dst_time = t + (timeline->get_play_position() - top_time);
int dst_track = sk.track + (start_track - top_track);
- if (dst_track < 0 || dst_track >= animation->get_track_count())
+ if (dst_track < 0 || dst_track >= animation->get_track_count()) {
continue;
+ }
- if (animation->track_get_type(dst_track) != animation->track_get_type(sk.track))
+ if (animation->track_get_type(dst_track) != animation->track_get_type(sk.track)) {
continue;
+ }
int existing_idx = animation->track_find_key(dst_track, dst_time, true);
@@ -5222,7 +5032,6 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
new_selection_values.push_back(p);
if (existing_idx != -1) {
-
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", dst_track, dst_time, animation->track_get_key_value(dst_track, existing_idx), animation->track_get_key_transition(dst_track, existing_idx));
}
}
@@ -5233,14 +5042,14 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
Map<SelectedKey, KeyInfo> new_selection;
for (List<Pair<int, float>>::Element *E = new_selection_values.front(); E; E = E->next()) {
-
int track = E->get().first;
float time = E->get().second;
int existing_idx = animation->track_find_key(track, time, true);
- if (existing_idx == -1)
+ if (existing_idx == -1) {
continue;
+ }
SelectedKey sk2;
sk2.track = track;
sk2.key = existing_idx;
@@ -5256,8 +5065,8 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
_update_key_edit();
}
}
-void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
+void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
last_menu_track_opt = p_option;
switch (p_option) {
case EDIT_COPY_TRACKS: {
@@ -5265,7 +5074,6 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
TreeItem *troot = track_copy_select->create_item();
for (int i = 0; i < animation->get_track_count(); i++) {
-
NodePath path = animation->track_get_path(i);
Node *node = nullptr;
@@ -5328,11 +5136,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
track_copy_dialog->popup_centered(Size2(350, 500) * EDSCALE);
} break;
case EDIT_COPY_TRACKS_CONFIRM: {
-
track_clipboard.clear();
TreeItem *root = track_copy_select->get_root();
if (root) {
-
TreeItem *it = root->get_children();
while (it) {
Dictionary md = it->get_metadata(0);
@@ -5362,7 +5168,6 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
} break;
case EDIT_PASTE_TRACKS: {
-
if (track_clipboard.size() == 0) {
EditorNode::get_singleton()->show_warning(TTR("Clipboard is empty"));
break;
@@ -5408,8 +5213,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
scale_dialog->popup_centered(Size2(200, 100) * EDSCALE);
} break;
case EDIT_SCALE_CONFIRM: {
- if (selection.empty())
+ if (selection.empty()) {
return;
+ }
float from_t = 1e20;
float to_t = -1e20;
@@ -5418,10 +5224,12 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) {
float t = animation->track_get_key_time(E->key().track, E->key().key);
- if (t < from_t)
+ if (t < from_t) {
from_t = t;
- if (t > to_t)
+ }
+ if (t > to_t) {
to_t = t;
+ }
}
len = to_t - from_t;
@@ -5429,7 +5237,6 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
pivot = timeline->get_play_position();
} else {
-
pivot = from_t;
}
@@ -5444,21 +5251,21 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
// 1-remove the keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key);
}
// 2- remove overlapped keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float newtime = (E->get().pos - from_t) * s + from_t;
int idx = animation->track_find_key(E->key().track, newtime, true);
- if (idx == -1)
+ if (idx == -1) {
continue;
+ }
SelectedKey sk;
sk.key = idx;
sk.track = E->key().track;
- if (selection.has(sk))
+ if (selection.has(sk)) {
continue; //already in selection, don't save
+ }
undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newtime);
_AnimMoveRestore amr;
@@ -5474,27 +5281,23 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
#define _NEW_POS(m_ofs) (((s > 0) ? m_ofs : from_t + (len - (m_ofs - from_t))) - pivot) * ABS(s) + from_t
// 3-move the keys (re insert them)
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float newpos = _NEW_POS(E->get().pos);
undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
}
// 4-(undo) remove inserted keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float newpos = _NEW_POS(E->get().pos);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newpos);
}
// 5-(undo) reinsert keys
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
}
// 6-(undo) reinsert overlapped keys
for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
-
_AnimMoveRestore &amr = E->get();
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
}
@@ -5504,18 +5307,17 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
// 7-reselect
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
float oldpos = E->get().pos;
float newpos = _NEW_POS(oldpos);
- if (newpos >= 0)
+ if (newpos >= 0) {
undo_redo->add_do_method(this, "_select_at_anim", animation, E->key().track, newpos);
+ }
undo_redo->add_undo_method(this, "_select_at_anim", animation, E->key().track, oldpos);
}
#undef _NEW_POS
undo_redo->commit_action();
} break;
case EDIT_DUPLICATE_SELECTION: {
-
if (bezier_edit->is_visible()) {
bezier_edit->duplicate_selection();
break;
@@ -5530,7 +5332,6 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
_anim_duplicate_keys(true);
} break;
case EDIT_DELETE_SELECTION: {
-
if (bezier_edit->is_visible()) {
bezier_edit->delete_selection();
break;
@@ -5540,7 +5341,6 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
undo_redo->create_action(TTR("Anim Delete Keys"));
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
-
undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key);
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
}
@@ -5551,34 +5351,39 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
} break;
case EDIT_GOTO_NEXT_STEP: {
-
- if (animation.is_null())
+ if (animation.is_null()) {
break;
+ }
float step = animation->get_step();
- if (step == 0)
+ if (step == 0) {
step = 1;
+ }
float pos = timeline->get_play_position();
pos = Math::stepify(pos + step, step);
- if (pos > animation->get_length())
+ if (pos > animation->get_length()) {
pos = animation->get_length();
+ }
set_anim_pos(pos);
emit_signal("timeline_changed", pos, true);
} break;
case EDIT_GOTO_PREV_STEP: {
- if (animation.is_null())
+ if (animation.is_null()) {
break;
+ }
float step = animation->get_step();
- if (step == 0)
+ if (step == 0) {
step = 1;
+ }
float pos = timeline->get_play_position();
pos = Math::stepify(pos - step, step);
- if (pos < 0)
+ if (pos < 0) {
pos = 0;
+ }
set_anim_pos(pos);
emit_signal("timeline_changed", pos, true);
@@ -5613,9 +5418,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
-
for (int i = 0; i < p_animation->get_track_count(); i++) {
-
bool prop_exists = false;
Variant::Type valid_type = Variant::NIL;
Object *obj = nullptr;
@@ -5636,17 +5439,16 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
}
if (!obj && cleanup_tracks->is_pressed()) {
-
p_animation->remove_track(i);
i--;
continue;
}
- if (!prop_exists || p_animation->track_get_type(i) != Animation::TYPE_VALUE || !cleanup_keys->is_pressed())
+ if (!prop_exists || p_animation->track_get_type(i) != Animation::TYPE_VALUE || !cleanup_keys->is_pressed()) {
continue;
+ }
for (int j = 0; j < p_animation->track_get_key_count(i); j++) {
-
Variant v = p_animation->track_get_key_value(i, j);
if (!Variant::can_convert(v.get_type(), valid_type)) {
@@ -5666,13 +5468,11 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
}
void AnimationTrackEditor::_view_group_toggle() {
-
_update_tracks();
view_group->set_icon(get_theme_icon(view_group->is_pressed() ? "AnimationTrackList" : "AnimationTrackGroup", "EditorIcons"));
}
bool AnimationTrackEditor::is_grouping_tracks() {
-
if (!view_group) {
return false;
}
@@ -5681,7 +5481,6 @@ bool AnimationTrackEditor::is_grouping_tracks() {
}
void AnimationTrackEditor::_selection_changed() {
-
if (selected_filter->is_pressed()) {
_update_tracks(); //needs updatin
} else {
@@ -5696,14 +5495,13 @@ void AnimationTrackEditor::_selection_changed() {
}
float AnimationTrackEditor::snap_time(float p_value, bool p_relative) {
-
if (is_snap_enabled()) {
-
double snap_increment;
- if (timeline->is_using_fps() && step->get_value() > 0)
+ if (timeline->is_using_fps() && step->get_value() > 0) {
snap_increment = 1.0 / step->get_value();
- else
+ } else {
snap_increment = step->get_value();
+ }
if (p_relative) {
double rel = Math::fmod(timeline->get_value(), snap_increment);
@@ -5717,22 +5515,22 @@ float AnimationTrackEditor::snap_time(float p_value, bool p_relative) {
}
void AnimationTrackEditor::_show_imported_anim_warning() {
-
// It looks terrible on a single line but the TTR extractor doesn't support line breaks yet.
EditorNode::get_singleton()->show_warning(TTR("This animation belongs to an imported scene, so changes to imported tracks will not be saved.\n\nTo enable the ability to add custom tracks, navigate to the scene's import settings and set\n\"Animation > Storage\" to \"Files\", enable \"Animation > Keep Custom Tracks\", then re-import.\nAlternatively, use an import preset that imports animations to separate files."),
TTR("Warning: Editing imported animation"));
}
void AnimationTrackEditor::_select_all_tracks_for_copy() {
-
TreeItem *track = track_copy_select->get_root()->get_children();
- if (!track)
+ if (!track) {
return;
+ }
bool all_selected = true;
while (track) {
- if (!track->is_checked(0))
+ if (!track->is_checked(0)) {
all_selected = false;
+ }
track = track->get_next();
}
@@ -5745,7 +5543,6 @@ void AnimationTrackEditor::_select_all_tracks_for_copy() {
}
void AnimationTrackEditor::_bind_methods() {
-
ClassDB::bind_method("_animation_update", &AnimationTrackEditor::_animation_update);
ClassDB::bind_method("_track_grab_focus", &AnimationTrackEditor::_track_grab_focus);
ClassDB::bind_method("_update_tracks", &AnimationTrackEditor::_update_tracks);
@@ -5955,7 +5752,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
insert_confirm_bezier->set_text(TTR("Use Bezier Curves"));
icvb->add_child(insert_confirm_bezier);
keying = false;
- moving_selection = 0;
+ moving_selection = false;
key_edit = nullptr;
multi_key_edit = nullptr;
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 96a60cc135..6a46a1e3ff 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -121,7 +121,6 @@ public:
class AnimationTrackEditor;
class AnimationTrackEdit : public Control {
-
GDCLASS(AnimationTrackEdit, Control);
enum {
@@ -354,7 +353,6 @@ class AnimationTrackEditor : public VBoxContainer {
bool keying;
struct InsertData {
-
Animation::TrackType type;
NodePath path;
int track_idx;
@@ -395,14 +393,12 @@ class AnimationTrackEditor : public VBoxContainer {
//selection
struct SelectedKey {
-
int track;
int key;
bool operator<(const SelectedKey &p_key) const { return track == p_key.track ? key < p_key.key : track < p_key.track; };
};
struct KeyInfo {
-
float pos;
};
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 0ce3ab292e..9fc67000f9 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -41,32 +41,32 @@
/// BOOL ///
int AnimationTrackEditBool::get_key_height() const {
-
Ref<Texture2D> checked = get_theme_icon("checked", "CheckBox");
return checked->get_height();
}
-Rect2 AnimationTrackEditBool::get_key_rect(int p_index, float p_pixels_sec) {
+Rect2 AnimationTrackEditBool::get_key_rect(int p_index, float p_pixels_sec) {
Ref<Texture2D> checked = get_theme_icon("checked", "CheckBox");
return Rect2(-checked->get_width() / 2, 0, checked->get_width(), get_size().height);
}
bool AnimationTrackEditBool::is_key_selectable_by_distance() const {
-
return false;
}
-void AnimationTrackEditBool::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
+void AnimationTrackEditBool::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
bool checked = get_animation()->track_get_key_value(get_track(), p_index);
Ref<Texture2D> icon = get_theme_icon(checked ? "checked" : "unchecked", "CheckBox");
Vector2 ofs(p_x - icon->get_width() / 2, int(get_size().height - icon->get_height()) / 2);
- if (ofs.x + icon->get_width() / 2 < p_clip_left)
+ if (ofs.x + icon->get_width() / 2 < p_clip_left) {
return;
+ }
- if (ofs.x + icon->get_width() / 2 > p_clip_right)
+ if (ofs.x + icon->get_width() / 2 > p_clip_right) {
return;
+ }
draw_texture(icon, ofs);
@@ -79,24 +79,21 @@ void AnimationTrackEditBool::draw_key(int p_index, float p_pixels_sec, int p_x,
/// COLOR ///
int AnimationTrackEditColor::get_key_height() const {
-
Ref<Font> font = get_theme_font("font", "Label");
return font->get_height() * 0.8;
}
-Rect2 AnimationTrackEditColor::get_key_rect(int p_index, float p_pixels_sec) {
+Rect2 AnimationTrackEditColor::get_key_rect(int p_index, float p_pixels_sec) {
Ref<Font> font = get_theme_font("font", "Label");
int fh = font->get_height() * 0.8;
return Rect2(-fh / 2, 0, fh, get_size().height);
}
bool AnimationTrackEditColor::is_key_selectable_by_distance() const {
-
return false;
}
void AnimationTrackEditColor::draw_key_link(int p_index, float p_pixels_sec, int p_x, int p_next_x, int p_clip_left, int p_clip_right) {
-
Ref<Font> font = get_theme_font("font", "Label");
int fh = (font->get_height() * 0.8);
@@ -104,8 +101,9 @@ void AnimationTrackEditColor::draw_key_link(int p_index, float p_pixels_sec, int
int x_to = p_next_x - fh / 2 + 1;
fh /= 3;
- if (x_from > p_clip_right || x_to < p_clip_left)
+ if (x_from > p_clip_right || x_to < p_clip_left) {
return;
+ }
Color color = get_animation()->track_get_key_value(get_track(), p_index);
Color color_next = get_animation()->track_get_key_value(get_track(), p_index + 1);
@@ -143,7 +141,6 @@ void AnimationTrackEditColor::draw_key_link(int p_index, float p_pixels_sec, int
}
void AnimationTrackEditColor::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
-
Color color = get_animation()->track_get_key_value(get_track(), p_index);
Ref<Font> font = get_theme_font("font", "Label");
@@ -166,11 +163,11 @@ void AnimationTrackEditColor::draw_key(int p_index, float p_pixels_sec, int p_x,
/// AUDIO ///
void AnimationTrackEditAudio::_preview_changed(ObjectID p_which) {
-
Object *object = ObjectDB::get_instance(id);
- if (!object)
+ if (!object) {
return;
+ }
Ref<AudioStream> stream = object->call("get_stream");
@@ -180,7 +177,6 @@ void AnimationTrackEditAudio::_preview_changed(ObjectID p_which) {
}
int AnimationTrackEditAudio::get_key_height() const {
-
if (!ObjectDB::get_instance(id)) {
return AnimationTrackEdit::get_key_height();
}
@@ -188,8 +184,8 @@ int AnimationTrackEditAudio::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
-Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) {
+Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -207,7 +203,6 @@ Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) {
float len = stream->get_length();
if (len == 0) {
-
Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream);
len = preview->get_length();
}
@@ -225,11 +220,10 @@ Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) {
}
bool AnimationTrackEditAudio::is_key_selectable_by_distance() const {
-
return false;
}
-void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
+void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -261,11 +255,13 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
int pixel_begin = p_x;
int pixel_end = p_x + pixel_len;
- if (pixel_end < p_clip_left)
+ if (pixel_end < p_clip_left) {
return;
+ }
- if (pixel_begin > p_clip_right)
+ if (pixel_begin > p_clip_right) {
return;
+ }
int from_x = MAX(pixel_begin, p_clip_left);
int to_x = MIN(pixel_end, p_clip_right);
@@ -276,8 +272,9 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
to_x = MIN(limit_x, to_x);
}
- if (to_x <= from_x)
+ if (to_x <= from_x) {
return;
+ }
Ref<Font> font = get_theme_font("font", "Label");
float fh = int(font->get_height() * 1.5);
@@ -289,7 +286,6 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
preview_len = preview->get_length();
for (int i = from_x; i < to_x; i++) {
-
float ofs = (i - pixel_begin) * preview_len / pixel_len;
float ofs_n = ((i + 1) - pixel_begin) * preview_len / pixel_len;
float max = preview->get_max(ofs, ofs_n) * 0.5 + 0.5;
@@ -325,7 +321,6 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
}
void AnimationTrackEditAudio::set_node(Object *p_object) {
-
id = p_object->get_instance_id();
}
@@ -339,7 +334,6 @@ AnimationTrackEditAudio::AnimationTrackEditAudio() {
/// SPRITE FRAME / FRAME_COORDS ///
int AnimationTrackEditSpriteFrame::get_key_height() const {
-
if (!ObjectDB::get_instance(id)) {
return AnimationTrackEdit::get_key_height();
}
@@ -347,8 +341,8 @@ int AnimationTrackEditSpriteFrame::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 2);
}
-Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_sec) {
+Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -358,7 +352,6 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
Size2 size;
if (Object::cast_to<Sprite2D>(object) || Object::cast_to<Sprite3D>(object)) {
-
Ref<Texture2D> texture = object->call("get_texture");
if (!texture.is_valid()) {
return AnimationTrackEdit::get_key_rect(p_index, p_pixels_sec);
@@ -380,7 +373,6 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
size.y /= vframes;
}
} else if (Object::cast_to<AnimatedSprite2D>(object) || Object::cast_to<AnimatedSprite3D>(object)) {
-
Ref<SpriteFrames> sf = object->call("get_sprite_frames");
if (sf.is_null()) {
return AnimationTrackEdit::get_key_rect(p_index, p_pixels_sec);
@@ -421,11 +413,10 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
}
bool AnimationTrackEditSpriteFrame::is_key_selectable_by_distance() const {
-
return false;
}
-void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
+void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -437,7 +428,6 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
Rect2 region;
if (Object::cast_to<Sprite2D>(object) || Object::cast_to<Sprite3D>(object)) {
-
texture = object->call("get_texture");
if (!texture.is_valid()) {
AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right);
@@ -459,7 +449,6 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
region.size = texture->get_size();
if (bool(object->call("is_region"))) {
-
region = Rect2(object->call("get_region_rect"));
}
@@ -474,7 +463,6 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
region.position.y += region.size.y * coords.y;
} else if (Object::cast_to<AnimatedSprite2D>(object) || Object::cast_to<AnimatedSprite3D>(object)) {
-
Ref<SpriteFrames> sf = object->call("get_sprite_frames");
if (sf.is_null()) {
AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right);
@@ -514,11 +502,13 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
Rect2 rect(p_x, int(get_size().height - height) / 2, width, height);
- if (rect.position.x + rect.size.x < p_clip_left)
+ if (rect.position.x + rect.size.x < p_clip_left) {
return;
+ }
- if (rect.position.x > p_clip_right)
+ if (rect.position.x > p_clip_right) {
return;
+ }
Color accent = get_theme_color("accent_color", "Editor");
Color bg = accent;
@@ -534,19 +524,16 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
}
void AnimationTrackEditSpriteFrame::set_node(Object *p_object) {
-
id = p_object->get_instance_id();
}
void AnimationTrackEditSpriteFrame::set_as_coords() {
-
is_coords = true;
}
/// SUB ANIMATION ///
int AnimationTrackEditSubAnim::get_key_height() const {
-
if (!ObjectDB::get_instance(id)) {
return AnimationTrackEdit::get_key_height();
}
@@ -554,8 +541,8 @@ int AnimationTrackEditSubAnim::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
-Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) {
+Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -571,7 +558,6 @@ Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) {
String anim = get_animation()->track_get_key_value(get_track(), p_index);
if (anim != "[stop]" && ap->has_animation(anim)) {
-
float len = ap->get_animation(anim)->get_length();
if (get_animation()->track_get_key_count(get_track()) > p_index + 1) {
@@ -587,11 +573,10 @@ Rect2 AnimationTrackEditSubAnim::get_key_rect(int p_index, float p_pixels_sec) {
}
bool AnimationTrackEditSubAnim::is_key_selectable_by_distance() const {
-
return false;
}
-void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
+void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -609,7 +594,6 @@ void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_
String anim = get_animation()->track_get_key_value(get_track(), p_index);
if (anim != "[stop]" && ap->has_animation(anim)) {
-
float len = ap->get_animation(anim)->get_length();
if (get_animation()->track_get_key_count(get_track()) > p_index + 1) {
@@ -621,17 +605,20 @@ void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_
int pixel_begin = p_x;
int pixel_end = p_x + pixel_len;
- if (pixel_end < p_clip_left)
+ if (pixel_end < p_clip_left) {
return;
+ }
- if (pixel_begin > p_clip_right)
+ if (pixel_begin > p_clip_right) {
return;
+ }
int from_x = MAX(pixel_begin, p_clip_left);
int to_x = MIN(pixel_end, p_clip_right);
- if (to_x <= from_x)
+ if (to_x <= from_x) {
return;
+ }
Ref<Font> font = get_theme_font("font", "Label");
int fh = font->get_height() * 1.5;
@@ -651,18 +638,17 @@ void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_
Ref<Animation> animation = ap->get_animation(anim);
for (int i = 0; i < animation->get_track_count(); i++) {
-
float h = (rect.size.height - 2) / animation->get_track_count();
int y = 2 + h * i + h / 2;
for (int j = 0; j < animation->track_get_key_count(i); j++) {
-
float ofs = animation->track_get_key_time(i, j);
int x = p_x + ofs * p_pixels_sec + 2;
- if (x < from_x || x >= (to_x - 4))
+ if (x < from_x || x >= (to_x - 4)) {
continue;
+ }
lines.push_back(Point2(x, y));
lines.push_back(Point2(x + 1, y));
@@ -701,20 +687,17 @@ void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_
}
void AnimationTrackEditSubAnim::set_node(Object *p_object) {
-
id = p_object->get_instance_id();
}
//// VOLUME DB ////
int AnimationTrackEditVolumeDB::get_key_height() const {
-
Ref<Texture2D> volume_texture = get_theme_icon("ColorTrackVu", "EditorIcons");
return volume_texture->get_height() * 1.2;
}
void AnimationTrackEditVolumeDB::draw_bg(int p_clip_left, int p_clip_right) {
-
Ref<Texture2D> volume_texture = get_theme_icon("ColorTrackVu", "EditorIcons");
int tex_h = volume_texture->get_height();
@@ -726,7 +709,6 @@ void AnimationTrackEditVolumeDB::draw_bg(int p_clip_left, int p_clip_right) {
}
void AnimationTrackEditVolumeDB::draw_fg(int p_clip_left, int p_clip_right) {
-
Ref<Texture2D> volume_texture = get_theme_icon("ColorTrackVu", "EditorIcons");
int tex_h = volume_texture->get_height();
int y_from = (get_size().height - tex_h) / 2;
@@ -736,9 +718,9 @@ void AnimationTrackEditVolumeDB::draw_fg(int p_clip_left, int p_clip_right) {
}
void AnimationTrackEditVolumeDB::draw_key_link(int p_index, float p_pixels_sec, int p_x, int p_next_x, int p_clip_left, int p_clip_right) {
-
- if (p_x > p_clip_right || p_next_x < p_clip_left)
+ if (p_x > p_clip_right || p_next_x < p_clip_left) {
return;
+ }
float db = get_animation()->track_get_key_value(get_track(), p_index);
float db_n = get_animation()->track_get_key_value(get_track(), p_index + 1);
@@ -778,7 +760,6 @@ void AnimationTrackEditVolumeDB::draw_key_link(int p_index, float p_pixels_sec,
/// AUDIO ///
void AnimationTrackEditTypeAudio::_preview_changed(ObjectID p_which) {
-
for (int i = 0; i < get_animation()->track_get_key_count(get_track()); i++) {
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), i);
if (stream.is_valid() && stream->get_instance_id() == p_which) {
@@ -789,12 +770,11 @@ void AnimationTrackEditTypeAudio::_preview_changed(ObjectID p_which) {
}
int AnimationTrackEditTypeAudio::get_key_height() const {
-
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
-Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec) {
+Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec) {
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index);
if (!stream.is_valid()) {
@@ -807,7 +787,6 @@ Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec)
float len = stream->get_length();
if (len == 0) {
-
Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream);
len = preview->get_length();
}
@@ -826,11 +805,10 @@ Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec)
}
bool AnimationTrackEditTypeAudio::is_key_selectable_by_distance() const {
-
return false;
}
-void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
+void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index);
if (!stream.is_valid()) {
@@ -845,12 +823,14 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int
float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale();
if (len_resizing_start) {
start_ofs += ofs_local;
- if (start_ofs < 0)
+ if (start_ofs < 0) {
start_ofs = 0;
+ }
} else {
end_ofs += ofs_local;
- if (end_ofs < 0)
+ if (end_ofs < 0) {
end_ofs = 0;
+ }
}
}
@@ -881,11 +861,13 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int
int pixel_begin = p_x;
int pixel_end = p_x + pixel_len;
- if (pixel_end < p_clip_left)
+ if (pixel_end < p_clip_left) {
return;
+ }
- if (pixel_begin > p_clip_right)
+ if (pixel_begin > p_clip_right) {
return;
+ }
int from_x = MAX(pixel_begin, p_clip_left);
int to_x = MIN(pixel_end, p_clip_right);
@@ -909,7 +891,6 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int
preview_len = preview->get_length();
for (int i = from_x; i < to_x; i++) {
-
float ofs = (i - pixel_begin) * preview_len / pixel_total_len;
float ofs_n = ((i + 1) - pixel_begin) * preview_len / pixel_total_len;
ofs += start_ofs;
@@ -952,9 +933,7 @@ AnimationTrackEditTypeAudio::AnimationTrackEditTypeAudio() {
}
bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
-
if (p_point.x > get_timeline()->get_name_limit() && p_point.x < get_size().width - get_timeline()->get_buttons_width()) {
-
Dictionary drag_data = p_data;
if (drag_data.has("type") && String(drag_data["type"]) == "resource") {
Ref<AudioStream> res = drag_data["resource"];
@@ -964,7 +943,6 @@ bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Var
}
if (drag_data.has("type") && String(drag_data["type"]) == "files") {
-
Vector<String> files = drag_data["files"];
if (files.size() == 1) {
@@ -979,16 +957,14 @@ bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Var
return AnimationTrackEdit::can_drop_data(p_point, p_data);
}
-void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant &p_data) {
+void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant &p_data) {
if (p_point.x > get_timeline()->get_name_limit() && p_point.x < get_size().width - get_timeline()->get_buttons_width()) {
-
Ref<AudioStream> stream;
Dictionary drag_data = p_data;
if (drag_data.has("type") && String(drag_data["type"]) == "resource") {
stream = drag_data["resource"];
} else if (drag_data.has("type") && String(drag_data["type"]) == "files") {
-
Vector<String> files = drag_data["files"];
if (files.size() == 1) {
@@ -998,7 +974,6 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
}
if (stream.is_valid()) {
-
int x = p_point.x - get_timeline()->get_name_limit();
float ofs = x / get_timeline()->get_zoom_scale();
ofs += get_timeline()->get_value();
@@ -1023,12 +998,10 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
}
void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseMotion> mm = p_event;
if (!len_resizing && mm.is_valid()) {
bool use_hsize_cursor = false;
for (int i = 0; i < get_animation()->track_get_key_count(get_track()); i++) {
-
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), i);
if (!stream.is_valid()) {
@@ -1086,7 +1059,6 @@ void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && get_default_cursor_shape() == CURSOR_HSIZE) {
-
len_resizing = true;
len_resizing_start = mb->get_shift();
len_resizing_from_px = mb->get_position().x;
@@ -1097,7 +1069,6 @@ void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) {
}
if (len_resizing && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale();
if (len_resizing_start) {
float prev_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), len_resizing_index);
@@ -1128,7 +1099,6 @@ void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) {
/// SUB ANIMATION ///
int AnimationTrackEditTypeAnimation::get_key_height() const {
-
if (!ObjectDB::get_instance(id)) {
return AnimationTrackEdit::get_key_height();
}
@@ -1136,8 +1106,8 @@ int AnimationTrackEditTypeAnimation::get_key_height() const {
Ref<Font> font = get_theme_font("font", "Label");
return int(font->get_height() * 1.5);
}
-Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_sec) {
+Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_sec) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -1153,7 +1123,6 @@ Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_
String anim = get_animation()->animation_track_get_key_animation(get_track(), p_index);
if (anim != "[stop]" && ap->has_animation(anim)) {
-
float len = ap->get_animation(anim)->get_length();
if (get_animation()->track_get_key_count(get_track()) > p_index + 1) {
@@ -1169,11 +1138,10 @@ Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_
}
bool AnimationTrackEditTypeAnimation::is_key_selectable_by_distance() const {
-
return false;
}
-void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
+void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Object *object = ObjectDB::get_instance(id);
if (!object) {
@@ -1191,7 +1159,6 @@ void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec,
String anim = get_animation()->animation_track_get_key_animation(get_track(), p_index);
if (anim != "[stop]" && ap->has_animation(anim)) {
-
float len = ap->get_animation(anim)->get_length();
if (get_animation()->track_get_key_count(get_track()) > p_index + 1) {
@@ -1203,17 +1170,20 @@ void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec,
int pixel_begin = p_x;
int pixel_end = p_x + pixel_len;
- if (pixel_end < p_clip_left)
+ if (pixel_end < p_clip_left) {
return;
+ }
- if (pixel_begin > p_clip_right)
+ if (pixel_begin > p_clip_right) {
return;
+ }
int from_x = MAX(pixel_begin, p_clip_left);
int to_x = MIN(pixel_end, p_clip_right);
- if (to_x <= from_x)
+ if (to_x <= from_x) {
return;
+ }
Ref<Font> font = get_theme_font("font", "Label");
int fh = font->get_height() * 1.5;
@@ -1233,18 +1203,17 @@ void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec,
Ref<Animation> animation = ap->get_animation(anim);
for (int i = 0; i < animation->get_track_count(); i++) {
-
float h = (rect.size.height - 2) / animation->get_track_count();
int y = 2 + h * i + h / 2;
for (int j = 0; j < animation->track_get_key_count(i); j++) {
-
float ofs = animation->track_get_key_time(i, j);
int x = p_x + ofs * p_pixels_sec + 2;
- if (x < from_x || x >= (to_x - 4))
+ if (x < from_x || x >= (to_x - 4)) {
continue;
+ }
lines.push_back(Point2(x, y));
lines.push_back(Point2(x + 1, y));
@@ -1283,7 +1252,6 @@ void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec,
}
void AnimationTrackEditTypeAnimation::set_node(Object *p_object) {
-
id = p_object->get_instance_id();
}
@@ -1292,23 +1260,19 @@ AnimationTrackEditTypeAnimation::AnimationTrackEditTypeAnimation() {
/////////
AnimationTrackEdit *AnimationTrackEditDefaultPlugin::create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage) {
-
if (p_property == "playing" && (p_object->is_class("AudioStreamPlayer") || p_object->is_class("AudioStreamPlayer2D") || p_object->is_class("AudioStreamPlayer3D"))) {
-
AnimationTrackEditAudio *audio = memnew(AnimationTrackEditAudio);
audio->set_node(p_object);
return audio;
}
if (p_property == "frame" && (p_object->is_class("Sprite2D") || p_object->is_class("Sprite3D") || p_object->is_class("AnimatedSprite2D") || p_object->is_class("AnimatedSprite3D"))) {
-
AnimationTrackEditSpriteFrame *sprite = memnew(AnimationTrackEditSpriteFrame);
sprite->set_node(p_object);
return sprite;
}
if (p_property == "frame_coords" && (p_object->is_class("Sprite2D") || p_object->is_class("Sprite3D"))) {
-
AnimationTrackEditSpriteFrame *sprite = memnew(AnimationTrackEditSpriteFrame);
sprite->set_as_coords();
sprite->set_node(p_object);
@@ -1316,14 +1280,12 @@ AnimationTrackEdit *AnimationTrackEditDefaultPlugin::create_value_track_edit(Obj
}
if (p_property == "current_animation" && (p_object->is_class("AnimationPlayer"))) {
-
AnimationTrackEditSubAnim *player = memnew(AnimationTrackEditSubAnim);
player->set_node(p_object);
return player;
}
if (p_property == "volume_db") {
-
AnimationTrackEditVolumeDB *vu = memnew(AnimationTrackEditVolumeDB);
return vu;
}
@@ -1339,12 +1301,10 @@ AnimationTrackEdit *AnimationTrackEditDefaultPlugin::create_value_track_edit(Obj
}
AnimationTrackEdit *AnimationTrackEditDefaultPlugin::create_audio_track_edit() {
-
return memnew(AnimationTrackEditTypeAudio);
}
AnimationTrackEdit *AnimationTrackEditDefaultPlugin::create_animation_track_edit(Object *p_object) {
-
AnimationTrackEditTypeAnimation *an = memnew(AnimationTrackEditTypeAnimation);
an->set_node(p_object);
return an;
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index 9f6785ec06..20f947e707 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -36,10 +36,10 @@
#define ITEMS_PER_PAGE 100
Variant ArrayPropertyEdit::get_array() const {
-
Object *o = ObjectDB::get_instance(obj);
- if (!o)
+ if (!o) {
return Array();
+ }
Variant arr = o->get(property);
if (!arr.is_array()) {
Callable::CallError ce;
@@ -51,47 +51,45 @@ Variant ArrayPropertyEdit::get_array() const {
void ArrayPropertyEdit::_notif_change() {
_change_notify();
}
-void ArrayPropertyEdit::_notif_changev(const String &p_v) {
+void ArrayPropertyEdit::_notif_changev(const String &p_v) {
_change_notify(p_v.utf8().get_data());
}
void ArrayPropertyEdit::_set_size(int p_size) {
-
Variant arr = get_array();
arr.call("resize", p_size);
Object *o = ObjectDB::get_instance(obj);
- if (!o)
+ if (!o) {
return;
+ }
o->set(property, arr);
}
void ArrayPropertyEdit::_set_value(int p_idx, const Variant &p_value) {
-
Variant arr = get_array();
arr.set(p_idx, p_value);
Object *o = ObjectDB::get_instance(obj);
- if (!o)
+ if (!o) {
return;
+ }
o->set(property, arr);
}
bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
-
String pn = p_name;
if (pn.begins_with("array/")) {
-
if (pn == "array/size") {
-
Variant arr = get_array();
int size = arr.call("size");
int newsize = p_value;
- if (newsize == size)
+ if (newsize == size) {
return true;
+ }
UndoRedo *ur = EditorNode::get_undo_redo();
ur->create_action(TTR("Resize Array"));
@@ -102,7 +100,6 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
ur->add_undo_method(this, "_set_value", i, arr.get(i));
}
} else if (newsize > size) {
-
Variant init;
Callable::CallError ce;
Variant::Type new_type = subtype;
@@ -128,7 +125,6 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
}
} else if (pn.begins_with("indices")) {
-
if (pn.find("_") != -1) {
//type
int idx = pn.get_slicec('/', 1).get_slicec('_', 0).to_int();
@@ -173,13 +169,11 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
}
bool ArrayPropertyEdit::_get(const StringName &p_name, Variant &r_ret) const {
-
Variant arr = get_array();
//int size = arr.call("size");
String pn = p_name;
if (pn.begins_with("array/")) {
-
if (pn == "array/size") {
r_ret = arr.call("size");
return true;
@@ -189,14 +183,14 @@ bool ArrayPropertyEdit::_get(const StringName &p_name, Variant &r_ret) const {
return true;
}
} else if (pn.begins_with("indices")) {
-
if (pn.find("_") != -1) {
//type
int idx = pn.get_slicec('/', 1).get_slicec('_', 0).to_int();
bool valid;
r_ret = arr.get(idx, &valid);
- if (valid)
+ if (valid) {
r_ret = r_ret.get_type();
+ }
return valid;
} else {
@@ -216,21 +210,20 @@ bool ArrayPropertyEdit::_get(const StringName &p_name, Variant &r_ret) const {
}
void ArrayPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
-
Variant arr = get_array();
int size = arr.call("size");
p_list->push_back(PropertyInfo(Variant::INT, "array/size", PROPERTY_HINT_RANGE, "0,100000,1"));
int pages = size / ITEMS_PER_PAGE;
- if (pages > 0)
+ if (pages > 0) {
p_list->push_back(PropertyInfo(Variant::INT, "array/page", PROPERTY_HINT_RANGE, "0," + itos(pages) + ",1"));
+ }
int offset = page * ITEMS_PER_PAGE;
int items = MIN(size - offset, ITEMS_PER_PAGE);
for (int i = 0; i < items; i++) {
-
Variant v = arr.get(i + offset);
bool is_typed = arr.get_type() != Variant::ARRAY || subtype != Variant::NIL;
@@ -260,7 +253,6 @@ void ArrayPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
}
void ArrayPropertyEdit::edit(Object *p_obj, const StringName &p_prop, const String &p_hint_string, Variant::Type p_deftype) {
-
page = 0;
property = p_prop;
obj = p_obj->get_instance_id();
@@ -284,7 +276,6 @@ void ArrayPropertyEdit::edit(Object *p_obj, const StringName &p_prop, const Stri
}
Node *ArrayPropertyEdit::get_node() {
-
return Object::cast_to<Node>(ObjectDB::get_instance(obj));
}
@@ -293,7 +284,6 @@ bool ArrayPropertyEdit::_dont_undo_redo() {
}
void ArrayPropertyEdit::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_set_size"), &ArrayPropertyEdit::_set_size);
ClassDB::bind_method(D_METHOD("_set_value"), &ArrayPropertyEdit::_set_value);
ClassDB::bind_method(D_METHOD("_notif_change"), &ArrayPropertyEdit::_notif_change);
@@ -304,9 +294,9 @@ void ArrayPropertyEdit::_bind_methods() {
ArrayPropertyEdit::ArrayPropertyEdit() {
page = 0;
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
-
- if (i > 0)
+ if (i > 0) {
vtypes += ",";
+ }
vtypes += Variant::get_type_name(Variant::Type(i));
}
default_type = Variant::NIL;
diff --git a/editor/array_property_edit.h b/editor/array_property_edit.h
index 675b842128..d91701ccaf 100644
--- a/editor/array_property_edit.h
+++ b/editor/array_property_edit.h
@@ -34,7 +34,6 @@
#include "scene/main/node.h"
class ArrayPropertyEdit : public Reference {
-
GDCLASS(ArrayPropertyEdit, Reference);
int page;
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp
index fe28c913a7..9e4e157c96 100644
--- a/editor/audio_stream_preview.cpp
+++ b/editor/audio_stream_preview.cpp
@@ -35,10 +35,11 @@
float AudioStreamPreview::get_length() const {
return length;
}
-float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
- if (length == 0)
+float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
+ if (length == 0) {
return 0;
+ }
int max = preview.size() / 2;
int time_from = p_time / length * max;
@@ -53,7 +54,6 @@ float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
uint8_t vmax = 0;
for (int i = time_from; i < time_to; i++) {
-
uint8_t v = preview[i * 2 + 1];
if (i == 0 || v > vmax) {
vmax = v;
@@ -62,10 +62,11 @@ float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
return (vmax / 255.0) * 2.0 - 1.0;
}
-float AudioStreamPreview::get_min(float p_time, float p_time_next) const {
- if (length == 0)
+float AudioStreamPreview::get_min(float p_time, float p_time_next) const {
+ if (length == 0) {
return 0;
+ }
int max = preview.size() / 2;
int time_from = p_time / length * max;
@@ -80,7 +81,6 @@ float AudioStreamPreview::get_min(float p_time, float p_time_next) const {
uint8_t vmin = 255;
for (int i = time_from; i < time_to; i++) {
-
uint8_t v = preview[i * 2];
if (i == 0 || v < vmin) {
vmin = v;
@@ -101,7 +101,6 @@ void AudioStreamPreviewGenerator::_update_emit(ObjectID p_id) {
}
void AudioStreamPreviewGenerator::_preview_thread(void *p_preview) {
-
Preview *preview = (Preview *)p_preview;
float muxbuff_chunk_s = 0.25;
@@ -117,7 +116,6 @@ void AudioStreamPreviewGenerator::_preview_thread(void *p_preview) {
preview->playback->start();
while (frames_todo) {
-
int ofs_write = uint64_t(frames_total - frames_todo) * uint64_t(preview->preview->preview.size() / 2) / uint64_t(frames_total);
int to_read = MIN(frames_todo, mixbuff_chunk_frames);
int to_write = uint64_t(to_read) * uint64_t(preview->preview->preview.size() / 2) / uint64_t(frames_total);
@@ -137,7 +135,6 @@ void AudioStreamPreviewGenerator::_preview_thread(void *p_preview) {
}
for (int j = from; j < to; j++) {
-
max = MAX(max, mix_chunk[j].l);
max = MAX(max, mix_chunk[j].r);
@@ -199,8 +196,9 @@ Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref<
preview->preview->preview = maxmin;
preview->preview->length = len_s;
- if (preview->playback.is_valid())
+ if (preview->playback.is_valid()) {
preview->thread = Thread::create(_preview_thread, preview);
+ }
return preview->preview;
}
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 76716f01b7..95c7cc0bf1 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -41,7 +41,6 @@
#include "scene/resources/dynamic_font.h"
void GotoLineDialog::popup_find_line(TextEdit *p_edit) {
-
text_editor = p_edit;
line->set_text(itos(text_editor->cursor_get_line()));
@@ -51,21 +50,19 @@ void GotoLineDialog::popup_find_line(TextEdit *p_edit) {
}
int GotoLineDialog::get_line() const {
-
return line->get_text().to_int();
}
void GotoLineDialog::ok_pressed() {
-
- if (get_line() < 1 || get_line() > text_editor->get_line_count())
+ if (get_line() < 1 || get_line() > text_editor->get_line_count()) {
return;
+ }
text_editor->unfold_line(get_line() - 1);
text_editor->cursor_set_line(get_line() - 1);
hide();
}
GotoLineDialog::GotoLineDialog() {
-
set_title(TTR("Go to Line"));
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -88,9 +85,7 @@ GotoLineDialog::GotoLineDialog() {
}
void FindReplaceBar::_notification(int p_what) {
-
if (p_what == NOTIFICATION_READY) {
-
find_prev->set_icon(get_theme_icon("MoveUp", "EditorIcons"));
find_next->set_icon(get_theme_icon("MoveDown", "EditorIcons"));
hide_button->set_normal_texture(get_theme_icon("Close", "EditorIcons"));
@@ -98,10 +93,8 @@ void FindReplaceBar::_notification(int p_what) {
hide_button->set_pressed_texture(get_theme_icon("Close", "EditorIcons"));
hide_button->set_custom_minimum_size(hide_button->get_normal_texture()->get_size());
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
-
set_process_unhandled_input(is_visible_in_tree());
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
-
find_prev->set_icon(get_theme_icon("MoveUp", "EditorIcons"));
find_next->set_icon(get_theme_icon("MoveDown", "EditorIcons"));
hide_button->set_normal_texture(get_theme_icon("Close", "EditorIcons"));
@@ -114,22 +107,16 @@ void FindReplaceBar::_notification(int p_what) {
}
void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
-
if (k->is_pressed() && (text_edit->has_focus() || vbc_lineedit->is_a_parent_of(get_focus_owner()))) {
-
bool accepted = true;
switch (k->get_keycode()) {
-
case KEY_ESCAPE: {
-
_hide_bar();
} break;
default: {
-
accepted = false;
} break;
}
@@ -142,7 +129,6 @@ void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) {
}
bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) {
-
int line, col;
String text = get_search_text();
@@ -180,7 +166,6 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col)
}
void FindReplaceBar::_replace() {
-
if (result_line != -1 && result_col != -1) {
text_edit->begin_complex_operation();
@@ -199,7 +184,6 @@ void FindReplaceBar::_replace() {
}
void FindReplaceBar::_replace_all() {
-
text_edit->disconnect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed));
// Line as x so it gets priority in comparison, column as y.
Point2i orig_cursor(text_edit->cursor_get_line(), text_edit->cursor_get_column());
@@ -289,7 +273,6 @@ void FindReplaceBar::_replace_all() {
}
void FindReplaceBar::_get_search_from(int &r_line, int &r_col) {
-
r_line = text_edit->cursor_get_line();
r_col = text_edit->cursor_get_column();
@@ -303,14 +286,16 @@ void FindReplaceBar::_get_search_from(int &r_line, int &r_col) {
}
void FindReplaceBar::_update_results_count() {
- if (results_count != -1)
+ if (results_count != -1) {
return;
+ }
results_count = 0;
String searched = get_search_text();
- if (searched.empty())
+ if (searched.empty()) {
return;
+ }
String full_text = text_edit->get_text();
@@ -318,24 +303,27 @@ void FindReplaceBar::_update_results_count() {
while (true) {
int pos = is_case_sensitive() ? full_text.find(searched, from_pos) : full_text.findn(searched, from_pos);
- if (pos == -1)
+ if (pos == -1) {
break;
+ }
+ int pos_subsequent = pos + searched.length();
if (is_whole_words()) {
- from_pos++; // Making sure we won't hit the same match next time, if we get out via a continue.
- if (pos > 0 && !is_symbol(full_text[pos - 1]))
+ from_pos = pos + 1; // Making sure we won't hit the same match next time, if we get out via a continue.
+ if (pos > 0 && !(is_symbol(full_text[pos - 1]) || full_text[pos - 1] == '\n')) {
continue;
- if (pos + searched.length() < full_text.length() && !is_symbol(full_text[pos + searched.length()]))
+ }
+ if (pos_subsequent < full_text.length() && !(is_symbol(full_text[pos_subsequent]) || full_text[pos_subsequent] == '\n')) {
continue;
+ }
}
results_count++;
- from_pos = pos + searched.length();
+ from_pos = pos_subsequent;
}
}
void FindReplaceBar::_update_matches_label() {
-
if (search_text->get_text().empty() || results_count == -1) {
matches_label->hide();
} else {
@@ -347,13 +335,14 @@ void FindReplaceBar::_update_matches_label() {
}
bool FindReplaceBar::search_current() {
-
uint32_t flags = 0;
- if (is_whole_words())
+ if (is_whole_words()) {
flags |= TextEdit::SEARCH_WHOLE_WORDS;
- if (is_case_sensitive())
+ }
+ if (is_case_sensitive()) {
flags |= TextEdit::SEARCH_MATCH_CASE;
+ }
int line, col;
_get_search_from(line, col);
@@ -362,30 +351,34 @@ bool FindReplaceBar::search_current() {
}
bool FindReplaceBar::search_prev() {
-
- if (!is_visible())
+ if (!is_visible()) {
popup_search(true);
+ }
uint32_t flags = 0;
String text = get_search_text();
- if (is_whole_words())
+ if (is_whole_words()) {
flags |= TextEdit::SEARCH_WHOLE_WORDS;
- if (is_case_sensitive())
+ }
+ if (is_case_sensitive()) {
flags |= TextEdit::SEARCH_MATCH_CASE;
+ }
flags |= TextEdit::SEARCH_BACKWARDS;
int line, col;
_get_search_from(line, col);
- if (text_edit->is_selection_active())
+ if (text_edit->is_selection_active()) {
col--; // Skip currently selected word.
+ }
col -= text.length();
if (col < 0) {
line -= 1;
- if (line < 0)
+ if (line < 0) {
line = text_edit->get_line_count() - 1;
+ }
col = text_edit->get_line(line).length();
}
@@ -393,21 +386,24 @@ bool FindReplaceBar::search_prev() {
}
bool FindReplaceBar::search_next() {
-
- if (!is_visible())
+ if (!is_visible()) {
popup_search(true);
+ }
uint32_t flags = 0;
String text;
- if (replace_all_mode)
+ if (replace_all_mode) {
text = get_replace_text();
- else
+ } else {
text = get_search_text();
+ }
- if (is_whole_words())
+ if (is_whole_words()) {
flags |= TextEdit::SEARCH_WHOLE_WORDS;
- if (is_case_sensitive())
+ }
+ if (is_case_sensitive()) {
flags |= TextEdit::SEARCH_MATCH_CASE;
+ }
int line, col;
_get_search_from(line, col);
@@ -416,8 +412,9 @@ bool FindReplaceBar::search_next() {
col += text.length();
if (col > text_edit->get_line(line).length()) {
line += 1;
- if (line >= text_edit->get_line_count())
+ if (line >= text_edit->get_line_count()) {
line = 0;
+ }
col = 0;
}
}
@@ -426,9 +423,9 @@ bool FindReplaceBar::search_next() {
}
void FindReplaceBar::_hide_bar() {
-
- if (replace_text->has_focus() || search_text->has_focus())
+ if (replace_text->has_focus() || search_text->has_focus()) {
text_edit->grab_focus();
+ }
text_edit->set_search_text("");
result_line = -1;
@@ -437,10 +434,10 @@ void FindReplaceBar::_hide_bar() {
}
void FindReplaceBar::_show_search(bool p_focus_replace, bool p_show_only) {
-
show();
- if (p_show_only)
+ if (p_show_only) {
return;
+ }
if (p_focus_replace) {
search_text->deselect();
@@ -470,7 +467,6 @@ void FindReplaceBar::_show_search(bool p_focus_replace, bool p_show_only) {
}
void FindReplaceBar::popup_search(bool p_show_only) {
-
replace_text->hide();
hbc_button_replace->hide();
hbc_option_replace->hide();
@@ -479,7 +475,6 @@ void FindReplaceBar::popup_search(bool p_show_only) {
}
void FindReplaceBar::popup_replace() {
-
if (!replace_text->is_visible_in_tree()) {
replace_text->show();
hbc_button_replace->show();
@@ -492,13 +487,11 @@ void FindReplaceBar::popup_replace() {
}
void FindReplaceBar::_search_options_changed(bool p_pressed) {
-
results_count = -1;
search_current();
}
void FindReplaceBar::_editor_text_changed() {
-
results_count = -1;
if (is_visible_in_tree()) {
preserve_cursor = true;
@@ -508,13 +501,11 @@ void FindReplaceBar::_editor_text_changed() {
}
void FindReplaceBar::_search_text_changed(const String &p_text) {
-
results_count = -1;
search_current();
}
void FindReplaceBar::_search_text_entered(const String &p_text) {
-
if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
search_prev();
} else {
@@ -523,7 +514,6 @@ void FindReplaceBar::_search_text_entered(const String &p_text) {
}
void FindReplaceBar::_replace_text_entered(const String &p_text) {
-
if (selection_only->is_pressed() && text_edit->is_selection_active()) {
_replace_all();
_hide_bar();
@@ -536,44 +526,36 @@ void FindReplaceBar::_replace_text_entered(const String &p_text) {
}
String FindReplaceBar::get_search_text() const {
-
return search_text->get_text();
}
String FindReplaceBar::get_replace_text() const {
-
return replace_text->get_text();
}
bool FindReplaceBar::is_case_sensitive() const {
-
return case_sensitive->is_pressed();
}
bool FindReplaceBar::is_whole_words() const {
-
return whole_words->is_pressed();
}
bool FindReplaceBar::is_selection_only() const {
-
return selection_only->is_pressed();
}
void FindReplaceBar::set_error(const String &p_label) {
-
emit_signal("error", p_label);
}
void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) {
-
results_count = -1;
text_edit = p_text_edit;
text_edit->connect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed));
}
void FindReplaceBar::_bind_methods() {
-
ClassDB::bind_method("_unhandled_input", &FindReplaceBar::_unhandled_input);
ClassDB::bind_method("_search_current", &FindReplaceBar::search_current);
@@ -583,7 +565,6 @@ void FindReplaceBar::_bind_methods() {
}
FindReplaceBar::FindReplaceBar() {
-
results_count = -1;
replace_all_mode = false;
preserve_cursor = false;
@@ -676,10 +657,10 @@ FindReplaceBar::FindReplaceBar() {
// This function should be used to handle shortcuts that could otherwise
// be handled too late if they weren't handled here.
void CodeTextEditor::_input(const Ref<InputEvent> &event) {
-
const Ref<InputEventKey> key_event = event;
- if (!key_event.is_valid() || !key_event->is_pressed())
+ if (!key_event.is_valid() || !key_event->is_pressed() || !text_editor->has_focus()) {
return;
+ }
if (ED_IS_SHORTCUT("script_text_editor/move_up", key_event)) {
move_lines_up();
@@ -704,13 +685,10 @@ void CodeTextEditor::_input(const Ref<InputEvent> &event) {
}
void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
-
if (mb->is_pressed() && mb->get_command()) {
-
if (mb->get_button_index() == BUTTON_WHEEL_UP) {
_zoom_in();
} else if (mb->get_button_index() == BUTTON_WHEEL_DOWN) {
@@ -721,7 +699,6 @@ void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMagnifyGesture> magnify_gesture = p_event;
if (magnify_gesture.is_valid()) {
-
Ref<DynamicFont> font = text_editor->get_theme_font("font");
if (font.is_valid()) {
@@ -739,7 +716,6 @@ void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
-
if (k->is_pressed()) {
if (ED_IS_SHORTCUT("script_editor/zoom_in", p_event)) {
_zoom_in();
@@ -765,8 +741,9 @@ void CodeTextEditor::_zoom_out() {
}
void CodeTextEditor::_zoom_changed() {
- if (font_resize_timer->get_time_left() == 0)
+ if (font_resize_timer->get_time_left() == 0) {
font_resize_timer->start();
+ }
}
void CodeTextEditor::_reset_zoom() {
@@ -779,7 +756,6 @@ void CodeTextEditor::_reset_zoom() {
}
void CodeTextEditor::_line_col_changed() {
-
String line = text_editor->get_line(text_editor->cursor_get_line());
int positional_column = 0;
@@ -802,7 +778,6 @@ void CodeTextEditor::_line_col_changed() {
}
void CodeTextEditor::_text_changed() {
-
if (text_editor->is_insert_text_operation()) {
code_complete_timer->start();
}
@@ -811,13 +786,13 @@ void CodeTextEditor::_text_changed() {
}
void CodeTextEditor::_code_complete_timer_timeout() {
- if (!is_visible_in_tree())
+ if (!is_visible_in_tree()) {
return;
+ }
text_editor->query_code_comple();
}
void CodeTextEditor::_complete_request() {
-
List<ScriptCodeCompletionOption> entries;
String ctext = text_editor->get_text_for_completion();
_code_complete_script(ctext, &entries);
@@ -825,8 +800,9 @@ void CodeTextEditor::_complete_request() {
if (code_complete_func) {
code_complete_func(code_complete_ud, ctext, &entries, forced);
}
- if (entries.size() == 0)
+ if (entries.size() == 0) {
return;
+ }
for (List<ScriptCodeCompletionOption>::Element *E = entries.front(); E; E = E->next()) {
E->get().icon = _get_completion_icon(E->get());
@@ -879,14 +855,12 @@ Ref<Texture2D> CodeTextEditor::_get_completion_icon(const ScriptCodeCompletionOp
}
void CodeTextEditor::_font_resize_timeout() {
-
if (_add_font_size(font_resize_val)) {
font_resize_val = 0;
}
}
bool CodeTextEditor::_add_font_size(int p_delta) {
-
Ref<DynamicFont> font = text_editor->get_theme_font("font");
if (font.is_valid()) {
@@ -904,7 +878,6 @@ bool CodeTextEditor::_add_font_size(int p_delta) {
}
void CodeTextEditor::update_editor_settings() {
-
text_editor->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/highlighting/syntax_highlighting"));
text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences"));
text_editor->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_current_line"));
@@ -940,7 +913,6 @@ void CodeTextEditor::trim_trailing_whitespace() {
for (int i = 0; i < text_editor->get_line_count(); i++) {
String line = text_editor->get_line(i);
if (line.ends_with(" ") || line.ends_with("\t")) {
-
if (!trimed_whitespace) {
text_editor->begin_complex_operation();
trimed_whitespace = true;
@@ -1088,10 +1060,12 @@ void CodeTextEditor::convert_case(CaseStyle p_case) {
for (int i = begin; i <= end; i++) {
int len = text_editor->get_line(i).length();
- if (i == end)
+ if (i == end) {
len = end_col;
- if (i == begin)
+ }
+ if (i == begin) {
len -= begin_col;
+ }
String new_line = text_editor->get_line(i).substr(i == begin ? begin_col : 0, len);
switch (p_case) {
@@ -1129,8 +1103,9 @@ void CodeTextEditor::move_lines_up() {
int line_id = i;
int next_id = i - 1;
- if (line_id == 0 || next_id < 0)
+ if (line_id == 0 || next_id < 0) {
return;
+ }
text_editor->unfold_line(line_id);
text_editor->unfold_line(next_id);
@@ -1145,8 +1120,9 @@ void CodeTextEditor::move_lines_up() {
int line_id = text_editor->cursor_get_line();
int next_id = line_id - 1;
- if (line_id == 0 || next_id < 0)
+ if (line_id == 0 || next_id < 0) {
return;
+ }
text_editor->unfold_line(line_id);
text_editor->unfold_line(next_id);
@@ -1170,8 +1146,9 @@ void CodeTextEditor::move_lines_down() {
int line_id = i;
int next_id = i + 1;
- if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count())
+ if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count()) {
return;
+ }
text_editor->unfold_line(line_id);
text_editor->unfold_line(next_id);
@@ -1186,8 +1163,9 @@ void CodeTextEditor::move_lines_down() {
int line_id = text_editor->cursor_get_line();
int next_id = line_id + 1;
- if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count())
+ if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count()) {
return;
+ }
text_editor->unfold_line(line_id);
text_editor->unfold_line(next_id);
@@ -1281,8 +1259,9 @@ void CodeTextEditor::toggle_inline_comment(const String &delimiter) {
int end = text_editor->get_selection_to_line();
// End of selection ends on the first column of the last line, ignore it.
- if (text_editor->get_selection_to_column() == 0)
+ if (text_editor->get_selection_to_column() == 0) {
end -= 1;
+ }
int col_to = text_editor->get_selection_to_column();
int cursor_pos = text_editor->cursor_get_column();
@@ -1314,14 +1293,17 @@ void CodeTextEditor::toggle_inline_comment(const String &delimiter) {
int offset = (is_commented ? -1 : 1) * delimiter.length();
int col_from = text_editor->get_selection_from_column() > 0 ? text_editor->get_selection_from_column() + offset : 0;
- if (is_commented && text_editor->cursor_get_column() == text_editor->get_line(text_editor->cursor_get_line()).length() + 1)
+ if (is_commented && text_editor->cursor_get_column() == text_editor->get_line(text_editor->cursor_get_line()).length() + 1) {
cursor_pos += 1;
+ }
- if (text_editor->get_selection_to_column() != 0 && col_to != text_editor->get_line(text_editor->get_selection_to_line()).length() + 1)
+ if (text_editor->get_selection_to_column() != 0 && col_to != text_editor->get_line(text_editor->get_selection_to_line()).length() + 1) {
col_to += offset;
+ }
- if (text_editor->cursor_get_column() != 0)
+ if (text_editor->cursor_get_column() != 0) {
cursor_pos += offset;
+ }
text_editor->select(begin, col_from, text_editor->get_selection_to_line(), col_to);
text_editor->cursor_set_column(cursor_pos);
@@ -1440,7 +1422,6 @@ void CodeTextEditor::set_edit_state(const Variant &p_state) {
}
void CodeTextEditor::set_error(const String &p_error) {
-
error->set_text(p_error);
if (p_error != "") {
error->set_default_cursor_shape(CURSOR_POINTING_HAND);
@@ -1463,7 +1444,6 @@ void CodeTextEditor::goto_error() {
}
void CodeTextEditor::_update_font() {
-
text_editor->add_theme_font_override("font", get_theme_font("source", "EditorFonts"));
error->add_theme_font_override("font", get_theme_font("status_source", "EditorFonts"));
@@ -1474,13 +1454,13 @@ void CodeTextEditor::_update_font() {
int count = status_bar->get_child_count();
for (int i = 0; i < count; i++) {
Control *n = Object::cast_to<Control>(status_bar->get_child(i));
- if (n)
+ if (n) {
n->add_theme_font_override("font", status_bar_font);
+ }
}
}
void CodeTextEditor::_on_settings_change() {
-
_update_font();
font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size");
@@ -1537,7 +1517,6 @@ void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
}
void CodeTextEditor::_notification(int p_what) {
-
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
_load_theme_settings();
@@ -1568,18 +1547,17 @@ void CodeTextEditor::set_warning_nb(int p_warning_nb) {
warning_count_label->set_text(itos(p_warning_nb));
warning_count_label->set_visible(p_warning_nb > 0);
warning_button->set_visible(p_warning_nb > 0);
- if (!p_warning_nb)
+ if (!p_warning_nb) {
_set_show_warnings_panel(false);
+ }
}
void CodeTextEditor::toggle_bookmark() {
-
int line = text_editor->cursor_get_line();
text_editor->set_line_as_bookmark(line, !text_editor->is_line_set_as_bookmark(line));
}
void CodeTextEditor::goto_next_bookmark() {
-
List<int> bmarks;
text_editor->get_bookmarks(&bmarks);
if (bmarks.size() <= 0) {
@@ -1605,7 +1583,6 @@ void CodeTextEditor::goto_next_bookmark() {
}
void CodeTextEditor::goto_prev_bookmark() {
-
List<int> bmarks;
text_editor->get_bookmarks(&bmarks);
if (bmarks.size() <= 0) {
@@ -1631,7 +1608,6 @@ void CodeTextEditor::goto_prev_bookmark() {
}
void CodeTextEditor::remove_all_bookmarks() {
-
List<int> bmarks;
text_editor->get_bookmarks(&bmarks);
@@ -1641,7 +1617,6 @@ void CodeTextEditor::remove_all_bookmarks() {
}
void CodeTextEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_input"), &CodeTextEditor::_input);
ADD_SIGNAL(MethodInfo("validate_script"));
@@ -1665,7 +1640,6 @@ void CodeTextEditor::update_toggle_scripts_button() {
}
CodeTextEditor::CodeTextEditor() {
-
code_complete_func = nullptr;
ED_SHORTCUT("script_editor/zoom_in", TTR("Zoom In"), KEY_MASK_CMD | KEY_EQUAL);
ED_SHORTCUT("script_editor/zoom_out", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS);
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 6b733a2b3c..d806be885f 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -41,7 +41,6 @@
#include "scene/main/timer.h"
class GotoLineDialog : public ConfirmationDialog {
-
GDCLASS(GotoLineDialog, ConfirmationDialog);
Label *line_label;
@@ -60,7 +59,6 @@ public:
};
class FindReplaceBar : public HBoxContainer {
-
GDCLASS(FindReplaceBar, HBoxContainer);
LineEdit *search_text;
@@ -138,7 +136,6 @@ public:
typedef void (*CodeTextEditorCodeCompleteFunc)(void *p_ud, const String &p_code, List<ScriptCodeCompletionOption> *r_options, bool &r_forced);
class CodeTextEditor : public VBoxContainer {
-
GDCLASS(CodeTextEditor, VBoxContainer);
TextEdit *text_editor;
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 4556a6e827..6507956d07 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -47,7 +47,6 @@ static Node *_find_first_script(Node *p_root, Node *p_node) {
}
for (int i = 0; i < p_node->get_child_count(); i++) {
-
Node *ret = _find_first_script(p_root, p_node->get_child(i));
if (ret) {
return ret;
@@ -58,49 +57,46 @@ static Node *_find_first_script(Node *p_root, Node *p_node) {
}
class ConnectDialogBinds : public Object {
-
GDCLASS(ConnectDialogBinds, Object);
public:
Vector<Variant> params;
bool _set(const StringName &p_name, const Variant &p_value) {
-
String name = p_name;
if (name.begins_with("bind/")) {
int which = name.get_slice("/", 1).to_int() - 1;
ERR_FAIL_INDEX_V(which, params.size(), false);
params.write[which] = p_value;
- } else
+ } else {
return false;
+ }
return true;
}
bool _get(const StringName &p_name, Variant &r_ret) const {
-
String name = p_name;
if (name.begins_with("bind/")) {
int which = name.get_slice("/", 1).to_int() - 1;
ERR_FAIL_INDEX_V(which, params.size(), false);
r_ret = params[which];
- } else
+ } else {
return false;
+ }
return true;
}
void _get_property_list(List<PropertyInfo> *p_list) const {
-
for (int i = 0; i < params.size(); i++) {
p_list->push_back(PropertyInfo(params[i].get_type(), "bind/" + itos(i + 1)));
}
}
void notify_changed() {
-
_change_notify();
}
@@ -112,7 +108,6 @@ public:
* Signal automatically called by parent dialog.
*/
void ConnectDialog::ok_pressed() {
-
if (dst_method->get_text() == "") {
error->set_text(TTR("Method in target node must be specified."));
error->popup_centered();
@@ -149,11 +144,11 @@ void ConnectDialog::_text_entered(const String &p_text) {
* Called each time a target node is selected within the target node tree.
*/
void ConnectDialog::_tree_node_selected() {
-
Node *current = tree->get_selected();
- if (!current)
+ if (!current) {
return;
+ }
dst_path = source->get_path_to(current);
_update_ok_enabled();
@@ -163,9 +158,9 @@ void ConnectDialog::_tree_node_selected() {
* Adds a new parameter bind to connection.
*/
void ConnectDialog::_add_bind() {
-
- if (cdbinds->params.size() >= VARIANT_ARG_MAX)
+ if (cdbinds->params.size() >= VARIANT_ARG_MAX) {
return;
+ }
Variant::Type vt = (Variant::Type)type_list->get_item_id(type_list->get_selected());
Variant value;
@@ -228,10 +223,10 @@ void ConnectDialog::_add_bind() {
* Remove parameter bind from connection.
*/
void ConnectDialog::_remove_bind() {
-
String st = bind_editor->get_selected_path();
- if (st == "")
+ if (st == "") {
return;
+ }
int idx = st.get_slice("/", 1).to_int() - 1;
ERR_FAIL_INDEX(idx, cdbinds->params.size());
@@ -244,7 +239,6 @@ void ConnectDialog::_remove_bind() {
* node is selected and valid in the selected mode.
*/
void ConnectDialog::_update_ok_enabled() {
-
Node *target = tree->get_selected();
if (target == nullptr) {
@@ -261,14 +255,12 @@ void ConnectDialog::_update_ok_enabled() {
}
void ConnectDialog::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
bind_editor->edit(cdbinds);
}
}
void ConnectDialog::_bind_methods() {
-
ClassDB::bind_method("_cancel", &ConnectDialog::_cancel_pressed);
ClassDB::bind_method("_update_ok_enabled", &ConnectDialog::_update_ok_enabled);
@@ -276,50 +268,42 @@ void ConnectDialog::_bind_methods() {
}
Node *ConnectDialog::get_source() const {
-
return source;
}
StringName ConnectDialog::get_signal_name() const {
-
return signal;
}
NodePath ConnectDialog::get_dst_path() const {
-
return dst_path;
}
void ConnectDialog::set_dst_node(Node *p_node) {
-
tree->set_selected(p_node);
}
StringName ConnectDialog::get_dst_method_name() const {
-
String txt = dst_method->get_text();
- if (txt.find("(") != -1)
+ if (txt.find("(") != -1) {
txt = txt.left(txt.find("(")).strip_edges();
+ }
return txt;
}
void ConnectDialog::set_dst_method(const StringName &p_method) {
-
dst_method->set_text(p_method);
}
Vector<Variant> ConnectDialog::get_binds() const {
-
return cdbinds->params;
}
bool ConnectDialog::get_deferred() const {
-
return deferred->is_pressed();
}
bool ConnectDialog::get_oneshot() const {
-
return oneshot->is_pressed();
}
@@ -327,7 +311,6 @@ bool ConnectDialog::get_oneshot() const {
* Returns true if ConnectDialog is being used to edit an existing connection.
*/
bool ConnectDialog::is_editing() const {
-
return bEditMode;
}
@@ -337,7 +320,6 @@ bool ConnectDialog::is_editing() const {
* If editing an existing connection, previous data is retained.
*/
void ConnectDialog::init(ConnectionData c, bool bEdit) {
-
set_hide_on_ok(false);
source = static_cast<Node *>(c.source);
@@ -367,17 +349,16 @@ void ConnectDialog::init(ConnectionData c, bool bEdit) {
}
void ConnectDialog::popup_dialog(const String &p_for_signal) {
-
from_signal->set_text(p_for_signal);
error_label->add_theme_color_override("font_color", error_label->get_theme_color("error_color", "Editor"));
- if (!advanced->is_pressed())
+ if (!advanced->is_pressed()) {
error_label->set_visible(!_find_first_script(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root()));
+ }
popup_centered();
}
void ConnectDialog::_advanced_pressed() {
-
if (advanced->is_pressed()) {
set_min_size(Size2(900, 500) * EDSCALE);
connect_to_label->set_text(TTR("Connect to Node:"));
@@ -401,7 +382,6 @@ void ConnectDialog::_advanced_pressed() {
}
ConnectDialog::ConnectDialog() {
-
set_min_size(Size2(600, 500) * EDSCALE);
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -515,7 +495,6 @@ ConnectDialog::ConnectDialog() {
}
ConnectDialog::~ConnectDialog() {
-
memdelete(cdbinds);
}
@@ -523,7 +502,6 @@ ConnectDialog::~ConnectDialog() {
// Originally copied and adapted from EditorProperty, try to keep style in sync.
Control *ConnectionsDockTree::make_custom_tooltip(const String &p_text) const {
-
EditorHelpBit *help_bit = memnew(EditorHelpBit);
help_bit->add_theme_style_override("panel", get_theme_stylebox("panel", "TooltipPanel"));
help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE);
@@ -536,7 +514,6 @@ Control *ConnectionsDockTree::make_custom_tooltip(const String &p_text) const {
}
struct _ConnectionsDockMethodInfoSort {
-
_FORCE_INLINE_ bool operator()(const MethodInfo &a, const MethodInfo &b) const {
return a.name < b.name;
}
@@ -547,7 +524,6 @@ struct _ConnectionsDockMethodInfoSort {
* Creates or edits connections based on state of the ConnectDialog when "Connect" is pressed.
*/
void ConnectionsDock::_make_or_edit_connection() {
-
TreeItem *it = tree->get_selected();
ERR_FAIL_COND(!it);
@@ -616,12 +592,12 @@ void ConnectionsDock::_make_or_edit_connection() {
* Creates single connection w/ undo-redo functionality.
*/
void ConnectionsDock::_connect(ConnectDialog::ConnectionData cToMake) {
-
Node *source = static_cast<Node *>(cToMake.source);
Node *target = static_cast<Node *>(cToMake.target);
- if (!source || !target)
+ if (!source || !target) {
return;
+ }
undo_redo->create_action(vformat(TTR("Connect '%s' to '%s'"), String(cToMake.signal), String(cToMake.method)));
@@ -641,7 +617,6 @@ void ConnectionsDock::_connect(ConnectDialog::ConnectionData cToMake) {
* Break single connection w/ undo-redo functionality.
*/
void ConnectionsDock::_disconnect(TreeItem &item) {
-
Connection cd = item.get_metadata(0);
ConnectDialog::ConnectionData c = cd;
@@ -664,11 +639,11 @@ void ConnectionsDock::_disconnect(TreeItem &item) {
* Can undo-redo as a single action.
*/
void ConnectionsDock::_disconnect_all() {
-
TreeItem *item = tree->get_selected();
- if (!_is_item_signal(*item))
+ if (!_is_item_signal(*item)) {
return;
+ }
TreeItem *child = item->get_children();
String signalName = item->get_metadata(0).operator Dictionary()["name"];
@@ -691,7 +666,6 @@ void ConnectionsDock::_disconnect_all() {
}
void ConnectionsDock::_tree_item_selected() {
-
TreeItem *item = tree->get_selected();
if (!item) { // Unlikely. Disable button just in case.
connect_button->set_text(TTR("Connect..."));
@@ -709,8 +683,9 @@ void ConnectionsDock::_tree_item_activated() { // "Activation" on double-click.
TreeItem *item = tree->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
if (_is_item_signal(*item)) {
_open_connection_dialog(*item);
@@ -720,7 +695,6 @@ void ConnectionsDock::_tree_item_activated() { // "Activation" on double-click.
}
bool ConnectionsDock::_is_item_signal(TreeItem &item) {
-
return (item.get_parent() == tree->get_root() || item.get_parent()->get_parent() == tree->get_root());
}
@@ -728,7 +702,6 @@ bool ConnectionsDock::_is_item_signal(TreeItem &item) {
* Open connection dialog with TreeItem data to CREATE a brand-new connection.
*/
void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
-
String signal = item.get_metadata(0).operator Dictionary()["name"];
const String &signalname = signal;
String midname = selectedNode->get_name();
@@ -769,7 +742,6 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
* Open connection dialog with Connection data to EDIT an existing connection.
*/
void ConnectionsDock::_open_connection_dialog(ConnectDialog::ConnectionData cToEdit) {
-
Node *src = static_cast<Node *>(cToEdit.source);
Node *dst = static_cast<Node *>(cToEdit.target);
@@ -784,21 +756,23 @@ void ConnectionsDock::_open_connection_dialog(ConnectDialog::ConnectionData cToE
* Open slot method location in script editor.
*/
void ConnectionsDock::_go_to_script(TreeItem &item) {
-
- if (_is_item_signal(item))
+ if (_is_item_signal(item)) {
return;
+ }
Connection cd = item.get_metadata(0);
ConnectDialog::ConnectionData c = cd;
ERR_FAIL_COND(c.source != selectedNode); //shouldn't happen but...bugcheck
- if (!c.target)
+ if (!c.target) {
return;
+ }
Ref<Script> script = c.target->get_script();
- if (script.is_null())
+ if (script.is_null()) {
return;
+ }
if (script.is_valid() && ScriptEditor::get_singleton()->script_goto_method(script, c.method)) {
editor->call("_editor_select", EditorNode::EDITOR_SCRIPT);
@@ -806,11 +780,11 @@ void ConnectionsDock::_go_to_script(TreeItem &item) {
}
void ConnectionsDock::_handle_signal_menu_option(int option) {
-
TreeItem *item = tree->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
switch (option) {
case CONNECT: {
@@ -825,11 +799,11 @@ void ConnectionsDock::_handle_signal_menu_option(int option) {
}
void ConnectionsDock::_handle_slot_menu_option(int option) {
-
TreeItem *item = tree->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
switch (option) {
case EDIT: {
@@ -847,11 +821,11 @@ void ConnectionsDock::_handle_slot_menu_option(int option) {
}
void ConnectionsDock::_rmb_pressed(Vector2 position) {
-
TreeItem *item = tree->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
Vector2 global_position = tree->get_global_position() + position;
@@ -865,12 +839,10 @@ void ConnectionsDock::_rmb_pressed(Vector2 position) {
}
void ConnectionsDock::_close() {
-
hide();
}
void ConnectionsDock::_connect_pressed() {
-
TreeItem *item = tree->get_selected();
if (!item) {
connect_button->set_disabled(true);
@@ -886,29 +858,26 @@ void ConnectionsDock::_connect_pressed() {
}
void ConnectionsDock::_notification(int p_what) {
-
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
update_tree();
}
}
void ConnectionsDock::_bind_methods() {
-
ClassDB::bind_method("update_tree", &ConnectionsDock::update_tree);
}
void ConnectionsDock::set_node(Node *p_node) {
-
selectedNode = p_node;
update_tree();
}
void ConnectionsDock::update_tree() {
-
tree->clear();
- if (!selectedNode)
+ if (!selectedNode) {
return;
+ }
TreeItem *root = tree->create_item();
@@ -920,27 +889,25 @@ void ConnectionsDock::update_tree() {
StringName base = selectedNode->get_class();
while (base) {
-
List<MethodInfo> node_signals2;
Ref<Texture2D> icon;
String name;
if (!did_script) {
-
Ref<Script> scr = selectedNode->get_script();
if (scr.is_valid()) {
scr->get_script_signal_list(&node_signals2);
- if (scr->get_path().is_resource_file())
+ if (scr->get_path().is_resource_file()) {
name = scr->get_path().get_file();
- else
+ } else {
name = scr->get_class();
+ }
if (has_theme_icon(scr->get_class(), "EditorIcons")) {
icon = get_theme_icon(scr->get_class(), "EditorIcons");
}
}
} else {
-
ClassDB::get_signal_list(base, &node_signals2, true);
if (has_theme_icon(base, "EditorIcons")) {
icon = get_theme_icon(base, "EditorIcons");
@@ -965,7 +932,6 @@ void ConnectionsDock::update_tree() {
}
for (List<MethodInfo>::Element *E = node_signals2.front(); E; E = E->next()) {
-
MethodInfo &mi = E->get();
StringName signal_name = mi.name;
@@ -973,11 +939,11 @@ void ConnectionsDock::update_tree() {
PackedStringArray argnames;
if (mi.arguments.size()) {
for (int i = 0; i < mi.arguments.size(); i++) {
-
PropertyInfo &pi = mi.arguments[i];
- if (i > 0)
+ if (i > 0) {
signaldesc += ", ";
+ }
String tname = "var";
if (pi.type == Variant::OBJECT && pi.class_name != StringName()) {
tname = pi.class_name.operator String();
@@ -1018,7 +984,7 @@ void ConnectionsDock::update_tree() {
while (F && descr == String()) {
for (int i = 0; i < F->get().signals.size(); i++) {
if (F->get().signals[i].name == signal_name.operator String()) {
- descr = DTR(F->get().signals[i].description.strip_edges());
+ descr = DTR(F->get().signals[i].description);
break;
}
}
@@ -1040,28 +1006,30 @@ void ConnectionsDock::update_tree() {
selectedNode->get_signal_connection_list(signal_name, &connections);
for (List<Object::Connection>::Element *F = connections.front(); F; F = F->next()) {
-
Connection cn = F->get();
- if (!(cn.flags & CONNECT_PERSIST))
+ if (!(cn.flags & CONNECT_PERSIST)) {
continue;
+ }
ConnectDialog::ConnectionData c = cn;
Node *target = Object::cast_to<Node>(c.target);
- if (!target)
+ if (!target) {
continue;
+ }
String path = String(selectedNode->get_path_to(target)) + " :: " + c.method + "()";
- if (c.flags & CONNECT_DEFERRED)
+ if (c.flags & CONNECT_DEFERRED) {
path += " (deferred)";
- if (c.flags & CONNECT_ONESHOT)
+ }
+ if (c.flags & CONNECT_ONESHOT) {
path += " (oneshot)";
+ }
if (c.binds.size()) {
-
path += " binds(";
for (int i = 0; i < c.binds.size(); i++) {
-
- if (i > 0)
+ if (i > 0) {
path += ", ";
+ }
path += c.binds[i].operator String();
}
path += ")";
@@ -1087,7 +1055,6 @@ void ConnectionsDock::update_tree() {
}
ConnectionsDock::ConnectionsDock(EditorNode *p_editor) {
-
editor = p_editor;
set_name(TTR("Signals"));
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index 91d0d5c32c..d0c8d939cf 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -50,7 +50,6 @@ class PopupMenu;
class ConnectDialogBinds;
class ConnectDialog : public ConfirmationDialog {
-
GDCLASS(ConnectDialog, ConfirmationDialog);
public:
@@ -142,12 +141,10 @@ public:
// Custom Tree needed to use a RichTextLabel as tooltip control
// when display signal documentation.
class ConnectionsDockTree : public Tree {
-
virtual Control *make_custom_tooltip(const String &p_text) const;
};
class ConnectionsDock : public VBoxContainer {
-
GDCLASS(ConnectionsDock, VBoxContainer);
//Right-click Pop-up Menu Options.
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 6cbb1b1791..73468f8ce0 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -41,7 +41,6 @@
#include "scene/gui/box_container.h"
void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const String &p_select_type) {
-
type_list.clear();
ClassDB::get_class_list(&type_list);
ScriptServer::get_global_class_list(&type_list);
@@ -52,16 +51,17 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const St
FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("create_recent." + base_type), FileAccess::READ);
if (f) {
-
TreeItem *root = recent->create_item();
+ String icon_fallback = search_options->has_theme_icon(base_type, "EditorIcons") ? base_type : "Object";
+
while (!f->eof_reached()) {
String l = f->get_line().strip_edges();
String name = l.split(" ")[0];
if ((ClassDB::class_exists(name) || ScriptServer::is_global_class(name)) && !_is_class_disabled_by_feature_profile(name)) {
TreeItem *ti = recent->create_item(root);
ti->set_text(0, l);
- ti->set_icon(0, EditorNode::get_singleton()->get_class_icon(l, base_type));
+ ti->set_icon(0, EditorNode::get_singleton()->get_class_icon(name, icon_fallback));
}
}
@@ -75,7 +75,6 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const St
favorite_list.clear();
if (f) {
-
while (!f->eof_reached()) {
String l = f->get_line().strip_edges();
@@ -120,49 +119,50 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const St
}
void CreateDialog::_text_changed(const String &p_newtext) {
-
_update_search();
}
void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
-
Ref<InputEventKey> k = p_ie;
if (k.is_valid() && (k->get_keycode() == KEY_UP ||
k->get_keycode() == KEY_DOWN ||
k->get_keycode() == KEY_PAGEUP ||
k->get_keycode() == KEY_PAGEDOWN)) {
-
search_options->call("_gui_input", k);
search_box->accept_event();
}
}
void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p_types, TreeItem *p_root, TreeItem **to_select) {
-
- if (p_types.has(p_type))
+ if (p_types.has(p_type)) {
return;
+ }
bool cpp_type = ClassDB::class_exists(p_type);
EditorData &ed = EditorNode::get_editor_data();
- if (p_type == base_type)
+ if (p_type == base_type) {
return;
+ }
if (cpp_type) {
- if (!ClassDB::is_parent_class(p_type, base_type))
+ if (!ClassDB::is_parent_class(p_type, base_type)) {
return;
+ }
} else {
if (!search_loaded_scripts.has(p_type)) {
search_loaded_scripts[p_type] = ed.script_class_load_script(p_type);
}
- if (!ScriptServer::is_global_class(p_type) || !ed.script_class_is_parent(p_type, base_type))
+ if (!ScriptServer::is_global_class(p_type) || !ed.script_class_is_parent(p_type, base_type)) {
return;
+ }
String script_path = ScriptServer::get_global_class_path(p_type);
if (script_path.find("res://addons/", 0) != -1) {
- if (!EditorNode::get_singleton()->is_addon_plugin_enabled(script_path.get_slicec('/', 3)))
+ if (!EditorNode::get_singleton()->is_addon_plugin_enabled(script_path.get_slicec('/', 3))) {
return;
+ }
}
}
@@ -171,16 +171,15 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p
TreeItem *parent = p_root;
if (inherits.length()) {
-
if (!p_types.has(inherits)) {
-
add_type(inherits, p_types, p_root, to_select);
}
- if (p_types.has(inherits))
+ if (p_types.has(inherits)) {
parent = p_types[inherits];
- else if (ScriptServer::is_global_class(inherits))
+ } else if (ScriptServer::is_global_class(inherits)) {
return;
+ }
}
bool can_instance = (cpp_type && ClassDB::can_instance(p_type)) || ScriptServer::is_global_class(p_type);
@@ -251,7 +250,8 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p
const String &description = DTR(EditorHelp::get_doc_data()->class_list[p_type].brief_description);
item->set_tooltip(0, description);
- item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, base_type));
+ String icon_fallback = search_options->has_theme_icon(base_type, "EditorIcons") ? base_type : "Object";
+ item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback));
p_types[p_type] = item;
}
@@ -267,7 +267,6 @@ bool CreateDialog::_is_type_prefered(const String &type) {
}
bool CreateDialog::_is_class_disabled_by_feature_profile(const StringName &p_class) {
-
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
if (profile.is_null()) {
return false;
@@ -277,7 +276,6 @@ bool CreateDialog::_is_class_disabled_by_feature_profile(const StringName &p_cla
}
void CreateDialog::select_type(const String &p_type) {
-
TreeItem *to_select;
if (search_options_types.has(p_type)) {
to_select = search_options_types[p_type];
@@ -310,14 +308,12 @@ void CreateDialog::_update_search() {
EditorData &ed = EditorNode::get_editor_data();
root->set_text(0, base_type);
- if (search_options->has_theme_icon(base_type, "EditorIcons")) {
- root->set_icon(0, search_options->get_theme_icon(base_type, "EditorIcons"));
- }
+ String base_icon = search_options->has_theme_icon(base_type, "EditorIcons") ? base_type : "Object";
+ root->set_icon(0, search_options->get_theme_icon(base_icon, "EditorIcons"));
TreeItem *to_select = search_box->get_text() == base_type ? root : nullptr;
for (List<StringName>::Element *I = type_list.front(); I; I = I->next()) {
-
String type = I->get();
if (_is_class_disabled_by_feature_profile(type)) {
@@ -325,44 +321,48 @@ void CreateDialog::_update_search() {
}
bool cpp_type = ClassDB::class_exists(type);
- if (base_type == "Node" && type.begins_with("Editor"))
+ if (base_type == "Node" && type.begins_with("Editor")) {
continue; // do not show editor nodes
+ }
- if (cpp_type && !ClassDB::can_instance(type))
+ if (cpp_type && !ClassDB::can_instance(type)) {
continue; // can't create what can't be instanced
+ }
if (cpp_type) {
bool skip = false;
for (Set<StringName>::Element *E = type_blacklist.front(); E && !skip; E = E->next()) {
- if (ClassDB::is_parent_class(type, E->get()))
+ if (ClassDB::is_parent_class(type, E->get())) {
skip = true;
+ }
}
- if (skip)
+ if (skip) {
continue;
+ }
}
if (search_box->get_text() == "") {
add_type(type, search_options_types, root, &to_select);
} else {
-
bool found = false;
String type2 = type;
+ bool cpp_type2 = cpp_type;
if (!cpp_type && !search_loaded_scripts.has(type)) {
search_loaded_scripts[type] = ed.script_class_load_script(type);
}
- while (type2 != "" && (cpp_type ? ClassDB::is_parent_class(type2, base_type) : ed.script_class_is_parent(type2, base_type)) && type2 != base_type) {
+ while (type2 != "" && (cpp_type2 ? ClassDB::is_parent_class(type2, base_type) : ed.script_class_is_parent(type2, base_type)) && type2 != base_type) {
if (search_box->get_text().is_subsequence_ofi(type2)) {
-
found = true;
break;
}
- type2 = cpp_type ? ClassDB::get_parent_class(type2) : ed.script_class_get_base(type2);
+ type2 = cpp_type2 ? ClassDB::get_parent_class(type2) : ed.script_class_get_base(type2);
+ cpp_type2 = cpp_type2 || ClassDB::class_exists(type2); // Built-in class can't inherit from custom type, so we can skip the check if it's already true.
- if (!cpp_type && !search_loaded_scripts.has(type2)) {
+ if (!cpp_type2 && !search_loaded_scripts.has(type2)) {
search_loaded_scripts[type2] = ed.script_class_load_script(type2);
}
}
@@ -377,27 +377,27 @@ void CreateDialog::_update_search() {
const Vector<EditorData::CustomType> &ct = EditorNode::get_editor_data().get_custom_types()[type];
for (int i = 0; i < ct.size(); i++) {
-
bool show = search_box->get_text().is_subsequence_ofi(ct[i].name);
- if (!show)
+ if (!show) {
continue;
+ }
- if (!search_options_types.has(type))
+ if (!search_options_types.has(type)) {
add_type(type, search_options_types, root, &to_select);
+ }
TreeItem *ti;
- if (search_options_types.has(type))
+ if (search_options_types.has(type)) {
ti = search_options_types[type];
- else
+ } else {
ti = search_options->get_root();
+ }
TreeItem *item = search_options->create_item(ti);
item->set_metadata(0, type);
item->set_text(0, ct[i].name);
- if (ct[i].icon.is_valid()) {
- item->set_icon(0, ct[i].icon);
- }
+ item->set_icon(0, ct[i].icon.is_valid() ? ct[i].icon : search_options->get_theme_icon(base_icon, "EditorIcons"));
if (!to_select || ct[i].name == search_box->get_text()) {
to_select = item;
@@ -421,22 +421,22 @@ void CreateDialog::_update_search() {
}
void CreateDialog::_confirmed() {
-
TreeItem *ti = search_options->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("create_recent." + base_type), FileAccess::WRITE);
if (f) {
f->store_line(get_selected_type());
TreeItem *t = recent->get_root();
- if (t)
+ if (t) {
t = t->get_children();
+ }
int count = 0;
while (t) {
if (t->get_text(0) != get_selected_type()) {
-
f->store_line(t->get_text(0));
}
@@ -456,7 +456,6 @@ void CreateDialog::_confirmed() {
}
void CreateDialog::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &CreateDialog::_confirmed));
@@ -480,18 +479,17 @@ void CreateDialog::_notification(int p_what) {
}
void CreateDialog::set_base_type(const String &p_base) {
-
base_type = p_base;
- if (is_replace_mode)
+ if (is_replace_mode) {
set_title(vformat(TTR("Change %s Type"), p_base));
- else
+ } else {
set_title(vformat(TTR("Create New %s"), p_base));
+ }
_update_search();
}
String CreateDialog::get_base_type() const {
-
return base_type;
}
@@ -500,60 +498,76 @@ void CreateDialog::set_preferred_search_result_type(const String &p_preferred_ty
}
String CreateDialog::get_preferred_search_result_type() {
-
return preferred_search_result_type;
}
-String CreateDialog::get_selected_type() {
+String CreateDialog::get_selected_type() {
TreeItem *selected = search_options->get_selected();
- if (selected)
+ if (selected) {
return selected->get_text(0);
- else
+ } else {
return String();
+ }
}
Object *CreateDialog::instance_selected() {
-
TreeItem *selected = search_options->get_selected();
- if (selected) {
+ if (!selected) {
+ return nullptr;
+ }
- Variant md = selected->get_metadata(0);
+ Variant md = selected->get_metadata(0);
+ String custom;
+ if (md.get_type() != Variant::NIL) {
+ custom = md;
+ }
- String custom;
- if (md.get_type() != Variant::NIL)
- custom = md;
+ Object *obj = nullptr;
- if (custom != String()) {
- if (ScriptServer::is_global_class(custom)) {
- Object *obj = EditorNode::get_editor_data().script_class_instance(custom);
- Node *n = Object::cast_to<Node>(obj);
- if (n)
- n->set_name(custom);
- return obj;
+ if (!custom.empty()) {
+ if (ScriptServer::is_global_class(custom)) {
+ obj = EditorNode::get_editor_data().script_class_instance(custom);
+ Node *n = Object::cast_to<Node>(obj);
+ if (n) {
+ n->set_name(custom);
}
- return EditorNode::get_editor_data().instance_custom_type(selected->get_text(0), custom);
+ obj = n;
} else {
- return ClassDB::instance(selected->get_text(0));
+ obj = EditorNode::get_editor_data().instance_custom_type(selected->get_text(0), custom);
}
+ } else {
+ obj = ClassDB::instance(selected->get_text(0));
}
- return nullptr;
+ // Check if any Object-type property should be instantiated.
+ List<PropertyInfo> pinfo;
+ obj->get_property_list(&pinfo);
+
+ for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
+ if (E->get().type == Variant::OBJECT && E->get().usage & PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT) {
+ Object *prop = ClassDB::instance(E->get().class_name);
+ obj->set(E->get().name, prop);
+ }
+ }
+
+ return obj;
}
void CreateDialog::_item_selected() {
-
TreeItem *item = search_options->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
String name = item->get_text(0);
favorite->set_disabled(false);
favorite->set_pressed(favorite_list.find(name) != -1);
- if (!EditorHelp::get_doc_data()->class_list.has(name))
+ if (!EditorHelp::get_doc_data()->class_list.has(name)) {
return;
+ }
help_bit->set_text(DTR(EditorHelp::get_doc_data()->class_list[name].brief_description));
@@ -565,10 +579,10 @@ void CreateDialog::_hide_requested() {
}
void CreateDialog::_favorite_toggled() {
-
TreeItem *item = search_options->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
String name = item->get_text(0);
@@ -584,16 +598,15 @@ void CreateDialog::_favorite_toggled() {
}
void CreateDialog::_save_favorite_list() {
-
FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("favorites." + base_type), FileAccess::WRITE);
if (f) {
-
for (int i = 0; i < favorite_list.size(); i++) {
String l = favorite_list[i];
String name = l.split(" ")[0];
- if (!(ClassDB::class_exists(name) || ScriptServer::is_global_class(name)))
+ if (!(ClassDB::class_exists(name) || ScriptServer::is_global_class(name))) {
continue;
+ }
f->store_line(l);
}
memdelete(f);
@@ -601,26 +614,31 @@ void CreateDialog::_save_favorite_list() {
}
void CreateDialog::_update_favorite_list() {
-
favorites->clear();
+
TreeItem *root = favorites->create_item();
+
+ String icon_fallback = search_options->has_theme_icon(base_type, "EditorIcons") ? base_type : "Object";
+
for (int i = 0; i < favorite_list.size(); i++) {
String l = favorite_list[i];
String name = l.split(" ")[0];
- if (!((ClassDB::class_exists(name) || ScriptServer::is_global_class(name)) && !_is_class_disabled_by_feature_profile(name)))
+ if (!((ClassDB::class_exists(name) || ScriptServer::is_global_class(name)) && !_is_class_disabled_by_feature_profile(name))) {
continue;
+ }
+
TreeItem *ti = favorites->create_item(root);
ti->set_text(0, l);
- ti->set_icon(0, EditorNode::get_singleton()->get_class_icon(l, base_type));
+ ti->set_icon(0, EditorNode::get_singleton()->get_class_icon(name, icon_fallback));
}
emit_signal("favorites_updated");
}
void CreateDialog::_history_selected() {
-
TreeItem *item = recent->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
search_box->set_text(item->get_text(0).get_slicec(' ', 0));
favorites->deselect_all();
@@ -628,10 +646,10 @@ void CreateDialog::_history_selected() {
}
void CreateDialog::_favorite_selected() {
-
TreeItem *item = favorites->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
search_box->set_text(item->get_text(0).get_slicec(' ', 0));
recent->deselect_all();
@@ -639,19 +657,16 @@ void CreateDialog::_favorite_selected() {
}
void CreateDialog::_history_activated() {
-
_history_selected();
_confirmed();
}
void CreateDialog::_favorite_activated() {
-
_favorite_selected();
_confirmed();
}
Variant CreateDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
TreeItem *ti = favorites->get_item_at_position(p_point);
if (ti) {
Dictionary d;
@@ -670,7 +685,6 @@ Variant CreateDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
}
bool CreateDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
if (d.has("type") && String(d["type"]) == "create_favorite_drag") {
favorites->set_drop_mode_flags(Tree::DROP_MODE_INBETWEEN);
@@ -679,26 +693,29 @@ bool CreateDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data
return false;
}
-void CreateDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
+void CreateDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
Dictionary d = p_data;
TreeItem *ti = favorites->get_item_at_position(p_point);
- if (!ti)
+ if (!ti) {
return;
+ }
String drop_at = ti->get_text(0);
int ds = favorites->get_drop_section_at_position(p_point);
int drop_idx = favorite_list.find(drop_at);
- if (drop_idx < 0)
+ if (drop_idx < 0) {
return;
+ }
String type = d["class"];
int from_idx = favorite_list.find(type);
- if (from_idx < 0)
+ if (from_idx < 0) {
return;
+ }
if (drop_idx == from_idx) {
ds = -1; //cause it will be gone
@@ -727,7 +744,6 @@ void CreateDialog::_save_and_update_favorite_list() {
}
void CreateDialog::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_save_and_update_favorite_list"), &CreateDialog::_save_and_update_favorite_list);
ClassDB::bind_method("get_drag_data_fw", &CreateDialog::get_drag_data_fw);
@@ -739,7 +755,6 @@ void CreateDialog::_bind_methods() {
}
CreateDialog::CreateDialog() {
-
is_replace_mode = false;
HSplitContainer *hsc = memnew(HSplitContainer);
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index f2e2eb1b04..cdc91ae535 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -40,7 +40,6 @@
#include "scene/gui/tree.h"
class CreateDialog : public ConfirmationDialog {
-
GDCLASS(CreateDialog, ConfirmationDialog);
Vector<String> favorite_list;
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
index 00ed2bbc4c..dcd7220ed0 100644
--- a/editor/debugger/editor_debugger_inspector.cpp
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -36,9 +36,9 @@
#include "scene/debugger/scene_debugger.h"
bool EditorDebuggerRemoteObject::_set(const StringName &p_name, const Variant &p_value) {
-
- if (!editable || !prop_values.has(p_name) || String(p_name).begins_with("Constants/"))
+ if (!editable || !prop_values.has(p_name) || String(p_name).begins_with("Constants/")) {
return false;
+ }
prop_values[p_name] = p_value;
emit_signal("value_edited", remote_object_id, p_name, p_value);
@@ -46,16 +46,15 @@ bool EditorDebuggerRemoteObject::_set(const StringName &p_name, const Variant &p
}
bool EditorDebuggerRemoteObject::_get(const StringName &p_name, Variant &r_ret) const {
-
- if (!prop_values.has(p_name))
+ if (!prop_values.has(p_name)) {
return false;
+ }
r_ret = prop_values[p_name];
return true;
}
void EditorDebuggerRemoteObject::_get_property_list(List<PropertyInfo> *p_list) const {
-
p_list->clear(); //sorry, no want category
for (const List<PropertyInfo>::Element *E = prop_list.front(); E; E = E->next()) {
p_list->push_back(E->get());
@@ -63,10 +62,11 @@ void EditorDebuggerRemoteObject::_get_property_list(List<PropertyInfo> *p_list)
}
String EditorDebuggerRemoteObject::get_title() {
- if (remote_object_id.is_valid())
+ if (remote_object_id.is_valid()) {
return TTR("Remote ") + String(type_name) + ": " + itos(remote_object_id);
- else
+ } else {
return "<null>";
+ }
}
Variant EditorDebuggerRemoteObject::get_variant(const StringName &p_name) {
@@ -76,7 +76,6 @@ Variant EditorDebuggerRemoteObject::get_variant(const StringName &p_name) {
}
void EditorDebuggerRemoteObject::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("get_title"), &EditorDebuggerRemoteObject::get_title);
ClassDB::bind_method(D_METHOD("get_variant"), &EditorDebuggerRemoteObject::get_variant);
ClassDB::bind_method(D_METHOD("clear"), &EditorDebuggerRemoteObject::clear);
@@ -115,12 +114,10 @@ void EditorDebuggerInspector::_notification(int p_what) {
}
void EditorDebuggerInspector::_object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value) {
-
emit_signal("object_edited", p_id, p_prop, p_value);
}
void EditorDebuggerInspector::_object_selected(ObjectID p_object) {
-
emit_signal("object_selected", p_object);
}
@@ -147,7 +144,6 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
int new_props_added = 0;
Set<String> changed;
for (int i = 0; i < obj.properties.size(); i++) {
-
PropertyInfo &pinfo = obj.properties[i].first;
Variant &var = obj.properties[i].second;
@@ -157,12 +153,9 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
if (path.find("::") != -1) {
// built-in resource
String base_path = path.get_slice("::", 0);
- if (ResourceLoader::get_resource_type(base_path) == "PackedScene") {
- if (!EditorNode::get_singleton()->is_scene_open(base_path)) {
- EditorNode::get_singleton()->load_scene(base_path);
- }
- } else {
- EditorNode::get_singleton()->load_resource(base_path);
+ RES dependency = ResourceLoader::load(base_path);
+ if (dependency.is_valid()) {
+ remote_dependencies.insert(dependency);
}
}
var = ResourceLoader::load(path);
@@ -187,7 +180,6 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
new_props_added++;
debugObj->prop_values[pinfo.name] = var;
} else {
-
if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, debugObj->prop_values[pinfo.name], var))) {
debugObj->prop_values[pinfo.name] = var;
changed.insert(pinfo.name);
@@ -216,16 +208,17 @@ void EditorDebuggerInspector::clear_cache() {
memdelete(E->value());
}
remote_objects.clear();
+ remote_dependencies.clear();
}
Object *EditorDebuggerInspector::get_object(ObjectID p_id) {
- if (remote_objects.has(p_id))
+ if (remote_objects.has(p_id)) {
return remote_objects[p_id];
+ }
return nullptr;
}
void EditorDebuggerInspector::add_stack_variable(const Array &p_array) {
-
DebuggerMarshalls::ScriptStackVariable var;
var.deserialize(p_array);
String n = var.name;
diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h
index e1dfbefcf3..7d13a4c362 100644
--- a/editor/debugger/editor_debugger_inspector.h
+++ b/editor/debugger/editor_debugger_inspector.h
@@ -33,7 +33,6 @@
#include "editor/editor_inspector.h"
class EditorDebuggerRemoteObject : public Object {
-
GDCLASS(EditorDebuggerRemoteObject, Object);
protected:
@@ -61,16 +60,16 @@ public:
void update() { _change_notify(); }
- EditorDebuggerRemoteObject(){};
+ EditorDebuggerRemoteObject() {}
};
class EditorDebuggerInspector : public EditorInspector {
-
GDCLASS(EditorDebuggerInspector, EditorInspector);
private:
ObjectID inspected_object_id;
Map<ObjectID, EditorDebuggerRemoteObject *> remote_objects;
+ Set<RES> remote_dependencies;
EditorDebuggerRemoteObject *variables;
void _object_selected(ObjectID p_object);
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index 5bfb79806e..a9c18138d8 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -50,8 +50,9 @@ void _for_all(TabContainer *p_node, const Func &p_func) {
EditorDebuggerNode *EditorDebuggerNode::singleton = nullptr;
EditorDebuggerNode::EditorDebuggerNode() {
- if (!singleton)
+ if (!singleton) {
singleton = this;
+ }
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
@@ -119,8 +120,9 @@ ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
void EditorDebuggerNode::_stack_frame_selected(int p_debugger) {
const ScriptEditorDebugger *dbg = get_debugger(p_debugger);
ERR_FAIL_COND(!dbg);
- if (dbg != get_current_debugger())
+ if (dbg != get_current_debugger()) {
return;
+ }
_text_editor_stack_goto(dbg);
}
@@ -131,8 +133,9 @@ void EditorDebuggerNode::_error_selected(const String &p_file, int p_line, int p
void EditorDebuggerNode::_text_editor_stack_goto(const ScriptEditorDebugger *p_debugger) {
const String file = p_debugger->get_stack_script_file();
- if (file.empty())
+ if (file.empty()) {
return;
+ }
stack_script = ResourceLoader::load(file);
const int line = p_debugger->get_stack_script_line() - 1;
emit_signal("goto_script_line", stack_script, line);
@@ -141,7 +144,6 @@ void EditorDebuggerNode::_text_editor_stack_goto(const ScriptEditorDebugger *p_d
}
void EditorDebuggerNode::_bind_methods() {
-
// LiveDebug.
ClassDB::bind_method("live_debug_create_node", &EditorDebuggerNode::live_debug_create_node);
ClassDB::bind_method("live_debug_instance_node", &EditorDebuggerNode::live_debug_instance_node);
@@ -199,13 +201,15 @@ void EditorDebuggerNode::stop() {
}
// Also close all debugging sessions.
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
- if (dbg->is_session_active())
+ if (dbg->is_session_active()) {
dbg->stop();
+ }
});
_break_state_changed();
if (hide_on_stop) {
- if (is_visible_in_tree())
+ if (is_visible_in_tree()) {
EditorNode::get_singleton()->hide_bottom_panel();
+ }
}
breakpoints.clear();
set_process(false);
@@ -225,8 +229,9 @@ void EditorDebuggerNode::_notification(int p_what) {
break;
}
- if (p_what != NOTIFICATION_PROCESS || !server.is_valid())
+ if (p_what != NOTIFICATION_PROCESS || !server.is_valid()) {
return;
+ }
if (!server.is_valid() || !server->is_active()) {
stop();
@@ -243,7 +248,6 @@ void EditorDebuggerNode::_notification(int p_what) {
});
if (error_count != last_error_count || warning_count != last_warning_count) {
-
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->update_tabs();
});
@@ -287,8 +291,9 @@ void EditorDebuggerNode::_notification(int p_what) {
if (server->is_connection_available()) {
ScriptEditorDebugger *debugger = nullptr;
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
- if (debugger || dbg->is_session_active())
+ if (debugger || dbg->is_session_active()) {
return;
+ }
debugger = dbg;
});
if (debugger == nullptr) {
@@ -327,8 +332,9 @@ void EditorDebuggerNode::_debugger_stopped(int p_id) {
bool found = false;
_for_all(tabs, [&](ScriptEditorDebugger *p_debugger) {
- if (p_debugger->is_session_active())
+ if (p_debugger->is_session_active()) {
found = true;
+ }
});
if (!found) {
EditorNode::get_singleton()->get_pause_button()->set_pressed(false);
@@ -342,8 +348,9 @@ void EditorDebuggerNode::_debugger_stopped(int p_id) {
void EditorDebuggerNode::_debugger_wants_stop(int p_id) {
// Ask editor to kill PID.
int pid = get_debugger(p_id)->get_remote_pid();
- if (pid)
+ if (pid) {
EditorNode::get_singleton()->call_deferred("stop_child_process", pid);
+ }
}
void EditorDebuggerNode::_debugger_changed(int p_tab) {
@@ -382,12 +389,14 @@ void EditorDebuggerNode::set_script_debug_button(MenuButton *p_button) {
void EditorDebuggerNode::_break_state_changed() {
const bool breaked = get_current_debugger()->is_breaked();
const bool can_debug = get_current_debugger()->is_debuggable();
- if (breaked) // Show debugger.
+ if (breaked) { // Show debugger.
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
+ }
// Update script menu.
- if (!script_menu)
+ if (!script_menu) {
return;
+ }
PopupMenu *p = script_menu->get_popup();
p->set_item_disabled(p->get_item_index(DEBUG_NEXT), !(breaked && can_debug));
p->set_item_disabled(p->get_item_index(DEBUG_STEP), !(breaked && can_debug));
@@ -436,8 +445,9 @@ void EditorDebuggerNode::_paused() {
void EditorDebuggerNode::_breaked(bool p_breaked, bool p_can_debug, int p_debugger) {
if (get_current_debugger() != get_debugger(p_debugger)) {
- if (!p_breaked)
+ if (!p_breaked) {
return;
+ }
tabs->set_current_tab(p_debugger);
}
_break_state_changed();
@@ -488,58 +498,67 @@ void EditorDebuggerNode::request_remote_tree() {
}
void EditorDebuggerNode::_remote_tree_updated(int p_debugger) {
- if (p_debugger != tabs->get_current_tab())
+ if (p_debugger != tabs->get_current_tab()) {
return;
+ }
remote_scene_tree->clear();
remote_scene_tree->update_scene_tree(get_current_debugger()->get_remote_tree(), p_debugger);
}
void EditorDebuggerNode::_remote_object_updated(ObjectID p_id, int p_debugger) {
- if (p_debugger != tabs->get_current_tab())
+ if (p_debugger != tabs->get_current_tab()) {
return;
+ }
if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) {
- if (obj->remote_object_id == p_id)
+ if (obj->remote_object_id == p_id) {
return; // Already being edited
+ }
}
EditorNode::get_singleton()->push_item(get_current_debugger()->get_remote_object(p_id));
}
void EditorDebuggerNode::_remote_object_property_updated(ObjectID p_id, const String &p_property, int p_debugger) {
- if (p_debugger != tabs->get_current_tab())
+ if (p_debugger != tabs->get_current_tab()) {
return;
+ }
if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) {
- if (obj->remote_object_id != p_id)
+ if (obj->remote_object_id != p_id) {
return;
+ }
EditorNode::get_singleton()->get_inspector()->update_property(p_property);
}
}
void EditorDebuggerNode::_remote_object_requested(ObjectID p_id, int p_debugger) {
- if (p_debugger != tabs->get_current_tab())
+ if (p_debugger != tabs->get_current_tab()) {
return;
+ }
inspect_edited_object_timeout = 0.7; // Temporarily disable timeout to avoid multiple requests.
get_current_debugger()->request_remote_object(p_id);
}
void EditorDebuggerNode::_save_node_requested(ObjectID p_id, const String &p_file, int p_debugger) {
- if (p_debugger != tabs->get_current_tab())
+ if (p_debugger != tabs->get_current_tab()) {
return;
+ }
get_current_debugger()->save_node(p_id, p_file);
}
// Remote inspector/edit.
void EditorDebuggerNode::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
- if (!singleton)
+ if (!singleton) {
return;
+ }
_for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) {
dbg->_method_changed(p_base, p_name, VARIANT_ARG_PASS);
});
}
void EditorDebuggerNode::_property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value) {
- if (!singleton)
+ if (!singleton) {
return;
+ }
_for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) {
dbg->_property_changed(p_base, p_property, p_value);
});
@@ -547,46 +566,53 @@ void EditorDebuggerNode::_property_changeds(void *p_ud, Object *p_base, const St
// LiveDebug
void EditorDebuggerNode::set_live_debugging(bool p_enabled) {
-
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->set_live_debugging(p_enabled);
});
}
+
void EditorDebuggerNode::update_live_edit_root() {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->update_live_edit_root();
});
}
+
void EditorDebuggerNode::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_create_node(p_parent, p_type, p_name);
});
}
+
void EditorDebuggerNode::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_instance_node(p_parent, p_path, p_name);
});
}
+
void EditorDebuggerNode::live_debug_remove_node(const NodePath &p_at) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_remove_node(p_at);
});
}
+
void EditorDebuggerNode::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_remove_and_keep_node(p_at, p_keep_id);
});
}
+
void EditorDebuggerNode::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_restore_node(p_id, p_at, p_at_pos);
});
}
+
void EditorDebuggerNode::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_duplicate_node(p_at, p_new_name);
});
}
+
void EditorDebuggerNode::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->live_debug_reparent_node(p_at, p_new_place, p_new_name, p_at_pos);
diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h
index 7546febd05..ff9601c026 100644
--- a/editor/debugger/editor_debugger_node.h
+++ b/editor/debugger/editor_debugger_node.h
@@ -42,7 +42,6 @@ class ScriptEditorDebugger;
class TabContainer;
class EditorDebuggerNode : public MarginContainer {
-
GDCLASS(EditorDebuggerNode, MarginContainer);
public:
@@ -71,12 +70,13 @@ private:
int line = 0;
bool operator<(const Breakpoint &p_b) const {
- if (line == p_b.line)
+ if (line == p_b.line) {
return source < p_b.source;
+ }
return line < p_b.line;
}
- Breakpoint(){};
+ Breakpoint() {}
Breakpoint(const String &p_source, int p_line) {
line = p_line;
diff --git a/editor/debugger/editor_debugger_server.cpp b/editor/debugger/editor_debugger_server.cpp
index 33f20d9a12..0b655044a8 100644
--- a/editor/debugger/editor_debugger_server.cpp
+++ b/editor/debugger/editor_debugger_server.cpp
@@ -39,7 +39,6 @@
#include "editor/editor_settings.h"
class EditorDebuggerServerTCP : public EditorDebuggerServer {
-
private:
Ref<TCP_Server> server;
diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h
index 515ffce628..10a9a232ab 100644
--- a/editor/debugger/editor_debugger_server.h
+++ b/editor/debugger/editor_debugger_server.h
@@ -35,7 +35,6 @@
#include "core/reference.h"
class EditorDebuggerServer : public Reference {
-
public:
typedef EditorDebuggerServer *(*CreateServerFunc)(const String &p_uri);
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index c2b94c79bb..0b5f865a98 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -64,7 +64,6 @@ void EditorDebuggerTree::_bind_methods() {
}
void EditorDebuggerTree::_scene_tree_selected() {
-
if (updating_scene_tree) {
return;
}
@@ -80,15 +79,14 @@ void EditorDebuggerTree::_scene_tree_selected() {
}
void EditorDebuggerTree::_scene_tree_folded(Object *p_obj) {
-
if (updating_scene_tree) {
-
return;
}
TreeItem *item = Object::cast_to<TreeItem>(p_obj);
- if (!item)
+ if (!item) {
return;
+ }
ObjectID id = ObjectID(uint64_t(item->get_metadata(0)));
if (unfold_cache.has(id)) {
@@ -99,10 +97,10 @@ void EditorDebuggerTree::_scene_tree_folded(Object *p_obj) {
}
void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position) {
-
TreeItem *item = get_item_at_position(p_position);
- if (!item)
+ if (!item) {
return;
+ }
item->select(0);
@@ -180,12 +178,14 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
// Apply filters.
while (parent) {
const bool had_siblings = item->get_prev() || item->get_next();
- if (filter.is_subsequence_ofi(item->get_text(0)))
+ if (filter.is_subsequence_ofi(item->get_text(0))) {
break; // Filter matches, must survive.
+ }
parent->remove_child(item);
memdelete(item);
- if (had_siblings)
+ if (had_siblings) {
break; // Parent must survive.
+ }
item = parent;
parent = item->get_parent();
// Check if parent expects more children.
@@ -203,8 +203,9 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
}
String EditorDebuggerTree::get_selected_path() {
- if (!get_selected())
+ if (!get_selected()) {
return "";
+ }
return _get_path(get_selected());
}
@@ -224,11 +225,8 @@ String EditorDebuggerTree::_get_path(TreeItem *p_item) {
}
void EditorDebuggerTree::_item_menu_id_pressed(int p_option) {
-
switch (p_option) {
-
case ITEM_MENU_SAVE_REMOTE_NODE: {
-
file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES);
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
@@ -243,7 +241,6 @@ void EditorDebuggerTree::_item_menu_id_pressed(int p_option) {
file_dialog->popup_centered_ratio();
} break;
case ITEM_MENU_COPY_NODE_PATH: {
-
String text = get_selected_path();
if (text.empty()) {
return;
@@ -264,7 +261,8 @@ void EditorDebuggerTree::_item_menu_id_pressed(int p_option) {
}
void EditorDebuggerTree::_file_selected(const String &p_file) {
- if (inspected_object_id.is_null())
+ if (inspected_object_id.is_null()) {
return;
+ }
emit_signal("save_node", inspected_object_id, p_file, debugger_id);
}
diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h
index 342eb23194..5ec1423c07 100644
--- a/editor/debugger/editor_debugger_tree.h
+++ b/editor/debugger/editor_debugger_tree.h
@@ -37,7 +37,6 @@ class SceneDebuggerTree;
class EditorFileDialog;
class EditorDebuggerTree : public Tree {
-
GDCLASS(EditorDebuggerTree, Tree);
private:
diff --git a/editor/debugger/editor_network_profiler.cpp b/editor/debugger/editor_network_profiler.cpp
index b8c795d9ca..baa88bcdbc 100644
--- a/editor/debugger/editor_network_profiler.cpp
+++ b/editor/debugger/editor_network_profiler.cpp
@@ -39,7 +39,6 @@ void EditorNetworkProfiler::_bind_methods() {
}
void EditorNetworkProfiler::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
activate->set_icon(get_theme_icon("Play", "EditorIcons"));
clear_button->set_icon(get_theme_icon("Clear", "EditorIcons"));
@@ -53,13 +52,11 @@ void EditorNetworkProfiler::_notification(int p_what) {
}
void EditorNetworkProfiler::_update_frame() {
-
counters_display->clear();
TreeItem *root = counters_display->create_item();
for (Map<ObjectID, DebuggerMarshalls::MultiplayerNodeInfo>::Element *E = nodes_data.front(); E; E = E->next()) {
-
TreeItem *node = counters_display->create_item(root);
for (int j = 0; j < counters_display->get_columns(); ++j) {
@@ -75,7 +72,6 @@ void EditorNetworkProfiler::_update_frame() {
}
void EditorNetworkProfiler::_activate_pressed() {
-
if (activate->is_pressed()) {
activate->set_icon(get_theme_icon("Stop", "EditorIcons"));
activate->set_text(TTR("Stop"));
@@ -96,7 +92,6 @@ void EditorNetworkProfiler::_clear_pressed() {
}
void EditorNetworkProfiler::add_node_frame_data(const DebuggerMarshalls::MultiplayerNodeInfo p_frame) {
-
if (!nodes_data.has(p_frame.node)) {
nodes_data.insert(p_frame.node, p_frame);
} else {
@@ -113,7 +108,6 @@ void EditorNetworkProfiler::add_node_frame_data(const DebuggerMarshalls::Multipl
}
void EditorNetworkProfiler::set_bandwidth(int p_incoming, int p_outgoing) {
-
incoming_bandwidth_text->set_text(vformat(TTR("%s/s"), String::humanize_size(p_incoming)));
outgoing_bandwidth_text->set_text(vformat(TTR("%s/s"), String::humanize_size(p_outgoing)));
@@ -131,7 +125,6 @@ bool EditorNetworkProfiler::is_profiling() {
}
EditorNetworkProfiler::EditorNetworkProfiler() {
-
HBoxContainer *hb = memnew(HBoxContainer);
hb->add_theme_constant_override("separation", 8 * EDSCALE);
add_child(hb);
diff --git a/editor/debugger/editor_network_profiler.h b/editor/debugger/editor_network_profiler.h
index f532dc5dd0..cf65fb5316 100644
--- a/editor/debugger/editor_network_profiler.h
+++ b/editor/debugger/editor_network_profiler.h
@@ -39,7 +39,6 @@
#include "scene/gui/tree.h"
class EditorNetworkProfiler : public VBoxContainer {
-
GDCLASS(EditorNetworkProfiler, VBoxContainer)
private:
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index c7d4e9128a..8bd21fff5c 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -35,7 +35,6 @@
#include "editor/editor_settings.h"
void EditorProfiler::_make_metric_ptrs(Metric &m) {
-
for (int i = 0; i < m.categories.size(); i++) {
m.category_ptrs[m.categories[i].signature] = &m.categories.write[i];
for (int j = 0; j < m.categories[i].items.size(); j++) {
@@ -45,10 +44,10 @@ void EditorProfiler::_make_metric_ptrs(Metric &m) {
}
void EditorProfiler::add_frame_metric(const Metric &p_metric, bool p_final) {
-
++last_metric;
- if (last_metric >= frame_metrics.size())
+ if (last_metric >= frame_metrics.size()) {
last_metric = 0;
+ }
frame_metrics.write[last_metric] = p_metric;
_make_metric_ptrs(frame_metrics.write[last_metric]);
@@ -69,7 +68,6 @@ void EditorProfiler::add_frame_metric(const Metric &p_metric, bool p_final) {
updating_frame = false;
if (frame_delay->is_stopped()) {
-
frame_delay->set_wait_time(p_final ? 0.1 : 1);
frame_delay->start();
}
@@ -81,7 +79,6 @@ void EditorProfiler::add_frame_metric(const Metric &p_metric, bool p_final) {
}
void EditorProfiler::clear() {
-
int metric_size = EditorSettings::get_singleton()->get("debugger/profiler_frame_history_size");
metric_size = CLAMP(metric_size, 60, 1024);
frame_metrics.clear();
@@ -110,7 +107,6 @@ static String _get_percent_txt(float p_value, float p_total) {
}
String EditorProfiler::_get_time_as_text(const Metric &m, float p_time, int p_calls) {
-
const int dmode = display_mode->get_selected();
if (dmode == DISPLAY_FRAME_TIME) {
@@ -131,7 +127,6 @@ String EditorProfiler::_get_time_as_text(const Metric &m, float p_time, int p_ca
}
Color EditorProfiler::_get_color_from_signature(const StringName &p_signature) const {
-
Color bc = get_theme_color("error_color", "Editor");
double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF));
Color c;
@@ -140,20 +135,22 @@ Color EditorProfiler::_get_color_from_signature(const StringName &p_signature) c
}
void EditorProfiler::_item_edited() {
-
- if (updating_frame)
+ if (updating_frame) {
return;
+ }
TreeItem *item = variables->get_edited();
- if (!item)
+ if (!item) {
return;
+ }
StringName signature = item->get_metadata(0);
bool checked = item->is_checked(0);
- if (checked)
+ if (checked) {
plot_sigs.insert(signature);
- else
+ } else {
plot_sigs.erase(signature);
+ }
if (!frame_delay->is_processing()) {
frame_delay->set_wait_time(0.1);
@@ -164,7 +161,6 @@ void EditorProfiler::_item_edited() {
}
void EditorProfiler::_update_plot() {
-
const int w = graph->get_size().width;
const int h = graph->get_size().height;
bool reset_texture = false;
@@ -193,11 +189,11 @@ void EditorProfiler::_update_plot() {
for (int i = 0; i < frame_metrics.size(); i++) {
const Metric &m = frame_metrics[i];
- if (!m.valid)
+ if (!m.valid) {
continue;
+ }
for (Set<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) {
-
const Map<StringName, Metric::Category *>::Element *F = m.category_ptrs.find(E->get());
if (F) {
highest = MAX(F->get()->total_time, highest);
@@ -228,7 +224,6 @@ void EditorProfiler::_update_plot() {
//Map<StringName,int> plot_max;
for (int i = 0; i < w; i++) {
-
for (int j = 0; j < h * 4; j++) {
column[j] = 0;
}
@@ -238,15 +233,14 @@ void EditorProfiler::_update_plot() {
if (next > frame_metrics.size()) {
next = frame_metrics.size();
}
- if (next == current)
+ if (next == current) {
next = current + 1; //just because for loop must work
+ }
for (Set<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) {
-
int plot_pos = -1;
for (int j = current; j < next; j++) {
-
//wrap
int idx = last_metric + 1 + j;
while (idx >= frame_metrics.size()) {
@@ -255,8 +249,9 @@ void EditorProfiler::_update_plot() {
//get
const Metric &m = frame_metrics[idx];
- if (!m.valid)
+ if (!m.valid) {
continue; //skip because invalid
+ }
float value = 0;
@@ -292,7 +287,6 @@ void EditorProfiler::_update_plot() {
}
if (prev_plot != -1 && plot_pos == -1) {
-
plot_pos = prev_plot;
}
@@ -310,7 +304,6 @@ void EditorProfiler::_update_plot() {
Color col = _get_color_from_signature(E->get());
for (int j = prev_plot; j <= plot_pos; j++) {
-
column[j * 4 + 0] += Math::fast_ftoi(CLAMP(col.r * 255, 0, 255));
column[j * 4 + 1] += Math::fast_ftoi(CLAMP(col.g * 255, 0, 255));
column[j * 4 + 2] += Math::fast_ftoi(CLAMP(col.b * 255, 0, 255));
@@ -319,7 +312,6 @@ void EditorProfiler::_update_plot() {
}
for (int j = 0; j < h * 4; j += 4) {
-
const int a = column[j + 3];
if (a > 0) {
column[j + 0] /= a;
@@ -344,10 +336,9 @@ void EditorProfiler::_update_plot() {
Ref<Image> img;
img.instance();
- img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image);
+ img->create(w, h, false, Image::FORMAT_RGBA8, graph_image);
if (reset_texture) {
-
if (graph_texture.is_null()) {
graph_texture.instance();
}
@@ -361,7 +352,6 @@ void EditorProfiler::_update_plot() {
}
void EditorProfiler::_update_frame() {
-
int cursor_metric = _get_cursor_index();
ERR_FAIL_INDEX(cursor_metric, frame_metrics.size());
@@ -375,7 +365,6 @@ void EditorProfiler::_update_frame() {
int dtime = display_time->get_selected();
for (int i = 0; i < m.categories.size(); i++) {
-
TreeItem *category = variables->create_item(root);
category->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
category->set_editable(0, true);
@@ -418,7 +407,6 @@ void EditorProfiler::_update_frame() {
}
void EditorProfiler::_activate_pressed() {
-
if (activate->is_pressed()) {
activate->set_icon(get_theme_icon("Stop", "EditorIcons"));
activate->set_text(TTR("Stop"));
@@ -430,13 +418,11 @@ void EditorProfiler::_activate_pressed() {
}
void EditorProfiler::_clear_pressed() {
-
clear();
_update_plot();
}
void EditorProfiler::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
activate->set_icon(get_theme_icon("Play", "EditorIcons"));
clear_button->set_icon(get_theme_icon("Clear", "EditorIcons"));
@@ -444,15 +430,15 @@ void EditorProfiler::_notification(int p_what) {
}
void EditorProfiler::_graph_tex_draw() {
-
- if (last_metric < 0)
+ if (last_metric < 0) {
return;
+ }
if (seeking) {
-
int max_frames = frame_metrics.size();
int frame = cursor_metric_edit->get_value() - (frame_metrics[last_metric].frame_number - max_frames + 1);
- if (frame < 0)
+ if (frame < 0) {
frame = 0;
+ }
int cur_x = frame * graph->get_size().x / max_frames;
@@ -460,11 +446,11 @@ void EditorProfiler::_graph_tex_draw() {
}
if (hover_metric != -1 && frame_metrics[hover_metric].valid) {
-
int max_frames = frame_metrics.size();
int frame = frame_metrics[hover_metric].frame_number - (frame_metrics[last_metric].frame_number - max_frames + 1);
- if (frame < 0)
+ if (frame < 0) {
frame = 0;
+ }
int cur_x = frame * graph->get_size().x / max_frames;
@@ -473,23 +459,23 @@ void EditorProfiler::_graph_tex_draw() {
}
void EditorProfiler::_graph_tex_mouse_exit() {
-
hover_metric = -1;
graph->update();
}
void EditorProfiler::_cursor_metric_changed(double) {
- if (updating_frame)
+ if (updating_frame) {
return;
+ }
graph->update();
_update_frame();
}
void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
-
- if (last_metric < 0)
+ if (last_metric < 0) {
return;
+ }
Ref<InputEventMouse> me = p_ev;
Ref<InputEventMouseButton> mb = p_ev;
@@ -498,7 +484,6 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
if (
(mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) ||
(mm.is_valid())) {
-
int x = me->get_position().x;
x = x * frame_metrics.size() / graph->get_size().width;
@@ -519,7 +504,6 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
}
if (show_hover) {
-
hover_metric = metric;
} else {
@@ -533,19 +517,20 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
//metric may be invalid, so look for closest metric that is valid, this makes snap feel better
bool valid = false;
for (int i = 0; i < frame_metrics.size(); i++) {
-
if (frame_metrics[metric].valid) {
valid = true;
break;
}
metric++;
- if (metric >= frame_metrics.size())
+ if (metric >= frame_metrics.size()) {
metric = 0;
+ }
}
- if (valid)
+ if (valid) {
cursor_metric_edit->set_value(frame_metrics[metric].frame_number);
+ }
updating_frame = false;
@@ -568,11 +553,12 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
}
int EditorProfiler::_get_cursor_index() const {
-
- if (last_metric < 0)
+ if (last_metric < 0) {
return 0;
- if (!frame_metrics[last_metric].valid)
+ }
+ if (!frame_metrics[last_metric].valid) {
return 0;
+ }
int diff = (frame_metrics[last_metric].frame_number - cursor_metric_edit->get_value());
@@ -585,25 +571,21 @@ int EditorProfiler::_get_cursor_index() const {
}
void EditorProfiler::disable_seeking() {
-
seeking = false;
graph->update();
}
void EditorProfiler::_combo_changed(int) {
-
_update_frame();
_update_plot();
}
void EditorProfiler::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
ADD_SIGNAL(MethodInfo("break_request"));
}
void EditorProfiler::set_enabled(bool p_enable) {
-
activate->set_disabled(!p_enable);
}
@@ -623,7 +605,6 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const {
const Vector<EditorProfiler::Metric::Category> &categories = frame_metrics[0].categories;
for (int j = 0; j < categories.size(); j++) {
-
const EditorProfiler::Metric::Category &c = categories[j];
signatures.push_back(c.signature);
@@ -640,7 +621,6 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const {
int index = last_metric;
for (int i = 0; i < frame_metrics.size(); i++) {
-
++index;
if (index >= frame_metrics.size()) {
@@ -654,7 +634,6 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const {
const Vector<EditorProfiler::Metric::Category> &frame_cat = frame_metrics[index].categories;
for (int j = 0; j < frame_cat.size(); j++) {
-
const EditorProfiler::Metric::Category &c = frame_cat[j];
values.write[it++] = String::num_real(c.total_time);
@@ -669,7 +648,6 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const {
}
EditorProfiler::EditorProfiler() {
-
HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb);
activate = memnew(Button);
diff --git a/editor/debugger/editor_profiler.h b/editor/debugger/editor_profiler.h
index 4afd2c8302..aa2ef58db4 100644
--- a/editor/debugger/editor_profiler.h
+++ b/editor/debugger/editor_profiler.h
@@ -41,12 +41,10 @@
#include "scene/gui/tree.h"
class EditorProfiler : public VBoxContainer {
-
GDCLASS(EditorProfiler, VBoxContainer);
public:
struct Metric {
-
bool valid;
int frame_number;
@@ -56,13 +54,11 @@ public:
float physics_frame_time;
struct Category {
-
StringName signature;
String name;
float total_time; //total for category
struct Item {
-
StringName signature;
String name;
String script;
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index 7d2822b1c9..81b42da08e 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -35,10 +35,10 @@
#include "editor/editor_settings.h"
void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) {
-
++last_metric;
- if (last_metric >= frame_metrics.size())
+ if (last_metric >= frame_metrics.size()) {
last_metric = 0;
+ }
frame_metrics.write[last_metric] = p_metric;
// _make_metric_ptrs(frame_metrics.write[last_metric]);
@@ -60,7 +60,6 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) {
}
if (name[0] == '>') {
-
stack.push_back(full_name + "/");
}
@@ -83,7 +82,6 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) {
updating_frame = false;
if (frame_delay->is_stopped()) {
-
frame_delay->set_wait_time(0.1);
frame_delay->start();
}
@@ -95,7 +93,6 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) {
}
void EditorVisualProfiler::clear() {
-
int metric_size = EditorSettings::get_singleton()->get("debugger/profiler_frame_history_size");
metric_size = CLAMP(metric_size, 60, 1024);
frame_metrics.clear();
@@ -114,7 +111,6 @@ void EditorVisualProfiler::clear() {
}
String EditorVisualProfiler::_get_time_as_text(float p_time) {
-
int dmode = display_mode->get_selected();
if (dmode == DISPLAY_FRAME_TIME) {
@@ -127,7 +123,6 @@ String EditorVisualProfiler::_get_time_as_text(float p_time) {
}
Color EditorVisualProfiler::_get_color_from_signature(const StringName &p_signature) const {
-
Color bc = get_theme_color("error_color", "Editor");
double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF));
Color c;
@@ -136,19 +131,19 @@ Color EditorVisualProfiler::_get_color_from_signature(const StringName &p_signat
}
void EditorVisualProfiler::_item_selected() {
-
- if (updating_frame)
+ if (updating_frame) {
return;
+ }
TreeItem *item = variables->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
selected_area = item->get_metadata(0);
_update_plot();
}
void EditorVisualProfiler::_update_plot() {
-
int w = graph->get_size().width;
int h = graph->get_size().height;
@@ -178,8 +173,9 @@ void EditorVisualProfiler::_update_plot() {
for (int i = 0; i < frame_metrics.size(); i++) {
const Metric &m = frame_metrics[i];
- if (!m.valid)
+ if (!m.valid) {
continue;
+ }
if (m.areas.size()) {
highest_cpu = MAX(highest_cpu, m.areas[m.areas.size() - 1].cpu_time);
@@ -188,7 +184,6 @@ void EditorVisualProfiler::_update_plot() {
}
if (highest_cpu > 0 || highest_gpu > 0) {
-
if (frame_relative->is_pressed()) {
highest_cpu = MAX(graph_limit, highest_cpu);
highest_gpu = MAX(graph_limit, highest_gpu);
@@ -225,11 +220,11 @@ void EditorVisualProfiler::_update_plot() {
if (next > frame_metrics.size()) {
next = frame_metrics.size();
}
- if (next == current)
+ if (next == current) {
next = current + 1; //just because for loop must work
+ }
for (int j = current; j < next; j++) {
-
//wrap
int idx = last_metric + 1 + j;
while (idx >= frame_metrics.size()) {
@@ -262,7 +257,6 @@ void EditorVisualProfiler::_update_plot() {
//plot CPU
for (int j = 0; j < h; j++) {
-
uint8_t r, g, b;
if (column_cpu[j].a == 0) {
@@ -283,7 +277,6 @@ void EditorVisualProfiler::_update_plot() {
}
//plot GPU
for (int j = 0; j < h; j++) {
-
uint8_t r, g, b;
if (column_gpu[j].a == 0) {
@@ -307,10 +300,9 @@ void EditorVisualProfiler::_update_plot() {
Ref<Image> img;
img.instance();
- img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image);
+ img->create(w, h, false, Image::FORMAT_RGBA8, graph_image);
if (reset_texture) {
-
if (graph_texture.is_null()) {
graph_texture.instance();
}
@@ -324,7 +316,6 @@ void EditorVisualProfiler::_update_plot() {
}
void EditorVisualProfiler::_update_frame(bool p_focus_selected) {
-
int cursor_metric = _get_cursor_index();
Ref<Texture> track_icon = get_theme_icon("TrackColor", "EditorIcons");
@@ -343,7 +334,6 @@ void EditorVisualProfiler::_update_frame(bool p_focus_selected) {
TreeItem *ensure_selected = nullptr;
for (int i = 1; i < m.areas.size() - 1; i++) {
-
TreeItem *parent = stack.size() ? stack.back()->get() : root;
String name = m.areas[i].name;
@@ -416,7 +406,6 @@ void EditorVisualProfiler::_update_frame(bool p_focus_selected) {
}
void EditorVisualProfiler::_activate_pressed() {
-
if (activate->is_pressed()) {
activate->set_icon(get_theme_icon("Stop", "EditorIcons"));
activate->set_text(TTR("Stop"));
@@ -429,13 +418,11 @@ void EditorVisualProfiler::_activate_pressed() {
}
void EditorVisualProfiler::_clear_pressed() {
-
clear();
_update_plot();
}
void EditorVisualProfiler::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
activate->set_icon(get_theme_icon("Play", "EditorIcons"));
clear_button->set_icon(get_theme_icon("Clear", "EditorIcons"));
@@ -443,16 +430,16 @@ void EditorVisualProfiler::_notification(int p_what) {
}
void EditorVisualProfiler::_graph_tex_draw() {
-
- if (last_metric < 0)
+ if (last_metric < 0) {
return;
+ }
Ref<Font> font = get_theme_font("font", "Label");
if (seeking) {
-
int max_frames = frame_metrics.size();
int frame = cursor_metric_edit->get_value() - (frame_metrics[last_metric].frame_number - max_frames + 1);
- if (frame < 0)
+ if (frame < 0) {
frame = 0;
+ }
int half_width = graph->get_size().x / 2;
int cur_x = frame * half_width / max_frames;
@@ -503,23 +490,23 @@ void EditorVisualProfiler::_graph_tex_draw() {
}
void EditorVisualProfiler::_graph_tex_mouse_exit() {
-
hover_metric = -1;
graph->update();
}
void EditorVisualProfiler::_cursor_metric_changed(double) {
- if (updating_frame)
+ if (updating_frame) {
return;
+ }
graph->update();
_update_frame();
}
void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
-
- if (last_metric < 0)
+ if (last_metric < 0) {
return;
+ }
Ref<InputEventMouse> me = p_ev;
Ref<InputEventMouseButton> mb = p_ev;
@@ -528,7 +515,6 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
if (
(mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) ||
(mm.is_valid())) {
-
int half_w = graph->get_size().width / 2;
int x = me->get_position().x;
if (x > half_w) {
@@ -553,7 +539,6 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
}
if (show_hover) {
-
hover_metric = metric;
} else {
@@ -567,15 +552,15 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
//metric may be invalid, so look for closest metric that is valid, this makes snap feel better
bool valid = false;
for (int i = 0; i < frame_metrics.size(); i++) {
-
if (frame_metrics[metric].valid) {
valid = true;
break;
}
metric++;
- if (metric >= frame_metrics.size())
+ if (metric >= frame_metrics.size()) {
metric = 0;
+ }
}
if (!valid) {
@@ -607,7 +592,6 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
int last_valid = -1;
bool found = false;
for (int i = 0; i < area_count - 1; i++) {
-
if (areas[i].name[0] != '<' && areas[i].name[0] != '>') {
last_valid = i;
}
@@ -636,11 +620,12 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
}
int EditorVisualProfiler::_get_cursor_index() const {
-
- if (last_metric < 0)
+ if (last_metric < 0) {
return 0;
- if (!frame_metrics[last_metric].valid)
+ }
+ if (!frame_metrics[last_metric].valid) {
return 0;
+ }
int diff = (frame_metrics[last_metric].frame_number - cursor_metric_edit->get_value());
@@ -653,24 +638,20 @@ int EditorVisualProfiler::_get_cursor_index() const {
}
void EditorVisualProfiler::disable_seeking() {
-
seeking = false;
graph->update();
}
void EditorVisualProfiler::_combo_changed(int) {
-
_update_frame();
_update_plot();
}
void EditorVisualProfiler::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
}
void EditorVisualProfiler::set_enabled(bool p_enable) {
-
activate->set_disabled(!p_enable);
}
@@ -736,7 +717,6 @@ Vector<Vector<String>> EditorVisualProfiler::get_data_as_csv() const {
}
EditorVisualProfiler::EditorVisualProfiler() {
-
HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb);
activate = memnew(Button);
diff --git a/editor/debugger/editor_visual_profiler.h b/editor/debugger/editor_visual_profiler.h
index d3a758557c..3c1a55dc38 100644
--- a/editor/debugger/editor_visual_profiler.h
+++ b/editor/debugger/editor_visual_profiler.h
@@ -42,12 +42,10 @@
#include "scene/gui/tree.h"
class EditorVisualProfiler : public VBoxContainer {
-
GDCLASS(EditorVisualProfiler, VBoxContainer);
public:
struct Metric {
-
bool valid;
uint64_t frame_number;
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 3ed271c7c6..49137f76fa 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -74,17 +74,19 @@ void ScriptEditorDebugger::_put_msg(String p_message, Array p_data) {
void ScriptEditorDebugger::debug_copy() {
String msg = reason->get_text();
- if (msg == "")
+ if (msg == "") {
return;
+ }
DisplayServer::get_singleton()->clipboard_set(msg);
}
void ScriptEditorDebugger::debug_skip_breakpoints() {
skip_breakpoints_value = !skip_breakpoints_value;
- if (skip_breakpoints_value)
+ if (skip_breakpoints_value) {
skip_breakpoints->set_icon(get_theme_icon("DebugSkipBreakpointsOn", "EditorIcons"));
- else
+ } else {
skip_breakpoints->set_icon(get_theme_icon("DebugSkipBreakpointsOff", "EditorIcons"));
+ }
Array msg;
msg.push_back(skip_breakpoints_value);
@@ -92,14 +94,13 @@ void ScriptEditorDebugger::debug_skip_breakpoints() {
}
void ScriptEditorDebugger::debug_next() {
-
ERR_FAIL_COND(!breaked);
_put_msg("next", Array());
_clear_execution();
}
-void ScriptEditorDebugger::debug_step() {
+void ScriptEditorDebugger::debug_step() {
ERR_FAIL_COND(!breaked);
_put_msg("step", Array());
@@ -107,19 +108,18 @@ void ScriptEditorDebugger::debug_step() {
}
void ScriptEditorDebugger::debug_break() {
-
ERR_FAIL_COND(breaked);
_put_msg("break", Array());
}
void ScriptEditorDebugger::debug_continue() {
-
ERR_FAIL_COND(!breaked);
// Allow focus stealing only if we actually run this client for security.
- if (remote_pid && EditorNode::get_singleton()->has_child_process(remote_pid))
+ if (remote_pid && EditorNode::get_singleton()->has_child_process(remote_pid)) {
DisplayServer::get_singleton()->enable_for_stealing_focus(remote_pid);
+ }
_clear_execution();
_put_msg("continue", Array());
@@ -153,7 +153,6 @@ void ScriptEditorDebugger::save_node(ObjectID p_id, const String &p_file) {
}
void ScriptEditorDebugger::_file_selected(const String &p_file) {
-
switch (file_dialog_purpose) {
case SAVE_MONITORS_CSV: {
Error err;
@@ -175,10 +174,8 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
// values
List<Vector<float>>::Element *E = perf_history.back();
while (E) {
-
Vector<float> &perf_data = E->get();
for (int i = 0; i < perf_data.size(); i++) {
-
line.write[i] = String::num_real(perf_data[i]);
}
file->store_csv_line(line);
@@ -225,7 +222,6 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
}
void ScriptEditorDebugger::request_remote_tree() {
-
_put_msg("scene:request_scene_tree", Array());
}
@@ -234,7 +230,6 @@ const SceneDebuggerTree *ScriptEditorDebugger::get_remote_tree() {
}
void ScriptEditorDebugger::update_remote_object(ObjectID p_obj_id, const String &p_prop, const Variant &p_value) {
-
Array msg;
msg.push_back(p_obj_id);
msg.push_back(p_prop);
@@ -243,7 +238,6 @@ void ScriptEditorDebugger::update_remote_object(ObjectID p_obj_id, const String
}
void ScriptEditorDebugger::request_remote_object(ObjectID p_obj_id) {
-
ERR_FAIL_COND(p_obj_id.is_null());
Array msg;
msg.push_back(p_obj_id);
@@ -268,12 +262,10 @@ void ScriptEditorDebugger::_remote_object_property_updated(ObjectID p_id, const
}
void ScriptEditorDebugger::_video_mem_request() {
-
_put_msg("core:memory", Array());
}
void ScriptEditorDebugger::_video_mem_export() {
-
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
file_dialog->clear_filters();
@@ -282,16 +274,13 @@ void ScriptEditorDebugger::_video_mem_export() {
}
Size2 ScriptEditorDebugger::get_minimum_size() const {
-
Size2 ms = MarginContainer::get_minimum_size();
ms.y = MAX(ms.y, 250 * EDSCALE);
return ms;
}
void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) {
-
if (p_msg == "debug_enter") {
-
_put_msg("get_stack_dump", Array());
ERR_FAIL_COND(p_data.size() != 2);
@@ -310,7 +299,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
inspector->clear_cache(); // Take a chance to force remote objects update.
} else if (p_msg == "debug_exit") {
-
breaked = false;
can_debug = false;
_clear_execution();
@@ -320,27 +308,23 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
profiler->set_enabled(true);
profiler->disable_seeking();
} else if (p_msg == "set_pid") {
-
ERR_FAIL_COND(p_data.size() < 1);
remote_pid = p_data[0];
} else if (p_msg == "scene:click_ctrl") {
-
ERR_FAIL_COND(p_data.size() < 2);
clicked_ctrl->set_text(p_data[0]);
clicked_ctrl_type->set_text(p_data[1]);
} else if (p_msg == "scene:scene_tree") {
-
scene_tree->nodes.clear();
scene_tree->deserialize(p_data);
emit_signal("remote_tree_updated");
_update_buttons_state();
} else if (p_msg == "scene:inspect_object") {
-
ObjectID id = inspector->add_object(p_data);
- if (id.is_valid())
+ if (id.is_valid()) {
emit_signal("remote_object_updated", id);
+ }
} else if (p_msg == "memory:usage") {
-
vmem_tree->clear();
TreeItem *root = vmem_tree->create_item();
DebuggerMarshalls::ResourceUsage usage;
@@ -349,7 +333,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
int total = 0;
for (List<DebuggerMarshalls::ResourceInfo>::Element *E = usage.infos.front(); E; E = E->next()) {
-
TreeItem *it = vmem_tree->create_item(root);
String type = E->get().type;
int bytes = E->get().vram;
@@ -359,15 +342,15 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
it->set_text(3, String::humanize_size(bytes));
total += bytes;
- if (has_theme_icon(type, "EditorIcons"))
+ if (has_theme_icon(type, "EditorIcons")) {
it->set_icon(0, get_theme_icon(type, "EditorIcons"));
+ }
}
vmem_total->set_tooltip(TTR("Bytes:") + " " + itos(total));
vmem_total->set_text(String::humanize_size(total));
} else if (p_msg == "stack_dump") {
-
DebuggerMarshalls::ScriptStackDump stack;
stack.deserialize(p_data);
@@ -376,7 +359,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
TreeItem *r = stack_dump->create_item();
for (int i = 0; i < stack.frames.size(); i++) {
-
TreeItem *s = stack_dump->create_item(r);
Dictionary d;
d["frame"] = i;
@@ -388,15 +370,14 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]) + " - at function: " + d["function"];
s->set_text(0, line);
- if (i == 0)
+ if (i == 0) {
s->select(0);
+ }
}
} else if (p_msg == "stack_frame_vars") {
-
inspector->clear_stack_variables();
} else if (p_msg == "stack_frame_var") {
-
inspector->add_stack_variable(p_data);
} else if (p_msg == "output") {
@@ -433,7 +414,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
for (int i = 0; i < p_data.size(); i++) {
p.write[i] = p_data[i];
if (i < perf_items.size()) {
-
const float value = p[i];
String label = rtos(value);
String tooltip = label;
@@ -453,8 +433,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
perf_items[i]->set_text(1, label);
perf_items[i]->set_tooltip(1, tooltip);
- if (p[i] > perf_max[i])
+ if (p[i] > perf_max[i]) {
perf_max.write[i] = p[i];
+ }
}
}
perf_history.push_front(p);
@@ -480,7 +461,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
visual_profiler->add_frame_metric(metric);
} else if (p_msg == "error") {
-
DebuggerMarshalls::OutputError oe;
ERR_FAIL_COND_MSG(oe.deserialize(p_data) == false, "Failed to deserialize error message");
@@ -520,8 +500,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String error_title;
// Include method name, when given, in error title.
- if (!oe.source_func.empty())
+ if (!oe.source_func.empty()) {
error_title += oe.source_func + ": ";
+ }
// If we have a (custom) error message, use it as title, and add a C++ Error
// item with the original error condition.
error_title += oe.error_descr.empty() ? oe.error : oe.error_descr;
@@ -535,16 +516,18 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
cpp_cond->set_text(1, oe.error);
cpp_cond->set_text_align(0, TreeItem::ALIGN_LEFT);
tooltip += TTR("C++ Error:") + " " + oe.error + "\n";
- if (source_is_project_file)
+ if (source_is_project_file) {
cpp_cond->set_metadata(0, source_meta);
+ }
}
Vector<uint8_t> v;
v.resize(100);
// Source of the error.
String source_txt = (source_is_project_file ? oe.source_file.get_file() : oe.source_file) + ":" + itos(oe.source_line);
- if (!oe.source_func.empty())
+ if (!oe.source_func.empty()) {
source_txt += " @ " + oe.source_func + "()";
+ }
TreeItem *cpp_source = error_tree->create_item(error);
cpp_source->set_text(0, "<" + (source_is_project_file ? TTR("Source") : TTR("C++ Source")) + ">");
@@ -566,7 +549,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
// of the stack trace (script, method, line).
const ScriptLanguage::StackInfo *infos = oe.callstack.ptr();
for (unsigned int i = 0; i < (unsigned int)oe.callstack.size(); i++) {
-
TreeItem *stack_trace = error_tree->create_item(error);
Array meta;
@@ -582,10 +564,11 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
stack_trace->set_text(1, infos[i].file.get_file() + ":" + itos(infos[i].line) + " @ " + infos[i].func + "()");
}
- if (oe.warning)
+ if (oe.warning) {
warning_count++;
- else
+ } else {
error_count++;
+ }
} else if (p_msg == "servers:function_signature") {
// Cache a profiler signature.
@@ -639,7 +622,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
}
for (int i = 0; i < frame.servers.size(); i++) {
-
const DebuggerMarshalls::ServerInfo &srv = frame.servers[i];
EditorProfiler::Metric::Category c;
const String name = srv.name;
@@ -648,7 +630,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
c.total_time = 0;
c.signature = "categ::" + name;
for (int j = 0; j < srv.functions.size(); j++) {
-
EditorProfiler::Metric::Category::Item item;
item.calls = 1;
item.line = 0;
@@ -669,7 +650,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
funcs.name = "Script Functions";
funcs.signature = "script_functions";
for (int i = 0; i < frame.script_functions.size(); i++) {
-
int signature = frame.script_functions[i].sig_id;
int calls = frame.script_functions[i].call_count;
float total = frame.script_functions[i].total_time;
@@ -677,7 +657,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
EditorProfiler::Metric::Category::Item item;
if (profiler_signature.has(signature)) {
-
item.signature = profiler_signature[signature];
String name = profiler_signature[signature];
@@ -704,10 +683,11 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
metric.categories.push_back(funcs);
- if (p_msg == "servers:profile_frame")
+ if (p_msg == "servers:profile_frame") {
profiler->add_frame_metric(metric, false);
- else
+ } else {
profiler->add_frame_metric(metric, true);
+ }
} else if (p_msg == "network:profile_frame") {
DebuggerMarshalls::NetworkProfilerFrame frame;
@@ -745,17 +725,15 @@ void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType
}
void ScriptEditorDebugger::_performance_select() {
-
perf_draw->update();
}
void ScriptEditorDebugger::_performance_draw() {
-
Vector<int> which;
for (int i = 0; i < perf_items.size(); i++) {
-
- if (perf_items[i]->is_checked(0))
+ if (perf_items[i]->is_checked(0)) {
which.push_back(i);
+ }
}
if (which.empty()) {
@@ -770,14 +748,14 @@ void ScriptEditorDebugger::_performance_draw() {
int cols = Math::ceil(Math::sqrt((float)which.size()));
int rows = Math::ceil((float)which.size() / cols);
- if (which.size() == 1)
+ if (which.size() == 1) {
rows = 1;
+ }
int margin = 3;
int point_sep = 5;
Size2i s = Size2i(perf_draw->get_size()) / Size2i(cols, rows);
for (int i = 0; i < which.size(); i++) {
-
Point2i p(i % cols, i / cols);
Rect2i r(p * s, s);
r.position += Point2(margin, margin);
@@ -803,15 +781,16 @@ void ScriptEditorDebugger::_performance_draw() {
List<Vector<float>>::Element *E = perf_history.front();
float prev = -1;
while (from >= 0 && E) {
-
float m = perf_max[pi];
- if (m == 0)
+ if (m == 0) {
m = 0.00001;
+ }
float h2 = E->get()[pi] / m;
h2 = (1.0 - h2) * r.size.y;
- if (E != perf_history.front())
+ if (E != perf_history.front()) {
perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, Math::round(EDSCALE));
+ }
prev = h2;
E = E->next();
from -= spacing;
@@ -820,11 +799,8 @@ void ScriptEditorDebugger::_performance_draw() {
}
void ScriptEditorDebugger::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_ENTER_TREE: {
-
skip_breakpoints->set_icon(get_theme_icon("DebugSkipBreakpointsOff", "EditorIcons"));
copy->set_icon(get_theme_icon("ActionCopy", "EditorIcons"));
@@ -843,9 +819,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
} break;
case NOTIFICATION_PROCESS: {
-
if (is_session_active()) {
-
peer->poll();
if (camera_override == CameraOverride::OVERRIDE_2D) {
@@ -886,7 +860,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
const uint64_t until = OS::get_singleton()->get_ticks_msec() + 20;
while (peer.is_valid() && peer->has_message()) {
-
Array arr = peer->get_message();
if (arr.size() != 2 || arr[0].get_type() != Variant::STRING || arr[1].get_type() != Variant::ARRAY) {
_stop_and_notify();
@@ -894,8 +867,9 @@ void ScriptEditorDebugger::_notification(int p_what) {
}
_parse_message(arr[0], arr[1]);
- if (OS::get_singleton()->get_ticks_msec() > until)
+ if (OS::get_singleton()->get_ticks_msec() > until) {
break;
+ }
}
if (!is_session_active()) {
_stop_and_notify();
@@ -903,7 +877,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
};
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
if (tabs->has_theme_stylebox_override("panel")) {
tabs->add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox("DebuggerPanel", "EditorStyles"));
}
@@ -921,8 +894,9 @@ void ScriptEditorDebugger::_notification(int p_what) {
void ScriptEditorDebugger::_clear_execution() {
TreeItem *ti = stack_dump->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
Dictionary d = ti->get_metadata(0);
@@ -934,7 +908,6 @@ void ScriptEditorDebugger::_clear_execution() {
}
void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) {
-
error_count = 0;
warning_count = 0;
stop();
@@ -944,7 +917,6 @@ void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) {
perf_history.clear();
for (int i = 0; i < Performance::MONITOR_MAX; i++) {
-
perf_max.write[i] = 0;
}
@@ -978,7 +950,6 @@ void ScriptEditorDebugger::_stop_and_notify() {
}
void ScriptEditorDebugger::stop() {
-
set_process(false);
breaked = false;
can_debug = false;
@@ -1003,7 +974,6 @@ void ScriptEditorDebugger::stop() {
}
void ScriptEditorDebugger::_profiler_activate(bool p_enable, int p_type) {
-
Array data;
data.push_back(p_enable);
switch (p_type) {
@@ -1031,14 +1001,13 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable, int p_type) {
}
void ScriptEditorDebugger::_profiler_seeked() {
-
- if (breaked)
+ if (breaked) {
return;
+ }
debug_break();
}
void ScriptEditorDebugger::_stack_dump_frame_selected() {
-
emit_signal("stack_frame_selected");
int frame = get_stack_script_frame();
@@ -1053,7 +1022,6 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() {
}
void ScriptEditorDebugger::_export_csv() {
-
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
file_dialog_purpose = SAVE_MONITORS_CSV;
@@ -1061,16 +1029,17 @@ void ScriptEditorDebugger::_export_csv() {
}
String ScriptEditorDebugger::get_var_value(const String &p_var) const {
- if (!breaked)
+ if (!breaked) {
return String();
+ }
return inspector->get_stack_variable(p_var);
}
int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
-
const int *r = node_path_cache.getptr(p_path);
- if (r)
+ if (r) {
return *r;
+ }
last_path_id++;
@@ -1084,11 +1053,11 @@ int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
}
int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) {
-
Map<String, int>::Element *E = res_path_cache.find(p_path);
- if (E)
+ if (E) {
return E->get();
+ }
last_path_id++;
@@ -1102,9 +1071,9 @@ int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) {
}
void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
-
- if (!p_base || !live_debug || !is_session_active() || !editor->get_edited_scene())
+ if (!p_base || !live_debug || !is_session_active() || !editor->get_edited_scene()) {
return;
+ }
Node *node = Object::cast_to<Node>(p_base);
@@ -1112,12 +1081,12 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
for (int i = 0; i < VARIANT_ARG_MAX; i++) {
//no pointers, sorry
- if (argptr[i] && (argptr[i]->get_type() == Variant::OBJECT || argptr[i]->get_type() == Variant::_RID))
+ if (argptr[i] && (argptr[i]->get_type() == Variant::OBJECT || argptr[i]->get_type() == Variant::_RID)) {
return;
+ }
}
if (node) {
-
NodePath path = editor->get_edited_scene()->get_path_to(node);
int pathid = _get_node_path_cache(path);
@@ -1136,7 +1105,6 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
Resource *res = Object::cast_to<Resource>(p_base);
if (res && res->get_path() != String()) {
-
String respath = res->get_path();
int pathid = _get_res_path_cache(respath);
@@ -1154,21 +1122,19 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
}
void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) {
-
- if (!p_base || !live_debug || !editor->get_edited_scene())
+ if (!p_base || !live_debug || !editor->get_edited_scene()) {
return;
+ }
Node *node = Object::cast_to<Node>(p_base);
if (node) {
-
NodePath path = editor->get_edited_scene()->get_path_to(node);
int pathid = _get_node_path_cache(path);
if (p_value.is_ref()) {
Ref<Resource> res = p_value;
if (res.is_valid() && res->get_path() != String()) {
-
Array msg;
msg.push_back(pathid);
msg.push_back(p_property);
@@ -1176,7 +1142,6 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
_put_msg("scene:live_node_prop_res", msg);
}
} else {
-
Array msg;
msg.push_back(pathid);
msg.push_back(p_property);
@@ -1190,14 +1155,12 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
Resource *res = Object::cast_to<Resource>(p_base);
if (res && res->get_path() != String()) {
-
String respath = res->get_path();
int pathid = _get_res_path_cache(respath);
if (p_value.is_ref()) {
Ref<Resource> res2 = p_value;
if (res2.is_valid() && res2->get_path() != String()) {
-
Array msg;
msg.push_back(pathid);
msg.push_back(p_property);
@@ -1205,7 +1168,6 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
_put_msg("scene:live_res_prop_res", msg);
}
} else {
-
Array msg;
msg.push_back(pathid);
msg.push_back(p_property);
@@ -1219,41 +1181,44 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
String ScriptEditorDebugger::get_stack_script_file() const {
TreeItem *ti = stack_dump->get_selected();
- if (!ti)
+ if (!ti) {
return "";
+ }
Dictionary d = ti->get_metadata(0);
return d["file"];
}
int ScriptEditorDebugger::get_stack_script_line() const {
TreeItem *ti = stack_dump->get_selected();
- if (!ti)
+ if (!ti) {
return -1;
+ }
Dictionary d = ti->get_metadata(0);
return d["line"];
}
int ScriptEditorDebugger::get_stack_script_frame() const {
TreeItem *ti = stack_dump->get_selected();
- if (!ti)
+ if (!ti) {
return -1;
+ }
Dictionary d = ti->get_metadata(0);
return d["frame"];
}
void ScriptEditorDebugger::set_live_debugging(bool p_enable) {
-
live_debug = p_enable;
}
void ScriptEditorDebugger::_live_edit_set() {
-
- if (!is_session_active() || !editor_remote_tree)
+ if (!is_session_active() || !editor_remote_tree) {
return;
+ }
TreeItem *ti = editor_remote_tree->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
String path;
@@ -1271,7 +1236,6 @@ void ScriptEditorDebugger::_live_edit_set() {
}
void ScriptEditorDebugger::_live_edit_clear() {
-
NodePath np = NodePath("/root");
editor->get_editor_data().set_edited_scene_live_edit_root(np);
@@ -1279,21 +1243,20 @@ void ScriptEditorDebugger::_live_edit_clear() {
}
void ScriptEditorDebugger::update_live_edit_root() {
-
NodePath np = editor->get_editor_data().get_edited_scene_live_edit_root();
Array msg;
msg.push_back(np);
- if (editor->get_edited_scene())
+ if (editor->get_edited_scene()) {
msg.push_back(editor->get_edited_scene()->get_filename());
- else
+ } else {
msg.push_back("");
+ }
_put_msg("scene:live_set_root", msg);
live_edit_root->set_text(np);
}
void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
-
if (live_debug) {
Array msg;
msg.push_back(p_parent);
@@ -1304,7 +1267,6 @@ void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, cons
}
void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
-
if (live_debug) {
Array msg;
msg.push_back(p_parent);
@@ -1313,16 +1275,16 @@ void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, co
_put_msg("scene:live_instance_node", msg);
}
}
-void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
+void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
if (live_debug) {
Array msg;
msg.push_back(p_at);
_put_msg("scene:live_remove_node", msg);
}
}
-void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
+void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
if (live_debug) {
Array msg;
msg.push_back(p_at);
@@ -1330,8 +1292,8 @@ void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at,
_put_msg("scene:live_remove_and_keep_node", msg);
}
}
-void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
+void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
if (live_debug) {
Array msg;
msg.push_back(p_id);
@@ -1340,8 +1302,8 @@ void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath
_put_msg("scene:live_restore_node", msg);
}
}
-void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
+void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
if (live_debug) {
Array msg;
msg.push_back(p_at);
@@ -1349,8 +1311,8 @@ void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const
_put_msg("scene:live_duplicate_node", msg);
}
}
-void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
+void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
if (live_debug) {
Array msg;
msg.push_back(p_at);
@@ -1366,7 +1328,6 @@ CameraOverride ScriptEditorDebugger::get_camera_override() const {
}
void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) {
-
if (p_override == CameraOverride::OVERRIDE_2D && camera_override != CameraOverride::OVERRIDE_2D) {
Array msg;
msg.push_back(true);
@@ -1389,7 +1350,6 @@ void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) {
}
void ScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool p_enabled) {
-
Array msg;
msg.push_back(p_path);
msg.push_back(p_line);
@@ -1398,7 +1358,6 @@ void ScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool
}
void ScriptEditorDebugger::reload_scripts() {
-
_put_msg("reload_scripts", Array());
}
@@ -1426,10 +1385,10 @@ void ScriptEditorDebugger::_error_selected() {
}
void ScriptEditorDebugger::_expand_errors_list() {
-
TreeItem *root = error_tree->get_root();
- if (!root)
+ if (!root) {
return;
+ }
TreeItem *item = root->get_children();
while (item) {
@@ -1439,10 +1398,10 @@ void ScriptEditorDebugger::_expand_errors_list() {
}
void ScriptEditorDebugger::_collapse_errors_list() {
-
TreeItem *root = error_tree->get_root();
- if (!root)
+ if (!root) {
return;
+ }
TreeItem *item = root->get_children();
while (item) {
@@ -1452,7 +1411,6 @@ void ScriptEditorDebugger::_collapse_errors_list() {
}
void ScriptEditorDebugger::_clear_errors_list() {
-
error_tree->clear();
error_count = 0;
warning_count = 0;
@@ -1460,7 +1418,6 @@ void ScriptEditorDebugger::_clear_errors_list() {
// Right click on specific file(s) or folder(s).
void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
-
item_menu->clear();
item_menu->set_size(Size2(1, 1));
@@ -1476,8 +1433,9 @@ void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
TreeItem *ti = error_tree->get_selected();
- while (ti->get_parent() != error_tree->get_root())
+ while (ti->get_parent() != error_tree->get_root()) {
ti = ti->get_parent();
+ }
String type;
@@ -1508,7 +1466,6 @@ void ScriptEditorDebugger::_tab_changed(int p_tab) {
}
void ScriptEditorDebugger::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("live_debug_create_node"), &ScriptEditorDebugger::live_debug_create_node);
ClassDB::bind_method(D_METHOD("live_debug_instance_node"), &ScriptEditorDebugger::live_debug_instance_node);
ClassDB::bind_method(D_METHOD("live_debug_remove_node"), &ScriptEditorDebugger::live_debug_remove_node);
@@ -1533,7 +1490,6 @@ void ScriptEditorDebugger::_bind_methods() {
}
ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
-
editor = p_editor;
tabs = memnew(TabContainer);
@@ -1729,7 +1685,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
TreeItem *root = perf_monitors->create_item();
perf_monitors->set_hide_root(true);
for (int i = 0; i < Performance::MONITOR_MAX; i++) {
-
String n = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i));
Performance::MonitorType mtype = Performance::get_singleton()->get_monitor_type(Performance::Monitor(i));
String base = n.get_slice("/", 0);
@@ -1866,7 +1821,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
}
ScriptEditorDebugger::~ScriptEditorDebugger() {
-
if (peer.is_valid()) {
peer->close();
peer.unref();
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index a08a7c67c2..2984051aa1 100644
--- a/editor/debugger/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -55,7 +55,6 @@ class EditorNetworkProfiler;
class SceneDebuggerTree;
class ScriptEditorDebugger : public MarginContainer {
-
GDCLASS(ScriptEditorDebugger, MarginContainer);
friend class EditorDebuggerNode;
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 2302fb0780..c6977779bd 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -37,7 +37,6 @@
#include "scene/gui/margin_container.h"
void DependencyEditor::_searched(const String &p_path) {
-
Map<String, String> dep_rename;
dep_rename[replacing] = p_path;
@@ -48,7 +47,6 @@ void DependencyEditor::_searched(const String &p_path) {
}
void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) {
-
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
replacing = ti->get_text(1);
@@ -64,21 +62,19 @@ void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) {
}
void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates) {
-
for (int i = 0; i < efsd->get_subdir_count(); i++) {
_fix_and_find(efsd->get_subdir(i), candidates);
}
for (int i = 0; i < efsd->get_file_count(); i++) {
-
String file = efsd->get_file(i);
- if (!candidates.has(file))
+ if (!candidates.has(file)) {
continue;
+ }
String path = efsd->get_file_path(i);
for (Map<String, String>::Element *E = candidates[file].front(); E; E = E->next()) {
-
if (E->get() == String()) {
E->get() = path;
continue;
@@ -100,7 +96,6 @@ void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String
int current_score = 0;
for (int j = 0; j < lostv.size(); j++) {
-
if (j < existingv.size() && lostv[j] == existingv[j]) {
existing_score++;
}
@@ -110,7 +105,6 @@ void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String
}
if (current_score > existing_score) {
-
//if it was the same, could track distance to new path but..
E->get() = path; //replace by more accurate
@@ -120,14 +114,13 @@ void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String
}
void DependencyEditor::_fix_all() {
-
- if (!EditorFileSystem::get_singleton()->get_filesystem())
+ if (!EditorFileSystem::get_singleton()->get_filesystem()) {
return;
+ }
Map<String, Map<String, String>> candidates;
for (List<String>::Element *E = missing.front(); E; E = E->next()) {
-
String base = E->get().get_file();
if (!candidates.has(base)) {
candidates[base] = Map<String, String>();
@@ -141,9 +134,7 @@ void DependencyEditor::_fix_all() {
Map<String, String> remaps;
for (Map<String, Map<String, String>>::Element *E = candidates.front(); E; E = E->next()) {
-
for (Map<String, String>::Element *F = E->get().front(); F; F = F->next()) {
-
if (F->get() != String()) {
remaps[F->key()] = F->get();
}
@@ -151,7 +142,6 @@ void DependencyEditor::_fix_all() {
}
if (remaps.size()) {
-
ResourceLoader::rename_dependencies(editing, remaps);
_update_list();
@@ -160,12 +150,10 @@ void DependencyEditor::_fix_all() {
}
void DependencyEditor::_update_file() {
-
EditorFileSystem::get_singleton()->update_file(editing);
}
void DependencyEditor::_update_list() {
-
List<String> deps;
ResourceLoader::get_dependencies(editing, &deps, true);
@@ -179,7 +167,6 @@ void DependencyEditor::_update_list() {
bool broken = false;
for (List<String>::Element *E = deps.front(); E; E = E->next()) {
-
TreeItem *item = tree->create_item(root);
String n = E->get();
@@ -214,7 +201,6 @@ void DependencyEditor::_update_list() {
}
void DependencyEditor::edit(const String &p_path) {
-
editing = p_path;
set_title(TTR("Dependencies For:") + " " + p_path.get_file());
@@ -232,7 +218,6 @@ void DependencyEditor::_bind_methods() {
}
DependencyEditor::DependencyEditor() {
-
VBoxContainer *vb = memnew(VBoxContainer);
vb->set_name(TTR("Dependencies"));
add_child(vb);
@@ -271,7 +256,6 @@ DependencyEditor::DependencyEditor() {
/////////////////////////////////////
void DependencyEditorOwners::_list_rmb_select(int p_item, const Vector2 &p_pos) {
-
file_options->clear();
file_options->set_size(Size2(1, 1));
if (p_item >= 0) {
@@ -283,7 +267,6 @@ void DependencyEditorOwners::_list_rmb_select(int p_item, const Vector2 &p_pos)
}
void DependencyEditorOwners::_select_file(int p_idx) {
-
String fpath = owners->get_item_text(p_idx);
if (ResourceLoader::get_resource_type(fpath) == "PackedScene") {
@@ -294,12 +277,12 @@ void DependencyEditorOwners::_select_file(int p_idx) {
}
void DependencyEditorOwners::_file_option(int p_option) {
-
switch (p_option) {
case FILE_OPEN: {
int idx = owners->get_current();
- if (idx < 0 || idx >= owners->get_item_count())
+ if (idx < 0 || idx >= owners->get_item_count()) {
break;
+ }
_select_file(idx);
} break;
}
@@ -309,16 +292,15 @@ void DependencyEditorOwners::_bind_methods() {
}
void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) {
-
- if (!efsd)
+ if (!efsd) {
return;
+ }
for (int i = 0; i < efsd->get_subdir_count(); i++) {
_fill_owners(efsd->get_subdir(i));
}
for (int i = 0; i < efsd->get_file_count(); i++) {
-
Vector<String> deps = efsd->get_file_deps(i);
bool found = false;
for (int j = 0; j < deps.size(); j++) {
@@ -327,8 +309,9 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) {
break;
}
}
- if (!found)
+ if (!found) {
continue;
+ }
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(efsd->get_file_type(i));
@@ -337,7 +320,6 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) {
}
void DependencyEditorOwners::show(const String &p_path) {
-
editing = p_path;
owners->clear();
_fill_owners(EditorFileSystem::get_singleton()->get_filesystem());
@@ -347,7 +329,6 @@ void DependencyEditorOwners::show(const String &p_path) {
}
DependencyEditorOwners::DependencyEditorOwners(EditorNode *p_editor) {
-
editor = p_editor;
file_options = memnew(PopupMenu);
@@ -365,8 +346,9 @@ DependencyEditorOwners::DependencyEditorOwners(EditorNode *p_editor) {
///////////////////////
void DependencyRemoveDialog::_find_files_in_removed_folder(EditorFileSystemDirectory *efsd, const String &p_folder) {
- if (!efsd)
+ if (!efsd) {
return;
+ }
for (int i = 0; i < efsd->get_subdir_count(); ++i) {
_find_files_in_removed_folder(efsd->get_subdir(i), p_folder);
@@ -379,8 +361,9 @@ void DependencyRemoveDialog::_find_files_in_removed_folder(EditorFileSystemDirec
}
void DependencyRemoveDialog::_find_all_removed_dependencies(EditorFileSystemDirectory *efsd, Vector<RemovedDependency> &p_removed) {
- if (!efsd)
+ if (!efsd) {
return;
+ }
for (int i = 0; i < efsd->get_subdir_count(); i++) {
_find_all_removed_dependencies(efsd->get_subdir(i), p_removed);
@@ -390,8 +373,9 @@ void DependencyRemoveDialog::_find_all_removed_dependencies(EditorFileSystemDire
const String path = efsd->get_file_path(i);
//It doesn't matter if a file we are about to delete will have some of its dependencies removed too
- if (all_remove_files.has(path))
+ if (all_remove_files.has(path)) {
continue;
+ }
Vector<String> all_deps = efsd->get_file_deps(i);
for (int j = 0; j < all_deps.size(); ++j) {
@@ -479,7 +463,6 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector<
}
void DependencyRemoveDialog::ok_pressed() {
-
for (int i = 0; i < files_to_delete.size(); ++i) {
if (ResourceCache::has(files_to_delete[i])) {
Resource *res = ResourceCache::get(files_to_delete[i]);
@@ -525,10 +508,10 @@ void DependencyRemoveDialog::ok_pressed() {
if (dirs_to_delete.size() == 0) {
// If we only deleted files we should only need to tell the file system about the files we touched.
- for (int i = 0; i < files_to_delete.size(); ++i)
+ for (int i = 0; i < files_to_delete.size(); ++i) {
EditorFileSystem::get_singleton()->update_file(files_to_delete[i]);
+ }
} else {
-
for (int i = 0; i < dirs_to_delete.size(); ++i) {
String path = OS::get_singleton()->get_resource_dir() + dirs_to_delete[i].replace_first("res://", "/");
print_verbose("Moving to trash: " + path);
@@ -549,11 +532,13 @@ void DependencyRemoveDialog::ok_pressed() {
for (int i = 0; i < previous_favorites.size(); ++i) {
if (previous_favorites[i].ends_with("/")) {
- if (dirs_to_delete.find(previous_favorites[i]) < 0)
+ if (dirs_to_delete.find(previous_favorites[i]) < 0) {
new_favorites.push_back(previous_favorites[i]);
+ }
} else {
- if (files_to_delete.find(previous_favorites[i]) < 0)
+ if (files_to_delete.find(previous_favorites[i]) < 0) {
new_favorites.push_back(previous_favorites[i]);
+ }
}
}
@@ -568,7 +553,6 @@ void DependencyRemoveDialog::_bind_methods() {
}
DependencyRemoveDialog::DependencyRemoveDialog() {
-
get_ok()->set_text(TTR("Remove"));
VBoxContainer *vb = memnew(VBoxContainer);
@@ -586,7 +570,6 @@ DependencyRemoveDialog::DependencyRemoveDialog() {
//////////////
void DependencyErrorDialog::show(Mode p_mode, const String &p_for_file, const Vector<String> &report) {
-
mode = p_mode;
for_file = p_for_file;
set_title(TTR("Error loading:") + " " + p_for_file.get_file());
@@ -594,12 +577,12 @@ void DependencyErrorDialog::show(Mode p_mode, const String &p_for_file, const Ve
TreeItem *root = files->create_item(nullptr);
for (int i = 0; i < report.size(); i++) {
-
String dep;
String type = "Object";
dep = report[i].get_slice("::", 0);
- if (report[i].get_slice_count("::") > 0)
+ if (report[i].get_slice_count("::") > 0) {
type = report[i].get_slice("::", 1);
+ }
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(type);
@@ -612,7 +595,6 @@ void DependencyErrorDialog::show(Mode p_mode, const String &p_for_file, const Ve
}
void DependencyErrorDialog::ok_pressed() {
-
switch (mode) {
case MODE_SCENE:
EditorNode::get_singleton()->load_scene(for_file, true);
@@ -624,12 +606,10 @@ void DependencyErrorDialog::ok_pressed() {
}
void DependencyErrorDialog::custom_action(const String &) {
-
EditorNode::get_singleton()->fix_dependencies(for_file);
}
DependencyErrorDialog::DependencyErrorDialog() {
-
VBoxContainer *vb = memnew(VBoxContainer);
add_child(vb);
@@ -654,26 +634,25 @@ DependencyErrorDialog::DependencyErrorDialog() {
//////////////////////////////////////////////////////////////////////
void OrphanResourcesDialog::ok_pressed() {
-
paths.clear();
_find_to_delete(files->get_root(), paths);
- if (paths.empty())
+ if (paths.empty()) {
return;
+ }
delete_confirm->set_text(vformat(TTR("Permanently delete %d item(s)? (No undo!)"), paths.size()));
delete_confirm->popup_centered();
}
bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd, HashMap<String, int> &refs, TreeItem *p_parent) {
-
- if (!efsd)
+ if (!efsd) {
return false;
+ }
bool has_children = false;
for (int i = 0; i < efsd->get_subdir_count(); i++) {
-
TreeItem *dir_item = nullptr;
if (p_parent) {
dir_item = files->create_item(p_parent);
@@ -692,17 +671,14 @@ bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd, HashMa
}
for (int i = 0; i < efsd->get_file_count(); i++) {
-
if (!p_parent) {
Vector<String> deps = efsd->get_file_deps(i);
for (int j = 0; j < deps.size(); j++) {
-
if (!refs.has(deps[j])) {
refs[deps[j]] = 1;
}
}
} else {
-
String path = efsd->get_file_path(i);
if (!refs.has(path)) {
TreeItem *ti = files->create_item(p_parent);
@@ -737,15 +713,12 @@ void OrphanResourcesDialog::refresh() {
}
void OrphanResourcesDialog::show() {
-
refresh();
popup_centered_ratio();
}
void OrphanResourcesDialog::_find_to_delete(TreeItem *p_item, List<String> &paths) {
-
while (p_item) {
-
if (p_item->get_cell_mode(0) == TreeItem::CELL_MODE_CHECK && p_item->is_checked(0)) {
paths.push_back(p_item->get_metadata(0));
}
@@ -759,10 +732,8 @@ void OrphanResourcesDialog::_find_to_delete(TreeItem *p_item, List<String> &path
}
void OrphanResourcesDialog::_delete_confirm() {
-
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
for (List<String>::Element *E = paths.front(); E; E = E->next()) {
-
da->remove(E->get());
EditorFileSystem::get_singleton()->update_file(E->get());
}
@@ -771,7 +742,6 @@ void OrphanResourcesDialog::_delete_confirm() {
}
void OrphanResourcesDialog::_button_pressed(Object *p_item, int p_column, int p_id) {
-
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
String path = ti->get_metadata(0);
@@ -782,7 +752,6 @@ void OrphanResourcesDialog::_bind_methods() {
}
OrphanResourcesDialog::OrphanResourcesDialog() {
-
set_title(TTR("Orphan Resource Explorer"));
delete_confirm = memnew(ConfirmationDialog);
get_ok()->set_text(TTR("Delete"));
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp
index 7169986b14..276cd12ded 100644
--- a/editor/dictionary_property_edit.cpp
+++ b/editor/dictionary_property_edit.cpp
@@ -40,34 +40,33 @@ void DictionaryPropertyEdit::_notif_changev(const String &p_v) {
}
void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) {
-
// TODO: Set key of a dictionary is not allowed yet
}
void DictionaryPropertyEdit::_set_value(const Variant &p_key, const Variant &p_value) {
-
Dictionary dict = get_dictionary();
dict[p_key] = p_value;
Object *o = ObjectDB::get_instance(obj);
- if (!o)
+ if (!o) {
return;
+ }
o->set(property, dict);
}
Variant DictionaryPropertyEdit::get_dictionary() const {
-
Object *o = ObjectDB::get_instance(obj);
- if (!o)
+ if (!o) {
return Dictionary();
+ }
Variant dict = o->get(property);
- if (dict.get_type() != Variant::DICTIONARY)
+ if (dict.get_type() != Variant::DICTIONARY) {
return Dictionary();
+ }
return dict;
}
void DictionaryPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
-
Dictionary dict = get_dictionary();
Array keys = dict.keys();
@@ -87,16 +86,15 @@ void DictionaryPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) cons
}
void DictionaryPropertyEdit::edit(Object *p_obj, const StringName &p_prop) {
-
property = p_prop;
obj = p_obj->get_instance_id();
}
Node *DictionaryPropertyEdit::get_node() {
-
Object *o = ObjectDB::get_instance(obj);
- if (!o)
+ if (!o) {
return nullptr;
+ }
return cast_to<Node>(o);
}
@@ -106,7 +104,6 @@ bool DictionaryPropertyEdit::_dont_undo_redo() {
}
void DictionaryPropertyEdit::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_set_key"), &DictionaryPropertyEdit::_set_key);
ClassDB::bind_method(D_METHOD("_set_value"), &DictionaryPropertyEdit::_set_value);
ClassDB::bind_method(D_METHOD("_notif_change"), &DictionaryPropertyEdit::_notif_change);
@@ -115,7 +112,6 @@ void DictionaryPropertyEdit::_bind_methods() {
}
bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
-
Dictionary dict = get_dictionary();
Array keys = dict.keys();
keys.sort();
@@ -126,7 +122,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
String type = pn.substr(slash + 2, pn.length());
int index = pn.substr(0, slash).to_int();
if (type == "key" && index < keys.size()) {
-
const Variant &key = keys[index];
UndoRedo *ur = EditorNode::get_undo_redo();
@@ -141,7 +136,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
} else if (type == "value" && index < keys.size()) {
const Variant &key = keys[index];
if (dict.has(key)) {
-
Variant value = dict[key];
UndoRedo *ur = EditorNode::get_undo_redo();
@@ -161,7 +155,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
}
bool DictionaryPropertyEdit::_get(const StringName &p_name, Variant &r_ret) const {
-
Dictionary dict = get_dictionary();
Array keys = dict.keys();
keys.sort();
@@ -170,7 +163,6 @@ bool DictionaryPropertyEdit::_get(const StringName &p_name, Variant &r_ret) cons
int slash = pn.find(": ");
if (slash != -1 && pn.length() > slash) {
-
String type = pn.substr(slash + 2, pn.length());
int index = pn.substr(0, slash).to_int();
diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp
index 310e78ee60..c52d91b03d 100644
--- a/editor/doc_data.cpp
+++ b/editor/doc_data.cpp
@@ -44,13 +44,12 @@
#include "modules/modules_enabled.gen.h"
void DocData::merge_from(const DocData &p_data) {
-
for (Map<String, ClassDoc>::Element *E = class_list.front(); E; E = E->next()) {
-
ClassDoc &c = E->get();
- if (!p_data.class_list.has(c.name))
+ if (!p_data.class_list.has(c.name)) {
continue;
+ }
const ClassDoc &cf = p_data.class_list[c.name];
@@ -59,37 +58,42 @@ void DocData::merge_from(const DocData &p_data) {
c.tutorials = cf.tutorials;
for (int i = 0; i < c.methods.size(); i++) {
-
MethodDoc &m = c.methods.write[i];
for (int j = 0; j < cf.methods.size(); j++) {
-
- if (cf.methods[j].name != m.name)
+ if (cf.methods[j].name != m.name) {
continue;
- if (cf.methods[j].arguments.size() != m.arguments.size())
+ }
+ if (cf.methods[j].arguments.size() != m.arguments.size()) {
continue;
+ }
// since polymorphic functions are allowed we need to check the type of
// the arguments so we make sure they are different.
int arg_count = cf.methods[j].arguments.size();
Vector<bool> arg_used;
arg_used.resize(arg_count);
- for (int l = 0; l < arg_count; ++l)
+ for (int l = 0; l < arg_count; ++l) {
arg_used.write[l] = false;
+ }
// also there is no guarantee that argument ordering will match, so we
// have to check one by one so we make sure we have an exact match
for (int k = 0; k < arg_count; ++k) {
- for (int l = 0; l < arg_count; ++l)
+ for (int l = 0; l < arg_count; ++l) {
if (cf.methods[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) {
arg_used.write[l] = true;
break;
}
+ }
}
bool not_the_same = false;
- for (int l = 0; l < arg_count; ++l)
- if (!arg_used[l]) // at least one of the arguments was different
+ for (int l = 0; l < arg_count; ++l) {
+ if (!arg_used[l]) { // at least one of the arguments was different
not_the_same = true;
- if (not_the_same)
+ }
+ }
+ if (not_the_same) {
continue;
+ }
const MethodDoc &mf = cf.methods[j];
@@ -99,13 +103,12 @@ void DocData::merge_from(const DocData &p_data) {
}
for (int i = 0; i < c.signals.size(); i++) {
-
MethodDoc &m = c.signals.write[i];
for (int j = 0; j < cf.signals.size(); j++) {
-
- if (cf.signals[j].name != m.name)
+ if (cf.signals[j].name != m.name) {
continue;
+ }
const MethodDoc &mf = cf.signals[j];
m.description = mf.description;
@@ -114,13 +117,12 @@ void DocData::merge_from(const DocData &p_data) {
}
for (int i = 0; i < c.constants.size(); i++) {
-
ConstantDoc &m = c.constants.write[i];
for (int j = 0; j < cf.constants.size(); j++) {
-
- if (cf.constants[j].name != m.name)
+ if (cf.constants[j].name != m.name) {
continue;
+ }
const ConstantDoc &mf = cf.constants[j];
m.description = mf.description;
@@ -129,13 +131,12 @@ void DocData::merge_from(const DocData &p_data) {
}
for (int i = 0; i < c.properties.size(); i++) {
-
PropertyDoc &p = c.properties.write[i];
for (int j = 0; j < cf.properties.size(); j++) {
-
- if (cf.properties[j].name != p.name)
+ if (cf.properties[j].name != p.name) {
continue;
+ }
const PropertyDoc &pf = cf.properties[j];
p.description = pf.description;
@@ -144,13 +145,12 @@ void DocData::merge_from(const DocData &p_data) {
}
for (int i = 0; i < c.theme_properties.size(); i++) {
-
PropertyDoc &p = c.theme_properties.write[i];
for (int j = 0; j < cf.theme_properties.size(); j++) {
-
- if (cf.theme_properties[j].name != p.name)
+ if (cf.theme_properties[j].name != p.name) {
continue;
+ }
const PropertyDoc &pf = cf.theme_properties[j];
p.description = pf.description;
@@ -179,17 +179,18 @@ void DocData::merge_from(const DocData &p_data) {
void DocData::remove_from(const DocData &p_data) {
for (Map<String, ClassDoc>::Element *E = p_data.class_list.front(); E; E = E->next()) {
- if (class_list.has(E->key()))
+ if (class_list.has(E->key())) {
class_list.erase(E->key());
+ }
}
}
static void return_doc_from_retinfo(DocData::MethodDoc &p_method, const PropertyInfo &p_retinfo) {
-
if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
p_method.return_enum = p_retinfo.class_name;
- if (p_method.return_enum.begins_with("_")) //proxy class
+ if (p_method.return_enum.begins_with("_")) { //proxy class
p_method.return_enum = p_method.return_enum.substr(1, p_method.return_enum.length());
+ }
p_method.return_type = "int";
} else if (p_retinfo.class_name != StringName()) {
p_method.return_type = p_retinfo.class_name;
@@ -207,13 +208,13 @@ static void return_doc_from_retinfo(DocData::MethodDoc &p_method, const Property
}
static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const PropertyInfo &p_arginfo) {
-
p_argument.name = p_arginfo.name;
if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
p_argument.enumeration = p_arginfo.class_name;
- if (p_argument.enumeration.begins_with("_")) //proxy class
+ if (p_argument.enumeration.begins_with("_")) { //proxy class
p_argument.enumeration = p_argument.enumeration.substr(1, p_argument.enumeration.length());
+ }
p_argument.type = "int";
} else if (p_arginfo.class_name != StringName()) {
p_argument.type = p_arginfo.class_name;
@@ -230,7 +231,6 @@ static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const Pr
}
static Variant get_documentation_default_value(const StringName &p_class_name, const StringName &p_property_name, bool &r_default_value_valid) {
-
Variant default_value = Variant();
r_default_value_valid = false;
@@ -243,8 +243,9 @@ static Variant get_documentation_default_value(const StringName &p_class_name, c
for (List<StringName>::Element *E2 = inheriting_classes.front(); E2; E2 = E2->next()) {
if (ClassDB::can_instance(E2->get())) {
default_value = ClassDB::class_get_default_property_value(E2->get(), p_property_name, &r_default_value_valid);
- if (r_default_value_valid)
+ if (r_default_value_valid) {
break;
+ }
}
}
}
@@ -253,7 +254,6 @@ static Variant get_documentation_default_value(const StringName &p_class_name, c
}
void DocData::generate(bool p_basic_types) {
-
List<StringName> classes;
ClassDB::get_class_list(&classes);
classes.sort_custom<StringName::AlphCompare>();
@@ -263,7 +263,6 @@ void DocData::generate(bool p_basic_types) {
bool skip_setter_getter_methods = true;
while (classes.size()) {
-
Set<StringName> setters_getters;
String name = classes.front()->get();
@@ -274,8 +273,9 @@ void DocData::generate(bool p_basic_types) {
}
String cname = name;
- if (cname.begins_with("_")) //proxy class
+ if (cname.begins_with("_")) { //proxy class
cname = cname.substr(1, name.length());
+ }
class_list[cname] = ClassDoc();
ClassDoc &c = class_list[cname];
@@ -301,8 +301,9 @@ void DocData::generate(bool p_basic_types) {
EO = EO->next();
}
- if (E->get().usage & PROPERTY_USAGE_GROUP || E->get().usage & PROPERTY_USAGE_SUBGROUP || E->get().usage & PROPERTY_USAGE_CATEGORY || E->get().usage & PROPERTY_USAGE_INTERNAL)
+ if (E->get().usage & PROPERTY_USAGE_GROUP || E->get().usage & PROPERTY_USAGE_SUBGROUP || E->get().usage & PROPERTY_USAGE_CATEGORY || E->get().usage & PROPERTY_USAGE_INTERNAL) {
continue;
+ }
PropertyDoc prop;
@@ -329,8 +330,9 @@ void DocData::generate(bool p_basic_types) {
if (inherited) {
bool base_default_value_valid = false;
Variant base_default_value = get_documentation_default_value(ClassDB::get_parent_class(name), E->get().name, base_default_value_valid);
- if (!default_value_valid || !base_default_value_valid || default_value == base_default_value)
+ if (!default_value_valid || !base_default_value_valid || default_value == base_default_value) {
continue;
+ }
}
}
@@ -361,10 +363,8 @@ void DocData::generate(bool p_basic_types) {
} else if (retinfo.type == Variant::ARRAY && retinfo.hint == PROPERTY_HINT_ARRAY_TYPE) {
prop.type = retinfo.hint_string + "[]";
} else if (retinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
-
prop.type = retinfo.hint_string;
} else if (retinfo.type == Variant::NIL && retinfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
-
prop.type = "Variant";
} else if (retinfo.type == Variant::NIL) {
prop.type = "void";
@@ -377,16 +377,15 @@ void DocData::generate(bool p_basic_types) {
}
if (setter != StringName()) {
-
setters_getters.insert(setter);
}
if (!found_type) {
-
- if (E->get().type == Variant::OBJECT && E->get().hint == PROPERTY_HINT_RESOURCE_TYPE)
+ if (E->get().type == Variant::OBJECT && E->get().hint == PROPERTY_HINT_RESOURCE_TYPE) {
prop.type = E->get().hint_string;
- else
+ } else {
prop.type = Variant::get_type_name(E->get().type);
+ }
}
c.properties.push_back(prop);
@@ -397,9 +396,9 @@ void DocData::generate(bool p_basic_types) {
method_list.sort();
for (List<MethodInfo>::Element *E = method_list.front(); E; E = E->next()) {
-
- if (E->get().name == "" || (E->get().name[0] == '_' && !(E->get().flags & METHOD_FLAG_VIRTUAL)))
+ if (E->get().name == "" || (E->get().name[0] == '_' && !(E->get().flags & METHOD_FLAG_VIRTUAL))) {
continue; //hidden, don't count
+ }
if (skip_setter_getter_methods && setters_getters.has(E->get().name)) {
// Don't skip parametric setters and getters, i.e. method which require
@@ -414,27 +413,28 @@ void DocData::generate(bool p_basic_types) {
method.name = E->get().name;
- if (E->get().flags & METHOD_FLAG_VIRTUAL)
+ if (E->get().flags & METHOD_FLAG_VIRTUAL) {
method.qualifiers = "virtual";
+ }
if (E->get().flags & METHOD_FLAG_CONST) {
- if (method.qualifiers != "")
+ if (method.qualifiers != "") {
method.qualifiers += " ";
+ }
method.qualifiers += "const";
} else if (E->get().flags & METHOD_FLAG_VARARG) {
- if (method.qualifiers != "")
+ if (method.qualifiers != "") {
method.qualifiers += " ";
+ }
method.qualifiers += "vararg";
}
for (int i = -1; i < E->get().arguments.size(); i++) {
-
if (i == -1) {
#ifdef DEBUG_METHODS_ENABLED
return_doc_from_retinfo(method, E->get().return_val);
#endif
} else {
-
const PropertyInfo &arginfo = E->get().arguments[i];
ArgumentDoc argument;
argument_doc_from_arginfo(argument, arginfo);
@@ -456,13 +456,10 @@ void DocData::generate(bool p_basic_types) {
ClassDB::get_signal_list(name, &signal_list, true);
if (signal_list.size()) {
-
for (List<MethodInfo>::Element *EV = signal_list.front(); EV; EV = EV->next()) {
-
MethodDoc signal;
signal.name = EV->get().name;
for (int i = 0; i < EV->get().arguments.size(); i++) {
-
const PropertyInfo &arginfo = EV->get().arguments[i];
ArgumentDoc argument;
argument_doc_from_arginfo(argument, arginfo);
@@ -478,7 +475,6 @@ void DocData::generate(bool p_basic_types) {
ClassDB::get_integer_constant_list(name, &constant_list, true);
for (List<String>::Element *E = constant_list.front(); E; E = E->next()) {
-
ConstantDoc constant;
constant.name = E->get();
constant.value = itos(ClassDB::get_integer_constant(name, E->get()));
@@ -492,7 +488,6 @@ void DocData::generate(bool p_basic_types) {
List<StringName> l;
Theme::get_default()->get_constant_list(cname, &l);
for (List<StringName>::Element *E = l.front(); E; E = E->next()) {
-
PropertyDoc pd;
pd.name = E->get();
pd.type = "int";
@@ -503,7 +498,6 @@ void DocData::generate(bool p_basic_types) {
l.clear();
Theme::get_default()->get_color_list(cname, &l);
for (List<StringName>::Element *E = l.front(); E; E = E->next()) {
-
PropertyDoc pd;
pd.name = E->get();
pd.type = "Color";
@@ -514,7 +508,6 @@ void DocData::generate(bool p_basic_types) {
l.clear();
Theme::get_default()->get_icon_list(cname, &l);
for (List<StringName>::Element *E = l.front(); E; E = E->next()) {
-
PropertyDoc pd;
pd.name = E->get();
pd.type = "Texture2D";
@@ -523,7 +516,6 @@ void DocData::generate(bool p_basic_types) {
l.clear();
Theme::get_default()->get_font_list(cname, &l);
for (List<StringName>::Element *E = l.front(); E; E = E->next()) {
-
PropertyDoc pd;
pd.name = E->get();
pd.type = "Font";
@@ -532,7 +524,6 @@ void DocData::generate(bool p_basic_types) {
l.clear();
Theme::get_default()->get_stylebox_list(cname, &l);
for (List<StringName>::Element *E = l.front(); E; E = E->next()) {
-
PropertyDoc pd;
pd.name = E->get();
pd.type = "StyleBox";
@@ -549,15 +540,18 @@ void DocData::generate(bool p_basic_types) {
class_list["Variant"].name = "Variant";
}
- if (!p_basic_types)
+ if (!p_basic_types) {
return;
+ }
// Add Variant types.
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- if (i == Variant::NIL)
+ if (i == Variant::NIL) {
continue; // Not exposed outside of 'null', should not be in class list.
- if (i == Variant::OBJECT)
+ }
+ if (i == Variant::OBJECT) {
continue; // Use the core type instead.
+ }
String cname = Variant::get_type_name(Variant::Type(i));
@@ -574,14 +568,12 @@ void DocData::generate(bool p_basic_types) {
Variant::get_constructor_list(Variant::Type(i), &method_list);
for (List<MethodInfo>::Element *E = method_list.front(); E; E = E->next()) {
-
MethodInfo &mi = E->get();
MethodDoc method;
method.name = mi.name;
for (int j = 0; j < mi.arguments.size(); j++) {
-
PropertyInfo arginfo = mi.arguments[j];
ArgumentDoc ad;
argument_doc_from_arginfo(ad, mi.arguments[j]);
@@ -599,8 +591,9 @@ void DocData::generate(bool p_basic_types) {
return_doc_from_retinfo(method, mi.return_val);
if (mi.flags & METHOD_FLAG_VARARG) {
- if (method.qualifiers != "")
+ if (method.qualifiers != "") {
method.qualifiers += " ";
+ }
method.qualifiers += "vararg";
}
@@ -610,7 +603,6 @@ void DocData::generate(bool p_basic_types) {
List<PropertyInfo> properties;
v.get_property_list(&properties);
for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
-
PropertyInfo pi = E->get();
PropertyDoc property;
property.name = pi.name;
@@ -624,7 +616,6 @@ void DocData::generate(bool p_basic_types) {
Variant::get_constants_for_type(Variant::Type(i), &constants);
for (List<StringName>::Element *E = constants.front(); E; E = E->next()) {
-
ConstantDoc constant;
constant.name = E->get();
Variant value = Variant::get_constant_value(Variant::Type(i), E->get());
@@ -636,14 +627,12 @@ void DocData::generate(bool p_basic_types) {
//built in constants and functions
{
-
String cname = "@GlobalScope";
class_list[cname] = ClassDoc();
ClassDoc &c = class_list[cname];
c.name = cname;
for (int i = 0; i < GlobalConstants::get_global_constant_count(); i++) {
-
ConstantDoc cd;
cd.name = GlobalConstants::get_global_constant_name(i);
cd.value = itos(GlobalConstants::get_global_constant_value(i));
@@ -656,7 +645,6 @@ void DocData::generate(bool p_basic_types) {
//servers (this is kind of hackish)
for (List<Engine::Singleton>::Element *E = singletons.front(); E; E = E->next()) {
-
PropertyDoc pd;
Engine::Singleton &s = E->get();
if (!s.ptr) {
@@ -664,10 +652,12 @@ void DocData::generate(bool p_basic_types) {
}
pd.name = s.name;
pd.type = s.ptr->get_class();
- while (String(ClassDB::get_parent_class(pd.type)) != "Object")
+ while (String(ClassDB::get_parent_class(pd.type)) != "Object") {
pd.type = ClassDB::get_parent_class(pd.type);
- if (pd.type.begins_with("_"))
+ }
+ if (pd.type.begins_with("_")) {
pd.type = pd.type.substr(1, pd.type.length());
+ }
c.properties.push_back(pd);
}
}
@@ -675,9 +665,7 @@ void DocData::generate(bool p_basic_types) {
//built in script reference
{
-
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
-
ScriptLanguage *lang = ScriptServer::get_language(i);
String cname = "@" + lang->get_name();
class_list[cname] = ClassDoc();
@@ -689,21 +677,20 @@ void DocData::generate(bool p_basic_types) {
lang->get_public_functions(&minfo);
for (List<MethodInfo>::Element *E = minfo.front(); E; E = E->next()) {
-
MethodInfo &mi = E->get();
MethodDoc md;
md.name = mi.name;
if (mi.flags & METHOD_FLAG_VARARG) {
- if (md.qualifiers != "")
+ if (md.qualifiers != "") {
md.qualifiers += " ";
+ }
md.qualifiers += "vararg";
}
return_doc_from_retinfo(md, mi.return_val);
for (int j = 0; j < mi.arguments.size(); j++) {
-
ArgumentDoc ad;
argument_doc_from_arginfo(ad, mi.arguments[j]);
@@ -723,7 +710,6 @@ void DocData::generate(bool p_basic_types) {
lang->get_public_constants(&cinfo);
for (List<Pair<String, Variant>>::Element *E = cinfo.front(); E; E = E->next()) {
-
ConstantDoc cd;
cd.name = E->get().first;
cd.value = E->get().second;
@@ -734,36 +720,29 @@ void DocData::generate(bool p_basic_types) {
}
static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &methods) {
-
String section = parser->get_node_name();
String element = section.substr(0, section.length() - 1);
while (parser->read() == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser->get_node_name() == element) {
-
DocData::MethodDoc method;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
method.name = parser->get_attribute_value("name");
- if (parser->has_attribute("qualifiers"))
+ if (parser->has_attribute("qualifiers")) {
method.qualifiers = parser->get_attribute_value("qualifiers");
+ }
while (parser->read() == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser->get_node_name();
if (name == "return") {
-
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
method.return_type = parser->get_attribute_value("type");
if (parser->has_attribute("enum")) {
method.return_enum = parser->get_attribute_value("enum");
}
} else if (name == "argument") {
-
DocData::ArgumentDoc argument;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
argument.name = parser->get_attribute_value("name");
@@ -776,14 +755,15 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
method.arguments.push_back(argument);
} else if (name == "description") {
-
parser->read();
- if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
method.description = parser->get_node_data();
+ }
}
- } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == element)
+ } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == element) {
break;
+ }
}
methods.push_back(method);
@@ -792,15 +772,15 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + parser->get_node_name() + ".");
}
- } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == section)
+ } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == section) {
break;
+ }
}
return OK;
}
Error DocData::load_classes(const String &p_dir) {
-
Error err;
DirAccessRef da = DirAccess::open(p_dir, &err);
if (!da) {
@@ -814,8 +794,9 @@ Error DocData::load_classes(const String &p_dir) {
if (!da->current_is_dir() && path.ends_with("xml")) {
Ref<XMLParser> parser = memnew(XMLParser);
Error err2 = parser->open(p_dir.plus_file(path));
- if (err2)
+ if (err2) {
return err2;
+ }
_load(parser);
}
@@ -826,8 +807,8 @@ Error DocData::load_classes(const String &p_dir) {
return OK;
}
-Error DocData::erase_classes(const String &p_dir) {
+Error DocData::erase_classes(const String &p_dir) {
Error err;
DirAccessRef da = DirAccess::open(p_dir, &err);
if (!da) {
@@ -854,18 +835,18 @@ Error DocData::erase_classes(const String &p_dir) {
return OK;
}
-Error DocData::_load(Ref<XMLParser> parser) {
+Error DocData::_load(Ref<XMLParser> parser) {
Error err = OK;
while ((err = parser->read()) == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT && parser->get_node_name() == "?xml") {
parser->skip_section();
}
- if (parser->get_node_type() != XMLParser::NODE_ELEMENT)
+ if (parser->get_node_type() != XMLParser::NODE_ELEMENT) {
continue; //no idea what this may be, but skipping anyway
+ }
ERR_FAIL_COND_V(parser->get_node_name() != "class", ERR_FILE_CORRUPT);
@@ -875,98 +856,97 @@ Error DocData::_load(Ref<XMLParser> parser) {
ClassDoc &c = class_list[name];
c.name = name;
- if (parser->has_attribute("inherits"))
+ if (parser->has_attribute("inherits")) {
c.inherits = parser->get_attribute_value("inherits");
+ }
while (parser->read() == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name2 = parser->get_node_name();
if (name2 == "brief_description") {
-
parser->read();
- if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
c.brief_description = parser->get_node_data();
+ }
} else if (name2 == "description") {
parser->read();
- if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
c.description = parser->get_node_data();
+ }
} else if (name2 == "tutorials") {
while (parser->read() == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name3 = parser->get_node_name();
if (name3 == "link") {
-
+ TutorialDoc tutorial;
+ if (parser->has_attribute("title")) {
+ tutorial.title = parser->get_attribute_value("title");
+ }
parser->read();
- if (parser->get_node_type() == XMLParser::NODE_TEXT)
- c.tutorials.push_back(parser->get_node_data().strip_edges());
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
+ tutorial.link = parser->get_node_data().strip_edges();
+ c.tutorials.push_back(tutorial);
+ }
} else {
ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + name3 + ".");
}
- } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "tutorials")
+ } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "tutorials") {
break; // End of <tutorials>.
+ }
}
} else if (name2 == "methods") {
-
Error err2 = _parse_methods(parser, c.methods);
ERR_FAIL_COND_V(err2, err2);
} else if (name2 == "signals") {
-
Error err2 = _parse_methods(parser, c.signals);
ERR_FAIL_COND_V(err2, err2);
} else if (name2 == "members") {
-
while (parser->read() == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name3 = parser->get_node_name();
if (name3 == "member") {
-
PropertyDoc prop2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
prop2.name = parser->get_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
prop2.type = parser->get_attribute_value("type");
- if (parser->has_attribute("setter"))
+ if (parser->has_attribute("setter")) {
prop2.setter = parser->get_attribute_value("setter");
- if (parser->has_attribute("getter"))
+ }
+ if (parser->has_attribute("getter")) {
prop2.getter = parser->get_attribute_value("getter");
- if (parser->has_attribute("enum"))
+ }
+ if (parser->has_attribute("enum")) {
prop2.enumeration = parser->get_attribute_value("enum");
+ }
if (!parser->is_empty()) {
parser->read();
- if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
prop2.description = parser->get_node_data();
+ }
}
c.properties.push_back(prop2);
} else {
ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + name3 + ".");
}
- } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "members")
+ } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "members") {
break; // End of <members>.
+ }
}
} else if (name2 == "theme_items") {
-
while (parser->read() == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name3 = parser->get_node_name();
if (name3 == "theme_item") {
-
PropertyDoc prop2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
@@ -975,28 +955,26 @@ Error DocData::_load(Ref<XMLParser> parser) {
prop2.type = parser->get_attribute_value("type");
if (!parser->is_empty()) {
parser->read();
- if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
prop2.description = parser->get_node_data();
+ }
}
c.theme_properties.push_back(prop2);
} else {
ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + name3 + ".");
}
- } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "theme_items")
+ } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "theme_items") {
break; // End of <theme_items>.
+ }
}
} else if (name2 == "constants") {
-
while (parser->read() == OK) {
-
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name3 = parser->get_node_name();
if (name3 == "constant") {
-
ConstantDoc constant2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
constant2.name = parser->get_attribute_value("name");
@@ -1007,25 +985,27 @@ Error DocData::_load(Ref<XMLParser> parser) {
}
if (!parser->is_empty()) {
parser->read();
- if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
constant2.description = parser->get_node_data();
+ }
}
c.constants.push_back(constant2);
} else {
ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + name3 + ".");
}
- } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "constants")
+ } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "constants") {
break; // End of <constants>.
+ }
}
} else {
-
ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + name2 + ".");
}
- } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "class")
+ } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "class") {
break; // End of <class>.
+ }
}
}
@@ -1033,19 +1013,18 @@ Error DocData::_load(Ref<XMLParser> parser) {
}
static void _write_string(FileAccess *f, int p_tablevel, const String &p_string) {
-
- if (p_string == "")
+ if (p_string == "") {
return;
+ }
String tab;
- for (int i = 0; i < p_tablevel; i++)
+ for (int i = 0; i < p_tablevel; i++) {
tab += "\t";
+ }
f->store_string(tab + p_string + "\n");
}
Error DocData::save_classes(const String &p_default_path, const Map<String, String> &p_class_path) {
-
for (Map<String, ClassDoc>::Element *E = class_list.front(); E; E = E->next()) {
-
ClassDoc &c = E->get();
String save_path;
@@ -1064,8 +1043,9 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
_write_string(f, 0, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
String header = "<class name=\"" + c.name + "\"";
- if (c.inherits != "")
+ if (c.inherits != "") {
header += " inherits=\"" + c.inherits + "\"";
+ }
header += String(" version=\"") + VERSION_BRANCH + "\"";
header += ">";
_write_string(f, 0, header);
@@ -1080,7 +1060,9 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
_write_string(f, 1, "<tutorials>");
for (int i = 0; i < c.tutorials.size(); i++) {
- _write_string(f, 2, "<link>" + c.tutorials.get(i).xml_escape() + "</link>");
+ TutorialDoc tutorial = c.tutorials.get(i);
+ String title_attribute = (!tutorial.title.empty()) ? " title=\"" + tutorial.title.xml_escape() + "\"" : "";
+ _write_string(f, 2, "<link" + title_attribute + ">" + tutorial.link.xml_escape() + "</link>");
}
_write_string(f, 1, "</tutorials>");
@@ -1089,17 +1071,16 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
c.methods.sort();
for (int i = 0; i < c.methods.size(); i++) {
-
const MethodDoc &m = c.methods[i];
String qualifiers;
- if (m.qualifiers != "")
+ if (m.qualifiers != "") {
qualifiers += " qualifiers=\"" + m.qualifiers.xml_escape() + "\"";
+ }
_write_string(f, 2, "<method name=\"" + m.name + "\"" + qualifiers + ">");
if (m.return_type != "") {
-
String enum_text;
if (m.return_enum != String()) {
enum_text = " enum=\"" + m.return_enum + "\"";
@@ -1109,7 +1090,6 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
}
for (int j = 0; j < m.arguments.size(); j++) {
-
const ArgumentDoc &a = m.arguments[j];
String enum_text;
@@ -1117,10 +1097,11 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
enum_text = " enum=\"" + a.enumeration + "\"";
}
- if (a.default_value != "")
+ if (a.default_value != "") {
_write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " default=\"" + a.default_value.xml_escape(true) + "\">");
- else
+ } else {
_write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + ">");
+ }
_write_string(f, 3, "</argument>");
}
@@ -1140,7 +1121,6 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
c.properties.sort();
for (int i = 0; i < c.properties.size(); i++) {
-
String additional_attributes;
if (c.properties[i].enumeration != String()) {
additional_attributes += " enum=\"" + c.properties[i].enumeration + "\"";
@@ -1163,16 +1143,13 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
}
if (c.signals.size()) {
-
c.signals.sort();
_write_string(f, 1, "<signals>");
for (int i = 0; i < c.signals.size(); i++) {
-
const MethodDoc &m = c.signals[i];
_write_string(f, 2, "<signal name=\"" + m.name + "\">");
for (int j = 0; j < m.arguments.size(); j++) {
-
const ArgumentDoc &a = m.arguments[j];
_write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\">");
_write_string(f, 3, "</argument>");
@@ -1191,7 +1168,6 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
_write_string(f, 1, "<constants>");
for (int i = 0; i < c.constants.size(); i++) {
-
const ConstantDoc &k = c.constants[i];
if (k.enumeration != String()) {
_write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\" enum=\"" + k.enumeration + "\">");
@@ -1205,18 +1181,17 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
_write_string(f, 1, "</constants>");
if (c.theme_properties.size()) {
-
c.theme_properties.sort();
_write_string(f, 1, "<theme_items>");
for (int i = 0; i < c.theme_properties.size(); i++) {
-
const PropertyDoc &p = c.theme_properties[i];
- if (p.default_value != "")
+ if (p.default_value != "") {
_write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\" default=\"" + p.default_value.xml_escape(true) + "\">");
- else
+ } else {
_write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\">");
+ }
_write_string(f, 3, p.description.strip_edges().xml_escape());
@@ -1232,7 +1207,6 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
}
Error DocData::load_compressed(const uint8_t *p_data, int p_compressed_size, int p_uncompressed_size) {
-
Vector<uint8_t> data;
data.resize(p_uncompressed_size);
Compression::decompress(data.ptrw(), p_uncompressed_size, p_data, p_compressed_size, Compression::MODE_DEFLATE);
@@ -1240,8 +1214,9 @@ Error DocData::load_compressed(const uint8_t *p_data, int p_compressed_size, int
Ref<XMLParser> parser = memnew(XMLParser);
Error err = parser->open_buffer(data);
- if (err)
+ if (err) {
return err;
+ }
_load(parser);
diff --git a/editor/doc_data.h b/editor/doc_data.h
index 073705f0b1..1880be81ed 100644
--- a/editor/doc_data.h
+++ b/editor/doc_data.h
@@ -38,64 +38,70 @@
class DocData {
public:
struct ArgumentDoc {
-
String name;
String type;
String enumeration;
String default_value;
+ bool operator<(const ArgumentDoc &p_arg) const {
+ return name < p_arg.name;
+ }
};
struct MethodDoc {
-
String name;
String return_type;
String return_enum;
String qualifiers;
String description;
Vector<ArgumentDoc> arguments;
- bool operator<(const MethodDoc &p_md) const {
- return name < p_md.name;
+ bool operator<(const MethodDoc &p_method) const {
+ return name < p_method.name;
}
};
struct ConstantDoc {
-
String name;
String value;
String enumeration;
String description;
+ bool operator<(const ConstantDoc &p_const) const {
+ return name < p_const.name;
+ }
};
struct PropertyDoc {
-
String name;
String type;
String enumeration;
String description;
String setter, getter;
String default_value;
- bool overridden;
+ bool overridden = false;
bool operator<(const PropertyDoc &p_prop) const {
return name < p_prop.name;
}
- PropertyDoc() {
- overridden = false;
- }
};
- struct ClassDoc {
+ struct TutorialDoc {
+ String link;
+ String title;
+ };
+ struct ClassDoc {
String name;
String inherits;
String category;
String brief_description;
String description;
- Vector<String> tutorials;
+ Vector<TutorialDoc> tutorials;
Vector<MethodDoc> methods;
Vector<MethodDoc> signals;
Vector<ConstantDoc> constants;
Vector<PropertyDoc> properties;
Vector<PropertyDoc> theme_properties;
+ bool operator<(const ClassDoc &p_class) const {
+ return name < p_class.name;
+ }
};
String version;
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index b0bcc2b448..d99726c57c 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -38,7 +38,6 @@
#include "core/version_hash.gen.h"
void EditorAbout::_theme_changed() {
-
Control *base = EditorNode::get_singleton()->get_gui_base();
Ref<Font> font = base->get_theme_font("source", "EditorFonts");
_tpl_text->add_theme_font_override("normal_font", font);
@@ -49,9 +48,7 @@ void EditorAbout::_theme_changed() {
}
void EditorAbout::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_ENTER_TREE: {
_theme_changed();
} break;
@@ -59,7 +56,6 @@ void EditorAbout::_notification(int p_what) {
}
void EditorAbout::_license_tree_selected() {
-
TreeItem *selected = _tpl_tree->get_selected();
_tpl_text->scroll_to_line(0);
_tpl_text->set_text(selected->get_metadata(0));
@@ -69,12 +65,10 @@ void EditorAbout::_bind_methods() {
}
TextureRect *EditorAbout::get_logo() const {
-
return _logo;
}
ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<String> &p_sections, const char *const *const p_src[], const int p_flag_single_column) {
-
ScrollContainer *sc = memnew(ScrollContainer);
sc->set_name(p_name);
sc->set_v_size_flags(Control::SIZE_EXPAND);
@@ -84,11 +78,9 @@ ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<St
sc->add_child(vbc);
for (int i = 0; i < p_sections.size(); i++) {
-
bool single_column = p_flag_single_column & 1 << i;
const char *const *names_ptr = p_src[i];
if (*names_ptr) {
-
Label *lbl = memnew(Label);
lbl->set_text(p_sections[i]);
vbc->add_child(lbl);
@@ -115,7 +107,6 @@ ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<St
}
EditorAbout::EditorAbout() {
-
set_title(TTR("Thanks from the Godot community!"));
set_hide_on_ok(true);
@@ -132,8 +123,9 @@ EditorAbout::EditorAbout() {
hbc->add_child(_logo);
String hash = String(VERSION_HASH);
- if (hash.length() != 0)
+ if (hash.length() != 0) {
hash = "." + hash.left(9);
+ }
Label *about_text = memnew(Label);
about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
@@ -213,7 +205,6 @@ EditorAbout::EditorAbout() {
tpl_ti_lc->set_selectable(0, false);
String long_text = "";
for (int component_index = 0; component_index < COPYRIGHT_INFO_COUNT; component_index++) {
-
const ComponentCopyright &component = COPYRIGHT_INFO[component_index];
TreeItem *ti = _tpl_tree->create_item(tpl_ti_tp);
String component_name = component.name;
@@ -239,7 +230,6 @@ EditorAbout::EditorAbout() {
ti->set_metadata(0, text);
}
for (int i = 0; i < LICENSE_COUNT; i++) {
-
TreeItem *ti = _tpl_tree->create_item(tpl_ti_lc);
String licensename = String(LICENSE_NAMES[i]);
ti->set_text(0, licensename);
diff --git a/editor/editor_about.h b/editor/editor_about.h
index 83e9e9f490..ae4d9c73bf 100644
--- a/editor/editor_about.h
+++ b/editor/editor_about.h
@@ -45,7 +45,6 @@
#include "editor_scale.h"
class EditorAbout : public AcceptDialog {
-
GDCLASS(EditorAbout, AcceptDialog);
private:
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 74c4102003..b43ee0e245 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -37,7 +37,6 @@
#include "progress_dialog.h"
void EditorAssetInstaller::_update_subitems(TreeItem *p_item, bool p_check, bool p_first) {
-
if (p_check) {
if (p_item->get_custom_color(0) == Color()) {
p_item->set_checked(0, true);
@@ -56,13 +55,14 @@ void EditorAssetInstaller::_update_subitems(TreeItem *p_item, bool p_check, bool
}
void EditorAssetInstaller::_item_edited() {
-
- if (updating)
+ if (updating) {
return;
+ }
TreeItem *item = tree->get_edited();
- if (!item)
+ if (!item) {
return;
+ }
String path = item->get_metadata(0);
@@ -81,7 +81,6 @@ void EditorAssetInstaller::_item_edited() {
}
void EditorAssetInstaller::open(const String &p_path, int p_depth) {
-
package_path = p_path;
Set<String> files_sorted;
@@ -90,7 +89,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
unzFile pkg = unzOpen2(p_path.utf8().get_data(), &io);
if (!pkg) {
-
error->set_text(TTR("Error opening package file, not in ZIP format."));
return;
}
@@ -98,7 +96,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
int ret = unzGoToFirstFile(pkg);
while (ret == UNZ_OK) {
-
//get filename
unz_file_info info;
char fname[16384];
@@ -137,7 +134,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
Map<String, TreeItem *> dir_map;
for (Set<String>::Element *E = files_sorted.front(); E; E = E->next()) {
-
String path = E->get();
int depth = p_depth;
bool skip = false;
@@ -151,8 +147,9 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
depth--;
}
- if (skip || path == String())
+ if (skip || path == String()) {
continue;
+ }
bool isdir = false;
@@ -211,13 +208,11 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
}
void EditorAssetInstaller::ok_pressed() {
-
FileAccess *src_f = nullptr;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
unzFile pkg = unzOpen2(package_path.utf8().get_data(), &io);
if (!pkg) {
-
error->set_text(TTR("Error opening package file, not in ZIP format."));
return;
}
@@ -230,7 +225,6 @@ void EditorAssetInstaller::ok_pressed() {
int idx = 0;
while (ret == UNZ_OK) {
-
//get filename
unz_file_info info;
char fname[16384];
@@ -239,7 +233,6 @@ void EditorAssetInstaller::ok_pressed() {
String name = fname;
if (status_map.has(name) && status_map[name]->is_checked(0)) {
-
String path = status_map[name]->get_metadata(0);
if (path == String()) { // a dir
@@ -259,7 +252,6 @@ void EditorAssetInstaller::ok_pressed() {
memdelete(da);
} else {
-
Vector<uint8_t> data;
data.resize(info.uncompressed_size);
@@ -290,18 +282,19 @@ void EditorAssetInstaller::ok_pressed() {
if (failed_files.size()) {
String msg = TTR("The following files failed extraction from package:") + "\n\n";
for (int i = 0; i < failed_files.size(); i++) {
-
if (i > 15) {
msg += "\n" + vformat(TTR("And %s more files."), itos(failed_files.size() - i));
break;
}
msg += failed_files[i];
}
- if (EditorNode::get_singleton() != nullptr)
+ if (EditorNode::get_singleton() != nullptr) {
EditorNode::get_singleton()->show_warning(msg);
+ }
} else {
- if (EditorNode::get_singleton() != nullptr)
+ if (EditorNode::get_singleton() != nullptr) {
EditorNode::get_singleton()->show_warning(TTR("Package installed successfully!"), TTR("Success!"));
+ }
}
EditorFileSystem::get_singleton()->scan_changes();
}
@@ -310,7 +303,6 @@ void EditorAssetInstaller::_bind_methods() {
}
EditorAssetInstaller::EditorAssetInstaller() {
-
VBoxContainer *vb = memnew(VBoxContainer);
add_child(vb);
diff --git a/editor/editor_asset_installer.h b/editor/editor_asset_installer.h
index 840e780264..7f3d00994f 100644
--- a/editor/editor_asset_installer.h
+++ b/editor/editor_asset_installer.h
@@ -34,7 +34,6 @@
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
class EditorAssetInstaller : public ConfirmationDialog {
-
GDCLASS(EditorAssetInstaller, ConfirmationDialog);
Tree *tree;
diff --git a/editor/editor_atlas_packer.cpp b/editor/editor_atlas_packer.cpp
index d17b3bba4f..68abeb2cda 100644
--- a/editor/editor_atlas_packer.cpp
+++ b/editor/editor_atlas_packer.cpp
@@ -31,14 +31,12 @@
#include "editor_atlas_packer.h"
void EditorAtlasPacker::_plot_triangle(Ref<BitMap> p_bitmap, Vector2i *vertices) {
-
int width = p_bitmap->get_size().width;
int height = p_bitmap->get_size().height;
int x[3];
int y[3];
for (int j = 0; j < 3; j++) {
-
x[j] = vertices[j].x;
y[j] = vertices[j].y;
}
@@ -71,26 +69,25 @@ void EditorAtlasPacker::_plot_triangle(Ref<BitMap> p_bitmap, Vector2i *vertices)
}
for (int xi = (xf < width ? int(xf) : width - 1); xi >= (xt > 0 ? xt : 0); xi--) {
-
p_bitmap->set_bit(Point2(xi, yi), true);
}
}
xf += dx_far;
- if (yi < y[1])
+ if (yi < y[1]) {
xt += dx_upper;
- else
+ } else {
xt += dx_low;
+ }
}
}
-void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_height, int p_atlas_max_size, int p_cell_resolution) {
+void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_height, int p_atlas_max_size, int p_cell_resolution) {
int divide_by = MIN(64, p_cell_resolution);
Vector<PlottedBitmap> bitmaps;
int max_w = 0;
for (int i = 0; i < charts.size(); i++) {
-
const Chart &chart = charts[i];
//generate aabb
@@ -100,7 +97,6 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
const Vector2 *vertices = chart.vertices.ptr();
for (int j = 0; j < vertex_count; j++) {
-
if (j == 0) {
aabb.position = vertices[j];
} else {
@@ -118,7 +114,6 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
//plot triangles, using divisor
for (int j = 0; j < chart.faces.size(); j++) {
-
Vector2i v[3];
for (int k = 0; k < 3; k++) {
Vector2 vtx = chart.vertices[chart.faces[j].vertex[k]];
@@ -163,13 +158,14 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
bool found_pixel = false;
for (int lx = x - 1; lx < x + 2 && !found_pixel; lx++) {
for (int ly = y - 1; ly < y + 2 && !found_pixel; ly++) {
-
int px = lx - 1;
- if (px < 0 || px >= w)
+ if (px < 0 || px >= w) {
continue;
+ }
int py = ly - 1;
- if (py < 0 || py >= h)
+ if (py < 0 || py >= h) {
continue;
+ }
if (src_bitmap->get_bit(Vector2(px, py))) {
found_pixel = true;
@@ -177,7 +173,6 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
}
}
if (found_pixel) {
-
if (transpose) {
if (x > top_heights[y]) {
top_heights.write[y] = x;
@@ -231,7 +226,6 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
int *atlas_ptr = heights.ptrw();
for (int i = 0; i < bitmaps.size(); i++) {
-
int best_height = 0x7FFFFFFF;
int best_height_offset = -1;
int w = bitmaps[i].top_heights.size();
@@ -240,11 +234,9 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
const int *bottom_heights = bitmaps[i].bottom_heights.ptr();
for (int j = 0; j < atlas_w - w; j++) {
-
int height = 0;
for (int k = 0; k < w; k++) {
-
int pixmap_h = bottom_heights[k];
if (pixmap_h == -1) {
continue; //no pixel here, anything is fine
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index c80ae5f21b..5cf5201b18 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -40,10 +40,8 @@
#include "servers/audio_server.h"
void EditorAudioBus::_update_visible_channels() {
-
int i = 0;
for (; i < cc; i++) {
-
if (!channel[i].vu_l->is_visible()) {
channel[i].vu_l->show();
}
@@ -53,7 +51,6 @@ void EditorAudioBus::_update_visible_channels() {
}
for (; i < CHANNELS_MAX; i++) {
-
if (channel[i].vu_l->is_visible()) {
channel[i].vu_l->hide();
}
@@ -64,10 +61,8 @@ void EditorAudioBus::_update_visible_channels() {
}
void EditorAudioBus::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_READY: {
-
for (int i = 0; i < CHANNELS_MAX; i++) {
channel[i].vu_l->set_under_texture(get_theme_icon("BusVuEmpty", "EditorIcons"));
channel[i].vu_l->set_progress_texture(get_theme_icon("BusVuFull", "EditorIcons"));
@@ -95,7 +90,6 @@ void EditorAudioBus::_notification(int p_what) {
set_process(true);
} break;
case NOTIFICATION_DRAW: {
-
if (is_master) {
draw_style_box(get_theme_stylebox("disabled", "Button"), Rect2(Vector2(), get_size()));
} else if (has_focus()) {
@@ -111,7 +105,6 @@ void EditorAudioBus::_notification(int p_what) {
}
} break;
case NOTIFICATION_PROCESS: {
-
if (cc != AudioServer::get_singleton()->get_bus_channels(get_index())) {
cc = AudioServer::get_singleton()->get_bus_channels(get_index());
_update_visible_channels();
@@ -156,7 +149,6 @@ void EditorAudioBus::_notification(int p_what) {
}
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
-
for (int i = 0; i < CHANNELS_MAX; i++) {
channel[i].peak_l = -100;
channel[i].peak_r = -100;
@@ -166,7 +158,6 @@ void EditorAudioBus::_notification(int p_what) {
set_process(is_visible_in_tree());
} break;
case NOTIFICATION_THEME_CHANGED: {
-
for (int i = 0; i < CHANNELS_MAX; i++) {
channel[i].vu_l->set_under_texture(get_theme_icon("BusVuEmpty", "EditorIcons"));
channel[i].vu_l->set_progress_texture(get_theme_icon("BusVuFull", "EditorIcons"));
@@ -185,7 +176,6 @@ void EditorAudioBus::_notification(int p_what) {
} break;
case NOTIFICATION_MOUSE_EXIT:
case NOTIFICATION_DRAG_END: {
-
if (hovering_drop) {
hovering_drop = false;
update();
@@ -195,7 +185,6 @@ void EditorAudioBus::_notification(int p_what) {
}
void EditorAudioBus::update_send() {
-
send->clear();
if (is_master) {
send->set_disabled(true);
@@ -218,9 +207,9 @@ void EditorAudioBus::update_send() {
}
void EditorAudioBus::update_bus() {
-
- if (updating_bus)
+ if (updating_bus) {
return;
+ }
updating_bus = true;
@@ -229,8 +218,9 @@ void EditorAudioBus::update_bus() {
float db_value = AudioServer::get_singleton()->get_bus_volume_db(index);
slider->set_value(_scaled_db_to_normalized_volume(db_value));
track_name->set_text(AudioServer::get_singleton()->get_bus_name(index));
- if (is_master)
+ if (is_master) {
track_name->set_editable(false);
+ }
solo->set_pressed(AudioServer::get_singleton()->is_bus_solo(index));
mute->set_pressed(AudioServer::get_singleton()->is_bus_mute(index));
@@ -240,7 +230,6 @@ void EditorAudioBus::update_bus() {
TreeItem *root = effects->create_item();
for (int i = 0; i < AudioServer::get_singleton()->get_bus_effect_count(index); i++) {
-
Ref<AudioEffect> afx = AudioServer::get_singleton()->get_bus_effect(index, i);
TreeItem *fx = effects->create_item(root);
@@ -263,18 +252,16 @@ void EditorAudioBus::update_bus() {
}
void EditorAudioBus::_name_changed(const String &p_new_name) {
-
- if (p_new_name == AudioServer::get_singleton()->get_bus_name(get_index()))
+ if (p_new_name == AudioServer::get_singleton()->get_bus_name(get_index())) {
return;
+ }
String attempt = p_new_name;
int attempts = 1;
while (true) {
-
bool name_free = true;
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
-
if (AudioServer::get_singleton()->get_bus_name(i) == attempt) {
name_free = false;
break;
@@ -317,9 +304,9 @@ void EditorAudioBus::_name_changed(const String &p_new_name) {
}
void EditorAudioBus::_volume_changed(float p_normalized) {
-
- if (updating_bus)
+ if (updating_bus) {
return;
+ }
updating_bus = true;
@@ -384,7 +371,6 @@ float EditorAudioBus::_scaled_db_to_normalized_volume(float db) {
}
void EditorAudioBus::_show_value(float slider_value) {
-
float db;
if (Input::get_singleton()->is_key_pressed(KEY_CONTROL)) {
// Display the correct (snapped) value when holding Ctrl
@@ -415,7 +401,6 @@ void EditorAudioBus::_hide_value_preview() {
}
void EditorAudioBus::_solo_toggled() {
-
updating_bus = true;
UndoRedo *ur = EditorNode::get_undo_redo();
@@ -428,8 +413,8 @@ void EditorAudioBus::_solo_toggled() {
updating_bus = false;
}
-void EditorAudioBus::_mute_toggled() {
+void EditorAudioBus::_mute_toggled() {
updating_bus = true;
UndoRedo *ur = EditorNode::get_undo_redo();
@@ -442,8 +427,8 @@ void EditorAudioBus::_mute_toggled() {
updating_bus = false;
}
-void EditorAudioBus::_bypass_toggled() {
+void EditorAudioBus::_bypass_toggled() {
updating_bus = true;
UndoRedo *ur = EditorNode::get_undo_redo();
@@ -458,7 +443,6 @@ void EditorAudioBus::_bypass_toggled() {
}
void EditorAudioBus::_send_selected(int p_which) {
-
updating_bus = true;
UndoRedo *ur = EditorNode::get_undo_redo();
@@ -473,14 +457,13 @@ void EditorAudioBus::_send_selected(int p_which) {
}
void EditorAudioBus::_effect_selected() {
-
TreeItem *effect = effects->get_selected();
- if (!effect)
+ if (!effect) {
return;
+ }
updating_bus = true;
if (effect->get_metadata(0) != Variant()) {
-
int index = effect->get_metadata(0);
Ref<AudioEffect> effect2 = AudioServer::get_singleton()->get_bus_effect(get_index(), index);
if (effect2.is_valid()) {
@@ -492,13 +475,14 @@ void EditorAudioBus::_effect_selected() {
}
void EditorAudioBus::_effect_edited() {
-
- if (updating_bus)
+ if (updating_bus) {
return;
+ }
TreeItem *effect = effects->get_edited();
- if (!effect)
+ if (!effect) {
return;
+ }
if (effect->get_metadata(0) == Variant()) {
Rect2 area = effects->get_item_rect(effect);
@@ -523,9 +507,9 @@ void EditorAudioBus::_effect_edited() {
}
void EditorAudioBus::_effect_add(int p_which) {
-
- if (updating_bus)
+ if (updating_bus) {
return;
+ }
StringName name = effect_options->get_item_metadata(p_which);
@@ -547,7 +531,6 @@ void EditorAudioBus::_effect_add(int p_which) {
}
void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) {
accept_event();
@@ -556,15 +539,24 @@ void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->get_button_index() == 2 && mb->is_pressed()) {
-
Vector2 pos = Vector2(mb->get_position().x, mb->get_position().y);
bus_popup->set_position(get_global_position() + pos);
bus_popup->popup();
}
}
-void EditorAudioBus::_bus_popup_pressed(int p_option) {
+void EditorAudioBus::_unhandled_key_input(Ref<InputEvent> p_event) {
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == KEY_DELETE) {
+ TreeItem *current_effect = effects->get_selected();
+ if (current_effect && current_effect->get_metadata(0).get_type() == Variant::INT) {
+ _delete_effect_pressed(0);
+ accept_event();
+ }
+ }
+}
+void EditorAudioBus::_bus_popup_pressed(int p_option) {
if (p_option == 2) {
// Reset volume
emit_signal("vol_reset_request");
@@ -577,7 +569,6 @@ void EditorAudioBus::_bus_popup_pressed(int p_option) {
}
Variant EditorAudioBus::get_drag_data(const Point2 &p_point) {
-
if (get_index() == 0) {
return Variant();
}
@@ -602,7 +593,6 @@ Variant EditorAudioBus::get_drag_data(const Point2 &p_point) {
}
bool EditorAudioBus::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
-
if (get_index() == 0) {
return false;
}
@@ -617,13 +607,11 @@ bool EditorAudioBus::can_drop_data(const Point2 &p_point, const Variant &p_data)
}
void EditorAudioBus::drop_data(const Point2 &p_point, const Variant &p_data) {
-
Dictionary d = p_data;
emit_signal("dropped", d["index"], get_index());
}
Variant EditorAudioBus::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
TreeItem *item = effects->get_item_at_position(p_point);
if (!item) {
return Variant();
@@ -647,14 +635,15 @@ Variant EditorAudioBus::get_drag_data_fw(const Point2 &p_point, Control *p_from)
}
bool EditorAudioBus::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
- if (!d.has("type") || String(d["type"]) != "audio_bus_effect")
+ if (!d.has("type") || String(d["type"]) != "audio_bus_effect") {
return false;
+ }
TreeItem *item = effects->get_item_at_position(p_point);
- if (!item)
+ if (!item) {
return false;
+ }
effects->set_drop_mode_flags(Tree::DROP_MODE_INBETWEEN);
@@ -662,12 +651,12 @@ bool EditorAudioBus::can_drop_data_fw(const Point2 &p_point, const Variant &p_da
}
void EditorAudioBus::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
Dictionary d = p_data;
TreeItem *item = effects->get_item_at_position(p_point);
- if (!item)
+ if (!item) {
return;
+ }
int pos = effects->get_drop_section_at_position(p_point);
Variant md = item->get_metadata(0);
@@ -677,8 +666,9 @@ void EditorAudioBus::drop_data_fw(const Point2 &p_point, const Variant &p_data,
if (md.get_type() == Variant::INT) {
paste_at = md;
- if (pos > 0)
+ if (pos > 0) {
paste_at++;
+ }
if (bus == get_index() && paste_at > effect) {
paste_at--;
@@ -720,13 +710,14 @@ void EditorAudioBus::drop_data_fw(const Point2 &p_point, const Variant &p_data,
}
void EditorAudioBus::_delete_effect_pressed(int p_option) {
-
TreeItem *item = effects->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
- if (item->get_metadata(0).get_type() != Variant::INT)
+ if (item->get_metadata(0).get_type() != Variant::INT) {
return;
+ }
int index = item->get_metadata(0);
@@ -741,23 +732,24 @@ void EditorAudioBus::_delete_effect_pressed(int p_option) {
}
void EditorAudioBus::_effect_rmb(const Vector2 &p_pos) {
-
TreeItem *item = effects->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
- if (item->get_metadata(0).get_type() != Variant::INT)
+ if (item->get_metadata(0).get_type() != Variant::INT) {
return;
+ }
delete_effect_popup->set_position(get_global_mouse_position());
delete_effect_popup->popup();
}
void EditorAudioBus::_bind_methods() {
-
ClassDB::bind_method("update_bus", &EditorAudioBus::update_bus);
ClassDB::bind_method("update_send", &EditorAudioBus::update_send);
ClassDB::bind_method("_gui_input", &EditorAudioBus::_gui_input);
+ ClassDB::bind_method("_unhandled_key_input", &EditorAudioBus::_unhandled_key_input);
ClassDB::bind_method("get_drag_data_fw", &EditorAudioBus::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &EditorAudioBus::can_drop_data_fw);
ClassDB::bind_method("drop_data_fw", &EditorAudioBus::drop_data_fw);
@@ -770,7 +762,6 @@ void EditorAudioBus::_bind_methods() {
}
EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
-
buses = p_buses;
updating_bus = false;
is_master = p_is_master;
@@ -782,6 +773,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
add_child(vb);
set_v_size_flags(SIZE_EXPAND_FILL);
+ set_process_unhandled_key_input(true);
track_name = memnew(LineEdit);
track_name->connect("text_entered", callable_mp(this, &EditorAudioBus::_name_changed));
@@ -926,8 +918,9 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
ClassDB::get_inheriters_from_class("AudioEffect", &effects);
effects.sort_custom<StringName::AlphCompare>();
for (List<StringName>::Element *E = effects.front(); E; E = E->next()) {
- if (!ClassDB::can_instance(E->get()))
+ if (!ClassDB::can_instance(E->get())) {
continue;
+ }
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(E->get());
String name = E->get().operator String().replace("AudioEffect", "");
@@ -950,7 +943,6 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
}
void EditorAudioBusDrop::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_DRAW: {
draw_style_box(get_theme_stylebox("normal", "Button"), Rect2(Vector2(), get_size()));
@@ -962,7 +954,6 @@ void EditorAudioBusDrop::_notification(int p_what) {
}
} break;
case NOTIFICATION_MOUSE_ENTER: {
-
if (!hovering_drop) {
hovering_drop = true;
update();
@@ -970,7 +961,6 @@ void EditorAudioBusDrop::_notification(int p_what) {
} break;
case NOTIFICATION_MOUSE_EXIT:
case NOTIFICATION_DRAG_END: {
-
if (hovering_drop) {
hovering_drop = false;
update();
@@ -980,29 +970,24 @@ void EditorAudioBusDrop::_notification(int p_what) {
}
bool EditorAudioBusDrop::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
-
Dictionary d = p_data;
return (d.has("type") && String(d["type"]) == "move_audio_bus");
}
void EditorAudioBusDrop::drop_data(const Point2 &p_point, const Variant &p_data) {
-
Dictionary d = p_data;
emit_signal("dropped", d["index"], AudioServer::get_singleton()->get_bus_count());
}
void EditorAudioBusDrop::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("dropped"));
}
EditorAudioBusDrop::EditorAudioBusDrop() {
-
hovering_drop = false;
}
void EditorAudioBuses::_update_buses() {
-
while (bus_hb->get_child_count() > 0) {
memdelete(bus_hb->get_child(0));
}
@@ -1010,7 +995,6 @@ void EditorAudioBuses::_update_buses() {
drop_end = nullptr;
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
-
bool is_master = (i == 0);
EditorAudioBus *audio_bus = memnew(EditorAudioBus(this, is_master));
bus_hb->add_child(audio_bus);
@@ -1023,33 +1007,27 @@ void EditorAudioBuses::_update_buses() {
}
EditorAudioBuses *EditorAudioBuses::register_editor() {
-
EditorAudioBuses *audio_buses = memnew(EditorAudioBuses);
EditorNode::get_singleton()->add_bottom_panel_item(TTR("Audio"), audio_buses);
return audio_buses;
}
void EditorAudioBuses::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
-
bus_scroll->add_theme_style_override("bg", get_theme_stylebox("bg", "Tree"));
} break;
case NOTIFICATION_READY: {
-
_update_buses();
} break;
case NOTIFICATION_DRAG_END: {
-
if (drop_end) {
drop_end->queue_delete();
drop_end = nullptr;
}
} break;
case NOTIFICATION_PROCESS: {
-
// Check if anything was edited.
bool edited = AudioServer::get_singleton()->is_edited();
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
@@ -1072,7 +1050,6 @@ void EditorAudioBuses::_notification(int p_what) {
}
void EditorAudioBuses::_add_bus() {
-
UndoRedo *ur = EditorNode::get_undo_redo();
ur->create_action(TTR("Add Audio Bus"));
@@ -1084,22 +1061,20 @@ void EditorAudioBuses::_add_bus() {
}
void EditorAudioBuses::_update_bus(int p_index) {
-
- if (p_index >= bus_hb->get_child_count())
+ if (p_index >= bus_hb->get_child_count()) {
return;
+ }
bus_hb->get_child(p_index)->call("update_bus");
}
void EditorAudioBuses::_update_sends() {
-
for (int i = 0; i < bus_hb->get_child_count(); i++) {
bus_hb->get_child(i)->call("update_send");
}
}
void EditorAudioBuses::_delete_bus(Object *p_which) {
-
EditorAudioBus *bus = Object::cast_to<EditorAudioBus>(p_which);
int index = bus->get_index();
if (index == 0) {
@@ -1119,7 +1094,6 @@ void EditorAudioBuses::_delete_bus(Object *p_which) {
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_mute", index, AudioServer::get_singleton()->is_bus_mute(index));
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_bypass_effects", index, AudioServer::get_singleton()->is_bus_bypassing_effects(index));
for (int i = 0; i < AudioServer::get_singleton()->get_bus_effect_count(index); i++) {
-
ur->add_undo_method(AudioServer::get_singleton(), "add_bus_effect", index, AudioServer::get_singleton()->get_bus_effect(index, i));
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_effect_enabled", index, i, AudioServer::get_singleton()->is_bus_effect_enabled(index, i));
}
@@ -1129,7 +1103,6 @@ void EditorAudioBuses::_delete_bus(Object *p_which) {
}
void EditorAudioBuses::_duplicate_bus(int p_which) {
-
int add_at_pos = p_which + 1;
UndoRedo *ur = EditorNode::get_undo_redo();
ur->create_action(TTR("Duplicate Audio Bus"));
@@ -1141,7 +1114,6 @@ void EditorAudioBuses::_duplicate_bus(int p_which) {
ur->add_do_method(AudioServer::get_singleton(), "set_bus_mute", add_at_pos, AudioServer::get_singleton()->is_bus_mute(p_which));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_bypass_effects", add_at_pos, AudioServer::get_singleton()->is_bus_bypassing_effects(p_which));
for (int i = 0; i < AudioServer::get_singleton()->get_bus_effect_count(p_which); i++) {
-
ur->add_do_method(AudioServer::get_singleton(), "add_bus_effect", add_at_pos, AudioServer::get_singleton()->get_bus_effect(p_which, i));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_effect_enabled", add_at_pos, i, AudioServer::get_singleton()->is_bus_effect_enabled(p_which, i));
}
@@ -1152,7 +1124,6 @@ void EditorAudioBuses::_duplicate_bus(int p_which) {
}
void EditorAudioBuses::_reset_bus_volume(Object *p_which) {
-
EditorAudioBus *bus = Object::cast_to<EditorAudioBus>(p_which);
int index = bus->get_index();
@@ -1166,7 +1137,6 @@ void EditorAudioBuses::_reset_bus_volume(Object *p_which) {
}
void EditorAudioBuses::_request_drop_end() {
-
if (!drop_end && bus_hb->get_child_count()) {
drop_end = memnew(EditorAudioBusDrop);
@@ -1177,7 +1147,6 @@ void EditorAudioBuses::_request_drop_end() {
}
void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) {
-
UndoRedo *ur = EditorNode::get_undo_redo();
ur->create_action(TTR("Move Audio Bus"));
@@ -1192,18 +1161,15 @@ void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) {
}
void EditorAudioBuses::_server_save() {
-
Ref<AudioBusLayout> state = AudioServer::get_singleton()->generate_bus_layout();
ResourceSaver::save(edited_path, state);
}
void EditorAudioBuses::_select_layout() {
-
EditorNode::get_singleton()->get_filesystem_dock()->select_file(edited_path);
}
void EditorAudioBuses::_save_as_layout() {
-
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
file_dialog->set_title(TTR("Save Audio Bus Layout As..."));
file_dialog->set_current_path(edited_path);
@@ -1212,7 +1178,6 @@ void EditorAudioBuses::_save_as_layout() {
}
void EditorAudioBuses::_new_layout() {
-
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
file_dialog->set_title(TTR("Location for New Layout..."));
file_dialog->set_current_path(edited_path);
@@ -1221,7 +1186,6 @@ void EditorAudioBuses::_new_layout() {
}
void EditorAudioBuses::_load_layout() {
-
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
file_dialog->set_title(TTR("Open Audio Bus Layout"));
file_dialog->set_current_path(edited_path);
@@ -1230,7 +1194,6 @@ void EditorAudioBuses::_load_layout() {
}
void EditorAudioBuses::_load_default_layout() {
-
String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout");
Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", true);
@@ -1248,7 +1211,6 @@ void EditorAudioBuses::_load_default_layout() {
}
void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
-
if (file_dialog->get_file_mode() == EditorFileDialog::FILE_MODE_OPEN_FILE) {
Ref<AudioBusLayout> state = ResourceLoader::load(p_string, "", true);
if (state.is_null()) {
@@ -1264,7 +1226,6 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
call_deferred("_select_layout");
} else if (file_dialog->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) {
-
if (new_layout) {
Ref<AudioBusLayout> empty_state;
empty_state.instance();
@@ -1287,7 +1248,6 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
}
void EditorAudioBuses::_bind_methods() {
-
ClassDB::bind_method("_update_buses", &EditorAudioBuses::_update_buses);
ClassDB::bind_method("_update_bus", &EditorAudioBuses::_update_bus);
ClassDB::bind_method("_update_sends", &EditorAudioBuses::_update_sends);
@@ -1295,7 +1255,6 @@ void EditorAudioBuses::_bind_methods() {
}
EditorAudioBuses::EditorAudioBuses() {
-
drop_end = nullptr;
top_hb = memnew(HBoxContainer);
add_child(top_hb);
@@ -1372,7 +1331,6 @@ EditorAudioBuses::EditorAudioBuses() {
}
void EditorAudioBuses::open_layout(const String &p_path) {
-
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
Ref<AudioBusLayout> state = ResourceLoader::load(p_path, "", true);
@@ -1390,9 +1348,7 @@ void EditorAudioBuses::open_layout(const String &p_path) {
}
void AudioBusesEditorPlugin::edit(Object *p_node) {
-
if (Object::cast_to<AudioBusLayout>(p_node)) {
-
String path = Object::cast_to<AudioBusLayout>(p_node)->get_path();
if (path.is_resource_file()) {
audio_bus_editor->open_layout(path);
@@ -1401,7 +1357,6 @@ void AudioBusesEditorPlugin::edit(Object *p_node) {
}
bool AudioBusesEditorPlugin::handles(Object *p_node) const {
-
return (Object::cast_to<AudioBusLayout>(p_node) != nullptr);
}
@@ -1409,7 +1364,6 @@ void AudioBusesEditorPlugin::make_visible(bool p_visible) {
}
AudioBusesEditorPlugin::AudioBusesEditorPlugin(EditorAudioBuses *p_node) {
-
audio_bus_editor = p_node;
}
@@ -1417,12 +1371,10 @@ AudioBusesEditorPlugin::~AudioBusesEditorPlugin() {
}
void EditorAudioMeterNotches::add_notch(float p_normalized_offset, float p_db_value, bool p_render_value) {
-
notches.push_back(AudioNotch(p_normalized_offset, p_db_value, p_render_value));
}
Size2 EditorAudioMeterNotches::get_minimum_size() const {
-
Ref<Font> font = get_theme_font("font", "Label");
float font_height = font->get_height();
@@ -1441,13 +1393,11 @@ Size2 EditorAudioMeterNotches::get_minimum_size() const {
}
void EditorAudioMeterNotches::_bind_methods() {
-
ClassDB::bind_method("add_notch", &EditorAudioMeterNotches::add_notch);
ClassDB::bind_method("_draw_audio_notches", &EditorAudioMeterNotches::_draw_audio_notches);
}
void EditorAudioMeterNotches::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
notch_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(0, 0, 0);
@@ -1459,7 +1409,6 @@ void EditorAudioMeterNotches::_notification(int p_what) {
}
void EditorAudioMeterNotches::_draw_audio_notches() {
-
Ref<Font> font = get_theme_font("font", "Label");
float font_height = font->get_height();
@@ -1480,11 +1429,6 @@ void EditorAudioMeterNotches::_draw_audio_notches() {
}
}
-EditorAudioMeterNotches::EditorAudioMeterNotches() :
- line_length(5.0f),
- label_space(2.0f),
- btm_padding(9.0f),
- top_padding(5.0f) {
-
+EditorAudioMeterNotches::EditorAudioMeterNotches() {
notch_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(0, 0, 0);
}
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index be1551629d..65caf84f0f 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -51,7 +51,6 @@
class EditorAudioBuses;
class EditorAudioBus : public PanelContainer {
-
GDCLASS(EditorAudioBus, PanelContainer);
Ref<Texture2D> disabled_vu;
@@ -93,6 +92,7 @@ class EditorAudioBus : public PanelContainer {
mutable bool hovering_drop;
void _gui_input(const Ref<InputEvent> &p_event);
+ void _unhandled_key_input(Ref<InputEvent> p_event);
void _bus_popup_pressed(int p_option);
void _name_changed(const String &p_new_name);
@@ -137,7 +137,6 @@ public:
};
class EditorAudioBusDrop : public Control {
-
GDCLASS(EditorAudioBusDrop, Control);
virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const;
@@ -154,7 +153,6 @@ public:
};
class EditorAudioBuses : public VBoxContainer {
-
GDCLASS(EditorAudioBuses, VBoxContainer);
HBoxContainer *top_hb;
@@ -246,10 +244,10 @@ private:
List<AudioNotch> notches;
public:
- float line_length;
- float label_space;
- float btm_padding;
- float top_padding;
+ float line_length = 5.0f;
+ float label_space = 2.0f;
+ float btm_padding = 9.0f;
+ float top_padding = 5.0f;
Color notch_color;
void add_notch(float p_normalized_offset, float p_db_value, bool p_render_value = false);
@@ -265,7 +263,6 @@ public:
};
class AudioBusesEditorPlugin : public EditorPlugin {
-
GDCLASS(AudioBusesEditorPlugin, EditorPlugin);
EditorAudioBuses *audio_bus_editor;
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 6917b2b775..da0ff9f18f 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -41,15 +41,12 @@
#define PREVIEW_LIST_MAX_SIZE 10
void EditorAutoloadSettings::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
List<String> afn;
ResourceLoader::get_recognized_extensions_for_type("Script", &afn);
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &afn);
for (List<String>::Element *E = afn.front(); E; E = E->next()) {
-
file_dialog->add_filter("*." + E->get());
}
@@ -66,25 +63,27 @@ void EditorAutoloadSettings::_notification(int p_what) {
}
bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, String *r_error) {
-
if (!p_name.is_valid_identifier()) {
- if (r_error)
+ if (r_error) {
*r_error = TTR("Invalid name.") + "\n" + TTR("Valid characters:") + " a-z, A-Z, 0-9 or _";
+ }
return false;
}
if (ClassDB::class_exists(p_name)) {
- if (r_error)
+ if (r_error) {
*r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing engine class name.");
+ }
return false;
}
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
if (Variant::get_type_name(Variant::Type(i)) == p_name) {
- if (r_error)
+ if (r_error) {
*r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing built-in type name.");
+ }
return false;
}
@@ -92,8 +91,9 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
for (int i = 0; i < GlobalConstants::get_global_constant_count(); i++) {
if (GlobalConstants::get_global_constant_name(i) == p_name) {
- if (r_error)
+ if (r_error) {
*r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing global constant name.");
+ }
return false;
}
@@ -104,8 +104,9 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
ScriptServer::get_language(i)->get_reserved_words(&keywords);
for (List<String>::Element *E = keywords.front(); E; E = E->next()) {
if (E->get() == p_name) {
- if (r_error)
+ if (r_error) {
*r_error = TTR("Invalid name.") + "\n" + TTR("Keyword cannot be used as an autoload name.");
+ }
return false;
}
@@ -116,28 +117,28 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
}
void EditorAutoloadSettings::_autoload_add() {
-
- if (autoload_add(autoload_add_name->get_text(), autoload_add_path->get_text()))
+ if (autoload_add(autoload_add_name->get_text(), autoload_add_path->get_text())) {
autoload_add_path->set_text("");
+ }
autoload_add_name->set_text("");
add_autoload->set_disabled(true);
}
void EditorAutoloadSettings::_autoload_selected() {
-
TreeItem *ti = tree->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
selected_autoload = "autoload/" + ti->get_text(0);
}
void EditorAutoloadSettings::_autoload_edited() {
-
- if (updating_autoload)
+ if (updating_autoload) {
return;
+ }
TreeItem *ti = tree->get_edited();
int column = tree->get_edited_column();
@@ -148,8 +149,9 @@ void EditorAutoloadSettings::_autoload_edited() {
String name = ti->get_text(0);
String old_name = selected_autoload.get_slice("/", 1);
- if (name == old_name)
+ if (name == old_name) {
return;
+ }
String error;
if (!_autoload_name_is_valid(name, &error)) {
@@ -199,12 +201,14 @@ void EditorAutoloadSettings::_autoload_edited() {
int order = ProjectSettings::get_singleton()->get_order(base);
String path = ProjectSettings::get_singleton()->get(base);
- if (path.begins_with("*"))
+ if (path.begins_with("*")) {
path = path.substr(1, path.length());
+ }
// Singleton autoloads are represented with a leading "*" in their path.
- if (checked)
+ if (checked) {
path = "*" + path;
+ }
undo_redo->create_action(TTR("Toggle AutoLoad Globals"));
@@ -227,7 +231,6 @@ void EditorAutoloadSettings::_autoload_edited() {
}
void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_column, int p_button) {
-
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
String name = "autoload/" + ti->get_text(0);
@@ -240,7 +243,6 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
} break;
case BUTTON_MOVE_UP:
case BUTTON_MOVE_DOWN: {
-
TreeItem *swap = nullptr;
if (p_button == BUTTON_MOVE_UP) {
@@ -249,8 +251,9 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
swap = ti->get_next();
}
- if (!swap)
+ if (!swap) {
return;
+ }
String swap_name = "autoload/" + swap->get_text(0);
@@ -274,7 +277,6 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
undo_redo->commit_action();
} break;
case BUTTON_DELETE: {
-
int order = ProjectSettings::get_singleton()->get_order(name);
undo_redo->create_action(TTR("Remove Autoload"));
@@ -298,8 +300,9 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
void EditorAutoloadSettings::_autoload_activated() {
TreeItem *ti = tree->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
_autoload_open(ti->get_text(1));
}
@@ -313,7 +316,6 @@ void EditorAutoloadSettings::_autoload_open(const String &fpath) {
}
void EditorAutoloadSettings::_autoload_file_callback(const String &p_path) {
-
// Convert the file name to PascalCase, which is the convention for classes in GDScript.
const String class_name = p_path.get_file().get_basename().capitalize().replace(" ", "");
@@ -326,20 +328,17 @@ void EditorAutoloadSettings::_autoload_file_callback(const String &p_path) {
}
void EditorAutoloadSettings::_autoload_text_entered(const String p_name) {
-
if (autoload_add_path->get_text() != "" && _autoload_name_is_valid(p_name, nullptr)) {
_autoload_add();
}
}
void EditorAutoloadSettings::_autoload_path_text_changed(const String p_path) {
-
add_autoload->set_disabled(
p_path == "" || !_autoload_name_is_valid(autoload_add_name->get_text(), nullptr));
}
void EditorAutoloadSettings::_autoload_text_changed(const String p_name) {
-
add_autoload->set_disabled(
autoload_add_path->get_text() == "" || !_autoload_name_is_valid(p_name, nullptr));
}
@@ -371,9 +370,9 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) {
}
void EditorAutoloadSettings::update_autoload() {
-
- if (updating_autoload)
+ if (updating_autoload) {
return;
+ }
updating_autoload = true;
@@ -394,17 +393,18 @@ void EditorAutoloadSettings::update_autoload() {
ProjectSettings::get_singleton()->get_property_list(&props);
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
-
const PropertyInfo &pi = E->get();
- if (!pi.name.begins_with("autoload/"))
+ if (!pi.name.begins_with("autoload/")) {
continue;
+ }
String name = pi.name.get_slice("/", 1);
String path = ProjectSettings::get_singleton()->get(pi.name);
- if (name.empty())
+ if (name.empty()) {
continue;
+ }
AutoLoadInfo info;
info.is_singleton = path.begins_with("*");
@@ -518,9 +518,9 @@ void EditorAutoloadSettings::update_autoload() {
}
Variant EditorAutoloadSettings::get_drag_data_fw(const Point2 &p_point, Control *p_control) {
-
- if (autoload_cache.size() <= 1)
+ if (autoload_cache.size() <= 1) {
return false;
+ }
PackedStringArray autoloads;
@@ -531,8 +531,9 @@ Variant EditorAutoloadSettings::get_drag_data_fw(const Point2 &p_point, Control
next = tree->get_next_selected(next);
}
- if (autoloads.size() == 0 || autoloads.size() == autoload_cache.size())
+ if (autoloads.size() == 0 || autoloads.size() == autoload_cache.size()) {
return Variant();
+ }
VBoxContainer *preview = memnew(VBoxContainer);
@@ -556,19 +557,22 @@ Variant EditorAutoloadSettings::get_drag_data_fw(const Point2 &p_point, Control
}
bool EditorAutoloadSettings::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_control) const {
- if (updating_autoload)
+ if (updating_autoload) {
return false;
+ }
Dictionary drop_data = p_data;
- if (!drop_data.has("type"))
+ if (!drop_data.has("type")) {
return false;
+ }
if (drop_data.has("type")) {
TreeItem *ti = tree->get_item_at_position(p_point);
- if (!ti)
+ if (!ti) {
return false;
+ }
int section = tree->get_drop_section_at_position(p_point);
@@ -579,16 +583,17 @@ bool EditorAutoloadSettings::can_drop_data_fw(const Point2 &p_point, const Varia
}
void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_control) {
-
TreeItem *ti = tree->get_item_at_position(p_point);
- if (!ti)
+ if (!ti) {
return;
+ }
int section = tree->get_drop_section_at_position(p_point);
- if (section < -1)
+ if (section < -1) {
return;
+ }
String name;
bool move_to_back = false;
@@ -665,23 +670,22 @@ void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &
}
bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_path) {
-
String name = p_name;
String error;
if (!_autoload_name_is_valid(name, &error)) {
- EditorNode::get_singleton()->show_warning(error);
+ EditorNode::get_singleton()->show_warning(TTR("Can't add autoload:") + "\n" + error);
return false;
}
const String &path = p_path;
if (!FileAccess::exists(path)) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid path.") + "\n" + TTR("File does not exist."));
+ EditorNode::get_singleton()->show_warning(TTR("Can't add autoload:") + "\n" + TTR(vformat("%s is an invalid path. File does not exist.", path)));
return false;
}
if (!path.begins_with("res://")) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid path.") + "\n" + TTR("Not in resource path."));
+ EditorNode::get_singleton()->show_warning(TTR("Can't add autoload:") + "\n" + TTR(vformat("%s is an invalid path. Not in resource path (res://).", path)));
return false;
}
@@ -711,7 +715,6 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
}
void EditorAutoloadSettings::autoload_remove(const String &p_name) {
-
String name = "autoload/" + p_name;
UndoRedo *undo_redo = EditorNode::get_undo_redo();
@@ -736,7 +739,6 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) {
}
void EditorAutoloadSettings::_bind_methods() {
-
ClassDB::bind_method("_autoload_open", &EditorAutoloadSettings::_autoload_open);
ClassDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
@@ -751,22 +753,22 @@ void EditorAutoloadSettings::_bind_methods() {
}
EditorAutoloadSettings::EditorAutoloadSettings() {
-
// Make first cache
List<PropertyInfo> props;
ProjectSettings::get_singleton()->get_property_list(&props);
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
-
const PropertyInfo &pi = E->get();
- if (!pi.name.begins_with("autoload/"))
+ if (!pi.name.begins_with("autoload/")) {
continue;
+ }
String name = pi.name.get_slice("/", 1);
String path = ProjectSettings::get_singleton()->get(pi.name);
- if (name.empty())
+ if (name.empty()) {
continue;
+ }
AutoLoadInfo info;
info.is_singleton = path.begins_with("*");
@@ -904,12 +906,10 @@ EditorAutoloadSettings::~EditorAutoloadSettings() {
}
void EditorAutoloadSettings::_set_autoload_add_path(const String &p_text) {
-
autoload_add_path->set_text(p_text);
autoload_add_path->emit_signal("text_entered", p_text);
}
void EditorAutoloadSettings::_browse_autoload_add_path() {
-
file_dialog->popup_centered_ratio();
-} \ No newline at end of file
+}
diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h
index 94a581401c..646fe3992c 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -36,7 +36,6 @@
#include "editor_file_dialog.h"
class EditorAutoloadSettings : public VBoxContainer {
-
GDCLASS(EditorAutoloadSettings, VBoxContainer);
enum {
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 9c739474d1..130c330f5a 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -39,22 +39,23 @@
#include "scene/resources/packed_scene.h"
void EditorHistory::cleanup_history() {
-
for (int i = 0; i < history.size(); i++) {
-
bool fail = false;
for (int j = 0; j < history[i].path.size(); j++) {
- if (!history[i].path[j].ref.is_null())
+ if (!history[i].path[j].ref.is_null()) {
continue;
+ }
Object *obj = ObjectDB::get_instance(history[i].path[j].object);
if (obj) {
Node *n = Object::cast_to<Node>(obj);
- if (n && n->is_inside_tree())
+ if (n && n->is_inside_tree()) {
continue;
- if (!n) // Possibly still alive
+ }
+ if (!n) { // Possibly still alive
continue;
+ }
}
if (j <= history[i].level) {
@@ -74,18 +75,19 @@ void EditorHistory::cleanup_history() {
}
}
- if (current >= history.size())
+ if (current >= history.size()) {
current = history.size() - 1;
+ }
}
void EditorHistory::_add_object(ObjectID p_object, const String &p_property, int p_level_change, bool p_inspector_only) {
-
Object *obj = ObjectDB::get_instance(p_object);
ERR_FAIL_COND(!obj);
Reference *r = Object::cast_to<Reference>(obj);
Obj o;
- if (r)
+ if (r) {
o.ref = REF(r);
+ }
o.object = p_object;
o.property = p_property;
o.inspector_only = p_inspector_only;
@@ -122,34 +124,30 @@ void EditorHistory::_add_object(ObjectID p_object, const String &p_property, int
}
void EditorHistory::add_object_inspector_only(ObjectID p_object) {
-
_add_object(p_object, "", -1, true);
}
void EditorHistory::add_object(ObjectID p_object) {
-
_add_object(p_object, "", -1);
}
void EditorHistory::add_object(ObjectID p_object, const String &p_subprop) {
-
_add_object(p_object, p_subprop, -1);
}
void EditorHistory::add_object(ObjectID p_object, int p_relevel) {
-
_add_object(p_object, "", p_relevel);
}
int EditorHistory::get_history_len() {
return history.size();
}
+
int EditorHistory::get_history_pos() {
return current;
}
bool EditorHistory::is_history_obj_inspector_only(int p_obj) const {
-
ERR_FAIL_INDEX_V(p_obj, history.size(), false);
ERR_FAIL_INDEX_V(history[p_obj].level, history[p_obj].path.size(), false);
return history[p_obj].path[history[p_obj].level].inspector_only;
@@ -164,85 +162,88 @@ ObjectID EditorHistory::get_history_obj(int p_obj) const {
bool EditorHistory::is_at_beginning() const {
return current <= 0;
}
-bool EditorHistory::is_at_end() const {
+bool EditorHistory::is_at_end() const {
return ((current + 1) >= history.size());
}
bool EditorHistory::next() {
-
cleanup_history();
- if ((current + 1) < history.size())
+ if ((current + 1) < history.size()) {
current++;
- else
+ } else {
return false;
+ }
return true;
}
bool EditorHistory::previous() {
-
cleanup_history();
- if (current > 0)
+ if (current > 0) {
current--;
- else
+ } else {
return false;
+ }
return true;
}
bool EditorHistory::is_current_inspector_only() const {
-
- if (current < 0 || current >= history.size())
+ if (current < 0 || current >= history.size()) {
return false;
+ }
const History &h = history[current];
return h.path[h.level].inspector_only;
}
-ObjectID EditorHistory::get_current() {
- if (current < 0 || current >= history.size())
+ObjectID EditorHistory::get_current() {
+ if (current < 0 || current >= history.size()) {
return ObjectID();
+ }
History &h = history.write[current];
Object *obj = ObjectDB::get_instance(h.path[h.level].object);
- if (!obj)
+ if (!obj) {
return ObjectID();
+ }
return obj->get_instance_id();
}
int EditorHistory::get_path_size() const {
-
- if (current < 0 || current >= history.size())
+ if (current < 0 || current >= history.size()) {
return 0;
+ }
const History &h = history[current];
return h.path.size();
}
ObjectID EditorHistory::get_path_object(int p_index) const {
-
- if (current < 0 || current >= history.size())
+ if (current < 0 || current >= history.size()) {
return ObjectID();
+ }
const History &h = history[current];
ERR_FAIL_INDEX_V(p_index, h.path.size(), ObjectID());
Object *obj = ObjectDB::get_instance(h.path[p_index].object);
- if (!obj)
+ if (!obj) {
return ObjectID();
+ }
return obj->get_instance_id();
}
String EditorHistory::get_path_property(int p_index) const {
-
- if (current < 0 || current >= history.size())
+ if (current < 0 || current >= history.size()) {
return "";
+ }
const History &h = history[current];
@@ -252,33 +253,29 @@ String EditorHistory::get_path_property(int p_index) const {
}
void EditorHistory::clear() {
-
history.clear();
current = -1;
}
EditorHistory::EditorHistory() {
-
current = -1;
}
EditorPlugin *EditorData::get_editor(Object *p_object) {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
- if (editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object))
+ if (editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object)) {
return editor_plugins[i];
+ }
}
return nullptr;
}
EditorPlugin *EditorData::get_subeditor(Object *p_object) {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
- if (!editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object))
+ if (!editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object)) {
return editor_plugins[i];
+ }
}
return nullptr;
@@ -295,27 +292,25 @@ Vector<EditorPlugin *> EditorData::get_subeditors(Object *p_object) {
}
EditorPlugin *EditorData::get_editor(String p_name) {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
- if (editor_plugins[i]->get_name() == p_name)
+ if (editor_plugins[i]->get_name() == p_name) {
return editor_plugins[i];
+ }
}
return nullptr;
}
void EditorData::copy_object_params(Object *p_object) {
-
clipboard.clear();
List<PropertyInfo> pinfo;
p_object->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
-
- if (!(E->get().usage & PROPERTY_USAGE_EDITOR) || E->get().name == "script" || E->get().name == "scripts")
+ if (!(E->get().usage & PROPERTY_USAGE_EDITOR) || E->get().name == "script" || E->get().name == "scripts") {
continue;
+ }
PropertyData pd;
pd.name = E->get().name;
@@ -325,21 +320,18 @@ void EditorData::copy_object_params(Object *p_object) {
}
void EditorData::get_editor_breakpoints(List<String> *p_breakpoints) {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->get_breakpoints(p_breakpoints);
}
}
Dictionary EditorData::get_editor_states() const {
-
Dictionary metadata;
for (int i = 0; i < editor_plugins.size(); i++) {
-
Dictionary state = editor_plugins[i]->get_state();
- if (state.empty())
+ if (state.empty()) {
continue;
+ }
metadata[editor_plugins[i]->get_name()] = state;
}
@@ -353,88 +345,71 @@ Dictionary EditorData::get_scene_editor_states(int p_idx) const {
}
void EditorData::set_editor_states(const Dictionary &p_states) {
-
List<Variant> keys;
p_states.get_key_list(&keys);
List<Variant>::Element *E = keys.front();
for (; E; E = E->next()) {
-
String name = E->get();
int idx = -1;
for (int i = 0; i < editor_plugins.size(); i++) {
-
if (editor_plugins[i]->get_name() == name) {
idx = i;
break;
}
}
- if (idx == -1)
+ if (idx == -1) {
continue;
+ }
editor_plugins[idx]->set_state(p_states[name]);
}
}
void EditorData::notify_edited_scene_changed() {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->edited_scene_changed();
editor_plugins[i]->notify_scene_changed(get_edited_scene_root());
}
}
void EditorData::notify_resource_saved(const Ref<Resource> &p_resource) {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->notify_resource_saved(p_resource);
}
}
void EditorData::clear_editor_states() {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->clear();
}
}
void EditorData::save_editor_external_data() {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->save_external_data();
}
}
void EditorData::apply_changes_in_editors() {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->apply_changes();
}
}
void EditorData::save_editor_global_states() {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->save_global_state();
}
}
void EditorData::restore_editor_global_states() {
-
for (int i = 0; i < editor_plugins.size(); i++) {
-
editor_plugins[i]->restore_global_state();
}
}
void EditorData::paste_object_params(Object *p_object) {
-
ERR_FAIL_NULL(p_object);
undo_redo.create_action(TTR("Paste Params"));
for (List<PropertyData>::Element *E = clipboard.front(); E; E = E->next()) {
@@ -446,11 +421,9 @@ void EditorData::paste_object_params(Object *p_object) {
}
bool EditorData::call_build() {
-
bool result = true;
for (int i = 0; i < editor_plugins.size() && result; i++) {
-
result &= editor_plugins[i]->build();
}
@@ -458,18 +431,15 @@ bool EditorData::call_build() {
}
UndoRedo &EditorData::get_undo_redo() {
-
return undo_redo;
}
void EditorData::remove_editor_plugin(EditorPlugin *p_plugin) {
-
p_plugin->undo_redo = nullptr;
editor_plugins.erase(p_plugin);
}
void EditorData::add_editor_plugin(EditorPlugin *p_plugin) {
-
p_plugin->undo_redo = &undo_redo;
editor_plugins.push_back(p_plugin);
}
@@ -477,14 +447,13 @@ void EditorData::add_editor_plugin(EditorPlugin *p_plugin) {
int EditorData::get_editor_plugin_count() const {
return editor_plugins.size();
}
-EditorPlugin *EditorData::get_editor_plugin(int p_idx) {
+EditorPlugin *EditorData::get_editor_plugin(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, editor_plugins.size(), nullptr);
return editor_plugins[p_idx];
}
void EditorData::add_custom_type(const String &p_type, const String &p_inherits, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon) {
-
ERR_FAIL_COND_MSG(p_script.is_null(), "It's not a reference to a valid Script object.");
CustomType ct;
ct.name = p_type;
@@ -498,9 +467,7 @@ void EditorData::add_custom_type(const String &p_type, const String &p_inherits,
}
Object *EditorData::instance_custom_type(const String &p_type, const String &p_inherits) {
-
if (get_custom_types().has(p_inherits)) {
-
for (int i = 0; i < get_custom_types()[p_inherits].size(); i++) {
if (get_custom_types()[p_inherits][i].name == p_type) {
Ref<Script> script = get_custom_types()[p_inherits][i].script;
@@ -520,9 +487,7 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i
}
void EditorData::remove_custom_type(const String &p_type) {
-
for (Map<String, Vector<CustomType>>::Element *E = custom_types.front(); E; E = E->next()) {
-
for (int i = 0; i < E->get().size(); i++) {
if (E->get()[i].name == p_type) {
E->get().remove(i);
@@ -536,9 +501,9 @@ void EditorData::remove_custom_type(const String &p_type) {
}
int EditorData::add_edited_scene(int p_at_pos) {
-
- if (p_at_pos < 0)
+ if (p_at_pos < 0) {
p_at_pos = edited_scene.size();
+ }
EditedScene es;
es.root = nullptr;
es.path = String();
@@ -546,18 +511,19 @@ int EditorData::add_edited_scene(int p_at_pos) {
es.version = 0;
es.live_edit_root = NodePath(String("/root"));
- if (p_at_pos == edited_scene.size())
+ if (p_at_pos == edited_scene.size()) {
edited_scene.push_back(es);
- else
+ } else {
edited_scene.insert(p_at_pos, es);
+ }
- if (current_edited_scene < 0)
+ if (current_edited_scene < 0) {
current_edited_scene = 0;
+ }
return p_at_pos;
}
void EditorData::move_edited_scene_index(int p_idx, int p_to_idx) {
-
ERR_FAIL_INDEX(p_idx, edited_scene.size());
ERR_FAIL_INDEX(p_to_idx, edited_scene.size());
SWAP(edited_scene.write[p_idx], edited_scene.write[p_to_idx]);
@@ -566,7 +532,6 @@ void EditorData::move_edited_scene_index(int p_idx, int p_to_idx) {
void EditorData::remove_scene(int p_idx) {
ERR_FAIL_INDEX(p_idx, edited_scene.size());
if (edited_scene[p_idx].root) {
-
for (int i = 0; i < editor_plugins.size(); i++) {
editor_plugins[i]->notify_scene_closed(edited_scene[p_idx].root->get_filename());
}
@@ -574,9 +539,9 @@ void EditorData::remove_scene(int p_idx) {
memdelete(edited_scene[p_idx].root);
}
- if (current_edited_scene > p_idx)
+ if (current_edited_scene > p_idx) {
current_edited_scene--;
- else if (current_edited_scene == p_idx && current_edited_scene > 0) {
+ } else if (current_edited_scene == p_idx && current_edited_scene > 0) {
current_edited_scene--;
}
@@ -584,7 +549,6 @@ void EditorData::remove_scene(int p_idx) {
}
bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths) {
-
/*
if (p_root!=p_node && p_node->get_owner()!=p_root && !p_root->is_editable_instance(p_node->get_owner()))
return false;
@@ -602,7 +566,6 @@ bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String>
String path = ss->get_path();
if (!checked_paths.has(path)) {
-
uint64_t modified_time = FileAccess::get_modified_time(path);
if (modified_time != ss->get_last_modified_time()) {
return true; //external scene changed
@@ -613,20 +576,20 @@ bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String>
}
for (int i = 0; i < p_node->get_child_count(); i++) {
-
bool found = _find_updated_instances(p_root, p_node->get_child(i), checked_paths);
- if (found)
+ if (found) {
return true;
+ }
}
return false;
}
bool EditorData::check_and_update_scene(int p_idx) {
-
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), false);
- if (!edited_scene[p_idx].root)
+ if (!edited_scene[p_idx].root) {
return false;
+ }
Set<String> checked_scenes;
@@ -650,16 +613,18 @@ bool EditorData::check_and_update_scene(int p_idx) {
for (List<Node *>::Element *E = edited_scene.write[p_idx].selection.front(); E; E = E->next()) {
NodePath p = edited_scene[p_idx].root->get_path_to(E->get());
Node *new_node = new_scene->get_node(p);
- if (new_node)
+ if (new_node) {
new_selection.push_back(new_node);
+ }
}
new_scene->set_filename(edited_scene[p_idx].root->get_filename());
memdelete(edited_scene[p_idx].root);
edited_scene.write[p_idx].root = new_scene;
- if (new_scene->get_filename() != "")
+ if (new_scene->get_filename() != "") {
edited_scene.write[p_idx].path = new_scene->get_filename();
+ }
edited_scene.write[p_idx].selection = new_selection;
return true;
@@ -669,15 +634,15 @@ bool EditorData::check_and_update_scene(int p_idx) {
}
int EditorData::get_edited_scene() const {
-
return current_edited_scene;
}
-void EditorData::set_edited_scene(int p_idx) {
+void EditorData::set_edited_scene(int p_idx) {
ERR_FAIL_INDEX(p_idx, edited_scene.size());
current_edited_scene = p_idx;
//swap
}
+
Node *EditorData::get_edited_scene_root(int p_idx) {
if (p_idx < 0) {
ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), nullptr);
@@ -687,25 +652,24 @@ Node *EditorData::get_edited_scene_root(int p_idx) {
return edited_scene[p_idx].root;
}
}
-void EditorData::set_edited_scene_root(Node *p_root) {
+void EditorData::set_edited_scene_root(Node *p_root) {
ERR_FAIL_INDEX(current_edited_scene, edited_scene.size());
edited_scene.write[current_edited_scene].root = p_root;
if (p_root) {
- if (p_root->get_filename() != "")
+ if (p_root->get_filename() != "") {
edited_scene.write[current_edited_scene].path = p_root->get_filename();
- else
+ } else {
p_root->set_filename(edited_scene[current_edited_scene].path);
+ }
}
}
int EditorData::get_edited_scene_count() const {
-
return edited_scene.size();
}
Vector<EditorData::EditedScene> EditorData::get_edited_scenes() const {
-
Vector<EditedScene> out_edited_scenes_list = Vector<EditedScene>();
for (int i = 0; i < edited_scene.size(); i++) {
@@ -726,24 +690,24 @@ void EditorData::set_edited_scene_version(uint64_t version, int p_scene_idx) {
}
uint64_t EditorData::get_edited_scene_version() const {
-
ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), 0);
return edited_scene[current_edited_scene].version;
}
+
uint64_t EditorData::get_scene_version(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), 0);
return edited_scene[p_idx].version;
}
String EditorData::get_scene_type(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String());
- if (!edited_scene[p_idx].root)
+ if (!edited_scene[p_idx].root) {
return "";
+ }
return edited_scene[p_idx].root->get_class();
}
-void EditorData::move_edited_scene_to_index(int p_idx) {
+void EditorData::move_edited_scene_to_index(int p_idx) {
ERR_FAIL_INDEX(current_edited_scene, edited_scene.size());
ERR_FAIL_INDEX(p_idx, edited_scene.size());
@@ -754,10 +718,10 @@ void EditorData::move_edited_scene_to_index(int p_idx) {
}
Ref<Script> EditorData::get_scene_root_script(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), Ref<Script>());
- if (!edited_scene[p_idx].root)
+ if (!edited_scene[p_idx].root) {
return Ref<Script>();
+ }
Ref<Script> s = edited_scene[p_idx].root->get_script();
if (!s.is_valid() && edited_scene[p_idx].root->get_child_count()) {
Node *n = edited_scene[p_idx].root->get_child(0);
@@ -771,10 +735,12 @@ Ref<Script> EditorData::get_scene_root_script(int p_idx) const {
String EditorData::get_scene_title(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String());
- if (!edited_scene[p_idx].root)
+ if (!edited_scene[p_idx].root) {
return TTR("[empty]");
- if (edited_scene[p_idx].root->get_filename() == "")
+ }
+ if (edited_scene[p_idx].root->get_filename() == "") {
return TTR("[unsaved]");
+ }
bool show_ext = EDITOR_DEF("interface/scene_tabs/show_extension", false);
String name = edited_scene[p_idx].root->get_filename().get_file();
if (!show_ext) {
@@ -784,24 +750,24 @@ String EditorData::get_scene_title(int p_idx) const {
}
void EditorData::set_scene_path(int p_idx, const String &p_path) {
-
ERR_FAIL_INDEX(p_idx, edited_scene.size());
edited_scene.write[p_idx].path = p_path;
- if (!edited_scene[p_idx].root)
+ if (!edited_scene[p_idx].root) {
return;
+ }
edited_scene[p_idx].root->set_filename(p_path);
}
String EditorData::get_scene_path(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String());
if (edited_scene[p_idx].root) {
- if (edited_scene[p_idx].root->get_filename() == "")
+ if (edited_scene[p_idx].root->get_filename() == "") {
edited_scene[p_idx].root->set_filename(edited_scene[p_idx].path);
- else
+ } else {
return edited_scene[p_idx].root->get_filename();
+ }
}
return edited_scene[p_idx].path;
@@ -812,15 +778,14 @@ void EditorData::set_edited_scene_live_edit_root(const NodePath &p_root) {
edited_scene.write[current_edited_scene].live_edit_root = p_root;
}
-NodePath EditorData::get_edited_scene_live_edit_root() {
+NodePath EditorData::get_edited_scene_live_edit_root() {
ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), String());
return edited_scene[current_edited_scene].live_edit_root;
}
void EditorData::save_edited_scene_state(EditorSelection *p_selection, EditorHistory *p_history, const Dictionary &p_custom) {
-
ERR_FAIL_INDEX(current_edited_scene, edited_scene.size());
EditedScene &es = edited_scene.write[current_edited_scene];
@@ -849,7 +814,6 @@ Dictionary EditorData::restore_edited_scene_state(EditorSelection *p_selection,
}
void EditorData::clear_edited_scenes() {
-
for (int i = 0; i < edited_scene.size(); i++) {
if (edited_scene[i].root) {
memdelete(edited_scene[i].root);
@@ -871,8 +835,9 @@ void EditorData::get_plugin_window_layout(Ref<ConfigFile> p_layout) {
}
bool EditorData::script_class_is_parent(const String &p_class, const String &p_inherits) {
- if (!ScriptServer::is_global_class(p_class))
+ if (!ScriptServer::is_global_class(p_class)) {
return false;
+ }
String base = script_class_get_base(p_class);
Ref<Script> script = script_class_load_script(p_class);
Ref<Script> base_script = script->get_base_script();
@@ -892,10 +857,10 @@ bool EditorData::script_class_is_parent(const String &p_class, const String &p_i
}
StringName EditorData::script_class_get_base(const String &p_class) const {
-
Ref<Script> script = script_class_load_script(p_class);
- if (script.is_null())
+ if (script.is_null()) {
return StringName();
+ }
Ref<Script> base_script = script->get_base_script();
if (base_script.is_null()) {
@@ -910,8 +875,9 @@ Object *EditorData::script_class_instance(const String &p_class) {
Object *obj = ClassDB::instance(ScriptServer::get_global_class_native_base(p_class));
if (obj) {
Ref<Script> script = script_class_load_script(p_class);
- if (script.is_valid())
+ if (script.is_valid()) {
obj->set_script(script);
+ }
return obj;
}
}
@@ -919,9 +885,9 @@ Object *EditorData::script_class_instance(const String &p_class) {
}
Ref<Script> EditorData::script_class_load_script(const String &p_class) const {
-
- if (!ScriptServer::is_global_class(p_class))
+ if (!ScriptServer::is_global_class(p_class)) {
return Ref<Script>();
+ }
String path = ScriptServer::get_global_class_path(p_class);
return ResourceLoader::load(path, "Script");
@@ -932,15 +898,17 @@ void EditorData::script_class_set_icon_path(const String &p_class, const String
}
String EditorData::script_class_get_icon_path(const String &p_class) const {
- if (!ScriptServer::is_global_class(p_class))
+ if (!ScriptServer::is_global_class(p_class)) {
return String();
+ }
String current = p_class;
String ret = _script_class_icon_paths[current];
while (ret.empty()) {
current = script_class_get_base(current);
- if (!ScriptServer::is_global_class(current))
+ if (!ScriptServer::is_global_class(current)) {
return String();
+ }
ret = _script_class_icon_paths.has(current) ? _script_class_icon_paths[current] : String();
}
@@ -961,8 +929,9 @@ void EditorData::script_class_save_icon_paths() {
Dictionary d;
for (List<StringName>::Element *E = keys.front(); E; E = E->next()) {
- if (ScriptServer::is_global_class(E->get()))
+ if (ScriptServer::is_global_class(E->get())) {
d[E->get()] = _script_class_icon_paths[E->get()];
+ }
}
ProjectSettings::get_singleton()->set("_global_script_class_icons", d);
@@ -988,7 +957,6 @@ void EditorData::script_class_load_icon_paths() {
}
EditorData::EditorData() {
-
current_edited_scene = -1;
//load_imported_scenes_from_globals();
@@ -997,30 +965,30 @@ EditorData::EditorData() {
///////////
void EditorSelection::_node_removed(Node *p_node) {
-
- if (!selection.has(p_node))
+ if (!selection.has(p_node)) {
return;
+ }
Object *meta = selection[p_node];
- if (meta)
+ if (meta) {
memdelete(meta);
+ }
selection.erase(p_node);
changed = true;
nl_changed = true;
}
void EditorSelection::add_node(Node *p_node) {
-
ERR_FAIL_NULL(p_node);
ERR_FAIL_COND(!p_node->is_inside_tree());
- if (selection.has(p_node))
+ if (selection.has(p_node)) {
return;
+ }
changed = true;
nl_changed = true;
Object *meta = nullptr;
for (List<Object *>::Element *E = editor_plugins.front(); E; E = E->next()) {
-
meta = E->get()->call("_get_editor_data", p_node);
if (meta) {
break;
@@ -1034,32 +1002,31 @@ void EditorSelection::add_node(Node *p_node) {
}
void EditorSelection::remove_node(Node *p_node) {
-
ERR_FAIL_NULL(p_node);
- if (!selection.has(p_node))
+ if (!selection.has(p_node)) {
return;
+ }
changed = true;
nl_changed = true;
Object *meta = selection[p_node];
- if (meta)
+ if (meta) {
memdelete(meta);
+ }
selection.erase(p_node);
p_node->disconnect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed));
//emit_signal("selection_changed");
}
-bool EditorSelection::is_selected(Node *p_node) const {
+bool EditorSelection::is_selected(Node *p_node) const {
return selection.has(p_node);
}
Array EditorSelection::_get_transformable_selected_nodes() {
-
Array ret;
for (List<Node *>::Element *E = selected_node_list.front(); E; E = E->next()) {
-
ret.push_back(E->get());
}
@@ -1067,11 +1034,9 @@ Array EditorSelection::_get_transformable_selected_nodes() {
}
TypedArray<Node> EditorSelection::get_selected_nodes() {
-
TypedArray<Node> ret;
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
ret.push_back(E->key());
}
@@ -1079,7 +1044,6 @@ TypedArray<Node> EditorSelection::get_selected_nodes() {
}
void EditorSelection::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("clear"), &EditorSelection::clear);
ClassDB::bind_method(D_METHOD("add_node", "node"), &EditorSelection::add_node);
ClassDB::bind_method(D_METHOD("remove_node", "node"), &EditorSelection::remove_node);
@@ -1090,19 +1054,17 @@ void EditorSelection::_bind_methods() {
}
void EditorSelection::add_editor_plugin(Object *p_object) {
-
editor_plugins.push_back(p_object);
}
void EditorSelection::_update_nl() {
-
- if (!nl_changed)
+ if (!nl_changed) {
return;
+ }
selected_node_list.clear();
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
Node *parent = E->key();
parent = parent->get_parent();
bool skip = false;
@@ -1114,8 +1076,9 @@ void EditorSelection::_update_nl() {
parent = parent->get_parent();
}
- if (skip)
+ if (skip) {
continue;
+ }
selected_node_list.push_back(E->key());
}
@@ -1123,11 +1086,11 @@ void EditorSelection::_update_nl() {
}
void EditorSelection::update() {
-
_update_nl();
- if (!changed)
+ if (!changed) {
return;
+ }
changed = false;
if (!emitted) {
emitted = true;
@@ -1141,16 +1104,15 @@ void EditorSelection::_emit_change() {
}
List<Node *> &EditorSelection::get_selected_node_list() {
-
- if (changed)
+ if (changed) {
update();
- else
+ } else {
_update_nl();
+ }
return selected_node_list;
}
List<Node *> EditorSelection::get_full_selected_node_list() {
-
List<Node *> node_list;
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
node_list.push_back(E->key());
@@ -1160,23 +1122,20 @@ List<Node *> EditorSelection::get_full_selected_node_list() {
}
void EditorSelection::clear() {
-
while (!selection.empty()) {
-
remove_node(selection.front()->key());
}
changed = true;
nl_changed = true;
}
-EditorSelection::EditorSelection() {
+EditorSelection::EditorSelection() {
emitted = false;
changed = false;
nl_changed = false;
}
EditorSelection::~EditorSelection() {
-
clear();
}
diff --git a/editor/editor_data.h b/editor/editor_data.h
index e4f4c67c8e..8083dde09c 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -39,14 +39,12 @@
#include "scene/resources/texture.h"
class EditorHistory {
-
enum {
HISTORY_MAX = 64
};
struct Obj {
-
REF ref;
ObjectID object;
String property;
@@ -54,7 +52,6 @@ class EditorHistory {
};
struct History {
-
Vector<Obj> path;
int level;
};
@@ -66,7 +63,6 @@ class EditorHistory {
//Vector<EditorPlugin*> editor_plugins;
struct PropertyData {
-
String name;
Variant value;
};
@@ -106,10 +102,8 @@ public:
class EditorSelection;
class EditorData {
-
public:
struct CustomType {
-
String name;
Ref<Script> script;
Ref<Texture2D> icon;
@@ -131,7 +125,6 @@ private:
Vector<EditorPlugin *> editor_plugins;
struct PropertyData {
-
String name;
Variant value;
};
@@ -234,7 +227,6 @@ public:
};
class EditorSelection : public Object {
-
GDCLASS(EditorSelection, Object);
private:
@@ -264,8 +256,9 @@ public:
template <class T>
T *get_node_editor_data(Node *p_node) {
- if (!selection.has(p_node))
+ if (!selection.has(p_node)) {
return nullptr;
+ }
return Object::cast_to<T>(selection[p_node]);
}
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index cb87656382..3c1c3c8a86 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -38,7 +38,6 @@
#include "servers/display_server.h"
void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path) {
-
updating = true;
String path = p_dir->get_path();
@@ -49,7 +48,6 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p
if (!p_item->get_parent()) {
p_item->set_text(0, "res://");
} else {
-
if (!opened_paths.has(path) && (p_select_path == String() || !p_select_path.begins_with(path))) {
p_item->set_collapsed(true);
}
@@ -61,14 +59,12 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p
//bool show_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
updating = false;
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
-
TreeItem *ti = tree->create_item(p_item);
_update_dir(ti, p_dir->get_subdir(i));
}
}
void EditorDirDialog::reload(const String &p_path) {
-
if (!is_visible()) {
must_reload = true;
return;
@@ -82,7 +78,6 @@ void EditorDirDialog::reload(const String &p_path) {
}
void EditorDirDialog::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload), make_binds(""));
reload();
@@ -110,16 +105,17 @@ void EditorDirDialog::_notification(int p_what) {
}
void EditorDirDialog::_item_collapsed(Object *p_item) {
-
TreeItem *item = Object::cast_to<TreeItem>(p_item);
- if (updating)
+ if (updating) {
return;
+ }
- if (item->is_collapsed())
+ if (item->is_collapsed()) {
opened_paths.erase(item->get_metadata(0));
- else
+ } else {
opened_paths.insert(item->get_metadata(0));
+ }
}
void EditorDirDialog::_item_activated() {
@@ -127,10 +123,10 @@ void EditorDirDialog::_item_activated() {
}
void EditorDirDialog::ok_pressed() {
-
TreeItem *ti = tree->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
String dir = ti->get_metadata(0);
emit_signal("dir_selected", dir);
@@ -138,7 +134,6 @@ void EditorDirDialog::ok_pressed() {
}
void EditorDirDialog::_make_dir() {
-
TreeItem *ti = tree->get_selected();
if (!ti) {
mkdirerr->set_text(TTR("Please select a base directory first."));
@@ -151,10 +146,10 @@ void EditorDirDialog::_make_dir() {
}
void EditorDirDialog::_make_dir_confirm() {
-
TreeItem *ti = tree->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
String dir = ti->get_metadata(0);
@@ -173,12 +168,10 @@ void EditorDirDialog::_make_dir_confirm() {
}
void EditorDirDialog::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir")));
}
EditorDirDialog::EditorDirDialog() {
-
updating = false;
set_title(TTR("Choose a Directory"));
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 24a69fe003..25594bf7c8 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -48,7 +48,6 @@
#include "scene/resources/resource_format_text.h"
static int _get_pad(int p_alignment, int p_n) {
-
int rest = p_n % p_alignment;
int pad = 0;
if (rest > 0) {
@@ -61,7 +60,6 @@ static int _get_pad(int p_alignment, int p_n) {
#define PCK_PADDING 16
bool EditorExportPreset::_set(const StringName &p_name, const Variant &p_value) {
-
if (values.has(p_name)) {
values[p_name] = p_value;
EditorExport::singleton->save_presets();
@@ -72,7 +70,6 @@ bool EditorExportPreset::_set(const StringName &p_name, const Variant &p_value)
}
bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const {
-
if (values.has(p_name)) {
r_ret = values[p_name];
return true;
@@ -82,9 +79,7 @@ bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const {
}
void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const {
-
for (const List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
-
if (platform->get_option_visibility(E->get().name, values)) {
p_list->push_back(E->get());
}
@@ -92,12 +87,23 @@ void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const {
}
Ref<EditorExportPlatform> EditorExportPreset::get_platform() const {
-
return platform;
}
-Vector<String> EditorExportPreset::get_files_to_export() const {
+void EditorExportPreset::update_files_to_export() {
+ Vector<String> to_remove;
+ for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) {
+ if (!FileAccess::exists(E->get())) {
+ to_remove.push_back(E->get());
+ }
+ }
+ for (int i = 0; i < to_remove.size(); ++i) {
+ selected_files.erase(to_remove[i]);
+ }
+ EditorExport::singleton->save_presets();
+}
+Vector<String> EditorExportPreset::get_files_to_export() const {
Vector<String> files;
for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) {
files.push_back(E->get());
@@ -115,18 +121,15 @@ String EditorExportPreset::get_name() const {
}
void EditorExportPreset::set_runnable(bool p_enable) {
-
runnable = p_enable;
EditorExport::singleton->save_presets();
}
bool EditorExportPreset::is_runnable() const {
-
return runnable;
}
void EditorExportPreset::set_export_filter(ExportFilter p_filter) {
-
export_filter = p_filter;
EditorExport::singleton->save_presets();
}
@@ -136,18 +139,15 @@ EditorExportPreset::ExportFilter EditorExportPreset::get_export_filter() const {
}
void EditorExportPreset::set_include_filter(const String &p_include) {
-
include_filter = p_include;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_include_filter() const {
-
return include_filter;
}
void EditorExportPreset::set_export_path(const String &p_path) {
-
export_path = p_path;
/* NOTE(SonerSound): if there is a need to implement a PropertyHint that specifically indicates a relative path,
* this should be removed. */
@@ -159,23 +159,19 @@ void EditorExportPreset::set_export_path(const String &p_path) {
}
String EditorExportPreset::get_export_path() const {
-
return export_path;
}
void EditorExportPreset::set_exclude_filter(const String &p_exclude) {
-
exclude_filter = p_exclude;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_exclude_filter() const {
-
return exclude_filter;
}
void EditorExportPreset::add_export_file(const String &p_path) {
-
selected_files.insert(p_path);
EditorExport::singleton->save_presets();
}
@@ -186,16 +182,15 @@ void EditorExportPreset::remove_export_file(const String &p_path) {
}
bool EditorExportPreset::has_export_file(const String &p_path) {
-
return selected_files.has(p_path);
}
void EditorExportPreset::add_patch(const String &p_path, int p_at_pos) {
-
- if (p_at_pos < 0)
+ if (p_at_pos < 0) {
patches.push_back(p_path);
- else
+ } else {
patches.insert(p_at_pos, p_path);
+ }
EditorExport::singleton->save_presets();
}
@@ -209,8 +204,8 @@ void EditorExportPreset::set_patch(int p_index, const String &p_path) {
patches.write[p_index] = p_path;
EditorExport::singleton->save_presets();
}
-String EditorExportPreset::get_patch(int p_index) {
+String EditorExportPreset::get_patch(int p_index) {
ERR_FAIL_INDEX_V(p_index, patches.size(), String());
return patches[p_index];
}
@@ -220,54 +215,41 @@ Vector<String> EditorExportPreset::get_patches() const {
}
void EditorExportPreset::set_custom_features(const String &p_custom_features) {
-
custom_features = p_custom_features;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_custom_features() const {
-
return custom_features;
}
void EditorExportPreset::set_script_export_mode(int p_mode) {
-
script_mode = p_mode;
EditorExport::singleton->save_presets();
}
int EditorExportPreset::get_script_export_mode() const {
-
return script_mode;
}
void EditorExportPreset::set_script_encryption_key(const String &p_key) {
-
script_key = p_key;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_script_encryption_key() const {
-
return script_key;
}
-EditorExportPreset::EditorExportPreset() :
- export_filter(EXPORT_ALL_RESOURCES),
- export_path(""),
- runnable(false),
- script_mode(MODE_SCRIPT_COMPILED) {
-}
-
///////////////////////////////////
void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) {
-
String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
- if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
+ if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST) {
host = "localhost";
+ }
if (p_flags & DEBUG_FLAG_DUMB_CLIENT) {
int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
@@ -281,7 +263,6 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
}
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {
-
r_flags.push_back("--remote-debug");
r_flags.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
@@ -290,14 +271,13 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
if (breakpoints.size()) {
-
r_flags.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
-
bpoints += E->get().replace(" ", "%20");
- if (E->next())
+ if (E->next()) {
bpoints += ",";
+ }
}
r_flags.push_back(bpoints);
@@ -305,18 +285,15 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
}
if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
-
r_flags.push_back("--debug-collisions");
}
if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) {
-
r_flags.push_back("--debug-navigation");
}
}
Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
-
PackData *pd = (PackData *)p_userdata;
SavedData sd;
@@ -349,7 +326,6 @@ Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_pa
}
Error EditorExportPlatform::_save_zip_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
-
String path = p_path.replace_first("res://", "");
ZipData *zd = (ZipData *)p_userdata;
@@ -384,7 +360,6 @@ Ref<ImageTexture> EditorExportPlatform::get_option_icon(int p_index) const {
}
String EditorExportPlatform::find_export_template(String template_file_name, String *err) const {
-
String current_version = VERSION_FULL_CONFIG;
String template_path = EditorSettings::get_singleton()->get_templates_dir().plus_file(current_version).plus_file(template_file_name);
@@ -404,7 +379,6 @@ bool EditorExportPlatform::exists_export_template(String template_file_name, Str
}
Ref<EditorExportPreset> EditorExportPlatform::create_preset() {
-
Ref<EditorExportPreset> preset;
preset.instance();
preset->platform = Ref<EditorExportPlatform>(this);
@@ -413,7 +387,6 @@ Ref<EditorExportPreset> EditorExportPlatform::create_preset() {
get_export_options(&options);
for (List<ExportOption>::Element *E = options.front(); E; E = E->next()) {
-
preset->properties.push_back(E->get().option);
preset->values[E->get().option.name] = E->get().default_value;
}
@@ -422,7 +395,6 @@ Ref<EditorExportPreset> EditorExportPlatform::create_preset() {
}
void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths) {
-
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
_export_find_resources(p_dir->get_subdir(i), p_paths);
}
@@ -433,40 +405,40 @@ void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_d
}
void EditorExportPlatform::_export_find_dependencies(const String &p_path, Set<String> &p_paths) {
-
- if (p_paths.has(p_path))
+ if (p_paths.has(p_path)) {
return;
+ }
p_paths.insert(p_path);
EditorFileSystemDirectory *dir;
int file_idx;
dir = EditorFileSystem::get_singleton()->find_file(p_path, &file_idx);
- if (!dir)
+ if (!dir) {
return;
+ }
Vector<String> deps = dir->get_file_deps(file_idx);
for (int i = 0; i < deps.size(); i++) {
-
_export_find_dependencies(deps[i], p_paths);
}
}
void EditorExportPlatform::_edit_files_with_filter(DirAccess *da, const Vector<String> &p_filters, Set<String> &r_list, bool exclude) {
-
da->list_dir_begin();
String cur_dir = da->get_current_dir().replace("\\", "/");
- if (!cur_dir.ends_with("/"))
+ if (!cur_dir.ends_with("/")) {
cur_dir += "/";
+ }
String cur_dir_no_prefix = cur_dir.replace("res://", "");
Vector<String> dirs;
String f;
while ((f = da->get_next()) != "") {
- if (da->current_is_dir())
+ if (da->current_is_dir()) {
dirs.push_back(f);
- else {
+ } else {
String fullpath = cur_dir + f;
// Test also against path without res:// so that filters like `file.txt` can work.
String fullpath_no_prefix = cur_dir_no_prefix + f;
@@ -486,8 +458,9 @@ void EditorExportPlatform::_edit_files_with_filter(DirAccess *da, const Vector<S
for (int i = 0; i < dirs.size(); ++i) {
String dir = dirs[i];
- if (dir.begins_with("."))
+ if (dir.begins_with(".")) {
continue;
+ }
da->change_dir(dir);
_edit_files_with_filter(da, p_filters, r_list, exclude);
da->change_dir("..");
@@ -495,15 +468,16 @@ void EditorExportPlatform::_edit_files_with_filter(DirAccess *da, const Vector<S
}
void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &p_filter, bool exclude) {
-
- if (p_filter == "")
+ if (p_filter == "") {
return;
+ }
Vector<String> split = p_filter.split(",");
Vector<String> filters;
for (int i = 0; i < split.size(); i++) {
String f = split[i].strip_edges();
- if (f.empty())
+ if (f.empty()) {
continue;
+ }
filters.push_back(f);
}
@@ -514,19 +488,16 @@ void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &
}
void EditorExportPlugin::set_export_preset(const Ref<EditorExportPreset> &p_preset) {
-
if (p_preset.is_valid()) {
export_preset = p_preset;
}
}
Ref<EditorExportPreset> EditorExportPlugin::get_export_preset() const {
-
return export_preset;
}
void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap) {
-
ExtraFile ef;
ef.data = p_file;
ef.path = p_path;
@@ -535,7 +506,6 @@ void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p
}
void EditorExportPlugin::add_shared_object(const String &p_path, const Vector<String> &tags) {
-
shared_objects.push_back(SharedObject(p_path, tags));
}
@@ -591,21 +561,18 @@ Vector<String> EditorExportPlugin::get_ios_project_static_libs() const {
}
void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
-
if (get_script_instance()) {
get_script_instance()->call("_export_file", p_path, p_type, p_features);
}
}
void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
-
if (get_script_instance()) {
get_script_instance()->call("_export_begin", p_features, p_debug, p_path, p_flags);
}
}
void EditorExportPlugin::_export_end_script() {
-
if (get_script_instance()) {
get_script_instance()->call("_export_end");
}
@@ -618,12 +585,10 @@ void EditorExportPlugin::_export_begin(const Set<String> &p_features, bool p_deb
}
void EditorExportPlugin::skip() {
-
skipped = true;
}
void EditorExportPlugin::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("add_shared_object", "path", "tags"), &EditorExportPlugin::add_shared_object);
ClassDB::bind_method(D_METHOD("add_ios_project_static_lib", "path"), &EditorExportPlugin::add_ios_project_static_lib);
ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
@@ -656,7 +621,6 @@ EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_contai
}
if (p_preset->get_custom_features() != String()) {
-
Vector<String> tmp_custom_list = p_preset->get_custom_features().split(",");
for (int i = 0; i < tmp_custom_list.size(); i++) {
@@ -707,8 +671,9 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Vector<String> files = p_preset->get_files_to_export();
for (int i = 0; i < files.size(); i++) {
- if (scenes_only && ResourceLoader::get_resource_type(files[i]) != "PackedScene")
+ if (scenes_only && ResourceLoader::get_resource_type(files[i]) != "PackedScene") {
continue;
+ }
_export_find_dependencies(files[i], paths);
}
@@ -723,7 +688,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
for (int i = 0; i < export_plugins.size(); i++) {
-
export_plugins.write[i]->set_export_preset(p_preset);
if (p_so_func) {
@@ -747,7 +711,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
int total = paths.size();
for (Set<String>::Element *E = paths.front(); E; E = E->next()) {
-
String path = E->get();
String type = ResourceLoader::get_resource_type(path);
@@ -767,7 +730,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Set<String> remap_features;
for (List<String>::Element *F = remaps.front(); F; F = F->next()) {
-
String remap = F->get();
String feature = remap.get_slice(".", 1);
if (features.has(feature)) {
@@ -782,7 +744,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
err = OK;
for (List<String>::Element *F = remaps.front(); F; F = F->next()) {
-
String remap = F->get();
if (remap == "path") {
String remapped_path = config->get_value("remap", remap);
@@ -812,7 +773,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
} else {
-
bool do_export = true;
for (int i = 0; i < export_plugins.size(); i++) {
if (export_plugins[i]->get_script_instance()) { //script based
@@ -840,8 +800,9 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
export_plugins.write[i]->_clear();
- if (!do_export)
+ if (!do_export) {
break; //apologies, not exporting
+ }
}
//just store it as it comes
if (do_export) {
@@ -858,7 +819,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Vector<String> custom_list;
if (p_preset->get_custom_features() != String()) {
-
Vector<String> tmp_custom_list = p_preset->get_custom_features().split(",");
for (int i = 0; i < tmp_custom_list.size(); i++) {
@@ -871,7 +831,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
ProjectSettings::CustomMap custom_map;
if (path_remaps.size()) {
- if (1) { //new remap mode, use always as it's friendlier with multiple .pck exports
+ if (true) { //new remap mode, use always as it's friendlier with multiple .pck exports
for (int i = 0; i < path_remaps.size(); i += 2) {
String from = path_remaps[i];
String to = path_remaps[i + 1];
@@ -924,7 +884,6 @@ Error EditorExportPlatform::_add_shared_object(void *p_userdata, const SharedObj
}
Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, const String &p_path, Vector<SharedObject> *p_so_files, bool p_embed, int64_t *r_embedded_start, int64_t *r_embedded_size) {
-
EditorProgress ep("savepack", TTR("Packing"), 102, true);
String tmppath = EditorSettings::get_singleton()->get_cache_dir().plus_file("packtmp");
@@ -1009,7 +968,6 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c
int header_padding = _get_pad(PCK_PADDING, header_size);
for (int i = 0; i < pd.file_ofs.size(); i++) {
-
int string_len = pd.file_ofs[i].path_utf8.length();
int pad = _get_pad(4, string_len);
@@ -1041,10 +999,10 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c
uint8_t buf[bufsize];
while (true) {
-
int got = ftmp->get_buffer(buf, bufsize);
- if (got <= 0)
+ if (got <= 0) {
break;
+ }
f->store_buffer(buf, got);
}
@@ -1074,7 +1032,6 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c
}
Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
-
EditorProgress ep("savezip", TTR("Packing"), 102, true);
FileAccess *src_f;
@@ -1086,8 +1043,9 @@ Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, co
zd.zip = zip;
Error err = export_project_files(p_preset, _save_zip_file, &zd);
- if (err != OK && err != ERR_SKIP)
+ if (err != OK && err != ERR_SKIP) {
ERR_PRINT("Failed to export project files");
+ }
zipClose(zip, nullptr);
@@ -1105,12 +1063,12 @@ Error EditorExportPlatform::export_zip(const Ref<EditorExportPreset> &p_preset,
}
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
-
String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
- if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
+ if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST) {
host = "localhost";
+ }
if (p_flags & DEBUG_FLAG_DUMB_CLIENT) {
int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
@@ -1124,7 +1082,6 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
}
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {
-
r_flags.push_back("--remote-debug");
r_flags.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
@@ -1133,14 +1090,13 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
if (breakpoints.size()) {
-
r_flags.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
-
bpoints += E->get().replace(" ", "%20");
- if (E->next())
+ if (E->next()) {
bpoints += ",";
+ }
}
r_flags.push_back(bpoints);
@@ -1148,15 +1104,14 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
}
if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
-
r_flags.push_back("--debug-collisions");
}
if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) {
-
r_flags.push_back("--debug-navigation");
}
}
+
EditorExportPlatform::EditorExportPlatform() {
}
@@ -1165,11 +1120,9 @@ EditorExportPlatform::EditorExportPlatform() {
EditorExport *EditorExport::singleton = nullptr;
void EditorExport::_save() {
-
Ref<ConfigFile> config;
config.instance();
for (int i = 0; i < export_presets.size(); i++) {
-
Ref<EditorExportPreset> preset = export_presets[i];
String section = "preset." + itos(i);
@@ -1215,42 +1168,39 @@ void EditorExport::_save() {
}
void EditorExport::save_presets() {
-
- if (block_save)
+ if (block_save) {
return;
+ }
save_timer->start();
}
void EditorExport::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("export_presets_updated"));
}
void EditorExport::add_export_platform(const Ref<EditorExportPlatform> &p_platform) {
-
export_platforms.push_back(p_platform);
}
int EditorExport::get_export_platform_count() {
-
return export_platforms.size();
}
Ref<EditorExportPlatform> EditorExport::get_export_platform(int p_idx) {
-
ERR_FAIL_INDEX_V(p_idx, export_platforms.size(), Ref<EditorExportPlatform>());
return export_platforms[p_idx];
}
void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, int p_at_pos) {
-
- if (p_at_pos < 0)
+ if (p_at_pos < 0) {
export_presets.push_back(p_preset);
- else
+ } else {
export_presets.insert(p_at_pos, p_preset);
+ }
}
String EditorExportPlatform::test_etc2() const {
-
String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
bool etc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc");
bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2");
@@ -1265,62 +1215,60 @@ String EditorExportPlatform::test_etc2() const {
}
int EditorExport::get_export_preset_count() const {
-
return export_presets.size();
}
Ref<EditorExportPreset> EditorExport::get_export_preset(int p_idx) {
-
ERR_FAIL_INDEX_V(p_idx, export_presets.size(), Ref<EditorExportPreset>());
return export_presets[p_idx];
}
void EditorExport::remove_export_preset(int p_idx) {
-
export_presets.remove(p_idx);
save_presets();
}
void EditorExport::add_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
-
if (export_plugins.find(p_plugin) == -1) {
export_plugins.push_back(p_plugin);
}
}
void EditorExport::remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
-
export_plugins.erase(p_plugin);
}
Vector<Ref<EditorExportPlugin>> EditorExport::get_export_plugins() {
-
return export_plugins;
}
void EditorExport::_notification(int p_what) {
-
- if (p_what == NOTIFICATION_ENTER_TREE) {
- load_config();
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ load_config();
+ } break;
+ case NOTIFICATION_PROCESS: {
+ update_export_presets();
+ } break;
}
}
void EditorExport::load_config() {
-
Ref<ConfigFile> config;
config.instance();
Error err = config->load("res://export_presets.cfg");
- if (err != OK)
+ if (err != OK) {
return;
+ }
block_save = true;
int index = 0;
while (true) {
-
String section = "preset." + itos(index);
- if (!config->has_section(section))
+ if (!config->has_section(section)) {
break;
+ }
String platform = config->get_value(section, "platform");
@@ -1360,11 +1308,14 @@ void EditorExport::load_config() {
}
if (get_files) {
-
Vector<String> files = config->get_value(section, "export_files");
for (int i = 0; i < files.size(); i++) {
- preset->add_export_file(files[i]);
+ if (!FileAccess::exists(files[i])) {
+ preset->remove_export_file(files[i]);
+ } else {
+ preset->add_export_file(files[i]);
+ }
}
}
@@ -1392,7 +1343,6 @@ void EditorExport::load_config() {
config->get_section_keys(option_section, &options);
for (List<String>::Element *E = options.front(); E; E = E->next()) {
-
Variant value = config->get_value(option_section, E->get());
preset->set(E->get(), value);
@@ -1405,8 +1355,50 @@ void EditorExport::load_config() {
block_save = false;
}
-bool EditorExport::poll_export_platforms() {
+void EditorExport::update_export_presets() {
+ Map<StringName, List<EditorExportPlatform::ExportOption>> platform_options;
+
+ for (int i = 0; i < export_platforms.size(); i++) {
+ Ref<EditorExportPlatform> platform = export_platforms[i];
+
+ if (platform->should_update_export_options()) {
+ List<EditorExportPlatform::ExportOption> options;
+ platform->get_export_options(&options);
+
+ platform_options[platform->get_name()] = options;
+ }
+ }
+ bool export_presets_updated = false;
+ for (int i = 0; i < export_presets.size(); i++) {
+ Ref<EditorExportPreset> preset = export_presets[i];
+ if (platform_options.has(preset->get_platform()->get_name())) {
+ export_presets_updated = true;
+
+ List<EditorExportPlatform::ExportOption> options = platform_options[preset->get_platform()->get_name()];
+
+ // Copy the previous preset values
+ Map<StringName, Variant> previous_values = preset->values;
+
+ // Clear the preset properties and values prior to reloading
+ preset->properties.clear();
+ preset->values.clear();
+
+ for (List<EditorExportPlatform::ExportOption>::Element *E = options.front(); E; E = E->next()) {
+ preset->properties.push_back(E->get().option);
+
+ StringName option_name = E->get().option.name;
+ preset->values[option_name] = previous_values.has(option_name) ? previous_values[option_name] : E->get().default_value;
+ }
+ }
+ }
+
+ if (export_presets_updated) {
+ emit_signal(_export_presets_updated);
+ }
+}
+
+bool EditorExport::poll_export_platforms() {
bool changed = false;
for (int i = 0; i < export_platforms.size(); i++) {
if (export_platforms.write[i]->poll_export()) {
@@ -1418,7 +1410,6 @@ bool EditorExport::poll_export_platforms() {
}
EditorExport::EditorExport() {
-
save_timer = memnew(Timer);
add_child(save_timer);
save_timer->set_wait_time(0.8);
@@ -1426,7 +1417,10 @@ EditorExport::EditorExport() {
save_timer->connect("timeout", callable_mp(this, &EditorExport::_save));
block_save = false;
+ _export_presets_updated = "export_presets_updated";
+
singleton = this;
+ set_process(true);
}
EditorExport::~EditorExport() {
@@ -1435,7 +1429,6 @@ EditorExport::~EditorExport() {
//////////
void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
-
if (p_preset->get("texture_format/s3tc")) {
r_features->push_back("s3tc");
}
@@ -1454,7 +1447,6 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
}
void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
-
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/bptc"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
@@ -1467,21 +1459,18 @@ void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
}
String EditorExportPlatformPC::get_name() const {
-
return name;
}
String EditorExportPlatformPC::get_os_name() const {
-
return os_name;
}
-Ref<Texture2D> EditorExportPlatformPC::get_logo() const {
+Ref<Texture2D> EditorExportPlatformPC::get_logo() const {
return logo;
}
bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
-
String err;
bool valid = false;
@@ -1507,8 +1496,9 @@ bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset,
valid = dvalid || rvalid;
r_missing_templates = !valid;
- if (!err.empty())
+ if (!err.empty()) {
r_error = err;
+ }
return valid;
}
@@ -1544,7 +1534,6 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
template_path = template_path.strip_edges();
if (template_path == String()) {
-
if (p_preset->get("binary_format/64_bits")) {
if (p_debug) {
template_path = find_export_template(debug_file_64);
@@ -1583,7 +1572,6 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
int64_t embedded_size;
err = save_pack(p_preset, pck_path, &so_files, p_preset->get("binary_format/embed_pck"), &embedded_pos, &embedded_size);
if (err == OK && p_preset->get("binary_format/embed_pck")) {
-
if (embedded_size >= 0x100000000 && !p_preset->get("binary_format/64_bits")) {
EditorNode::get_singleton()->show_warning(TTR("On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."));
return ERR_INVALID_PARAMETER;
@@ -1632,25 +1620,22 @@ void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) {
}
void EditorExportPlatformPC::set_release_64(const String &p_file) {
-
release_file_64 = p_file;
}
void EditorExportPlatformPC::set_release_32(const String &p_file) {
-
release_file_32 = p_file;
}
-void EditorExportPlatformPC::set_debug_64(const String &p_file) {
+void EditorExportPlatformPC::set_debug_64(const String &p_file) {
debug_file_64 = p_file;
}
-void EditorExportPlatformPC::set_debug_32(const String &p_file) {
+void EditorExportPlatformPC::set_debug_32(const String &p_file) {
debug_file_32 = p_file;
}
void EditorExportPlatformPC::add_platform_feature(const String &p_feature) {
-
extra_features.insert(p_feature);
}
@@ -1664,7 +1649,6 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
}
void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
-
if (p_features.has("bptc")) {
if (p_preset->has("texture_format/no_bptc_fallbacks")) {
p_features.erase("s3tc");
@@ -1673,27 +1657,22 @@ void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<Edito
}
int EditorExportPlatformPC::get_chmod_flags() const {
-
return chmod_flags;
}
void EditorExportPlatformPC::set_chmod_flags(int p_flags) {
-
chmod_flags = p_flags;
}
EditorExportPlatformPC::FixUpEmbeddedPckFunc EditorExportPlatformPC::get_fixup_embedded_pck_func() const {
-
return fixup_embedded_pck_func;
}
void EditorExportPlatformPC::set_fixup_embedded_pck_func(FixUpEmbeddedPckFunc p_fixup_embedded_pck_func) {
-
fixup_embedded_pck_func = p_fixup_embedded_pck_func;
}
EditorExportPlatformPC::EditorExportPlatformPC() {
-
chmod_flags = -1;
fixup_embedded_pck_func = nullptr;
}
@@ -1701,15 +1680,15 @@ EditorExportPlatformPC::EditorExportPlatformPC() {
///////////////////////
void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {
-
String extension = p_path.get_extension().to_lower();
if (extension != "tres" && extension != "tscn") {
return;
}
bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export");
- if (!convert)
+ if (!convert) {
return;
+ }
String tmp_path = EditorSettings::get_singleton()->get_cache_dir().plus_file("tmpfile.res");
Error err = ResourceFormatLoaderText::convert_file_to_binary(p_path, tmp_path);
if (err != OK) {
@@ -1726,6 +1705,5 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con
}
EditorExportTextSceneToBinaryPlugin::EditorExportTextSceneToBinaryPlugin() {
-
GLOBAL_DEF("editor/convert_text_resources_to_binary_on_export", false);
}
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 50d1ff66c6..8ad8326f10 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -43,7 +43,6 @@ class EditorFileSystemDirectory;
struct EditorProgress;
class EditorExportPreset : public Reference {
-
GDCLASS(EditorExportPreset, Reference);
public:
@@ -61,14 +60,14 @@ public:
private:
Ref<EditorExportPlatform> platform;
- ExportFilter export_filter;
+ ExportFilter export_filter = EXPORT_ALL_RESOURCES;
String include_filter;
String exclude_filter;
String export_path;
String exporter;
Set<String> selected_files;
- bool runnable;
+ bool runnable = false;
Vector<String> patches;
@@ -82,7 +81,7 @@ private:
String custom_features;
- int script_mode;
+ int script_mode = MODE_SCRIPT_COMPILED;
String script_key;
protected:
@@ -95,6 +94,8 @@ public:
bool has(const StringName &p_property) const { return values.has(p_property); }
+ void update_files_to_export();
+
Vector<String> get_files_to_export() const;
void add_export_file(const String &p_path);
@@ -136,7 +137,7 @@ public:
const List<PropertyInfo> &get_properties() const { return properties; }
- EditorExportPreset();
+ EditorExportPreset() {}
};
struct SharedObject {
@@ -152,7 +153,6 @@ struct SharedObject {
};
class EditorExportPlatform : public Reference {
-
GDCLASS(EditorExportPlatform, Reference);
public:
@@ -161,7 +161,6 @@ public:
private:
struct SavedData {
-
uint64_t ofs;
uint64_t size;
Vector<uint8_t> md5;
@@ -173,7 +172,6 @@ private:
};
struct PackData {
-
FileAccess *f;
Vector<SavedData> file_ofs;
EditorProgress *ep;
@@ -181,7 +179,6 @@ private:
};
struct ZipData {
-
void *zip;
EditorProgress *ep;
};
@@ -232,6 +229,7 @@ public:
virtual Ref<EditorExportPreset> create_preset();
virtual void get_export_options(List<ExportOption> *r_options) = 0;
+ virtual bool should_update_export_options() { return false; }
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { return true; }
virtual String get_os_name() const = 0;
@@ -355,6 +353,8 @@ class EditorExport : public Node {
Vector<Ref<EditorExportPreset>> export_presets;
Vector<Ref<EditorExportPlugin>> export_plugins;
+ StringName _export_presets_updated;
+
Timer *save_timer;
bool block_save;
@@ -386,7 +386,7 @@ public:
Vector<Ref<EditorExportPlugin>> get_export_plugins();
void load_config();
-
+ void update_export_presets();
bool poll_export_platforms();
EditorExport();
@@ -394,7 +394,6 @@ public:
};
class EditorExportPlatformPC : public EditorExportPlatform {
-
GDCLASS(EditorExportPlatformPC, EditorExportPlatform);
public:
@@ -456,7 +455,6 @@ public:
};
class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin {
-
GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin);
public:
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index e2b79efb43..2a410c03e7 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "editor_feature_profile.h"
+
#include "core/io/json.h"
#include "core/os/dir_access.h"
#include "editor/editor_settings.h"
@@ -86,7 +87,6 @@ bool EditorFeatureProfile::is_class_editor_disabled(const StringName &p_class) c
}
void EditorFeatureProfile::set_disable_class_property(const StringName &p_class, const StringName &p_property, bool p_disabled) {
-
if (p_disabled) {
if (!disabled_properties.has(p_class)) {
disabled_properties[p_class] = Set<StringName>();
@@ -101,8 +101,8 @@ void EditorFeatureProfile::set_disable_class_property(const StringName &p_class,
}
}
}
-bool EditorFeatureProfile::is_class_property_disabled(const StringName &p_class, const StringName &p_property) const {
+bool EditorFeatureProfile::is_class_property_disabled(const StringName &p_class, const StringName &p_property) const {
if (!disabled_properties.has(p_class)) {
return false;
}
@@ -119,10 +119,10 @@ bool EditorFeatureProfile::has_class_properties_disabled(const StringName &p_cla
}
void EditorFeatureProfile::set_disable_feature(Feature p_feature, bool p_disable) {
-
ERR_FAIL_INDEX(p_feature, FEATURE_MAX);
features_disabled[p_feature] = p_disable;
}
+
bool EditorFeatureProfile::is_feature_disabled(Feature p_feature) const {
ERR_FAIL_INDEX_V(p_feature, FEATURE_MAX, false);
return features_disabled[p_feature];
@@ -134,7 +134,6 @@ String EditorFeatureProfile::get_feature_name(Feature p_feature) {
}
Error EditorFeatureProfile::save_to_file(const String &p_path) {
-
Dictionary json;
json["type"] = "feature_profile";
Array dis_classes;
@@ -180,7 +179,6 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) {
}
Error EditorFeatureProfile::load_from_file(const String &p_path) {
-
Error err;
String text = FileAccess::get_file_as_string(p_path, &err);
if (err != OK) {
@@ -232,7 +230,6 @@ Error EditorFeatureProfile::load_from_file(const String &p_path) {
}
if (json.has("disabled_features")) {
-
Array disabled_features_arr = json["disabled_features"];
for (int i = 0; i < FEATURE_MAX; i++) {
bool found = false;
@@ -253,7 +250,6 @@ Error EditorFeatureProfile::load_from_file(const String &p_path) {
}
void EditorFeatureProfile::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_disable_class", "class_name", "disable"), &EditorFeatureProfile::set_disable_class);
ClassDB::bind_method(D_METHOD("is_class_disabled", "class_name"), &EditorFeatureProfile::is_class_disabled);
@@ -282,7 +278,6 @@ void EditorFeatureProfile::_bind_methods() {
}
EditorFeatureProfile::EditorFeatureProfile() {
-
for (int i = 0; i < FEATURE_MAX; i++) {
features_disabled[i] = false;
}
@@ -292,7 +287,6 @@ EditorFeatureProfile::EditorFeatureProfile() {
void EditorFeatureProfileManager::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
-
current_profile = EDITOR_GET("_default_feature_profile");
if (current_profile != String()) {
current.instance();
@@ -317,7 +311,6 @@ String EditorFeatureProfileManager::_get_selected_profile() {
}
void EditorFeatureProfileManager::_update_profile_list(const String &p_select_profile) {
-
String selected_profile;
if (p_select_profile == String()) { //default, keep
if (profile_list->get_selected() >= 0) {
@@ -361,7 +354,7 @@ void EditorFeatureProfileManager::_update_profile_list(const String &p_select_pr
}
if (name == current_profile) {
- name += " (current)";
+ name += " " + TTR("(current)");
}
profile_list->add_item(name);
int index = profile_list->get_item_count() - 1;
@@ -371,21 +364,22 @@ void EditorFeatureProfileManager::_update_profile_list(const String &p_select_pr
}
}
+ class_list_vbc->set_visible(selected_profile != String());
+ property_list_vbc->set_visible(selected_profile != String());
+ no_profile_selected_help->set_visible(selected_profile == String());
profile_actions[PROFILE_CLEAR]->set_disabled(current_profile == String());
profile_actions[PROFILE_ERASE]->set_disabled(selected_profile == String());
profile_actions[PROFILE_EXPORT]->set_disabled(selected_profile == String());
profile_actions[PROFILE_SET]->set_disabled(selected_profile == String());
- current_profile_name->set_text(current_profile);
+ current_profile_name->set_text(current_profile != String() ? current_profile : TTR("(none)"));
_update_selected_profile();
}
void EditorFeatureProfileManager::_profile_action(int p_action) {
-
switch (p_action) {
case PROFILE_CLEAR: {
-
EditorSettings::get_singleton()->set("_default_feature_profile", "");
EditorSettings::get_singleton()->save();
current_profile = "";
@@ -395,7 +389,6 @@ void EditorFeatureProfileManager::_profile_action(int p_action) {
_emit_current_profile_changed();
} break;
case PROFILE_SET: {
-
String selected = _get_selected_profile();
ERR_FAIL_COND(selected == String());
if (selected == current_profile) {
@@ -410,22 +403,18 @@ void EditorFeatureProfileManager::_profile_action(int p_action) {
_emit_current_profile_changed();
} break;
case PROFILE_IMPORT: {
-
import_profiles->popup_centered_ratio();
} break;
case PROFILE_EXPORT: {
-
export_profile->popup_centered_ratio();
export_profile->set_current_file(_get_selected_profile() + ".profile");
} break;
case PROFILE_NEW: {
-
new_profile_dialog->popup_centered();
new_profile_name->clear();
new_profile_name->grab_focus();
} break;
case PROFILE_ERASE: {
-
String selected = _get_selected_profile();
ERR_FAIL_COND(selected == String());
@@ -436,7 +425,6 @@ void EditorFeatureProfileManager::_profile_action(int p_action) {
}
void EditorFeatureProfileManager::_erase_selected_profile() {
-
String selected = _get_selected_profile();
ERR_FAIL_COND(selected == String());
DirAccessRef da = DirAccess::open(EditorSettings::get_singleton()->get_feature_profiles_dir());
@@ -467,15 +455,17 @@ void EditorFeatureProfileManager::_create_new_profile() {
new_profile->save_to_file(file);
_update_profile_list(name);
+ // The newly created profile is the first one, make it the current profile automatically.
+ if (profile_list->get_item_count() == 1) {
+ _profile_action(PROFILE_SET);
+ }
}
void EditorFeatureProfileManager::_profile_selected(int p_what) {
-
_update_selected_profile();
}
void EditorFeatureProfileManager::_fill_classes_from(TreeItem *p_parent, const String &p_class, const String &p_selected) {
-
TreeItem *class_item = class_list->create_item(p_parent);
class_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
class_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_class, "Node"));
@@ -522,9 +512,9 @@ void EditorFeatureProfileManager::_fill_classes_from(TreeItem *p_parent, const S
}
void EditorFeatureProfileManager::_class_list_item_selected() {
-
- if (updating_features)
+ if (updating_features) {
return;
+ }
property_list->clear();
@@ -567,10 +557,10 @@ void EditorFeatureProfileManager::_class_list_item_selected() {
ClassDB::get_property_list(class_name, &props, true);
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
-
String name = E->get().name;
- if (!(E->get().usage & PROPERTY_USAGE_EDITOR))
+ if (!(E->get().usage & PROPERTY_USAGE_EDITOR)) {
continue;
+ }
TreeItem *property = property_list->create_item(properties);
property->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
property->set_editable(0, true);
@@ -586,9 +576,9 @@ void EditorFeatureProfileManager::_class_list_item_selected() {
}
void EditorFeatureProfileManager::_class_list_item_edited() {
-
- if (updating_features)
+ if (updating_features) {
return;
+ }
TreeItem *item = class_list->get_edited();
if (!item) {
@@ -611,8 +601,9 @@ void EditorFeatureProfileManager::_class_list_item_edited() {
}
void EditorFeatureProfileManager::_property_item_edited() {
- if (updating_features)
+ if (updating_features) {
return;
+ }
TreeItem *class_item = class_list->get_selected();
if (!class_item) {
@@ -651,7 +642,6 @@ void EditorFeatureProfileManager::_property_item_edited() {
}
void EditorFeatureProfileManager::_update_selected_profile() {
-
String class_selected;
int feature_selected = -1;
@@ -690,7 +680,6 @@ void EditorFeatureProfileManager::_update_selected_profile() {
TreeItem *features = class_list->create_item(root);
features->set_text(0, TTR("Enabled Features:"));
for (int i = 0; i < EditorFeatureProfile::FEATURE_MAX; i++) {
-
TreeItem *feature = class_list->create_item(features);
feature->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
feature->set_text(0, TTRGET(EditorFeatureProfile::get_feature_name(EditorFeatureProfile::Feature(i))));
@@ -718,7 +707,6 @@ void EditorFeatureProfileManager::_update_selected_profile() {
}
void EditorFeatureProfileManager::_import_profiles(const Vector<String> &p_paths) {
-
//test it first
for (int i = 0; i < p_paths.size(); i++) {
Ref<EditorFeatureProfile> profile;
@@ -750,10 +738,13 @@ void EditorFeatureProfileManager::_import_profiles(const Vector<String> &p_paths
}
_update_profile_list();
+ // The newly imported profile is the first one, make it the current profile automatically.
+ if (profile_list->get_item_count() == 1) {
+ _profile_action(PROFILE_SET);
+ }
}
void EditorFeatureProfileManager::_export_profile(const String &p_path) {
-
ERR_FAIL_COND(edited.is_null());
Error err = edited->save_to_file(p_path);
if (err != OK) {
@@ -762,7 +753,6 @@ void EditorFeatureProfileManager::_export_profile(const String &p_path) {
}
void EditorFeatureProfileManager::_save_and_update() {
-
String edited_path = _get_selected_profile();
ERR_FAIL_COND(edited_path == String());
ERR_FAIL_COND(edited.is_null());
@@ -775,7 +765,6 @@ void EditorFeatureProfileManager::_save_and_update() {
}
void EditorFeatureProfileManager::_emit_current_profile_changed() {
-
emit_signal("current_feature_profile_changed");
}
@@ -790,20 +779,19 @@ Ref<EditorFeatureProfile> EditorFeatureProfileManager::get_current_profile() {
EditorFeatureProfileManager *EditorFeatureProfileManager::singleton = nullptr;
void EditorFeatureProfileManager::_bind_methods() {
-
ClassDB::bind_method("_update_selected_profile", &EditorFeatureProfileManager::_update_selected_profile);
ADD_SIGNAL(MethodInfo("current_feature_profile_changed"));
}
EditorFeatureProfileManager::EditorFeatureProfileManager() {
-
VBoxContainer *main_vbc = memnew(VBoxContainer);
add_child(main_vbc);
HBoxContainer *name_hbc = memnew(HBoxContainer);
current_profile_name = memnew(LineEdit);
name_hbc->add_child(current_profile_name);
+ current_profile_name->set_text(TTR("(none)"));
current_profile_name->set_editable(false);
current_profile_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Unset")));
@@ -852,7 +840,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
h_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
main_vbc->add_child(h_split);
- VBoxContainer *class_list_vbc = memnew(VBoxContainer);
+ class_list_vbc = memnew(VBoxContainer);
h_split->add_child(class_list_vbc);
class_list_vbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -862,17 +850,30 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
class_list->connect("cell_selected", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_selected));
class_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_edited), varray(), CONNECT_DEFERRED);
+ // It will be displayed once the user creates or chooses a profile.
+ class_list_vbc->hide();
- VBoxContainer *property_list_vbc = memnew(VBoxContainer);
+ property_list_vbc = memnew(VBoxContainer);
h_split->add_child(property_list_vbc);
property_list_vbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
property_list = memnew(Tree);
- property_list_vbc->add_margin_child(TTR("Class Options"), property_list, true);
+ property_list_vbc->add_margin_child(TTR("Class Options:"), property_list, true);
property_list->set_hide_root(true);
property_list->set_hide_folding(true);
property_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
property_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_property_item_edited), varray(), CONNECT_DEFERRED);
+ // It will be displayed once the user creates or chooses a profile.
+ property_list_vbc->hide();
+
+ no_profile_selected_help = memnew(Label(TTR("Create or import a profile to edit available classes and properties.")));
+ // Add some spacing above the help label.
+ Ref<StyleBoxEmpty> sb = memnew(StyleBoxEmpty);
+ sb->set_default_margin(MARGIN_TOP, 20 * EDSCALE);
+ no_profile_selected_help->add_theme_style_override("normal", sb);
+ no_profile_selected_help->set_align(Label::ALIGN_CENTER);
+ no_profile_selected_help->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ h_split->add_child(no_profile_selected_help);
new_profile_dialog = memnew(ConfirmationDialog);
new_profile_dialog->set_title(TTR("New profile name:"));
diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h
index 5ae2398027..38413e35a2 100644
--- a/editor/editor_feature_profile.h
+++ b/editor/editor_feature_profile.h
@@ -94,7 +94,6 @@ public:
VARIANT_ENUM_CAST(EditorFeatureProfile::Feature)
class EditorFeatureProfileManager : public AcceptDialog {
-
GDCLASS(EditorFeatureProfileManager, AcceptDialog);
enum Action {
@@ -121,8 +120,11 @@ class EditorFeatureProfileManager : public AcceptDialog {
HSplitContainer *h_split;
+ VBoxContainer *class_list_vbc;
Tree *class_list;
+ VBoxContainer *property_list_vbc;
Tree *property_list;
+ Label *no_profile_selected_help;
EditorFileDialog *import_profiles;
EditorFileDialog *export_profile;
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 2411852541..5ae5d1cb31 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -55,9 +55,7 @@ VBoxContainer *EditorFileDialog::get_vbox() {
}
void EditorFileDialog::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
// update icons
mode_thumbnails->set_icon(item_list->get_theme_icon("FileThumbnail", "EditorIcons"));
mode_list->set_icon(item_list->get_theme_icon("FileList", "EditorIcons"));
@@ -72,13 +70,13 @@ void EditorFileDialog::_notification(int p_what) {
fav_down->set_icon(item_list->get_theme_icon("MoveDown", "EditorIcons"));
} else if (p_what == NOTIFICATION_PROCESS) {
-
if (preview_waiting) {
preview_wheel_timeout -= get_process_delta_time();
if (preview_wheel_timeout <= 0) {
preview_wheel_index++;
- if (preview_wheel_index >= 8)
+ if (preview_wheel_index >= 8) {
preview_wheel_index = 0;
+ }
Ref<Texture2D> frame = item_list->get_theme_icon("Progress" + itos(preview_wheel_index + 1), "EditorIcons");
preview->set_texture(frame);
preview_wheel_timeout = 0.1;
@@ -86,10 +84,10 @@ void EditorFileDialog::_notification(int p_what) {
}
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
-
bool is_showing_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
- if (show_hidden_files != is_showing_hidden)
+ if (show_hidden_files != is_showing_hidden) {
set_show_hidden_files(is_showing_hidden);
+ }
set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
// update icons
@@ -106,7 +104,6 @@ void EditorFileDialog::_notification(int p_what) {
// DO NOT CALL UPDATE FILE LIST HERE, ALL HUNDREDS OF HIDDEN DIALOGS WILL RESPOND, CALL INVALIDATE INSTEAD
invalidate();
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
-
if (!is_visible()) {
set_process_unhandled_input(false);
}
@@ -114,13 +111,10 @@ void EditorFileDialog::_notification(int p_what) {
}
void EditorFileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
-
if (k->is_pressed()) {
-
bool handled = false;
if (ED_IS_SHORTCUT("file_dialog/go_back", p_event)) {
@@ -186,22 +180,20 @@ void EditorFileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
}
void EditorFileDialog::set_enable_multiple_selection(bool p_enable) {
-
item_list->set_select_mode(p_enable ? ItemList::SELECT_MULTI : ItemList::SELECT_SINGLE);
};
Vector<String> EditorFileDialog::get_selected_files() const {
-
Vector<String> list;
for (int i = 0; i < item_list->get_item_count(); i++) {
- if (item_list->is_selected(i))
+ if (item_list->is_selected(i)) {
list.push_back(item_list->get_item_text(i));
+ }
}
return list;
};
void EditorFileDialog::update_dir() {
-
if (drives->is_visible()) {
drives->select(dir_access->get_current_drive());
}
@@ -210,7 +202,6 @@ void EditorFileDialog::update_dir() {
// Disable "Open" button only when selecting file(s) mode.
get_ok()->set_disabled(_is_open_should_be_disabled());
switch (mode) {
-
case FILE_MODE_OPEN_FILE:
case FILE_MODE_OPEN_FILES:
get_ok()->set_text(TTR("Open"));
@@ -226,7 +217,6 @@ void EditorFileDialog::update_dir() {
}
void EditorFileDialog::_dir_entered(String p_dir) {
-
dir_access->change_dir(p_dir);
file->set_text("");
invalidate();
@@ -235,12 +225,10 @@ void EditorFileDialog::_dir_entered(String p_dir) {
}
void EditorFileDialog::_file_entered(const String &p_file) {
-
_action_pressed();
}
void EditorFileDialog::_save_confirm_pressed() {
-
String f = dir_access->get_current_dir().plus_file(file->get_text());
_save_to_recent();
hide();
@@ -248,16 +236,16 @@ void EditorFileDialog::_save_confirm_pressed() {
}
void EditorFileDialog::_post_popup() {
-
ConfirmationDialog::_post_popup();
if (invalidated) {
update_file_list();
invalidated = false;
}
- if (mode == FILE_MODE_SAVE_FILE)
+ if (mode == FILE_MODE_SAVE_FILE) {
file->grab_focus();
- else
+ } else {
item_list->grab_focus();
+ }
if (mode == FILE_MODE_OPEN_DIR) {
file_box->set_visible(false);
@@ -265,8 +253,9 @@ void EditorFileDialog::_post_popup() {
file_box->set_visible(true);
}
- if (is_visible() && get_current_file() != "")
+ if (is_visible() && get_current_file() != "") {
_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
+ }
if (is_visible()) {
Ref<Texture2D> folder = item_list->get_theme_icon("folder", "FileDialog");
@@ -277,8 +266,9 @@ void EditorFileDialog::_post_popup() {
Vector<String> recentd = EditorSettings::get_singleton()->get_recent_dirs();
for (int i = 0; i < recentd.size(); i++) {
bool cres = recentd[i].begins_with("res://");
- if (cres != res)
+ if (cres != res) {
continue;
+ }
String name = recentd[i];
if (res && name == "res://") {
name = "/";
@@ -302,9 +292,9 @@ void EditorFileDialog::_post_popup() {
}
void EditorFileDialog::_thumbnail_result(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata) {
-
- if (display_mode == DISPLAY_LIST || p_preview.is_null())
+ if (display_mode == DISPLAY_LIST || p_preview.is_null()) {
return;
+ }
for (int i = 0; i < item_list->get_item_count(); i++) {
Dictionary d = item_list->get_item_metadata(i);
@@ -317,12 +307,10 @@ void EditorFileDialog::_thumbnail_result(const String &p_path, const Ref<Texture
}
void EditorFileDialog::_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata) {
-
set_process(false);
preview_waiting = false;
if (p_preview.is_valid() && get_current_path() == p_path) {
-
preview->set_texture(p_preview);
if (display_mode == DISPLAY_THUMBNAILS) {
preview_vb->hide();
@@ -337,9 +325,9 @@ void EditorFileDialog::_thumbnail_done(const String &p_path, const Ref<Texture2D
}
void EditorFileDialog::_request_single_thumbnail(const String &p_path) {
-
- if (!FileAccess::exists(p_path))
+ if (!FileAccess::exists(p_path)) {
return;
+ }
set_process(true);
preview_waiting = true;
@@ -348,15 +336,14 @@ void EditorFileDialog::_request_single_thumbnail(const String &p_path) {
}
void EditorFileDialog::_action_pressed() {
-
if (mode == FILE_MODE_OPEN_FILES) {
-
String fbase = dir_access->get_current_dir();
Vector<String> files;
for (int i = 0; i < item_list->get_item_count(); i++) {
- if (item_list->is_selected(i))
+ if (item_list->is_selected(i)) {
files.push_back(fbase.plus_file(item_list->get_item_text(i)));
+ }
}
if (files.size()) {
@@ -375,7 +362,6 @@ void EditorFileDialog::_action_pressed() {
hide();
emit_signal("file_selected", f);
} else if (mode == FILE_MODE_OPEN_ANY || mode == FILE_MODE_OPEN_DIR) {
-
String path = dir_access->get_current_dir();
path = path.replace("\\", "/");
@@ -397,7 +383,6 @@ void EditorFileDialog::_action_pressed() {
}
if (mode == FILE_MODE_SAVE_FILE) {
-
bool valid = false;
if (filter->get_selected() == filter->get_item_count() - 1) {
@@ -405,29 +390,27 @@ void EditorFileDialog::_action_pressed() {
} else if (filters.size() > 1 && filter->get_selected() == 0) {
// match all filters
for (int i = 0; i < filters.size(); i++) {
-
String flt = filters[i].get_slice(";", 0);
for (int j = 0; j < flt.get_slice_count(","); j++) {
-
String str = flt.get_slice(",", j).strip_edges();
if (f.match(str)) {
valid = true;
break;
}
}
- if (valid)
+ if (valid) {
break;
+ }
}
} else {
int idx = filter->get_selected();
- if (filters.size() > 1)
+ if (filters.size() > 1) {
idx--;
+ }
if (idx >= 0 && idx < filters.size()) {
-
String flt = filters[idx].get_slice(";", 0);
int filterSliceCount = flt.get_slice_count(",");
for (int j = 0; j < filterSliceCount; j++) {
-
String str = (flt.get_slice(",", j).strip_edges());
if (f.match(str)) {
valid = true;
@@ -448,7 +431,6 @@ void EditorFileDialog::_action_pressed() {
}
if (!valid) {
-
exterr->popup_centered(Size2(250, 80) * EDSCALE);
return;
}
@@ -457,7 +439,6 @@ void EditorFileDialog::_action_pressed() {
confirm_save->set_text(TTR("File Exists, Overwrite?"));
confirm_save->popup_centered(Size2(200, 80));
} else {
-
_save_to_recent();
hide();
emit_signal("file_selected", f);
@@ -466,22 +447,20 @@ void EditorFileDialog::_action_pressed() {
}
void EditorFileDialog::_cancel_pressed() {
-
file->set_text("");
invalidate();
hide();
}
void EditorFileDialog::_item_selected(int p_item) {
-
int current = p_item;
- if (current < 0 || current >= item_list->get_item_count())
+ if (current < 0 || current >= item_list->get_item_count()) {
return;
+ }
Dictionary d = item_list->get_item_metadata(current);
if (!d["dir"]) {
-
file->set_text(d["name"]);
_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
} else if (mode == FILE_MODE_OPEN_DIR) {
@@ -492,15 +471,14 @@ void EditorFileDialog::_item_selected(int p_item) {
}
void EditorFileDialog::_multi_selected(int p_item, bool p_selected) {
-
int current = p_item;
- if (current < 0 || current >= item_list->get_item_count())
+ if (current < 0 || current >= item_list->get_item_count()) {
return;
+ }
Dictionary d = item_list->get_item_metadata(current);
if (!d["dir"] && p_selected) {
-
file->set_text(d["name"]);
_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
}
@@ -509,12 +487,10 @@ void EditorFileDialog::_multi_selected(int p_item, bool p_selected) {
}
void EditorFileDialog::_items_clear_selection() {
-
item_list->unselect_all();
// If nothing is selected, then block Open button.
switch (mode) {
-
case FILE_MODE_OPEN_FILE:
case FILE_MODE_OPEN_FILES:
get_ok()->set_text(TTR("Open"));
@@ -534,7 +510,6 @@ void EditorFileDialog::_items_clear_selection() {
}
void EditorFileDialog::_push_history() {
-
local_history.resize(local_history_pos + 1);
String new_path = dir_access->get_current_dir();
if (local_history.size() == 0 || new_path != local_history[local_history_pos]) {
@@ -544,16 +519,16 @@ void EditorFileDialog::_push_history() {
dir_next->set_disabled(true);
}
}
-void EditorFileDialog::_item_dc_selected(int p_item) {
+void EditorFileDialog::_item_dc_selected(int p_item) {
int current = p_item;
- if (current < 0 || current >= item_list->get_item_count())
+ if (current < 0 || current >= item_list->get_item_count()) {
return;
+ }
Dictionary d = item_list->get_item_metadata(current);
if (d["dir"]) {
-
dir_access->change_dir(d["name"]);
call_deferred("_update_file_list");
call_deferred("_update_dir");
@@ -561,13 +536,11 @@ void EditorFileDialog::_item_dc_selected(int p_item) {
_push_history();
} else {
-
_action_pressed();
}
}
void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p_pos) {
-
// Right click on specific file(s) or folder(s).
item_menu->clear();
item_menu->set_size(Size2(1, 1));
@@ -608,7 +581,6 @@ void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p
}
void EditorFileDialog::_item_list_rmb_clicked(const Vector2 &p_pos) {
-
// Right click on folder background. Deselect all files so that actions are applied on the current folder.
for (int i = 0; i < item_list->get_item_count(); i++) {
item_list->unselect(i);
@@ -629,9 +601,7 @@ void EditorFileDialog::_item_list_rmb_clicked(const Vector2 &p_pos) {
}
void EditorFileDialog::_item_menu_id_pressed(int p_option) {
-
switch (p_option) {
-
case ITEM_MENU_COPY_PATH: {
Dictionary item_meta = item_list->get_item_metadata(item_list->get_current());
DisplayServer::get_singleton()->clipboard_set(item_meta["path"]);
@@ -669,20 +639,21 @@ void EditorFileDialog::_item_menu_id_pressed(int p_option) {
}
bool EditorFileDialog::_is_open_should_be_disabled() {
-
- if (mode == FILE_MODE_OPEN_ANY || mode == FILE_MODE_SAVE_FILE)
+ if (mode == FILE_MODE_OPEN_ANY || mode == FILE_MODE_SAVE_FILE) {
return false;
+ }
Vector<int> items = item_list->get_selected_items();
- if (items.size() == 0)
+ if (items.size() == 0) {
return mode != FILE_MODE_OPEN_DIR; // In "Open folder" mode, having nothing selected picks the current folder.
+ }
for (int i = 0; i < items.size(); i++) {
-
Dictionary d = item_list->get_item_metadata(items.get(i));
- if (((mode == FILE_MODE_OPEN_FILE || mode == FILE_MODE_OPEN_FILES) && d["dir"]) || (mode == FILE_MODE_OPEN_DIR && !d["dir"]))
+ if (((mode == FILE_MODE_OPEN_FILE || mode == FILE_MODE_OPEN_FILES) && d["dir"]) || (mode == FILE_MODE_OPEN_DIR && !d["dir"])) {
return true;
+ }
}
return false;
@@ -691,8 +662,9 @@ bool EditorFileDialog::_is_open_should_be_disabled() {
void EditorFileDialog::update_file_name() {
int idx = filter->get_selected() - 1;
if ((idx == -1 && filter->get_item_count() == 2) || (filter->get_item_count() > 2 && idx >= 0 && idx < filter->get_item_count() - 2)) {
- if (idx == -1)
+ if (idx == -1) {
idx += 1;
+ }
String filter_str = filters[idx];
String file_str = file->get_text();
String base_name = file_str.get_basename();
@@ -708,7 +680,6 @@ void EditorFileDialog::update_file_name() {
// DO NOT USE THIS FUNCTION UNLESS NEEDED, CALL INVALIDATE() INSTEAD.
void EditorFileDialog::update_file_list() {
-
int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
Ref<Texture2D> folder_thumbnail;
@@ -720,7 +691,6 @@ void EditorFileDialog::update_file_list() {
item_list->get_v_scroll()->set_value(0);
if (display_mode == DISPLAY_THUMBNAILS) {
-
item_list->set_max_columns(0);
item_list->set_icon_mode(ItemList::ICON_MODE_TOP);
item_list->set_fixed_column_width(thumbnail_size * 3 / 2);
@@ -738,14 +708,14 @@ void EditorFileDialog::update_file_list() {
preview_vb->hide();
} else {
-
item_list->set_icon_mode(ItemList::ICON_MODE_LEFT);
item_list->set_max_columns(1);
item_list->set_max_text_lines(1);
item_list->set_fixed_column_width(0);
item_list->set_fixed_icon_size(Size2());
- if (preview->get_texture().is_valid())
+ if (preview->get_texture().is_valid()) {
preview_vb->show();
+ }
}
String cdir = dir_access->get_current_dir();
@@ -760,15 +730,16 @@ void EditorFileDialog::update_file_list() {
String item;
while ((item = dir_access->get_next()) != "") {
-
- if (item == "." || item == "..")
+ if (item == "." || item == "..") {
continue;
+ }
if (show_hidden_files || !dir_access->current_is_hidden()) {
- if (!dir_access->current_is_dir())
+ if (!dir_access->current_is_dir()) {
files.push_back(item);
- else
+ } else {
dirs.push_back(item);
+ }
}
}
@@ -781,10 +752,8 @@ void EditorFileDialog::update_file_list() {
item_list->add_item(dir_name);
if (display_mode == DISPLAY_THUMBNAILS) {
-
item_list->set_item_icon(item_list->get_item_count() - 1, folder_thumbnail);
} else {
-
item_list->set_item_icon(item_list->get_item_count() - 1, folder);
}
@@ -802,55 +771,45 @@ void EditorFileDialog::update_file_list() {
List<String> patterns;
// build filter
if (filter->get_selected() == filter->get_item_count() - 1) {
-
// match all
} else if (filters.size() > 1 && filter->get_selected() == 0) {
// match all filters
for (int i = 0; i < filters.size(); i++) {
-
String f = filters[i].get_slice(";", 0);
for (int j = 0; j < f.get_slice_count(","); j++) {
-
patterns.push_back(f.get_slice(",", j).strip_edges());
}
}
} else {
int idx = filter->get_selected();
- if (filters.size() > 1)
+ if (filters.size() > 1) {
idx--;
+ }
if (idx >= 0 && idx < filters.size()) {
-
String f = filters[idx].get_slice(";", 0);
for (int j = 0; j < f.get_slice_count(","); j++) {
-
patterns.push_back(f.get_slice(",", j).strip_edges());
}
}
}
while (!files.empty()) {
-
bool match = patterns.empty();
for (List<String>::Element *E = patterns.front(); E; E = E->next()) {
-
if (files.front()->get().matchn(E->get())) {
-
match = true;
break;
}
}
if (match) {
-
item_list->add_item(files.front()->get());
if (get_icon_func) {
-
Ref<Texture2D> icon = get_icon_func(cdir.plus_file(files.front()->get()));
if (display_mode == DISPLAY_THUMBNAILS) {
-
item_list->set_item_icon(item_list->get_item_count() - 1, file_thumbnail);
item_list->set_item_tag_icon(item_list->get_item_count() - 1, icon);
} else {
@@ -869,8 +828,9 @@ void EditorFileDialog::update_file_list() {
EditorResourcePreview::get_singleton()->queue_resource_preview(fullpath, this, "_thumbnail_result", fullpath);
}
- if (file->get_text() == files.front()->get())
+ if (file->get_text() == files.front()->get()) {
item_list->set_current(item_list->get_item_count() - 1);
+ }
}
files.pop_front();
@@ -905,7 +865,6 @@ void EditorFileDialog::_filter_selected(int) {
}
void EditorFileDialog::update_filters() {
-
filter->clear();
if (filters.size() > 1) {
@@ -915,64 +874,65 @@ void EditorFileDialog::update_filters() {
for (int i = 0; i < MIN(max_filters, filters.size()); i++) {
String flt = filters[i].get_slice(";", 0).strip_edges();
- if (i > 0)
+ if (i > 0) {
all_filters += ", ";
+ }
all_filters += flt;
}
- if (max_filters < filters.size())
+ if (max_filters < filters.size()) {
all_filters += ", ...";
+ }
filter->add_item(TTR("All Recognized") + " (" + all_filters + ")");
}
for (int i = 0; i < filters.size(); i++) {
-
String flt = filters[i].get_slice(";", 0).strip_edges();
String desc = filters[i].get_slice(";", 1).strip_edges();
- if (desc.length())
+ if (desc.length()) {
filter->add_item(desc + " (" + flt + ")");
- else
+ } else {
filter->add_item("(" + flt + ")");
+ }
}
filter->add_item(TTR("All Files (*)"));
}
void EditorFileDialog::clear_filters() {
-
filters.clear();
update_filters();
invalidate();
}
-void EditorFileDialog::add_filter(const String &p_filter) {
+void EditorFileDialog::add_filter(const String &p_filter) {
filters.push_back(p_filter);
update_filters();
invalidate();
}
String EditorFileDialog::get_current_dir() const {
-
return dir_access->get_current_dir();
}
-String EditorFileDialog::get_current_file() const {
+String EditorFileDialog::get_current_file() const {
return file->get_text();
}
-String EditorFileDialog::get_current_path() const {
+String EditorFileDialog::get_current_path() const {
return dir_access->get_current_dir().plus_file(file->get_text());
}
-void EditorFileDialog::set_current_dir(const String &p_dir) {
- if (p_dir.is_rel_path())
+void EditorFileDialog::set_current_dir(const String &p_dir) {
+ if (p_dir.is_rel_path()) {
dir_access->change_dir(OS::get_singleton()->get_resource_dir());
+ }
dir_access->change_dir(p_dir);
update_dir();
invalidate();
}
-void EditorFileDialog::set_current_file(const String &p_file) {
+void EditorFileDialog::set_current_file(const String &p_file) {
file->set_text(p_file);
update_dir();
invalidate();
@@ -982,19 +942,19 @@ void EditorFileDialog::set_current_file(const String &p_file) {
file->grab_focus();
}
- if (is_visible())
+ if (is_visible()) {
_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
+ }
}
-void EditorFileDialog::set_current_path(const String &p_path) {
- if (!p_path.size())
+void EditorFileDialog::set_current_path(const String &p_path) {
+ if (!p_path.size()) {
return;
+ }
int pos = MAX(p_path.find_last("/"), p_path.find_last("\\"));
if (pos == -1) {
-
set_current_file(p_path);
} else {
-
String dir = p_path.substr(0, pos);
String file = p_path.substr(pos + 1, p_path.length());
set_current_dir(dir);
@@ -1003,10 +963,8 @@ void EditorFileDialog::set_current_path(const String &p_path) {
}
void EditorFileDialog::set_file_mode(FileMode p_mode) {
-
mode = p_mode;
switch (mode) {
-
case FILE_MODE_OPEN_FILE:
get_ok()->set_text(TTR("Open"));
set_title(TTR("Open a File"));
@@ -1048,27 +1006,23 @@ void EditorFileDialog::set_file_mode(FileMode p_mode) {
}
EditorFileDialog::FileMode EditorFileDialog::get_file_mode() const {
-
return mode;
}
void EditorFileDialog::set_access(Access p_access) {
-
ERR_FAIL_INDEX(p_access, 3);
- if (access == p_access)
+ if (access == p_access) {
return;
+ }
memdelete(dir_access);
switch (p_access) {
case ACCESS_FILESYSTEM: {
-
dir_access = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
} break;
case ACCESS_RESOURCES: {
-
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
} break;
case ACCESS_USERDATA: {
-
dir_access = DirAccess::create(DirAccess::ACCESS_USERDATA);
} break;
}
@@ -1080,7 +1034,6 @@ void EditorFileDialog::set_access(Access p_access) {
}
void EditorFileDialog::invalidate() {
-
if (is_visible()) {
update_file_list();
_update_favorites();
@@ -1091,12 +1044,10 @@ void EditorFileDialog::invalidate() {
}
EditorFileDialog::Access EditorFileDialog::get_access() const {
-
return access;
}
void EditorFileDialog::_make_dir_confirm() {
-
Error err = dir_access->make_dir(makedirname->get_text());
if (err == OK) {
dir_access->change_dir(makedirname->get_text());
@@ -1112,13 +1063,11 @@ void EditorFileDialog::_make_dir_confirm() {
}
void EditorFileDialog::_make_dir() {
-
makedialog->popup_centered(Size2(250, 80) * EDSCALE);
makedirname->grab_focus();
}
void EditorFileDialog::_delete_items() {
-
// Collect the selected folders and files to delete and check them in the deletion dependency dialog.
Vector<String> folders;
Vector<String> files;
@@ -1140,7 +1089,6 @@ void EditorFileDialog::_delete_items() {
}
void EditorFileDialog::_select_drive(int p_idx) {
-
String d = drives->get_item_text(p_idx);
dir_access->change_dir(d);
file->set_text("");
@@ -1150,7 +1098,6 @@ void EditorFileDialog::_select_drive(int p_idx) {
}
void EditorFileDialog::_update_drives() {
-
int dc = dir_access->get_drive_count();
if (dc == 0 || access != ACCESS_FILESYSTEM) {
drives->hide();
@@ -1174,7 +1121,6 @@ void EditorFileDialog::_update_drives() {
}
void EditorFileDialog::_favorite_selected(int p_idx) {
-
dir_access->change_dir(favorites->get_item_metadata(p_idx));
file->set_text("");
update_dir();
@@ -1183,7 +1129,6 @@ void EditorFileDialog::_favorite_selected(int p_idx) {
}
void EditorFileDialog::_favorite_move_up() {
-
int current = favorites->get_current();
if (current > 0 && current < favorites->get_item_count()) {
@@ -1192,8 +1137,9 @@ void EditorFileDialog::_favorite_move_up() {
int a_idx = favorited.find(String(favorites->get_item_metadata(current - 1)));
int b_idx = favorited.find(String(favorites->get_item_metadata(current)));
- if (a_idx == -1 || b_idx == -1)
+ if (a_idx == -1 || b_idx == -1) {
return;
+ }
SWAP(favorited.write[a_idx], favorited.write[b_idx]);
EditorSettings::get_singleton()->set_favorites(favorited);
@@ -1202,8 +1148,8 @@ void EditorFileDialog::_favorite_move_up() {
update_file_list();
}
}
-void EditorFileDialog::_favorite_move_down() {
+void EditorFileDialog::_favorite_move_down() {
int current = favorites->get_current();
if (current >= 0 && current < favorites->get_item_count() - 1) {
@@ -1212,8 +1158,9 @@ void EditorFileDialog::_favorite_move_down() {
int a_idx = favorited.find(String(favorites->get_item_metadata(current + 1)));
int b_idx = favorited.find(String(favorites->get_item_metadata(current)));
- if (a_idx == -1 || b_idx == -1)
+ if (a_idx == -1 || b_idx == -1) {
return;
+ }
SWAP(favorited.write[a_idx], favorited.write[b_idx]);
EditorSettings::get_singleton()->set_favorites(favorited);
@@ -1224,7 +1171,6 @@ void EditorFileDialog::_favorite_move_down() {
}
void EditorFileDialog::_update_favorites() {
-
bool res = access == ACCESS_RESOURCES;
String current = get_current_dir();
@@ -1237,20 +1183,23 @@ void EditorFileDialog::_update_favorites() {
Vector<String> favorited = EditorSettings::get_singleton()->get_favorites();
for (int i = 0; i < favorited.size(); i++) {
bool cres = favorited[i].begins_with("res://");
- if (cres != res)
+ if (cres != res) {
continue;
+ }
String name = favorited[i];
bool setthis = false;
if (res && name == "res://") {
- if (name == current)
+ if (name == current) {
setthis = true;
+ }
name = "/";
favorites->add_item(name, folder_icon);
} else if (name.ends_with("/")) {
- if (name == current || name == current + "/")
+ if (name == current || name == current + "/") {
setthis = true;
+ }
name = name.substr(0, name.length() - 1);
name = name.get_file();
@@ -1274,16 +1223,18 @@ void EditorFileDialog::_favorite_pressed() {
bool res = access == ACCESS_RESOURCES;
String cd = get_current_dir();
- if (!cd.ends_with("/"))
+ if (!cd.ends_with("/")) {
cd += "/";
+ }
Vector<String> favorited = EditorSettings::get_singleton()->get_favorites();
bool found = false;
for (int i = 0; i < favorited.size(); i++) {
bool cres = favorited[i].begins_with("res://");
- if (cres != res)
+ if (cres != res) {
continue;
+ }
if (favorited[i] == cd) {
found = true;
@@ -1291,10 +1242,11 @@ void EditorFileDialog::_favorite_pressed() {
}
}
- if (found)
+ if (found) {
favorited.erase(cd);
- else
+ } else {
favorited.push_back(cd);
+ }
EditorSettings::get_singleton()->set_favorites(favorited);
@@ -1302,7 +1254,6 @@ void EditorFileDialog::_favorite_pressed() {
}
void EditorFileDialog::_recent_selected(int p_idx) {
-
Vector<String> recentd = EditorSettings::get_singleton()->get_recent_dirs();
ERR_FAIL_INDEX(p_idx, recentd.size());
@@ -1313,7 +1264,6 @@ void EditorFileDialog::_recent_selected(int p_idx) {
}
void EditorFileDialog::_go_up() {
-
dir_access->change_dir("..");
update_file_list();
update_dir();
@@ -1321,7 +1271,6 @@ void EditorFileDialog::_go_up() {
}
void EditorFileDialog::_go_back() {
-
if (local_history_pos <= 0) {
return;
}
@@ -1334,8 +1283,8 @@ void EditorFileDialog::_go_back() {
dir_prev->set_disabled(local_history_pos == 0);
dir_next->set_disabled(local_history_pos == local_history.size() - 1);
}
-void EditorFileDialog::_go_forward() {
+void EditorFileDialog::_go_forward() {
if (local_history_pos == local_history.size() - 1) {
return;
}
@@ -1354,9 +1303,9 @@ bool EditorFileDialog::default_show_hidden_files = false;
EditorFileDialog::DisplayMode EditorFileDialog::default_display_mode = DISPLAY_THUMBNAILS;
void EditorFileDialog::set_display_mode(DisplayMode p_mode) {
-
- if (display_mode == p_mode)
+ if (display_mode == p_mode) {
return;
+ }
if (p_mode == DISPLAY_THUMBNAILS) {
mode_list->set_pressed(false);
mode_thumbnails->set_pressed(true);
@@ -1369,12 +1318,10 @@ void EditorFileDialog::set_display_mode(DisplayMode p_mode) {
}
EditorFileDialog::DisplayMode EditorFileDialog::get_display_mode() const {
-
return display_mode;
}
void EditorFileDialog::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorFileDialog::_unhandled_input);
ClassDB::bind_method(D_METHOD("_cancel_pressed"), &EditorFileDialog::_cancel_pressed);
@@ -1452,7 +1399,6 @@ void EditorFileDialog::set_default_display_mode(DisplayMode p_mode) {
}
void EditorFileDialog::_save_to_recent() {
-
String dir = get_current_dir();
Vector<String> recent = EditorSettings::get_singleton()->get_recent_dirs();
@@ -1476,17 +1422,14 @@ void EditorFileDialog::_save_to_recent() {
}
void EditorFileDialog::set_disable_overwrite_warning(bool p_disable) {
-
disable_overwrite_warning = p_disable;
}
bool EditorFileDialog::is_overwrite_warning_disabled() const {
-
return disable_overwrite_warning;
}
EditorFileDialog::EditorFileDialog() {
-
show_hidden_files = default_show_hidden_files;
display_mode = default_display_mode;
local_history_pos = 0;
@@ -1721,8 +1664,9 @@ EditorFileDialog::EditorFileDialog() {
vbox = vbc;
invalidated = true;
- if (register_func)
+ if (register_func) {
register_func(this);
+ }
preview_wheel_timeout = 0;
preview_wheel_index = 0;
@@ -1730,8 +1674,8 @@ EditorFileDialog::EditorFileDialog() {
}
EditorFileDialog::~EditorFileDialog() {
-
- if (unregister_func)
+ if (unregister_func) {
unregister_func(this);
+ }
memdelete(dir_access);
}
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index 8efb8f5368..cbedfc72a6 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -45,7 +45,6 @@
class DependencyRemoveDialog;
class EditorFileDialog : public ConfirmationDialog {
-
GDCLASS(EditorFileDialog, ConfirmationDialog);
public:
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index c211d5852a..d88c61d7b2 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -46,53 +46,48 @@ EditorFileSystem *EditorFileSystem::singleton = nullptr;
#define CACHE_FILE_NAME "filesystem_cache6"
void EditorFileSystemDirectory::sort_files() {
-
files.sort_custom<FileInfoSort>();
}
int EditorFileSystemDirectory::find_file_index(const String &p_file) const {
-
for (int i = 0; i < files.size(); i++) {
- if (files[i]->file == p_file)
+ if (files[i]->file == p_file) {
return i;
+ }
}
return -1;
}
-int EditorFileSystemDirectory::find_dir_index(const String &p_dir) const {
+int EditorFileSystemDirectory::find_dir_index(const String &p_dir) const {
for (int i = 0; i < subdirs.size(); i++) {
- if (subdirs[i]->name == p_dir)
+ if (subdirs[i]->name == p_dir) {
return i;
+ }
}
return -1;
}
int EditorFileSystemDirectory::get_subdir_count() const {
-
return subdirs.size();
}
EditorFileSystemDirectory *EditorFileSystemDirectory::get_subdir(int p_idx) {
-
ERR_FAIL_INDEX_V(p_idx, subdirs.size(), nullptr);
return subdirs[p_idx];
}
int EditorFileSystemDirectory::get_file_count() const {
-
return files.size();
}
String EditorFileSystemDirectory::get_file(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, files.size(), "");
return files[p_idx]->file;
}
String EditorFileSystemDirectory::get_path() const {
-
String p;
const EditorFileSystemDirectory *d = this;
while (d->parent) {
@@ -104,7 +99,6 @@ String EditorFileSystemDirectory::get_path() const {
}
String EditorFileSystemDirectory::get_file_path(int p_idx) const {
-
String file = get_file(p_idx);
const EditorFileSystemDirectory *d = this;
while (d->parent) {
@@ -116,13 +110,11 @@ String EditorFileSystemDirectory::get_file_path(int p_idx) const {
}
Vector<String> EditorFileSystemDirectory::get_file_deps(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, files.size(), Vector<String>());
return files[p_idx]->deps;
}
bool EditorFileSystemDirectory::get_file_import_is_valid(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, files.size(), false);
return files[p_idx]->import_valid;
}
@@ -140,23 +132,19 @@ String EditorFileSystemDirectory::get_file_script_class_icon_path(int p_idx) con
}
StringName EditorFileSystemDirectory::get_file_type(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, files.size(), "");
return files[p_idx]->type;
}
String EditorFileSystemDirectory::get_name() {
-
return name;
}
EditorFileSystemDirectory *EditorFileSystemDirectory::get_parent() {
-
return parent;
}
void EditorFileSystemDirectory::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("get_subdir_count"), &EditorFileSystemDirectory::get_subdir_count);
ClassDB::bind_method(D_METHOD("get_subdir", "idx"), &EditorFileSystemDirectory::get_subdir);
ClassDB::bind_method(D_METHOD("get_file_count"), &EditorFileSystemDirectory::get_file_count);
@@ -174,27 +162,22 @@ void EditorFileSystemDirectory::_bind_methods() {
}
EditorFileSystemDirectory::EditorFileSystemDirectory() {
-
modified_time = 0;
parent = nullptr;
verified = false;
}
EditorFileSystemDirectory::~EditorFileSystemDirectory() {
-
for (int i = 0; i < files.size(); i++) {
-
memdelete(files[i]);
}
for (int i = 0; i < subdirs.size(); i++) {
-
memdelete(subdirs[i]);
}
}
void EditorFileSystem::_scan_filesystem() {
-
ERR_FAIL_COND(!scanning || new_filesystem);
//read .fscache
@@ -212,7 +195,6 @@ void EditorFileSystem::_scan_filesystem() {
if (f) {
//read the disk cache
while (!f->eof_reached()) {
-
String l = f->get_line().strip_edges();
if (first) {
if (first_scan) {
@@ -229,8 +211,9 @@ void EditorFileSystem::_scan_filesystem() {
first = false;
continue;
}
- if (l == String())
+ if (l == String()) {
continue;
+ }
if (l.begins_with("::")) {
Vector<String> split = l.split("::");
@@ -282,7 +265,6 @@ void EditorFileSystem::_scan_filesystem() {
FileAccessRef f2 = FileAccess::open(update_cache, FileAccess::READ);
String l = f2->get_line().strip_edges();
while (l != String()) {
-
file_cache.erase(l); //erase cache for this, so it gets updated
l = f2->get_line().strip_edges();
}
@@ -319,7 +301,6 @@ void EditorFileSystem::_scan_filesystem() {
}
void EditorFileSystem::_save_filesystem_cache() {
-
group_file_cache.clear();
String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
@@ -334,15 +315,14 @@ void EditorFileSystem::_save_filesystem_cache() {
}
void EditorFileSystem::_thread_func(void *_userdata) {
-
EditorFileSystem *sd = (EditorFileSystem *)_userdata;
sd->_scan_filesystem();
}
bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_imported_files) {
-
- if (!reimport_on_missing_imported_files && p_only_imported_files)
+ if (!reimport_on_missing_imported_files && p_only_imported_files) {
return false;
+ }
if (!FileAccess::exists(p_path + ".import")) {
return true;
@@ -378,7 +358,6 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
String dest_md5 = "";
while (true) {
-
assign = Variant();
next_tag.fields.clear();
next_tag.name = String();
@@ -460,7 +439,6 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
//check source md5 matching
if (!p_only_imported_files) {
-
if (source_file != String() && source_file != p_path) {
return true; //file was moved, reimport
}
@@ -486,7 +464,6 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
}
bool EditorFileSystem::_update_scan_actions() {
-
sources_changed.clear();
bool fs_changed = false;
@@ -495,20 +472,17 @@ bool EditorFileSystem::_update_scan_actions() {
Vector<String> reloads;
for (List<ItemAction>::Element *E = scan_actions.front(); E; E = E->next()) {
-
ItemAction &ia = E->get();
switch (ia.action) {
case ItemAction::ACTION_NONE: {
-
} break;
case ItemAction::ACTION_DIR_ADD: {
-
int idx = 0;
for (int i = 0; i < ia.dir->subdirs.size(); i++) {
-
- if (ia.new_dir->name < ia.dir->subdirs[i]->name)
+ if (ia.new_dir->name < ia.dir->subdirs[i]->name) {
break;
+ }
idx++;
}
if (idx == ia.dir->subdirs.size()) {
@@ -520,19 +494,17 @@ bool EditorFileSystem::_update_scan_actions() {
fs_changed = true;
} break;
case ItemAction::ACTION_DIR_REMOVE: {
-
ERR_CONTINUE(!ia.dir->parent);
ia.dir->parent->subdirs.erase(ia.dir);
memdelete(ia.dir);
fs_changed = true;
} break;
case ItemAction::ACTION_FILE_ADD: {
-
int idx = 0;
for (int i = 0; i < ia.dir->files.size(); i++) {
-
- if (ia.new_file->file < ia.dir->files[i]->file)
+ if (ia.new_file->file < ia.dir->files[i]->file) {
break;
+ }
idx++;
}
if (idx == ia.dir->files.size()) {
@@ -545,7 +517,6 @@ bool EditorFileSystem::_update_scan_actions() {
} break;
case ItemAction::ACTION_FILE_REMOVE: {
-
int idx = ia.dir->find_file_index(ia.file);
ERR_CONTINUE(idx == -1);
_delete_internal_files(ia.dir->files[idx]->file);
@@ -556,7 +527,6 @@ bool EditorFileSystem::_update_scan_actions() {
} break;
case ItemAction::ACTION_FILE_TEST_REIMPORT: {
-
int idx = ia.dir->find_file_index(ia.file);
ERR_CONTINUE(idx == -1);
String full_path = ia.dir->get_file_path(idx);
@@ -573,7 +543,6 @@ bool EditorFileSystem::_update_scan_actions() {
fs_changed = true;
} break;
case ItemAction::ACTION_FILE_RELOAD: {
-
int idx = ia.dir->find_file_index(ia.file);
ERR_CONTINUE(idx == -1);
String full_path = ia.dir->get_file_path(idx);
@@ -604,12 +573,13 @@ bool EditorFileSystem::_update_scan_actions() {
}
void EditorFileSystem::scan() {
-
- if (false /*&& bool(Globals::get_singleton()->get("debug/disable_scan"))*/)
+ if (false /*&& bool(Globals::get_singleton()->get("debug/disable_scan"))*/) {
return;
+ }
- if (scanning || scanning_changes || thread)
+ if (scanning || scanning_changes || thread) {
return;
+ }
_update_extensions();
@@ -618,8 +588,9 @@ void EditorFileSystem::scan() {
scanning = true;
scan_total = 0;
_scan_filesystem();
- if (filesystem)
+ if (filesystem) {
memdelete(filesystem);
+ }
//file_type_cache.clear();
filesystem = new_filesystem;
new_filesystem = nullptr;
@@ -630,7 +601,6 @@ void EditorFileSystem::scan() {
_queue_update_script_classes();
first_scan = false;
} else {
-
ERR_FAIL_COND(thread);
set_process(true);
Thread::Settings s;
@@ -644,14 +614,12 @@ void EditorFileSystem::scan() {
}
void EditorFileSystem::ScanProgress::update(int p_current, int p_total) const {
-
float ratio = low + ((hi - low) / p_total) * p_current;
progress->step(ratio * 1000);
EditorFileSystem::singleton->scan_total = ratio;
}
EditorFileSystem::ScanProgress EditorFileSystem::ScanProgress::get_sub(int p_current, int p_total) const {
-
ScanProgress sp = *this;
float slice = (sp.hi - sp.low) / p_total;
sp.low += slice * p_current;
@@ -660,7 +628,6 @@ EditorFileSystem::ScanProgress EditorFileSystem::ScanProgress::get_sub(int p_cur
}
void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess *da, const ScanProgress &p_progress) {
-
List<String> dirs;
List<String> files;
@@ -670,28 +637,30 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
da->list_dir_begin();
while (true) {
-
String f = da->get_next();
- if (f == "")
+ if (f == "") {
break;
+ }
- if (da->current_is_hidden())
+ if (da->current_is_hidden()) {
continue;
+ }
if (da->current_is_dir()) {
-
- if (f.begins_with(".")) // Ignore special and . / ..
+ if (f.begins_with(".")) { // Ignore special and . / ..
continue;
+ }
- if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) // skip if another project inside this
+ if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) { // skip if another project inside this
continue;
- if (FileAccess::exists(cd.plus_file(f).plus_file(".gdignore"))) // skip if another project inside this
+ }
+ if (FileAccess::exists(cd.plus_file(f).plus_file(".gdignore"))) { // skip if another project inside this
continue;
+ }
dirs.push_back(f);
} else {
-
files.push_back(f);
}
}
@@ -705,15 +674,12 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
int idx = 0;
for (List<String>::Element *E = dirs.front(); E; E = E->next(), idx++) {
-
if (da->change_dir(E->get()) == OK) {
-
String d = da->get_current_dir();
if (d == cd || !d.begins_with(cd)) {
da->change_dir(cd); //avoid recursion
} else {
-
EditorFileSystemDirectory *efd = memnew(EditorFileSystemDirectory);
efd->parent = p_dir;
@@ -723,9 +689,9 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
int idx2 = 0;
for (int i = 0; i < p_dir->subdirs.size(); i++) {
-
- if (efd->name < p_dir->subdirs[i]->name)
+ if (efd->name < p_dir->subdirs[i]->name) {
break;
+ }
idx2++;
}
if (idx2 == p_dir->subdirs.size()) {
@@ -744,7 +710,6 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
}
for (List<String>::Element *E = files.front(); E; E = E->next(), idx++) {
-
String ext = E->get().get_extension().to_lower();
if (!valid_extensions.has(ext)) {
continue; //invalid
@@ -759,7 +724,6 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
uint64_t mt = FileAccess::get_modified_time(path);
if (import_extensions.has(ext)) {
-
//is imported
uint64_t import_mt = 0;
if (FileAccess::exists(path + ".import")) {
@@ -767,7 +731,6 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
}
if (fc && fc->modification_time == mt && fc->import_modification_time == import_mt && !_test_for_reimport(path, true)) {
-
fi->type = fc->type;
fi->deps = fc->deps;
fi->modified_time = fc->modification_time;
@@ -795,7 +758,6 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
}
} else {
-
fi->type = ResourceFormatImporter::get_singleton()->get_resource_type(path);
fi->import_group_file = ResourceFormatImporter::get_singleton()->get_import_group_file(path);
fi->script_class_name = _get_global_script_class(fi->type, path, &fi->script_class_extends, &fi->script_class_icon_path);
@@ -810,7 +772,6 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
scan_actions.push_back(ia);
}
} else {
-
if (fc && fc->modification_time == mt) {
//not imported, so just update type if changed
fi->type = fc->type;
@@ -838,14 +799,12 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
}
void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const ScanProgress &p_progress) {
-
uint64_t current_mtime = FileAccess::get_modified_time(p_dir->get_path());
bool updated_dir = false;
String cd = p_dir->get_path();
if (current_mtime != p_dir->modified_time || using_fat32_or_exfat) {
-
updated_dir = true;
p_dir->modified_time = current_mtime;
//ooooops, dir changed, see what's going on
@@ -853,12 +812,10 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
//first mark everything as veryfied
for (int i = 0; i < p_dir->files.size(); i++) {
-
p_dir->files[i]->verified = false;
}
for (int i = 0; i < p_dir->subdirs.size(); i++) {
-
p_dir->get_subdir(i)->verified = false;
}
@@ -869,26 +826,28 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
da->change_dir(cd);
da->list_dir_begin();
while (true) {
-
String f = da->get_next();
- if (f == "")
+ if (f == "") {
break;
+ }
- if (da->current_is_hidden())
+ if (da->current_is_hidden()) {
continue;
+ }
if (da->current_is_dir()) {
-
- if (f.begins_with(".")) // Ignore special and . / ..
+ if (f.begins_with(".")) { // Ignore special and . / ..
continue;
+ }
int idx = p_dir->find_dir_index(f);
if (idx == -1) {
-
- if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) // skip if another project inside this
+ if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) { // skip if another project inside this
continue;
- if (FileAccess::exists(cd.plus_file(f).plus_file(".gdignore"))) // skip if another project inside this
+ }
+ if (FileAccess::exists(cd.plus_file(f).plus_file(".gdignore"))) { // skip if another project inside this
continue;
+ }
EditorFileSystemDirectory *efd = memnew(EditorFileSystemDirectory);
@@ -911,8 +870,9 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
} else {
String ext = f.get_extension().to_lower();
- if (!valid_extensions.has(ext))
+ if (!valid_extensions.has(ext)) {
continue; //invalid
+ }
int idx = p_dir->find_file_index(f);
@@ -958,7 +918,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
}
for (int i = 0; i < p_dir->files.size(); i++) {
-
if (updated_dir && !p_dir->files[i]->verified) {
//this file was removed, add action to remove it
ItemAction ia;
@@ -983,7 +942,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
} else if (!FileAccess::exists(path + ".import")) {
reimport = true; //no .import file, obviously reimport
} else {
-
uint64_t import_mt = FileAccess::get_modified_time(path + ".import");
if (import_mt != p_dir->files[i]->import_modified_time) {
reimport = true;
@@ -993,7 +951,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
}
if (reimport) {
-
ItemAction ia;
ia.action = ItemAction::ACTION_FILE_TEST_REIMPORT;
ia.dir = p_dir;
@@ -1005,7 +962,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
uint64_t mt = FileAccess::get_modified_time(path);
if (mt != p_dir->files[i]->modified_time) {
-
p_dir->files[i]->modified_time = mt; //save new time, but test for reload
ItemAction ia;
@@ -1018,7 +974,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
}
for (int i = 0; i < p_dir->subdirs.size(); i++) {
-
if (updated_dir && !p_dir->subdirs[i]->verified) {
//this directory was removed, add action to remove it
ItemAction ia;
@@ -1045,7 +1000,6 @@ void EditorFileSystem::_delete_internal_files(String p_file) {
}
void EditorFileSystem::_thread_func_sources(void *_userdata) {
-
EditorFileSystem *efs = (EditorFileSystem *)_userdata;
if (efs->filesystem) {
EditorProgressBG pr("sources", TTR("ScanSources"), 1000);
@@ -1059,12 +1013,10 @@ void EditorFileSystem::_thread_func_sources(void *_userdata) {
}
void EditorFileSystem::get_changed_sources(List<String> *r_changed) {
-
*r_changed = sources_changed;
}
void EditorFileSystem::scan_changes() {
-
if (first_scan || // Prevent a premature changes scan from inhibiting the first full scan
scanning || scanning_changes || thread) {
scan_changes_pending = true;
@@ -1088,14 +1040,14 @@ void EditorFileSystem::scan_changes() {
sp.low = 0;
scan_total = 0;
_scan_fs_changes(filesystem, sp);
- if (_update_scan_actions())
+ if (_update_scan_actions()) {
emit_signal("filesystem_changed");
+ }
}
scanning_changes = false;
scanning_changes_done = true;
emit_signal("sources_changed", sources_changed.size() > 0);
} else {
-
ERR_FAIL_COND(thread_sources);
set_process(true);
scan_total = 0;
@@ -1106,11 +1058,8 @@ void EditorFileSystem::scan_changes() {
}
void EditorFileSystem::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_ENTER_TREE: {
-
call_deferred("scan"); //this should happen after every editor node entered the tree
} break;
@@ -1130,22 +1079,20 @@ void EditorFileSystem::_notification(int p_what) {
set_process(false);
}
- if (filesystem)
+ if (filesystem) {
memdelete(filesystem);
- if (new_filesystem)
+ }
+ if (new_filesystem) {
memdelete(new_filesystem);
+ }
filesystem = nullptr;
new_filesystem = nullptr;
} break;
case NOTIFICATION_PROCESS: {
-
if (use_threads) {
-
if (scanning_changes) {
-
if (scanning_changes_done) {
-
scanning_changes = false;
set_process(false);
@@ -1153,18 +1100,19 @@ void EditorFileSystem::_notification(int p_what) {
Thread::wait_to_finish(thread_sources);
memdelete(thread_sources);
thread_sources = nullptr;
- if (_update_scan_actions())
+ if (_update_scan_actions()) {
emit_signal("filesystem_changed");
+ }
emit_signal("sources_changed", sources_changed.size() > 0);
_queue_update_script_classes();
first_scan = false;
}
} else if (!scanning) {
-
set_process(false);
- if (filesystem)
+ if (filesystem) {
memdelete(filesystem);
+ }
filesystem = new_filesystem;
new_filesystem = nullptr;
Thread::wait_to_finish(thread);
@@ -1187,36 +1135,33 @@ void EditorFileSystem::_notification(int p_what) {
}
bool EditorFileSystem::is_scanning() const {
-
return scanning || scanning_changes;
}
-float EditorFileSystem::get_scanning_progress() const {
+float EditorFileSystem::get_scanning_progress() const {
return scan_total;
}
EditorFileSystemDirectory *EditorFileSystem::get_filesystem() {
-
return filesystem;
}
void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory *p_dir, FileAccess *p_file) {
-
- if (!p_dir)
+ if (!p_dir) {
return; //none
+ }
p_file->store_line("::" + p_dir->get_path() + "::" + String::num(p_dir->modified_time));
for (int i = 0; i < p_dir->files.size(); i++) {
-
if (p_dir->files[i]->import_group_file != String()) {
group_file_cache.insert(p_dir->files[i]->import_group_file);
}
String s = p_dir->files[i]->file + "::" + p_dir->files[i]->type + "::" + itos(p_dir->files[i]->modified_time) + "::" + itos(p_dir->files[i]->import_modified_time) + "::" + itos(p_dir->files[i]->import_valid) + "::" + p_dir->files[i]->import_group_file + "::" + p_dir->files[i]->script_class_name + "<>" + p_dir->files[i]->script_class_extends + "<>" + p_dir->files[i]->script_class_icon_path;
s += "::";
for (int j = 0; j < p_dir->files[i]->deps.size(); j++) {
-
- if (j > 0)
+ if (j > 0) {
s += "<>";
+ }
s += p_dir->files[i]->deps[j];
}
@@ -1224,7 +1169,6 @@ void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory *p_dir,
}
for (int i = 0; i < p_dir->subdirs.size(); i++) {
-
_save_filesystem_cache(p_dir->subdirs[i], p_file);
}
}
@@ -1232,33 +1176,35 @@ void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory *p_dir,
bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirectory **r_d, int &r_file_pos) const {
//todo make faster
- if (!filesystem || scanning)
+ if (!filesystem || scanning) {
return false;
+ }
String f = ProjectSettings::get_singleton()->localize_path(p_file);
- if (!f.begins_with("res://"))
+ if (!f.begins_with("res://")) {
return false;
+ }
f = f.substr(6, f.length());
f = f.replace("\\", "/");
Vector<String> path = f.split("/");
- if (path.size() == 0)
+ if (path.size() == 0) {
return false;
+ }
String file = path[path.size() - 1];
path.resize(path.size() - 1);
EditorFileSystemDirectory *fs = filesystem;
for (int i = 0; i < path.size(); i++) {
-
- if (path[i].begins_with("."))
+ if (path[i].begins_with(".")) {
return false;
+ }
int idx = -1;
for (int j = 0; j < fs->get_subdir_count(); j++) {
-
if (fs->get_subdir(j)->get_name() == path[i]) {
idx = j;
break;
@@ -1274,26 +1220,25 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
int idx2 = 0;
for (int j = 0; j < fs->get_subdir_count(); j++) {
-
- if (efsd->name < fs->get_subdir(j)->get_name())
+ if (efsd->name < fs->get_subdir(j)->get_name()) {
break;
+ }
idx2++;
}
- if (idx2 == fs->get_subdir_count())
+ if (idx2 == fs->get_subdir_count()) {
fs->subdirs.push_back(efsd);
- else
+ } else {
fs->subdirs.insert(idx2, efsd);
+ }
fs = efsd;
} else {
-
fs = fs->get_subdir(idx);
}
}
int cpos = -1;
for (int i = 0; i < fs->files.size(); i++) {
-
if (fs->files[i]->file == file) {
cpos = i;
break;
@@ -1307,12 +1252,10 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
}
String EditorFileSystem::get_file_type(const String &p_file) const {
-
EditorFileSystemDirectory *fs = nullptr;
int cpos = -1;
if (!_find_file(p_file, &fs, cpos)) {
-
return "";
}
@@ -1320,53 +1263,55 @@ String EditorFileSystem::get_file_type(const String &p_file) const {
}
EditorFileSystemDirectory *EditorFileSystem::find_file(const String &p_file, int *r_index) const {
-
- if (!filesystem || scanning)
+ if (!filesystem || scanning) {
return nullptr;
+ }
EditorFileSystemDirectory *fs = nullptr;
int cpos = -1;
if (!_find_file(p_file, &fs, cpos)) {
-
return nullptr;
}
- if (r_index)
+ if (r_index) {
*r_index = cpos;
+ }
return fs;
}
EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String &p_path) {
-
- if (!filesystem || scanning)
+ if (!filesystem || scanning) {
return nullptr;
+ }
String f = ProjectSettings::get_singleton()->localize_path(p_path);
- if (!f.begins_with("res://"))
+ if (!f.begins_with("res://")) {
return nullptr;
+ }
f = f.substr(6, f.length());
f = f.replace("\\", "/");
- if (f == String())
+ if (f == String()) {
return filesystem;
+ }
- if (f.ends_with("/"))
+ if (f.ends_with("/")) {
f = f.substr(0, f.length() - 1);
+ }
Vector<String> path = f.split("/");
- if (path.size() == 0)
+ if (path.size() == 0) {
return nullptr;
+ }
EditorFileSystemDirectory *fs = filesystem;
for (int i = 0; i < path.size(); i++) {
-
int idx = -1;
for (int j = 0; j < fs->get_subdir_count(); j++) {
-
if (fs->get_subdir(j)->get_name() == path[i]) {
idx = j;
break;
@@ -1376,7 +1321,6 @@ EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String &p
if (idx == -1) {
return nullptr;
} else {
-
fs = fs->get_subdir(idx);
}
}
@@ -1395,7 +1339,6 @@ void EditorFileSystem::_save_late_updated_files() {
}
Vector<String> EditorFileSystem::_get_dependencies(const String &p_path) {
-
List<String> deps;
ResourceLoader::get_dependencies(p_path, &deps);
@@ -1408,7 +1351,6 @@ Vector<String> EditorFileSystem::_get_dependencies(const String &p_path) {
}
String EditorFileSystem::_get_global_script_class(const String &p_type, const String &p_path, String *r_extends, String *r_icon_path) const {
-
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
if (ScriptServer::get_language(i)->handles_global_class_type(p_type)) {
String global_name;
@@ -1450,9 +1392,9 @@ void EditorFileSystem::_scan_script_classes(EditorFileSystemDirectory *p_dir) {
}
void EditorFileSystem::update_script_classes() {
-
- if (!update_script_classes_queued)
+ if (!update_script_classes_queued) {
return;
+ }
update_script_classes_queued = false;
ScriptServer::global_classes_clear();
@@ -1482,14 +1424,13 @@ void EditorFileSystem::_queue_update_script_classes() {
}
void EditorFileSystem::update_file(const String &p_file) {
-
EditorFileSystemDirectory *fs = nullptr;
int cpos = -1;
if (!_find_file(p_file, &fs, cpos)) {
-
- if (!fs)
+ if (!fs) {
return;
+ }
}
if (!FileAccess::exists(p_file)) {
@@ -1508,15 +1449,15 @@ void EditorFileSystem::update_file(const String &p_file) {
String type = ResourceLoader::get_resource_type(p_file);
if (cpos == -1) {
-
//the file did not exist, it was added
late_added_files.insert(p_file); //remember that it was added. This mean it will be scanned and imported on editor restart
int idx = 0;
for (int i = 0; i < fs->files.size(); i++) {
- if (p_file < fs->files[i]->file)
+ if (p_file < fs->files[i]->file) {
break;
+ }
idx++;
}
@@ -1528,12 +1469,10 @@ void EditorFileSystem::update_file(const String &p_file) {
if (idx == fs->files.size()) {
fs->files.push_back(fi);
} else {
-
fs->files.insert(idx, fi);
}
cpos = idx;
} else {
-
//the file exists and it was updated, and was not added in this step.
//this means we must force upon next restart to scan it again, to get proper type and dependencies
late_update_files.insert(p_file);
@@ -1555,13 +1494,11 @@ void EditorFileSystem::update_file(const String &p_file) {
}
Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector<String> &p_files) {
-
String importer_name;
Map<String, Map<StringName, Variant>> source_file_options;
Map<String, String> base_paths;
for (int i = 0; i < p_files.size(); i++) {
-
Ref<ConfigFile> config;
config.instance();
Error err = config->load(p_files[i] + ".import");
@@ -1585,7 +1522,6 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
importer->get_import_options(&options);
//set default values
for (List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) {
-
source_file_options[p_files[i]][E->get().option.name] = E->get().default_value;
}
@@ -1611,7 +1547,6 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
//all went well, overwrite config files with proper remaps and md5s
for (Map<String, Map<StringName, Variant>>::Element *E = source_file_options.front(); E; E = E->next()) {
-
const String &file = E->key();
String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file);
FileAccessRef f = FileAccess::open(file + ".import", FileAccess::WRITE);
@@ -1661,7 +1596,6 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
importer->get_import_options(&options);
//set default values
for (List<ResourceImporter::ImportOption>::Element *F = options.front(); F; F = F->next()) {
-
String base = F->get().option.name;
Variant v = F->get().default_value;
if (source_file_options[file].has(base)) {
@@ -1699,11 +1633,9 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
//if file is currently up, maybe the source it was loaded from changed, so import math must be updated for it
//to reload properly
if (ResourceCache::has(file)) {
-
Resource *r = ResourceCache::get(file);
if (r->get_import_path() != String()) {
-
String dst_path = ResourceFormatImporter::get_singleton()->get_internal_resource_path(file);
r->set_import_path(dst_path);
r->set_import_last_modified_time(0);
@@ -1717,7 +1649,6 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
}
void EditorFileSystem::_reimport_file(const String &p_file) {
-
EditorFileSystemDirectory *fs = nullptr;
int cpos = -1;
bool found = _find_file(p_file, &fs, cpos);
@@ -1816,13 +1747,11 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
Vector<String> dest_paths;
if (err == OK) {
-
if (importer->get_save_extension() == "") {
//no path
} else if (import_variants.size()) {
//import with variants
for (List<String>::Element *E = import_variants.front(); E; E = E->next()) {
-
String path = base_path.c_escape() + "." + E->get() + "." + importer->get_save_extension();
f->store_line("path." + E->get() + "=\"" + path + "\"");
@@ -1835,7 +1764,6 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
}
} else {
-
f->store_line("valid=false");
}
@@ -1876,7 +1804,6 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
//store options in provided order, to avoid file changing. Order is also important because first match is accepted first.
for (List<ResourceImporter::ImportOption>::Element *E = opts.front(); E; E = E->next()) {
-
String base = E->get().option.name;
String value;
VariantWriter::write_to_string(params[base], value);
@@ -1907,11 +1834,9 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
//if file is currently up, maybe the source it was loaded from changed, so import math must be updated for it
//to reload properly
if (ResourceCache::has(p_file)) {
-
Resource *r = ResourceCache::get(p_file);
if (r->get_import_path() != String()) {
-
String dst_path = ResourceFormatImporter::get_singleton()->get_internal_resource_path(p_file);
r->set_import_path(dst_path);
r->set_import_last_modified_time(0);
@@ -1922,7 +1847,6 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
}
void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport) {
-
int fc = efd->files.size();
const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr();
for (int i = 0; i < fc; i++) {
@@ -1940,7 +1864,6 @@ void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<Str
}
void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
-
{ //check that .import folder exists
DirAccess *da = DirAccess::open("res://");
if (da->change_dir(".import") != OK) {
@@ -1960,7 +1883,6 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
Set<String> groups_to_reimport;
for (int i = 0; i < p_files.size(); i++) {
-
String group_file = ResourceFormatImporter::get_singleton()->get_import_group_file(p_files[i]);
if (group_file_cache.has(p_files[i])) {
@@ -1983,7 +1905,6 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
EditorFileSystemDirectory *fs = nullptr;
int cpos = -1;
if (_find_file(p_files[i], &fs, cpos)) {
-
fs->files.write[cpos]->import_group_file = group_file;
}
}
@@ -2001,7 +1922,6 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
Map<String, Vector<String>> group_files;
_find_group_files(filesystem, group_files, groups_to_reimport);
for (Map<String, Vector<String>>::Element *E = group_files.front(); E; E = E->next()) {
-
Error err = _reimport_group(E->key(), E->get());
if (err == OK) {
_reimport_file(E->key());
@@ -2019,7 +1939,6 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
}
Error EditorFileSystem::_resource_import(const String &p_path) {
-
Vector<String> files;
files.push_back(p_path);
@@ -2034,13 +1953,10 @@ bool EditorFileSystem::is_group_file(const String &p_path) const {
}
void EditorFileSystem::_move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location) {
-
int fc = efd->files.size();
EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptrw();
for (int i = 0; i < fc; i++) {
-
if (files[i]->import_group_file == p_group_file) {
-
files[i]->import_group_file = p_new_location;
Ref<ConfigFile> config;
@@ -2051,7 +1967,6 @@ void EditorFileSystem::_move_group_files(EditorFileSystemDirectory *efd, const S
continue;
}
if (config->has_section_key("remap", "group_file")) {
-
config->set_value("remap", "group_file", p_new_location);
}
@@ -2076,7 +1991,6 @@ void EditorFileSystem::_move_group_files(EditorFileSystemDirectory *efd, const S
}
void EditorFileSystem::move_group_file(const String &p_path, const String &p_new_path) {
-
if (get_filesystem()) {
_move_group_files(get_filesystem(), p_path, p_new_path);
if (group_file_cache.has(p_path)) {
@@ -2087,7 +2001,6 @@ void EditorFileSystem::move_group_file(const String &p_path, const String &p_new
}
void EditorFileSystem::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("get_filesystem"), &EditorFileSystem::get_filesystem);
ClassDB::bind_method(D_METHOD("is_scanning"), &EditorFileSystem::is_scanning);
ClassDB::bind_method(D_METHOD("get_scanning_progress"), &EditorFileSystem::get_scanning_progress);
@@ -2105,27 +2018,23 @@ void EditorFileSystem::_bind_methods() {
}
void EditorFileSystem::_update_extensions() {
-
valid_extensions.clear();
import_extensions.clear();
List<String> extensionsl;
ResourceLoader::get_recognized_extensions_for_type("", &extensionsl);
for (List<String>::Element *E = extensionsl.front(); E; E = E->next()) {
-
valid_extensions.insert(E->get());
}
extensionsl.clear();
ResourceFormatImporter::get_singleton()->get_recognized_extensions(&extensionsl);
for (List<String>::Element *E = extensionsl.front(); E; E = E->next()) {
-
import_extensions.insert(E->get());
}
}
EditorFileSystem::EditorFileSystem() {
-
ResourceLoader::import = _resource_import;
reimport_on_missing_imported_files = GLOBAL_DEF("editor/reimport_missing_imported_files", true);
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index 55a2ed3d09..da27a63c64 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -40,7 +40,6 @@ class FileAccess;
struct EditorProgressBG;
class EditorFileSystemDirectory : public Object {
-
GDCLASS(EditorFileSystemDirectory, Object);
String name;
@@ -104,13 +103,11 @@ public:
};
class EditorFileSystem : public Node {
-
GDCLASS(EditorFileSystem, Node);
_THREAD_SAFE_CLASS_
struct ItemAction {
-
enum Action {
ACTION_NONE,
ACTION_DIR_ADD,
@@ -163,7 +160,6 @@ class EditorFileSystem : public Node {
/* Used for reading the filesystem cache file */
struct FileCache {
-
String type;
uint64_t modification_time;
uint64_t import_modification_time;
@@ -178,7 +174,6 @@ class EditorFileSystem : public Node {
HashMap<String, FileCache> file_cache;
struct ScanProgress {
-
float low;
float hi;
mutable EditorProgressBG *progress;
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 507a77e641..f0e6e3a799 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -35,7 +35,6 @@
#include "editor_settings.h"
Vector<String> EditorFolding::_get_unfolds(const Object *p_object) {
-
Vector<String> sections;
sections.resize(p_object->editor_get_section_folding().size());
if (sections.size()) {
@@ -61,7 +60,6 @@ void EditorFolding::save_resource_folding(const RES &p_resource, const String &p
}
void EditorFolding::_set_unfolds(Object *p_object, const Vector<String> &p_unfolds) {
-
int uc = p_unfolds.size();
const String *r = p_unfolds.ptr();
p_object->editor_clear_section_folding();
@@ -71,7 +69,6 @@ void EditorFolding::_set_unfolds(Object *p_object, const Vector<String> &p_unfol
}
void EditorFolding::load_resource_folding(RES p_resource, const String &p_path) {
-
Ref<ConfigFile> config;
config.instance();
@@ -117,7 +114,6 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
if (E->get().type == Variant::OBJECT) {
RES res = p_node->get(E->get().name);
if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) {
-
Vector<String> res_unfolds = _get_unfolds(res.ptr());
resource_folds.push_back(res->get_path());
resource_folds.push_back(res_unfolds);
@@ -131,13 +127,14 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
_fill_folds(p_root, p_node->get_child(i), p_folds, resource_folds, nodes_folded, resources);
}
}
-void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path) {
+void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path) {
ERR_FAIL_NULL(p_scene);
FileAccessRef file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES);
- if (!file_check->file_exists(p_path)) //This can happen when creating scene from FilesystemDock. It has path, but no file.
+ if (!file_check->file_exists(p_path)) { //This can happen when creating scene from FilesystemDock. It has path, but no file.
return;
+ }
Ref<ConfigFile> config;
config.instance();
@@ -155,8 +152,8 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path
file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
config->save(file);
}
-void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
+void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
Ref<ConfigFile> config;
config.instance();
@@ -218,14 +215,12 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
}
bool EditorFolding::has_folding_data(const String &p_path) {
-
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
return FileAccess::exists(file);
}
void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) {
-
List<PropertyInfo> plist;
p_object->get_property_list(&plist);
String group_base;
@@ -234,7 +229,6 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) {
Set<String> unfold_group;
for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) {
-
if (E->get().usage & PROPERTY_USAGE_CATEGORY) {
group = "";
group_base = "";
@@ -249,7 +243,6 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) {
//can unfold
if (E->get().usage & PROPERTY_USAGE_EDITOR) {
-
if (group != "") { //group
if (group_base == String() || E->get().name.begins_with(group_base)) {
bool can_revert = EditorPropertyRevert::can_property_revert(p_object, E->get().name);
@@ -271,7 +264,6 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) {
if (E->get().type == Variant::OBJECT) {
RES res = p_object->get(E->get().name);
if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) {
-
resources.insert(res);
_do_object_unfolds(res.ptr(), resources);
}
@@ -301,7 +293,6 @@ void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, Set<RES> &resou
}
void EditorFolding::unfold_scene(Node *p_scene) {
-
Set<RES> resources;
_do_node_unfolds(p_scene, p_scene, resources);
}
diff --git a/editor/editor_folding.h b/editor/editor_folding.h
index 5220907fe7..13f07b99b0 100644
--- a/editor/editor_folding.h
+++ b/editor/editor_folding.h
@@ -34,7 +34,6 @@
#include "scene/main/node.h"
class EditorFolding {
-
Vector<String> _get_unfolds(const Object *p_object);
void _set_unfolds(Object *p_object, const Vector<String> &p_unfolds);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index b2bcab4717..f50ac6d580 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -43,7 +43,6 @@
DocData *EditorHelp::doc = nullptr;
void EditorHelp::_init_colors() {
-
title_color = get_theme_color("accent_color", "Editor");
text_color = get_theme_color("default_color", "RichTextLabel");
headline_color = get_theme_color("headline_color", "EditorHelp");
@@ -58,34 +57,31 @@ void EditorHelp::_init_colors() {
}
void EditorHelp::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
-
- if (!is_visible_in_tree())
+ if (!is_visible_in_tree()) {
return;
+ }
Ref<InputEventKey> k = p_ev;
if (k.is_valid() && k->get_control() && k->get_keycode() == KEY_F) {
-
search->grab_focus();
search->select_all();
}
}
void EditorHelp::_search(bool p_search_previous) {
-
- if (p_search_previous)
+ if (p_search_previous) {
find_bar->search_prev();
- else
+ } else {
find_bar->search_next();
+ }
}
void EditorHelp::_class_list_select(const String &p_select) {
-
_goto_desc(p_select);
}
void EditorHelp::_class_desc_select(const String &p_select) {
-
if (p_select.begins_with("$")) { //enum
String select = p_select.substr(1, p_select.length());
String class_name;
@@ -182,10 +178,10 @@ void EditorHelp::_class_desc_resized() {
}
void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
-
String t = p_type;
- if (t.empty())
+ if (t.empty()) {
t = "void";
+ }
bool can_ref = (t != "void") || !p_enum.empty();
if (!p_enum.empty()) {
@@ -224,7 +220,6 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
}
String EditorHelp::_fix_constant(const String &p_constant) const {
-
if (p_constant.strip_edges() == "4294967295") {
return "0xFFFFFFFF";
}
@@ -241,7 +236,6 @@ String EditorHelp::_fix_constant(const String &p_constant) const {
}
void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview) {
-
method_line[p_method.name] = class_desc->get_line_count() - 2; //gets overridden if description
const bool is_vararg = p_method.qualifiers.find("vararg") != -1;
@@ -249,6 +243,9 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview
if (p_overview) {
class_desc->push_cell();
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
+ } else {
+ static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ class_desc->add_text(String(prefix));
}
_add_type(p_method.return_type, p_method.return_enum);
@@ -279,14 +276,14 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview
for (int j = 0; j < p_method.arguments.size(); j++) {
class_desc->push_color(text_color);
- if (j > 0)
+ if (j > 0) {
class_desc->add_text(", ");
+ }
_add_text(p_method.arguments[j].name);
class_desc->add_text(": ");
_add_type(p_method.arguments[j].type, p_method.arguments[j].enumeration);
if (p_method.arguments[j].default_value != "") {
-
class_desc->push_color(symbol_color);
class_desc->add_text(" = ");
class_desc->pop();
@@ -300,8 +297,9 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview
if (is_vararg) {
class_desc->push_color(text_color);
- if (p_method.arguments.size())
+ if (p_method.arguments.size()) {
class_desc->add_text(", ");
+ }
class_desc->push_color(symbol_color);
class_desc->add_text("...");
class_desc->pop();
@@ -312,21 +310,21 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview
class_desc->add_text(")");
class_desc->pop();
if (p_method.qualifiers != "") {
-
class_desc->push_color(qualifier_color);
class_desc->add_text(" ");
_add_text(p_method.qualifiers);
class_desc->pop();
}
- if (p_overview)
+ if (p_overview) {
class_desc->pop(); //cell
+ }
}
Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
-
- if (!doc->class_list.has(p_class))
+ if (!doc->class_list.has(p_class)) {
return ERR_DOES_NOT_EXIST;
+ }
select_locked = true;
@@ -334,8 +332,9 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
description_line = 0;
- if (p_class == edited_class)
+ if (p_class == edited_class) {
return OK; //already there
+ }
edited_class = p_class;
_update_doc();
@@ -343,8 +342,9 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
}
void EditorHelp::_update_doc() {
- if (!doc->class_list.has(edited_class))
+ if (!doc->class_list.has(edited_class)) {
return;
+ }
scroll_locked = true;
@@ -378,11 +378,9 @@ void EditorHelp::_update_doc() {
// Ascendents
if (cd.inherits != "") {
-
class_desc->push_color(title_color);
class_desc->push_font(doc_font);
class_desc->add_text(TTR("Inherits:") + " ");
- class_desc->pop();
String inherits = cd.inherits;
@@ -397,29 +395,25 @@ void EditorHelp::_update_doc() {
}
class_desc->pop();
+ class_desc->pop();
class_desc->add_newline();
}
// Descendents
if (ClassDB::class_exists(cd.name)) {
-
bool found = false;
bool prev = false;
+ class_desc->push_font(doc_font);
for (Map<String, DocData::ClassDoc>::Element *E = doc->class_list.front(); E; E = E->next()) {
-
if (E->get().inherits == cd.name) {
-
if (!found) {
class_desc->push_color(title_color);
- class_desc->push_font(doc_font);
class_desc->add_text(TTR("Inherited by:") + " ");
- class_desc->pop();
found = true;
}
if (prev) {
-
class_desc->add_text(" , ");
}
@@ -427,6 +421,7 @@ void EditorHelp::_update_doc() {
prev = true;
}
}
+ class_desc->pop();
if (found) {
class_desc->pop();
@@ -439,7 +434,6 @@ void EditorHelp::_update_doc() {
// Brief description
if (cd.brief_description != "") {
-
class_desc->push_color(text_color);
class_desc->push_font(doc_bold_font);
class_desc->push_indent(1);
@@ -454,7 +448,6 @@ void EditorHelp::_update_doc() {
// Class description
if (cd.description != "") {
-
section_line.push_back(Pair<String, int>(TTR("Description"), class_desc->get_line_count() - 2));
description_line = class_desc->get_line_count() - 2;
class_desc->push_color(title_color);
@@ -490,8 +483,8 @@ void EditorHelp::_update_doc() {
class_desc->add_newline();
for (int i = 0; i < cd.tutorials.size(); i++) {
- const String link = DTR(cd.tutorials[i]);
- String linktxt = link;
+ const String link = DTR(cd.tutorials[i].link);
+ String linktxt = (cd.tutorials[i].title.empty()) ? link : DTR(cd.tutorials[i].title);
const int seppos = linktxt.find("//");
if (seppos != -1) {
linktxt = link.right(seppos + 2);
@@ -514,7 +507,6 @@ void EditorHelp::_update_doc() {
bool property_descr = false;
if (cd.properties.size()) {
-
section_line.push_back(Pair<String, int>(TTR("Properties"), class_desc->get_line_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -526,7 +518,7 @@ void EditorHelp::_update_doc() {
class_desc->push_font(doc_code_font);
class_desc->push_indent(1);
class_desc->push_table(2);
- class_desc->set_table_column_expand(1, 1);
+ class_desc->set_table_column_expand(1, true);
for (int i = 0; i < cd.properties.size(); i++) {
property_line[cd.properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description
@@ -614,9 +606,9 @@ void EditorHelp::_update_doc() {
}
if (methods.size()) {
-
- if (sort_methods)
+ if (sort_methods) {
methods.sort();
+ }
section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_line_count() - 2));
class_desc->push_color(title_color);
@@ -629,7 +621,7 @@ void EditorHelp::_update_doc() {
class_desc->push_font(doc_code_font);
class_desc->push_indent(1);
class_desc->push_table(2);
- class_desc->set_table_column_expand(1, 1);
+ class_desc->set_table_column_expand(1, true);
bool any_previous = false;
for (int pass = 0; pass < 2; pass++) {
@@ -688,7 +680,6 @@ void EditorHelp::_update_doc() {
// Theme properties
if (cd.theme_properties.size()) {
-
section_line.push_back(Pair<String, int>(TTR("Theme Properties"), class_desc->get_line_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -698,10 +689,9 @@ void EditorHelp::_update_doc() {
class_desc->push_indent(1);
class_desc->push_table(2);
- class_desc->set_table_column_expand(1, 1);
+ class_desc->set_table_column_expand(1, true);
for (int i = 0; i < cd.theme_properties.size(); i++) {
-
theme_property_line[cd.theme_properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description
class_desc->push_cell();
@@ -751,7 +741,6 @@ void EditorHelp::_update_doc() {
// Signals
if (cd.signals.size()) {
-
if (sort_methods) {
cd.signals.sort();
}
@@ -769,10 +758,11 @@ void EditorHelp::_update_doc() {
class_desc->push_indent(1);
for (int i = 0; i < cd.signals.size(); i++) {
-
signal_line[cd.signals[i].name] = class_desc->get_line_count() - 2; //gets overridden if description
class_desc->push_font(doc_code_font); // monofont
class_desc->push_color(headline_color);
+ static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ class_desc->add_text(String(prefix));
_add_text(cd.signals[i].name);
class_desc->pop();
class_desc->push_color(symbol_color);
@@ -780,14 +770,14 @@ void EditorHelp::_update_doc() {
class_desc->pop();
for (int j = 0; j < cd.signals[i].arguments.size(); j++) {
class_desc->push_color(text_color);
- if (j > 0)
+ if (j > 0) {
class_desc->add_text(", ");
+ }
_add_text(cd.signals[i].arguments[j].name);
class_desc->add_text(": ");
_add_type(cd.signals[i].arguments[j].type);
if (cd.signals[i].arguments[j].default_value != "") {
-
class_desc->push_color(symbol_color);
class_desc->add_text(" = ");
class_desc->pop();
@@ -802,7 +792,6 @@ void EditorHelp::_update_doc() {
class_desc->pop();
class_desc->pop(); // end monofont
if (cd.signals[i].description != "") {
-
class_desc->push_font(doc_font);
class_desc->push_color(comment_color);
class_desc->push_indent(1);
@@ -821,12 +810,10 @@ void EditorHelp::_update_doc() {
// Constants and enums
if (cd.constants.size()) {
-
Map<String, Vector<DocData::ConstantDoc>> enums;
Vector<DocData::ConstantDoc> constants;
for (int i = 0; i < cd.constants.size(); i++) {
-
if (cd.constants[i].enumeration != String()) {
if (!enums.has(cd.constants[i].enumeration)) {
enums[cd.constants[i].enumeration] = Vector<DocData::ConstantDoc>();
@@ -834,14 +821,12 @@ void EditorHelp::_update_doc() {
enums[cd.constants[i].enumeration].push_back(cd.constants[i]);
} else {
-
constants.push_back(cd.constants[i]);
}
}
// Enums
if (enums.size()) {
-
section_line.push_back(Pair<String, int>(TTR("Enumerations"), class_desc->get_line_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -853,13 +838,12 @@ void EditorHelp::_update_doc() {
class_desc->add_newline();
for (Map<String, Vector<DocData::ConstantDoc>>::Element *E = enums.front(); E; E = E->next()) {
-
enum_line[E->key()] = class_desc->get_line_count() - 2;
+ class_desc->push_font(doc_code_font);
class_desc->push_color(title_color);
class_desc->add_text("enum ");
class_desc->pop();
- class_desc->push_font(doc_code_font);
String e = E->key();
if ((e.get_slice_count(".") > 1) && (e.get_slice(".", 0) == edited_class)) {
e = e.get_slice(".", 1);
@@ -872,6 +856,8 @@ void EditorHelp::_update_doc() {
class_desc->push_color(symbol_color);
class_desc->add_text(":");
class_desc->pop();
+
+ class_desc->add_newline();
class_desc->add_newline();
class_desc->push_indent(1);
@@ -881,14 +867,17 @@ void EditorHelp::_update_doc() {
int enumStartingLine = enum_line[E->key()];
for (int i = 0; i < enum_list.size(); i++) {
- if (cd.name == "@GlobalScope")
+ if (cd.name == "@GlobalScope") {
enumValuesContainer[enum_list[i].name] = enumStartingLine;
+ }
// Add the enum constant line to the constant_line map so we can locate it as a constant
constant_line[enum_list[i].name] = class_desc->get_line_count() - 2;
class_desc->push_font(doc_code_font);
class_desc->push_color(headline_color);
+ static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ class_desc->add_text(String(prefix));
_add_text(enum_list[i].name);
class_desc->pop();
class_desc->push_color(symbol_color);
@@ -900,21 +889,23 @@ void EditorHelp::_update_doc() {
class_desc->pop();
if (enum_list[i].description != "") {
class_desc->push_font(doc_font);
- //class_desc->add_text(" ");
- class_desc->push_indent(1);
class_desc->push_color(comment_color);
+ static const CharType dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 };
+ class_desc->add_text(String(dash));
_add_text(DTR(enum_list[i].description));
class_desc->pop();
class_desc->pop();
- class_desc->pop(); // indent
- class_desc->add_newline();
+ if (DTR(enum_list[i].description).find("\n") > 0) {
+ class_desc->add_newline();
+ }
}
class_desc->add_newline();
}
- if (cd.name == "@GlobalScope")
+ if (cd.name == "@GlobalScope") {
enum_values_line[E->key()] = enumValuesContainer;
+ }
class_desc->pop();
@@ -927,7 +918,6 @@ void EditorHelp::_update_doc() {
// Constants
if (constants.size()) {
-
section_line.push_back(Pair<String, int>(TTR("Constants"), class_desc->get_line_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -939,7 +929,6 @@ void EditorHelp::_update_doc() {
class_desc->add_newline();
for (int i = 0; i < constants.size(); i++) {
-
constant_line[constants[i].name] = class_desc->get_line_count() - 2;
class_desc->push_font(doc_code_font);
@@ -952,6 +941,9 @@ void EditorHelp::_update_doc() {
class_desc->add_text(String(prefix));
class_desc->pop();
}
+ } else {
+ static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ class_desc->add_text(String(prefix));
}
class_desc->push_color(headline_color);
@@ -967,13 +959,15 @@ void EditorHelp::_update_doc() {
class_desc->pop();
if (constants[i].description != "") {
class_desc->push_font(doc_font);
- class_desc->push_indent(1);
class_desc->push_color(comment_color);
+ static const CharType dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 };
+ class_desc->add_text(String(dash));
_add_text(DTR(constants[i].description));
class_desc->pop();
class_desc->pop();
- class_desc->pop(); // indent
- class_desc->add_newline();
+ if (DTR(constants[i].description).find("\n") > 0) {
+ class_desc->add_newline();
+ }
}
class_desc->add_newline();
@@ -986,7 +980,6 @@ void EditorHelp::_update_doc() {
// Property descriptions
if (property_descr) {
-
section_line.push_back(Pair<String, int>(TTR("Property Descriptions"), class_desc->get_line_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -998,17 +991,20 @@ void EditorHelp::_update_doc() {
class_desc->add_newline();
for (int i = 0; i < cd.properties.size(); i++) {
-
- if (cd.properties[i].overridden)
+ if (cd.properties[i].overridden) {
continue;
+ }
property_line[cd.properties[i].name] = class_desc->get_line_count() - 2;
class_desc->push_table(2);
- class_desc->set_table_column_expand(1, 1);
+ class_desc->set_table_column_expand(1, true);
class_desc->push_cell();
class_desc->push_font(doc_code_font);
+ static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ class_desc->add_text(String(prefix));
+
_add_type(cd.properties[i].type, cd.properties[i].enumeration);
class_desc->add_text(" ");
class_desc->pop(); // font
@@ -1037,15 +1033,26 @@ void EditorHelp::_update_doc() {
class_desc->pop(); // font
class_desc->pop(); // cell
- if (cd.properties[i].setter != "") {
+ Map<String, DocData::MethodDoc> method_map;
+ for (int j = 0; j < methods.size(); j++) {
+ method_map[methods[j].name] = methods[j];
+ }
+ if (cd.properties[i].setter != "") {
class_desc->push_cell();
class_desc->pop(); // cell
class_desc->push_cell();
class_desc->push_font(doc_code_font);
class_desc->push_color(text_color);
- class_desc->add_text(cd.properties[i].setter + TTR("(value)"));
+ if (method_map[cd.properties[i].setter].arguments.size() > 1) {
+ // Setters with additional arguments are exposed in the method list, so we link them here for quick access.
+ class_desc->push_meta("@method " + cd.properties[i].setter);
+ class_desc->add_text(cd.properties[i].setter + TTR("(value)"));
+ class_desc->pop();
+ } else {
+ class_desc->add_text(cd.properties[i].setter + TTR("(value)"));
+ }
class_desc->pop(); // color
class_desc->push_color(comment_color);
class_desc->add_text(" setter");
@@ -1056,14 +1063,20 @@ void EditorHelp::_update_doc() {
}
if (cd.properties[i].getter != "") {
-
class_desc->push_cell();
class_desc->pop(); // cell
class_desc->push_cell();
class_desc->push_font(doc_code_font);
class_desc->push_color(text_color);
- class_desc->add_text(cd.properties[i].getter + "()");
+ if (method_map[cd.properties[i].getter].arguments.size() > 0) {
+ // Getters with additional arguments are exposed in the method list, so we link them here for quick access.
+ class_desc->push_meta("@method " + cd.properties[i].getter);
+ class_desc->add_text(cd.properties[i].getter + "()");
+ class_desc->pop();
+ } else {
+ class_desc->add_text(cd.properties[i].getter + "()");
+ }
class_desc->pop(); //color
class_desc->push_color(comment_color);
class_desc->add_text(" getter");
@@ -1101,7 +1114,6 @@ void EditorHelp::_update_doc() {
// Method descriptions
if (method_descr) {
-
section_line.push_back(Pair<String, int>(TTR("Method Descriptions"), class_desc->get_line_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -1123,7 +1135,6 @@ void EditorHelp::_update_doc() {
}
for (int i = 0; i < methods_filtered.size(); i++) {
-
class_desc->push_font(doc_code_font);
_add_method(methods_filtered[i], false);
class_desc->pop();
@@ -1165,12 +1176,12 @@ void EditorHelp::_request_help(const String &p_string) {
}
void EditorHelp::_help_callback(const String &p_topic) {
-
String what = p_topic.get_slice(":", 0);
String clss = p_topic.get_slice(":", 1);
String name;
- if (p_topic.get_slice_count(":") == 3)
+ if (p_topic.get_slice_count(":") == 3) {
name = p_topic.get_slice(":", 2);
+ }
_request_help(clss); //first go to class
@@ -1179,36 +1190,43 @@ void EditorHelp::_help_callback(const String &p_topic) {
if (what == "class_desc") {
line = description_line;
} else if (what == "class_signal") {
- if (signal_line.has(name))
+ if (signal_line.has(name)) {
line = signal_line[name];
+ }
} else if (what == "class_method" || what == "class_method_desc") {
- if (method_line.has(name))
+ if (method_line.has(name)) {
line = method_line[name];
+ }
} else if (what == "class_property") {
- if (property_line.has(name))
+ if (property_line.has(name)) {
line = property_line[name];
+ }
} else if (what == "class_enum") {
- if (enum_line.has(name))
+ if (enum_line.has(name)) {
line = enum_line[name];
+ }
} else if (what == "class_theme_item") {
- if (theme_property_line.has(name))
+ if (theme_property_line.has(name)) {
line = theme_property_line[name];
+ }
} else if (what == "class_constant") {
- if (constant_line.has(name))
+ if (constant_line.has(name)) {
line = constant_line[name];
+ }
} else if (what == "class_global") {
- if (constant_line.has(name))
+ if (constant_line.has(name)) {
line = constant_line[name];
- else {
+ } else {
Map<String, Map<String, int>>::Element *iter = enum_values_line.front();
while (true) {
if (iter->value().has(name)) {
line = iter->value()[name];
break;
- } else if (iter == enum_values_line.back())
+ } else if (iter == enum_values_line.back()) {
break;
- else
+ } else {
iter = iter->next();
+ }
}
}
}
@@ -1217,7 +1235,6 @@ void EditorHelp::_help_callback(const String &p_topic) {
}
static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
-
DocData *doc = EditorHelp::get_doc_data();
String base_path;
@@ -1244,29 +1261,31 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
int pos = 0;
while (pos < bbcode.length()) {
-
int brk_pos = bbcode.find("[", pos);
- if (brk_pos < 0)
+ if (brk_pos < 0) {
brk_pos = bbcode.length();
+ }
if (brk_pos > pos) {
String text = bbcode.substr(pos, brk_pos - pos);
- if (!code_tag)
+ if (!code_tag) {
text = text.replace("\n", "\n\n");
+ }
p_rt->add_text(text);
}
- if (brk_pos == bbcode.length())
+ if (brk_pos == bbcode.length()) {
break; //nothing else to add
+ }
int brk_end = bbcode.find("]", brk_pos + 1);
if (brk_end == -1) {
-
String text = bbcode.substr(brk_pos, bbcode.length() - brk_pos);
- if (!code_tag)
+ if (!code_tag) {
text = text.replace("\n", "\n\n");
+ }
p_rt->add_text(text);
break;
@@ -1278,7 +1297,6 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
bool tag_ok = tag_stack.size() && tag_stack.front()->get() == tag.substr(1, tag.length());
if (!tag_ok) {
-
p_rt->add_text("[");
pos = brk_pos + 1;
continue;
@@ -1295,12 +1313,10 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
code_tag = false;
} else if (code_tag) {
-
p_rt->add_text("[");
pos = brk_pos + 1;
} else if (tag.begins_with("method ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ")) {
-
int tag_end = tag.find(" ");
String link_tag = tag.substr(0, tag_end);
@@ -1314,7 +1330,6 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
pos = brk_end + 1;
} else if (doc->class_list.has(tag)) {
-
p_rt->push_color(link_color);
p_rt->push_meta("#" + tag);
p_rt->add_text(tag);
@@ -1323,19 +1338,16 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
pos = brk_end + 1;
} else if (tag == "b") {
-
//use bold font
p_rt->push_font(doc_bold_font);
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "i") {
-
//use italics font
p_rt->push_color(font_color_hl);
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "code" || tag == "codeblock") {
-
//use monospace font
p_rt->push_font(doc_code_font);
p_rt->push_color(code_color);
@@ -1343,7 +1355,6 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "kbd") {
-
//use keyboard font with custom color
p_rt->push_font(doc_kbd_font);
p_rt->push_color(kbd_color);
@@ -1351,112 +1362,107 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "center") {
-
//align to center
p_rt->push_align(RichTextLabel::ALIGN_CENTER);
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "br") {
-
//force a line break
p_rt->add_newline();
pos = brk_end + 1;
} else if (tag == "u") {
-
//use underline
p_rt->push_underline();
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "s") {
-
//use strikethrough
p_rt->push_strikethrough();
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "url") {
-
int end = bbcode.find("[", brk_end);
- if (end == -1)
+ if (end == -1) {
end = bbcode.length();
+ }
String url = bbcode.substr(brk_end + 1, end - brk_end - 1);
p_rt->push_meta(url);
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag.begins_with("url=")) {
-
String url = tag.substr(4, tag.length());
p_rt->push_meta(url);
pos = brk_end + 1;
tag_stack.push_front("url");
} else if (tag == "img") {
-
int end = bbcode.find("[", brk_end);
- if (end == -1)
+ if (end == -1) {
end = bbcode.length();
+ }
String image = bbcode.substr(brk_end + 1, end - brk_end - 1);
Ref<Texture2D> texture = ResourceLoader::load(base_path.plus_file(image), "Texture2D");
- if (texture.is_valid())
+ if (texture.is_valid()) {
p_rt->add_image(texture);
+ }
pos = end;
tag_stack.push_front(tag);
} else if (tag.begins_with("color=")) {
-
String col = tag.substr(6, tag.length());
Color color;
- if (col.begins_with("#"))
+ if (col.begins_with("#")) {
color = Color::html(col);
- else if (col == "aqua")
+ } else if (col == "aqua") {
color = Color(0, 1, 1);
- else if (col == "black")
+ } else if (col == "black") {
color = Color(0, 0, 0);
- else if (col == "blue")
+ } else if (col == "blue") {
color = Color(0, 0, 1);
- else if (col == "fuchsia")
+ } else if (col == "fuchsia") {
color = Color(1, 0, 1);
- else if (col == "gray" || col == "grey")
+ } else if (col == "gray" || col == "grey") {
color = Color(0.5, 0.5, 0.5);
- else if (col == "green")
+ } else if (col == "green") {
color = Color(0, 0.5, 0);
- else if (col == "lime")
+ } else if (col == "lime") {
color = Color(0, 1, 0);
- else if (col == "maroon")
+ } else if (col == "maroon") {
color = Color(0.5, 0, 0);
- else if (col == "navy")
+ } else if (col == "navy") {
color = Color(0, 0, 0.5);
- else if (col == "olive")
+ } else if (col == "olive") {
color = Color(0.5, 0.5, 0);
- else if (col == "purple")
+ } else if (col == "purple") {
color = Color(0.5, 0, 0.5);
- else if (col == "red")
+ } else if (col == "red") {
color = Color(1, 0, 0);
- else if (col == "silver")
+ } else if (col == "silver") {
color = Color(0.75, 0.75, 0.75);
- else if (col == "teal")
+ } else if (col == "teal") {
color = Color(0, 0.5, 0.5);
- else if (col == "white")
+ } else if (col == "white") {
color = Color(1, 1, 1);
- else if (col == "yellow")
+ } else if (col == "yellow") {
color = Color(1, 1, 0);
- else
+ } else {
color = Color(0, 0, 0); //base_color;
+ }
p_rt->push_color(color);
pos = brk_end + 1;
tag_stack.push_front("color");
} else if (tag.begins_with("font=")) {
-
String fnt = tag.substr(5, tag.length());
Ref<Font> font = ResourceLoader::load(base_path.plus_file(fnt), "Font");
- if (font.is_valid())
+ if (font.is_valid()) {
p_rt->push_font(font);
- else {
+ } else {
p_rt->push_font(doc_font);
}
@@ -1464,7 +1470,6 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
tag_stack.push_front("font");
} else {
-
p_rt->add_text("["); //ignore
pos = brk_pos + 1;
}
@@ -1476,7 +1481,6 @@ void EditorHelp::_add_text(const String &p_bbcode) {
}
void EditorHelp::generate_doc() {
-
doc = memnew(DocData);
doc->generate(true);
DocData compdoc;
@@ -1485,11 +1489,9 @@ void EditorHelp::generate_doc() {
}
void EditorHelp::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_READY:
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
_update_doc();
} break;
case NOTIFICATION_THEME_CHANGED: {
@@ -1503,12 +1505,10 @@ void EditorHelp::_notification(int p_what) {
}
void EditorHelp::go_to_help(const String &p_help) {
-
_help_callback(p_help);
}
void EditorHelp::go_to_class(const String &p_class, int p_scroll) {
-
_goto_desc(p_class, p_scroll);
}
@@ -1527,12 +1527,10 @@ void EditorHelp::scroll_to_section(int p_section_index) {
}
void EditorHelp::popup_search() {
-
find_bar->popup_search();
}
String EditorHelp::get_class() {
-
return edited_class;
}
@@ -1541,16 +1539,14 @@ void EditorHelp::search_again(bool p_search_previous) {
}
int EditorHelp::get_scroll() const {
-
return class_desc->get_v_scroll()->get_value();
}
-void EditorHelp::set_scroll(int p_scroll) {
+void EditorHelp::set_scroll(int p_scroll) {
class_desc->get_v_scroll()->set_value(p_scroll);
}
void EditorHelp::_bind_methods() {
-
ClassDB::bind_method("_class_list_select", &EditorHelp::_class_list_select);
ClassDB::bind_method("_request_help", &EditorHelp::_request_help);
ClassDB::bind_method("_unhandled_key_input", &EditorHelp::_unhandled_key_input);
@@ -1561,7 +1557,6 @@ void EditorHelp::_bind_methods() {
}
EditorHelp::EditorHelp() {
-
set_custom_minimum_size(Size2(150 * EDSCALE, 0));
EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true);
@@ -1593,14 +1588,12 @@ EditorHelp::~EditorHelp() {
}
void EditorHelpBit::_go_to_help(String p_what) {
-
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
ScriptEditor::get_singleton()->goto_help(p_what);
emit_signal("request_hide");
}
void EditorHelpBit::_meta_clicked(String p_select) {
-
if (p_select.begins_with("$")) { //enum
String select = p_select.substr(1, p_select.length());
@@ -1613,26 +1606,23 @@ void EditorHelpBit::_meta_clicked(String p_select) {
_go_to_help("class_enum:" + class_name + ":" + select);
return;
} else if (p_select.begins_with("#")) {
-
_go_to_help("class_name:" + p_select.substr(1, p_select.length()));
return;
} else if (p_select.begins_with("@")) {
-
String m = p_select.substr(1, p_select.length());
- if (m.find(".") != -1)
+ if (m.find(".") != -1) {
_go_to_help("class_method:" + m.get_slice(".", 0) + ":" + m.get_slice(".", 0)); //must go somewhere else
+ }
}
}
void EditorHelpBit::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_text", "text"), &EditorHelpBit::set_text);
ADD_SIGNAL(MethodInfo("request_hide"));
}
void EditorHelpBit::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_READY: {
rich_text->clear();
@@ -1640,7 +1630,6 @@ void EditorHelpBit::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
rich_text->add_theme_color_override("selection_color", get_theme_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
} break;
default:
@@ -1649,14 +1638,12 @@ void EditorHelpBit::_notification(int p_what) {
}
void EditorHelpBit::set_text(const String &p_text) {
-
text = p_text;
rich_text->clear();
_add_text_to_rt(text, rich_text);
}
EditorHelpBit::EditorHelpBit() {
-
rich_text = memnew(RichTextLabel);
add_child(rich_text);
rich_text->connect("meta_clicked", callable_mp(this, &EditorHelpBit::_meta_clicked));
@@ -1666,7 +1653,6 @@ EditorHelpBit::EditorHelpBit() {
}
FindBar::FindBar() {
-
search_text = memnew(LineEdit);
add_child(search_text);
search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
@@ -1701,7 +1687,6 @@ FindBar::FindBar() {
}
void FindBar::popup_search() {
-
show();
bool grabbed_focus = false;
if (!search_text->has_focus()) {
@@ -1719,11 +1704,9 @@ void FindBar::popup_search() {
}
void FindBar::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
-
find_prev->set_icon(get_theme_icon("MoveUp", "EditorIcons"));
find_next->set_icon(get_theme_icon("MoveDown", "EditorIcons"));
hide_button->set_normal_texture(get_theme_icon("Close", "EditorIcons"));
@@ -1733,36 +1716,30 @@ void FindBar::_notification(int p_what) {
matches_label->add_theme_color_override("font_color", results_count > 0 ? get_theme_color("font_color", "Label") : get_theme_color("error_color", "Editor"));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
-
set_process_unhandled_input(is_visible_in_tree());
} break;
}
}
void FindBar::_bind_methods() {
-
ClassDB::bind_method("_unhandled_input", &FindBar::_unhandled_input);
ADD_SIGNAL(MethodInfo("search"));
}
void FindBar::set_rich_text_label(RichTextLabel *p_rich_text_label) {
-
rich_text_label = p_rich_text_label;
}
bool FindBar::search_next() {
-
return _search();
}
bool FindBar::search_prev() {
-
return _search(true);
}
bool FindBar::_search(bool p_search_previous) {
-
String stext = search_text->get_text();
bool keep = prev_search == stext;
@@ -1784,12 +1761,12 @@ bool FindBar::_search(bool p_search_previous) {
}
void FindBar::_update_results_count() {
-
results_count = 0;
String searched = search_text->get_text();
- if (searched.empty())
+ if (searched.empty()) {
return;
+ }
String full_text = rich_text_label->get_text();
@@ -1797,8 +1774,9 @@ void FindBar::_update_results_count() {
while (true) {
int pos = full_text.find(searched, from_pos);
- if (pos == -1)
+ if (pos == -1) {
break;
+ }
results_count++;
from_pos = pos + searched.length();
@@ -1806,7 +1784,6 @@ void FindBar::_update_results_count() {
}
void FindBar::_update_matches_label() {
-
if (search_text->get_text().empty() || results_count == -1) {
matches_label->hide();
} else {
@@ -1818,30 +1795,24 @@ void FindBar::_update_matches_label() {
}
void FindBar::_hide_bar() {
-
- if (search_text->has_focus())
+ if (search_text->has_focus()) {
rich_text_label->grab_focus();
+ }
hide();
}
void FindBar::_unhandled_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
-
if (k->is_pressed() && (rich_text_label->has_focus() || is_a_parent_of(get_focus_owner()))) {
-
bool accepted = true;
switch (k->get_keycode()) {
-
case KEY_ESCAPE: {
-
_hide_bar();
} break;
default: {
-
accepted = false;
} break;
}
@@ -1854,12 +1825,10 @@ void FindBar::_unhandled_input(const Ref<InputEvent> &p_event) {
}
void FindBar::_search_text_changed(const String &p_text) {
-
search_next();
}
void FindBar::_search_text_entered(const String &p_text) {
-
if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
search_prev();
} else {
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 2e053e674f..4d42c1d38a 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -88,7 +88,6 @@ public:
};
class EditorHelp : public VBoxContainer {
-
GDCLASS(EditorHelp, VBoxContainer);
enum Page {
@@ -193,7 +192,6 @@ public:
};
class EditorHelpBit : public MarginContainer {
-
GDCLASS(EditorHelpBit, MarginContainer);
RichTextLabel *rich_text;
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 01a50cad2c..5bfcbf06fc 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -36,33 +36,33 @@
#include "editor_scale.h"
void EditorHelpSearch::_update_icons() {
-
search_box->set_right_icon(results_tree->get_theme_icon("Search", "EditorIcons"));
search_box->set_clear_button_enabled(true);
search_box->add_theme_icon_override("right_icon", results_tree->get_theme_icon("Search", "EditorIcons"));
case_sensitive_button->set_icon(results_tree->get_theme_icon("MatchCase", "EditorIcons"));
hierarchy_button->set_icon(results_tree->get_theme_icon("ClassList", "EditorIcons"));
- if (is_visible())
+ if (is_visible()) {
_update_results();
+ }
}
void EditorHelpSearch::_update_results() {
-
String term = search_box->get_text();
int search_flags = filter_combo->get_selected_id();
- if (case_sensitive_button->is_pressed())
+ if (case_sensitive_button->is_pressed()) {
search_flags |= SEARCH_CASE_SENSITIVE;
- if (hierarchy_button->is_pressed())
+ }
+ if (hierarchy_button->is_pressed()) {
search_flags |= SEARCH_SHOW_HIERARCHY;
+ }
search = Ref<Runner>(memnew(Runner(results_tree, results_tree, term, search_flags)));
set_process(true);
}
void EditorHelpSearch::_search_box_gui_input(const Ref<InputEvent> &p_event) {
-
// Redirect up and down navigational key events to the results list.
Ref<InputEventKey> key = p_event;
if (key.is_valid()) {
@@ -79,20 +79,18 @@ void EditorHelpSearch::_search_box_gui_input(const Ref<InputEvent> &p_event) {
}
void EditorHelpSearch::_search_box_text_changed(const String &p_text) {
-
_update_results();
}
void EditorHelpSearch::_filter_combo_item_selected(int p_option) {
-
_update_results();
}
void EditorHelpSearch::_confirmed() {
-
TreeItem *item = results_tree->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
// Activate the script editor and emit the signal with the documentation link to display.
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
@@ -103,7 +101,6 @@ void EditorHelpSearch::_confirmed() {
}
void EditorHelpSearch::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible()) {
@@ -113,27 +110,25 @@ void EditorHelpSearch::_notification(int p_what) {
}
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
_update_icons();
} break;
case NOTIFICATION_ENTER_TREE: {
-
connect("confirmed", callable_mp(this, &EditorHelpSearch::_confirmed));
_update_icons();
} break;
case NOTIFICATION_PROCESS: {
-
// Update background search.
if (search.is_valid()) {
if (search->work()) {
// Search done.
// Only point to the perfect match if it's a new search, and not just reopening a old one.
- if (!old_search)
+ if (!old_search) {
results_tree->ensure_cursor_is_visible();
- else
+ } else {
old_search = false;
+ }
get_ok()->set_disabled(!results_tree->get_selected());
@@ -148,31 +143,30 @@ void EditorHelpSearch::_notification(int p_what) {
}
void EditorHelpSearch::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("go_to_help"));
}
void EditorHelpSearch::popup_dialog() {
-
popup_dialog(search_box->get_text());
}
void EditorHelpSearch::popup_dialog(const String &p_term) {
-
// Restore valid window bounds or pop up at default size.
Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "search_help", Rect2());
- if (saved_size != Rect2())
+ if (saved_size != Rect2()) {
popup(saved_size);
- else
+ } else {
popup_centered_ratio(0.5F);
+ }
if (p_term == "") {
search_box->clear();
} else {
- if (old_term == p_term)
+ if (old_term == p_term) {
old_search = true;
- else
+ } else {
old_term = p_term;
+ }
search_box->set_text(p_term);
search_box->select_all();
@@ -182,7 +176,6 @@ void EditorHelpSearch::popup_dialog(const String &p_term) {
}
EditorHelpSearch::EditorHelpSearch() {
-
old_search = false;
set_hide_on_ok(false);
@@ -254,7 +247,6 @@ EditorHelpSearch::EditorHelpSearch() {
}
bool EditorHelpSearch::Runner::_is_class_disabled_by_feature_profile(const StringName &p_class) {
-
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
if (profile.is_null()) {
return false;
@@ -262,7 +254,6 @@ bool EditorHelpSearch::Runner::_is_class_disabled_by_feature_profile(const Strin
StringName class_name = p_class;
while (class_name != StringName()) {
-
if (!ClassDB::class_exists(class_name)) {
return false;
}
@@ -277,7 +268,6 @@ bool EditorHelpSearch::Runner::_is_class_disabled_by_feature_profile(const Strin
}
bool EditorHelpSearch::Runner::_slice() {
-
bool phase_done = false;
switch (phase) {
case PHASE_MATCH_CLASSES_INIT:
@@ -308,13 +298,13 @@ bool EditorHelpSearch::Runner::_slice() {
return true;
};
- if (phase_done)
+ if (phase_done) {
phase++;
+ }
return false;
}
bool EditorHelpSearch::Runner::_phase_match_classes_init() {
-
iterator_doc = EditorHelp::get_doc_data()->class_list.front();
matches.clear();
matched_item = nullptr;
@@ -323,51 +313,66 @@ bool EditorHelpSearch::Runner::_phase_match_classes_init() {
}
bool EditorHelpSearch::Runner::_phase_match_classes() {
-
DocData::ClassDoc &class_doc = iterator_doc->value();
if (!_is_class_disabled_by_feature_profile(class_doc.name)) {
-
matches[class_doc.name] = ClassMatch();
ClassMatch &match = matches[class_doc.name];
match.doc = &class_doc;
// Match class name.
- if (search_flags & SEARCH_CLASSES)
+ if (search_flags & SEARCH_CLASSES) {
match.name = term == "" || _match_string(term, class_doc.name);
+ }
// Match members if the term is long enough.
if (term.length() > 1) {
- if (search_flags & SEARCH_METHODS)
+ if (search_flags & SEARCH_METHODS) {
for (int i = 0; i < class_doc.methods.size(); i++) {
String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.methods[i].name : class_doc.methods[i].name.to_lower();
String aux_term = (search_flags & SEARCH_CASE_SENSITIVE) ? term : term.to_lower();
- if (aux_term.begins_with("."))
+ if (aux_term.begins_with(".")) {
aux_term = aux_term.right(1);
+ }
- if (aux_term.ends_with("("))
+ if (aux_term.ends_with("(")) {
aux_term = aux_term.left(aux_term.length() - 1).strip_edges();
+ }
- if (aux_term.is_subsequence_of(method_name))
+ if (aux_term.is_subsequence_of(method_name)) {
match.methods.push_back(const_cast<DocData::MethodDoc *>(&class_doc.methods[i]));
+ }
}
- if (search_flags & SEARCH_SIGNALS)
- for (int i = 0; i < class_doc.signals.size(); i++)
- if (_match_string(term, class_doc.signals[i].name))
+ }
+ if (search_flags & SEARCH_SIGNALS) {
+ for (int i = 0; i < class_doc.signals.size(); i++) {
+ if (_match_string(term, class_doc.signals[i].name)) {
match.signals.push_back(const_cast<DocData::MethodDoc *>(&class_doc.signals[i]));
- if (search_flags & SEARCH_CONSTANTS)
- for (int i = 0; i < class_doc.constants.size(); i++)
- if (_match_string(term, class_doc.constants[i].name))
+ }
+ }
+ }
+ if (search_flags & SEARCH_CONSTANTS) {
+ for (int i = 0; i < class_doc.constants.size(); i++) {
+ if (_match_string(term, class_doc.constants[i].name)) {
match.constants.push_back(const_cast<DocData::ConstantDoc *>(&class_doc.constants[i]));
- if (search_flags & SEARCH_PROPERTIES)
- for (int i = 0; i < class_doc.properties.size(); i++)
- if (_match_string(term, class_doc.properties[i].name) || _match_string(term, class_doc.properties[i].getter) || _match_string(term, class_doc.properties[i].setter))
+ }
+ }
+ }
+ if (search_flags & SEARCH_PROPERTIES) {
+ for (int i = 0; i < class_doc.properties.size(); i++) {
+ if (_match_string(term, class_doc.properties[i].name) || _match_string(term, class_doc.properties[i].getter) || _match_string(term, class_doc.properties[i].setter)) {
match.properties.push_back(const_cast<DocData::PropertyDoc *>(&class_doc.properties[i]));
- if (search_flags & SEARCH_THEME_ITEMS)
- for (int i = 0; i < class_doc.theme_properties.size(); i++)
- if (_match_string(term, class_doc.theme_properties[i].name))
+ }
+ }
+ }
+ if (search_flags & SEARCH_THEME_ITEMS) {
+ for (int i = 0; i < class_doc.theme_properties.size(); i++) {
+ if (_match_string(term, class_doc.theme_properties[i].name)) {
match.theme_properties.push_back(const_cast<DocData::PropertyDoc *>(&class_doc.theme_properties[i]));
+ }
+ }
+ }
}
}
@@ -376,7 +381,6 @@ bool EditorHelpSearch::Runner::_phase_match_classes() {
}
bool EditorHelpSearch::Runner::_phase_class_items_init() {
-
iterator_match = matches.front();
results_tree->clear();
@@ -387,15 +391,16 @@ bool EditorHelpSearch::Runner::_phase_class_items_init() {
}
bool EditorHelpSearch::Runner::_phase_class_items() {
-
ClassMatch &match = iterator_match->value();
if (search_flags & SEARCH_SHOW_HIERARCHY) {
- if (match.required())
+ if (match.required()) {
_create_class_hierarchy(match);
+ }
} else {
- if (match.name)
+ if (match.name) {
_create_class_item(root_item, match.doc, false);
+ }
}
iterator_match = iterator_match->next();
@@ -403,64 +408,68 @@ bool EditorHelpSearch::Runner::_phase_class_items() {
}
bool EditorHelpSearch::Runner::_phase_member_items_init() {
-
iterator_match = matches.front();
return true;
}
bool EditorHelpSearch::Runner::_phase_member_items() {
-
ClassMatch &match = iterator_match->value();
TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item;
- for (int i = 0; i < match.methods.size(); i++)
+ for (int i = 0; i < match.methods.size(); i++) {
_create_method_item(parent, match.doc, match.methods[i]);
- for (int i = 0; i < match.signals.size(); i++)
+ }
+ for (int i = 0; i < match.signals.size(); i++) {
_create_signal_item(parent, match.doc, match.signals[i]);
- for (int i = 0; i < match.constants.size(); i++)
+ }
+ for (int i = 0; i < match.constants.size(); i++) {
_create_constant_item(parent, match.doc, match.constants[i]);
- for (int i = 0; i < match.properties.size(); i++)
+ }
+ for (int i = 0; i < match.properties.size(); i++) {
_create_property_item(parent, match.doc, match.properties[i]);
- for (int i = 0; i < match.theme_properties.size(); i++)
+ }
+ for (int i = 0; i < match.theme_properties.size(); i++) {
_create_theme_property_item(parent, match.doc, match.theme_properties[i]);
+ }
iterator_match = iterator_match->next();
return !iterator_match;
}
bool EditorHelpSearch::Runner::_phase_select_match() {
-
- if (matched_item)
+ if (matched_item) {
matched_item->select(0);
+ }
return true;
}
bool EditorHelpSearch::Runner::_match_string(const String &p_term, const String &p_string) const {
-
- if (search_flags & SEARCH_CASE_SENSITIVE)
+ if (search_flags & SEARCH_CASE_SENSITIVE) {
return p_term.is_subsequence_of(p_string);
- else
+ } else {
return p_term.is_subsequence_ofi(p_string);
+ }
}
void EditorHelpSearch::Runner::_match_item(TreeItem *p_item, const String &p_text) {
-
if (!matched_item) {
if (search_flags & SEARCH_CASE_SENSITIVE) {
- if (p_text.casecmp_to(term) == 0)
+ if (p_text.casecmp_to(term) == 0) {
matched_item = p_item;
+ }
} else {
- if (p_text.nocasecmp_to(term) == 0)
+ if (p_text.nocasecmp_to(term) == 0) {
matched_item = p_item;
+ }
}
}
}
TreeItem *EditorHelpSearch::Runner::_create_class_hierarchy(const ClassMatch &p_match) {
-
- if (class_items.has(p_match.doc->name))
+ if (class_items.has(p_match.doc->name)) {
return class_items[p_match.doc->name];
+ }
// Ensure parent nodes are created first.
TreeItem *parent = root_item;
@@ -479,12 +488,12 @@ TreeItem *EditorHelpSearch::Runner::_create_class_hierarchy(const ClassMatch &p_
}
TreeItem *EditorHelpSearch::Runner::_create_class_item(TreeItem *p_parent, const DocData::ClassDoc *p_doc, bool p_gray) {
-
Ref<Texture2D> icon = empty_icon;
- if (ui_service->has_theme_icon(p_doc->name, "EditorIcons"))
+ if (ui_service->has_theme_icon(p_doc->name, "EditorIcons")) {
icon = ui_service->get_theme_icon(p_doc->name, "EditorIcons");
- else if (ClassDB::class_exists(p_doc->name) && ClassDB::is_parent_class(p_doc->name, "Object"))
+ } else if (ClassDB::class_exists(p_doc->name) && ClassDB::is_parent_class(p_doc->name, "Object")) {
icon = ui_service->get_theme_icon("Object", "EditorIcons");
+ }
String tooltip = p_doc->brief_description.strip_edges();
TreeItem *item = results_tree->create_item(p_parent);
@@ -505,43 +514,43 @@ TreeItem *EditorHelpSearch::Runner::_create_class_item(TreeItem *p_parent, const
}
TreeItem *EditorHelpSearch::Runner::_create_method_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::MethodDoc *p_doc) {
-
String tooltip = p_doc->return_type + " " + p_class_doc->name + "." + p_doc->name + "(";
for (int i = 0; i < p_doc->arguments.size(); i++) {
const DocData::ArgumentDoc &arg = p_doc->arguments[i];
tooltip += arg.type + " " + arg.name;
- if (arg.default_value != "")
+ if (arg.default_value != "") {
tooltip += " = " + arg.default_value;
- if (i < p_doc->arguments.size() - 1)
+ }
+ if (i < p_doc->arguments.size() - 1) {
tooltip += ", ";
+ }
}
tooltip += ")";
return _create_member_item(p_parent, p_class_doc->name, "MemberMethod", p_doc->name, TTRC("Method"), "method", tooltip);
}
TreeItem *EditorHelpSearch::Runner::_create_signal_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::MethodDoc *p_doc) {
-
String tooltip = p_doc->return_type + " " + p_class_doc->name + "." + p_doc->name + "(";
for (int i = 0; i < p_doc->arguments.size(); i++) {
const DocData::ArgumentDoc &arg = p_doc->arguments[i];
tooltip += arg.type + " " + arg.name;
- if (arg.default_value != "")
+ if (arg.default_value != "") {
tooltip += " = " + arg.default_value;
- if (i < p_doc->arguments.size() - 1)
+ }
+ if (i < p_doc->arguments.size() - 1) {
tooltip += ", ";
+ }
}
tooltip += ")";
return _create_member_item(p_parent, p_class_doc->name, "MemberSignal", p_doc->name, TTRC("Signal"), "signal", tooltip);
}
TreeItem *EditorHelpSearch::Runner::_create_constant_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::ConstantDoc *p_doc) {
-
String tooltip = p_class_doc->name + "." + p_doc->name;
return _create_member_item(p_parent, p_class_doc->name, "MemberConstant", p_doc->name, TTRC("Constant"), "constant", tooltip);
}
TreeItem *EditorHelpSearch::Runner::_create_property_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::PropertyDoc *p_doc) {
-
String tooltip = p_doc->type + " " + p_class_doc->name + "." + p_doc->name;
tooltip += "\n " + p_class_doc->name + "." + p_doc->setter + "(value) setter";
tooltip += "\n " + p_class_doc->name + "." + p_doc->getter + "() getter";
@@ -549,13 +558,11 @@ TreeItem *EditorHelpSearch::Runner::_create_property_item(TreeItem *p_parent, co
}
TreeItem *EditorHelpSearch::Runner::_create_theme_property_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::PropertyDoc *p_doc) {
-
String tooltip = p_doc->type + " " + p_class_doc->name + "." + p_doc->name;
return _create_member_item(p_parent, p_class_doc->name, "MemberTheme", p_doc->name, TTRC("Theme Property"), "theme_item", tooltip);
}
TreeItem *EditorHelpSearch::Runner::_create_member_item(TreeItem *p_parent, const String &p_class_name, const String &p_icon, const String &p_name, const String &p_type, const String &p_metatype, const String &p_tooltip) {
-
Ref<Texture2D> icon;
String text;
if (search_flags & SEARCH_SHOW_HIERARCHY) {
@@ -564,10 +571,10 @@ TreeItem *EditorHelpSearch::Runner::_create_member_item(TreeItem *p_parent, cons
} else {
icon = ui_service->get_theme_icon(p_icon, "EditorIcons");
/*// In flat mode, show the class icon.
- if (ui_service->has_icon(p_class_name, "EditorIcons"))
- icon = ui_service->get_icon(p_class_name, "EditorIcons");
- else if (ClassDB::is_parent_class(p_class_name, "Object"))
- icon = ui_service->get_icon("Object", "EditorIcons");*/
+if (ui_service->has_icon(p_class_name, "EditorIcons"))
+icon = ui_service->get_icon(p_class_name, "EditorIcons");
+else if (ClassDB::is_parent_class(p_class_name, "Object"))
+icon = ui_service->get_icon("Object", "EditorIcons");*/
text = p_class_name + "." + p_name;
}
@@ -585,17 +592,17 @@ TreeItem *EditorHelpSearch::Runner::_create_member_item(TreeItem *p_parent, cons
}
bool EditorHelpSearch::Runner::work(uint64_t slot) {
-
// Return true when the search has been completed, otherwise false.
const uint64_t until = OS::get_singleton()->get_ticks_usec() + slot;
- while (!_slice())
- if (OS::get_singleton()->get_ticks_usec() > until)
+ while (!_slice()) {
+ if (OS::get_singleton()->get_ticks_usec() > until) {
return false;
+ }
+ }
return true;
}
EditorHelpSearch::Runner::Runner(Control *p_icon_service, Tree *p_results_tree, const String &p_term, int p_search_flags) :
- phase(0),
ui_service(p_icon_service),
results_tree(p_results_tree),
term((p_search_flags & SEARCH_CASE_SENSITIVE) == 0 ? p_term.strip_edges().to_lower() : p_term.strip_edges()),
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h
index feff96d2e5..f7dbc5c3ad 100644
--- a/editor/editor_help_search.h
+++ b/editor/editor_help_search.h
@@ -84,7 +84,6 @@ public:
};
class EditorHelpSearch::Runner : public Reference {
-
enum Phase {
PHASE_MATCH_CLASSES_INIT,
PHASE_MATCH_CLASSES,
@@ -95,7 +94,7 @@ class EditorHelpSearch::Runner : public Reference {
PHASE_SELECT_MATCH,
PHASE_MAX
};
- int phase;
+ int phase = 0;
struct ClassMatch {
DocData::ClassDoc *doc;
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 6adc640651..a8ded44323 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -39,22 +39,24 @@
#include "scene/resources/packed_scene.h"
Size2 EditorProperty::get_minimum_size() const {
-
Size2 ms;
Ref<Font> font = get_theme_font("font", "Tree");
ms.height = font->get_height();
for (int i = 0; i < get_child_count(); i++) {
-
Control *c = Object::cast_to<Control>(get_child(i));
- if (!c)
+ if (!c) {
continue;
- if (c->is_set_as_toplevel())
+ }
+ if (c->is_set_as_toplevel()) {
continue;
- if (!c->is_visible())
+ }
+ if (!c->is_visible()) {
continue;
- if (c == bottom_editor)
+ }
+ if (c == bottom_editor) {
continue;
+ }
Size2 minsize = c->get_combined_minimum_size();
ms.width = MAX(ms.width, minsize.width);
@@ -88,7 +90,6 @@ Size2 EditorProperty::get_minimum_size() const {
}
void EditorProperty::emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field, bool p_changing) {
-
Variant args[4] = { p_property, p_value, p_field, p_changing };
const Variant *argptrs[4] = { &args[0], &args[1], &args[2], &args[3] };
@@ -96,9 +97,7 @@ void EditorProperty::emit_changed(const StringName &p_property, const Variant &p
}
void EditorProperty::_notification(int p_what) {
-
if (p_what == NOTIFICATION_SORT_CHILDREN) {
-
Size2 size = get_size();
Rect2 rect;
Rect2 bottom_rect;
@@ -114,14 +113,16 @@ void EditorProperty::_notification(int p_what) {
//compute room needed
for (int i = 0; i < get_child_count(); i++) {
-
Control *c = Object::cast_to<Control>(get_child(i));
- if (!c)
+ if (!c) {
continue;
- if (c->is_set_as_toplevel())
+ }
+ if (c->is_set_as_toplevel()) {
continue;
- if (c == bottom_editor)
+ }
+ if (c == bottom_editor) {
continue;
+ }
Size2 minsize = c->get_combined_minimum_size();
child_room = MAX(child_room, minsize.width);
@@ -138,7 +139,6 @@ void EditorProperty::_notification(int p_what) {
}
if (bottom_editor) {
-
int m = 0; //get_constant("item_margin", "Tree");
bottom_rect = Rect2(m, rect.size.height + get_theme_constant("vseparation", "Tree"), size.width - m, bottom_editor->get_combined_minimum_size().height);
@@ -175,14 +175,16 @@ void EditorProperty::_notification(int p_what) {
//set children
for (int i = 0; i < get_child_count(); i++) {
-
Control *c = Object::cast_to<Control>(get_child(i));
- if (!c)
+ if (!c) {
continue;
- if (c->is_set_as_toplevel())
+ }
+ if (c->is_set_as_toplevel()) {
continue;
- if (c == bottom_editor)
+ }
+ if (c == bottom_editor) {
continue;
+ }
fit_child_in_rect(c, rect);
right_child_rect = rect;
@@ -234,10 +236,11 @@ void EditorProperty::_notification(int p_what) {
if (checkable) {
Ref<Texture2D> checkbox;
- if (checked)
+ if (checked) {
checkbox = get_theme_icon("GuiChecked", "EditorIcons");
- else
+ } else {
checkbox = get_theme_icon("GuiUnchecked", "EditorIcons");
+ }
Color color2(1, 1, 1);
if (check_hover) {
@@ -335,8 +338,9 @@ StringName EditorProperty::get_edited_property() {
}
void EditorProperty::update_property() {
- if (get_script_instance())
+ if (get_script_instance()) {
get_script_instance()->call("update_property");
+ }
}
void EditorProperty::set_read_only(bool p_read_only) {
@@ -348,14 +352,12 @@ bool EditorProperty::is_read_only() const {
}
bool EditorPropertyRevert::may_node_be_in_instance(Node *p_node) {
-
Node *edited_scene = EditorNode::get_singleton()->get_edited_scene();
bool might_be = false;
Node *node = p_node;
while (node) {
-
if (node->get_scene_instance_state().is_valid()) {
might_be = true;
break;
@@ -375,7 +377,6 @@ bool EditorPropertyRevert::may_node_be_in_instance(Node *p_node) {
}
bool EditorPropertyRevert::get_instanced_node_original_property(Node *p_node, const StringName &p_prop, Variant &value) {
-
Node *node = p_node;
Node *orig = node;
@@ -384,7 +385,6 @@ bool EditorPropertyRevert::get_instanced_node_original_property(Node *p_node, co
bool found = false;
while (node) {
-
Ref<SceneState> ss;
if (node == edited_scene) {
@@ -395,7 +395,6 @@ bool EditorPropertyRevert::get_instanced_node_original_property(Node *p_node, co
}
if (ss.is_valid()) {
-
NodePath np = node->get_path_to(orig);
int node_idx = ss->find_node_by_path(np);
if (node_idx >= 0) {
@@ -403,7 +402,6 @@ bool EditorPropertyRevert::get_instanced_node_original_property(Node *p_node, co
Variant lvar;
lvar = ss->get_property_value(node_idx, p_prop, lfound);
if (lfound) {
-
found = true;
value = lvar;
}
@@ -429,21 +427,20 @@ bool EditorPropertyRevert::get_instanced_node_original_property(Node *p_node, co
}
bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Variant &p_current, const Variant &p_orig) {
-
// this is a pretty difficult function, because a property may not be saved but may have
// the flag to not save if one or if zero
//make sure there is an actual state
{
Node *node = p_node;
- if (!node)
+ if (!node) {
return false;
+ }
Node *edited_scene = EditorNode::get_singleton()->get_edited_scene();
bool found_state = false;
while (node) {
-
Ref<SceneState> ss;
if (node == edited_scene) {
@@ -463,8 +460,9 @@ bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Varian
node = node->get_owner();
}
- if (!found_state)
+ if (!found_state) {
return false; //pointless to check if we are not comparing against anything.
+ }
}
if (p_current.get_type() == Variant::FLOAT && p_orig.get_type() == Variant::FLOAT) {
@@ -478,7 +476,6 @@ bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Varian
}
bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringName &p_property) {
-
bool has_revert = false;
Node *node = Object::cast_to<Node>(p_object);
@@ -524,9 +521,9 @@ bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringNam
}
void EditorProperty::update_reload_status() {
-
- if (property == StringName())
+ if (property == StringName()) {
return; //no property, so nothing to do
+ }
bool has_reload = EditorPropertyRevert::can_property_revert(object, property);
@@ -550,31 +547,27 @@ bool EditorProperty::use_keying_next() const {
return false;
}
-void EditorProperty::set_checkable(bool p_checkable) {
+void EditorProperty::set_checkable(bool p_checkable) {
checkable = p_checkable;
update();
queue_sort();
}
bool EditorProperty::is_checkable() const {
-
return checkable;
}
void EditorProperty::set_checked(bool p_checked) {
-
checked = p_checked;
update();
}
bool EditorProperty::is_checked() const {
-
return checked;
}
void EditorProperty::set_draw_red(bool p_draw_red) {
-
draw_red = p_draw_red;
update();
}
@@ -600,14 +593,13 @@ bool EditorProperty::is_keying() const {
}
bool EditorProperty::is_draw_red() const {
-
return draw_red;
}
void EditorProperty::_focusable_focused(int p_index) {
-
- if (!selectable)
+ if (!selectable) {
return;
+ }
bool already_selected = selected;
selected = true;
selected_focusable = p_index;
@@ -618,13 +610,11 @@ void EditorProperty::_focusable_focused(int p_index) {
}
void EditorProperty::add_focusable(Control *p_control) {
-
p_control->connect("focus_entered", callable_mp(this, &EditorProperty::_focusable_focused), varray(focusables.size()));
focusables.push_back(p_control);
}
void EditorProperty::select(int p_focusable) {
-
bool already_selected = selected;
if (p_focusable >= 0) {
@@ -651,14 +641,13 @@ bool EditorProperty::is_selected() const {
}
void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
-
- if (property == StringName())
+ if (property == StringName()) {
return;
+ }
Ref<InputEventMouse> me = p_event;
if (me.is_valid()) {
-
bool button_left = me->get_button_mask() & BUTTON_MASK_LEFT;
bool new_keying_hover = keying_rect.has_point(me->get_position()) && !button_left;
@@ -689,7 +678,6 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
if (!selected && selectable) {
selected = true;
emit_signal("selected", property, -1);
@@ -721,12 +709,10 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
}
if (revert_rect.has_point(mb->get_position())) {
-
Variant vorig;
Node *node = Object::cast_to<Node>(object);
if (node && EditorPropertyRevert::may_node_be_in_instance(node) && EditorPropertyRevert::get_instanced_node_original_property(node, property, vorig)) {
-
emit_changed(property, vorig.duplicate(true));
update_property();
return;
@@ -767,17 +753,17 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
}
void EditorProperty::set_label_reference(Control *p_control) {
-
label_reference = p_control;
}
-void EditorProperty::set_bottom_editor(Control *p_control) {
+void EditorProperty::set_bottom_editor(Control *p_control) {
bottom_editor = p_control;
}
-Variant EditorProperty::get_drag_data(const Point2 &p_point) {
- if (property == StringName())
+Variant EditorProperty::get_drag_data(const Point2 &p_point) {
+ if (property == StringName()) {
return Variant();
+ }
Dictionary dp;
dp["type"] = "obj_property";
@@ -792,12 +778,10 @@ Variant EditorProperty::get_drag_data(const Point2 &p_point) {
}
void EditorProperty::set_use_folding(bool p_use_folding) {
-
use_folding = p_use_folding;
}
bool EditorProperty::is_using_folding() const {
-
return use_folding;
}
@@ -820,7 +804,6 @@ void EditorProperty::set_name_split_ratio(float p_ratio) {
}
float EditorProperty::get_name_split_ratio() const {
-
return split_ratio;
}
@@ -830,7 +813,6 @@ void EditorProperty::set_object_and_property(Object *p_object, const StringName
}
Control *EditorProperty::make_custom_tooltip(const String &p_text) const {
-
tooltip_text = p_text;
EditorHelpBit *help_bit = memnew(EditorHelpBit);
//help_bit->add_theme_style_override("panel", get_theme_stylebox("panel", "TooltipPanel"));
@@ -859,7 +841,6 @@ String EditorProperty::get_tooltip_text() const {
}
void EditorProperty::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_label", "text"), &EditorProperty::set_label);
ClassDB::bind_method(D_METHOD("get_label"), &EditorProperty::get_label);
@@ -916,7 +897,6 @@ void EditorProperty::_bind_methods() {
}
EditorProperty::EditorProperty() {
-
draw_top_bg = true;
object = nullptr;
split_ratio = 0.5;
@@ -939,18 +919,17 @@ EditorProperty::EditorProperty() {
label_reference = nullptr;
bottom_editor = nullptr;
}
+
////////////////////////////////////////////////
////////////////////////////////////////////////
void EditorInspectorPlugin::add_custom_control(Control *control) {
-
AddedEditor ae;
ae.property_editor = control;
added_editors.push_back(ae);
}
void EditorInspectorPlugin::add_property_editor(const String &p_for_property, Control *p_prop) {
-
ERR_FAIL_COND(Object::cast_to<EditorProperty>(p_prop) == nullptr);
AddedEditor ae;
@@ -960,7 +939,6 @@ void EditorInspectorPlugin::add_property_editor(const String &p_for_property, Co
}
void EditorInspectorPlugin::add_property_editor_for_multiple_properties(const String &p_label, const Vector<String> &p_properties, Control *p_prop) {
-
AddedEditor ae;
ae.properties = p_properties;
ae.property_editor = p_prop;
@@ -969,28 +947,25 @@ void EditorInspectorPlugin::add_property_editor_for_multiple_properties(const St
}
bool EditorInspectorPlugin::can_handle(Object *p_object) {
-
if (get_script_instance()) {
return get_script_instance()->call("can_handle", p_object);
}
return false;
}
-void EditorInspectorPlugin::parse_begin(Object *p_object) {
+void EditorInspectorPlugin::parse_begin(Object *p_object) {
if (get_script_instance()) {
get_script_instance()->call("parse_begin", p_object);
}
}
void EditorInspectorPlugin::parse_category(Object *p_object, const String &p_parse_category) {
-
if (get_script_instance()) {
get_script_instance()->call("parse_category", p_object, p_parse_category);
}
}
bool EditorInspectorPlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
-
if (get_script_instance()) {
Variant arg[6] = {
p_object, p_type, p_path, p_hint, p_hint_text, p_usage
@@ -1004,15 +979,14 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, Variant::Type p_typ
}
return false;
}
-void EditorInspectorPlugin::parse_end() {
+void EditorInspectorPlugin::parse_end() {
if (get_script_instance()) {
get_script_instance()->call("parse_end");
}
}
void EditorInspectorPlugin::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("add_custom_control", "control"), &EditorInspectorPlugin::add_custom_control);
ClassDB::bind_method(D_METHOD("add_property_editor", "property", "editor"), &EditorInspectorPlugin::add_property_editor);
ClassDB::bind_method(D_METHOD("add_property_editor_for_multiple_properties", "label", "properties", "editor"), &EditorInspectorPlugin::add_property_editor_for_multiple_properties);
@@ -1047,9 +1021,7 @@ void EditorInspectorPlugin::_bind_methods() {
////////////////////////////////////////////////
void EditorInspectorCategory::_notification(int p_what) {
-
if (p_what == NOTIFICATION_DRAW) {
-
draw_rect(Rect2(Vector2(), get_size()), bg_color);
Ref<Font> font = get_theme_font("font", "Tree");
@@ -1073,7 +1045,6 @@ void EditorInspectorCategory::_notification(int p_what) {
}
Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) const {
-
tooltip_text = p_text;
EditorHelpBit *help_bit = memnew(EditorHelpBit);
help_bit->add_theme_style_override("panel", get_theme_stylebox("panel", "TooltipPanel"));
@@ -1097,7 +1068,6 @@ Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) cons
}
Size2 EditorInspectorCategory::get_minimum_size() const {
-
Ref<Font> font = get_theme_font("font", "Tree");
Size2 ms;
@@ -1116,7 +1086,6 @@ void EditorInspectorCategory::_bind_methods() {
}
String EditorInspectorCategory::get_tooltip_text() const {
-
return tooltip_text;
}
@@ -1127,7 +1096,6 @@ EditorInspectorCategory::EditorInspectorCategory() {
////////////////////////////////////////////////
void EditorInspectorSection::_test_unfold() {
-
if (!vbox_added) {
add_child(vbox);
vbox_added = true;
@@ -1135,9 +1103,7 @@ void EditorInspectorSection::_test_unfold() {
}
void EditorInspectorSection::_notification(int p_what) {
-
if (p_what == NOTIFICATION_SORT_CHILDREN) {
-
Ref<Font> font = get_theme_font("font", "Tree");
Ref<Texture2D> arrow;
@@ -1163,14 +1129,16 @@ void EditorInspectorSection::_notification(int p_what) {
//set children
for (int i = 0; i < get_child_count(); i++) {
-
Control *c = Object::cast_to<Control>(get_child(i));
- if (!c)
+ if (!c) {
continue;
- if (c->is_set_as_toplevel())
+ }
+ if (c->is_set_as_toplevel()) {
continue;
- if (!c->is_visible_in_tree())
+ }
+ if (!c->is_visible_in_tree()) {
continue;
+ }
fit_child_in_rect(c, rect);
}
@@ -1179,7 +1147,6 @@ void EditorInspectorSection::_notification(int p_what) {
}
if (p_what == NOTIFICATION_DRAW) {
-
Ref<Texture2D> arrow;
if (foldable) {
@@ -1211,17 +1178,18 @@ void EditorInspectorSection::_notification(int p_what) {
}
Size2 EditorInspectorSection::get_minimum_size() const {
-
Size2 ms;
for (int i = 0; i < get_child_count(); i++) {
-
Control *c = Object::cast_to<Control>(get_child(i));
- if (!c)
+ if (!c) {
continue;
- if (c->is_set_as_toplevel())
+ }
+ if (c->is_set_as_toplevel()) {
continue;
- if (!c->is_visible())
+ }
+ if (!c->is_visible()) {
continue;
+ }
Size2 minsize = c->get_combined_minimum_size();
ms.width = MAX(ms.width, minsize.width);
ms.height = MAX(ms.height, minsize.height);
@@ -1235,7 +1203,6 @@ Size2 EditorInspectorSection::get_minimum_size() const {
}
void EditorInspectorSection::setup(const String &p_section, const String &p_label, Object *p_object, const Color &p_bg_color, bool p_foldable) {
-
section = p_section;
label = p_label;
object = p_object;
@@ -1258,13 +1225,12 @@ void EditorInspectorSection::setup(const String &p_section, const String &p_labe
}
void EditorInspectorSection::_gui_input(const Ref<InputEvent> &p_event) {
-
- if (!foldable)
+ if (!foldable) {
return;
+ }
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
Ref<Font> font = get_theme_font("font", "Tree");
if (mb->get_position().y > font->get_height()) { //clicked outside
return;
@@ -1287,9 +1253,9 @@ VBoxContainer *EditorInspectorSection::get_vbox() {
}
void EditorInspectorSection::unfold() {
-
- if (!foldable)
+ if (!foldable) {
return;
+ }
_test_unfold();
@@ -1299,11 +1265,13 @@ void EditorInspectorSection::unfold() {
}
void EditorInspectorSection::fold() {
- if (!foldable)
+ if (!foldable) {
return;
+ }
- if (!vbox_added)
+ if (!vbox_added) {
return; //kinda pointless
+ }
object->editor_set_section_unfold(section, false);
vbox->hide();
@@ -1311,7 +1279,6 @@ void EditorInspectorSection::fold() {
}
void EditorInspectorSection::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("setup", "section", "label", "object", "bg_color", "foldable"), &EditorInspectorSection::setup);
ClassDB::bind_method(D_METHOD("get_vbox"), &EditorInspectorSection::get_vbox);
ClassDB::bind_method(D_METHOD("unfold"), &EditorInspectorSection::unfold);
@@ -1327,7 +1294,6 @@ EditorInspectorSection::EditorInspectorSection() {
}
EditorInspectorSection::~EditorInspectorSection() {
-
if (!vbox_added) {
memdelete(vbox);
}
@@ -1340,9 +1306,7 @@ Ref<EditorInspectorPlugin> EditorInspector::inspector_plugins[MAX_PLUGINS];
int EditorInspector::inspector_plugin_count = 0;
EditorProperty *EditorInspector::instantiate_property_editor(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
-
for (int i = inspector_plugin_count - 1; i >= 0; i--) {
-
inspector_plugins[i]->parse_property(p_object, p_type, p_path, p_hint, p_hint_text, p_usage, p_wide);
if (inspector_plugins[i]->added_editors.size()) {
for (int j = 1; j < inspector_plugins[i]->added_editors.size(); j++) { //only keep first one
@@ -1351,7 +1315,6 @@ EditorProperty *EditorInspector::instantiate_property_editor(Object *p_object, V
EditorProperty *prop = Object::cast_to<EditorProperty>(inspector_plugins[i]->added_editors[0].property_editor);
if (prop) {
-
inspector_plugins[i]->added_editors.clear();
return prop;
} else {
@@ -1364,18 +1327,17 @@ EditorProperty *EditorInspector::instantiate_property_editor(Object *p_object, V
}
void EditorInspector::add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin) {
-
ERR_FAIL_COND(inspector_plugin_count == MAX_PLUGINS);
for (int i = 0; i < inspector_plugin_count; i++) {
- if (inspector_plugins[i] == p_plugin)
+ if (inspector_plugins[i] == p_plugin) {
return; //already exists
+ }
}
inspector_plugins[inspector_plugin_count++] = p_plugin;
}
void EditorInspector::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin) {
-
ERR_FAIL_COND(inspector_plugin_count == MAX_PLUGINS);
int idx = -1;
@@ -1391,8 +1353,9 @@ void EditorInspector::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &
inspector_plugins[i] = inspector_plugins[i + 1];
}
- if (idx == inspector_plugin_count - 1)
+ if (idx == inspector_plugin_count - 1) {
inspector_plugins[idx] = Ref<EditorInspectorPlugin>();
+ }
inspector_plugin_count--;
}
@@ -1409,19 +1372,15 @@ void EditorInspector::set_undo_redo(UndoRedo *p_undo_redo) {
}
String EditorInspector::get_selected_path() const {
-
return property_selected;
}
void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<EditorInspectorPlugin> ped) {
-
for (List<EditorInspectorPlugin::AddedEditor>::Element *F = ped->added_editors.front(); F; F = F->next()) {
-
EditorProperty *ep = Object::cast_to<EditorProperty>(F->get().property_editor);
current_vbox->add_child(F->get().property_editor);
if (ep) {
-
ep->object = object;
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
@@ -1434,7 +1393,6 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
ep->connect("object_id_selected", callable_mp(this, &EditorInspector::_object_id_selected), varray(), CONNECT_DEFERRED);
if (F->get().properties.size()) {
-
if (F->get().properties.size() == 1) {
//since it's one, associate:
ep->property = F->get().properties[0];
@@ -1465,7 +1423,6 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
}
bool EditorInspector::_is_property_disabled_by_feature_profile(const StringName &p_property) {
-
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
if (profile.is_null()) {
return false;
@@ -1474,7 +1431,6 @@ bool EditorInspector::_is_property_disabled_by_feature_profile(const StringName
StringName class_name = object->get_class();
while (class_name != StringName()) {
-
if (profile->is_class_property_disabled(class_name, p_property)) {
return true;
}
@@ -1489,7 +1445,6 @@ bool EditorInspector::_is_property_disabled_by_feature_profile(const StringName
}
void EditorInspector::update_tree() {
-
//to update properly if all is refreshed
StringName current_selected = property_selected;
int current_focusable = -1;
@@ -1517,14 +1472,16 @@ void EditorInspector::update_tree() {
_clear();
- if (!object)
+ if (!object) {
return;
+ }
List<Ref<EditorInspectorPlugin>> valid_plugins;
for (int i = inspector_plugin_count - 1; i >= 0; i--) { //start by last, so lastly added can override newly added
- if (!inspector_plugins[i]->can_handle(object))
+ if (!inspector_plugins[i]->can_handle(object)) {
continue;
+ }
valid_plugins.push_back(inspector_plugins[i]);
}
@@ -1565,20 +1522,17 @@ void EditorInspector::update_tree() {
}
for (List<PropertyInfo>::Element *I = plist.front(); I; I = I->next()) {
-
PropertyInfo &p = I->get();
//make sure the property can be edited
if (p.usage & PROPERTY_USAGE_SUBGROUP) {
-
subgroup = p.name;
subgroup_base = p.hint_string;
continue;
} else if (p.usage & PROPERTY_USAGE_GROUP) {
-
group = p.name;
group_base = p.hint_string;
subgroup = "";
@@ -1587,29 +1541,31 @@ void EditorInspector::update_tree() {
continue;
} else if (p.usage & PROPERTY_USAGE_CATEGORY) {
-
group = "";
group_base = "";
subgroup = "";
subgroup_base = "";
- if (!show_categories)
+ if (!show_categories) {
continue;
+ }
List<PropertyInfo>::Element *N = I->next();
bool valid = true;
//if no properties in category, skip
while (N) {
- if (N->get().usage & PROPERTY_USAGE_EDITOR)
+ if (N->get().usage & PROPERTY_USAGE_EDITOR) {
break;
+ }
if (N->get().usage & PROPERTY_USAGE_CATEGORY) {
valid = false;
break;
}
N = N->next();
}
- if (!valid)
+ if (!valid) {
continue; //empty, ignore
+ }
EditorInspectorCategory *category = memnew(EditorInspectorCategory);
main_vbox->add_child(category);
@@ -1623,14 +1579,13 @@ void EditorInspector::update_tree() {
if (use_doc_hints) {
StringName type2 = p.name;
if (!class_descr_cache.has(type2)) {
-
String descr;
DocData *dd = EditorHelp::get_doc_data();
Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(type2);
if (E) {
- descr = E->get().brief_description;
+ descr = DTR(E->get().brief_description);
}
- class_descr_cache[type2] = DTR(descr);
+ class_descr_cache[type2] = descr;
}
category->set_tooltip(p.name + "::" + (class_descr_cache[type2] == "" ? "" : class_descr_cache[type2]));
@@ -1644,11 +1599,13 @@ void EditorInspector::update_tree() {
continue;
- } else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name))
+ } else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name)) {
continue;
+ }
- if (p.usage & PROPERTY_USAGE_HIGH_END_GFX && RS::get_singleton()->is_low_end())
+ if (p.usage & PROPERTY_USAGE_HIGH_END_GFX && RS::get_singleton()->is_low_end()) {
continue; //do not show this property in low end gfx
+ }
if (p.name == "script" && (hide_script || bool(object->call("_hide_script_from_inspector")))) {
continue;
@@ -1704,14 +1661,15 @@ void EditorInspector::update_tree() {
String path = basename.left(basename.find_last("/"));
if (use_filter && filter != "") {
-
String cat = path;
- if (capitalize_paths)
+ if (capitalize_paths) {
cat = cat.capitalize();
+ }
- if (!filter.is_subsequence_ofi(cat) && !filter.is_subsequence_ofi(name) && property_prefix.to_lower().find(filter.to_lower()) == -1)
+ if (!filter.is_subsequence_ofi(cat) && !filter.is_subsequence_ofi(name) && property_prefix.to_lower().find(filter.to_lower()) == -1) {
continue;
+ }
}
if (category_vbox == nullptr) {
@@ -1722,21 +1680,22 @@ void EditorInspector::update_tree() {
VBoxContainer *current_vbox = main_vbox;
{
-
String acc_path = "";
int level = 1;
for (int i = 0; i < path.get_slice_count("/"); i++) {
String path_name = path.get_slice("/", i);
- if (i > 0)
+ if (i > 0) {
acc_path += "/";
+ }
acc_path += path_name;
if (!item_path.has(acc_path)) {
EditorInspectorSection *section = memnew(EditorInspectorSection);
current_vbox->add_child(section);
sections.push_back(section);
- if (capitalize_paths)
+ if (capitalize_paths) {
path_name = path_name.capitalize();
+ }
Color c = sscolor;
c.a /= level;
@@ -1773,7 +1732,6 @@ void EditorInspector::update_tree() {
String doc_hint;
if (use_doc_hints) {
-
StringName classname = object->get_class_name();
if (object_class != String()) {
classname = object_class;
@@ -1797,7 +1755,7 @@ void EditorInspector::update_tree() {
while (F && descr == String()) {
for (int i = 0; i < F->get().properties.size(); i++) {
if (F->get().properties[i].name == propname.operator String()) {
- descr = DTR(F->get().properties[i].description.strip_edges());
+ descr = DTR(F->get().properties[i].description);
break;
}
}
@@ -1807,7 +1765,7 @@ void EditorInspector::update_tree() {
// Likely a theme property.
for (int i = 0; i < F->get().theme_properties.size(); i++) {
if (F->get().theme_properties[i].name == slices[1]) {
- descr = DTR(F->get().theme_properties[i].description.strip_edges());
+ descr = DTR(F->get().theme_properties[i].description);
break;
}
}
@@ -1833,7 +1791,6 @@ void EditorInspector::update_tree() {
ped->added_editors.clear();
for (List<EditorInspectorPlugin::AddedEditor>::Element *F = editors.front(); F; F = F->next()) {
-
EditorProperty *ep = Object::cast_to<EditorProperty>(F->get().property_editor);
if (ep) {
@@ -1841,7 +1798,6 @@ void EditorInspector::update_tree() {
ep->object = object;
if (F->get().properties.size()) {
-
if (F->get().properties.size() == 1) {
//since it's one, associate:
ep->property = F->get().properties[0];
@@ -1877,7 +1833,6 @@ void EditorInspector::update_tree() {
current_vbox->add_child(F->get().property_editor);
if (ep) {
-
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
if (p.usage & PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED) {
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed_update_all), varray(), CONNECT_DEFERRED);
@@ -1918,9 +1873,11 @@ void EditorInspector::update_tree() {
//see if this property exists and should be kept
}
+
void EditorInspector::update_property(const String &p_prop) {
- if (!editor_property_map.has(p_prop))
+ if (!editor_property_map.has(p_prop)) {
return;
+ }
for (List<EditorProperty *>::Element *E = editor_property_map[p_prop].front(); E; E = E->next()) {
E->get()->update_property();
@@ -1929,7 +1886,6 @@ void EditorInspector::update_property(const String &p_prop) {
}
void EditorInspector::_clear() {
-
while (main_vbox->get_child_count()) {
memdelete(main_vbox->get_child(0));
}
@@ -1942,9 +1898,9 @@ void EditorInspector::_clear() {
}
void EditorInspector::refresh() {
-
- if (refresh_countdown > 0 || changing)
+ if (refresh_countdown > 0 || changing) {
return;
+ }
refresh_countdown = EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval");
}
@@ -1953,10 +1909,10 @@ Object *EditorInspector::get_edited_object() {
}
void EditorInspector::edit(Object *p_object) {
- if (object == p_object)
+ if (object == p_object) {
return;
+ }
if (object) {
-
_clear();
object->remove_change_receptor(this);
}
@@ -1974,20 +1930,22 @@ void EditorInspector::edit(Object *p_object) {
}
void EditorInspector::set_keying(bool p_active) {
- if (keying == p_active)
+ if (keying == p_active) {
return;
+ }
keying = p_active;
update_tree();
}
+
void EditorInspector::set_read_only(bool p_read_only) {
read_only = p_read_only;
update_tree();
}
bool EditorInspector::is_capitalize_paths_enabled() const {
-
return capitalize_paths;
}
+
void EditorInspector::set_enable_capitalize_paths(bool p_capitalize) {
capitalize_paths = p_capitalize;
update_tree();
@@ -2006,22 +1964,25 @@ void EditorInspector::set_use_doc_hints(bool p_enable) {
use_doc_hints = p_enable;
update_tree();
}
+
void EditorInspector::set_hide_script(bool p_hide) {
hide_script = p_hide;
update_tree();
}
+
void EditorInspector::set_use_filter(bool p_use) {
use_filter = p_use;
update_tree();
}
+
void EditorInspector::register_text_enter(Node *p_line_edit) {
search_box = Object::cast_to<LineEdit>(p_line_edit);
- if (search_box)
+ if (search_box) {
search_box->connect("text_changed", callable_mp(this, &EditorInspector::_filter_changed));
+ }
}
void EditorInspector::_filter_changed(const String &p_text) {
-
_clear();
update_tree();
}
@@ -2036,7 +1997,6 @@ bool EditorInspector::is_using_folding() {
}
void EditorInspector::collapse_all_folding() {
-
for (List<EditorInspectorSection *>::Element *E = sections.front(); E; E = E->next()) {
E->get()->fold();
}
@@ -2072,10 +2032,10 @@ void EditorInspector::set_use_wide_editors(bool p_enable) {
}
void EditorInspector::set_sub_inspector(bool p_enable) {
-
sub_inspector = p_enable;
- if (!is_inside_tree())
+ if (!is_inside_tree()) {
return;
+ }
if (sub_inspector) {
add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg", "Editor"));
@@ -2089,22 +2049,22 @@ void EditorInspector::set_use_deletable_properties(bool p_enabled) {
}
void EditorInspector::_edit_request_change(Object *p_object, const String &p_property) {
-
- if (object != p_object) //may be undoing/redoing for a non edited object, so ignore
+ if (object != p_object) { //may be undoing/redoing for a non edited object, so ignore
return;
+ }
- if (changing)
+ if (changing) {
return;
+ }
- if (p_property == String())
+ if (p_property == String()) {
update_tree_pending = true;
- else {
+ } else {
pending.insert(p_property);
}
}
void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field) {
-
if (autoclear && editor_property_map.has(p_name)) {
for (List<EditorProperty *>::Element *E = editor_property_map[p_name].front(); E; E = E->next()) {
if (E->get()->is_checkable()) {
@@ -2114,22 +2074,20 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
}
if (!undo_redo || bool(object->call("_dont_undo_redo"))) {
-
object->set(p_name, p_value);
- if (p_refresh_all)
+ if (p_refresh_all) {
_edit_request_change(object, "");
- else
+ } else {
_edit_request_change(object, p_name);
+ }
emit_signal(_prop_edited, p_name);
} else if (Object::cast_to<MultiNodeEdit>(object)) {
-
Object::cast_to<MultiNodeEdit>(object)->set_property_field(p_name, p_value, p_changed_field);
_edit_request_change(object, p_name);
emit_signal(_prop_edited, p_name);
} else {
-
undo_redo->create_action(TTR("Set") + " " + p_name, UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(object, p_name, p_value);
undo_redo->add_undo_property(object, p_name, object->get(p_name));
@@ -2138,14 +2096,12 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
undo_redo->add_do_method(this, "_edit_request_change", object, "");
undo_redo->add_undo_method(this, "_edit_request_change", object, "");
} else {
-
undo_redo->add_do_method(this, "_edit_request_change", object, p_name);
undo_redo->add_undo_method(this, "_edit_request_change", object, p_name);
}
Resource *r = Object::cast_to<Resource>(object);
if (r) {
-
if (String(p_name) == "resource_local_to_scene") {
bool prev = object->get(p_name);
bool next = p_value;
@@ -2170,16 +2126,17 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
}
void EditorInspector::_property_changed(const String &p_path, const Variant &p_value, const String &p_name, bool p_changing) {
-
// The "changing" variable must be true for properties that trigger events as typing occurs,
// like "text_changed" signal. E.g. text property of Label, Button, RichTextLabel, etc.
- if (p_changing)
+ if (p_changing) {
this->changing++;
+ }
_edit_set(p_path, p_value, false, p_name);
- if (p_changing)
+ if (p_changing) {
this->changing--;
+ }
if (restart_request_props.has(p_path)) {
emit_signal("restart_requested");
@@ -2191,13 +2148,13 @@ void EditorInspector::_property_changed_update_all(const String &p_path, const V
}
void EditorInspector::_multiple_properties_changed(Vector<String> p_paths, Array p_values) {
-
ERR_FAIL_COND(p_paths.size() == 0 || p_values.size() == 0);
ERR_FAIL_COND(p_paths.size() != p_values.size());
String names;
for (int i = 0; i < p_paths.size(); i++) {
- if (i > 0)
+ if (i > 0) {
names += ",";
+ }
names += p_paths[i];
}
undo_redo->create_action(TTR("Set Multiple:") + " " + names, UndoRedo::MERGE_ENDS);
@@ -2213,42 +2170,40 @@ void EditorInspector::_multiple_properties_changed(Vector<String> p_paths, Array
}
void EditorInspector::_property_keyed(const String &p_path, bool p_advance) {
-
- if (!object)
+ if (!object) {
return;
+ }
emit_signal("property_keyed", p_path, object->get(p_path), p_advance); //second param is deprecated
}
void EditorInspector::_property_deleted(const String &p_path) {
-
print_line("deleted pressed?");
- if (!object)
+ if (!object) {
return;
+ }
emit_signal("property_deleted", p_path); //second param is deprecated
}
void EditorInspector::_property_keyed_with_value(const String &p_path, const Variant &p_value, bool p_advance) {
-
- if (!object)
+ if (!object) {
return;
+ }
emit_signal("property_keyed", p_path, p_value, p_advance); //second param is deprecated
}
void EditorInspector::_property_checked(const String &p_path, bool p_checked) {
-
- if (!object)
+ if (!object) {
return;
+ }
//property checked
if (autoclear) {
-
if (!p_checked) {
object->set(p_path, Variant());
} else {
-
Variant to_create;
List<PropertyInfo> pinfo;
object->get_property_list(&pinfo);
@@ -2275,16 +2230,17 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) {
}
void EditorInspector::_property_selected(const String &p_path, int p_focusable) {
-
property_selected = p_path;
property_focusable = p_focusable;
//deselect the others
for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) {
- if (F->key() == property_selected)
+ if (F->key() == property_selected) {
continue;
+ }
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
- if (E->get()->is_selected())
+ if (E->get()->is_selected()) {
E->get()->deselect();
+ }
}
}
@@ -2292,7 +2248,6 @@ void EditorInspector::_property_selected(const String &p_path, int p_focusable)
}
void EditorInspector::_object_id_selected(const String &p_path, ObjectID p_id) {
-
emit_signal("object_id_selected", p_id);
}
@@ -2301,20 +2256,17 @@ void EditorInspector::_resource_selected(const String &p_path, RES p_resource) {
}
void EditorInspector::_node_removed(Node *p_node) {
-
if (p_node == object) {
edit(nullptr);
}
}
void EditorInspector::_notification(int p_what) {
-
if (p_what == NOTIFICATION_READY) {
EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &EditorInspector::_feature_profile_changed));
}
if (p_what == NOTIFICATION_ENTER_TREE) {
-
if (sub_inspector) {
add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg", "Editor"));
} else {
@@ -2326,7 +2278,6 @@ void EditorInspector::_notification(int p_what) {
edit(nullptr); //just in case
}
if (p_what == NOTIFICATION_EXIT_TREE) {
-
if (!sub_inspector) {
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
}
@@ -2334,7 +2285,6 @@ void EditorInspector::_notification(int p_what) {
}
if (p_what == NOTIFICATION_PROCESS) {
-
if (update_scroll_request >= 0) {
get_v_scrollbar()->call_deferred("set_value", update_scroll_request);
update_scroll_request = -1;
@@ -2354,13 +2304,11 @@ void EditorInspector::_notification(int p_what) {
changing++;
if (update_tree_pending) {
-
update_tree();
update_tree_pending = false;
pending.clear();
} else {
-
while (pending.size()) {
StringName prop = pending.front()->get();
if (editor_property_map.has(prop)) {
@@ -2377,7 +2325,6 @@ void EditorInspector::_notification(int p_what) {
}
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
-
if (sub_inspector) {
add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg", "Editor"));
} else if (is_inside_tree()) {
@@ -2394,9 +2341,9 @@ void EditorInspector::_changed_callback(Object *p_changed, const char *p_prop) {
}
void EditorInspector::_vscroll_changed(double p_offset) {
-
- if (update_scroll_request >= 0) //waiting, do nothing
+ if (update_scroll_request >= 0) { //waiting, do nothing
return;
+ }
if (object) {
scroll_cache[object->get_instance_id()] = p_offset;
@@ -2420,12 +2367,10 @@ String EditorInspector::get_object_class() const {
}
void EditorInspector::_feature_profile_changed() {
-
update_tree();
}
void EditorInspector::_bind_methods() {
-
ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change);
ClassDB::bind_method("refresh", &EditorInspector::refresh);
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index c8c1ecc49a..90d995e36d 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -47,7 +47,6 @@ public:
};
class EditorProperty : public Container {
-
GDCLASS(EditorProperty, Container);
private:
diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp
index dbd043c494..14478b1386 100644
--- a/editor/editor_layouts_dialog.cpp
+++ b/editor/editor_layouts_dialog.cpp
@@ -41,21 +41,20 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
-
- if (!k->is_pressed())
+ if (!k->is_pressed()) {
return;
+ }
switch (k->get_keycode()) {
case KEY_KP_ENTER:
case KEY_ENTER: {
-
- if (get_hide_on_ok())
+ if (get_hide_on_ok()) {
hide();
+ }
ok_pressed();
set_input_as_handled();
} break;
case KEY_ESCAPE: {
-
hide();
set_input_as_handled();
} break;
@@ -64,27 +63,21 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
}
void EditorLayoutsDialog::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("name_confirmed", PropertyInfo(Variant::STRING, "name")));
}
void EditorLayoutsDialog::ok_pressed() {
-
if (layout_names->is_anything_selected()) {
-
Vector<int> const selected_items = layout_names->get_selected_items();
for (int i = 0; i < selected_items.size(); ++i) {
-
emit_signal("name_confirmed", layout_names->get_item_text(selected_items[i]));
}
} else if (name->is_visible() && name->get_text() != "") {
-
emit_signal("name_confirmed", name->get_text());
}
}
void EditorLayoutsDialog::_post_popup() {
-
ConfirmationDialog::_post_popup();
name->clear();
layout_names->clear();
@@ -93,7 +86,6 @@ void EditorLayoutsDialog::_post_popup() {
config.instance();
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
if (err != OK) {
-
return;
}
@@ -101,13 +93,11 @@ void EditorLayoutsDialog::_post_popup() {
config.ptr()->get_sections(&layouts);
for (List<String>::Element *E = layouts.front(); E; E = E->next()) {
-
layout_names->add_item(**E);
}
}
EditorLayoutsDialog::EditorLayoutsDialog() {
-
makevb = memnew(VBoxContainer);
add_child(makevb);
makevb->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, 5);
@@ -133,6 +123,5 @@ EditorLayoutsDialog::EditorLayoutsDialog() {
}
void EditorLayoutsDialog::set_name_line_enabled(bool p_enabled) {
-
name->set_visible(p_enabled);
}
diff --git a/editor/editor_layouts_dialog.h b/editor/editor_layouts_dialog.h
index d18c2bce17..39f0f4163d 100644
--- a/editor/editor_layouts_dialog.h
+++ b/editor/editor_layouts_dialog.h
@@ -37,7 +37,6 @@ class LineEdit;
class ItemList;
class EditorLayoutsDialog : public ConfirmationDialog {
-
GDCLASS(EditorLayoutsDialog, ConfirmationDialog);
LineEdit *name;
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 78aed96363..ea5f73acd1 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -38,10 +38,10 @@
#include "scene/resources/dynamic_font.h"
void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) {
-
EditorLog *self = (EditorLog *)p_self;
- if (self->current != Thread::get_caller_id())
+ if (self->current != Thread::get_caller_id()) {
return;
+ }
String err_str;
if (p_errorexp && p_errorexp[0]) {
@@ -58,9 +58,7 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f
}
void EditorLog::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
//button->set_icon(get_icon("Console","EditorIcons"));
log->add_theme_font_override("normal_font", get_theme_font("output_source", "EditorFonts"));
log->add_theme_color_override("selection_color", get_theme_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
@@ -76,13 +74,11 @@ void EditorLog::_notification(int p_what) {
}
void EditorLog::_clear_request() {
-
log->clear();
tool_button->set_icon(Ref<Texture2D>());
}
void EditorLog::_copy_request() {
-
log->selection_copy();
}
@@ -95,7 +91,6 @@ void EditorLog::copy() {
}
void EditorLog::add_message(const String &p_msg, MessageType p_type) {
-
log->add_newline();
bool restore = p_type != MSG_TYPE_STD;
@@ -124,8 +119,9 @@ void EditorLog::add_message(const String &p_msg, MessageType p_type) {
log->add_text(p_msg);
- if (restore)
+ if (restore) {
log->pop();
+ }
}
void EditorLog::set_tool_button(ToolButton *p_tool_button) {
@@ -133,19 +129,16 @@ void EditorLog::set_tool_button(ToolButton *p_tool_button) {
}
void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) {
-
EditorLog *self = (EditorLog *)p_self;
self->add_message(p_name, EditorLog::MSG_TYPE_EDITOR);
}
void EditorLog::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("clear_request"));
ADD_SIGNAL(MethodInfo("copy_request"));
}
EditorLog::EditorLog() {
-
VBoxContainer *vb = this;
HBoxContainer *hb = memnew(HBoxContainer);
@@ -189,7 +182,6 @@ EditorLog::EditorLog() {
}
void EditorLog::deinit() {
-
remove_error_handler(&eh);
}
diff --git a/editor/editor_log.h b/editor/editor_log.h
index e3980690b2..1c9a2d4062 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -44,7 +44,6 @@
#include "scene/gui/tool_button.h"
class EditorLog : public VBoxContainer {
-
GDCLASS(EditorLog, VBoxContainer);
Button *clearbutton;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 42eef2d130..9a9a1bfdeb 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -42,7 +42,6 @@
#include "core/os/file_access.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
-#include "core/path_remap.h"
#include "core/print_string.h"
#include "core/project_settings.h"
#include "core/translation.h"
@@ -181,7 +180,6 @@
EditorNode *EditorNode::singleton = nullptr;
void EditorNode::_update_scene_tabs() {
-
bool show_rb = EditorSettings::get_singleton()->get("interface/scene_tabs/show_script_button");
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU)) {
@@ -191,7 +189,6 @@ void EditorNode::_update_scene_tabs() {
scene_tabs->clear_tabs();
Ref<Texture2D> script_icon = gui_base->get_theme_icon("Script", "EditorIcons");
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
-
Node *type_node = editor_data.get_edited_scene_root(i);
Ref<Texture2D> icon;
if (type_node) {
@@ -233,44 +230,41 @@ void EditorNode::_update_scene_tabs() {
scene_tabs->add_child(scene_tab_add);
}
Rect2 last_tab = Rect2();
- if (scene_tabs->get_tab_count() != 0)
+ if (scene_tabs->get_tab_count() != 0) {
last_tab = scene_tabs->get_tab_rect(scene_tabs->get_tab_count() - 1);
+ }
scene_tab_add->set_position(Point2(last_tab.get_position().x + last_tab.get_size().x + 3, last_tab.get_position().y));
}
}
void EditorNode::_version_control_menu_option(int p_idx) {
-
switch (vcs_actions_menu->get_item_id(p_idx)) {
case RUN_VCS_SETTINGS: {
-
VersionControlEditorPlugin::get_singleton()->popup_vcs_set_up_dialog(gui_base);
} break;
case RUN_VCS_SHUT_DOWN: {
-
VersionControlEditorPlugin::get_singleton()->shut_down();
} break;
}
}
void EditorNode::_update_title() {
-
String appname = ProjectSettings::get_singleton()->get("application/config/name");
String title = appname.empty() ? String(VERSION_FULL_NAME) : String(VERSION_NAME + String(" - ") + appname);
String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_filename() : String();
- if (!edited.empty())
+ if (!edited.empty()) {
title += " - " + String(edited.get_file());
- if (unsaved_cache)
+ }
+ if (unsaved_cache) {
title += " (*)";
+ }
DisplayServer::get_singleton()->window_set_title(title);
}
void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed() && !k->is_echo()) {
-
EditorPlugin *old_editor = editor_plugin_screen;
if (ED_IS_SHORTCUT("editor/next_tab", p_event)) {
@@ -310,14 +304,13 @@ void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
}
void EditorNode::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_PROCESS: {
- if (opening_prev && !confirmation->is_visible())
+ if (opening_prev && !confirmation->is_visible()) {
opening_prev = false;
+ }
if (unsaved_cache != (saved_version != editor_data.get_undo_redo().get_version())) {
-
unsaved_cache = (saved_version != editor_data.get_undo_redo().get_version());
_update_title();
}
@@ -332,10 +325,10 @@ void EditorNode::_notification(int p_what) {
uint32_t tick = OS::get_singleton()->get_ticks_msec();
if (frame != update_spinner_step_frame && (tick - update_spinner_step_msec) > (1000 / 8)) {
-
update_spinner_step++;
- if (update_spinner_step >= 8)
+ if (update_spinner_step >= 8) {
update_spinner_step = 0;
+ }
update_spinner_step_msec = tick;
update_spinner_step_frame = frame + 1;
@@ -409,7 +402,6 @@ void EditorNode::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
-
{
_initializing_addons = true;
Vector<String> addons;
@@ -439,7 +431,6 @@ void EditorNode::_notification(int p_what) {
} break;
case NOTIFICATION_WM_FOCUS_IN: {
-
// Restore the original FPS cap after focusing back on the editor
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/low_processor_mode_sleep_usec")));
@@ -447,18 +438,15 @@ void EditorNode::_notification(int p_what) {
} break;
case NOTIFICATION_WM_FOCUS_OUT: {
-
// Set a low FPS cap to decrease CPU/GPU usage while the editor is unfocused
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/unfocused_low_processor_mode_sleep_usec")));
} break;
case NOTIFICATION_WM_ABOUT: {
-
show_about();
} break;
case NOTIFICATION_WM_CLOSE_REQUEST: {
-
_menu_option_confirm(FILE_QUIT, false);
} break;
@@ -491,12 +479,12 @@ void EditorNode::_notification(int p_what) {
recent_scenes->set_as_minsize();
// debugger area
- if (EditorDebuggerNode::get_singleton()->is_visible())
+ if (EditorDebuggerNode::get_singleton()->is_visible()) {
bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles"));
+ }
// update_icons
for (int i = 0; i < singleton->main_editor_buttons.size(); i++) {
-
ToolButton *tb = singleton->main_editor_buttons[i];
EditorPlugin *p_editor = singleton->editor_table[i];
Ref<Texture2D> icon = p_editor->get_icon();
@@ -558,8 +546,9 @@ void EditorNode::_update_update_spinner() {
void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_name) {
Ref<Script> script = Object::cast_to<Script>(p_script);
- if (script.is_null())
+ if (script.is_null()) {
return;
+ }
if (p_activate_name.length()) {
set_addon_plugin_enabled(p_activate_name, true);
}
@@ -569,23 +558,24 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam
}
void EditorNode::_resources_changed(const Vector<String> &p_resources) {
-
List<Ref<Resource>> changed;
int rc = p_resources.size();
for (int i = 0; i < rc; i++) {
-
Ref<Resource> res(ResourceCache::get(p_resources.get(i)));
if (res.is_null()) {
continue;
}
- if (!res->editor_can_reload_from_file())
+ if (!res->editor_can_reload_from_file()) {
continue;
- if (!res->get_path().is_resource_file() && !res->get_path().is_abs_path())
+ }
+ if (!res->get_path().is_resource_file() && !res->get_path().is_abs_path()) {
continue;
- if (!FileAccess::exists(res->get_path()))
+ }
+ if (!FileAccess::exists(res->get_path())) {
continue;
+ }
if (res->get_import_path() != String()) {
//this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback
@@ -603,14 +593,11 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) {
}
void EditorNode::_fs_changed() {
-
for (Set<FileDialog *>::Element *E = file_dialogs.front(); E; E = E->next()) {
-
E->get()->invalidate();
}
for (Set<EditorFileDialog *>::Element *E = editor_file_dialogs.front(); E; E = E->next()) {
-
E->get()->invalidate();
}
@@ -632,7 +619,9 @@ void EditorNode::_fs_changed() {
preset.unref();
}
if (preset.is_null()) {
- export_error = vformat("Invalid export preset name: %s.", preset_name);
+ export_error = vformat(
+ "Invalid export preset name: %s. Make sure `export_presets.cfg` is present in the current directory.",
+ preset_name);
} else {
Ref<EditorExportPlatform> platform = preset->get_platform();
if (platform.is_null()) {
@@ -680,7 +669,6 @@ void EditorNode::_fs_changed() {
}
void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
-
List<String> scenes; //will load later
int current_tab = scene_tabs->get_current_tab();
@@ -710,7 +698,6 @@ void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
}
void EditorNode::_sources_changed(bool p_exist) {
-
if (waiting_for_first_scan) {
waiting_for_first_scan = false;
@@ -736,13 +723,12 @@ void EditorNode::_vp_resized() {
}
void EditorNode::_node_renamed() {
-
- if (get_inspector())
+ if (get_inspector()) {
get_inspector()->update_tree();
+ }
}
void EditorNode::_editor_select_next() {
-
int editor = _get_current_main_editor();
do {
@@ -757,7 +743,6 @@ void EditorNode::_editor_select_next() {
}
void EditorNode::_editor_select_prev() {
-
int editor = _get_current_main_editor();
do {
@@ -772,7 +757,6 @@ void EditorNode::_editor_select_prev() {
}
Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_deps) {
-
dependency_errors.clear();
Error err;
@@ -780,11 +764,9 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d
ERR_FAIL_COND_V(!res.is_valid(), ERR_CANT_OPEN);
if (!p_ignore_broken_deps && dependency_errors.has(p_resource)) {
-
//current_option = -1;
Vector<String> errors;
for (Set<String>::Element *E = dependency_errors[p_resource].front(); E; E = E->next()) {
-
errors.push_back(E->get());
}
dependency_error->show(DependencyErrorDialog::MODE_RESOURCE, p_resource, errors);
@@ -798,16 +780,15 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d
}
void EditorNode::edit_node(Node *p_node) {
-
push_item(p_node);
}
void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const String &p_path) {
-
editor_data.apply_changes_in_editors();
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
+ }
String path = ProjectSettings::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
@@ -827,7 +808,6 @@ void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const St
}
void EditorNode::save_resource(const Ref<Resource> &p_resource) {
-
if (p_resource->get_path().is_resource_file()) {
save_resource_in_path(p_resource, p_resource->get_path());
} else {
@@ -836,7 +816,6 @@ void EditorNode::save_resource(const Ref<Resource> &p_resource) {
}
void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String &p_at_path) {
-
{
String path = p_resource->get_path();
int srpos = path.find("::");
@@ -860,7 +839,6 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
List<String> preferred;
for (int i = 0; i < extensions.size(); i++) {
-
if (p_resource->is_class("Script") && (extensions[i] == "tres" || extensions[i] == "res" || extensions[i] == "xml")) {
//this serves no purpose and confused people
continue;
@@ -870,7 +848,6 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
}
if (p_at_path != String()) {
-
file->set_current_dir(p_at_path);
if (p_resource->get_path().is_resource_file()) {
file->set_current_file(p_resource->get_path().get_file());
@@ -882,7 +859,6 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
}
}
} else if (p_resource->get_path() != "") {
-
file->set_current_path(p_resource->get_path());
if (extensions.size()) {
String ext = p_resource->get_path().get_extension().to_lower();
@@ -891,7 +867,6 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
}
}
} else if (preferred.size()) {
-
String existing;
if (extensions.size()) {
existing = "new_" + p_resource->get_class().to_lower() + "." + preferred.front()->get().to_lower();
@@ -903,31 +878,23 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
}
void EditorNode::_menu_option(int p_option) {
-
_menu_option_confirm(p_option, false);
}
void EditorNode::_menu_confirm_current() {
-
_menu_option_confirm(current_option, true);
}
void EditorNode::_dialog_display_save_error(String p_file, Error p_error) {
-
if (p_error) {
-
switch (p_error) {
-
case ERR_FILE_CANT_WRITE: {
-
show_accept(TTR("Can't open file for writing:") + " " + p_file.get_extension(), TTR("OK"));
} break;
case ERR_FILE_UNRECOGNIZED: {
-
show_accept(TTR("Requested file format unknown:") + " " + p_file.get_extension(), TTR("OK"));
} break;
default: {
-
show_accept(TTR("Error while saving."), TTR("OK"));
} break;
}
@@ -935,41 +902,33 @@ void EditorNode::_dialog_display_save_error(String p_file, Error p_error) {
}
void EditorNode::_dialog_display_load_error(String p_file, Error p_error) {
-
if (p_error) {
-
switch (p_error) {
-
case ERR_CANT_OPEN: {
-
- show_accept(vformat(TTR("Can't open '%s'. The file could have been moved or deleted."), p_file.get_file()), TTR("OK"));
+ show_accept(vformat(TTR("Can't open file '%s'. The file could have been moved or deleted."), p_file.get_file()), TTR("OK"));
} break;
case ERR_PARSE_ERROR: {
-
- show_accept(vformat(TTR("Error while parsing '%s'."), p_file.get_file()), TTR("OK"));
+ show_accept(vformat(TTR("Error while parsing file '%s'."), p_file.get_file()), TTR("OK"));
} break;
case ERR_FILE_CORRUPT: {
-
- show_accept(vformat(TTR("Unexpected end of file '%s'."), p_file.get_file()), TTR("OK"));
+ show_accept(vformat(TTR("Scene file '%s' appears to be invalid/corrupt."), p_file.get_file()), TTR("OK"));
} break;
case ERR_FILE_NOT_FOUND: {
-
- show_accept(vformat(TTR("Missing '%s' or its dependencies."), p_file.get_file()), TTR("OK"));
+ show_accept(vformat(TTR("Missing file '%s' or one its dependencies."), p_file.get_file()), TTR("OK"));
} break;
default: {
-
- show_accept(vformat(TTR("Error while loading '%s'."), p_file.get_file()), TTR("OK"));
+ show_accept(vformat(TTR("Error while loading file '%s'."), p_file.get_file()), TTR("OK"));
} break;
}
}
}
void EditorNode::_get_scene_metadata(const String &p_file) {
-
Node *scene = editor_data.get_edited_scene_root();
- if (!scene)
+ if (!scene) {
return;
+ }
String path = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg");
@@ -977,15 +936,15 @@ void EditorNode::_get_scene_metadata(const String &p_file) {
cf.instance();
Error err = cf->load(path);
- if (err != OK || !cf->has_section("editor_states"))
+ if (err != OK || !cf->has_section("editor_states")) {
return; //must not exist
+ }
List<String> esl;
cf->get_section_keys("editor_states", &esl);
Dictionary md;
for (List<String>::Element *E = esl.front(); E; E = E->next()) {
-
Variant st = cf->get_value("editor_states", E->get());
if (st.get_type() != Variant::NIL) {
md[E->get()] = st;
@@ -996,11 +955,11 @@ void EditorNode::_get_scene_metadata(const String &p_file) {
}
void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) {
-
Node *scene = editor_data.get_edited_scene_root(p_idx);
- if (!scene)
+ if (!scene) {
return;
+ }
scene->set_meta("__editor_run_settings__", Variant()); //clear it (no point in keeping it)
scene->set_meta("__editor_plugin_states__", Variant());
@@ -1022,7 +981,6 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) {
md.get_key_list(&keys);
for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
-
cf->set_value("editor_states", E->get(), md[E->get()]);
}
@@ -1031,12 +989,11 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) {
}
bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, int32_t flags) {
-
- if (p_res.is_null())
+ if (p_res.is_null()) {
return false;
+ }
if (processed.has(p_res)) {
-
return processed[p_res];
}
@@ -1053,55 +1010,51 @@ bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, i
processed[p_res] = false; //because it's a file
return false;
} else {
-
processed[p_res] = changed;
return changed;
}
}
bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool> &processed, int32_t flags) {
-
bool ret_changed = false;
List<PropertyInfo> pi;
obj->get_property_list(&pi);
for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) {
-
- if (!(E->get().usage & PROPERTY_USAGE_STORAGE))
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
continue;
+ }
switch (E->get().type) {
case Variant::OBJECT: {
-
RES res = obj->get(E->get().name);
- if (_find_and_save_resource(res, processed, flags))
+ if (_find_and_save_resource(res, processed, flags)) {
ret_changed = true;
+ }
} break;
case Variant::ARRAY: {
-
Array varray = obj->get(E->get().name);
int len = varray.size();
for (int i = 0; i < len; i++) {
-
const Variant &v = varray.get(i);
RES res = v;
- if (_find_and_save_resource(res, processed, flags))
+ if (_find_and_save_resource(res, processed, flags)) {
ret_changed = true;
+ }
}
} break;
case Variant::DICTIONARY: {
-
Dictionary d = obj->get(E->get().name);
List<Variant> keys;
d.get_key_list(&keys);
for (List<Variant>::Element *F = keys.front(); F; F = F->next()) {
-
Variant v = d[F->get()];
RES res = v;
- if (_find_and_save_resource(res, processed, flags))
+ if (_find_and_save_resource(res, processed, flags)) {
ret_changed = true;
+ }
}
} break;
default: {
@@ -1113,34 +1066,34 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool>
}
void EditorNode::_save_edited_subresources(Node *scene, Map<RES, bool> &processed, int32_t flags) {
-
_find_and_save_edited_subresources(scene, processed, flags);
for (int i = 0; i < scene->get_child_count(); i++) {
-
Node *n = scene->get_child(i);
- if (n->get_owner() != editor_data.get_edited_scene_root())
+ if (n->get_owner() != editor_data.get_edited_scene_root()) {
continue;
+ }
_save_edited_subresources(n, processed, flags);
}
}
void EditorNode::_find_node_types(Node *p_node, int &count_2d, int &count_3d) {
-
- if (p_node->is_class("Viewport") || (p_node != editor_data.get_edited_scene_root() && p_node->get_owner() != editor_data.get_edited_scene_root()))
+ if (p_node->is_class("Viewport") || (p_node != editor_data.get_edited_scene_root() && p_node->get_owner() != editor_data.get_edited_scene_root())) {
return;
+ }
- if (p_node->is_class("CanvasItem"))
+ if (p_node->is_class("CanvasItem")) {
count_2d++;
- else if (p_node->is_class("Node3D"))
+ } else if (p_node->is_class("Node3D")) {
count_3d++;
+ }
- for (int i = 0; i < p_node->get_child_count(); i++)
+ for (int i = 0; i < p_node->get_child_count(); i++) {
_find_node_types(p_node->get_child(i), count_2d, count_3d);
+ }
}
void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
-
EditorProgress save("save", TTR("Saving Scene"), 4);
if (editor_data.get_edited_scene_root() != nullptr) {
@@ -1168,7 +1121,6 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
}
if (img.is_valid()) {
-
img = img->duplicate();
save.step(TTR("Creating Thumbnail"), 2);
@@ -1220,7 +1172,6 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
}
bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_node) {
-
for (int i = 0; i < p_node->get_child_count(); i++) {
Node *child = p_node->get_child(i);
if (child->get_filename() == p_filename) {
@@ -1236,7 +1187,6 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod
}
static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource>> &edited_resources) {
-
if (p_resource->is_edited()) {
edited_resources.insert(p_resource);
return true;
@@ -1268,8 +1218,9 @@ int EditorNode::_save_external_resources() {
//save external resources and its subresources if any was modified
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
+ }
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
Set<Ref<Resource>> edited_subresources;
@@ -1277,10 +1228,10 @@ int EditorNode::_save_external_resources() {
List<Ref<Resource>> cached;
ResourceCache::get_cached_resources(&cached);
for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) {
-
Ref<Resource> res = E->get();
- if (!res->get_path().is_resource_file())
+ if (!res->get_path().is_resource_file()) {
continue;
+ }
//not only check if this resourec is edited, check contained subresources too
if (_find_edited_resources(res, edited_subresources)) {
ResourceSaver::save(res->get_path(), res, flg);
@@ -1300,11 +1251,9 @@ int EditorNode::_save_external_resources() {
}
void EditorNode::_save_scene(String p_file, int idx) {
-
Node *scene = editor_data.get_edited_scene_root(idx);
if (!scene) {
-
show_accept(TTR("This operation can't be done without a tree root."), TTR("OK"));
return;
}
@@ -1327,17 +1276,17 @@ void EditorNode::_save_scene(String p_file, int idx) {
// old version still work for referencing changes in instanced or inherited scenes
sdata = Ref<PackedScene>(Object::cast_to<PackedScene>(ResourceCache::get(p_file)));
- if (sdata.is_valid())
+ if (sdata.is_valid()) {
sdata->recreate_state();
- else
+ } else {
sdata.instance();
+ }
} else {
sdata.instance();
}
Error err = sdata->pack(scene);
if (err != OK) {
-
show_accept(TTR("Couldn't save scene. Likely dependencies (instances or inheritance) couldn't be satisfied."), TTR("OK"));
return;
}
@@ -1352,8 +1301,9 @@ void EditorNode::_save_scene(String p_file, int idx) {
memdelete(dummy_scene);
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
+ }
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
err = ResourceSaver::save(p_file, sdata, flg);
@@ -1363,29 +1313,27 @@ void EditorNode::_save_scene(String p_file, int idx) {
editor_data.save_editor_external_data();
if (err == OK) {
scene->set_filename(ProjectSettings::get_singleton()->localize_path(p_file));
- if (idx < 0 || idx == editor_data.get_edited_scene())
+ if (idx < 0 || idx == editor_data.get_edited_scene()) {
set_current_version(editor_data.get_undo_redo().get_version());
- else
+ } else {
editor_data.set_edited_scene_version(0, idx);
+ }
editor_folding.save_scene_folding(scene, p_file);
_update_title();
_update_scene_tabs();
} else {
-
_dialog_display_save_error(p_file, err);
}
}
void EditorNode::save_all_scenes() {
-
_menu_option_confirm(RUN_STOP, true);
_save_all_scenes();
}
void EditorNode::save_scene_list(Vector<String> p_scene_filenames) {
-
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
Node *scene = editor_data.get_edited_scene_root(i);
@@ -1396,7 +1344,6 @@ void EditorNode::save_scene_list(Vector<String> p_scene_filenames) {
}
void EditorNode::restart_editor() {
-
exiting = true;
String to_reopen;
@@ -1418,14 +1365,14 @@ void EditorNode::restart_editor() {
}
void EditorNode::_save_all_scenes() {
-
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
Node *scene = editor_data.get_edited_scene_root(i);
if (scene && scene->get_filename() != "") {
- if (i != editor_data.get_edited_scene())
+ if (i != editor_data.get_edited_scene()) {
_save_scene(scene->get_filename(), i);
- else
+ } else {
_save_scene_with_preview(scene->get_filename());
+ }
} // else: ignore new scenes
}
@@ -1433,20 +1380,19 @@ void EditorNode::_save_all_scenes() {
}
void EditorNode::_mark_unsaved_scenes() {
-
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
-
Node *node = editor_data.get_edited_scene_root(i);
- if (!node)
+ if (!node) {
continue;
+ }
String path = node->get_filename();
if (!(path == String() || FileAccess::exists(path))) {
-
- if (i == editor_data.get_edited_scene())
+ if (i == editor_data.get_edited_scene()) {
set_current_version(-1);
- else
+ } else {
editor_data.set_edited_scene_version(-1, i);
+ }
}
}
@@ -1455,23 +1401,20 @@ void EditorNode::_mark_unsaved_scenes() {
}
void EditorNode::_dialog_action(String p_file) {
-
switch (current_option) {
case FILE_NEW_INHERITED_SCENE: {
-
Node *scene = editor_data.get_edited_scene_root();
// If the previous scene is rootless, just close it in favor of the new one.
- if (!scene)
+ if (!scene) {
_menu_option_confirm(FILE_CLOSE, true);
+ }
load_scene(p_file, false, true);
} break;
case FILE_OPEN_SCENE: {
-
load_scene(p_file);
} break;
case SETTINGS_PICK_MAIN_SCENE: {
-
ProjectSettings::get_singleton()->set("application/run/main_scene", p_file);
ProjectSettings::get_singleton()->save();
//would be nice to show the project manager opened with the highlighted field..
@@ -1488,14 +1431,14 @@ void EditorNode::_dialog_action(String p_file) {
case SCENE_TAB_CLOSE:
case FILE_SAVE_SCENE:
case FILE_SAVE_AS_SCENE: {
-
int scene_idx = (current_option == FILE_SAVE_SCENE || current_option == FILE_SAVE_AS_SCENE) ? -1 : tab_closing;
if (file->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) {
bool same_open_scene = false;
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
- if (editor_data.get_scene_path(i) == p_file && i != scene_idx)
+ if (editor_data.get_scene_path(i) == p_file && i != scene_idx) {
same_open_scene = true;
+ }
}
if (same_open_scene) {
@@ -1508,15 +1451,15 @@ void EditorNode::_dialog_action(String p_file) {
_add_to_recent_scenes(p_file);
save_layout();
- if (scene_idx != -1)
+ if (scene_idx != -1) {
_discard_changes();
+ }
}
} break;
case FILE_SAVE_AND_RUN: {
if (file->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) {
-
_save_default_environment();
_save_scene_with_preview(p_file);
_run(false, p_file);
@@ -1524,7 +1467,6 @@ void EditorNode::_dialog_action(String p_file) {
} break;
case FILE_EXPORT_MESH_LIBRARY: {
-
Ref<MeshLibrary> ml;
if (file_export_lib_merge->is_pressed() && FileAccess::exists(p_file)) {
ml = ResourceLoader::load(p_file, "MeshLibrary");
@@ -1549,7 +1491,6 @@ void EditorNode::_dialog_action(String p_file) {
} break;
case FILE_EXPORT_TILESET: {
-
Ref<TileSet> tileset;
if (FileAccess::exists(p_file) && file_export_lib_merge->is_pressed()) {
tileset = ResourceLoader::load(p_file, "TileSet");
@@ -1567,7 +1508,6 @@ void EditorNode::_dialog_action(String p_file) {
Error err = ResourceSaver::save(p_file, tileset);
if (err) {
-
show_accept(TTR("Error saving TileSet!"), TTR("OK"));
return;
}
@@ -1575,7 +1515,6 @@ void EditorNode::_dialog_action(String p_file) {
case RESOURCE_SAVE:
case RESOURCE_SAVE_AS: {
-
ERR_FAIL_COND(saving_resource.is_null());
save_resource_in_path(saving_resource, p_file);
saving_resource = Ref<Resource>();
@@ -1585,9 +1524,9 @@ void EditorNode::_dialog_action(String p_file) {
current_obj->_change_notify();
} break;
case SETTINGS_LAYOUT_SAVE: {
-
- if (p_file.empty())
+ if (p_file.empty()) {
return;
+ }
Ref<ConfigFile> config;
config.instance();
@@ -1613,9 +1552,9 @@ void EditorNode::_dialog_action(String p_file) {
} break;
case SETTINGS_LAYOUT_DELETE: {
-
- if (p_file.empty())
+ if (p_file.empty()) {
return;
+ }
Ref<ConfigFile> config;
config.instance();
@@ -1654,7 +1593,6 @@ void EditorNode::_dialog_action(String p_file) {
}
bool EditorNode::item_has_editor(Object *p_object) {
-
if (_is_class_editor_disabled_by_feature_profile(p_object->get_class())) {
return false;
}
@@ -1667,7 +1605,6 @@ void EditorNode::edit_item_resource(RES p_resource) {
}
bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &p_class) {
-
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
if (profile.is_null()) {
return false;
@@ -1676,7 +1613,6 @@ bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &
StringName class_name = p_class;
while (class_name != StringName()) {
-
if (profile->is_class_disabled(class_name)) {
return true;
}
@@ -1690,7 +1626,6 @@ bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &
}
void EditorNode::edit_item(Object *p_object) {
-
Vector<EditorPlugin *> sub_plugins;
if (p_object) {
@@ -1701,7 +1636,6 @@ void EditorNode::edit_item(Object *p_object) {
}
if (!sub_plugins.empty()) {
-
bool same = true;
if (sub_plugins.size() == editor_plugins_over->get_plugins_list().size()) {
for (int i = 0; i < sub_plugins.size(); i++) {
@@ -1724,7 +1658,6 @@ void EditorNode::edit_item(Object *p_object) {
}
void EditorNode::push_item(Object *p_object, const String &p_property, bool p_inspector_only) {
-
if (!p_object) {
get_inspector()->edit(nullptr);
node_dock->set_node(nullptr);
@@ -1735,20 +1668,19 @@ void EditorNode::push_item(Object *p_object, const String &p_property, bool p_in
ObjectID id = p_object->get_instance_id();
if (id != editor_history.get_current()) {
-
if (p_inspector_only) {
editor_history.add_object_inspector_only(id);
- } else if (p_property == "")
+ } else if (p_property == "") {
editor_history.add_object(id);
- else
+ } else {
editor_history.add_object(id, p_property);
+ }
}
_edit_current();
}
void EditorNode::_save_default_environment() {
-
Ref<Environment> fallback = get_tree()->get_root()->get_world_3d()->get_fallback_environment();
if (fallback.is_valid() && fallback->get_path().is_resource_file()) {
@@ -1759,7 +1691,6 @@ void EditorNode::_save_default_environment() {
}
void EditorNode::hide_top_editors() {
-
_display_top_editors(false);
editor_plugins_over->clear();
@@ -1778,17 +1709,16 @@ void EditorNode::_set_editing_top_editors(Object *p_current_object) {
}
static bool overrides_external_editor(Object *p_object) {
-
Script *script = Object::cast_to<Script>(p_object);
- if (!script)
+ if (!script) {
return false;
+ }
return script->get_language()->overrides_external_editor();
}
void EditorNode::_edit_current() {
-
ObjectID current = editor_history.get_current();
Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr;
bool inspector_only = editor_history.is_current_inspector_only();
@@ -1796,7 +1726,6 @@ void EditorNode::_edit_current() {
this->current = current_obj;
if (!current_obj) {
-
scene_tree_dock->set_selected(nullptr);
get_inspector()->edit(nullptr);
node_dock->set_node(nullptr);
@@ -1817,7 +1746,6 @@ void EditorNode::_edit_current() {
String editable_warning; //none by default
if (is_resource) {
-
Resource *current_res = Object::cast_to<Resource>(current_obj);
ERR_FAIL_COND(!current_res);
get_inspector()->edit(current_res);
@@ -1842,7 +1770,6 @@ void EditorNode::_edit_current() {
}
}
} else if (is_node) {
-
Node *current_node = Object::cast_to<Node>(current_obj);
ERR_FAIL_COND(!current_node);
@@ -1865,7 +1792,6 @@ void EditorNode::_edit_current() {
}
} else {
-
Node *selected_node = nullptr;
if (current_obj->is_class("EditorDebuggerRemoteObject")) {
@@ -1918,7 +1844,6 @@ void EditorNode::_edit_current() {
/* Take care of PLUGIN EDITOR */
if (!inspector_only) {
-
EditorPlugin *main_plugin = editor_data.get_editor(current_obj);
for (int i = 0; i < editor_table.size(); i++) {
@@ -1928,20 +1853,20 @@ void EditorNode::_edit_current() {
}
if (main_plugin) {
-
// special case if use of external editor is true
if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) {
- if (!changing_scene)
+ if (!changing_scene) {
main_plugin->edit(current_obj);
+ }
}
else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {
// update screen main_plugin
if (!changing_scene) {
-
- if (editor_plugin_screen)
+ if (editor_plugin_screen) {
editor_plugin_screen->make_visible(false);
+ }
editor_plugin_screen = main_plugin;
editor_plugin_screen->edit(current_obj);
@@ -1953,13 +1878,11 @@ void EditorNode::_edit_current() {
}
for (int i = 0; i < editor_table.size(); i++) {
-
main_editor_buttons[i]->set_pressed(editor_table[i] == main_plugin);
}
}
} else {
-
editor_plugin_screen->edit(current_obj);
}
}
@@ -1977,7 +1900,6 @@ void EditorNode::_edit_current() {
_set_editing_top_editors(current_obj);
_display_top_editors(true);
} else if (!editor_plugins_over->get_plugins_list().empty()) {
-
hide_top_editors();
}
}
@@ -1987,7 +1909,6 @@ void EditorNode::_edit_current() {
}
void EditorNode::_run(bool p_current, const String &p_custom) {
-
if (editor_run.get_status() == EditorRun::STATUS_PLAY) {
play_button->set_pressed(!_playing_edited);
play_scene_button->set_pressed(_playing_edited);
@@ -2007,7 +1928,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
bool skip_breakpoints;
if (p_current || (editor_data.get_edited_scene_root() && p_custom == editor_data.get_edited_scene_root()->get_filename())) {
-
Node *scene = editor_data.get_edited_scene_root();
if (!scene) {
@@ -2027,7 +1947,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
}
if (run_filename == "") {
-
//evidently, run the scene
if (!ensure_main_scene(false)) {
return;
@@ -2035,15 +1954,12 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
}
if (bool(EDITOR_GET("run/auto_save/save_before_running"))) {
-
if (unsaved_cache) {
-
Node *scene = editor_data.get_edited_scene_root();
if (scene) { //only autosave if there is a scene obviously
if (scene->get_filename() == "") {
-
show_accept(TTR("Current scene was never saved, please save it prior to running."), TTR("OK"));
return;
}
@@ -2055,8 +1971,9 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
editor_data.save_editor_external_data();
}
- if (!call_build())
+ if (!call_build()) {
return;
+ }
if (bool(EDITOR_GET("run/output/always_clear_output_on_play"))) {
log->clear();
@@ -2075,7 +1992,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
EditorDebuggerNode::get_singleton()->start();
Error error = editor_run.run(run_filename, args, breakpoints, skip_breakpoints);
if (error != OK) {
-
EditorDebuggerNode::get_singleton()->stop();
show_accept(TTR("Could not start subprocess!"), TTR("OK"));
return;
@@ -2099,7 +2015,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
}
void EditorNode::_run_native(const Ref<EditorExportPreset> &p_preset) {
-
bool autosave = EDITOR_GET("run/auto_save/save_before_running");
if (autosave) {
_menu_option_confirm(FILE_SAVE_ALL_SCENES, false);
@@ -2107,8 +2022,9 @@ void EditorNode::_run_native(const Ref<EditorExportPreset> &p_preset) {
if (run_native->is_deploy_debug_remote_enabled()) {
_menu_option_confirm(RUN_STOP, true);
- if (!call_build())
+ if (!call_build()) {
return; // build failed
+ }
EditorDebuggerNode::get_singleton()->start(p_preset->get_platform()->get_debug_protocol());
emit_signal("play_pressed");
@@ -2117,25 +2033,22 @@ void EditorNode::_run_native(const Ref<EditorExportPreset> &p_preset) {
}
void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
-
- if (!p_confirmed) //this may be a hack..
+ if (!p_confirmed) { //this may be a hack..
current_option = (MenuOptions)p_option;
+ }
switch (p_option) {
case FILE_NEW_SCENE: {
-
new_scene();
} break;
case FILE_NEW_INHERITED_SCENE:
case FILE_OPEN_SCENE: {
-
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions);
file->clear_filters();
for (int i = 0; i < extensions.size(); i++) {
-
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
@@ -2148,27 +2061,24 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case FILE_QUICK_OPEN: {
-
quick_open->popup_dialog("Resource", true);
quick_open->set_title(TTR("Quick Open..."));
} break;
case FILE_QUICK_OPEN_SCENE: {
-
quick_open->popup_dialog("PackedScene", true);
quick_open->set_title(TTR("Quick Open Scene..."));
} break;
case FILE_QUICK_OPEN_SCRIPT: {
-
quick_open->popup_dialog("Script", true);
quick_open->set_title(TTR("Quick Open Script..."));
} break;
case FILE_OPEN_PREV: {
-
- if (previous_scenes.empty())
+ if (previous_scenes.empty()) {
break;
+ }
opening_prev = true;
open_request(previous_scenes.back()->get());
previous_scenes.pop_back();
@@ -2182,20 +2092,21 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
next_tab %= editor_data.get_edited_scene_count();
_scene_tab_closed(next_tab, current_option);
} else {
- if (current_option != FILE_CLOSE_ALL)
+ if (current_option != FILE_CLOSE_ALL) {
current_option = -1;
- else
+ } else {
_scene_tab_closed(editor_data.get_edited_scene());
+ }
}
- if (p_confirmed)
+ if (p_confirmed) {
_menu_option_confirm(SCENE_TAB_CLOSE, true);
+ }
} break;
case FILE_CLOSE_ALL_AND_QUIT:
case FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER:
case FILE_CLOSE: {
-
if (!p_confirmed) {
tab_closing = p_option == FILE_CLOSE ? editor_data.get_edited_scene() : _next_unsaved_scene(false);
@@ -2219,19 +2130,19 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
case SCENE_TAB_CLOSE:
case FILE_SAVE_SCENE: {
-
int scene_idx = (p_option == FILE_SAVE_SCENE) ? -1 : tab_closing;
Node *scene = editor_data.get_edited_scene_root(scene_idx);
if (scene && scene->get_filename() != "") {
-
- if (scene_idx != editor_data.get_edited_scene())
+ if (scene_idx != editor_data.get_edited_scene()) {
_save_scene_with_preview(scene->get_filename(), scene_idx);
- else
+ } else {
_save_scene_with_preview(scene->get_filename());
+ }
- if (scene_idx != -1)
+ if (scene_idx != -1) {
_discard_changes();
+ }
save_layout();
break;
@@ -2244,7 +2155,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
Node *scene = editor_data.get_edited_scene_root(scene_idx);
if (!scene) {
-
int saved = _save_external_resources();
String err_text;
if (saved > 0) {
@@ -2264,7 +2174,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
ResourceSaver::get_recognized_extensions(sd, &extensions);
file->clear_filters();
for (int i = 0; i < extensions.size(); i++) {
-
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
@@ -2277,7 +2186,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
}
} else {
-
String existing;
if (extensions.size()) {
String root_name(scene->get_name());
@@ -2291,7 +2199,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case FILE_SAVE_ALL_SCENES: {
-
_save_all_scenes();
} break;
case FILE_SAVE_BEFORE_RUN: {
@@ -2308,14 +2215,11 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case FILE_EXPORT_PROJECT: {
-
project_export->popup_export();
} break;
case FILE_EXPORT_MESH_LIBRARY: {
-
if (!editor_data.get_edited_scene_root()) {
-
show_accept(TTR("This operation can't be done without a scene."), TTR("OK"));
break;
}
@@ -2333,7 +2237,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case FILE_EXPORT_TILESET: {
-
//Make sure that the scene has a root before trying to convert to tileset
if (!editor_data.get_edited_scene_root()) {
show_accept(TTR("This operation can't be done without a root node."), TTR("OK"));
@@ -2354,9 +2257,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case FILE_IMPORT_SUBSCENE: {
-
if (!editor_data.get_edited_scene_root()) {
-
show_accept(TTR("This operation can't be done without a selected node."), TTR("OK"));
break;
}
@@ -2366,9 +2267,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case FILE_EXTERNAL_OPEN_SCENE: {
-
if (unsaved_cache && !p_confirmed) {
-
confirmation->get_ok()->set_text(TTR("Open"));
confirmation->set_text(TTR("Current scene not saved. Open anyway?"));
confirmation->popup_centered();
@@ -2385,7 +2284,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case EDIT_UNDO: {
-
if (Input::get_singleton()->get_mouse_button_mask() & 0x7) {
log->add_message("Can't undo while mouse buttons are pressed.", EditorLog::MSG_TYPE_EDITOR);
} else {
@@ -2399,7 +2297,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
} break;
case EDIT_REDO: {
-
if (Input::get_singleton()->get_mouse_button_mask() & 0x7) {
log->add_message("Can't redo while mouse buttons are pressed.", EditorLog::MSG_TYPE_EDITOR);
} else {
@@ -2413,11 +2310,11 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case EDIT_RELOAD_SAVED_SCENE: {
-
Node *scene = get_edited_scene();
- if (!scene)
+ if (!scene) {
break;
+ }
String filename = scene->get_filename();
@@ -2437,8 +2334,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
int cur_idx = editor_data.get_edited_scene();
_remove_edited_scene();
Error err = load_scene(filename);
- if (err != OK)
+ if (err != OK) {
ERR_PRINT("Failed to load scene");
+ }
editor_data.move_edited_scene_to_index(cur_idx);
get_undo_redo()->clear_history(false);
scene_tabs->set_current_tab(cur_idx);
@@ -2463,9 +2361,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case RUN_STOP: {
-
- if (editor_run.get_status() == EditorRun::STATUS_STOP)
+ if (editor_run.get_status() == EditorRun::STATUS_STOP) {
break;
+ }
editor_run.stop();
run_custom_filename.clear();
@@ -2498,22 +2396,18 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case RUN_PLAY_SCENE: {
-
_save_default_environment();
_menu_option_confirm(RUN_STOP, true);
_run(true);
} break;
case RUN_SCENE_SETTINGS: {
-
run_settings_dialog->popup_run_settings();
} break;
case RUN_SETTINGS: {
-
project_settings->popup_project_settings();
} break;
case FILE_INSTALL_ANDROID_SOURCE: {
-
if (p_confirmed) {
export_template_manager->install_android_template();
} else {
@@ -2534,14 +2428,11 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case FILE_QUIT:
case RUN_PROJECT_MANAGER: {
-
if (!p_confirmed) {
bool save_each = EDITOR_GET("interface/editor/save_each_scene_on_quit");
if (_next_unsaved_scene(!save_each) == -1) {
-
bool confirm = EDITOR_GET("interface/editor/quit_confirmation");
if (confirm) {
-
confirmation->get_ok()->set_text(p_option == FILE_QUIT ? TTR("Quit") : TTR("Yes"));
confirmation->set_text(p_option == FILE_QUIT ? TTR("Exit the editor?") : TTR("Open Project Manager?"));
confirmation->popup_centered();
@@ -2550,12 +2441,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
break;
}
} else {
-
if (save_each) {
-
_menu_option_confirm(p_option == FILE_QUIT ? FILE_CLOSE_ALL_AND_QUIT : FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER, false);
} else {
-
String unsaved_scenes;
int i = _next_unsaved_scene(true, 0);
while (i != -1) {
@@ -2579,65 +2467,52 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
_discard_changes();
} break;
case SETTINGS_UPDATE_CONTINUOUSLY: {
-
EditorSettings::get_singleton()->set("interface/editor/update_continuously", true);
_update_update_spinner();
show_accept(TTR("This option is deprecated. Situations where refresh must be forced are now considered a bug. Please report."), TTR("OK"));
} break;
case SETTINGS_UPDATE_WHEN_CHANGED: {
-
EditorSettings::get_singleton()->set("interface/editor/update_continuously", false);
_update_update_spinner();
} break;
case SETTINGS_UPDATE_SPINNER_HIDE: {
-
EditorSettings::get_singleton()->set("interface/editor/show_update_spinner", false);
_update_update_spinner();
} break;
case SETTINGS_PREFERENCES: {
-
settings_config_dialog->popup_edit_settings();
} break;
case SETTINGS_EDITOR_DATA_FOLDER: {
-
OS::get_singleton()->shell_open(String("file://") + EditorSettings::get_singleton()->get_data_dir());
} break;
case SETTINGS_EDITOR_CONFIG_FOLDER: {
-
OS::get_singleton()->shell_open(String("file://") + EditorSettings::get_singleton()->get_settings_dir());
} break;
case SETTINGS_MANAGE_EXPORT_TEMPLATES: {
-
export_template_manager->popup_manager();
} break;
case SETTINGS_MANAGE_FEATURE_PROFILES: {
-
feature_profile_manager->popup_centered_clamped(Size2(900, 800) * EDSCALE, 0.8);
} break;
case SETTINGS_TOGGLE_FULLSCREEN: {
-
DisplayServer::get_singleton()->window_set_mode(DisplayServer::get_singleton()->window_get_mode() == DisplayServer::WINDOW_MODE_FULLSCREEN ? DisplayServer::WINDOW_MODE_WINDOWED : DisplayServer::WINDOW_MODE_FULLSCREEN);
} break;
case SETTINGS_TOGGLE_CONSOLE: {
-
bool was_visible = DisplayServer::get_singleton()->is_console_visible();
DisplayServer::get_singleton()->console_set_visible(!was_visible);
EditorSettings::get_singleton()->set_setting("interface/editor/hide_console_window", was_visible);
} break;
case EDITOR_SCREENSHOT: {
-
screenshot_timer->start();
} break;
case SETTINGS_PICK_MAIN_SCENE: {
-
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions);
file->clear_filters();
for (int i = 0; i < extensions.size(); i++) {
-
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
@@ -2672,7 +2547,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case SET_VIDEO_DRIVER_SAVE_AND_RESTART: {
-
ProjectSettings::get_singleton()->set("rendering/quality/driver/driver_name", video_driver_request);
ProjectSettings::get_singleton()->save();
@@ -2696,7 +2570,6 @@ void EditorNode::_screenshot(bool p_use_utc) {
}
void EditorNode::_save_screenshot(NodePath p_path) {
-
SubViewport *viewport = Object::cast_to<SubViewport>(EditorInterface::get_singleton()->get_editor_viewport()->get_viewport());
viewport->set_clear_mode(SubViewport::CLEAR_MODE_ONLY_NEXT_FRAME);
Ref<Image> img = viewport->get_texture()->get_data();
@@ -2730,17 +2603,17 @@ void EditorNode::_tool_menu_option(int p_idx) {
}
int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) {
-
for (int i = p_start; i < editor_data.get_edited_scene_count(); i++) {
-
- if (!editor_data.get_edited_scene_root(i))
+ if (!editor_data.get_edited_scene_root(i)) {
continue;
+ }
int current = editor_data.get_edited_scene();
bool unsaved = (i == current) ? saved_version != editor_data.get_undo_redo().get_version() : editor_data.get_scene_version(i) != 0;
if (unsaved) {
String scene_filename = editor_data.get_edited_scene_root(i)->get_filename();
- if (p_valid_filename && scene_filename.length() == 0)
+ if (p_valid_filename && scene_filename.length() == 0) {
continue;
+ }
return i;
}
}
@@ -2759,9 +2632,7 @@ void EditorNode::_exit_editor() {
}
void EditorNode::_discard_changes(const String &p_str) {
-
switch (current_option) {
-
case FILE_CLOSE_ALL_AND_QUIT:
case FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER:
case FILE_CLOSE:
@@ -2769,7 +2640,6 @@ void EditorNode::_discard_changes(const String &p_str) {
case FILE_CLOSE_RIGHT:
case FILE_CLOSE_ALL:
case SCENE_TAB_CLOSE: {
-
Node *scene = editor_data.get_edited_scene_root(tab_closing);
if (scene != nullptr) {
String scene_filename = scene->get_filename();
@@ -2803,13 +2673,11 @@ void EditorNode::_discard_changes(const String &p_str) {
}
} break;
case FILE_QUIT: {
-
_menu_option_confirm(RUN_STOP, true);
_exit_editor();
} break;
case RUN_PROJECT_MANAGER: {
-
_menu_option_confirm(RUN_STOP, true);
_exit_editor();
String exec = OS::get_singleton()->get_executable_path();
@@ -2827,7 +2695,6 @@ void EditorNode::_discard_changes(const String &p_str) {
}
void EditorNode::_update_file_menu_opened() {
-
Ref<ShortCut> close_scene_sc = ED_GET_SHORTCUT("editor/close_scene");
close_scene_sc->set_name(TTR("Close Scene"));
Ref<ShortCut> reopen_closed_scene_sc = ED_GET_SHORTCUT("editor/reopen_closed_scene");
@@ -2842,20 +2709,20 @@ void EditorNode::_update_file_menu_closed() {
}
Control *EditorNode::get_viewport() {
-
return viewport;
}
void EditorNode::_editor_select(int p_which) {
-
static bool selecting = false;
- if (selecting || changing_scene)
+ if (selecting || changing_scene) {
return;
+ }
ERR_FAIL_INDEX(p_which, editor_table.size());
- if (!main_editor_buttons[p_which]->is_visible()) //button hidden, no editor
+ if (!main_editor_buttons[p_which]->is_visible()) { //button hidden, no editor
return;
+ }
selecting = true;
@@ -2868,8 +2735,9 @@ void EditorNode::_editor_select(int p_which) {
EditorPlugin *new_editor = editor_table[p_which];
ERR_FAIL_COND(!new_editor);
- if (editor_plugin_screen == new_editor)
+ if (editor_plugin_screen == new_editor) {
return;
+ }
if (editor_plugin_screen) {
editor_plugin_screen->make_visible(false);
@@ -2907,9 +2775,7 @@ void EditorNode::select_editor_by_name(const String &p_name) {
}
void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) {
-
if (p_editor->has_main_screen()) {
-
ToolButton *tb = memnew(ToolButton);
tb->set_toggle_mode(true);
tb->connect("pressed", callable_mp(singleton, &EditorNode::_editor_select), varray(singleton->main_editor_buttons.size()));
@@ -2931,18 +2797,15 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
}
singleton->editor_data.add_editor_plugin(p_editor);
singleton->add_child(p_editor);
- if (p_config_changed)
+ if (p_config_changed) {
p_editor->enable_plugin();
+ }
}
void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) {
-
if (p_editor->has_main_screen()) {
-
for (int i = 0; i < singleton->main_editor_buttons.size(); i++) {
-
if (p_editor->get_name() == singleton->main_editor_buttons[i]->get_text()) {
-
if (singleton->main_editor_buttons[i]->is_pressed()) {
singleton->_editor_select(EDITOR_SCRIPT);
}
@@ -2958,8 +2821,9 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
}
p_editor->make_visible(false);
p_editor->clear();
- if (p_config_changed)
+ if (p_config_changed) {
p_editor->disable_plugin();
+ }
singleton->editor_plugins_over->get_plugins_list().erase(p_editor);
singleton->remove_child(p_editor);
singleton->editor_data.remove_editor_plugin(p_editor);
@@ -2967,9 +2831,9 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
}
void EditorNode::_update_addon_config() {
-
- if (_initializing_addons)
+ if (_initializing_addons) {
return;
+ }
Vector<String> enabled_addons;
@@ -2987,12 +2851,10 @@ void EditorNode::_update_addon_config() {
}
void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, bool p_config_changed) {
-
ERR_FAIL_COND(p_enabled && plugin_addons.has(p_addon));
ERR_FAIL_COND(!p_enabled && !plugin_addons.has(p_addon));
if (!p_enabled) {
-
EditorPlugin *addon = plugin_addons[p_addon];
remove_editor_plugin(addon, p_config_changed);
memdelete(addon); //bye
@@ -3069,7 +2931,6 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
}
bool EditorNode::is_addon_plugin_enabled(const String &p_addon) const {
-
return plugin_addons.has(p_addon);
}
@@ -3090,8 +2951,9 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) {
ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(editor_data.get_scene_path(old_index));
}
- if (p_change_tab)
+ if (p_change_tab) {
_scene_tab_changed(new_index);
+ }
editor_data.remove_scene(old_index);
editor_data.get_undo_redo().clear_history(false);
_update_title();
@@ -3099,7 +2961,6 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) {
}
void EditorNode::_remove_scene(int index, bool p_change_tab) {
-
if (editor_data.get_edited_scene() == index) {
//Scene to remove is current scene
_remove_edited_scene(p_change_tab);
@@ -3110,37 +2971,39 @@ void EditorNode::_remove_scene(int index, bool p_change_tab) {
}
void EditorNode::set_edited_scene(Node *p_scene) {
-
if (get_editor_data().get_edited_scene_root()) {
- if (get_editor_data().get_edited_scene_root()->get_parent() == scene_root)
+ if (get_editor_data().get_edited_scene_root()->get_parent() == scene_root) {
scene_root->remove_child(get_editor_data().get_edited_scene_root());
+ }
}
get_editor_data().set_edited_scene_root(p_scene);
- if (Object::cast_to<Popup>(p_scene))
+ if (Object::cast_to<Popup>(p_scene)) {
Object::cast_to<Popup>(p_scene)->show(); //show popups
+ }
scene_tree_dock->set_edited_scene(p_scene);
- if (get_tree())
+ if (get_tree()) {
get_tree()->set_edited_scene_root(p_scene);
+ }
if (p_scene) {
- if (p_scene->get_parent() != scene_root)
+ if (p_scene->get_parent() != scene_root) {
scene_root->add_child(p_scene);
+ }
}
}
int EditorNode::_get_current_main_editor() {
-
for (int i = 0; i < editor_table.size(); i++) {
- if (editor_table[i] == editor_plugin_screen)
+ if (editor_table[i] == editor_plugin_screen) {
return i;
+ }
}
return 0;
}
Dictionary EditorNode::_get_main_scene_state() {
-
Dictionary state;
state["main_tab"] = _get_current_main_editor();
state["scene_tree_offset"] = scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->get_value();
@@ -3151,9 +3014,9 @@ Dictionary EditorNode::_get_main_scene_state() {
}
void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
-
- if (get_edited_scene() != p_for_scene && p_for_scene != nullptr)
+ if (get_edited_scene() != p_for_scene && p_for_scene != nullptr) {
return; //not for this scene
+ }
changing_scene = false;
@@ -3187,13 +3050,16 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
}
}
- if (p_state.has("scene_tree_offset"))
+ if (p_state.has("scene_tree_offset")) {
scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->set_value(p_state["scene_tree_offset"]);
- if (p_state.has("property_edit_offset"))
+ }
+ if (p_state.has("property_edit_offset")) {
get_inspector()->set_scroll_offset(p_state["property_edit_offset"]);
+ }
- if (p_state.has("node_filter"))
+ if (p_state.has("node_filter")) {
scene_tree_dock->set_filter(p_state["node_filter"]);
+ }
//this should only happen at the very end
@@ -3203,7 +3069,6 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
}
void EditorNode::set_current_version(uint64_t p_version) {
-
saved_version = p_version;
editor_data.set_edited_scene_version(p_version);
}
@@ -3213,19 +3078,19 @@ bool EditorNode::is_changing_scene() const {
}
void EditorNode::_clear_undo_history() {
-
get_undo_redo()->clear_history(false);
}
void EditorNode::set_current_scene(int p_idx) {
-
//Save the folding in case the scene gets reloaded.
- if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx))
+ if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx)) {
editor_folding.save_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
+ }
if (editor_data.check_and_update_scene(p_idx)) {
- if (editor_data.get_scene_path(p_idx) != "")
+ if (editor_data.get_scene_path(p_idx) != "") {
editor_folding.load_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
+ }
call_deferred("_clear_undo_history");
}
@@ -3234,8 +3099,9 @@ void EditorNode::set_current_scene(int p_idx) {
editor_data.save_edited_scene_state(editor_selection, &editor_history, _get_main_scene_state());
if (get_editor_data().get_edited_scene_root()) {
- if (get_editor_data().get_edited_scene_root()->get_parent() == scene_root)
+ if (get_editor_data().get_edited_scene_root()->get_parent() == scene_root) {
scene_root->remove_child(get_editor_data().get_edited_scene_root());
+ }
}
editor_selection->clear();
@@ -3243,16 +3109,19 @@ void EditorNode::set_current_scene(int p_idx) {
Node *new_scene = editor_data.get_edited_scene_root();
- if (Object::cast_to<Popup>(new_scene))
+ if (Object::cast_to<Popup>(new_scene)) {
Object::cast_to<Popup>(new_scene)->show(); //show popups
+ }
scene_tree_dock->set_edited_scene(new_scene);
- if (get_tree())
+ if (get_tree()) {
get_tree()->set_edited_scene_root(new_scene);
+ }
if (new_scene) {
- if (new_scene->get_parent() != scene_root)
+ if (new_scene->get_parent() != scene_root) {
scene_root->add_child(new_scene);
+ }
}
Dictionary state = editor_data.restore_edited_scene_state(editor_selection, &editor_history);
@@ -3264,10 +3133,10 @@ void EditorNode::set_current_scene(int p_idx) {
}
bool EditorNode::is_scene_open(const String &p_path) {
-
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
- if (editor_data.get_scene_path(i) == p_path)
+ if (editor_data.get_scene_path(i) == p_path) {
return true;
+ }
}
return false;
@@ -3286,16 +3155,13 @@ int EditorNode::new_scene() {
}
Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, bool p_set_inherited, bool p_clear_errors, bool p_force_open_imported) {
-
if (!is_inside_tree()) {
defer_load_scene = p_scene;
return OK;
}
if (!p_set_inherited) {
-
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
-
if (editor_data.get_scene_path(i) == p_scene) {
_scene_tab_changed(i);
return OK;
@@ -3311,13 +3177,13 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
}
}
- if (p_clear_errors)
+ if (p_clear_errors) {
load_errors->clear();
+ }
String lpath = ProjectSettings::get_singleton()->localize_path(p_scene);
if (!lpath.begins_with("res://")) {
-
show_accept(TTR("Error loading scene, it must be inside the project path. Use 'Import' to open the scene, then save it inside the project path."), TTR("OK"));
opening_prev = false;
return ERR_FILE_NOT_FOUND;
@@ -3337,7 +3203,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
Error err;
Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true, &err);
if (!sdata.is_valid()) {
-
_dialog_display_load_error(lpath, err);
opening_prev = false;
@@ -3349,11 +3214,9 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
}
if (!p_ignore_broken_deps && dependency_errors.has(lpath)) {
-
current_option = -1;
Vector<String> errors;
for (Set<String>::Element *E = dependency_errors[lpath].front(); E; E = E->next()) {
-
errors.push_back(E->get());
}
dependency_error->show(DependencyErrorDialog::MODE_SCENE, lpath, errors);
@@ -3369,7 +3232,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
dependency_errors.erase(lpath); //at least not self path
for (Map<String, Set<String>>::Element *E = dependency_errors.front(); E; E = E->next()) {
-
String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E->key()) + "\n";
for (Set<String>::Element *F = E->get().front(); F; F = F->next()) {
txt += "\t" + F->get() + "\n";
@@ -3393,15 +3255,14 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
Node *new_scene = sdata->instance(PackedScene::GEN_EDIT_STATE_MAIN);
if (!new_scene) {
-
sdata.unref();
- _dialog_display_load_error(lpath, ERR_FILE_NOT_FOUND);
+ _dialog_display_load_error(lpath, ERR_FILE_CORRUPT);
opening_prev = false;
if (prev != -1) {
set_current_scene(prev);
editor_data.remove_scene(idx);
}
- return ERR_FILE_NOT_FOUND;
+ return ERR_FILE_CORRUPT;
}
if (p_set_inherited) {
@@ -3444,7 +3305,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
}
void EditorNode::open_request(const String &p_path) {
-
if (!opening_prev) {
List<String>::Element *prev_scene = previous_scenes.find(p_path);
if (prev_scene != nullptr) {
@@ -3456,12 +3316,10 @@ void EditorNode::open_request(const String &p_path) {
}
void EditorNode::request_instance_scene(const String &p_path) {
-
scene_tree_dock->instance(p_path);
}
void EditorNode::request_instance_scenes(const Vector<String> &p_files) {
-
scene_tree_dock->instance_scenes(p_files);
}
@@ -3470,66 +3328,58 @@ ImportDock *EditorNode::get_import_dock() {
}
FileSystemDock *EditorNode::get_filesystem_dock() {
-
return filesystem_dock;
}
-SceneTreeDock *EditorNode::get_scene_tree_dock() {
+SceneTreeDock *EditorNode::get_scene_tree_dock() {
return scene_tree_dock;
}
-InspectorDock *EditorNode::get_inspector_dock() {
+InspectorDock *EditorNode::get_inspector_dock() {
return inspector_dock;
}
void EditorNode::_inherit_request(String p_file) {
-
current_option = FILE_NEW_INHERITED_SCENE;
_dialog_action(p_file);
}
void EditorNode::_instance_request(const Vector<String> &p_files) {
-
request_instance_scenes(p_files);
}
void EditorNode::_close_messages() {
-
old_split_ofs = center_split->get_split_offset();
center_split->set_split_offset(0);
}
void EditorNode::_show_messages() {
-
center_split->set_split_offset(old_split_ofs);
}
void EditorNode::_add_to_recent_scenes(const String &p_scene) {
-
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scenes", Array());
- if (rc.find(p_scene) != -1)
+ if (rc.find(p_scene) != -1) {
rc.erase(p_scene);
+ }
rc.push_front(p_scene);
- if (rc.size() > 10)
+ if (rc.size() > 10) {
rc.resize(10);
+ }
EditorSettings::get_singleton()->set_project_metadata("recent_files", "scenes", rc);
_update_recent_scenes();
}
void EditorNode::_open_recent_scene(int p_idx) {
-
if (p_idx == recent_scenes->get_item_count() - 1) {
-
EditorSettings::get_singleton()->set_project_metadata("recent_files", "scenes", Array());
call_deferred("_update_recent_scenes");
} else {
-
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scenes", Array());
ERR_FAIL_INDEX(p_idx, rc.size());
if (load_scene(rc[p_idx]) != OK) {
-
rc.remove(p_idx);
EditorSettings::get_singleton()->set_project_metadata("recent_files", "scenes", rc);
_update_recent_scenes();
@@ -3538,13 +3388,11 @@ void EditorNode::_open_recent_scene(int p_idx) {
}
void EditorNode::_update_recent_scenes() {
-
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scenes", Array());
recent_scenes->clear();
String path;
for (int i = 0; i < rc.size(); i++) {
-
path = rc[i];
recent_scenes->add_item(path.replace("res://", ""), i);
}
@@ -3555,7 +3403,6 @@ void EditorNode::_update_recent_scenes() {
}
void EditorNode::_quick_opened() {
-
Vector<String> files = quick_open->get_selected_files();
for (int i = 0; i < files.size(); i++) {
@@ -3570,12 +3417,10 @@ void EditorNode::_quick_opened() {
}
void EditorNode::_quick_run() {
-
_run(false, quick_run->get_selected());
}
void EditorNode::notify_all_debug_sessions_exited() {
-
_menu_option_confirm(RUN_STOP, false);
stop_button->set_pressed(false);
editor_run.stop();
@@ -3586,7 +3431,6 @@ void EditorNode::add_io_error(const String &p_error) {
}
void EditorNode::_load_error_notify(void *p_ud, const String &p_text) {
-
EditorNode *en = (EditorNode *)p_ud;
en->load_errors->add_image(en->gui_base->get_theme_icon("Error", "EditorIcons"));
en->load_errors->add_text(p_text + "\n");
@@ -3594,13 +3438,11 @@ void EditorNode::_load_error_notify(void *p_ud, const String &p_text) {
}
bool EditorNode::_find_scene_in_use(Node *p_node, const String &p_path) const {
-
if (p_node->get_filename() == p_path) {
return true;
}
for (int i = 0; i < p_node->get_child_count(); i++) {
-
if (_find_scene_in_use(p_node->get_child(i), p_path)) {
return true;
}
@@ -3610,15 +3452,14 @@ bool EditorNode::_find_scene_in_use(Node *p_node, const String &p_path) const {
}
bool EditorNode::is_scene_in_use(const String &p_path) {
-
Node *es = get_edited_scene();
- if (es)
+ if (es) {
return _find_scene_in_use(es, p_path);
+ }
return false;
}
void EditorNode::register_editor_types() {
-
ResourceLoader::set_timestamp_on_load(true);
ResourceSaver::set_timestamp_on_save(true);
@@ -3655,16 +3496,15 @@ void EditorNode::register_editor_types() {
}
void EditorNode::unregister_editor_types() {
-
_init_callbacks.clear();
}
void EditorNode::stop_child_process(OS::ProcessID p_pid) {
-
if (has_child_process(p_pid)) {
editor_run.stop_child_process(p_pid);
- if (!editor_run.get_child_process_count()) // All children stopped. Closing.
+ if (!editor_run.get_child_process_count()) { // All children stopped. Closing.
_menu_option_confirm(RUN_STOP, false);
+ }
}
}
@@ -3711,8 +3551,9 @@ StringName EditorNode::get_object_custom_type_name(const Object *p_object) const
Ref<Script> base_script = script;
while (base_script.is_valid()) {
StringName name = EditorNode::get_editor_data().script_class_get_name(base_script->get_path());
- if (name != StringName())
+ if (name != StringName()) {
return name;
+ }
// should probably be deprecated in 4.x
StringName base = base_script->get_instance_base_type();
@@ -3778,14 +3619,17 @@ Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String
}
// should probably be deprecated in 4.x
- if (p_object->has_meta("_editor_icon"))
+ if (p_object->has_meta("_editor_icon")) {
return p_object->get_meta("_editor_icon");
+ }
- if (gui_base->has_theme_icon(p_object->get_class(), "EditorIcons"))
+ if (gui_base->has_theme_icon(p_object->get_class(), "EditorIcons")) {
return gui_base->get_theme_icon(p_object->get_class(), "EditorIcons");
+ }
- if (p_fallback.length())
+ if (p_fallback.length()) {
return gui_base->get_theme_icon(p_fallback, "EditorIcons");
+ }
return nullptr;
}
@@ -3835,14 +3679,14 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
}
}
- if (p_fallback.length() && gui_base->has_theme_icon(p_fallback, "EditorIcons"))
+ if (p_fallback.length() && gui_base->has_theme_icon(p_fallback, "EditorIcons")) {
return gui_base->get_theme_icon(p_fallback, "EditorIcons");
+ }
return nullptr;
}
void EditorNode::progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) {
-
if (singleton->cmdline_export_mode) {
print_line(p_task + ": begin: " + p_label + " steps: " + itos(p_steps));
} else {
@@ -3851,18 +3695,15 @@ void EditorNode::progress_add_task(const String &p_task, const String &p_label,
}
bool EditorNode::progress_task_step(const String &p_task, const String &p_state, int p_step, bool p_force_refresh) {
-
if (singleton->cmdline_export_mode) {
print_line("\t" + p_task + ": step " + itos(p_step) + ": " + p_state);
return false;
} else {
-
return singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh);
}
}
void EditorNode::progress_end_task(const String &p_task) {
-
if (singleton->cmdline_export_mode) {
print_line(p_task + ": end");
} else {
@@ -3871,29 +3712,23 @@ void EditorNode::progress_end_task(const String &p_task) {
}
void EditorNode::progress_add_task_bg(const String &p_task, const String &p_label, int p_steps) {
-
singleton->progress_hb->add_task(p_task, p_label, p_steps);
}
void EditorNode::progress_task_step_bg(const String &p_task, int p_step) {
-
singleton->progress_hb->task_step(p_task, p_step);
}
void EditorNode::progress_end_task_bg(const String &p_task) {
-
singleton->progress_hb->end_task(p_task);
}
Ref<Texture2D> EditorNode::_file_dialog_get_icon(const String &p_path) {
-
EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem_path(p_path.get_base_dir());
if (efsd) {
-
String file = p_path.get_file();
for (int i = 0; i < efsd->get_file_count(); i++) {
if (efsd->get_file(i) == file) {
-
String type = efsd->get_file_type(i);
if (singleton->icon_type_cache.has(type)) {
@@ -3909,42 +3744,36 @@ Ref<Texture2D> EditorNode::_file_dialog_get_icon(const String &p_path) {
}
void EditorNode::_build_icon_type_cache() {
-
List<StringName> tl;
StringName ei = "EditorIcons";
theme_base->get_theme()->get_icon_list(ei, &tl);
for (List<StringName>::Element *E = tl.front(); E; E = E->next()) {
-
- if (!ClassDB::class_exists(E->get()))
+ if (!ClassDB::class_exists(E->get())) {
continue;
+ }
icon_type_cache[E->get()] = theme_base->get_theme()->get_icon(E->get(), ei);
}
}
void EditorNode::_file_dialog_register(FileDialog *p_dialog) {
-
singleton->file_dialogs.insert(p_dialog);
}
void EditorNode::_file_dialog_unregister(FileDialog *p_dialog) {
-
singleton->file_dialogs.erase(p_dialog);
}
void EditorNode::_editor_file_dialog_register(EditorFileDialog *p_dialog) {
-
singleton->editor_file_dialogs.insert(p_dialog);
}
void EditorNode::_editor_file_dialog_unregister(EditorFileDialog *p_dialog) {
-
singleton->editor_file_dialogs.erase(p_dialog);
}
Vector<EditorNodeInitCallback> EditorNode::_init_callbacks;
Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only) {
-
export_defer.preset = p_preset;
export_defer.path = p_path;
export_defer.debug = p_debug;
@@ -3961,7 +3790,6 @@ void EditorNode::show_accept(const String &p_text, const String &p_title) {
}
void EditorNode::show_warning(const String &p_text, const String &p_title) {
-
if (warning->is_inside_tree()) {
warning->set_text(p_text);
warning->set_title(p_title);
@@ -3972,7 +3800,6 @@ void EditorNode::show_warning(const String &p_text, const String &p_title) {
}
void EditorNode::_copy_warning(const String &p_str) {
-
DisplayServer::get_singleton()->clipboard_set(warning->get_text());
}
@@ -4037,7 +3864,6 @@ void EditorNode::_dock_make_float() {
}
void EditorNode::_update_dock_containers() {
-
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
if (dock_slot[i]->get_tab_count() == 0 && dock_slot[i]->is_visible()) {
dock_slot[i]->hide();
@@ -4048,24 +3874,24 @@ void EditorNode::_update_dock_containers() {
}
for (int i = 0; i < vsplits.size(); i++) {
bool in_use = dock_slot[i * 2 + 0]->get_tab_count() || dock_slot[i * 2 + 1]->get_tab_count();
- if (in_use)
+ if (in_use) {
vsplits[i]->show();
- else
+ } else {
vsplits[i]->hide();
+ }
}
- if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible())
+ if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible()) {
right_hsplit->show();
- else
+ } else {
right_hsplit->hide();
+ }
}
void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) {
-
Ref<InputEventMouse> me = p_input;
if (me.is_valid()) {
-
Vector2 point = me->get_position();
int nrect = -1;
@@ -4081,8 +3907,9 @@ void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) {
dock_select_rect_over = nrect;
}
- if (nrect == -1)
+ if (nrect == -1) {
return;
+ }
Ref<InputEventMouseButton> mb = me;
@@ -4095,7 +3922,6 @@ void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) {
dock_slot[dock_popup_selected]->hide();
} else {
-
dock_slot[dock_popup_selected]->set_current_tab(0);
}
@@ -4114,24 +3940,23 @@ void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) {
}
void EditorNode::_dock_popup_exit() {
-
dock_select_rect_over = -1;
dock_select->update();
}
void EditorNode::_dock_pre_popup(int p_which) {
-
dock_popup_selected = p_which;
}
void EditorNode::_dock_move_left() {
-
- if (dock_popup_selected < 0 || dock_popup_selected >= DOCK_SLOT_MAX)
+ if (dock_popup_selected < 0 || dock_popup_selected >= DOCK_SLOT_MAX) {
return;
+ }
Control *current = dock_slot[dock_popup_selected]->get_tab_control(dock_slot[dock_popup_selected]->get_current_tab());
Control *prev = dock_slot[dock_popup_selected]->get_tab_control(dock_slot[dock_popup_selected]->get_current_tab() - 1);
- if (!current || !prev)
+ if (!current || !prev) {
return;
+ }
dock_slot[dock_popup_selected]->move_child(current, prev->get_index());
dock_slot[dock_popup_selected]->set_current_tab(dock_slot[dock_popup_selected]->get_current_tab() - 1);
dock_select->update();
@@ -4140,11 +3965,11 @@ void EditorNode::_dock_move_left() {
}
void EditorNode::_dock_move_right() {
-
Control *current = dock_slot[dock_popup_selected]->get_tab_control(dock_slot[dock_popup_selected]->get_current_tab());
Control *next = dock_slot[dock_popup_selected]->get_tab_control(dock_slot[dock_popup_selected]->get_current_tab() + 1);
- if (!current || !next)
+ if (!current || !next) {
return;
+ }
dock_slot[dock_popup_selected]->move_child(next, current->get_index());
dock_slot[dock_popup_selected]->set_current_tab(dock_slot[dock_popup_selected]->get_current_tab() + 1);
dock_select->update();
@@ -4175,18 +4000,15 @@ void EditorNode::_dock_select_draw() {
dock_tab_move_right->set_disabled(true);
if (dock_popup_selected != -1 && dock_slot[dock_popup_selected]->get_tab_count()) {
-
dock_tab_move_left->set_disabled(dock_slot[dock_popup_selected]->get_current_tab() == 0);
dock_tab_move_right->set_disabled(dock_slot[dock_popup_selected]->get_current_tab() >= dock_slot[dock_popup_selected]->get_tab_count() - 1);
}
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
-
Vector2 ofs;
switch (i) {
case DOCK_SLOT_LEFT_UL: {
-
} break;
case DOCK_SLOT_LEFT_BL: {
ofs.y += s.y;
@@ -4227,22 +4049,21 @@ void EditorNode::_dock_select_draw() {
} else if (dock_slot[i]->get_child_count() == 0) {
dock_select->draw_rect(r, unused);
} else {
-
dock_select->draw_rect(r, used);
}
for (int j = 0; j < MIN(3, dock_slot[i]->get_child_count()); j++) {
int xofs = (r.size.width / 3) * j;
Color c = used;
- if (i == dock_popup_selected && (dock_slot[i]->get_current_tab() > 3 || dock_slot[i]->get_current_tab() == j))
+ if (i == dock_popup_selected && (dock_slot[i]->get_current_tab() > 3 || dock_slot[i]->get_current_tab() == j)) {
c = tab_selected;
+ }
dock_select->draw_rect(Rect2(2 + ofs.x + xofs, ofs.y, r.size.width / 3 - 1, 3), c);
}
}
}
void EditorNode::_save_docks() {
-
if (waiting_for_first_scan) {
return; //scanning, do not touch docks
}
@@ -4257,13 +4078,13 @@ void EditorNode::_save_docks() {
}
void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p_section) {
-
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
String names;
for (int j = 0; j < dock_slot[i]->get_tab_count(); j++) {
String name = dock_slot[i]->get_tab_control(j)->get_name();
- if (names != "")
+ if (names != "") {
names += ",";
+ }
names += name;
}
@@ -4277,14 +4098,12 @@ void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p
p_layout->set_value(p_section, "dock_filesystem_file_list_display_mode", filesystem_dock->get_file_list_display_mode());
for (int i = 0; i < vsplits.size(); i++) {
-
if (vsplits[i]->is_visible_in_tree()) {
p_layout->set_value(p_section, "dock_split_" + itos(i + 1), vsplits[i]->get_split_offset());
}
}
for (int i = 0; i < hsplits.size(); i++) {
-
p_layout->set_value(p_section, "dock_hsplit_" + itos(i + 1), hsplits[i]->get_split_offset());
}
}
@@ -4302,17 +4121,14 @@ void EditorNode::_save_open_scenes_to_config(Ref<ConfigFile> p_layout, const Str
}
void EditorNode::save_layout() {
-
dock_drag_timer->start();
}
void EditorNode::_dock_split_dragged(int ofs) {
-
dock_drag_timer->start();
}
void EditorNode::_load_docks() {
-
Ref<ConfigFile> config;
config.instance();
Error err = config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
@@ -4331,9 +4147,7 @@ void EditorNode::_load_docks() {
}
void EditorNode::_update_dock_slots_visibility() {
-
if (!docks_visible) {
-
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
dock_slot[i]->hide();
}
@@ -4346,48 +4160,47 @@ void EditorNode::_update_dock_slots_visibility() {
bottom_panel->hide();
} else {
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
-
int tabs_visible = 0;
for (int j = 0; j < dock_slot[i]->get_tab_count(); j++) {
if (!dock_slot[i]->get_tab_hidden(j)) {
tabs_visible++;
}
}
- if (tabs_visible)
+ if (tabs_visible) {
dock_slot[i]->show();
- else
+ } else {
dock_slot[i]->hide();
+ }
}
for (int i = 0; i < vsplits.size(); i++) {
bool in_use = dock_slot[i * 2 + 0]->get_tab_count() || dock_slot[i * 2 + 1]->get_tab_count();
- if (in_use)
+ if (in_use) {
vsplits[i]->show();
- else
+ } else {
vsplits[i]->hide();
+ }
}
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
-
if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) {
dock_slot[i]->set_current_tab(0);
}
}
bottom_panel->show();
- if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible())
+ if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible()) {
right_hsplit->show();
- else
+ } else {
right_hsplit->hide();
+ }
}
}
void EditorNode::_dock_tab_changed(int p_tab) {
-
// update visibility but don't set current tab
if (!docks_visible) {
-
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
dock_slot[i]->hide();
}
@@ -4400,55 +4213,58 @@ void EditorNode::_dock_tab_changed(int p_tab) {
bottom_panel->hide();
} else {
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
-
- if (dock_slot[i]->get_tab_count())
+ if (dock_slot[i]->get_tab_count()) {
dock_slot[i]->show();
- else
+ } else {
dock_slot[i]->hide();
+ }
}
for (int i = 0; i < vsplits.size(); i++) {
bool in_use = dock_slot[i * 2 + 0]->get_tab_count() || dock_slot[i * 2 + 1]->get_tab_count();
- if (in_use)
+ if (in_use) {
vsplits[i]->show();
- else
+ } else {
vsplits[i]->hide();
+ }
}
bottom_panel->show();
- if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible())
+ if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible()) {
right_hsplit->show();
- else
+ } else {
right_hsplit->hide();
+ }
}
}
void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String &p_section) {
-
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
-
- if (!p_layout->has_section_key(p_section, "dock_" + itos(i + 1)))
+ if (!p_layout->has_section_key(p_section, "dock_" + itos(i + 1))) {
continue;
+ }
Vector<String> names = String(p_layout->get_value(p_section, "dock_" + itos(i + 1))).split(",");
for (int j = 0; j < names.size(); j++) {
-
String name = names[j];
//find it, in a horribly inefficient way
int atidx = -1;
Control *node = nullptr;
for (int k = 0; k < DOCK_SLOT_MAX; k++) {
- if (!dock_slot[k]->has_node(name))
+ if (!dock_slot[k]->has_node(name)) {
continue;
+ }
node = Object::cast_to<Control>(dock_slot[k]->get_node(name));
- if (!node)
+ if (!node) {
continue;
+ }
atidx = k;
break;
}
- if (atidx == -1) //well, it's not anywhere
+ if (atidx == -1) { //well, it's not anywhere
continue;
+ }
if (atidx == i) {
node->raise();
@@ -4481,36 +4297,38 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
}
for (int i = 0; i < vsplits.size(); i++) {
-
- if (!p_layout->has_section_key(p_section, "dock_split_" + itos(i + 1)))
+ if (!p_layout->has_section_key(p_section, "dock_split_" + itos(i + 1))) {
continue;
+ }
int ofs = p_layout->get_value(p_section, "dock_split_" + itos(i + 1));
vsplits[i]->set_split_offset(ofs);
}
for (int i = 0; i < hsplits.size(); i++) {
- if (!p_layout->has_section_key(p_section, "dock_hsplit_" + itos(i + 1)))
+ if (!p_layout->has_section_key(p_section, "dock_hsplit_" + itos(i + 1))) {
continue;
+ }
int ofs = p_layout->get_value(p_section, "dock_hsplit_" + itos(i + 1));
hsplits[i]->set_split_offset(ofs);
}
for (int i = 0; i < vsplits.size(); i++) {
bool in_use = dock_slot[i * 2 + 0]->get_tab_count() || dock_slot[i * 2 + 1]->get_tab_count();
- if (in_use)
+ if (in_use) {
vsplits[i]->show();
- else
+ } else {
vsplits[i]->hide();
+ }
}
- if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible())
+ if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible()) {
right_hsplit->show();
- else
+ } else {
right_hsplit->hide();
+ }
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
-
if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) {
dock_slot[i]->set_current_tab(0);
}
@@ -4559,7 +4377,6 @@ bool EditorNode::ensure_main_scene(bool p_from_native) {
String main_scene = GLOBAL_DEF("application/run/main_scene", "");
if (main_scene == "") {
-
current_option = -1;
pick_main_scene->set_text(TTR("No main scene has ever been defined, select one?\nYou can change it later in \"Project Settings\" under the 'application' category."));
pick_main_scene->popup_centered();
@@ -4567,7 +4384,6 @@ bool EditorNode::ensure_main_scene(bool p_from_native) {
}
if (!FileAccess::exists(main_scene)) {
-
current_option = -1;
pick_main_scene->set_text(vformat(TTR("Selected scene '%s' does not exist, select a valid one?\nYou can change it later in \"Project Settings\" under the 'application' category."), main_scene));
pick_main_scene->popup_centered();
@@ -4575,7 +4391,6 @@ bool EditorNode::ensure_main_scene(bool p_from_native) {
}
if (ResourceLoader::get_resource_type(main_scene) != "PackedScene") {
-
current_option = -1;
pick_main_scene->set_text(vformat(TTR("Selected scene '%s' is not a scene file, select a valid one?\nYou can change it later in \"Project Settings\" under the 'application' category."), main_scene));
pick_main_scene->popup_centered();
@@ -4603,7 +4418,6 @@ void EditorNode::set_current_tab(int p_tab) {
}
void EditorNode::_update_layouts_menu() {
-
editor_layouts->clear();
overridden_default_layout = -1;
@@ -4624,7 +4438,6 @@ void EditorNode::_update_layouts_menu() {
config.ptr()->get_sections(&layouts);
for (List<String>::Element *E = layouts.front(); E; E = E->next()) {
-
String layout = E->get();
if (layout == TTR("Default")) {
@@ -4637,11 +4450,8 @@ void EditorNode::_update_layouts_menu() {
}
void EditorNode::_layout_menu_option(int p_id) {
-
switch (p_id) {
-
case SETTINGS_LAYOUT_SAVE: {
-
current_option = p_id;
layout_dialog->set_title(TTR("Save Layout"));
layout_dialog->get_ok()->set_text(TTR("Save"));
@@ -4649,7 +4459,6 @@ void EditorNode::_layout_menu_option(int p_id) {
layout_dialog->set_name_line_enabled(true);
} break;
case SETTINGS_LAYOUT_DELETE: {
-
current_option = p_id;
layout_dialog->set_title(TTR("Delete Layout"));
layout_dialog->get_ok()->set_text(TTR("Delete"));
@@ -4657,12 +4466,10 @@ void EditorNode::_layout_menu_option(int p_id) {
layout_dialog->set_name_line_enabled(false);
} break;
case SETTINGS_LAYOUT_DEFAULT: {
-
_load_docks_from_config(default_layout, "docks");
_save_docks();
} break;
default: {
-
Ref<ConfigFile> config;
config.instance();
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
@@ -4677,10 +4484,10 @@ void EditorNode::_layout_menu_option(int p_id) {
}
void EditorNode::_scene_tab_script_edited(int p_tab) {
-
Ref<Script> script = editor_data.get_scene_root_script(p_tab);
- if (script.is_valid())
+ if (script.is_valid()) {
inspector_dock->edit_resource(script);
+ }
}
void EditorNode::_scene_tab_closed(int p_tab, int option) {
@@ -4731,7 +4538,6 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid()) {
-
if (scene_tabs->get_hovered_tab() >= 0) {
if (mb->get_button_index() == BUTTON_MIDDLE && mb->is_pressed()) {
_scene_tab_closed(scene_tabs->get_hovered_tab());
@@ -4742,7 +4548,6 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) {
}
}
if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
-
// context menu
scene_tabs_context_menu->clear();
scene_tabs_context_menu->set_size(Size2(1, 1));
@@ -4799,8 +4604,9 @@ void EditorNode::_scene_tab_changed(int p_tab) {
bool unsaved = (saved_version != editor_data.get_undo_redo().get_version());
- if (p_tab == editor_data.get_edited_scene())
+ if (p_tab == editor_data.get_edited_scene()) {
return; //pointless
+ }
uint64_t next_scene_version = editor_data.get_scene_version(p_tab);
@@ -4816,7 +4622,6 @@ void EditorNode::_scene_tab_changed(int p_tab) {
}
ToolButton *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) {
-
ToolButton *tb = memnew(ToolButton);
tb->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(bottom_panel_items.size()));
tb->set_text(p_text);
@@ -4837,19 +4642,17 @@ ToolButton *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) {
}
bool EditorNode::are_bottom_panels_hidden() const {
-
for (int i = 0; i < bottom_panel_items.size(); i++) {
- if (bottom_panel_items[i].button->is_pressed())
+ if (bottom_panel_items[i].button->is_pressed()) {
return false;
+ }
}
return true;
}
void EditorNode::hide_bottom_panel() {
-
for (int i = 0; i < bottom_panel_items.size(); i++) {
-
if (bottom_panel_items[i].control->is_visible()) {
_bottom_panel_switch(false, i);
break;
@@ -4858,9 +4661,7 @@ void EditorNode::hide_bottom_panel() {
}
void EditorNode::make_bottom_panel_item_visible(Control *p_item) {
-
for (int i = 0; i < bottom_panel_items.size(); i++) {
-
if (bottom_panel_items[i].control == p_item) {
_bottom_panel_switch(true, i);
break;
@@ -4869,9 +4670,7 @@ void EditorNode::make_bottom_panel_item_visible(Control *p_item) {
}
void EditorNode::raise_bottom_panel_item(Control *p_item) {
-
for (int i = 0; i < bottom_panel_items.size(); i++) {
-
if (bottom_panel_items[i].control == p_item) {
bottom_panel_items[i].button->raise();
SWAP(bottom_panel_items.write[i], bottom_panel_items.write[bottom_panel_items.size() - 1]);
@@ -4886,9 +4685,7 @@ void EditorNode::raise_bottom_panel_item(Control *p_item) {
}
void EditorNode::remove_bottom_panel_item(Control *p_item) {
-
for (int i = 0; i < bottom_panel_items.size(); i++) {
-
if (bottom_panel_items[i].control == p_item) {
if (p_item->is_visible_in_tree()) {
_bottom_panel_switch(false, i);
@@ -4908,7 +4705,6 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
}
void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
-
ERR_FAIL_INDEX(p_idx, bottom_panel_items.size());
if (bottom_panel_items[p_idx].control->is_visible() == p_enable) {
@@ -4917,7 +4713,6 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
if (p_enable) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
-
bottom_panel_items[i].button->set_pressed(i == p_idx);
bottom_panel_items[i].control->set_visible(i == p_idx);
}
@@ -4956,7 +4751,6 @@ bool EditorNode::get_docks_visible() const {
}
void EditorNode::_toggle_distraction_free_mode() {
-
if (EditorSettings::get_singleton()->get("interface/editor/separate_distraction_mode")) {
int screen = -1;
for (int i = 0; i < editor_table.size(); i++) {
@@ -4979,7 +4773,6 @@ void EditorNode::_toggle_distraction_free_mode() {
}
void EditorNode::set_distraction_free_mode(bool p_enter) {
-
distraction_free->set_pressed(p_enter);
if (p_enter) {
@@ -4991,7 +4784,7 @@ void EditorNode::set_distraction_free_mode(bool p_enter) {
}
}
-bool EditorNode::get_distraction_free_mode() const {
+bool EditorNode::is_distraction_free_mode_enabled() const {
return distraction_free->is_pressed();
}
@@ -5002,7 +4795,6 @@ void EditorNode::add_control_to_dock(DockSlot p_slot, Control *p_control) {
}
void EditorNode::remove_control_from_dock(Control *p_control) {
-
Control *dock = nullptr;
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
if (p_control->get_parent() == dock_slot[i]) {
@@ -5018,7 +4810,6 @@ void EditorNode::remove_control_from_dock(Control *p_control) {
}
Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) {
-
Control *drag_control = memnew(Control);
TextureRect *drag_preview = memnew(TextureRect);
Label *label = memnew(Label);
@@ -5134,8 +4925,9 @@ void EditorNode::add_tool_submenu_item(const String &p_name, PopupMenu *p_submen
void EditorNode::remove_tool_menu_item(const String &p_name) {
for (int i = 0; i < tool_menu->get_item_count(); i++) {
- if (tool_menu->get_item_id(i) != TOOLS_CUSTOM)
+ if (tool_menu->get_item_id(i) != TOOLS_CUSTOM) {
continue;
+ }
if (tool_menu->get_item_text(i) == p_name) {
if (tool_menu->get_item_submenu(i) != "") {
@@ -5167,7 +4959,6 @@ void EditorNode::_global_menu_new_window(const Variant &p_tag) {
}
void EditorNode::_dropped_files(const Vector<String> &p_files, int p_screen) {
-
String to_path = ProjectSettings::get_singleton()->globalize_path(get_filesystem_dock()->get_selected_path());
_add_dropped_files_recursive(p_files, to_path);
@@ -5176,17 +4967,14 @@ void EditorNode::_dropped_files(const Vector<String> &p_files, int p_screen) {
}
void EditorNode::_add_dropped_files_recursive(const Vector<String> &p_files, String to_path) {
-
DirAccessRef dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
Vector<String> just_copy = String("ttf,otf").split(",");
for (int i = 0; i < p_files.size(); i++) {
-
String from = p_files[i];
String to = to_path.plus_file(from.get_file());
if (dir->dir_exists(from)) {
-
Vector<String> sub_files;
DirAccessRef sub_dir = DirAccess::open(from);
@@ -5219,19 +5007,16 @@ void EditorNode::_add_dropped_files_recursive(const Vector<String> &p_files, Str
}
void EditorNode::_file_access_close_error_notify(const String &p_str) {
-
add_io_error("Unable to write to file '" + p_str + "', file in use, locked or lacking permissions.");
}
void EditorNode::reload_scene(const String &p_path) {
-
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
List<Ref<Resource>> cached;
ResourceCache::get_cached_resources(&cached);
List<Ref<Resource>> to_clear; //clear internal resources from previous scene from being used
for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) {
-
if (E->get()->get_path().begins_with(p_path + "::")) { //subresources of existing scene
to_clear.push_back(E->get());
}
@@ -5245,7 +5030,6 @@ void EditorNode::reload_scene(const String &p_path) {
int scene_idx = -1;
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
-
if (editor_data.get_scene_path(i) == p_path) {
scene_idx = i;
break;
@@ -5284,7 +5068,6 @@ void EditorNode::reload_scene(const String &p_path) {
int EditorNode::plugin_init_callback_count = 0;
void EditorNode::add_plugin_init_callback(EditorPluginInitializeCallback p_callback) {
-
ERR_FAIL_COND(plugin_init_callback_count == MAX_INIT_CALLBACKS);
plugin_init_callbacks[plugin_init_callback_count++] = p_callback;
@@ -5295,7 +5078,6 @@ EditorPluginInitializeCallback EditorNode::plugin_init_callbacks[EditorNode::MAX
int EditorNode::build_callback_count = 0;
void EditorNode::add_build_callback(EditorBuildCallback p_callback) {
-
ERR_FAIL_COND(build_callback_count == MAX_INIT_CALLBACKS);
build_callbacks[build_callback_count++] = p_callback;
@@ -5304,7 +5086,6 @@ void EditorNode::add_build_callback(EditorBuildCallback p_callback) {
EditorBuildCallback EditorNode::build_callbacks[EditorNode::MAX_BUILD_CALLBACKS];
bool EditorNode::call_build() {
-
bool builds_successful = true;
for (int i = 0; i < build_callback_count && builds_successful; i++) {
@@ -5323,13 +5104,11 @@ bool EditorNode::call_build() {
}
void EditorNode::_inherit_imported(const String &p_action) {
-
open_imported->hide();
load_scene(open_import_request, true, true);
}
void EditorNode::_open_imported() {
-
load_scene(open_import_request, true, false, true, true);
}
@@ -5349,7 +5128,6 @@ bool EditorNode::is_editor_dimmed() const {
}
void EditorNode::open_export_template_manager() {
-
export_template_manager->popup_manager();
}
@@ -5362,7 +5140,6 @@ void EditorNode::remove_resource_conversion_plugin(const Ref<EditorResourceConve
}
Vector<Ref<EditorResourceConversionPlugin>> EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) {
-
Vector<Ref<EditorResourceConversionPlugin>> ret;
for (int i = 0; i < resource_conversion_plugins.size(); i++) {
@@ -5375,12 +5152,10 @@ Vector<Ref<EditorResourceConversionPlugin>> EditorNode::find_resource_conversion
}
void EditorNode::_bottom_panel_raise_toggled(bool p_pressed) {
-
top_split->set_visible(!p_pressed);
}
void EditorNode::_update_video_driver_color() {
-
// TODO: Probably should de-hardcode this and add to editor settings.
if (video_driver->get_text() == "GLES2") {
video_driver->add_theme_color_override("font_color", Color::hex(0x5586a4ff));
@@ -5390,7 +5165,6 @@ void EditorNode::_update_video_driver_color() {
}
void EditorNode::_video_driver_selected(int p_which) {
-
String driver = video_driver->get_item_metadata(p_which);
String current = ""; //OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver());
@@ -5414,33 +5188,30 @@ void EditorNode::_resource_saved(RES p_resource, const String &p_path) {
}
void EditorNode::_resource_loaded(RES p_resource, const String &p_path) {
-
singleton->editor_folding.load_resource_folding(p_resource, p_path);
}
void EditorNode::_feature_profile_changed() {
-
Ref<EditorFeatureProfile> profile = feature_profile_manager->get_current_profile();
TabContainer *import_tabs = cast_to<TabContainer>(import_dock->get_parent());
TabContainer *node_tabs = cast_to<TabContainer>(node_dock->get_parent());
TabContainer *fs_tabs = cast_to<TabContainer>(filesystem_dock->get_parent());
if (profile.is_valid()) {
-
import_tabs->set_tab_hidden(import_dock->get_index(), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_IMPORT_DOCK));
node_tabs->set_tab_hidden(node_dock->get_index(), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_NODE_DOCK));
fs_tabs->set_tab_hidden(filesystem_dock->get_index(), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_FILESYSTEM_DOCK));
main_editor_buttons[EDITOR_3D]->set_visible(!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D));
main_editor_buttons[EDITOR_SCRIPT]->set_visible(!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT));
- if (StreamPeerSSL::is_available())
+ if (StreamPeerSSL::is_available()) {
main_editor_buttons[EDITOR_ASSETLIB]->set_visible(!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_ASSET_LIB));
+ }
if ((profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D) && singleton->main_editor_buttons[EDITOR_3D]->is_pressed()) ||
(profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT) && singleton->main_editor_buttons[EDITOR_SCRIPT]->is_pressed()) ||
(StreamPeerSSL::is_available() && profile->is_feature_disabled(EditorFeatureProfile::FEATURE_ASSET_LIB) && singleton->main_editor_buttons[EDITOR_ASSETLIB]->is_pressed())) {
_editor_select(EDITOR_2D);
}
} else {
-
import_tabs->set_tab_hidden(import_dock->get_index(), false);
node_tabs->set_tab_hidden(node_dock->get_index(), false);
fs_tabs->set_tab_hidden(filesystem_dock->get_index(), false);
@@ -5449,15 +5220,15 @@ void EditorNode::_feature_profile_changed() {
filesystem_dock->set_visible(true);
main_editor_buttons[EDITOR_3D]->set_visible(true);
main_editor_buttons[EDITOR_SCRIPT]->set_visible(true);
- if (StreamPeerSSL::is_available())
+ if (StreamPeerSSL::is_available()) {
main_editor_buttons[EDITOR_ASSETLIB]->set_visible(true);
+ }
}
_update_dock_slots_visibility();
}
void EditorNode::_bind_methods() {
-
ClassDB::bind_method("_editor_select", &EditorNode::_editor_select);
ClassDB::bind_method("_node_renamed", &EditorNode::_node_renamed);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
@@ -5501,7 +5272,6 @@ void EditorNode::_bind_methods() {
}
static Node *_resource_get_edited_scene() {
-
return EditorNode::get_singleton()->get_edited_scene();
}
@@ -5511,7 +5281,6 @@ void EditorNode::_print_handler(void *p_this, const String &p_string, bool p_err
}
static void _execute_thread(void *p_ud) {
-
EditorNode::ExecuteThreadArgs *eta = (EditorNode::ExecuteThreadArgs *)p_ud;
Error err = OS::get_singleton()->execute(eta->path, eta->args, true, nullptr, &eta->output, &eta->exitcode, true, &eta->execute_output_mutex);
print_verbose("Thread exit status: " + itos(eta->exitcode));
@@ -5523,7 +5292,6 @@ static void _execute_thread(void *p_ud) {
}
int EditorNode::execute_and_show_output(const String &p_title, const String &p_path, const List<String> &p_arguments, bool p_close_on_ok, bool p_close_on_errors) {
-
execute_output_dialog->set_title(p_title);
execute_output_dialog->get_ok()->set_disabled(true);
execute_outputs->clear();
@@ -5572,7 +5340,6 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
}
EditorNode::EditorNode() {
-
Input::get_singleton()->set_use_accumulated_input(true);
Resource::_get_local_scene_func = _resource_get_edited_scene;
@@ -5592,7 +5359,6 @@ EditorNode::EditorNode() {
Input *id = Input::get_singleton();
if (id) {
-
bool found_touchscreen = false;
for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) {
if (DisplayServer::get_singleton()->screen_is_touchscreen(i)) {
@@ -5621,8 +5387,9 @@ EditorNode::EditorNode() {
TranslationServer::get_singleton()->set_enabled(false);
// load settings
- if (!EditorSettings::get_singleton())
+ if (!EditorSettings::get_singleton()) {
EditorSettings::create();
+ }
FileAccess::set_backup_save(EDITOR_GET("filesystem/on_save/safe_save_on_backup_then_rename"));
@@ -6249,8 +6016,11 @@ EditorNode::EditorNode() {
left_menu_hb->add_child(settings_menu);
p = settings_menu->get_popup();
-
+#ifdef OSX_ENABLED
+ p->add_shortcut(ED_SHORTCUT("editor/editor_settings", TTR("Editor Settings..."), KEY_MASK_CMD + KEY_COMMA), SETTINGS_PREFERENCES);
+#else
p->add_shortcut(ED_SHORTCUT("editor/editor_settings", TTR("Editor Settings...")), SETTINGS_PREFERENCES);
+#endif
p->add_separator();
editor_layouts = memnew(PopupMenu);
@@ -6494,8 +6264,9 @@ EditorNode::EditorNode() {
default_layout->set_value(docks_section, "dock_4", "FileSystem");
default_layout->set_value(docks_section, "dock_5", "Inspector,Node");
- for (int i = 0; i < vsplits.size(); i++)
+ for (int i = 0; i < vsplits.size(); i++) {
default_layout->set_value(docks_section, "dock_split_" + itos(i + 1), 0);
+ }
default_layout->set_value(docks_section, "dock_hsplit_1", 0);
default_layout->set_value(docks_section, "dock_hsplit_2", 70 * EDSCALE);
default_layout->set_value(docks_section, "dock_hsplit_3", -70 * EDSCALE);
@@ -6696,8 +6467,9 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(MeshEditorPlugin(this)));
add_editor_plugin(memnew(MaterialEditorPlugin(this)));
- for (int i = 0; i < EditorPlugins::get_plugin_count(); i++)
+ for (int i = 0; i < EditorPlugins::get_plugin_count(); i++) {
add_editor_plugin(EditorPlugins::create(i, this));
+ }
for (int i = 0; i < plugin_init_callback_count; i++) {
plugin_init_callbacks[i]();
@@ -6798,6 +6570,7 @@ EditorNode::EditorNode() {
gui_base->add_child(load_error_dialog);
execute_outputs = memnew(RichTextLabel);
+ execute_outputs->set_selection_enabled(true);
execute_output_dialog = memnew(AcceptDialog);
execute_output_dialog->add_child(execute_outputs);
execute_output_dialog->set_title("");
@@ -6817,8 +6590,9 @@ EditorNode::EditorNode() {
pick_main_scene->get_ok()->set_text(TTR("Select"));
pick_main_scene->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SETTINGS_PICK_MAIN_SCENE));
- for (int i = 0; i < _init_callbacks.size(); i++)
+ for (int i = 0; i < _init_callbacks.size(); i++) {
_init_callbacks[i]();
+ }
editor_data.add_edited_scene(-1);
editor_data.set_edited_scene(0);
@@ -6864,7 +6638,6 @@ EditorNode::EditorNode() {
}
EditorNode::~EditorNode() {
-
EditorInspector::cleanup_plugins();
remove_print_handler(&print_handler);
@@ -6883,21 +6656,18 @@ EditorNode::~EditorNode() {
*/
void EditorPluginList::make_visible(bool p_visible) {
-
for (int i = 0; i < plugins_list.size(); i++) {
plugins_list[i]->make_visible(p_visible);
}
}
void EditorPluginList::edit(Object *p_object) {
-
for (int i = 0; i < plugins_list.size(); i++) {
plugins_list[i]->edit(p_object);
}
}
bool EditorPluginList::forward_gui_input(const Ref<InputEvent> &p_event) {
-
bool discard = false;
for (int i = 0; i < plugins_list.size(); i++) {
@@ -6926,28 +6696,24 @@ bool EditorPluginList::forward_spatial_gui_input(Camera3D *p_camera, const Ref<I
}
void EditorPluginList::forward_canvas_draw_over_viewport(Control *p_overlay) {
-
for (int i = 0; i < plugins_list.size(); i++) {
plugins_list[i]->forward_canvas_draw_over_viewport(p_overlay);
}
}
void EditorPluginList::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
-
for (int i = 0; i < plugins_list.size(); i++) {
plugins_list[i]->forward_canvas_force_draw_over_viewport(p_overlay);
}
}
void EditorPluginList::forward_spatial_draw_over_viewport(Control *p_overlay) {
-
for (int i = 0; i < plugins_list.size(); i++) {
plugins_list[i]->forward_spatial_draw_over_viewport(p_overlay);
}
}
void EditorPluginList::forward_spatial_force_draw_over_viewport(Control *p_overlay) {
-
for (int i = 0; i < plugins_list.size(); i++) {
plugins_list[i]->forward_spatial_force_draw_over_viewport(p_overlay);
}
diff --git a/editor/editor_node.h b/editor/editor_node.h
index b39a3bbfd0..7c9cf44d6c 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -89,7 +89,6 @@ class Window;
class SubViewport;
class EditorNode : public Node {
-
GDCLASS(EditorNode, Node);
public:
@@ -548,8 +547,9 @@ private:
static void _dependency_error_report(void *ud, const String &p_path, const String &p_dep, const String &p_type) {
EditorNode *en = (EditorNode *)ud;
- if (!en->dependency_errors.has(p_path))
+ if (!en->dependency_errors.has(p_path)) {
en->dependency_errors[p_path] = Set<String>();
+ }
en->dependency_errors[p_path].insert(p_dep + "::" + p_type);
}
@@ -693,7 +693,7 @@ public:
bool get_docks_visible() const;
void set_distraction_free_mode(bool p_enter);
- bool get_distraction_free_mode() const;
+ bool is_distraction_free_mode_enabled() const;
void add_control_to_dock(DockSlot p_slot, Control *p_control);
void remove_control_from_dock(Control *p_control);
@@ -802,10 +802,11 @@ public:
static void progress_end_task_bg(const String &p_task);
void save_scene_to_path(String p_file, bool p_with_preview = true) {
- if (p_with_preview)
+ if (p_with_preview) {
_save_scene_with_preview(p_file);
- else
+ } else {
_save_scene(p_file);
+ }
}
bool is_scene_in_use(const String &p_path);
@@ -868,7 +869,6 @@ public:
};
struct EditorProgress {
-
String task;
bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); }
EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false) {
@@ -909,7 +909,6 @@ public:
};
struct EditorProgressBG {
-
String task;
void step(int p_step = -1) { EditorNode::progress_task_step_bg(task, p_step); }
EditorProgressBG(const String &p_task, const String &p_label, int p_amount) {
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 804ad62bbb..c249974f99 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -34,25 +34,28 @@
#include "editor_scale.h"
void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) {
-
- if (p_depth > 8)
+ if (p_depth > 8) {
return;
+ }
List<PropertyInfo> pinfo;
p_obj->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
-
- if (!(E->get().usage & PROPERTY_USAGE_EDITOR))
+ if (!(E->get().usage & PROPERTY_USAGE_EDITOR)) {
continue;
- if (E->get().hint != PROPERTY_HINT_RESOURCE_TYPE)
+ }
+ if (E->get().hint != PROPERTY_HINT_RESOURCE_TYPE) {
continue;
+ }
Variant value = p_obj->get(E->get().name);
- if (value.get_type() != Variant::OBJECT)
+ if (value.get_type() != Variant::OBJECT) {
continue;
+ }
Object *obj = value;
- if (!obj)
+ if (!obj) {
continue;
+ }
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(obj);
@@ -66,10 +69,10 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) {
}
void EditorPath::_about_to_show() {
-
Object *obj = ObjectDB::get_instance(history->get_path_object(history->get_path_size() - 1));
- if (!obj)
+ if (!obj) {
return;
+ }
objects.clear();
get_popup()->clear();
@@ -83,37 +86,39 @@ void EditorPath::_about_to_show() {
}
void EditorPath::update_path() {
-
for (int i = 0; i < history->get_path_size(); i++) {
-
Object *obj = ObjectDB::get_instance(history->get_path_object(i));
- if (!obj)
+ if (!obj) {
continue;
+ }
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(obj);
- if (icon.is_valid())
+ if (icon.is_valid()) {
set_icon(icon);
+ }
if (i == history->get_path_size() - 1) {
String name;
if (Object::cast_to<Resource>(obj)) {
-
Resource *r = Object::cast_to<Resource>(obj);
- if (r->get_path().is_resource_file())
+ if (r->get_path().is_resource_file()) {
name = r->get_path().get_file();
- else
+ } else {
name = r->get_name();
+ }
- if (name == "")
+ if (name == "") {
name = r->get_class();
- } else if (obj->is_class("EditorDebuggerRemoteObject"))
+ }
+ } else if (obj->is_class("EditorDebuggerRemoteObject")) {
name = obj->call("get_title");
- else if (Object::cast_to<Node>(obj))
+ } else if (Object::cast_to<Node>(obj)) {
name = Object::cast_to<Node>(obj)->get_name();
- else if (Object::cast_to<Resource>(obj) && Object::cast_to<Resource>(obj)->get_name() != "")
+ } else if (Object::cast_to<Resource>(obj) && Object::cast_to<Resource>(obj)->get_name() != "") {
name = Object::cast_to<Resource>(obj)->get_name();
- else
+ } else {
name = obj->get_class();
+ }
set_text(" " + name); // An extra space so the text is not too close of the icon.
set_tooltip(obj->get_class());
@@ -122,18 +127,17 @@ void EditorPath::update_path() {
}
void EditorPath::_id_pressed(int p_idx) {
-
ERR_FAIL_INDEX(p_idx, objects.size());
Object *obj = ObjectDB::get_instance(objects[p_idx]);
- if (!obj)
+ if (!obj) {
return;
+ }
EditorNode::get_singleton()->push_item(obj);
}
void EditorPath::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
update_path();
@@ -145,7 +149,6 @@ void EditorPath::_bind_methods() {
}
EditorPath::EditorPath(EditorHistory *p_history) {
-
history = p_history;
set_clip_text(true);
set_text_align(ALIGN_LEFT);
diff --git a/editor/editor_path.h b/editor/editor_path.h
index b0ffc487ac..01ba25ab69 100644
--- a/editor/editor_path.h
+++ b/editor/editor_path.h
@@ -35,7 +35,6 @@
#include "scene/gui/menu_button.h"
class EditorPath : public MenuButton {
-
GDCLASS(EditorPath, MenuButton);
EditorHistory *history;
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 746ebc8292..6d93e92555 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -44,7 +44,6 @@
#include "servers/rendering_server.h"
Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_size) {
-
Vector<Ref<Mesh>> meshes;
for (int i = 0; i < p_meshes.size(); i++) {
@@ -61,7 +60,6 @@ Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_
}
Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size) {
-
int size = p_preview_size;
RID scenario = RS::get_singleton()->scenario_create();
@@ -89,7 +87,6 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
Vector<Ref<Texture2D>> textures;
for (int i = 0; i < p_meshes.size(); i++) {
-
Ref<Mesh> mesh = p_meshes[i];
if (!mesh.is_valid()) {
textures.push_back(Ref<Texture2D>());
@@ -156,17 +153,14 @@ void EditorInterface::set_main_screen_editor(const String &p_name) {
}
Control *EditorInterface::get_editor_viewport() {
-
return EditorNode::get_singleton()->get_viewport();
}
void EditorInterface::edit_resource(const Ref<Resource> &p_resource) {
-
EditorNode::get_singleton()->edit_resource(p_resource);
}
void EditorInterface::open_scene_from_path(const String &scene_path) {
-
if (EditorNode::get_singleton()->is_changing_scene()) {
return;
}
@@ -175,7 +169,6 @@ void EditorInterface::open_scene_from_path(const String &scene_path) {
}
void EditorInterface::reload_scene_from_path(const String &scene_path) {
-
if (EditorNode::get_singleton()->is_changing_scene()) {
return;
}
@@ -188,14 +181,14 @@ Node *EditorInterface::get_edited_scene_root() {
}
Array EditorInterface::get_open_scenes() const {
-
Array ret;
Vector<EditorData::EditedScene> scenes = EditorNode::get_editor_data().get_edited_scenes();
int scns_amount = scenes.size();
for (int idx_scn = 0; idx_scn < scns_amount; idx_scn++) {
- if (scenes[idx_scn].root == nullptr)
+ if (scenes[idx_scn].root == nullptr) {
continue;
+ }
ret.push_back(scenes[idx_scn].root->get_filename());
}
return ret;
@@ -218,7 +211,6 @@ String EditorInterface::get_current_path() const {
}
void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property) {
-
EditorNode::get_singleton()->push_item(p_obj, p_for_property);
}
@@ -243,7 +235,6 @@ EditorResourcePreview *EditorInterface::get_resource_previewer() {
}
Control *EditorInterface::get_base_control() {
-
return EditorNode::get_singleton()->get_gui_base();
}
@@ -260,17 +251,18 @@ EditorInspector *EditorInterface::get_inspector() const {
}
Error EditorInterface::save_scene() {
- if (!get_edited_scene_root())
+ if (!get_edited_scene_root()) {
return ERR_CANT_CREATE;
- if (get_edited_scene_root()->get_filename() == String())
+ }
+ if (get_edited_scene_root()->get_filename() == String()) {
return ERR_CANT_CREATE;
+ }
save_scene_as(get_edited_scene_root()->get_filename());
return OK;
}
void EditorInterface::save_scene_as(const String &p_scene, bool p_with_preview) {
-
EditorNode::get_singleton()->save_scene_to_path(p_scene, p_with_preview);
}
@@ -278,10 +270,13 @@ void EditorInterface::set_distraction_free_mode(bool p_enter) {
EditorNode::get_singleton()->set_distraction_free_mode(p_enter);
}
+bool EditorInterface::is_distraction_free_mode_enabled() const {
+ return EditorNode::get_singleton()->is_distraction_free_mode_enabled();
+}
+
EditorInterface *EditorInterface::singleton = nullptr;
void EditorInterface::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property"), &EditorInterface::inspect_object, DEFVAL(String()));
ClassDB::bind_method(D_METHOD("get_selection"), &EditorInterface::get_selection);
ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorInterface::get_editor_settings);
@@ -311,6 +306,9 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_main_screen_editor", "name"), &EditorInterface::set_main_screen_editor);
ClassDB::bind_method(D_METHOD("set_distraction_free_mode", "enter"), &EditorInterface::set_distraction_free_mode);
+ ClassDB::bind_method(D_METHOD("is_distraction_free_mode_enabled"), &EditorInterface::is_distraction_free_mode_enabled);
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distraction_free_mode"), "set_distraction_free_mode", "is_distraction_free_mode_enabled");
}
EditorInterface::EditorInterface() {
@@ -319,12 +317,10 @@ EditorInterface::EditorInterface() {
///////////////////////////////////////////
void EditorPlugin::add_custom_type(const String &p_type, const String &p_base, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon) {
-
EditorNode::get_editor_data().add_custom_type(p_type, p_base, p_script, p_icon);
}
void EditorPlugin::remove_custom_type(const String &p_type) {
-
EditorNode::get_editor_data().remove_custom_type(p_type);
}
@@ -342,19 +338,16 @@ ToolButton *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const
}
void EditorPlugin::add_control_to_dock(DockSlot p_slot, Control *p_control) {
-
ERR_FAIL_NULL(p_control);
EditorNode::get_singleton()->add_control_to_dock(EditorNode::DockSlot(p_slot), p_control);
}
void EditorPlugin::remove_control_from_docks(Control *p_control) {
-
ERR_FAIL_NULL(p_control);
EditorNode::get_singleton()->remove_control_from_dock(p_control);
}
void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) {
-
ERR_FAIL_NULL(p_control);
EditorNode::get_singleton()->remove_bottom_panel_item(p_control);
}
@@ -363,69 +356,56 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C
ERR_FAIL_NULL(p_control);
switch (p_location) {
-
case CONTAINER_TOOLBAR: {
-
EditorNode::get_menu_hb()->add_child(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_MENU: {
-
Node3DEditor::get_singleton()->add_control_to_menu_panel(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_SIDE_LEFT: {
-
Node3DEditor::get_singleton()->get_palette_split()->add_child(p_control);
Node3DEditor::get_singleton()->get_palette_split()->move_child(p_control, 0);
} break;
case CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: {
-
Node3DEditor::get_singleton()->get_palette_split()->add_child(p_control);
Node3DEditor::get_singleton()->get_palette_split()->move_child(p_control, 1);
} break;
case CONTAINER_SPATIAL_EDITOR_BOTTOM: {
-
Node3DEditor::get_singleton()->get_shader_split()->add_child(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_MENU: {
-
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_SIDE_LEFT: {
-
CanvasItemEditor::get_singleton()->get_palette_split()->add_child(p_control);
CanvasItemEditor::get_singleton()->get_palette_split()->move_child(p_control, 0);
} break;
case CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: {
-
CanvasItemEditor::get_singleton()->get_palette_split()->add_child(p_control);
CanvasItemEditor::get_singleton()->get_palette_split()->move_child(p_control, 1);
} break;
case CONTAINER_CANVAS_EDITOR_BOTTOM: {
-
CanvasItemEditor::get_singleton()->get_bottom_split()->add_child(p_control);
} break;
case CONTAINER_PROPERTY_EDITOR_BOTTOM: {
-
EditorNode::get_singleton()->get_inspector_dock_addon_area()->add_child(p_control);
} break;
case CONTAINER_PROJECT_SETTING_TAB_LEFT: {
-
ProjectSettingsEditor::get_singleton()->get_tabs()->add_child(p_control);
ProjectSettingsEditor::get_singleton()->get_tabs()->move_child(p_control, 0);
} break;
case CONTAINER_PROJECT_SETTING_TAB_RIGHT: {
-
ProjectSettingsEditor::get_singleton()->get_tabs()->add_child(p_control);
ProjectSettingsEditor::get_singleton()->get_tabs()->move_child(p_control, 1);
@@ -437,52 +417,42 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati
ERR_FAIL_NULL(p_control);
switch (p_location) {
-
case CONTAINER_TOOLBAR: {
-
EditorNode::get_menu_hb()->remove_child(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_MENU: {
-
Node3DEditor::get_singleton()->remove_control_from_menu_panel(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_SIDE_LEFT:
case CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: {
-
Node3DEditor::get_singleton()->get_palette_split()->remove_child(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_BOTTOM: {
-
Node3DEditor::get_singleton()->get_shader_split()->remove_child(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_MENU: {
-
CanvasItemEditor::get_singleton()->remove_control_from_menu_panel(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_SIDE_LEFT:
case CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: {
-
CanvasItemEditor::get_singleton()->get_palette_split()->remove_child(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_BOTTOM: {
-
CanvasItemEditor::get_singleton()->get_bottom_split()->remove_child(p_control);
} break;
case CONTAINER_PROPERTY_EDITOR_BOTTOM: {
-
EditorNode::get_singleton()->get_inspector_dock_addon_area()->remove_child(p_control);
} break;
case CONTAINER_PROJECT_SETTING_TAB_LEFT:
case CONTAINER_PROJECT_SETTING_TAB_RIGHT: {
-
ProjectSettingsEditor::get_singleton()->get_tabs()->remove_child(p_control);
} break;
@@ -521,9 +491,9 @@ void EditorPlugin::notify_scene_changed(const Node *scn_root) {
}
void EditorPlugin::notify_main_screen_changed(const String &screen_name) {
-
- if (screen_name == last_main_screen_name)
+ if (screen_name == last_main_screen_name) {
return;
+ }
emit_signal("main_screen_changed", screen_name);
last_main_screen_name = screen_name;
@@ -538,7 +508,6 @@ void EditorPlugin::notify_resource_saved(const Ref<Resource> &p_resource) {
}
bool EditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
-
if (get_script_instance() && get_script_instance()->has_method("forward_canvas_gui_input")) {
return get_script_instance()->call("forward_canvas_gui_input", p_event);
}
@@ -546,14 +515,12 @@ bool EditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
}
void EditorPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) {
-
if (get_script_instance() && get_script_instance()->has_method("forward_canvas_draw_over_viewport")) {
get_script_instance()->call("forward_canvas_draw_over_viewport", p_overlay);
}
}
void EditorPlugin::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
-
if (get_script_instance() && get_script_instance()->has_method("forward_canvas_force_draw_over_viewport")) {
get_script_instance()->call("forward_canvas_force_draw_over_viewport", p_overlay);
}
@@ -561,7 +528,6 @@ void EditorPlugin::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
// Updates the overlays of the 2D viewport or, if in 3D mode, of every 3D viewport.
int EditorPlugin::update_overlays() const {
-
if (Node3DEditor::get_singleton()->is_visible()) {
int count = 0;
for (uint32_t i = 0; i < Node3DEditor::VIEWPORTS_COUNT; i++) {
@@ -580,7 +546,6 @@ int EditorPlugin::update_overlays() const {
}
bool EditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
-
if (get_script_instance() && get_script_instance()->has_method("forward_spatial_gui_input")) {
return get_script_instance()->call("forward_spatial_gui_input", p_camera, p_event);
}
@@ -589,51 +554,48 @@ bool EditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<Input
}
void EditorPlugin::forward_spatial_draw_over_viewport(Control *p_overlay) {
-
if (get_script_instance() && get_script_instance()->has_method("forward_spatial_draw_over_viewport")) {
get_script_instance()->call("forward_spatial_draw_over_viewport", p_overlay);
}
}
void EditorPlugin::forward_spatial_force_draw_over_viewport(Control *p_overlay) {
-
if (get_script_instance() && get_script_instance()->has_method("forward_spatial_force_draw_over_viewport")) {
get_script_instance()->call("forward_spatial_force_draw_over_viewport", p_overlay);
}
}
-String EditorPlugin::get_name() const {
+String EditorPlugin::get_name() const {
if (get_script_instance() && get_script_instance()->has_method("get_plugin_name")) {
return get_script_instance()->call("get_plugin_name");
}
return String();
}
-const Ref<Texture2D> EditorPlugin::get_icon() const {
+const Ref<Texture2D> EditorPlugin::get_icon() const {
if (get_script_instance() && get_script_instance()->has_method("get_plugin_icon")) {
return get_script_instance()->call("get_plugin_icon");
}
return Ref<Texture2D>();
}
-bool EditorPlugin::has_main_screen() const {
+bool EditorPlugin::has_main_screen() const {
if (get_script_instance() && get_script_instance()->has_method("has_main_screen")) {
return get_script_instance()->call("has_main_screen");
}
return false;
}
-void EditorPlugin::make_visible(bool p_visible) {
+void EditorPlugin::make_visible(bool p_visible) {
if (get_script_instance() && get_script_instance()->has_method("make_visible")) {
get_script_instance()->call("make_visible", p_visible);
}
}
void EditorPlugin::edit(Object *p_object) {
-
if (get_script_instance() && get_script_instance()->has_method("edit")) {
if (p_object->is_class("Resource")) {
get_script_instance()->call("edit", Ref<Resource>(Object::cast_to<Resource>(p_object)));
@@ -644,15 +606,14 @@ void EditorPlugin::edit(Object *p_object) {
}
bool EditorPlugin::handles(Object *p_object) const {
-
if (get_script_instance() && get_script_instance()->has_method("handles")) {
return get_script_instance()->call("handles", p_object);
}
return false;
}
-Dictionary EditorPlugin::get_state() const {
+Dictionary EditorPlugin::get_state() const {
if (get_script_instance() && get_script_instance()->has_method("get_state")) {
return get_script_instance()->call("get_state");
}
@@ -661,14 +622,12 @@ Dictionary EditorPlugin::get_state() const {
}
void EditorPlugin::set_state(const Dictionary &p_state) {
-
if (get_script_instance() && get_script_instance()->has_method("set_state")) {
get_script_instance()->call("set_state", p_state);
}
}
void EditorPlugin::clear() {
-
if (get_script_instance() && get_script_instance()->has_method("clear")) {
get_script_instance()->call("clear");
}
@@ -676,7 +635,6 @@ void EditorPlugin::clear() {
// if editor references external resources/scenes, save them
void EditorPlugin::save_external_data() {
-
if (get_script_instance() && get_script_instance()->has_method("save_external_data")) {
get_script_instance()->call("save_external_data");
}
@@ -684,22 +642,21 @@ void EditorPlugin::save_external_data() {
// if changes are pending in editor, apply them
void EditorPlugin::apply_changes() {
-
if (get_script_instance() && get_script_instance()->has_method("apply_changes")) {
get_script_instance()->call("apply_changes");
}
}
void EditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
-
if (get_script_instance() && get_script_instance()->has_method("get_breakpoints")) {
PackedStringArray arr = get_script_instance()->call("get_breakpoints");
- for (int i = 0; i < arr.size(); i++)
+ for (int i = 0; i < arr.size(); i++) {
p_breakpoints->push_back(arr[i]);
+ }
}
}
-bool EditorPlugin::get_remove_list(List<Node *> *p_list) {
+bool EditorPlugin::get_remove_list(List<Node *> *p_list) {
return false;
}
@@ -777,21 +734,18 @@ void EditorPlugin::disable_plugin() {
}
void EditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
-
if (get_script_instance() && get_script_instance()->has_method("set_window_layout")) {
get_script_instance()->call("set_window_layout", p_layout);
}
}
void EditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {
-
if (get_script_instance() && get_script_instance()->has_method("get_window_layout")) {
get_script_instance()->call("get_window_layout", p_layout);
}
}
bool EditorPlugin::build() {
-
if (get_script_instance() && get_script_instance()->has_method("build")) {
return get_script_instance()->call("build");
}
@@ -800,17 +754,14 @@ bool EditorPlugin::build() {
}
void EditorPlugin::queue_save_layout() const {
-
EditorNode::get_singleton()->save_layout();
}
void EditorPlugin::make_bottom_panel_item_visible(Control *p_item) {
-
EditorNode::get_singleton()->make_bottom_panel_item_visible(p_item);
}
void EditorPlugin::hide_bottom_panel() {
-
EditorNode::get_singleton()->hide_bottom_panel();
}
@@ -823,7 +774,6 @@ ScriptCreateDialog *EditorPlugin::get_script_create_dialog() {
}
void EditorPlugin::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("add_control_to_container", "container", "control"), &EditorPlugin::add_control_to_container);
ClassDB::bind_method(D_METHOD("add_control_to_bottom_panel", "control", "title"), &EditorPlugin::add_control_to_bottom_panel);
ClassDB::bind_method(D_METHOD("add_control_to_dock", "slot", "control"), &EditorPlugin::add_control_to_dock);
@@ -913,16 +863,6 @@ void EditorPlugin::_bind_methods() {
BIND_ENUM_CONSTANT(DOCK_SLOT_MAX);
}
-EditorPlugin::EditorPlugin() :
- undo_redo(nullptr),
- input_event_forwarding_always_enabled(false),
- force_draw_over_forwarding_enabled(false),
- last_main_screen_name("") {
-}
-
-EditorPlugin::~EditorPlugin() {
-}
-
EditorPluginCreateFunc EditorPlugins::creation_funcs[MAX_CREATE_FUNCS];
int EditorPlugins::creation_func_count = 0;
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 2ca96ceed2..aac36bfdfd 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -105,20 +105,20 @@ public:
void set_main_screen_editor(const String &p_name);
void set_distraction_free_mode(bool p_enter);
+ bool is_distraction_free_mode_enabled() const;
EditorInterface();
};
class EditorPlugin : public Node {
-
GDCLASS(EditorPlugin, Node);
friend class EditorData;
- UndoRedo *undo_redo;
+ UndoRedo *undo_redo = nullptr;
UndoRedo *_get_undo_redo() { return undo_redo; }
- bool input_event_forwarding_always_enabled;
- bool force_draw_over_forwarding_enabled;
+ bool input_event_forwarding_always_enabled = false;
+ bool force_draw_over_forwarding_enabled = false;
String last_main_screen_name;
@@ -242,8 +242,8 @@ public:
void enable_plugin();
void disable_plugin();
- EditorPlugin();
- virtual ~EditorPlugin();
+ EditorPlugin() {}
+ virtual ~EditorPlugin() {}
};
VARIANT_ENUM_CAST(EditorPlugin::CustomControlContainer);
@@ -252,7 +252,6 @@ VARIANT_ENUM_CAST(EditorPlugin::DockSlot);
typedef EditorPlugin *(*EditorPluginCreateFunc)(EditorNode *);
class EditorPlugins {
-
enum {
MAX_CREATE_FUNCS = 64
};
@@ -278,7 +277,6 @@ public:
}
static void add_create_func(EditorPluginCreateFunc p_func) {
-
ERR_FAIL_COND(creation_func_count >= MAX_CREATE_FUNCS);
creation_funcs[creation_func_count++] = p_func;
}
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 62a76786ae..b5f1133a9e 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -39,7 +39,6 @@
#include "scene/gui/margin_container.h"
void EditorPluginSettings::_notification(int p_what) {
-
if (p_what == NOTIFICATION_WM_FOCUS_IN) {
update_plugins();
} else if (p_what == Node::NOTIFICATION_READY) {
@@ -49,7 +48,6 @@ void EditorPluginSettings::_notification(int p_what) {
}
void EditorPluginSettings::update_plugins() {
-
plugin_list->clear();
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
@@ -70,12 +68,10 @@ void EditorPluginSettings::update_plugins() {
Vector<String> plugins;
while (d != String()) {
-
bool dir = da->current_is_dir();
String path = "res://addons/" + d + "/plugin.cfg";
if (dir && FileAccess::exists(path)) {
-
plugins.push_back(d);
}
@@ -88,7 +84,6 @@ void EditorPluginSettings::update_plugins() {
plugins.sort();
for (int i = 0; i < plugins.size(); i++) {
-
Ref<ConfigFile> cf;
cf.instance();
String path = "res://addons/" + plugins[i] + "/plugin.cfg";
@@ -151,9 +146,9 @@ void EditorPluginSettings::update_plugins() {
}
void EditorPluginSettings::_plugin_activity_changed() {
-
- if (updating)
+ if (updating) {
return;
+ }
TreeItem *ti = plugin_list->get_edited();
ERR_FAIL_COND(!ti);
@@ -178,8 +173,9 @@ void EditorPluginSettings::_create_clicked() {
void EditorPluginSettings::_cell_button_pressed(Object *p_item, int p_column, int p_id) {
TreeItem *item = Object::cast_to<TreeItem>(p_item);
- if (!item)
+ if (!item) {
return;
+ }
if (p_id == BUTTON_PLUGIN_EDIT) {
if (p_column == 4) {
String dir = item->get_metadata(0);
@@ -193,7 +189,6 @@ void EditorPluginSettings::_bind_methods() {
}
EditorPluginSettings::EditorPluginSettings() {
-
plugin_config_dialog = memnew(PluginConfigDialog);
plugin_config_dialog->config("");
add_child(plugin_config_dialog);
diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h
index 63a8395805..ceb00eb12f 100644
--- a/editor/editor_plugin_settings.h
+++ b/editor/editor_plugin_settings.h
@@ -38,7 +38,6 @@
#include "scene/gui/dialogs.h"
class EditorPluginSettings : public VBoxContainer {
-
GDCLASS(EditorPluginSettings, VBoxContainer);
enum {
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index c5772e0ea7..74267452e6 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -51,8 +51,9 @@ EditorPropertyNil::EditorPropertyNil() {
///////////////////// TEXT /////////////////////////
void EditorPropertyText::_text_entered(const String &p_string) {
- if (updating)
+ if (updating) {
return;
+ }
if (text->has_focus()) {
text->release_focus();
@@ -61,8 +62,9 @@ void EditorPropertyText::_text_entered(const String &p_string) {
}
void EditorPropertyText::_text_changed(const String &p_string) {
- if (updating)
+ if (updating) {
return;
+ }
if (string_name) {
emit_changed(get_edited_property(), StringName(p_string), "", true);
@@ -82,6 +84,7 @@ void EditorPropertyText::update_property() {
void EditorPropertyText::set_string_name(bool p_enabled) {
string_name = p_enabled;
}
+
void EditorPropertyText::set_placeholder(const String &p_string) {
text->set_placeholder(p_string);
}
@@ -112,7 +115,6 @@ void EditorPropertyMultilineText::_text_changed() {
}
void EditorPropertyMultilineText::_open_big_text() {
-
if (!big_text_dialog) {
big_text = memnew(TextEdit);
big_text->connect("text_changed", callable_mp(this, &EditorPropertyMultilineText::_big_text_changed));
@@ -172,9 +174,7 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() {
///////////////////// TEXT ENUM /////////////////////////
void EditorPropertyTextEnum::_option_selected(int p_which) {
-
if (string_name) {
-
emit_changed(get_edited_property(), StringName(options->get_item_text(p_which)));
} else {
emit_changed(get_edited_property(), options->get_item_text(p_which));
@@ -182,7 +182,6 @@ void EditorPropertyTextEnum::_option_selected(int p_which) {
}
void EditorPropertyTextEnum::update_property() {
-
String which = get_edited_object()->get(get_edited_property());
for (int i = 0; i < options->get_item_count(); i++) {
String t = options->get_item_text(i);
@@ -213,15 +212,15 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
add_focusable(options);
options->connect("item_selected", callable_mp(this, &EditorPropertyTextEnum::_option_selected));
}
+
///////////////////// PATH /////////////////////////
void EditorPropertyPath::_path_selected(const String &p_path) {
-
emit_changed(get_edited_property(), p_path);
update_property();
}
-void EditorPropertyPath::_path_pressed() {
+void EditorPropertyPath::_path_pressed() {
if (!dialog) {
dialog = memnew(EditorFileDialog);
dialog->connect("file_selected", callable_mp(this, &EditorPropertyPath::_path_selected));
@@ -257,33 +256,28 @@ void EditorPropertyPath::_path_pressed() {
}
void EditorPropertyPath::update_property() {
-
String full_path = get_edited_object()->get(get_edited_property());
path->set_text(full_path);
path->set_tooltip(full_path);
}
void EditorPropertyPath::setup(const Vector<String> &p_extensions, bool p_folder, bool p_global) {
-
extensions = p_extensions;
folder = p_folder;
global = p_global;
}
void EditorPropertyPath::set_save_mode() {
-
save_mode = true;
}
void EditorPropertyPath::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
path_edit->set_icon(get_theme_icon("Folder", "EditorIcons"));
}
}
void EditorPropertyPath::_path_focus_exited() {
-
_path_selected(path->get_text());
}
@@ -313,7 +307,6 @@ EditorPropertyPath::EditorPropertyPath() {
///////////////////// CLASS NAME /////////////////////////
void EditorPropertyClassName::setup(const String &p_base_type, const String &p_selected_type) {
-
base_type = p_base_type;
dialog->set_base_type(base_type);
selected_type = p_selected_type;
@@ -321,7 +314,6 @@ void EditorPropertyClassName::setup(const String &p_base_type, const String &p_s
}
void EditorPropertyClassName::update_property() {
-
String s = get_edited_object()->get(get_edited_property());
property->set_text(s);
selected_type = s;
@@ -356,13 +348,11 @@ EditorPropertyClassName::EditorPropertyClassName() {
///////////////////// MEMBER /////////////////////////
void EditorPropertyMember::_property_selected(const String &p_selected) {
-
emit_changed(get_edited_property(), p_selected);
update_property();
}
void EditorPropertyMember::_property_select() {
-
if (!selector) {
selector = memnew(PropertySelector);
selector->connect("selected", callable_mp(this, &EditorPropertyMember::_property_selected));
@@ -372,60 +362,57 @@ void EditorPropertyMember::_property_select() {
String current = get_edited_object()->get(get_edited_property());
if (hint == MEMBER_METHOD_OF_VARIANT_TYPE) {
-
Variant::Type type = Variant::NIL;
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
if (hint_text == Variant::get_type_name(Variant::Type(i))) {
type = Variant::Type(i);
}
}
- if (type != Variant::NIL)
+ if (type != Variant::NIL) {
selector->select_method_from_basic_type(type, current);
+ }
} else if (hint == MEMBER_METHOD_OF_BASE_TYPE) {
-
selector->select_method_from_base_type(hint_text, current);
} else if (hint == MEMBER_METHOD_OF_INSTANCE) {
-
Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
- if (instance)
+ if (instance) {
selector->select_method_from_instance(instance, current);
+ }
} else if (hint == MEMBER_METHOD_OF_SCRIPT) {
-
Object *obj = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
if (Object::cast_to<Script>(obj)) {
selector->select_method_from_script(Object::cast_to<Script>(obj), current);
}
} else if (hint == MEMBER_PROPERTY_OF_VARIANT_TYPE) {
-
Variant::Type type = Variant::NIL;
String tname = hint_text;
- if (tname.find(".") != -1)
+ if (tname.find(".") != -1) {
tname = tname.get_slice(".", 0);
+ }
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
if (tname == Variant::get_type_name(Variant::Type(i))) {
type = Variant::Type(Variant::Type(i));
}
}
- if (type != Variant::NIL)
+ if (type != Variant::NIL) {
selector->select_property_from_basic_type(type, current);
+ }
} else if (hint == MEMBER_PROPERTY_OF_BASE_TYPE) {
-
selector->select_property_from_base_type(hint_text, current);
} else if (hint == MEMBER_PROPERTY_OF_INSTANCE) {
-
Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
- if (instance)
+ if (instance) {
selector->select_property_from_instance(instance, current);
+ }
} else if (hint == MEMBER_PROPERTY_OF_SCRIPT) {
-
Object *obj = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
if (Object::cast_to<Script>(obj)) {
selector->select_property_from_script(Object::cast_to<Script>(obj), current);
@@ -439,7 +426,6 @@ void EditorPropertyMember::setup(Type p_hint, const String &p_hint_text) {
}
void EditorPropertyMember::update_property() {
-
String full_path = get_edited_object()->get(get_edited_property());
property->set_text(full_path);
}
@@ -458,7 +444,6 @@ EditorPropertyMember::EditorPropertyMember() {
///////////////////// CHECK /////////////////////////
void EditorPropertyCheck::_checkbox_pressed() {
-
emit_changed(get_edited_property(), checkbox->is_pressed());
}
@@ -482,13 +467,11 @@ EditorPropertyCheck::EditorPropertyCheck() {
///////////////////// ENUM /////////////////////////
void EditorPropertyEnum::_option_selected(int p_which) {
-
int64_t val = options->get_item_metadata(p_which);
emit_changed(get_edited_property(), val);
}
void EditorPropertyEnum::update_property() {
-
int64_t which = get_edited_object()->get(get_edited_property());
for (int i = 0; i < options->get_item_count(); i++) {
@@ -500,12 +483,12 @@ void EditorPropertyEnum::update_property() {
}
void EditorPropertyEnum::setup(const Vector<String> &p_options) {
-
int64_t current_val = 0;
for (int i = 0; i < p_options.size(); i++) {
Vector<String> text_split = p_options[i].split(":");
- if (text_split.size() != 1)
+ if (text_split.size() != 1) {
current_val = text_split[1].to_int64();
+ }
options->add_item(text_split[0]);
options->set_item_metadata(i, current_val);
current_val += 1;
@@ -531,7 +514,6 @@ EditorPropertyEnum::EditorPropertyEnum() {
///////////////////// FLAGS /////////////////////////
void EditorPropertyFlags::_flag_toggled() {
-
uint32_t value = 0;
for (int i = 0; i < flags.size(); i++) {
if (flags[i]->is_pressed()) {
@@ -545,14 +527,12 @@ void EditorPropertyFlags::_flag_toggled() {
}
void EditorPropertyFlags::update_property() {
-
uint32_t value = get_edited_object()->get(get_edited_property());
for (int i = 0; i < flags.size(); i++) {
uint32_t val = 1;
val <<= flag_indices[i];
if (value & val) {
-
flags[i]->set_pressed(true);
} else {
flags[i]->set_pressed(false);
@@ -587,7 +567,6 @@ void EditorPropertyFlags::_bind_methods() {
}
EditorPropertyFlags::EditorPropertyFlags() {
-
vbox = memnew(VBoxContainer);
add_child(vbox);
}
@@ -602,6 +581,7 @@ public:
Vector<Rect2> flag_rects;
Vector<String> names;
Vector<String> tooltips;
+ int hovered_index;
virtual Size2 get_minimum_size() const {
Ref<Font> font = get_theme_font("font", "Label");
@@ -617,57 +597,79 @@ public:
return String();
}
void _gui_input(const Ref<InputEvent> &p_ev) {
- Ref<InputEventMouseButton> mb = p_ev;
- if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
+ const Ref<InputEventMouseMotion> mm = p_ev;
+
+ if (mm.is_valid()) {
for (int i = 0; i < flag_rects.size(); i++) {
- if (flag_rects[i].has_point(mb->get_position())) {
- //toggle
- if (value & (1 << i)) {
- value &= ~(1 << i);
- } else {
- value |= (1 << i);
- }
- emit_signal("flag_changed", value);
+ if (flag_rects[i].has_point(mm->get_position())) {
+ // Used to highlight the hovered flag in the layers grid.
+ hovered_index = i;
update();
+ break;
}
}
}
- }
-
- void _notification(int p_what) {
- if (p_what == NOTIFICATION_DRAW) {
-
- Rect2 rect;
- rect.size = get_size();
- flag_rects.clear();
-
- int bsize = (rect.size.height * 80 / 100) / 2;
-
- int h = bsize * 2 + 1;
- int vofs = (rect.size.height - h) / 2;
- Color color = get_theme_color("highlight_color", "Editor");
- for (int i = 0; i < 2; i++) {
+ const Ref<InputEventMouseButton> mb = p_ev;
- Point2 ofs(4, vofs);
- if (i == 1)
- ofs.y += bsize + 1;
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
+ // Toggle the flag.
+ // We base our choice on the hovered flag, so that it always matches the hovered flag.
+ if (value & (1 << hovered_index)) {
+ value &= ~(1 << hovered_index);
+ } else {
+ value |= (1 << hovered_index);
+ }
- ofs += rect.position;
- for (int j = 0; j < 10; j++) {
+ emit_signal("flag_changed", value);
+ update();
+ }
+ }
- Point2 o = ofs + Point2(j * (bsize + 1), 0);
- if (j >= 5)
- o.x += 1;
+ void _notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_DRAW: {
+ Rect2 rect;
+ rect.size = get_size();
+ flag_rects.clear();
+
+ const int bsize = (rect.size.height * 80 / 100) / 2;
+ const int h = bsize * 2 + 1;
+ const int vofs = (rect.size.height - h) / 2;
+
+ Color color = get_theme_color("highlight_color", "Editor");
+ for (int i = 0; i < 2; i++) {
+ Point2 ofs(4, vofs);
+ if (i == 1)
+ ofs.y += bsize + 1;
+
+ ofs += rect.position;
+ for (int j = 0; j < 10; j++) {
+ Point2 o = ofs + Point2(j * (bsize + 1), 0);
+ if (j >= 5)
+ o.x += 1;
+
+ const int idx = i * 10 + j;
+ const bool on = value & (1 << idx);
+ Rect2 rect2 = Rect2(o, Size2(bsize, bsize));
+
+ color.a = on ? 0.6 : 0.2;
+ if (idx == hovered_index) {
+ // Add visual feedback when hovering a flag.
+ color.a += 0.15;
+ }
- uint32_t idx = i * 10 + j;
- bool on = value & (1 << idx);
- Rect2 rect2 = Rect2(o, Size2(bsize, bsize));
- color.a = on ? 0.6 : 0.2;
- draw_rect(rect2, color);
- flag_rects.push_back(rect2);
+ draw_rect(rect2, color);
+ flag_rects.push_back(rect2);
+ }
}
- }
+ } break;
+ case NOTIFICATION_MOUSE_EXIT: {
+ hovered_index = -1;
+ update();
+ } break;
+ default:
+ break;
}
}
@@ -677,29 +679,26 @@ public:
}
static void _bind_methods() {
-
ClassDB::bind_method(D_METHOD("_gui_input"), &EditorPropertyLayersGrid::_gui_input);
ADD_SIGNAL(MethodInfo("flag_changed", PropertyInfo(Variant::INT, "flag")));
}
EditorPropertyLayersGrid() {
value = 0;
+ hovered_index = -1; // Nothing is hovered.
}
};
void EditorPropertyLayers::_grid_changed(uint32_t p_grid) {
-
emit_changed(get_edited_property(), p_grid);
}
void EditorPropertyLayers::update_property() {
-
uint32_t value = get_edited_object()->get(get_edited_property());
grid->set_flag(value);
}
void EditorPropertyLayers::setup(LayerType p_layer_type) {
-
String basename;
switch (p_layer_type) {
case LAYER_RENDER_2D:
@@ -738,7 +737,6 @@ void EditorPropertyLayers::setup(LayerType p_layer_type) {
}
void EditorPropertyLayers::_button_pressed() {
-
layers->clear();
for (int i = 0; i < 20; i++) {
if (i == 5 || i == 10 || i == 15) {
@@ -771,7 +769,6 @@ void EditorPropertyLayers::_bind_methods() {
}
EditorPropertyLayers::EditorPropertyLayers() {
-
HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb);
grid = memnew(EditorPropertyLayersGrid);
@@ -780,7 +777,7 @@ EditorPropertyLayers::EditorPropertyLayers() {
hb->add_child(grid);
button = memnew(Button);
button->set_toggle_mode(true);
- button->set_text("..");
+ button->set_text("...");
button->connect("pressed", callable_mp(this, &EditorPropertyLayers::_button_pressed));
hb->add_child(button);
set_bottom_editor(hb);
@@ -794,8 +791,9 @@ EditorPropertyLayers::EditorPropertyLayers() {
///////////////////// INT /////////////////////////
void EditorPropertyInteger::_value_changed(int64_t val) {
- if (setting)
+ if (setting) {
return;
+ }
emit_changed(get_edited_property(), val);
}
@@ -835,14 +833,14 @@ EditorPropertyInteger::EditorPropertyInteger() {
///////////////////// OBJECT ID /////////////////////////
void EditorPropertyObjectID::_edit_pressed() {
-
emit_signal("object_id_selected", get_edited_property(), get_edited_object()->get(get_edited_property()));
}
void EditorPropertyObjectID::update_property() {
String type = base_type;
- if (type == "")
+ if (type == "") {
type = "Object";
+ }
ObjectID id = get_edited_object()->get(get_edited_property());
if (id.is_valid()) {
@@ -873,8 +871,9 @@ EditorPropertyObjectID::EditorPropertyObjectID() {
///////////////////// FLOAT /////////////////////////
void EditorPropertyFloat::_value_changed(double val) {
- if (setting)
+ if (setting) {
return;
+ }
emit_changed(get_edited_property(), val);
}
@@ -890,7 +889,6 @@ void EditorPropertyFloat::_bind_methods() {
}
void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_exp_range, bool p_greater, bool p_lesser) {
-
spin->set_min(p_min);
spin->set_max(p_max);
spin->set_step(p_step);
@@ -912,7 +910,6 @@ EditorPropertyFloat::EditorPropertyFloat() {
///////////////////// EASING /////////////////////////
void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
-
const Ref<InputEventMouseButton> mb = p_ev;
if (mb.is_valid()) {
if (mb->is_doubleclick() && mb->get_button_index() == BUTTON_LEFT) {
@@ -938,17 +935,19 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
const Ref<InputEventMouseMotion> mm = p_ev;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
-
float rel = mm->get_relative().x;
- if (rel == 0)
+ if (rel == 0) {
return;
+ }
- if (flip)
+ if (flip) {
rel = -rel;
+ }
float val = get_edited_object()->get(get_edited_property());
- if (val == 0)
+ if (val == 0) {
return;
+ }
bool sg = val < 0;
val = Math::absf(val);
@@ -957,8 +956,9 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
val += rel * 0.05;
val = Math::pow(2.0f, val);
- if (sg)
+ if (sg) {
val = -val;
+ }
emit_changed(get_edited_property(), val);
easing_draw->update();
@@ -966,7 +966,6 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
}
void EditorPropertyEasing::_draw_easing() {
-
RID ci = easing_draw->get_canvas_item();
Size2 s = easing_draw->get_size();
@@ -987,7 +986,6 @@ void EditorPropertyEasing::_draw_easing() {
Vector<Point2> lines;
for (int i = 1; i <= points; i++) {
-
float ifl = i / float(points);
float iflp = (i - 1) / float(points);
@@ -1027,8 +1025,9 @@ void EditorPropertyEasing::_setup_spin() {
}
void EditorPropertyEasing::_spin_value_changed(double p_value) {
- if (setting)
+ if (setting) {
return;
+ }
// 0 is a singularity, but both positive and negative values
// are otherwise allowed. Enforce 0+ as workaround.
@@ -1047,13 +1046,11 @@ void EditorPropertyEasing::_spin_focus_exited() {
}
void EditorPropertyEasing::setup(bool p_full, bool p_flip) {
-
flip = p_flip;
full = p_full;
}
void EditorPropertyEasing::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
@@ -1075,7 +1072,6 @@ void EditorPropertyEasing::_bind_methods() {
}
EditorPropertyEasing::EditorPropertyEasing() {
-
easing_draw = memnew(Control);
easing_draw->connect("draw", callable_mp(this, &EditorPropertyEasing::_draw_easing));
easing_draw->connect("gui_input", callable_mp(this, &EditorPropertyEasing::_drag_easing));
@@ -1107,8 +1103,9 @@ EditorPropertyEasing::EditorPropertyEasing() {
///////////////////// VECTOR2 /////////////////////////
void EditorPropertyVector2::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Vector2 v2;
v2.x = spin[0]->get_value();
@@ -1128,7 +1125,6 @@ void EditorPropertyVector2::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 2; i++) {
-
Color c = base;
c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
@@ -1189,8 +1185,9 @@ EditorPropertyVector2::EditorPropertyVector2(bool p_force_wide) {
///////////////////// RECT2 /////////////////////////
void EditorPropertyRect2::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Rect2 r2;
r2.position.x = spin[0]->get_value();
@@ -1209,17 +1206,18 @@ void EditorPropertyRect2::update_property() {
spin[3]->set_value(val.size.y);
setting = false;
}
+
void EditorPropertyRect2::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 4; i++) {
-
Color c = base;
c.set_hsv(float(i % 2) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyRect2::_bind_methods() {
}
@@ -1235,7 +1233,6 @@ void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool
}
EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {
-
bool horizontal = !p_force_wide && bool(EDITOR_GET("interface/inspector/horizontal_vector_types_editing"));
BoxContainer *bc;
@@ -1274,8 +1271,9 @@ EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {
///////////////////// VECTOR3 /////////////////////////
void EditorPropertyVector3::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Vector3 v3;
v3.x = spin[0]->get_value();
@@ -1285,24 +1283,36 @@ void EditorPropertyVector3::_value_changed(double val, const String &p_name) {
}
void EditorPropertyVector3::update_property() {
- Vector3 val = get_edited_object()->get(get_edited_property());
+ update_using_vector(get_edited_object()->get(get_edited_property()));
+}
+
+void EditorPropertyVector3::update_using_vector(Vector3 p_vector) {
setting = true;
- spin[0]->set_value(val.x);
- spin[1]->set_value(val.y);
- spin[2]->set_value(val.z);
+ spin[0]->set_value(p_vector.x);
+ spin[1]->set_value(p_vector.y);
+ spin[2]->set_value(p_vector.z);
setting = false;
}
+
+Vector3 EditorPropertyVector3::get_vector() {
+ Vector3 v3;
+ v3.x = spin[0]->get_value();
+ v3.y = spin[1]->get_value();
+ v3.z = spin[2]->get_value();
+ return v3;
+}
+
void EditorPropertyVector3::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 3; i++) {
-
Color c = base;
c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyVector3::_bind_methods() {
}
@@ -1356,8 +1366,9 @@ EditorPropertyVector3::EditorPropertyVector3(bool p_force_wide) {
///////////////////// VECTOR2i /////////////////////////
void EditorPropertyVector2i::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Vector2i v2;
v2.x = spin[0]->get_value();
@@ -1377,7 +1388,6 @@ void EditorPropertyVector2i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 2; i++) {
-
Color c = base;
c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
@@ -1435,11 +1445,12 @@ EditorPropertyVector2i::EditorPropertyVector2i(bool p_force_wide) {
setting = false;
}
-///////////////////// RECT2 /////////////////////////
+///////////////////// RECT2i /////////////////////////
void EditorPropertyRect2i::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Rect2i r2;
r2.position.x = spin[0]->get_value();
@@ -1458,17 +1469,18 @@ void EditorPropertyRect2i::update_property() {
spin[3]->set_value(val.size.y);
setting = false;
}
+
void EditorPropertyRect2i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 4; i++) {
-
Color c = base;
c.set_hsv(float(i % 2) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyRect2i::_bind_methods() {
}
@@ -1484,7 +1496,6 @@ void EditorPropertyRect2i::setup(int p_min, int p_max, bool p_no_slider) {
}
EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {
-
bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing");
BoxContainer *bc;
@@ -1520,11 +1531,12 @@ EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {
setting = false;
}
-///////////////////// VECTOR3 /////////////////////////
+///////////////////// VECTOR3i /////////////////////////
void EditorPropertyVector3i::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Vector3i v3;
v3.x = spin[0]->get_value();
@@ -1541,17 +1553,18 @@ void EditorPropertyVector3i::update_property() {
spin[2]->set_value(val.z);
setting = false;
}
+
void EditorPropertyVector3i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 3; i++) {
-
Color c = base;
c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyVector3i::_bind_methods() {
}
@@ -1604,8 +1617,9 @@ EditorPropertyVector3i::EditorPropertyVector3i(bool p_force_wide) {
///////////////////// PLANE /////////////////////////
void EditorPropertyPlane::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Plane p;
p.normal.x = spin[0]->get_value();
@@ -1624,17 +1638,18 @@ void EditorPropertyPlane::update_property() {
spin[3]->set_value(val.d);
setting = false;
}
+
void EditorPropertyPlane::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 3; i++) {
-
Color c = base;
c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyPlane::_bind_methods() {
}
@@ -1650,7 +1665,6 @@ void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool
}
EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) {
-
bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing");
BoxContainer *bc;
@@ -1689,8 +1703,9 @@ EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) {
///////////////////// QUAT /////////////////////////
void EditorPropertyQuat::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Quat p;
p.x = spin[0]->get_value();
@@ -1709,17 +1724,18 @@ void EditorPropertyQuat::update_property() {
spin[3]->set_value(val.w);
setting = false;
}
+
void EditorPropertyQuat::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 3; i++) {
-
Color c = base;
c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyQuat::_bind_methods() {
}
@@ -1770,8 +1786,9 @@ EditorPropertyQuat::EditorPropertyQuat() {
///////////////////// AABB /////////////////////////
void EditorPropertyAABB::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
AABB p;
p.position.x = spin[0]->get_value();
@@ -1796,17 +1813,18 @@ void EditorPropertyAABB::update_property() {
setting = false;
}
+
void EditorPropertyAABB::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 6; i++) {
-
Color c = base;
c.set_hsv(float(i % 3) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyAABB::_bind_methods() {
}
@@ -1844,8 +1862,9 @@ EditorPropertyAABB::EditorPropertyAABB() {
///////////////////// TRANSFORM2D /////////////////////////
void EditorPropertyTransform2D::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Transform2D p;
p[0][0] = spin[0]->get_value();
@@ -1870,17 +1889,18 @@ void EditorPropertyTransform2D::update_property() {
setting = false;
}
+
void EditorPropertyTransform2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 6; i++) {
-
Color c = base;
c.set_hsv(float(i % 2) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyTransform2D::_bind_methods() {
}
@@ -1917,8 +1937,9 @@ EditorPropertyTransform2D::EditorPropertyTransform2D() {
///////////////////// BASIS /////////////////////////
void EditorPropertyBasis::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Basis p;
p[0][0] = spin[0]->get_value();
@@ -1949,17 +1970,18 @@ void EditorPropertyBasis::update_property() {
setting = false;
}
+
void EditorPropertyBasis::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 9; i++) {
-
Color c = base;
c.set_hsv(float(i % 3) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyBasis::_bind_methods() {
}
@@ -1996,8 +2018,9 @@ EditorPropertyBasis::EditorPropertyBasis() {
///////////////////// TRANSFORM /////////////////////////
void EditorPropertyTransform::_value_changed(double val, const String &p_name) {
- if (setting)
+ if (setting) {
return;
+ }
Transform p;
p.basis[0][0] = spin[0]->get_value();
@@ -2017,34 +2040,37 @@ void EditorPropertyTransform::_value_changed(double val, const String &p_name) {
}
void EditorPropertyTransform::update_property() {
- Transform val = get_edited_object()->get(get_edited_property());
- setting = true;
- spin[0]->set_value(val.basis[0][0]);
- spin[1]->set_value(val.basis[1][0]);
- spin[2]->set_value(val.basis[2][0]);
- spin[3]->set_value(val.basis[0][1]);
- spin[4]->set_value(val.basis[1][1]);
- spin[5]->set_value(val.basis[2][1]);
- spin[6]->set_value(val.basis[0][2]);
- spin[7]->set_value(val.basis[1][2]);
- spin[8]->set_value(val.basis[2][2]);
- spin[9]->set_value(val.origin[0]);
- spin[10]->set_value(val.origin[1]);
- spin[11]->set_value(val.origin[2]);
+ update_using_transform(get_edited_object()->get(get_edited_property()));
+}
+void EditorPropertyTransform::update_using_transform(Transform p_transform) {
+ setting = true;
+ spin[0]->set_value(p_transform.basis[0][0]);
+ spin[1]->set_value(p_transform.basis[1][0]);
+ spin[2]->set_value(p_transform.basis[2][0]);
+ spin[3]->set_value(p_transform.basis[0][1]);
+ spin[4]->set_value(p_transform.basis[1][1]);
+ spin[5]->set_value(p_transform.basis[2][1]);
+ spin[6]->set_value(p_transform.basis[0][2]);
+ spin[7]->set_value(p_transform.basis[1][2]);
+ spin[8]->set_value(p_transform.basis[2][2]);
+ spin[9]->set_value(p_transform.origin[0]);
+ spin[10]->set_value(p_transform.origin[1]);
+ spin[11]->set_value(p_transform.origin[2]);
setting = false;
}
+
void EditorPropertyTransform::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 12; i++) {
-
Color c = base;
c.set_hsv(float(i % 3) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
spin[i]->set_custom_label_color(true, c);
}
}
}
+
void EditorPropertyTransform::_bind_methods() {
}
@@ -2081,29 +2107,27 @@ EditorPropertyTransform::EditorPropertyTransform() {
////////////// COLOR PICKER //////////////////////
void EditorPropertyColor::_color_changed(const Color &p_color) {
-
emit_changed(get_edited_property(), p_color, "", true);
}
void EditorPropertyColor::_popup_closed() {
-
emit_changed(get_edited_property(), picker->get_pick_color(), "", false);
}
void EditorPropertyColor::_picker_created() {
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
- if (default_color_mode == 1)
+ if (default_color_mode == 1) {
picker->get_picker()->set_hsv_mode(true);
- else if (default_color_mode == 2)
+ } else if (default_color_mode == 2) {
picker->get_picker()->set_raw_mode(true);
+ }
}
void EditorPropertyColor::_bind_methods() {
}
void EditorPropertyColor::update_property() {
-
picker->set_pick_color(get_edited_object()->get(get_edited_property()));
const Color color = picker->get_pick_color();
@@ -2129,7 +2153,6 @@ void EditorPropertyColor::setup(bool p_show_alpha) {
}
EditorPropertyColor::EditorPropertyColor() {
-
picker = memnew(ColorPickerButton);
add_child(picker);
picker->set_flat(true);
@@ -2141,7 +2164,6 @@ EditorPropertyColor::EditorPropertyColor() {
////////////// NODE PATH //////////////////////
void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
-
NodePath path = p_path;
Node *base_node = nullptr;
@@ -2188,13 +2210,11 @@ void EditorPropertyNodePath::_node_assign() {
}
void EditorPropertyNodePath::_node_clear() {
-
emit_changed(get_edited_property(), NodePath());
update_property();
}
void EditorPropertyNodePath::update_property() {
-
NodePath p = get_edited_object()->get(get_edited_property());
assign->set_tooltip(p);
@@ -2235,14 +2255,12 @@ void EditorPropertyNodePath::update_property() {
}
void EditorPropertyNodePath::setup(const NodePath &p_base_hint, Vector<StringName> p_valid_types, bool p_use_path_from_scene_root) {
-
base_hint = p_base_hint;
valid_types = p_valid_types;
use_path_from_scene_root = p_use_path_from_scene_root;
}
void EditorPropertyNodePath::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Ref<Texture2D> t = get_theme_icon("Clear", "EditorIcons");
clear->set_icon(t);
@@ -2253,7 +2271,6 @@ void EditorPropertyNodePath::_bind_methods() {
}
EditorPropertyNodePath::EditorPropertyNodePath() {
-
HBoxContainer *hbc = memnew(HBoxContainer);
add_child(hbc);
assign = memnew(Button);
@@ -2292,7 +2309,6 @@ EditorPropertyRID::EditorPropertyRID() {
////////////// RESOURCE //////////////////////
void EditorPropertyResource::_file_selected(const String &p_path) {
-
RES res = ResourceLoader::load(p_path);
ERR_FAIL_COND_MSG(res.is_null(), "Cannot load resource from path '" + p_path + "'.");
@@ -2316,8 +2332,9 @@ void EditorPropertyResource::_file_selected(const String &p_path) {
}
}
- if (!any_type_matches)
+ if (!any_type_matches) {
EditorNode::get_singleton()->show_warning(vformat(TTR("The selected resource (%s) does not match any type expected for this property (%s)."), res->get_class(), property_types));
+ }
}
emit_changed(get_edited_property(), res);
@@ -2325,11 +2342,9 @@ void EditorPropertyResource::_file_selected(const String &p_path) {
}
void EditorPropertyResource::_menu_option(int p_which) {
-
// scene_tree->popup_centered_ratio();
switch (p_which) {
case OBJ_MENU_LOAD: {
-
if (!file) {
file = memnew(EditorFileDialog);
file->connect("file_selected", callable_mp(this, &EditorPropertyResource::_file_selected));
@@ -2340,7 +2355,6 @@ void EditorPropertyResource::_menu_option(int p_which) {
List<String> extensions;
for (int i = 0; i < type.get_slice_count(","); i++) {
-
ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",", i), &extensions);
}
@@ -2351,7 +2365,6 @@ void EditorPropertyResource::_menu_option(int p_which) {
file->clear_filters();
for (Set<String>::Element *E = valid_extensions.front(); E; E = E->next()) {
-
file->add_filter("*." + E->get() + " ; " + E->get().to_upper());
}
@@ -2359,37 +2372,32 @@ void EditorPropertyResource::_menu_option(int p_which) {
} break;
case OBJ_MENU_EDIT: {
-
RES res = get_edited_object()->get(get_edited_property());
if (!res.is_null()) {
-
emit_signal("resource_selected", get_edited_property(), res);
}
} break;
case OBJ_MENU_CLEAR: {
-
emit_changed(get_edited_property(), RES());
update_property();
} break;
case OBJ_MENU_MAKE_UNIQUE: {
-
RES res_orig = get_edited_object()->get(get_edited_property());
- if (res_orig.is_null())
+ if (res_orig.is_null()) {
return;
+ }
List<PropertyInfo> property_list;
res_orig->get_property_list(&property_list);
List<Pair<String, Variant>> propvalues;
for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) {
-
Pair<String, Variant> p;
PropertyInfo &pi = E->get();
if (pi.usage & PROPERTY_USAGE_STORAGE) {
-
p.first = pi.name;
p.second = res_orig->get(pi.name);
}
@@ -2406,7 +2414,6 @@ void EditorPropertyResource::_menu_option(int p_which) {
ERR_FAIL_COND(res.is_null());
for (List<Pair<String, Variant>>::Element *E = propvalues.front(); E; E = E->next()) {
-
Pair<String, Variant> &p = E->get();
res->set(p.first, p.second);
}
@@ -2418,8 +2425,9 @@ void EditorPropertyResource::_menu_option(int p_which) {
case OBJ_MENU_SAVE: {
RES res = get_edited_object()->get(get_edited_property());
- if (res.is_null())
+ if (res.is_null()) {
return;
+ }
EditorNode::get_singleton()->save_resource(res);
} break;
@@ -2430,21 +2438,18 @@ void EditorPropertyResource::_menu_option(int p_which) {
} break;
case OBJ_MENU_PASTE: {
-
RES res = EditorSettings::get_singleton()->get_resource_clipboard();
emit_changed(get_edited_property(), res);
update_property();
} break;
case OBJ_MENU_NEW_SCRIPT: {
-
if (Object::cast_to<Node>(get_edited_object())) {
EditorNode::get_singleton()->get_scene_tree_dock()->open_script_dialog(Object::cast_to<Node>(get_edited_object()), false);
}
} break;
case OBJ_MENU_EXTEND_SCRIPT: {
-
if (Object::cast_to<Node>(get_edited_object())) {
EditorNode::get_singleton()->get_scene_tree_dock()->open_script_dialog(Object::cast_to<Node>(get_edited_object()), true);
}
@@ -2460,11 +2465,9 @@ void EditorPropertyResource::_menu_option(int p_which) {
tab_container->set_current_tab(file_system_dock->get_index());
} break;
default: {
-
RES res = get_edited_object()->get(get_edited_property());
if (p_which >= CONVERT_BASE_ID) {
-
int to_type = p_which - CONVERT_BASE_ID;
Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res);
@@ -2482,7 +2485,6 @@ void EditorPropertyResource::_menu_option(int p_which) {
String intype = inheritors_array[p_which - TYPE_BASE_ID];
if (intype == "ViewportTexture") {
-
Resource *r = Object::cast_to<Resource>(get_edited_object());
if (r && r->get_path().is_resource_file()) {
EditorNode::get_singleton()->show_warning(TTR("Can't create a ViewportTexture on resources saved as a file.\nResource needs to belong to a scene."));
@@ -2544,7 +2546,6 @@ void EditorPropertyResource::_menu_option(int p_which) {
}
void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, ObjectID p_obj) {
-
RES p = get_edited_object()->get(get_edited_property());
if (p.is_valid() && p->get_instance_id() == p_obj) {
String type = p->get_class_name();
@@ -2572,7 +2573,6 @@ void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<T
}
void EditorPropertyResource::_update_menu_items() {
-
//////////////////// UPDATE MENU //////////////////////////
RES res = get_edited_object()->get(get_edited_property());
@@ -2592,7 +2592,6 @@ void EditorPropertyResource::_update_menu_items() {
}
for (int i = 0; i < base_type.get_slice_count(","); i++) {
-
String base = base_type.get_slice(",", i);
Set<String> valid_inheritors;
@@ -2629,20 +2628,23 @@ void EditorPropertyResource::_update_menu_items() {
for (int j = 0; j < custom_resources.size(); j++) {
if (custom_resources[j].name == t) {
is_custom_resource = true;
- if (custom_resources[j].icon.is_valid())
+ if (custom_resources[j].icon.is_valid()) {
icon = custom_resources[j].icon;
+ }
break;
}
}
}
- if (!is_custom_resource && !(ScriptServer::is_global_class(t) || ClassDB::can_instance(t)))
+ if (!is_custom_resource && !(ScriptServer::is_global_class(t) || ClassDB::can_instance(t))) {
continue;
+ }
inheritors_array.push_back(t);
- if (!icon.is_valid())
+ if (!icon.is_valid()) {
icon = get_theme_icon(has_theme_icon(t, "EditorIcons") ? t : "Object", "EditorIcons");
+ }
int id = TYPE_BASE_ID + idx;
menu->add_icon_item(icon, vformat(TTR("New %s"), t), id);
@@ -2651,14 +2653,14 @@ void EditorPropertyResource::_update_menu_items() {
}
}
- if (menu->get_item_count())
+ if (menu->get_item_count()) {
menu->add_separator();
+ }
}
menu->add_icon_item(get_theme_icon("Load", "EditorIcons"), TTR("Load"), OBJ_MENU_LOAD);
if (!res.is_null()) {
-
menu->add_icon_item(get_theme_icon("Edit", "EditorIcons"), TTR("Edit"), OBJ_MENU_EDIT);
menu->add_icon_item(get_theme_icon("Clear", "EditorIcons"), TTR("Clear"), OBJ_MENU_CLEAR);
menu->add_icon_item(get_theme_icon("Duplicate", "EditorIcons"), TTR("Make Unique"), OBJ_MENU_MAKE_UNIQUE);
@@ -2673,32 +2675,31 @@ void EditorPropertyResource::_update_menu_items() {
RES cb = EditorSettings::get_singleton()->get_resource_clipboard();
bool paste_valid = false;
if (cb.is_valid()) {
- if (base_type == "")
+ if (base_type == "") {
paste_valid = true;
- else
- for (int i = 0; i < base_type.get_slice_count(","); i++)
+ } else {
+ for (int i = 0; i < base_type.get_slice_count(","); i++) {
if (ClassDB::is_parent_class(cb->get_class(), base_type.get_slice(",", i))) {
paste_valid = true;
break;
}
+ }
+ }
}
if (!res.is_null() || paste_valid) {
menu->add_separator();
if (!res.is_null()) {
-
menu->add_item(TTR("Copy"), OBJ_MENU_COPY);
}
if (paste_valid) {
-
menu->add_item(TTR("Paste"), OBJ_MENU_PASTE);
}
}
if (!res.is_null()) {
-
Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res);
if (conversions.size()) {
menu->add_separator();
@@ -2707,10 +2708,8 @@ void EditorPropertyResource::_update_menu_items() {
String what = conversions[i]->converts_to();
Ref<Texture2D> icon;
if (has_theme_icon(what, "EditorIcons")) {
-
icon = get_theme_icon(what, "EditorIcons");
} else {
-
icon = get_theme_icon(what, "Resource");
}
@@ -2720,7 +2719,6 @@ void EditorPropertyResource::_update_menu_items() {
}
void EditorPropertyResource::_update_menu() {
-
_update_menu_items();
Rect2 gt = edit->get_screen_rect();
@@ -2732,17 +2730,14 @@ void EditorPropertyResource::_update_menu() {
}
void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_property, const Variant &p_value, bool) {
-
emit_signal("property_keyed_with_value", String(get_edited_property()) + ":" + p_property, p_value, false);
}
void EditorPropertyResource::_sub_inspector_resource_selected(const RES &p_resource, const String &p_property) {
-
emit_signal("resource_selected", String(get_edited_property()) + ":" + p_property, p_resource);
}
void EditorPropertyResource::_sub_inspector_object_id_selected(int p_id) {
-
emit_signal("object_id_selected", get_edited_property(), p_id);
}
@@ -2768,15 +2763,15 @@ void EditorPropertyResource::_open_editor_pressed() {
}
void EditorPropertyResource::_fold_other_editors(Object *p_self) {
-
if (this == p_self) {
return;
}
RES res = get_edited_object()->get(get_edited_property());
- if (!res.is_valid())
+ if (!res.is_valid()) {
return;
+ }
bool use_editor = false;
for (int i = 0; i < EditorNode::get_editor_data().get_editor_plugin_count(); i++) {
EditorPlugin *ep = EditorNode::get_editor_data().get_editor_plugin(i);
@@ -2785,8 +2780,9 @@ void EditorPropertyResource::_fold_other_editors(Object *p_self) {
}
}
- if (!use_editor)
+ if (!use_editor) {
return;
+ }
bool unfolded = get_edited_object()->editor_is_section_unfolded(get_edited_property());
opened_editor = false;
@@ -2800,17 +2796,14 @@ void EditorPropertyResource::_fold_other_editors(Object *p_self) {
}
void EditorPropertyResource::update_property() {
-
RES res = get_edited_object()->get(get_edited_property());
if (use_sub_inspector) {
-
if (res.is_valid() != assign->is_toggle_mode()) {
assign->set_toggle_mode(res.is_valid());
}
if (res.is_valid() && get_edited_object()->editor_is_section_unfolded(get_edited_property())) {
-
if (!sub_inspector) {
sub_inspector = memnew(EditorInspector);
sub_inspector->set_enable_v_scroll(false);
@@ -2876,7 +2869,6 @@ void EditorPropertyResource::update_property() {
assign->set_icon(Ref<Texture2D>());
assign->set_text(TTR("[empty]"));
} else {
-
assign->set_icon(EditorNode::get_singleton()->get_object_icon(res.operator->(), "Object"));
if (res->get_name() != String()) {
@@ -2907,12 +2899,10 @@ void EditorPropertyResource::_resource_selected() {
}
if (use_sub_inspector) {
-
bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property());
get_edited_object()->editor_set_section_unfold(get_edited_property(), unfold);
update_property();
} else {
-
emit_signal("resource_selected", get_edited_property(), res);
}
}
@@ -2922,14 +2912,12 @@ void EditorPropertyResource::setup(const String &p_base_type) {
}
void EditorPropertyResource::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Ref<Texture2D> t = get_theme_icon("select_arrow", "Tree");
edit->set_icon(t);
}
if (p_what == NOTIFICATION_DRAG_BEGIN) {
-
if (is_visible_in_tree()) {
if (_is_drop_valid(get_viewport()->gui_get_drag_data())) {
dropping = true;
@@ -2947,7 +2935,6 @@ void EditorPropertyResource::_notification(int p_what) {
}
void EditorPropertyResource::_viewport_selected(const NodePath &p_path) {
-
Node *to_node = get_node(p_path);
if (!Object::cast_to<Viewport>(to_node)) {
EditorNode::get_singleton()->show_warning(TTR("Selected node is not a Viewport!"));
@@ -2970,14 +2957,12 @@ void EditorPropertyResource::collapse_all_folding() {
}
void EditorPropertyResource::expand_all_folding() {
-
if (sub_inspector) {
sub_inspector->expand_all_folding();
}
}
void EditorPropertyResource::_button_draw() {
-
if (dropping) {
Color color = get_theme_color("accent_color", "Editor");
assign->draw_rect(Rect2(Point2(), assign->get_size()), color, false);
@@ -2985,10 +2970,8 @@ void EditorPropertyResource::_button_draw() {
}
Variant EditorPropertyResource::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
RES res = get_edited_object()->get(get_edited_property());
if (res.is_valid()) {
-
return EditorNode::get_singleton()->drag_resource(res, p_from);
}
@@ -2996,7 +2979,6 @@ Variant EditorPropertyResource::get_drag_data_fw(const Point2 &p_point, Control
}
bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const {
-
String allowed_type = base_type;
Dictionary drag_data = p_drag_data;
@@ -3011,7 +2993,6 @@ bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const
}
if (drag_data.has("type") && String(drag_data["type"]) == "files") {
-
Vector<String> files = drag_data["files"];
if (files.size() == 1) {
@@ -3019,7 +3000,6 @@ bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const
String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
if (ftype != "") {
-
for (int i = 0; i < allowed_type.get_slice_count(","); i++) {
String at = allowed_type.get_slice(",", i).strip_edges();
if (ClassDB::is_parent_class(ftype, at)) {
@@ -3034,11 +3014,10 @@ bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const
}
bool EditorPropertyResource::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
return _is_drop_valid(p_data);
}
-void EditorPropertyResource::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
+void EditorPropertyResource::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
ERR_FAIL_COND(!_is_drop_valid(p_data));
Dictionary drag_data = p_data;
@@ -3052,7 +3031,6 @@ void EditorPropertyResource::drop_data_fw(const Point2 &p_point, const Variant &
}
if (drag_data.has("type") && String(drag_data["type"]) == "files") {
-
Vector<String> files = drag_data["files"];
if (files.size() == 1) {
@@ -3072,7 +3050,6 @@ void EditorPropertyResource::set_use_sub_inspector(bool p_enable) {
}
void EditorPropertyResource::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_resource_preview"), &EditorPropertyResource::_resource_preview);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &EditorPropertyResource::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &EditorPropertyResource::can_drop_data_fw);
@@ -3082,7 +3059,6 @@ void EditorPropertyResource::_bind_methods() {
}
EditorPropertyResource::EditorPropertyResource() {
-
opened_editor = false;
sub_inspector = nullptr;
sub_inspector_vbox = nullptr;
@@ -3139,11 +3115,9 @@ void EditorInspectorDefaultPlugin::parse_begin(Object *p_object) {
}
bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
-
float default_float_step = EDITOR_GET("interface/inspector/default_float_step");
switch (p_type) {
-
// atomic types
case Variant::NIL: {
EditorPropertyNil *editor = memnew(EditorPropertyNil);
@@ -3154,7 +3128,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
add_property_editor(p_path, editor);
} break;
case Variant::INT: {
-
if (p_hint == PROPERTY_HINT_ENUM) {
EditorPropertyEnum *editor = memnew(EditorPropertyEnum);
Vector<String> options = p_hint_text.split(",");
@@ -3168,7 +3141,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
add_property_editor(p_path, editor);
} else if (p_hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || p_hint == PROPERTY_HINT_LAYERS_2D_RENDER || p_hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || p_hint == PROPERTY_HINT_LAYERS_3D_RENDER) {
-
EditorPropertyLayers::LayerType lt = EditorPropertyLayers::LAYER_RENDER_2D;
switch (p_hint) {
case PROPERTY_HINT_LAYERS_2D_RENDER:
@@ -3190,7 +3162,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(lt);
add_property_editor(p_path, editor);
} else if (p_hint == PROPERTY_HINT_OBJECT_ID) {
-
EditorPropertyObjectID *editor = memnew(EditorPropertyObjectID);
editor->setup(p_hint_text);
add_property_editor(p_path, editor);
@@ -3227,7 +3198,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
}
} break;
case Variant::FLOAT: {
-
if (p_hint == PROPERTY_HINT_EXP_EASING) {
EditorPropertyEasing *editor = memnew(EditorPropertyEasing);
bool full = true;
@@ -3280,7 +3250,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
}
} break;
case Variant::STRING: {
-
if (p_hint == PROPERTY_HINT_ENUM) {
EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum);
Vector<String> options = p_hint_text.split(",");
@@ -3294,7 +3263,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup("Object", p_hint_text);
add_property_editor(p_path, editor);
} else if (p_hint == PROPERTY_HINT_DIR || p_hint == PROPERTY_HINT_FILE || p_hint == PROPERTY_HINT_SAVE_FILE || p_hint == PROPERTY_HINT_GLOBAL_DIR || p_hint == PROPERTY_HINT_GLOBAL_FILE) {
-
Vector<String> extensions = p_hint_text.split(",");
bool global = p_hint == PROPERTY_HINT_GLOBAL_DIR || p_hint == PROPERTY_HINT_GLOBAL_FILE;
bool folder = p_hint == PROPERTY_HINT_DIR || p_hint == PROPERTY_HINT_GLOBAL_DIR;
@@ -3313,7 +3281,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
p_hint == PROPERTY_HINT_PROPERTY_OF_BASE_TYPE ||
p_hint == PROPERTY_HINT_PROPERTY_OF_INSTANCE ||
p_hint == PROPERTY_HINT_PROPERTY_OF_SCRIPT) {
-
EditorPropertyMember *editor = memnew(EditorPropertyMember);
EditorPropertyMember::Type type = EditorPropertyMember::MEMBER_METHOD_OF_BASE_TYPE;
@@ -3346,7 +3313,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
add_property_editor(p_path, editor);
} else {
-
EditorPropertyText *editor = memnew(EditorPropertyText);
if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) {
editor->set_placeholder(p_hint_text);
@@ -3567,7 +3533,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
add_property_editor(p_path, editor);
} break;
case Variant::STRING_NAME: {
-
if (p_hint == PROPERTY_HINT_ENUM) {
EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum);
Vector<String> options = p_hint_text.split(",");
@@ -3583,7 +3548,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
}
} break;
case Variant::NODE_PATH: {
-
EditorPropertyNodePath *editor = memnew(EditorPropertyNodePath);
if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && p_hint_text != String()) {
editor->setup(p_hint_text, Vector<StringName>(), (p_usage & PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT));
@@ -3611,7 +3575,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
for (int j = 0; j < p_hint_text.get_slice_count(","); j++) {
String inherits = p_hint_text.get_slicec(',', j);
if (ClassDB::is_parent_class(inherits, type)) {
-
editor->set_use_sub_inspector(false);
}
}
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 61c11f4534..35e6c10d90 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -392,6 +392,8 @@ protected:
public:
virtual void update_property();
+ virtual void update_using_vector(Vector3 p_vector);
+ virtual Vector3 get_vector();
void setup(double p_min, double p_max, double p_step, bool p_no_slider);
EditorPropertyVector3(bool p_force_wide = false);
};
@@ -536,6 +538,7 @@ protected:
public:
virtual void update_property();
+ virtual void update_using_transform(Transform p_transform);
void setup(double p_min, double p_max, double p_step, bool p_no_slider);
EditorPropertyTransform();
};
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 49cffb015f..51fac6acec 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -35,7 +35,6 @@
#include "editor_properties.h"
bool EditorPropertyArrayObject::_set(const StringName &p_name, const Variant &p_value) {
-
String pn = p_name;
if (pn.begins_with("indices")) {
@@ -48,11 +47,9 @@ bool EditorPropertyArrayObject::_set(const StringName &p_name, const Variant &p_
}
bool EditorPropertyArrayObject::_get(const StringName &p_name, Variant &r_ret) const {
-
String pn = p_name;
if (pn.begins_with("indices")) {
-
int idx = pn.get_slicec('/', 1).to_int();
bool valid;
r_ret = array.get(idx, &valid);
@@ -80,17 +77,14 @@ EditorPropertyArrayObject::EditorPropertyArrayObject() {
///////////////////
bool EditorPropertyDictionaryObject::_set(const StringName &p_name, const Variant &p_value) {
-
String pn = p_name;
if (pn == "new_item_key") {
-
new_item_key = p_value;
return true;
}
if (pn == "new_item_value") {
-
new_item_value = p_value;
return true;
}
@@ -106,23 +100,19 @@ bool EditorPropertyDictionaryObject::_set(const StringName &p_name, const Varian
}
bool EditorPropertyDictionaryObject::_get(const StringName &p_name, Variant &r_ret) const {
-
String pn = p_name;
if (pn == "new_item_key") {
-
r_ret = new_item_key;
return true;
}
if (pn == "new_item_value") {
-
r_ret = new_item_value;
return true;
}
if (pn.begins_with("indices")) {
-
int idx = pn.get_slicec('/', 1).to_int();
Variant key = dict.get_key_at_index(idx);
r_ret = dict[key];
@@ -166,7 +156,6 @@ EditorPropertyDictionaryObject::EditorPropertyDictionaryObject() {
///////////////////// ARRAY ///////////////////////////
void EditorPropertyArray::_property_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing) {
-
if (p_property.begins_with("indices")) {
int idx = p_property.get_slice("/", 1).to_int();
Variant array = object->get_array();
@@ -181,7 +170,6 @@ void EditorPropertyArray::_property_changed(const String &p_property, Variant p_
}
void EditorPropertyArray::_change_type(Object *p_button, int p_index) {
-
Button *button = Object::cast_to<Button>(p_button);
changing_type_idx = p_index;
Rect2 rect = button->get_screen_rect();
@@ -191,7 +179,6 @@ void EditorPropertyArray::_change_type(Object *p_button, int p_index) {
}
void EditorPropertyArray::_change_type_menu(int p_index) {
-
if (p_index == Variant::VARIANT_MAX) {
_remove_pressed(changing_type_idx);
return;
@@ -218,7 +205,6 @@ void EditorPropertyArray::_object_id_selected(const StringName &p_property, Obje
}
void EditorPropertyArray::update_property() {
-
Variant array = get_edited_object()->get(get_edited_property());
String arrtype = "";
@@ -278,11 +264,9 @@ void EditorPropertyArray::update_property() {
}
if (unfolded) {
-
updating = true;
if (!vbox) {
-
vbox = memnew(VBoxContainer);
add_child(vbox);
set_bottom_editor(vbox);
@@ -371,13 +355,11 @@ void EditorPropertyArray::update_property() {
bool is_untyped_array = array.get_type() == Variant::ARRAY && subtype == Variant::NIL;
if (is_untyped_array) {
-
Button *edit = memnew(Button);
edit->set_icon(get_theme_icon("Edit", "EditorIcons"));
hb->add_child(edit);
edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_change_type), varray(edit, i + offset));
} else {
-
Button *remove = memnew(Button);
remove->set_icon(get_theme_icon("Remove", "EditorIcons"));
remove->connect("pressed", callable_mp(this, &EditorPropertyArray::_remove_pressed), varray(i + offset));
@@ -399,7 +381,6 @@ void EditorPropertyArray::update_property() {
}
void EditorPropertyArray::_remove_pressed(int p_index) {
-
Variant array = object->get_array();
array.call("remove", p_index);
@@ -425,7 +406,6 @@ bool EditorPropertyArray::_is_drop_valid(const Dictionary &p_drag_data) const {
Dictionary drag_data = p_drag_data;
if (drag_data.has("type") && String(drag_data["type"]) == "files") {
-
Vector<String> files = drag_data["files"];
for (int i = 0; i < files.size(); i++) {
@@ -449,7 +429,6 @@ bool EditorPropertyArray::_is_drop_valid(const Dictionary &p_drag_data) const {
}
bool EditorPropertyArray::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
return _is_drop_valid(p_data);
}
@@ -459,7 +438,6 @@ void EditorPropertyArray::drop_data_fw(const Point2 &p_point, const Variant &p_d
Dictionary drag_data = p_data;
if (drag_data.has("type") && String(drag_data["type"]) == "files") {
-
Vector<String> files = drag_data["files"];
Variant array = object->get_array();
@@ -493,7 +471,6 @@ void EditorPropertyArray::drop_data_fw(const Point2 &p_point, const Variant &p_d
void EditorPropertyArray::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAG_BEGIN) {
-
if (is_visible_in_tree()) {
if (_is_drop_valid(get_viewport()->gui_get_drag_data())) {
dropping = true;
@@ -511,7 +488,6 @@ void EditorPropertyArray::_notification(int p_what) {
}
void EditorPropertyArray::_edit_pressed() {
-
Variant array = get_edited_object()->get(get_edited_property());
if (!array.is_array()) {
Callable::CallError ce;
@@ -525,15 +501,17 @@ void EditorPropertyArray::_edit_pressed() {
}
void EditorPropertyArray::_page_changed(double p_page) {
- if (updating)
+ if (updating) {
return;
+ }
page_idx = p_page;
update_property();
}
void EditorPropertyArray::_length_changed(double p_page) {
- if (updating)
+ if (updating) {
return;
+ }
Variant array = object->get_array();
int previous_size = array.call("size");
@@ -566,7 +544,6 @@ void EditorPropertyArray::_length_changed(double p_page) {
}
void EditorPropertyArray::setup(Variant::Type p_array_type, const String &p_hint_string) {
-
array_type = p_array_type;
if (array_type == Variant::ARRAY && !p_hint_string.empty()) {
@@ -591,7 +568,6 @@ void EditorPropertyArray::_bind_methods() {
}
EditorPropertyArray::EditorPropertyArray() {
-
object.instance();
page_idx = 0;
page_len = 10;
@@ -631,12 +607,9 @@ EditorPropertyArray::EditorPropertyArray() {
///////////////////// DICTIONARY ///////////////////////////
void EditorPropertyDictionary::_property_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing) {
-
if (p_property == "new_item_key") {
-
object->set_new_item_key(p_value);
} else if (p_property == "new_item_value") {
-
object->set_new_item_value(p_value);
} else if (p_property.begins_with("indices")) {
int idx = p_property.get_slice("/", 1).to_int();
@@ -652,7 +625,6 @@ void EditorPropertyDictionary::_property_changed(const String &p_property, Varia
}
void EditorPropertyDictionary::_change_type(Object *p_button, int p_index) {
-
Button *button = Object::cast_to<Button>(p_button);
Rect2 rect = button->get_screen_rect();
@@ -663,7 +635,6 @@ void EditorPropertyDictionary::_change_type(Object *p_button, int p_index) {
}
void EditorPropertyDictionary::_add_key_value() {
-
// Do not allow nil as valid key. I experienced errors with this
if (object->get_new_item_key().get_type() == Variant::NIL) {
return;
@@ -683,7 +654,6 @@ void EditorPropertyDictionary::_add_key_value() {
}
void EditorPropertyDictionary::_change_type_menu(int p_index) {
-
if (changing_type_idx < 0) {
Variant value;
Callable::CallError ce;
@@ -700,7 +670,6 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
Dictionary dict = object->get_dict();
if (p_index < Variant::VARIANT_MAX) {
-
Variant value;
Callable::CallError ce;
value = Variant::construct(Variant::Type(p_index), nullptr, 0, ce);
@@ -719,7 +688,6 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
}
void EditorPropertyDictionary::update_property() {
-
Variant updated_val = get_edited_object()->get(get_edited_property());
if (updated_val.get_type() == Variant::NIL) {
@@ -743,11 +711,9 @@ void EditorPropertyDictionary::update_property() {
}
if (unfolded) {
-
updating = true;
if (!vbox) {
-
vbox = memnew(VBoxContainer);
add_child(vbox);
set_bottom_editor(vbox);
@@ -814,7 +780,6 @@ void EditorPropertyDictionary::update_property() {
// atomic types
case Variant::BOOL: {
-
prop = memnew(EditorPropertyCheck);
} break;
@@ -825,83 +790,71 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::FLOAT: {
-
EditorPropertyFloat *editor = memnew(EditorPropertyFloat);
editor->setup(-100000, 100000, 0.001, true, false, true, true);
prop = editor;
} break;
case Variant::STRING: {
-
prop = memnew(EditorPropertyText);
} break;
// math types
case Variant::VECTOR2: {
-
EditorPropertyVector2 *editor = memnew(EditorPropertyVector2);
editor->setup(-100000, 100000, 0.001, true);
prop = editor;
} break;
case Variant::VECTOR2I: {
-
EditorPropertyVector2i *editor = memnew(EditorPropertyVector2i);
editor->setup(-100000, 100000, true);
prop = editor;
} break;
case Variant::RECT2: {
-
EditorPropertyRect2 *editor = memnew(EditorPropertyRect2);
editor->setup(-100000, 100000, 0.001, true);
prop = editor;
} break;
case Variant::RECT2I: {
-
EditorPropertyRect2i *editor = memnew(EditorPropertyRect2i);
editor->setup(-100000, 100000, true);
prop = editor;
} break;
case Variant::VECTOR3: {
-
EditorPropertyVector3 *editor = memnew(EditorPropertyVector3);
editor->setup(-100000, 100000, 0.001, true);
prop = editor;
} break;
case Variant::VECTOR3I: {
-
EditorPropertyVector3i *editor = memnew(EditorPropertyVector3i);
editor->setup(-100000, 100000, true);
prop = editor;
} break;
case Variant::TRANSFORM2D: {
-
EditorPropertyTransform2D *editor = memnew(EditorPropertyTransform2D);
editor->setup(-100000, 100000, 0.001, true);
prop = editor;
} break;
case Variant::PLANE: {
-
EditorPropertyPlane *editor = memnew(EditorPropertyPlane);
editor->setup(-100000, 100000, 0.001, true);
prop = editor;
} break;
case Variant::QUAT: {
-
EditorPropertyQuat *editor = memnew(EditorPropertyQuat);
editor->setup(-100000, 100000, 0.001, true);
prop = editor;
} break;
case Variant::AABB: {
-
EditorPropertyAABB *editor = memnew(EditorPropertyAABB);
editor->setup(-100000, 100000, 0.001, true);
prop = editor;
@@ -940,15 +893,12 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::OBJECT: {
-
if (Object::cast_to<EncodedObjectAsID>(value)) {
-
EditorPropertyObjectID *editor = memnew(EditorPropertyObjectID);
editor->setup("Object");
prop = editor;
} else {
-
EditorPropertyResource *editor = memnew(EditorPropertyResource);
editor->setup("Resource");
prop = editor;
@@ -967,55 +917,46 @@ void EditorPropertyDictionary::update_property() {
// arrays
case Variant::PACKED_BYTE_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_BYTE_ARRAY);
prop = editor;
} break;
case Variant::PACKED_INT32_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_INT32_ARRAY);
prop = editor;
} break;
case Variant::PACKED_FLOAT32_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_FLOAT32_ARRAY);
prop = editor;
} break;
case Variant::PACKED_INT64_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_INT64_ARRAY);
prop = editor;
} break;
case Variant::PACKED_FLOAT64_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_FLOAT64_ARRAY);
prop = editor;
} break;
case Variant::PACKED_STRING_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_STRING_ARRAY);
prop = editor;
} break;
case Variant::PACKED_VECTOR2_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_VECTOR2_ARRAY);
prop = editor;
} break;
case Variant::PACKED_VECTOR3_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_VECTOR3_ARRAY);
prop = editor;
} break;
case Variant::PACKED_COLOR_ARRAY: {
-
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_COLOR_ARRAY);
prop = editor;
@@ -1100,7 +1041,6 @@ void EditorPropertyDictionary::_notification(int p_what) {
}
void EditorPropertyDictionary::_edit_pressed() {
-
Variant prop_val = get_edited_object()->get(get_edited_property());
if (prop_val.get_type() == Variant::NIL) {
Callable::CallError ce;
@@ -1113,8 +1053,9 @@ void EditorPropertyDictionary::_edit_pressed() {
}
void EditorPropertyDictionary::_page_changed(double p_page) {
- if (updating)
+ if (updating) {
return;
+ }
page_idx = p_page;
update_property();
}
@@ -1123,7 +1064,6 @@ void EditorPropertyDictionary::_bind_methods() {
}
EditorPropertyDictionary::EditorPropertyDictionary() {
-
object.instance();
page_idx = 0;
page_len = 10;
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h
index d6f3c976f9..7eed9b4fa7 100644
--- a/editor/editor_properties_array_dict.h
+++ b/editor/editor_properties_array_dict.h
@@ -37,7 +37,6 @@
#include "scene/gui/button.h"
class EditorPropertyArrayObject : public Reference {
-
GDCLASS(EditorPropertyArrayObject, Reference);
Variant array;
@@ -54,7 +53,6 @@ public:
};
class EditorPropertyDictionaryObject : public Reference {
-
GDCLASS(EditorPropertyDictionaryObject, Reference);
Variant new_item_key;
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 2a4300f833..7ac8fae156 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -42,7 +42,6 @@
#include "editor_settings.h"
bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
-
if (get_script_instance() && get_script_instance()->has_method("handles")) {
return get_script_instance()->call("handles", p_type);
}
@@ -50,7 +49,6 @@ bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
}
Ref<Texture2D> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 &p_size) const {
-
if (get_script_instance() && get_script_instance()->has_method("generate")) {
return get_script_instance()->call("generate", p_from, p_size);
}
@@ -58,19 +56,18 @@ Ref<Texture2D> EditorResourcePreviewGenerator::generate(const RES &p_from, const
}
Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String &p_path, const Size2 &p_size) const {
-
if (get_script_instance() && get_script_instance()->has_method("generate_from_path")) {
return get_script_instance()->call("generate_from_path", p_path, p_size);
}
RES res = ResourceLoader::load(p_path);
- if (!res.is_valid())
+ if (!res.is_valid()) {
return res;
+ }
return generate(res, p_size);
}
bool EditorResourcePreviewGenerator::generate_small_preview_automatically() const {
-
if (get_script_instance() && get_script_instance()->has_method("generate_small_preview_automatically")) {
return get_script_instance()->call("generate_small_preview_automatically");
}
@@ -79,7 +76,6 @@ bool EditorResourcePreviewGenerator::generate_small_preview_automatically() cons
}
bool EditorResourcePreviewGenerator::can_generate_small_preview() const {
-
if (get_script_instance() && get_script_instance()->has_method("can_generate_small_preview")) {
return get_script_instance()->call("can_generate_small_preview");
}
@@ -88,7 +84,6 @@ bool EditorResourcePreviewGenerator::can_generate_small_preview() const {
}
void EditorResourcePreviewGenerator::_bind_methods() {
-
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles", PropertyInfo(Variant::STRING, "type")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture2D), "generate", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::VECTOR2, "size")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture2D), "generate_from_path", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE), PropertyInfo(Variant::VECTOR2, "size")));
@@ -102,13 +97,11 @@ EditorResourcePreviewGenerator::EditorResourcePreviewGenerator() {
EditorResourcePreview *EditorResourcePreview::singleton = nullptr;
void EditorResourcePreview::_thread_func(void *ud) {
-
EditorResourcePreview *erp = (EditorResourcePreview *)ud;
erp->_thread();
}
void EditorResourcePreview::_preview_ready(const String &p_str, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud) {
-
String path = p_str;
{
MutexLock lock(preview_mutex);
@@ -139,10 +132,11 @@ void EditorResourcePreview::_preview_ready(const String &p_str, const Ref<Textur
void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<ImageTexture> &r_small_texture, const QueueItem &p_item, const String &cache_base) {
String type;
- if (p_item.resource.is_valid())
+ if (p_item.resource.is_valid()) {
type = p_item.resource->get_class();
- else
+ } else {
type = ResourceLoader::get_resource_type(p_item.path);
+ }
if (type == "") {
r_texture = Ref<ImageTexture>();
@@ -157,8 +151,9 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
r_small_texture = Ref<ImageTexture>();
for (int i = 0; i < preview_generators.size(); i++) {
- if (!preview_generators[i]->handles(type))
+ if (!preview_generators[i]->handles(type)) {
continue;
+ }
Ref<Texture2D> generated;
if (p_item.resource.is_valid()) {
@@ -214,15 +209,12 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
}
void EditorResourcePreview::_thread() {
-
exited = false;
while (!exit) {
-
preview_sem.wait();
preview_mutex.lock();
if (queue.size()) {
-
QueueItem item = queue.front()->get();
queue.pop_front();
@@ -237,7 +229,6 @@ void EditorResourcePreview::_thread() {
preview_mutex.unlock();
} else {
-
preview_mutex.unlock();
Ref<ImageTexture> texture;
@@ -247,14 +238,12 @@ void EditorResourcePreview::_thread() {
thumbnail_size *= EDSCALE;
if (item.resource.is_valid()) {
-
_generate_preview(texture, small_texture, item, String());
//adding hash to the end of path (should be ID:<objid>:<hash>) because of 5 argument limit to call_deferred
_preview_ready(item.path + ":" + itos(item.resource->hash_edited_version()), texture, small_texture, item.id, item.function, item.userdata);
} else {
-
String temp_path = EditorSettings::get_singleton()->get_cache_dir();
String cache_base = ProjectSettings::get_singleton()->globalize_path(item.path).md5_text();
cache_base = temp_path.plus_file("resthumb-" + cache_base);
@@ -264,11 +253,9 @@ void EditorResourcePreview::_thread() {
String file = cache_base + ".txt";
FileAccess *f = FileAccess::open(file, FileAccess::READ);
if (!f) {
-
// No cache found, generate
_generate_preview(texture, small_texture, item, cache_base);
} else {
-
uint64_t modtime = FileAccess::get_modified_time(item.path);
int tsize = f->get_line().to_int64();
bool has_small_texture = f->get_line().to_int();
@@ -277,17 +264,14 @@ void EditorResourcePreview::_thread() {
bool cache_valid = true;
if (tsize != thumbnail_size) {
-
cache_valid = false;
memdelete(f);
} else if (last_modtime != modtime) {
-
String last_md5 = f->get_line();
String md5 = FileAccess::get_md5(item.path);
memdelete(f);
if (last_md5 != md5) {
-
cache_valid = false;
} else {
@@ -311,7 +295,6 @@ void EditorResourcePreview::_thread() {
}
if (cache_valid) {
-
Ref<Image> img;
img.instance();
Ref<Image> small_img;
@@ -320,7 +303,6 @@ void EditorResourcePreview::_thread() {
if (img->load(cache_base + ".png") != OK) {
cache_valid = false;
} else {
-
texture.instance();
texture->create_from_image(img);
@@ -336,7 +318,6 @@ void EditorResourcePreview::_thread() {
}
if (!cache_valid) {
-
_generate_preview(texture, small_texture, item, cache_base);
}
}
@@ -352,7 +333,6 @@ void EditorResourcePreview::_thread() {
}
void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p_res, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata) {
-
ERR_FAIL_NULL(p_receiver);
ERR_FAIL_COND(!p_res.is_valid());
@@ -362,7 +342,6 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p
String path_id = "ID:" + itos(p_res->get_instance_id());
if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version()) {
-
cache[path_id].order = order++;
p_receiver->call(p_receiver_func, path_id, cache[path_id].preview, cache[path_id].small_preview, p_userdata);
return;
@@ -383,7 +362,6 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p
}
void EditorResourcePreview::queue_resource_preview(const String &p_path, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata) {
-
ERR_FAIL_NULL(p_receiver);
{
MutexLock lock(preview_mutex);
@@ -406,22 +384,18 @@ void EditorResourcePreview::queue_resource_preview(const String &p_path, Object
}
void EditorResourcePreview::add_preview_generator(const Ref<EditorResourcePreviewGenerator> &p_generator) {
-
preview_generators.push_back(p_generator);
}
void EditorResourcePreview::remove_preview_generator(const Ref<EditorResourcePreviewGenerator> &p_generator) {
-
preview_generators.erase(p_generator);
}
EditorResourcePreview *EditorResourcePreview::get_singleton() {
-
return singleton;
}
void EditorResourcePreview::_bind_methods() {
-
ClassDB::bind_method("_preview_ready", &EditorResourcePreview::_preview_ready);
ClassDB::bind_method(D_METHOD("queue_resource_preview", "path", "receiver", "receiver_func", "userdata"), &EditorResourcePreview::queue_resource_preview);
@@ -434,13 +408,11 @@ void EditorResourcePreview::_bind_methods() {
}
void EditorResourcePreview::check_for_invalidation(const String &p_path) {
-
bool call_invalidated = false;
{
MutexLock lock(preview_mutex);
if (cache.has(p_path)) {
-
uint64_t modified_time = FileAccess::get_modified_time(p_path);
if (modified_time != cache[p_path].modified_time) {
cache.erase(p_path);
@@ -482,6 +454,5 @@ EditorResourcePreview::EditorResourcePreview() {
}
EditorResourcePreview::~EditorResourcePreview() {
-
stop();
}
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index dc5a3b9c93..2f4bc65de9 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -37,7 +37,6 @@
#include "scene/resources/texture.h"
class EditorResourcePreviewGenerator : public Reference {
-
GDCLASS(EditorResourcePreviewGenerator, Reference);
protected:
@@ -55,7 +54,6 @@ public:
};
class EditorResourcePreview : public Node {
-
GDCLASS(EditorResourcePreview, Node);
static EditorResourcePreview *singleton;
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 01156d9809..1148a6c7ec 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -35,12 +35,10 @@
#include "servers/display_server.h"
EditorRun::Status EditorRun::get_status() const {
-
return status;
}
Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints) {
-
List<String> args;
String resource_path = ProjectSettings::get_singleton()->get_resource_path();
@@ -106,7 +104,6 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
test_size.x = ProjectSettings::get_singleton()->get("display/window/size/test_width");
test_size.y = ProjectSettings::get_singleton()->get("display/window/size/test_height");
if (test_size.x > 0 && test_size.y > 0) {
-
desired_size = test_size;
}
@@ -155,14 +152,13 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
}
if (p_breakpoints.size()) {
-
args.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = p_breakpoints.front(); E; E = E->next()) {
-
bpoints += E->get().replace(" ", "%20");
- if (E->next())
+ if (E->next()) {
bpoints += ",";
+ }
}
args.push_back(bpoints);
@@ -187,7 +183,6 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
printf("Running: %ls", exec.c_str());
for (List<String>::Element *E = args.front(); E; E = E->next()) {
-
printf(" %ls", E->get().c_str());
};
printf("\n");
@@ -207,8 +202,9 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
bool EditorRun::has_child_process(OS::ProcessID p_pid) const {
for (const List<OS::ProcessID>::Element *E = pids.front(); E; E = E->next()) {
- if (E->get() == p_pid)
+ if (E->get() == p_pid) {
return true;
+ }
}
return false;
}
@@ -221,9 +217,7 @@ void EditorRun::stop_child_process(OS::ProcessID p_pid) {
}
void EditorRun::stop() {
-
if (status != STATUS_STOP && pids.size() > 0) {
-
for (List<OS::ProcessID>::Element *E = pids.front(); E; E = E->next()) {
OS::get_singleton()->kill(E->get());
}
@@ -233,6 +227,5 @@ void EditorRun::stop() {
}
EditorRun::EditorRun() {
-
status = STATUS_STOP;
}
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index d4450acea2..9a834977fd 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -35,21 +35,18 @@
#include "editor_scale.h"
void EditorRunNative::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
-
Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(i);
- if (eep.is_null())
+ if (eep.is_null()) {
continue;
+ }
Ref<ImageTexture> icon = eep->get_run_icon();
if (!icon.is_null()) {
Ref<Image> im = icon->get_data();
im = im->duplicate();
im->clear_mipmaps();
if (!im->empty()) {
-
im->resize(16 * EDSCALE, 16 * EDSCALE);
Ref<ImageTexture> small_icon;
small_icon.instance();
@@ -66,13 +63,10 @@ void EditorRunNative::_notification(int p_what) {
}
if (p_what == NOTIFICATION_PROCESS) {
-
bool changed = EditorExport::get_singleton()->poll_export_platforms() || first;
if (changed) {
-
for (Map<int, MenuButton *>::Element *E = menus.front(); E; E = E->next()) {
-
Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(E->key());
MenuButton *mb = E->get();
int dc = eep->get_options_count();
@@ -98,7 +92,6 @@ void EditorRunNative::_notification(int p_what) {
}
void EditorRunNative::_run_native(int p_idx, int p_platform) {
-
if (!EditorNode::get_singleton()->ensure_main_scene(true)) {
resume_idx = p_idx;
resume_platform = p_platform;
@@ -120,7 +113,6 @@ void EditorRunNative::_run_native(int p_idx, int p_platform) {
Ref<EditorExportPreset> preset;
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
-
Ref<EditorExportPreset> ep = EditorExport::get_singleton()->get_export_preset(i);
if (ep->is_runnable() && ep->get_platform() == eep) {
preset = ep;
@@ -142,14 +134,18 @@ void EditorRunNative::_run_native(int p_idx, int p_platform) {
bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false);
bool debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false);
- if (deploy_debug_remote)
+ if (deploy_debug_remote) {
flags |= EditorExportPlatform::DEBUG_FLAG_REMOTE_DEBUG;
- if (deploy_dumb)
+ }
+ if (deploy_dumb) {
flags |= EditorExportPlatform::DEBUG_FLAG_DUMB_CLIENT;
- if (debug_collisions)
+ }
+ if (debug_collisions) {
flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_COLLISONS;
- if (debug_navigation)
+ }
+ if (debug_navigation) {
flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_NAVIGATION;
+ }
eep->run(preset, p_idx, flags);
}
@@ -159,12 +155,10 @@ void EditorRunNative::resume_run_native() {
}
void EditorRunNative::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("native_run", PropertyInfo(Variant::OBJECT, "preset", PROPERTY_HINT_RESOURCE_TYPE, "EditorExportPreset")));
}
bool EditorRunNative::is_deploy_debug_remote_enabled() const {
-
return EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_deploy_remote_debug", false);
}
diff --git a/editor/editor_run_native.h b/editor/editor_run_native.h
index 5f2236b88c..df6714cb53 100644
--- a/editor/editor_run_native.h
+++ b/editor/editor_run_native.h
@@ -35,7 +35,6 @@
#include "scene/gui/menu_button.h"
class EditorRunNative : public HBoxContainer {
-
GDCLASS(EditorRunNative, HBoxContainer);
Map<int, MenuButton *> menus;
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index c03fd4f6f5..e2446e92be 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -33,7 +33,6 @@
#include "editor_node.h"
void EditorScript::add_root_node(Node *p_node) {
-
if (!editor) {
EditorNode::add_io_error("EditorScript::add_root_node: " + TTR("Write your logic in the _run() method."));
return;
@@ -48,12 +47,10 @@ void EditorScript::add_root_node(Node *p_node) {
}
EditorInterface *EditorScript::get_editor_interface() {
-
return EditorInterface::get_singleton();
}
Node *EditorScript::get_scene() {
-
if (!editor) {
EditorNode::add_io_error("EditorScript::get_scene: " + TTR("Write your logic in the _run() method."));
return nullptr;
@@ -63,7 +60,6 @@ Node *EditorScript::get_scene() {
}
void EditorScript::_run() {
-
Ref<Script> s = get_script();
ERR_FAIL_COND(!s.is_valid());
if (!get_script_instance()) {
@@ -75,18 +71,15 @@ void EditorScript::_run() {
ce.error = Callable::CallError::CALL_OK;
get_script_instance()->call("_run", nullptr, 0, ce);
if (ce.error != Callable::CallError::CALL_OK) {
-
EditorNode::add_io_error(TTR("Couldn't run script:") + "\n " + s->get_path() + "\n" + TTR("Did you forget the '_run' method?"));
}
}
void EditorScript::set_editor(EditorNode *p_editor) {
-
editor = p_editor;
}
void EditorScript::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("add_root_node", "node"), &EditorScript::add_root_node);
ClassDB::bind_method(D_METHOD("get_scene"), &EditorScript::get_scene);
ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorScript::get_editor_interface);
@@ -94,6 +87,5 @@ void EditorScript::_bind_methods() {
}
EditorScript::EditorScript() {
-
editor = nullptr;
}
diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h
index edf75b9e73..261e2a7e41 100644
--- a/editor/editor_run_script.h
+++ b/editor/editor_run_script.h
@@ -35,7 +35,6 @@
#include "editor_plugin.h"
class EditorNode;
class EditorScript : public Reference {
-
GDCLASS(EditorScript, Reference);
EditorNode *editor;
diff --git a/editor/editor_scale.cpp b/editor/editor_scale.cpp
index 358241cbcc..450de75328 100644
--- a/editor/editor_scale.cpp
+++ b/editor/editor_scale.cpp
@@ -35,10 +35,9 @@
static float scale = 1.0;
void editor_set_scale(float p_scale) {
-
scale = p_scale;
}
-float editor_get_scale() {
+float editor_get_scale() {
return scale;
}
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index bccc38ca1b..eabbf6b0d8 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -29,9 +29,10 @@
/*************************************************************************/
#include "editor_sectioned_inspector.h"
+
#include "editor_scale.h"
-class SectionedInspectorFilter : public Object {
+class SectionedInspectorFilter : public Object {
GDCLASS(SectionedInspectorFilter, Object);
Object *edited;
@@ -39,9 +40,9 @@ class SectionedInspectorFilter : public Object {
bool allow_sub;
bool _set(const StringName &p_name, const Variant &p_value) {
-
- if (!edited)
+ if (!edited) {
return false;
+ }
String name = p_name;
if (section != "") {
@@ -54,9 +55,9 @@ class SectionedInspectorFilter : public Object {
}
bool _get(const StringName &p_name, Variant &r_ret) const {
-
- if (!edited)
+ if (!edited) {
return false;
+ }
String name = p_name;
if (section != "") {
@@ -69,19 +70,19 @@ class SectionedInspectorFilter : public Object {
return valid;
}
void _get_property_list(List<PropertyInfo> *p_list) const {
-
- if (!edited)
+ if (!edited) {
return;
+ }
List<PropertyInfo> pinfo;
edited->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
-
PropertyInfo pi = E->get();
int sp = pi.name.find("/");
- if (pi.name == "resource_path" || pi.name == "resource_name" || pi.name == "resource_local_to_scene" || pi.name.begins_with("script/") || pi.name.begins_with("_global_script")) //skip resource stuff
+ if (pi.name == "resource_path" || pi.name == "resource_name" || pi.name == "resource_local_to_scene" || pi.name.begins_with("script/") || pi.name.begins_with("_global_script")) { //skip resource stuff
continue;
+ }
if (sp == -1) {
pi.name = "global/" + pi.name;
@@ -89,33 +90,30 @@ class SectionedInspectorFilter : public Object {
if (pi.name.begins_with(section + "/")) {
pi.name = pi.name.replace_first(section + "/", "");
- if (!allow_sub && pi.name.find("/") != -1)
+ if (!allow_sub && pi.name.find("/") != -1) {
continue;
+ }
p_list->push_back(pi);
}
}
}
bool property_can_revert(const String &p_name) {
-
return edited->call("property_can_revert", section + "/" + p_name);
}
Variant property_get_revert(const String &p_name) {
-
return edited->call("property_get_revert", section + "/" + p_name);
}
protected:
static void _bind_methods() {
-
ClassDB::bind_method("property_can_revert", &SectionedInspectorFilter::property_can_revert);
ClassDB::bind_method("property_get_revert", &SectionedInspectorFilter::property_get_revert);
}
public:
void set_section(const String &p_section, bool p_allow_sub) {
-
section = p_section;
allow_sub = p_allow_sub;
_change_notify();
@@ -132,14 +130,13 @@ public:
};
void SectionedInspector::_bind_methods() {
-
ClassDB::bind_method("update_category_list", &SectionedInspector::update_category_list);
}
void SectionedInspector::_section_selected() {
-
- if (!sections->get_selected())
+ if (!sections->get_selected()) {
return;
+ }
selected_category = sections->get_selected()->get_metadata(0);
filter->set_section(selected_category, sections->get_selected()->get_children() == nullptr);
@@ -147,32 +144,30 @@ void SectionedInspector::_section_selected() {
}
void SectionedInspector::set_current_section(const String &p_section) {
-
if (section_map.has(p_section)) {
section_map[p_section]->select(0);
}
}
String SectionedInspector::get_current_section() const {
-
- if (sections->get_selected())
+ if (sections->get_selected()) {
return sections->get_selected()->get_metadata(0);
- else
+ } else {
return "";
+ }
}
String SectionedInspector::get_full_item_path(const String &p_item) {
-
String base = get_current_section();
- if (base != "")
+ if (base != "") {
return base + "/" + p_item;
- else
+ } else {
return p_item;
+ }
}
void SectionedInspector::edit(Object *p_object) {
-
if (!p_object) {
obj = ObjectID();
sections->clear();
@@ -188,7 +183,6 @@ void SectionedInspector::edit(Object *p_object) {
inspector->set_object_class(p_object->get_class());
if (obj != id) {
-
obj = id;
update_category_list();
@@ -197,26 +191,26 @@ void SectionedInspector::edit(Object *p_object) {
TreeItem *first_item = sections->get_root();
if (first_item) {
- while (first_item->get_children())
+ while (first_item->get_children()) {
first_item = first_item->get_children();
+ }
first_item->select(0);
selected_category = first_item->get_metadata(0);
}
} else {
-
update_category_list();
}
}
void SectionedInspector::update_category_list() {
-
sections->clear();
Object *o = ObjectDB::get_instance(obj);
- if (!o)
+ if (!o) {
return;
+ }
List<PropertyInfo> pinfo;
o->get_property_list(&pinfo);
@@ -227,27 +221,31 @@ void SectionedInspector::update_category_list() {
section_map[""] = root;
String filter;
- if (search_box)
+ if (search_box) {
filter = search_box->get_text();
+ }
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
-
PropertyInfo pi = E->get();
- if (pi.usage & PROPERTY_USAGE_CATEGORY)
+ if (pi.usage & PROPERTY_USAGE_CATEGORY) {
continue;
- else if (!(pi.usage & PROPERTY_USAGE_EDITOR))
+ } else if (!(pi.usage & PROPERTY_USAGE_EDITOR)) {
continue;
+ }
- if (pi.name.find(":") != -1 || pi.name == "script" || pi.name == "resource_name" || pi.name == "resource_path" || pi.name == "resource_local_to_scene" || pi.name.begins_with("_global_script"))
+ if (pi.name.find(":") != -1 || pi.name == "script" || pi.name == "resource_name" || pi.name == "resource_path" || pi.name == "resource_local_to_scene" || pi.name.begins_with("_global_script")) {
continue;
+ }
- if (!filter.empty() && !filter.is_subsequence_ofi(pi.name) && !filter.is_subsequence_ofi(pi.name.replace("/", " ").capitalize()))
+ if (!filter.empty() && !filter.is_subsequence_ofi(pi.name) && !filter.is_subsequence_ofi(pi.name.replace("/", " ").capitalize())) {
continue;
+ }
int sp = pi.name.find("/");
- if (sp == -1)
+ if (sp == -1) {
pi.name = "global/" + pi.name;
+ }
Vector<String> sectionarr = pi.name.split("/");
String metasection;
@@ -255,7 +253,6 @@ void SectionedInspector::update_category_list() {
int sc = MIN(2, sectionarr.size() - 1);
for (int i = 0; i < sc; i++) {
-
TreeItem *parent = section_map[metasection];
parent->set_custom_bg_color(0, get_theme_color("prop_subsection", "Editor"));
@@ -288,27 +285,23 @@ void SectionedInspector::update_category_list() {
}
void SectionedInspector::register_search_box(LineEdit *p_box) {
-
search_box = p_box;
inspector->register_text_enter(p_box);
search_box->connect("text_changed", callable_mp(this, &SectionedInspector::_search_changed));
}
void SectionedInspector::_search_changed(const String &p_what) {
-
update_category_list();
}
EditorInspector *SectionedInspector::get_inspector() {
-
return inspector;
}
SectionedInspector::SectionedInspector() :
sections(memnew(Tree)),
filter(memnew(SectionedInspectorFilter)),
- inspector(memnew(EditorInspector)),
- search_box(nullptr) {
+ inspector(memnew(EditorInspector)) {
add_theme_constant_override("autohide", 1); // Fixes the dragger always showing up
VBoxContainer *left_vb = memnew(VBoxContainer);
@@ -333,6 +326,5 @@ SectionedInspector::SectionedInspector() :
}
SectionedInspector::~SectionedInspector() {
-
memdelete(filter);
}
diff --git a/editor/editor_sectioned_inspector.h b/editor/editor_sectioned_inspector.h
index 7073b73751..dfc521302a 100644
--- a/editor/editor_sectioned_inspector.h
+++ b/editor/editor_sectioned_inspector.h
@@ -38,7 +38,6 @@
class SectionedInspectorFilter;
class SectionedInspector : public HSplitContainer {
-
GDCLASS(SectionedInspector, HSplitContainer);
ObjectID obj;
@@ -48,7 +47,7 @@ class SectionedInspector : public HSplitContainer {
Map<String, TreeItem *> section_map;
EditorInspector *inspector;
- LineEdit *search_box;
+ LineEdit *search_box = nullptr;
String selected_category;
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 5e34913cf0..5f293f1fb3 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -58,7 +58,6 @@ Ref<EditorSettings> EditorSettings::singleton = nullptr;
// Properties
bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) {
-
_THREAD_SAFE_METHOD_
bool changed = _set_only(p_name, p_value);
@@ -69,15 +68,12 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) {
}
bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value) {
-
_THREAD_SAFE_METHOD_
if (p_name.operator String() == "shortcuts") {
-
Array arr = p_value;
ERR_FAIL_COND_V(arr.size() && arr.size() & 1, true);
for (int i = 0; i < arr.size(); i += 2) {
-
String name = arr[i];
Ref<InputEvent> shortcut = arr[i + 1];
@@ -120,14 +116,11 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
}
bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
-
_THREAD_SAFE_METHOD_
if (p_name.operator String() == "shortcuts") {
-
Array arr;
for (const Map<String, Ref<ShortCut>>::Element *E = shortcuts.front(); E; E = E->next()) {
-
Ref<ShortCut> sc = E->get();
if (optimize_save) {
@@ -136,8 +129,9 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
}
Ref<InputEvent> original = sc->get_meta("original");
- if (sc->is_shortcut(original) || (original.is_null() && sc->get_shortcut().is_null()))
+ if (sc->is_shortcut(original) || (original.is_null() && sc->get_shortcut().is_null())) {
continue; //not changed from default, don't save
+ }
}
arr.push_back(E->key());
@@ -163,7 +157,6 @@ void EditorSettings::_initial_set(const StringName &p_name, const Variant &p_val
}
struct _EVCSort {
-
String name;
Variant::Type type;
int order;
@@ -174,18 +167,17 @@ struct _EVCSort {
};
void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
-
_THREAD_SAFE_METHOD_
const String *k = nullptr;
Set<_EVCSort> vclist;
while ((k = props.next(k))) {
-
const VariantContainer *v = props.getptr(*k);
- if (v->hide_from_editor)
+ if (v->hide_from_editor) {
continue;
+ }
_EVCSort vc;
vc.name = *k;
@@ -203,7 +195,6 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
}
for (Set<_EVCSort>::Element *E = vclist.front(); E; E = E->next()) {
-
int pinfo = 0;
if (E->get().save || !optimize_save) {
pinfo |= PROPERTY_USAGE_STORAGE;
@@ -217,8 +208,9 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
PropertyInfo pi(E->get().type, E->get().name);
pi.usage = pinfo;
- if (hints.has(E->get().name))
+ if (hints.has(E->get().name)) {
pi = hints[E->get().name];
+ }
if (E->get().restart_if_changed) {
pi.usage |= PROPERTY_USAGE_RESTART_IF_CHANGED;
@@ -231,7 +223,6 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
}
void EditorSettings::_add_property_info_bind(const Dictionary &p_info) {
-
ERR_FAIL_COND(!p_info.has("name"));
ERR_FAIL_COND(!p_info.has("type"));
@@ -241,26 +232,27 @@ void EditorSettings::_add_property_info_bind(const Dictionary &p_info) {
pinfo.type = Variant::Type(p_info["type"].operator int());
ERR_FAIL_INDEX(pinfo.type, Variant::VARIANT_MAX);
- if (p_info.has("hint"))
+ if (p_info.has("hint")) {
pinfo.hint = PropertyHint(p_info["hint"].operator int());
- if (p_info.has("hint_string"))
+ }
+ if (p_info.has("hint_string")) {
pinfo.hint_string = p_info["hint_string"];
+ }
add_property_hint(pinfo);
}
// Default configs
bool EditorSettings::has_default_value(const String &p_setting) const {
-
_THREAD_SAFE_METHOD_
- if (!props.has(p_setting))
+ if (!props.has(p_setting)) {
return false;
+ }
return props[p_setting].has_default_value;
}
void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
-
_THREAD_SAFE_METHOD_
/* Languages */
@@ -280,7 +272,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
EditorTranslationList *etl = _editor_translations;
while (etl->data) {
-
const String &locale = etl->lang;
// Skip locales which we can't render properly (see above comment).
@@ -512,17 +503,38 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/grid_map/pick_distance", 5000.0);
// 3D
- _initial_set("editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56));
- hints["editors/3d/primary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/primary_grid_color", PROPERTY_HINT_COLOR_NO_ALPHA, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
-
- _initial_set("editors/3d/secondary_grid_color", Color(0.38, 0.38, 0.38));
- hints["editors/3d/secondary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/secondary_grid_color", PROPERTY_HINT_COLOR_NO_ALPHA, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ _initial_set("editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5));
+ hints["editors/3d/primary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/primary_grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
- _initial_set("editors/3d/grid_size", 50);
- hints["editors/3d/grid_size"] = PropertyInfo(Variant::INT, "editors/3d/grid_size", PROPERTY_HINT_RANGE, "1,500,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ _initial_set("editors/3d/secondary_grid_color", Color(0.38, 0.38, 0.38, 0.5));
+ hints["editors/3d/secondary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/secondary_grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
+ // If a line is a multiple of this, it uses the primary grid color.
_initial_set("editors/3d/primary_grid_steps", 10);
- hints["editors/3d/primary_grid_steps"] = PropertyInfo(Variant::INT, "editors/3d/primary_grid_steps", PROPERTY_HINT_RANGE, "1,100,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["editors/3d/primary_grid_steps"] = PropertyInfo(Variant::INT, "editors/3d/primary_grid_steps", PROPERTY_HINT_RANGE, "1,100,1", PROPERTY_USAGE_DEFAULT);
+
+ // At 1000, the grid mostly looks like it has no edge.
+ _initial_set("editors/3d/grid_size", 200);
+ hints["editors/3d/grid_size"] = PropertyInfo(Variant::INT, "editors/3d/grid_size", PROPERTY_HINT_RANGE, "1,2000,1", PROPERTY_USAGE_DEFAULT);
+
+ // Default largest grid size is 100m, 10^2 (primary grid lines are 1km apart when primary_grid_steps is 10).
+ _initial_set("editors/3d/grid_division_level_max", 2);
+ // Higher values produce graphical artifacts when far away unless View Z-Far
+ // is increased significantly more than it really should need to be.
+ hints["editors/3d/grid_division_level_max"] = PropertyInfo(Variant::INT, "editors/3d/grid_division_level_max", PROPERTY_HINT_RANGE, "-1,3,1", PROPERTY_USAGE_DEFAULT);
+
+ // Default smallest grid size is 1cm, 10^-2.
+ _initial_set("editors/3d/grid_division_level_min", -2);
+ // Lower values produce graphical artifacts regardless of view clipping planes, so limit to -2 as a lower bound.
+ hints["editors/3d/grid_division_level_min"] = PropertyInfo(Variant::INT, "editors/3d/grid_division_level_min", PROPERTY_HINT_RANGE, "-2,2,1", PROPERTY_USAGE_DEFAULT);
+
+ // -0.2 seems like a sensible default. -1.0 gives Blender-like behavior, 0.5 gives huge grids.
+ _initial_set("editors/3d/grid_division_level_bias", -0.2);
+ hints["editors/3d/grid_division_level_bias"] = PropertyInfo(Variant::FLOAT, "editors/3d/grid_division_level_bias", PROPERTY_HINT_RANGE, "-1.0,0.5,0.1", PROPERTY_USAGE_DEFAULT);
+
+ _initial_set("editors/3d/grid_xz_plane", true);
+ _initial_set("editors/3d/grid_xy_plane", false);
+ _initial_set("editors/3d/grid_yz_plane", false);
_initial_set("editors/3d/default_fov", 70.0);
_initial_set("editors/3d/default_z_near", 0.05);
@@ -640,24 +652,19 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["project_manager/sorting_order"] = PropertyInfo(Variant::INT, "project_manager/sorting_order", PROPERTY_HINT_ENUM, "Name,Path,Last Edited");
if (p_extra_config.is_valid()) {
-
if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
-
Vector<String> list = p_extra_config->get_value("init_projects", "list");
for (int i = 0; i < list.size(); i++) {
-
String name = list[i].replace("/", "::");
set("projects/" + name, list[i]);
};
};
if (p_extra_config->has_section("presets")) {
-
List<String> keys;
p_extra_config->get_section_keys("presets", &keys);
for (List<String>::Element *E = keys.front(); E; E = E->next()) {
-
String key = E->get();
Variant val = p_extra_config->get_value("presets", key);
set(key, val);
@@ -667,7 +674,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
}
void EditorSettings::_load_default_text_editor_theme() {
-
bool dark_theme = is_dark_theme();
_initial_set("text_editor/highlighting/symbol_color", Color(0.73, 0.87, 1.0));
@@ -751,7 +757,6 @@ static Dictionary _get_builtin_script_templates() {
}
static void _create_script_templates(const String &p_path) {
-
Dictionary templates = _get_builtin_script_templates();
List<Variant> keys;
templates.get_key_list(&keys);
@@ -775,14 +780,13 @@ static void _create_script_templates(const String &p_path) {
// PUBLIC METHODS
EditorSettings *EditorSettings::get_singleton() {
-
return singleton.ptr();
}
void EditorSettings::create() {
-
- if (singleton.ptr())
+ if (singleton.ptr()) {
return; //pointless
+ }
DirAccess *dir = nullptr;
@@ -815,7 +819,6 @@ void EditorSettings::create() {
memdelete(d);
if (self_contained) {
-
// editor is self contained, all in same folder
data_path = exe_path;
data_dir = data_path.plus_file("editor_data");
@@ -824,7 +827,6 @@ void EditorSettings::create() {
cache_path = exe_path;
cache_dir = data_dir.plus_file("cache");
} else {
-
// Typically XDG_DATA_HOME or %APPDATA%
data_path = OS::get_singleton()->get_data_path();
data_dir = data_path.plus_file(OS::get_singleton()->get_godot_dir_name());
@@ -845,7 +847,6 @@ void EditorSettings::create() {
String config_file_path;
if (data_path != "" && config_path != "" && cache_path != "") {
-
// Validate/create data dir and subdirectories
dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
@@ -916,8 +917,9 @@ void EditorSettings::create() {
dir->change_dir("projects");
String project_config_dir = ProjectSettings::get_singleton()->get_resource_path();
- if (project_config_dir.ends_with("/"))
+ if (project_config_dir.ends_with("/")) {
project_config_dir = config_path.substr(0, project_config_dir.size() - 1);
+ }
project_config_dir = project_config_dir.get_file() + "-" + project_config_dir.md5_text();
if (dir->change_dir(project_config_dir) != OK) {
@@ -967,7 +969,6 @@ fail:
if (extra_config->has_section("init_projects")) {
Vector<String> list = extra_config->get_value("init_projects", "list");
for (int i = 0; i < list.size(); i++) {
-
list.write[i] = exe_path.plus_file(list[i]);
};
extra_config->set_value("init_projects", "list", list);
@@ -986,10 +987,10 @@ fail:
}
void EditorSettings::setup_language() {
-
String lang = get("interface/editor/editor_language");
- if (lang == "en")
+ if (lang == "en") {
return; // Default, nothing to do.
+ }
// Load editor translation for configured/detected locale.
EditorTranslationList *etl = _editor_translations;
@@ -1039,7 +1040,6 @@ void EditorSettings::setup_language() {
}
void EditorSettings::setup_network() {
-
List<IP_Address> local_ip;
IP::get_singleton()->get_local_addresses(&local_ip);
String hint;
@@ -1048,20 +1048,23 @@ void EditorSettings::setup_network() {
// Check that current remote_host is a valid interface address and populate hints.
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
-
String ip = E->get();
// link-local IPv6 addresses don't work, skipping them
- if (ip.begins_with("fe80:0:0:0:")) // fe80::/64
+ if (ip.begins_with("fe80:0:0:0:")) { // fe80::/64
continue;
+ }
// Same goes for IPv4 link-local (APIPA) addresses.
- if (ip.begins_with("169.254.")) // 169.254.0.0/16
+ if (ip.begins_with("169.254.")) { // 169.254.0.0/16
continue;
+ }
// Select current IP (found)
- if (ip == current)
+ if (ip == current) {
selected = ip;
- if (hint != "")
+ }
+ if (hint != "") {
hint += ",";
+ }
hint += ip;
}
@@ -1072,11 +1075,11 @@ void EditorSettings::setup_network() {
}
void EditorSettings::save() {
-
//_THREAD_SAFE_METHOD_
- if (!singleton.ptr())
+ if (!singleton.ptr()) {
return;
+ }
if (singleton->config_file_path == "") {
ERR_PRINT("Cannot save EditorSettings config, no valid path");
@@ -1093,15 +1096,14 @@ void EditorSettings::save() {
}
void EditorSettings::destroy() {
-
- if (!singleton.ptr())
+ if (!singleton.ptr()) {
return;
+ }
save();
singleton = Ref<EditorSettings>();
}
void EditorSettings::set_optimize_save(bool p_optimize) {
-
optimize_save = p_optimize;
}
@@ -1118,14 +1120,12 @@ Variant EditorSettings::get_setting(const String &p_setting) const {
}
bool EditorSettings::has_setting(const String &p_setting) const {
-
_THREAD_SAFE_METHOD_
return props.has(p_setting);
}
void EditorSettings::erase(const String &p_setting) {
-
_THREAD_SAFE_METHOD_
props.erase(p_setting);
@@ -1141,17 +1141,18 @@ void EditorSettings::raise_order(const String &p_setting) {
void EditorSettings::set_restart_if_changed(const StringName &p_setting, bool p_restart) {
_THREAD_SAFE_METHOD_
- if (!props.has(p_setting))
+ if (!props.has(p_setting)) {
return;
+ }
props[p_setting].restart_if_changed = p_restart;
}
void EditorSettings::set_initial_value(const StringName &p_setting, const Variant &p_value, bool p_update_current) {
-
_THREAD_SAFE_METHOD_
- if (!props.has(p_setting))
+ if (!props.has(p_setting)) {
return;
+ }
props[p_setting].initial = p_value;
props[p_setting].has_default_value = true;
if (p_update_current) {
@@ -1160,7 +1161,6 @@ void EditorSettings::set_initial_value(const StringName &p_setting, const Varian
}
Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_restart_if_changed) {
-
Variant ret = p_default;
if (EditorSettings::get_singleton()->has_setting(p_setting)) {
ret = EditorSettings::get_singleton()->get(p_setting);
@@ -1177,32 +1177,31 @@ Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_re
}
Variant _EDITOR_GET(const String &p_setting) {
-
ERR_FAIL_COND_V(!EditorSettings::get_singleton()->has_setting(p_setting), Variant());
return EditorSettings::get_singleton()->get(p_setting);
}
bool EditorSettings::property_can_revert(const String &p_setting) {
-
- if (!props.has(p_setting))
+ if (!props.has(p_setting)) {
return false;
+ }
- if (!props[p_setting].has_default_value)
+ if (!props[p_setting].has_default_value) {
return false;
+ }
return props[p_setting].initial != props[p_setting].variant;
}
Variant EditorSettings::property_get_revert(const String &p_setting) {
-
- if (!props.has(p_setting) || !props[p_setting].has_default_value)
+ if (!props.has(p_setting) || !props[p_setting].has_default_value) {
return Variant();
+ }
return props[p_setting].initial;
}
void EditorSettings::add_property_hint(const PropertyInfo &p_hint) {
-
_THREAD_SAFE_METHOD_
hints[p_hint.name] = p_hint;
@@ -1211,51 +1210,42 @@ void EditorSettings::add_property_hint(const PropertyInfo &p_hint) {
// Data directories
String EditorSettings::get_data_dir() const {
-
return data_dir;
}
String EditorSettings::get_templates_dir() const {
-
return get_data_dir().plus_file("templates");
}
// Config directories
String EditorSettings::get_settings_dir() const {
-
return settings_dir;
}
String EditorSettings::get_project_settings_dir() const {
-
return get_settings_dir().plus_file("projects").plus_file(project_config_dir);
}
String EditorSettings::get_text_editor_themes_dir() const {
-
return get_settings_dir().plus_file("text_editor_themes");
}
String EditorSettings::get_script_templates_dir() const {
-
return get_settings_dir().plus_file("script_templates");
}
String EditorSettings::get_project_script_templates_dir() const {
-
return ProjectSettings::get_singleton()->get("editor/script_templates_search_path");
}
// Cache directory
String EditorSettings::get_cache_dir() const {
-
return cache_dir;
}
String EditorSettings::get_feature_profiles_dir() const {
-
return get_settings_dir().plus_file("feature_profiles");
}
@@ -1283,39 +1273,36 @@ Variant EditorSettings::get_project_metadata(const String &p_section, const Stri
}
void EditorSettings::set_favorites(const Vector<String> &p_favorites) {
-
favorites = p_favorites;
FileAccess *f = FileAccess::open(get_project_settings_dir().plus_file("favorites"), FileAccess::WRITE);
if (f) {
- for (int i = 0; i < favorites.size(); i++)
+ for (int i = 0; i < favorites.size(); i++) {
f->store_line(favorites[i]);
+ }
memdelete(f);
}
}
Vector<String> EditorSettings::get_favorites() const {
-
return favorites;
}
void EditorSettings::set_recent_dirs(const Vector<String> &p_recent_dirs) {
-
recent_dirs = p_recent_dirs;
FileAccess *f = FileAccess::open(get_project_settings_dir().plus_file("recent_dirs"), FileAccess::WRITE);
if (f) {
- for (int i = 0; i < recent_dirs.size(); i++)
+ for (int i = 0; i < recent_dirs.size(); i++) {
f->store_line(recent_dirs[i]);
+ }
memdelete(f);
}
}
Vector<String> EditorSettings::get_recent_dirs() const {
-
return recent_dirs;
}
void EditorSettings::load_favorites() {
-
FileAccess *f = FileAccess::open(get_project_settings_dir().plus_file("favorites"), FileAccess::READ);
if (f) {
String line = f->get_line().strip_edges();
@@ -1398,7 +1385,6 @@ void EditorSettings::load_text_editor_theme() {
// don't load if it's not already there!
if (has_setting("text_editor/highlighting/" + key)) {
-
// make sure it is actually a color
if (val.is_valid_html_color() && key.find("color") >= 0) {
props["text_editor/highlighting/" + key].variant = Color::html(val); // change manually to prevent "Settings changed" console spam
@@ -1410,7 +1396,6 @@ void EditorSettings::load_text_editor_theme() {
}
bool EditorSettings::import_text_editor_theme(String p_file) {
-
if (!p_file.ends_with(".tet")) {
return false;
} else {
@@ -1429,7 +1414,6 @@ bool EditorSettings::import_text_editor_theme(String p_file) {
}
bool EditorSettings::save_text_editor_theme() {
-
String p_file = get("text_editor/theme/color_theme");
if (_is_default_text_editor_theme(p_file.get_file().to_lower())) {
@@ -1448,7 +1432,6 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
return false;
}
if (_save_text_editor_theme(p_file)) {
-
// switch to theme is saved in the theme directory
list_text_editor_themes();
String theme_name = p_file.substr(0, p_file.length() - 4).get_file();
@@ -1468,7 +1451,6 @@ bool EditorSettings::is_default_text_editor_theme() {
}
Vector<String> EditorSettings::get_script_templates(const String &p_extension, const String &p_custom_path) {
-
Vector<String> templates;
String template_dir = get_script_templates_dir();
if (!p_custom_path.empty()) {
@@ -1491,19 +1473,16 @@ Vector<String> EditorSettings::get_script_templates(const String &p_extension, c
}
String EditorSettings::get_editor_layouts_config() const {
-
return get_settings_dir().plus_file("editor_layouts.cfg");
}
// Shortcuts
void EditorSettings::add_shortcut(const String &p_name, Ref<ShortCut> &p_shortcut) {
-
shortcuts[p_name] = p_shortcut;
}
bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const {
-
const Map<String, Ref<ShortCut>>::Element *E = shortcuts.find(p_name);
ERR_FAIL_COND_V_MSG(!E, false, "Unknown Shortcut: " + p_name + ".");
@@ -1511,24 +1490,21 @@ bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_
}
Ref<ShortCut> EditorSettings::get_shortcut(const String &p_name) const {
-
const Map<String, Ref<ShortCut>>::Element *E = shortcuts.find(p_name);
- if (!E)
+ if (!E) {
return Ref<ShortCut>();
+ }
return E->get();
}
void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) {
-
for (const Map<String, Ref<ShortCut>>::Element *E = shortcuts.front(); E; E = E->next()) {
-
r_shortcuts->push_back(E->key());
}
}
Ref<ShortCut> ED_GET_SHORTCUT(const String &p_path) {
-
if (!EditorSettings::get_singleton()) {
return nullptr;
}
@@ -1546,7 +1522,6 @@ struct ShortCutMapping {
};
Ref<ShortCut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p_keycode) {
-
#ifdef OSX_ENABLED
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
if (p_keycode == KEY_DELETE) {
@@ -1577,7 +1552,6 @@ Ref<ShortCut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p
Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(p_path);
if (sc.is_valid()) {
-
sc->set_name(p_name); //keep name (the ones that come from disk have no name)
sc->set_meta("original", ie); //to compare against changes
return sc;
@@ -1593,7 +1567,6 @@ Ref<ShortCut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p
}
void EditorSettings::notify_changes() {
-
_THREAD_SAFE_METHOD_
SceneTree *sml = Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop());
@@ -1611,7 +1584,6 @@ void EditorSettings::notify_changes() {
}
void EditorSettings::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("has_setting", "name"), &EditorSettings::has_setting);
ClassDB::bind_method(D_METHOD("set_setting", "name", "value"), &EditorSettings::set_setting);
ClassDB::bind_method(D_METHOD("get_setting", "name"), &EditorSettings::get_setting);
@@ -1638,7 +1610,6 @@ void EditorSettings::_bind_methods() {
}
EditorSettings::EditorSettings() {
-
last_order = 0;
optimize_save = true;
save_changed_setting = true;
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 29b89ef1a8..13aebb7ea6 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -42,7 +42,6 @@
class EditorPlugin;
class EditorSettings : public Resource {
-
GDCLASS(EditorSettings, Resource);
private:
@@ -50,7 +49,6 @@ private:
public:
struct Plugin {
-
EditorPlugin *instance;
String path;
String name;
@@ -64,27 +62,19 @@ public:
private:
struct VariantContainer {
- int order;
+ int order = 0;
Variant variant;
Variant initial;
- bool has_default_value;
- bool hide_from_editor;
- bool save;
- bool restart_if_changed;
- VariantContainer() :
- order(0),
- has_default_value(false),
- hide_from_editor(false),
- save(false),
- restart_if_changed(false) {
- }
+ bool has_default_value = false;
+ bool hide_from_editor = false;
+ bool save = false;
+ bool restart_if_changed = false;
+
+ VariantContainer() {}
+
VariantContainer(const Variant &p_variant, int p_order) :
order(p_order),
- variant(p_variant),
- has_default_value(false),
- hide_from_editor(false),
- save(false),
- restart_if_changed(false) {
+ variant(p_variant) {
}
};
@@ -148,10 +138,11 @@ public:
void set_initial_value(const StringName &p_setting, const Variant &p_value, bool p_update_current = false);
void set_restart_if_changed(const StringName &p_setting, bool p_restart);
void set_manually(const StringName &p_setting, const Variant &p_value, bool p_emit_signal = false) {
- if (p_emit_signal)
+ if (p_emit_signal) {
_set(p_setting, p_value);
- else
+ } else {
_set_only(p_setting, p_value);
+ }
}
bool property_can_revert(const String &p_setting);
Variant property_get_revert(const String &p_setting);
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 2c70e16610..67d92c4839 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -47,16 +47,14 @@ String EditorSpinSlider::get_text_value() const {
}
void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
-
- if (read_only)
+ if (read_only) {
return;
+ }
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
-
if (mb->get_button_index() == BUTTON_LEFT) {
if (mb->is_pressed()) {
-
if (updown_offset != -1 && mb->get_position().x > updown_offset) {
//there is an updown, so use it.
if (mb->get_position().y < get_size().height / 2) {
@@ -66,7 +64,6 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
}
return;
} else {
-
grabbing_spinner_attempt = true;
grabbing_spinner_dist_cache = 0;
pre_grab_value = get_value();
@@ -74,11 +71,8 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
grabbing_spinner_mouse_pos = Input::get_singleton()->get_mouse_position();
}
} else {
-
if (grabbing_spinner_attempt) {
-
if (grabbing_spinner) {
-
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
Input::get_singleton()->warp_mouse_position(grabbing_spinner_mouse_pos);
update();
@@ -91,17 +85,15 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
}
}
} else if (mb->get_button_index() == BUTTON_WHEEL_UP || mb->get_button_index() == BUTTON_WHEEL_DOWN) {
-
- if (grabber->is_visible())
+ if (grabber->is_visible()) {
call_deferred("update");
+ }
}
}
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
-
if (grabbing_spinner_attempt) {
-
double diff_x = mm->get_relative().x;
if (mm->get_shift() && grabbing_spinner) {
diff_x *= 0.1;
@@ -150,12 +142,10 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
}
void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> mb = p_event;
if (grabbing_grabber) {
if (mb.is_valid()) {
-
if (mb->get_button_index() == BUTTON_WHEEL_UP) {
set_value(get_value() + get_step());
mousewheel_over_grabber = true;
@@ -167,9 +157,7 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
}
if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT) {
-
if (mb->is_pressed()) {
-
grabbing_grabber = true;
if (!mousewheel_over_grabber) {
grabbing_ratio = get_as_ratio();
@@ -183,8 +171,9 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && grabbing_grabber) {
- if (mousewheel_over_grabber)
+ if (mousewheel_over_grabber) {
return;
+ }
float grabbing_ofs = (grabber->get_transform().xform(mm->get_position()).x - grabbing_from) / float(grabber_range);
set_as_ratio(grabbing_ratio + grabbing_ofs);
@@ -193,11 +182,11 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
}
void EditorSpinSlider::_notification(int p_what) {
-
if (p_what == NOTIFICATION_WM_FOCUS_OUT ||
p_what == NOTIFICATION_WM_FOCUS_IN ||
p_what == NOTIFICATION_EXIT_TREE) {
if (grabbing_spinner) {
+ grabber->hide();
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
grabbing_spinner = false;
grabbing_spinner_attempt = false;
@@ -218,7 +207,6 @@ void EditorSpinSlider::_notification(int p_what) {
}
if (p_what == NOTIFICATION_DRAW) {
-
updown_offset = -1;
Ref<StyleBox> sb = get_theme_stylebox("normal", "LineEdit");
@@ -324,12 +312,10 @@ void EditorSpinSlider::_notification(int p_what) {
}
if (p_what == NOTIFICATION_MOUSE_ENTER) {
-
mouse_over_spin = true;
update();
}
if (p_what == NOTIFICATION_MOUSE_EXIT) {
-
mouse_over_spin = false;
update();
}
@@ -342,7 +328,6 @@ void EditorSpinSlider::_notification(int p_what) {
}
Size2 EditorSpinSlider::get_minimum_size() const {
-
Ref<StyleBox> sb = get_theme_stylebox("normal", "LineEdit");
Ref<Font> font = get_theme_font("font", "LineEdit");
@@ -380,8 +365,9 @@ void EditorSpinSlider::_evaluate_input_text() {
}
Variant v = expr->execute(Array(), nullptr, false);
- if (v.get_type() == Variant::NIL)
+ if (v.get_type() == Variant::NIL) {
return;
+ }
set_value(v);
}
@@ -399,10 +385,10 @@ void EditorSpinSlider::_value_input_closed() {
//focus_exited signal
void EditorSpinSlider::_value_focus_exited() {
-
// discontinue because the focus_exit was caused by right-click context menu
- if (value_input->get_menu()->is_visible())
+ if (value_input->get_menu()->is_visible()) {
return;
+ }
_evaluate_input_text();
// focus is not on the same element after the vlalue_input was exited
@@ -429,7 +415,6 @@ void EditorSpinSlider::_grabber_mouse_exited() {
}
void EditorSpinSlider::set_read_only(bool p_enable) {
-
read_only = p_enable;
update();
}
@@ -439,7 +424,6 @@ bool EditorSpinSlider::is_read_only() const {
}
void EditorSpinSlider::set_flat(bool p_enable) {
-
flat = p_enable;
update();
}
@@ -483,7 +467,6 @@ void EditorSpinSlider::_bind_methods() {
}
EditorSpinSlider::EditorSpinSlider() {
-
flat = false;
grabbing_spinner_attempt = false;
grabbing_spinner = false;
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
index 1205e0b37c..a9b1a28092 100644
--- a/editor/editor_sub_scene.cpp
+++ b/editor/editor_sub_scene.cpp
@@ -35,13 +35,11 @@
#include "scene/resources/packed_scene.h"
void EditorSubScene::_path_selected(const String &p_path) {
-
path->set_text(p_path);
_path_changed(p_path);
}
void EditorSubScene::_path_changed(const String &p_path) {
-
tree->clear();
if (scene) {
@@ -49,29 +47,30 @@ void EditorSubScene::_path_changed(const String &p_path) {
scene = nullptr;
}
- if (p_path == "")
+ if (p_path == "") {
return;
+ }
Ref<PackedScene> ps = ResourceLoader::load(p_path, "PackedScene");
- if (ps.is_null())
+ if (ps.is_null()) {
return;
+ }
scene = ps->instance();
- if (!scene)
+ if (!scene) {
return;
+ }
_fill_tree(scene, nullptr);
}
void EditorSubScene::_path_browse() {
-
file_dialog->popup_centered_ratio();
}
void EditorSubScene::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
-
if (is_visible() && scene == nullptr) {
_path_browse();
}
@@ -79,7 +78,6 @@ void EditorSubScene::_notification(int p_what) {
}
void EditorSubScene::_fill_tree(Node *p_node, TreeItem *p_parent) {
-
TreeItem *it = tree->create_item(p_parent);
it->set_metadata(0, p_node);
it->set_text(0, p_node->get_name());
@@ -88,10 +86,10 @@ void EditorSubScene::_fill_tree(Node *p_node, TreeItem *p_parent) {
it->set_icon(0, EditorNode::get_singleton()->get_object_icon(p_node, "Node"));
for (int i = 0; i < p_node->get_child_count(); i++) {
-
Node *c = p_node->get_child(i);
- if (c->get_owner() != scene)
+ if (c->get_owner() != scene) {
continue;
+ }
_fill_tree(c, it);
}
}
@@ -114,8 +112,9 @@ void EditorSubScene::_item_multi_selected(Object *p_object, int p_cell, bool p_s
Node *n = item->get_metadata(0);
- if (!n)
+ if (!n) {
return;
+ }
if (p_selected) {
if (n == scene) {
is_root = true;
@@ -125,8 +124,9 @@ void EditorSubScene::_item_multi_selected(Object *p_object, int p_cell, bool p_s
} else {
List<Node *>::Element *E = selection.find(n);
- if (E)
+ if (E) {
selection.erase(E);
+ }
}
}
}
@@ -165,13 +165,10 @@ void EditorSubScene::ok_pressed() {
}
void EditorSubScene::_reown(Node *p_node, List<Node *> *p_to_reown) {
-
if (p_node == scene) {
-
scene->set_filename("");
p_to_reown->push_back(p_node);
} else if (p_node->get_owner() == scene) {
-
p_to_reown->push_back(p_node);
}
@@ -214,18 +211,15 @@ void EditorSubScene::move(Node *p_new_parent, Node *p_new_owner) {
}
void EditorSubScene::clear() {
-
path->set_text("");
_path_changed("");
}
void EditorSubScene::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("subscene_selected"));
}
EditorSubScene::EditorSubScene() {
-
scene = nullptr;
is_root = false;
@@ -262,7 +256,6 @@ EditorSubScene::EditorSubScene() {
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions);
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
-
file_dialog->add_filter("*." + E->get());
}
diff --git a/editor/editor_sub_scene.h b/editor/editor_sub_scene.h
index 5c3b4377d4..cd88805254 100644
--- a/editor/editor_sub_scene.h
+++ b/editor/editor_sub_scene.h
@@ -36,7 +36,6 @@
#include "scene/gui/tree.h"
class EditorSubScene : public ConfirmationDialog {
-
GDCLASS(EditorSubScene, ConfirmationDialog);
List<Node *> selection;
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 0ef173f074..ace106cd3e 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -86,7 +86,6 @@ static Ref<StyleBoxLine> make_line_stylebox(Color p_color, int p_thickness = 1,
}
Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float p_scale = EDSCALE, bool p_force_filter = false) {
-
Ref<ImageTexture> icon = memnew(ImageTexture);
Ref<Image> img = memnew(Image);
@@ -106,7 +105,6 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float
#endif
void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = true, int p_thumb_size = 32, bool p_only_thumbs = false) {
-
#ifdef MODULE_SVG_ENABLED
// The default icon theme is designed to be used for a dark theme.
// This dictionary stores color codes to convert to other colors
@@ -255,7 +253,6 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
}
Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
-
Ref<Theme> theme = Ref<Theme>(memnew(Theme));
const float default_contrast = 0.25;
diff --git a/editor/editor_vcs_interface.cpp b/editor/editor_vcs_interface.cpp
index 6f3a8d9ea7..4b13a5dd89 100644
--- a/editor/editor_vcs_interface.cpp
+++ b/editor/editor_vcs_interface.cpp
@@ -33,7 +33,6 @@
EditorVCSInterface *EditorVCSInterface::singleton = nullptr;
void EditorVCSInterface::_bind_methods() {
-
// Proxy end points that act as fallbacks to unavailability of a function in the VCS addon
ClassDB::bind_method(D_METHOD("_initialize", "project_root_path"), &EditorVCSInterface::_initialize);
ClassDB::bind_method(D_METHOD("_is_vcs_initialized"), &EditorVCSInterface::_is_vcs_initialized);
@@ -62,18 +61,15 @@ void EditorVCSInterface::_bind_methods() {
}
bool EditorVCSInterface::_initialize(String p_project_root_path) {
-
WARN_PRINT("Selected VCS addon does not implement an initialization function. This warning will be suppressed.");
return true;
}
bool EditorVCSInterface::_is_vcs_initialized() {
-
return false;
}
Dictionary EditorVCSInterface::_get_modified_files_data() {
-
return Dictionary();
}
@@ -87,96 +83,76 @@ void EditorVCSInterface::_commit(String p_msg) {
}
Array EditorVCSInterface::_get_file_diff(String p_file_path) {
-
return Array();
}
bool EditorVCSInterface::_shut_down() {
-
return false;
}
String EditorVCSInterface::_get_project_name() {
-
return String();
}
String EditorVCSInterface::_get_vcs_name() {
-
return "";
}
bool EditorVCSInterface::initialize(String p_project_root_path) {
-
is_initialized = call("_initialize", p_project_root_path);
return is_initialized;
}
bool EditorVCSInterface::is_vcs_initialized() {
-
return call("_is_vcs_initialized");
}
Dictionary EditorVCSInterface::get_modified_files_data() {
-
return call("_get_modified_files_data");
}
void EditorVCSInterface::stage_file(String p_file_path) {
-
if (is_addon_ready()) {
-
call("_stage_file", p_file_path);
}
}
void EditorVCSInterface::unstage_file(String p_file_path) {
-
if (is_addon_ready()) {
-
call("_unstage_file", p_file_path);
}
}
bool EditorVCSInterface::is_addon_ready() {
-
return is_initialized;
}
void EditorVCSInterface::commit(String p_msg) {
-
if (is_addon_ready()) {
-
call("_commit", p_msg);
}
}
Array EditorVCSInterface::get_file_diff(String p_file_path) {
-
if (is_addon_ready()) {
-
return call("_get_file_diff", p_file_path);
}
return Array();
}
bool EditorVCSInterface::shut_down() {
-
return call("_shut_down");
}
String EditorVCSInterface::get_project_name() {
-
return call("_get_project_name");
}
String EditorVCSInterface::get_vcs_name() {
-
return call("_get_vcs_name");
}
EditorVCSInterface::EditorVCSInterface() {
-
is_initialized = false;
}
@@ -184,11 +160,9 @@ EditorVCSInterface::~EditorVCSInterface() {
}
EditorVCSInterface *EditorVCSInterface::get_singleton() {
-
return singleton;
}
void EditorVCSInterface::set_singleton(EditorVCSInterface *p_singleton) {
-
singleton = p_singleton;
}
diff --git a/editor/editor_vcs_interface.h b/editor/editor_vcs_interface.h
index 85d5e30367..ee9e51441d 100644
--- a/editor/editor_vcs_interface.h
+++ b/editor/editor_vcs_interface.h
@@ -36,7 +36,6 @@
#include "scene/gui/panel_container.h"
class EditorVCSInterface : public Object {
-
GDCLASS(EditorVCSInterface, Object)
bool is_initialized;
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index f52e340a26..fb12c15913 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -42,7 +42,6 @@
#include "scene/gui/link_button.h"
void ExportTemplateManager::_update_template_list() {
-
while (current_hb->get_child_count()) {
memdelete(current_hb->get_child(0));
}
@@ -57,7 +56,6 @@ void ExportTemplateManager::_update_template_list() {
Set<String> templates;
d->list_dir_begin();
if (err == OK) {
-
String c = d->get_next();
while (c != String()) {
if (d->current_is_dir() && !c.begins_with(".")) {
@@ -118,7 +116,6 @@ void ExportTemplateManager::_update_template_list() {
}
for (Set<String>::Element *E = templates.back(); E; E = E->prev()) {
-
HBoxContainer *hbc = memnew(HBoxContainer);
Label *version = memnew(Label);
version->set_modulate(current->get_theme_color("disabled_font_color", "Editor"));
@@ -141,7 +138,6 @@ void ExportTemplateManager::_update_template_list() {
}
void ExportTemplateManager::_download_template(const String &p_version) {
-
while (template_list->get_child_count()) {
memdelete(template_list->get_child(0));
}
@@ -155,14 +151,12 @@ void ExportTemplateManager::_download_template(const String &p_version) {
}
void ExportTemplateManager::_uninstall_template(const String &p_version) {
-
remove_confirm->set_text(vformat(TTR("Remove template version '%s'?"), p_version));
remove_confirm->popup_centered();
to_remove = p_version;
}
void ExportTemplateManager::_uninstall_template_confirm() {
-
DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir();
Error err = da->change_dir(templates_dir);
@@ -181,7 +175,6 @@ void ExportTemplateManager::_uninstall_template_confirm() {
}
bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_progress) {
-
// unzClose() will take care of closing the file stored in the unzFile,
// so we don't need to `memdelete(fa)` in this method.
FileAccess *fa = nullptr;
@@ -189,7 +182,6 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io);
if (!pkg) {
-
EditorNode::get_singleton()->show_warning(TTR("Can't open export templates zip."));
return false;
}
@@ -200,7 +192,6 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
String contents_dir;
while (ret == UNZ_OK) {
-
unz_file_info info;
char fname[16384];
ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0);
@@ -208,7 +199,6 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
String file = fname;
if (file.ends_with("version.txt")) {
-
Vector<uint8_t> data;
data.resize(info.uncompressed_size);
@@ -266,7 +256,6 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
fc = 0;
while (ret == UNZ_OK) {
-
//get filename
unz_file_info info;
char fname[16384];
@@ -340,18 +329,15 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
}
void ExportTemplateManager::popup_manager() {
-
_update_template_list();
popup_centered(Size2(400, 400) * EDSCALE);
}
void ExportTemplateManager::ok_pressed() {
-
template_open->popup_centered_ratio();
}
void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
-
if (p_status != HTTPRequest::RESULT_SUCCESS || p_code != 200) {
EditorNode::get_singleton()->show_warning(TTR("Error getting the list of mirrors."));
return;
@@ -396,10 +382,9 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_
return;
}
}
-void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
+void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
switch (p_status) {
-
case HTTPRequest::RESULT_CANT_RESOLVE: {
template_list_state->set_text(TTR("Can't resolve."));
} break;
@@ -445,7 +430,6 @@ void ExportTemplateManager::_http_download_templates_completed(int p_status, int
}
void ExportTemplateManager::_begin_template_download(const String &p_url) {
-
if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
OS::get_singleton()->shell_open(p_url);
return;
@@ -482,14 +466,12 @@ void ExportTemplateManager::_window_template_downloader_closed() {
}
void ExportTemplateManager::_notification(int p_what) {
-
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (!is_visible()) {
set_process(false);
}
}
if (p_what == NOTIFICATION_PROCESS) {
-
update_countdown -= get_process_delta_time();
if (update_countdown > 0) {
@@ -552,13 +534,11 @@ void ExportTemplateManager::_notification(int p_what) {
}
bool ExportTemplateManager::can_install_android_template() {
-
const String templates_dir = EditorSettings::get_singleton()->get_templates_dir().plus_file(VERSION_FULL_CONFIG);
return FileAccess::exists(templates_dir.plus_file("android_source.zip"));
}
Error ExportTemplateManager::install_android_template() {
-
// To support custom Android builds, we install the Java source code and buildsystem
// from android_source.zip to the project's res://android folder.
@@ -615,7 +595,6 @@ Error ExportTemplateManager::install_android_template() {
Set<String> dirs_tested;
int idx = 0;
while (ret == UNZ_OK) {
-
// Get file path.
unz_file_info info;
char fpath[16384];
@@ -667,7 +646,6 @@ void ExportTemplateManager::_bind_methods() {
}
ExportTemplateManager::ExportTemplateManager() {
-
VBoxContainer *main_vb = memnew(VBoxContainer);
add_child(main_vb);
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index fb44c145b2..7e05bc5d88 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -40,7 +40,6 @@
#define DEBUG_TIME(m_what)
void EditorFileServer::_close_client(ClientData *cd) {
-
cd->connection->disconnect_from_host();
{
MutexLock lock(cd->efs->wait_mutex);
@@ -54,7 +53,6 @@ void EditorFileServer::_close_client(ClientData *cd) {
}
void EditorFileServer::_subthread_start(void *s) {
-
ClientData *cd = (ClientData *)s;
cd->connection->set_no_delay(true);
@@ -68,11 +66,9 @@ void EditorFileServer::_subthread_start(void *s) {
int passlen = decode_uint32(buf4);
if (passlen > 512) {
-
_close_client(cd);
ERR_FAIL_COND(passlen > 512);
} else if (passlen > 0) {
-
Vector<char> passutf8;
passutf8.resize(passlen + 1);
err = cd->connection->get_data((uint8_t *)passutf8.ptr(), passlen);
@@ -106,7 +102,6 @@ void EditorFileServer::_subthread_start(void *s) {
cd->connection->put_data(buf4, 4);
while (!cd->quit) {
-
//wait for ID
err = cd->connection->get_data(buf4, 4);
DEBUG_TIME("get_data")
@@ -126,11 +121,9 @@ void EditorFileServer::_subthread_start(void *s) {
int cmd = decode_uint32(buf4);
switch (cmd) {
-
case FileAccessNetwork::COMMAND_FILE_EXISTS:
case FileAccessNetwork::COMMAND_GET_MODTIME:
case FileAccessNetwork::COMMAND_OPEN_FILE: {
-
DEBUG_TIME("open_file")
err = cd->connection->get_data(buf4, 4);
if (err != OK) {
@@ -161,14 +154,12 @@ void EditorFileServer::_subthread_start(void *s) {
}
if (!s2.begins_with("res://")) {
-
_close_client(cd);
ERR_FAIL_COND(!s2.begins_with("res://"));
}
ERR_CONTINUE(cd->files.has(id));
if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) {
-
encode_uint32(id, buf4);
cd->connection->put_data(buf4, 4);
encode_uint32(FileAccessNetwork::RESPONSE_FILE_EXISTS, buf4);
@@ -180,7 +171,6 @@ void EditorFileServer::_subthread_start(void *s) {
}
if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) {
-
encode_uint32(id, buf4);
cd->connection->put_data(buf4, 4);
encode_uint32(FileAccessNetwork::RESPONSE_GET_MODTIME, buf4);
@@ -218,7 +208,6 @@ void EditorFileServer::_subthread_start(void *s) {
} break;
case FileAccessNetwork::COMMAND_READ_BLOCK: {
-
err = cd->connection->get_data(buf4, 8);
if (err != OK) {
_close_client(cd);
@@ -259,7 +248,6 @@ void EditorFileServer::_subthread_start(void *s) {
} break;
case FileAccessNetwork::COMMAND_CLOSE: {
-
print_verbose("CLOSED");
ERR_CONTINUE(!cd->files.has(id));
memdelete(cd->files[id]);
@@ -272,10 +260,8 @@ void EditorFileServer::_subthread_start(void *s) {
}
void EditorFileServer::_thread_start(void *s) {
-
EditorFileServer *self = (EditorFileServer *)s;
while (!self->quit) {
-
if (self->cmd == CMD_ACTIVATE) {
self->server->listen(self->port);
self->active = true;
@@ -312,7 +298,6 @@ void EditorFileServer::_thread_start(void *s) {
}
void EditorFileServer::start() {
-
stop();
port = EDITOR_DEF("filesystem/file_server/port", 6010);
password = EDITOR_DEF("filesystem/file_server/password", "");
@@ -320,17 +305,14 @@ void EditorFileServer::start() {
}
bool EditorFileServer::is_active() const {
-
return active;
}
void EditorFileServer::stop() {
-
cmd = CMD_STOP;
}
EditorFileServer::EditorFileServer() {
-
server.instance();
quit = false;
active = false;
@@ -342,7 +324,6 @@ EditorFileServer::EditorFileServer() {
}
EditorFileServer::~EditorFileServer() {
-
quit = true;
Thread::wait_to_finish(thread);
memdelete(thread);
diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h
index cc3cb44566..9645fbf39e 100644
--- a/editor/fileserver/editor_file_server.h
+++ b/editor/fileserver/editor_file_server.h
@@ -38,7 +38,6 @@
#include "core/os/thread.h"
class EditorFileServer : public Object {
-
GDCLASS(EditorFileServer, Object);
enum Command {
@@ -48,7 +47,6 @@ class EditorFileServer : public Object {
};
struct ClientData {
-
Thread *thread;
Ref<StreamPeerTCP> connection;
Map<int, FileAccess *> files;
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 236ae16ccf..f279f402d9 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -63,8 +63,9 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
// Create a tree item for the subdirectory.
TreeItem *subdirectory_item = tree->create_item(p_parent);
String dname = p_dir->get_name();
- if (dname == "")
+ if (dname == "") {
dname = "res://";
+ }
subdirectory_item->set_text(0, dname);
subdirectory_item->set_icon(0, get_theme_icon("Folder", "EditorIcons"));
@@ -86,14 +87,14 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
}
// Create items for all subdirectories.
- for (int i = 0; i < p_dir->get_subdir_count(); i++)
+ for (int i = 0; i < p_dir->get_subdir_count(); i++) {
parent_should_expand = (_create_tree(subdirectory_item, p_dir->get_subdir(i), uncollapsed_paths, p_select_in_favorites, p_unfold_path) || parent_should_expand);
+ }
// Create all items for the files in the subdirectory.
if (display_mode == DISPLAY_MODE_TREE_ONLY) {
String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene");
for (int i = 0; i < p_dir->get_file_count(); i++) {
-
String file_type = p_dir->get_file_type(i);
if (_is_file_type_disabled_by_feature_profile(file_type)) {
@@ -196,8 +197,9 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo
Vector<String> favorite_paths = EditorSettings::get_singleton()->get_favorites();
for (int i = 0; i < favorite_paths.size(); i++) {
String fave = favorite_paths[i];
- if (!fave.begins_with("res://"))
+ if (!fave.begins_with("res://")) {
continue;
+ }
Ref<Texture2D> folder_icon = get_theme_icon("Folder", "EditorIcons");
const Color folder_color = get_theme_color("folder_icon_modulate", "FileDialog");
@@ -298,8 +300,9 @@ void FileSystemDock::_update_display_mode(bool p_force) {
void FileSystemDock::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- if (initialized)
+ if (initialized) {
return;
+ }
initialized = true;
EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &FileSystemDock::_feature_profile_changed));
@@ -350,8 +353,9 @@ void FileSystemDock::_notification(int p_what) {
Dictionary dd = get_viewport()->gui_get_drag_data();
if (tree->is_visible_in_tree() && dd.has("type")) {
if (dd.has("favorite")) {
- if ((String(dd["favorite"]) == "all"))
+ if ((String(dd["favorite"]) == "all")) {
tree->set_drop_mode_flags(Tree::DROP_MODE_INBETWEEN);
+ }
} else if ((String(dd["type"]) == "files") || (String(dd["type"]) == "files_and_dirs") || (String(dd["type"]) == "resource")) {
tree->set_drop_mode_flags(Tree::DROP_MODE_ON_ITEM | Tree::DROP_MODE_INBETWEEN);
}
@@ -405,13 +409,15 @@ void FileSystemDock::_tree_multi_selected(Object *p_item, int p_column, bool p_s
call_deferred("_update_import_dock");
// Return if we don't select something new.
- if (!p_selected)
+ if (!p_selected) {
return;
+ }
// Tree item selected.
TreeItem *selected = tree->get_selected();
- if (!selected)
+ if (!selected) {
return;
+ }
TreeItem *favorites_item = tree->get_root()->get_children();
if (selected->get_parent() == favorites_item && !String(selected->get_metadata(0)).ends_with("/")) {
@@ -433,10 +439,11 @@ void FileSystemDock::_tree_multi_selected(Object *p_item, int p_column, bool p_s
}
String FileSystemDock::get_selected_path() const {
- if (path.ends_with("/"))
+ if (path.ends_with("/")) {
return path;
- else
+ } else {
return path.get_base_dir();
+ }
}
String FileSystemDock::get_current_path() const {
@@ -505,8 +512,9 @@ void FileSystemDock::_file_list_thumbnail_done(const String &p_path, const Ref<T
String file = uarr[1];
if (idx < files->get_item_count() && files->get_item_text(idx) == file && files->get_item_metadata(idx) == p_path) {
if (file_list_display_mode == FILE_LIST_DISPLAY_LIST) {
- if (p_small_preview.is_valid())
+ if (p_small_preview.is_valid()) {
files->set_item_icon(idx, p_small_preview);
+ }
} else {
files->set_item_icon(idx, p_preview);
}
@@ -554,7 +562,6 @@ bool FileSystemDock::_is_file_type_disabled_by_feature_profile(const StringName
StringName class_name = p_class;
while (class_name != StringName()) {
-
if (profile->is_class_disabled(class_name)) {
return true;
}
@@ -565,8 +572,9 @@ bool FileSystemDock::_is_file_type_disabled_by_feature_profile(const StringName
}
void FileSystemDock::_search(EditorFileSystemDirectory *p_path, List<FileInfo> *matches, int p_max_items) {
- if (matches->size() > p_max_items)
+ if (matches->size() > p_max_items) {
return;
+ }
for (int i = 0; i < p_path->get_subdir_count(); i++) {
_search(p_path->get_subdir(i), matches, p_max_items);
@@ -576,7 +584,6 @@ void FileSystemDock::_search(EditorFileSystemDirectory *p_path, List<FileInfo> *
String file = p_path->get_file(i);
if (file.to_lower().find(searched_string) != -1) {
-
FileInfo fi;
fi.name = file;
fi.type = p_path->get_file_type(i);
@@ -589,8 +596,9 @@ void FileSystemDock::_search(EditorFileSystemDirectory *p_path, List<FileInfo> *
}
matches->push_back(fi);
- if (matches->size() > p_max_items)
+ if (matches->size() > p_max_items) {
return;
+ }
}
}
}
@@ -600,8 +608,9 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
Set<String> cselection;
if (p_keep_selection) {
for (int i = 0; i < files->get_item_count(); i++) {
- if (files->is_selected(i))
+ if (files->is_selected(i)) {
cselection.insert(files->get_item_text(i));
+ }
}
}
@@ -704,8 +713,9 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
file = path.get_file();
efd = EditorFileSystem::get_singleton()->get_filesystem_path(directory);
}
- if (!efd)
+ if (!efd) {
return;
+ }
if (searched_string.length() > 0) {
// Display the search results.
@@ -717,8 +727,9 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
files->add_item("..", folder_icon, true);
String bd = directory.get_base_dir();
- if (bd != "res://" && !bd.ends_with("/"))
+ if (bd != "res://" && !bd.ends_with("/")) {
bd += "/";
+ }
files->set_item_metadata(files->get_item_count() - 1, bd);
files->set_item_selectable(files->get_item_count() - 1, false);
@@ -804,8 +815,9 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
}
// Select the items.
- if (cselection.has(fname))
+ if (cselection.has(fname)) {
files->select(item_index, false);
+ }
if (!p_keep_selection && file != "" && fname == file) {
files->select(item_index, true);
@@ -860,9 +872,7 @@ void FileSystemDock::_file_list_activate_file(int p_idx) {
void FileSystemDock::_preview_invalidated(const String &p_path) {
if (file_list_display_mode == FILE_LIST_DISPLAY_THUMBNAILS && p_path.get_base_dir() == path && searched_string.length() == 0 && file_list_vb->is_visible_in_tree()) {
-
for (int i = 0; i < files->get_item_count(); i++) {
-
if (files->get_item_metadata(i) == p_path) {
// Re-request preview.
Array udata;
@@ -907,15 +917,17 @@ void FileSystemDock::_set_scanning_mode() {
}
void FileSystemDock::_fw_history() {
- if (history_pos < history.size() - 1)
+ if (history_pos < history.size() - 1) {
history_pos++;
+ }
_update_history();
}
void FileSystemDock::_bw_history() {
- if (history_pos > 0)
+ if (history_pos > 0) {
history_pos--;
+ }
_update_history();
}
@@ -955,8 +967,9 @@ void FileSystemDock::_push_to_history() {
}
void FileSystemDock::_get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vector<String> &files, Vector<String> &folders) const {
- if (efsd == nullptr)
+ if (efsd == nullptr) {
return;
+ }
for (int i = 0; i < efsd->get_subdir_count(); i++) {
folders.push_back(efsd->get_subdir(i)->get_path());
@@ -1111,8 +1124,9 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String>
for (int i = 0; i < EditorNode::get_editor_data().get_edited_scene_count(); i++) {
String path;
if (i == EditorNode::get_editor_data().get_edited_scene()) {
- if (!get_tree()->get_edited_scene_root())
+ if (!get_tree()->get_edited_scene_root()) {
continue;
+ }
path = get_tree()->get_edited_scene_root()->get_filename();
} else {
@@ -1143,8 +1157,9 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> &
print_verbose("Remapping dependencies for: " + file);
Error err = ResourceLoader::rename_dependencies(file, p_renames);
if (err == OK) {
- if (ResourceLoader::get_resource_type(file) == "PackedScene")
+ if (ResourceLoader::get_resource_type(file) == "PackedScene") {
editor->reload_scene(file);
+ }
} else {
EditorNode::get_singleton()->add_io_error(TTR("Unable to update dependencies:") + "\n" + remaps[i] + "\n");
}
@@ -1272,8 +1287,9 @@ void FileSystemDock::_make_scene_confirm() {
break;
}
}
- if (!extension_correct)
+ if (!extension_correct) {
scene_name = scene_name.get_basename() + ".tscn";
+ }
scene_name = directory.plus_file(scene_name);
@@ -1626,8 +1642,9 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
EditorSettings::get_singleton()->set_favorites(favorites);
_update_tree(_compute_uncollapsed_paths());
- if (path == "Favorites")
+ if (path == "Favorites") {
_update_file_list(true);
+ }
} break;
case FILE_DEPENDENCIES: {
@@ -1728,7 +1745,6 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
} break;
case FILE_INFO: {
-
} break;
case FILE_REIMPORT: {
@@ -1813,10 +1829,11 @@ void FileSystemDock::_search_changed(const String &p_text, const Control *p_from
searched_string = p_text.to_lower();
- if (p_from == tree_search_box)
+ if (p_from == tree_search_box) {
file_list_search_box->set_text(searched_string);
- else // File_list_search_box.
+ } else { // File_list_search_box.
tree_search_box->set_text(searched_string);
+ }
bool unfold_path = (p_text == String() && path != String());
switch (display_mode) {
@@ -1849,8 +1866,9 @@ void FileSystemDock::focus_on_filter() {
}
void FileSystemDock::set_file_list_display_mode(FileListDisplayMode p_mode) {
- if (p_mode == file_list_display_mode)
+ if (p_mode == file_list_display_mode) {
return;
+ }
_toggle_file_display();
}
@@ -1891,8 +1909,9 @@ Variant FileSystemDock::get_drag_data_fw(const Point2 &p_point, Control *p_from)
all_not_favorites = true;
}
- if (paths.empty())
+ if (paths.empty()) {
return Variant();
+ }
Dictionary drag_data = EditorNode::get_singleton()->drag_files_and_dirs(paths, p_from);
if (!all_not_favorites) {
@@ -1905,15 +1924,15 @@ bool FileSystemDock::can_drop_data_fw(const Point2 &p_point, const Variant &p_da
Dictionary drag_data = p_data;
if (drag_data.has("favorite")) {
-
if (String(drag_data["favorite"]) != "all") {
return false;
}
// Moving favorite around.
TreeItem *ti = tree->get_item_at_position(p_point);
- if (!ti)
+ if (!ti) {
return false;
+ }
int drop_section = tree->get_drop_section_at_position(p_point);
TreeItem *favorites_item = tree->get_root()->get_children();
@@ -1947,19 +1966,22 @@ bool FileSystemDock::can_drop_data_fw(const Point2 &p_point, const Variant &p_da
bool favorite;
_get_drag_target_folder(to_dir, favorite, p_point, p_from);
- if (favorite)
+ if (favorite) {
return true;
+ }
- if (to_dir.empty())
+ if (to_dir.empty()) {
return false;
+ }
// Attempting to move a folder into itself will fail later,
// rather than bring up a message don't try to do it in the first place.
to_dir = to_dir.ends_with("/") ? to_dir : (to_dir + "/");
Vector<String> fnames = drag_data["files"];
for (int i = 0; i < fnames.size(); ++i) {
- if (fnames[i].ends_with("/") && to_dir.begins_with(fnames[i]))
+ if (fnames[i].ends_with("/") && to_dir.begins_with(fnames[i])) {
return false;
+ }
}
return true;
@@ -1969,21 +1991,22 @@ bool FileSystemDock::can_drop_data_fw(const Point2 &p_point, const Variant &p_da
}
void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
- if (!can_drop_data_fw(p_point, p_data, p_from))
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
Dictionary drag_data = p_data;
Vector<String> dirs = EditorSettings::get_singleton()->get_favorites();
if (drag_data.has("favorite")) {
-
if (String(drag_data["favorite"]) != "all") {
return;
}
// Moving favorite around.
TreeItem *ti = tree->get_item_at_position(p_point);
- if (!ti)
+ if (!ti) {
return;
+ }
int drop_section = tree->get_drop_section_at_position(p_point);
int drop_position;
@@ -2030,8 +2053,9 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
EditorSettings::get_singleton()->set_favorites(dirs);
_update_tree(_compute_uncollapsed_paths());
- if (display_mode == DISPLAY_MODE_SPLIT && path == "Favorites")
+ if (display_mode == DISPLAY_MODE_SPLIT && path == "Favorites") {
_update_file_list(true);
+ }
return;
}
@@ -2061,7 +2085,32 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
}
}
if (!to_move.empty()) {
- _move_operation_confirm(to_dir);
+ if (Input::get_singleton()->is_key_pressed(KEY_CONTROL)) {
+ for (int i = 0; i < to_move.size(); i++) {
+ String new_path;
+ String new_path_base;
+
+ if (to_move[i].is_file) {
+ new_path = to_dir.plus_file(to_move[i].path.get_file());
+ new_path_base = new_path.get_basename() + " (%d)." + new_path.get_extension();
+ } else {
+ PackedStringArray path_split = to_move[i].path.split("/");
+ new_path = to_dir.plus_file(path_split[path_split.size() - 2]);
+ new_path_base = new_path + " (%d)";
+ }
+
+ int exist_counter = 1;
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ while (da->file_exists(new_path) || da->dir_exists(new_path)) {
+ exist_counter++;
+ new_path = vformat(new_path_base, exist_counter);
+ }
+ _try_duplicate_item(to_move[i], new_path);
+ }
+ _rescan();
+ } else {
+ _move_operation_confirm(to_dir);
+ }
}
} else if (favorite) {
// Add the files from favorites.
@@ -2290,8 +2339,9 @@ void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) {
// Right click is pressed in the file list.
Vector<String> paths;
for (int i = 0; i < files->get_item_count(); i++) {
- if (!files->is_selected(i))
+ if (!files->is_selected(i)) {
continue;
+ }
if (files->get_item_text(p_item) == "..") {
files->unselect(i);
continue;
@@ -2311,8 +2361,9 @@ void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) {
void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) {
// Right click on empty space for file list.
- if (searched_string.length() > 0)
+ if (searched_string.length() > 0) {
return;
+ }
file_list_popup->clear();
file_list_popup->set_size(Size2(1, 1));
@@ -2350,7 +2401,6 @@ void FileSystemDock::_file_multi_selected(int p_index, bool p_selected) {
}
void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) {
-
Ref<InputEventKey> key = p_event;
if (key.is_valid() && key->is_pressed() && !key->is_echo()) {
if (ED_IS_SHORTCUT("filesystem_dock/duplicate", p_event)) {
@@ -2366,7 +2416,6 @@ void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) {
}
void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
-
Ref<InputEventKey> key = p_event;
if (key.is_valid() && key->is_pressed() && !key->is_echo()) {
if (ED_IS_SHORTCUT("filesystem_dock/duplicate", p_event)) {
@@ -2382,8 +2431,9 @@ void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
}
void FileSystemDock::_update_import_dock() {
- if (!import_dock_needs_update)
+ if (!import_dock_needs_update) {
return;
+ }
// List selected.
Vector<String> selected;
@@ -2394,8 +2444,9 @@ void FileSystemDock::_update_import_dock() {
} else {
// Use the file list.
for (int i = 0; i < files->get_item_count(); i++) {
- if (!files->is_selected(i))
+ if (!files->is_selected(i)) {
continue;
+ }
selected.push_back(files->get_item_metadata(i));
}
@@ -2451,7 +2502,6 @@ void FileSystemDock::_feature_profile_changed() {
}
void FileSystemDock::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_update_tree"), &FileSystemDock::_update_tree);
ClassDB::bind_method(D_METHOD("_file_list_thumbnail_done"), &FileSystemDock::_file_list_thumbnail_done);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 6d2d8510d1..08c2124ae8 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -148,11 +148,9 @@ private:
class FileOrFolder {
public:
String path;
- bool is_file;
+ bool is_file = false;
- FileOrFolder() :
- path(""),
- is_file(false) {}
+ FileOrFolder() {}
FileOrFolder(const String &p_path, bool p_is_file) :
path(p_path),
is_file(p_is_file) {}
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index d73180c831..1bc0de1ab0 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -59,14 +59,14 @@ static bool is_text_char(CharType c) {
}
static bool find_next(const String &line, String pattern, int from, bool match_case, bool whole_words, int &out_begin, int &out_end) {
-
int end = from;
while (true) {
int begin = match_case ? line.find(pattern, end) : line.findn(pattern, end);
- if (begin == -1)
+ if (begin == -1) {
return false;
+ }
end = begin + pattern.length();
out_begin = begin;
@@ -157,15 +157,14 @@ void FindInFiles::_process() {
while (is_processing()) {
_iterate();
float elapsed = (os.get_ticks_msec() - time_before);
- if (elapsed > 1000.0 / 120.0)
+ if (elapsed > 1000.0 / 120.0) {
break;
+ }
}
}
void FindInFiles::_iterate() {
-
if (_folders_stack.size() != 0) {
-
// Scan folders first so we can build a list of files and have progress info later
PackedStringArray &folders_to_scan = _folders_stack.write[_folders_stack.size() - 1];
@@ -196,7 +195,6 @@ void FindInFiles::_iterate() {
}
} else if (_files_to_scan.size() != 0) {
-
// Then scan files
String fpath = _files_to_scan[_files_to_scan.size() - 1];
@@ -220,7 +218,6 @@ float FindInFiles::get_progress() const {
}
void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) {
-
DirAccessRef dir = DirAccess::open(path);
if (!dir) {
print_verbose("Cannot open directory! " + path);
@@ -232,19 +229,22 @@ void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) {
for (int i = 0; i < 1000; ++i) {
String file = dir->get_next();
- if (file == "")
+ if (file == "") {
break;
+ }
// Ignore special dirs (such as .git and .import)
- if (file == "." || file == ".." || file.begins_with("."))
+ if (file == "." || file == ".." || file.begins_with(".")) {
continue;
- if (dir->current_is_hidden())
+ }
+ if (dir->current_is_hidden()) {
continue;
+ }
- if (dir->current_is_dir())
+ if (dir->current_is_dir()) {
out_folders.push_back(file);
- else {
+ } else {
String file_ext = file.get_extension();
if (_extension_filter.has(file_ext)) {
_files_to_scan.push_back(path.plus_file(file));
@@ -254,7 +254,6 @@ void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) {
}
void FindInFiles::_scan_file(String fpath) {
-
FileAccessRef f = FileAccess::open(fpath, FileAccess::READ);
if (!f) {
print_verbose(String("Cannot open file ") + fpath);
@@ -264,7 +263,6 @@ void FindInFiles::_scan_file(String fpath) {
int line_number = 0;
while (!f->eof_reached()) {
-
// line number starts at 1
++line_number;
@@ -282,7 +280,6 @@ void FindInFiles::_scan_file(String fpath) {
}
void FindInFiles::_bind_methods() {
-
ADD_SIGNAL(MethodInfo(SIGNAL_RESULT_FOUND,
PropertyInfo(Variant::STRING, "path"),
PropertyInfo(Variant::INT, "line_number"),
@@ -298,7 +295,6 @@ const char *FindInFilesDialog::SIGNAL_FIND_REQUESTED = "find_requested";
const char *FindInFilesDialog::SIGNAL_REPLACE_REQUESTED = "replace_requested";
FindInFilesDialog::FindInFilesDialog() {
-
set_min_size(Size2(500 * EDSCALE, 0));
set_title(TTR("Find in Files"));
@@ -408,9 +404,9 @@ void FindInFilesDialog::set_replace_text(String text) {
}
void FindInFilesDialog::set_find_in_files_mode(FindInFilesMode p_mode) {
-
- if (_mode == p_mode)
+ if (_mode == p_mode) {
return;
+ }
_mode = p_mode;
@@ -464,7 +460,6 @@ Set<String> FindInFilesDialog::get_filter() const {
void FindInFilesDialog::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
-
if (is_visible()) {
// Doesn't work more than once if not deferred...
_search_text_line_edit->call_deferred("grab_focus");
@@ -506,7 +501,6 @@ void FindInFilesDialog::custom_action(const String &p_action) {
}
void FindInFilesDialog::_on_search_text_modified(String text) {
-
ERR_FAIL_COND(!_find_button);
ERR_FAIL_COND(!_replace_button);
@@ -540,13 +534,13 @@ void FindInFilesDialog::_on_replace_text_entered(String text) {
void FindInFilesDialog::_on_folder_selected(String path) {
int i = path.find("://");
- if (i != -1)
+ if (i != -1) {
path = path.right(i + 3);
+ }
_folder_line_edit->set_text(path);
}
void FindInFilesDialog::_bind_methods() {
-
ADD_SIGNAL(MethodInfo(SIGNAL_FIND_REQUESTED));
ADD_SIGNAL(MethodInfo(SIGNAL_REPLACE_REQUESTED));
}
@@ -556,7 +550,6 @@ const char *FindInFilesPanel::SIGNAL_RESULT_SELECTED = "result_selected";
const char *FindInFilesPanel::SIGNAL_FILES_MODIFIED = "files_modified";
FindInFilesPanel::FindInFilesPanel() {
-
_finder = memnew(FindInFiles);
_finder->connect(FindInFiles::SIGNAL_RESULT_FOUND, callable_mp(this, &FindInFilesPanel::_on_result_found));
_finder->connect(FindInFiles::SIGNAL_FINISHED, callable_mp(this, &FindInFilesPanel::_on_finished));
@@ -641,7 +634,6 @@ FindInFilesPanel::FindInFilesPanel() {
}
void FindInFilesPanel::set_with_replace(bool with_replace) {
-
_with_replace = with_replace;
_replace_container->set_visible(with_replace);
@@ -670,7 +662,6 @@ void FindInFilesPanel::clear() {
}
void FindInFilesPanel::start_search() {
-
clear();
_status_label->set_text(TTR("Searching..."));
@@ -687,7 +678,6 @@ void FindInFilesPanel::start_search() {
}
void FindInFilesPanel::stop_search() {
-
_finder->stop();
_status_label->set_text("");
@@ -704,7 +694,6 @@ void FindInFilesPanel::_notification(int p_what) {
}
void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin, int end, String text) {
-
TreeItem *file_item;
Map<String, TreeItem *>::Element *E = _file_items.find(fpath);
@@ -756,14 +745,15 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin
}
void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) {
-
TreeItem *item = Object::cast_to<TreeItem>(item_obj);
- if (!item)
+ if (!item) {
return;
+ }
Map<TreeItem *, Result>::Element *E = _result_items.find(item);
- if (!E)
+ if (!E) {
return;
+ }
Result r = E->value();
Rect2 match_rect = rect;
@@ -777,7 +767,6 @@ void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) {
}
void FindInFilesPanel::_on_item_edited() {
-
TreeItem *item = _results_display->get_selected();
if (item->is_checked(0)) {
@@ -792,7 +781,6 @@ void FindInFilesPanel::_on_item_edited() {
}
void FindInFilesPanel::_on_finished() {
-
_status_label->set_text(TTR("Search complete"));
update_replace_buttons();
set_progress_visible(false);
@@ -809,12 +797,12 @@ void FindInFilesPanel::_on_cancel_button_clicked() {
}
void FindInFilesPanel::_on_result_selected() {
-
TreeItem *item = _results_display->get_selected();
Map<TreeItem *, Result>::Element *E = _result_items.find(item);
- if (E == nullptr)
+ if (E == nullptr) {
return;
+ }
Result r = E->value();
TreeItem *file_item = item->get_parent();
@@ -828,21 +816,19 @@ void FindInFilesPanel::_on_replace_text_changed(String text) {
}
void FindInFilesPanel::_on_replace_all_clicked() {
-
String replace_text = get_replace_text();
PackedStringArray modified_files;
for (Map<String, TreeItem *>::Element *E = _file_items.front(); E; E = E->next()) {
-
TreeItem *file_item = E->value();
String fpath = file_item->get_metadata(0);
Vector<Result> locations;
for (TreeItem *item = file_item->get_children(); item; item = item->get_next()) {
-
- if (!item->is_checked(0))
+ if (!item->is_checked(0)) {
continue;
+ }
Map<TreeItem *, Result>::Element *F = _result_items.find(item);
ERR_FAIL_COND(F == nullptr);
@@ -866,13 +852,11 @@ void FindInFilesPanel::_on_replace_all_clicked() {
class ConservativeGetLine {
public:
String get_line(FileAccess *f) {
-
_line_buffer.clear();
CharType c = f->get_8();
while (!f->eof_reached()) {
-
if (c == '\n') {
_line_buffer.push_back(c);
_line_buffer.push_back(0);
@@ -898,7 +882,6 @@ private:
};
void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result> &locations, String new_text) {
-
// If the file is already open, I assume the editor will reload it.
// If there are unsaved changes, the user will be asked on focus,
// however that means either losing changes or losing replaces.
@@ -917,7 +900,6 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result>
int offset = 0;
for (int i = 0; i < locations.size(); ++i) {
-
int repl_line_number = locations[i].line_number;
while (current_line < repl_line_number) {
@@ -963,7 +945,6 @@ String FindInFilesPanel::get_replace_text() {
}
void FindInFilesPanel::update_replace_buttons() {
-
bool disabled = _finder->is_searching();
_replace_all_button->set_disabled(disabled);
@@ -974,7 +955,6 @@ void FindInFilesPanel::set_progress_visible(bool visible) {
}
void FindInFilesPanel::_bind_methods() {
-
ClassDB::bind_method("_on_result_found", &FindInFilesPanel::_on_result_found);
ClassDB::bind_method("_on_finished", &FindInFilesPanel::_on_finished);
ClassDB::bind_method("_draw_result_text", &FindInFilesPanel::draw_result_text);
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index 7e5d2e87d6..98b216acda 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -300,8 +300,9 @@ void GroupDialog::_load_groups(Node *p_current) {
void GroupDialog::_delete_group_pressed(Object *p_item, int p_column, int p_id) {
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
- if (!ti)
+ if (!ti) {
return;
+ }
String name = ti->get_text(0);
@@ -536,16 +537,18 @@ GroupDialog::GroupDialog() {
////////////////////////////////////////////////////////////////////////////////
void GroupsEditor::_add_group(const String &p_group) {
-
- if (!node)
+ if (!node) {
return;
+ }
const String name = group_name->get_text().strip_edges();
- if (name.empty())
+ if (name.empty()) {
return;
+ }
- if (node->is_in_group(name))
+ if (node->is_in_group(name)) {
return;
+ }
undo_redo->create_action(TTR("Add to Group"));
@@ -564,13 +567,14 @@ void GroupsEditor::_add_group(const String &p_group) {
}
void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
-
- if (!node)
+ if (!node) {
return;
+ }
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
- if (!ti)
+ if (!ti) {
return;
+ }
String name = ti->get_text(0);
@@ -589,18 +593,17 @@ void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
}
struct _GroupInfoComparator {
-
bool operator()(const Node::GroupInfo &p_a, const Node::GroupInfo &p_b) const {
return p_a.name.operator String() < p_b.name.operator String();
}
};
void GroupsEditor::update_tree() {
-
tree->clear();
- if (!node)
+ if (!node) {
return;
+ }
List<Node::GroupInfo> groups;
node->get_groups(&groups);
@@ -609,20 +612,18 @@ void GroupsEditor::update_tree() {
TreeItem *root = tree->create_item();
for (List<GroupInfo>::Element *E = groups.front(); E; E = E->next()) {
-
Node::GroupInfo gi = E->get();
- if (!gi.persistent)
+ if (!gi.persistent) {
continue;
+ }
Node *n = node;
bool can_be_deleted = true;
while (n) {
-
Ref<SceneState> ss = (n == EditorNode::get_singleton()->get_edited_scene()) ? n->get_scene_inherited_state() : n->get_scene_instance_state();
if (ss.is_valid()) {
-
int path = ss->find_node_by_path(n->get_path_to(node));
if (path != -1) {
if (ss->is_node_in_group(path, gi.name)) {
@@ -645,13 +646,11 @@ void GroupsEditor::update_tree() {
}
void GroupsEditor::set_current(Node *p_node) {
-
node = p_node;
update_tree();
}
void GroupsEditor::_show_group_dialog() {
-
group_dialog->edit();
group_dialog->set_undo_redo(undo_redo);
}
@@ -661,7 +660,6 @@ void GroupsEditor::_bind_methods() {
}
GroupsEditor::GroupsEditor() {
-
node = nullptr;
VBoxContainer *vbc = this;
diff --git a/editor/groups_editor.h b/editor/groups_editor.h
index 40c7b3c75a..911c82e7f0 100644
--- a/editor/groups_editor.h
+++ b/editor/groups_editor.h
@@ -42,7 +42,6 @@
#include "scene/gui/tree.h"
class GroupDialog : public AcceptDialog {
-
GDCLASS(GroupDialog, AcceptDialog);
ConfirmationDialog *error;
@@ -104,7 +103,6 @@ public:
};
class GroupsEditor : public VBoxContainer {
-
GDCLASS(GroupsEditor, VBoxContainer);
Node *node;
diff --git a/editor/icons/CameraEffects.svg b/editor/icons/CameraEffects.svg
new file mode 100644
index 0000000000..2f6dad5fd8
--- /dev/null
+++ b/editor/icons/CameraEffects.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5.9492188 2a3 3 0 0 0 -2.9492188 3 3 3 0 0 0 1 2.2304688v1.7695312l-3-2v6l3-2v1c0 .554.44599 1 1 1h3c.0076117-.045309.0115938-.096059.0214844-.134766.0773621-.302758.1860981-.478282.2832031-.625.1397097-.211089.2814954-.338835.4257813-.480468-.1445165-.141692-.2879205-.269839-.4277344-.480469-.0971224-.146315-.2052562-.321748-.2832032-.623047-.0777157-.300405-.1044198-.8152648.1640626-1.2910156.2700589-.4775976.7340166-.7239536 1.0371093-.8105469.3037241-.0867737.5108695-.0808838.6875-.0703125.2608449.0156115.4500479.0763383.6503909.1328125.049596-.1859081.086921-.3641449.195312-.5800781.078477-.1563394.174637-.3364783.396485-.5527344.221847-.2162561.652628-.4930277 1.195312-.4980469a1.6124973 1.6124973 0 0 1 .033203 0c.542861.0056205.97185.2837448 1.19336.5.146452.1429781.230167.265896.298828.3808594a3 3 0 0 0 .128906-.8671875 3 3 0 0 0 -3-3 3 3 0 0 0 -2.0117188.7773438 3 3 0 0 0 -2.9882812-2.7773438 3 3 0 0 0 -.0507812 0z" fill="#e0e0e0"/><path d="m12.36062 8.59795a.53334 3.2001 0 0 0 -.50976 2.2754 3.2001.53334 30 0 0 -2.2656-.71484 3.2001.53334 30 0 0 1.75 1.6016.53334 3.2001 60 0 0 -1.7461 1.5996.53334 3.2001 60 0 0 2.2578-.71094.53334 3.2001 0 0 0 .51367 2.3496.53334 3.2001 0 0 0 .51367-2.3516 3.2001.53334 30 0 0 2.2539.71094 3.2001.53334 30 0 0 -1.7441-1.5977.53334 3.2001 60 0 0 1.748-1.5996.53334 3.2001 60 0 0 -2.2617.71484.53334 3.2001 0 0 0 -.50977-2.2773z" fill="#cea4f1" stroke-width="1.0667"/></svg> \ No newline at end of file
diff --git a/editor/icons/CubeMap.svg b/editor/icons/Cubemap.svg
index c9e6f1fa7d..c9e6f1fa7d 100644
--- a/editor/icons/CubeMap.svg
+++ b/editor/icons/Cubemap.svg
diff --git a/editor/icons/CubemapArray.svg b/editor/icons/CubemapArray.svg
new file mode 100644
index 0000000000..350a64f9c2
--- /dev/null
+++ b/editor/icons/CubemapArray.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 6v4h2v-4zm6 0v4h4v-4z" fill="#84ffb1"/><path d="m4 6v4h4v-4zm8 0v4h2v-4z" fill="#ff8484"/><path d="m4 2v4h4v-4zm0 8v4h4v-4z" fill="#84c2ff"/><path d="m-.00000002 2v12h4.00000002v-2h-2v-8h2v-2h-2zm12.00000002 0v2h2.000001v8h-2.000001v2h4.000001v-12h-2z" fill="#e0e0e0"/></svg> \ No newline at end of file
diff --git a/editor/icons/LightmapProbe.svg b/editor/icons/LightmapProbe.svg
new file mode 100644
index 0000000000..0972220fda
--- /dev/null
+++ b/editor/icons/LightmapProbe.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 9h3v-2h-3zm2.050781 2.535156 1.414063 1.414063 1.414062-1.414063-1.414062-1.414062zm0-7.070312 1.414063 1.414062 1.414062-1.414062-1.414062-1.414063zm1.949219 3.535156c0 1.6569 1.3432 3 3 3s3-1.3431 3-3-1.3432-3-3-3-3 1.3431-3 3zm3 7c3.865993 0 7-3.134007 7-7s-3.134007-7-7-7v2.333984c2.577329 0 4.666016 2.088687 4.666016 4.666016s-2.088687 4.666016-4.666016 4.666016z" fill="#fc9c9c" fill-opacity=".996078" stroke-width="1.16667"/></svg> \ No newline at end of file
diff --git a/editor/icons/PanoramaSky.svg b/editor/icons/PanoramaSky.svg
deleted file mode 100644
index bfff6840bd..0000000000
--- a/editor/icons/PanoramaSky.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(1.0096 0 0 1.0227 -.009615 -22.593)" gradientUnits="userSpaceOnUse" x1="8" x2="8" y1="1038.4" y2="1050.4"><stop offset="0" stop-color="#1ec3ff"/><stop offset="1" stop-color="#b2e1ff"/></linearGradient><g transform="translate(0 -1037.4)"><path d="m1 1039.4c4.2749 2.6091 10.765 2.7449 14 0v12c-3.5849-2.6849-9.7929-2.6544-14 0z" fill="url(#a)" stroke-width="15.242"/><path d="m11 6c-.554 0-1 .446-1 1h-1c-.554 0-1 .446-1 1s.446 1 1 1h2c.554 0 1-.446 1-1h1c.554 0 1-.446 1-1s-.446-1-1-1zm-8 3c-.554 0-1 .446-1 1s.446 1 1 1h1c.554 0 1-.446 1-1s-.446-1-1-1z" fill="#fff" transform="translate(0 1037.4)"/></g></svg> \ No newline at end of file
diff --git a/editor/icons/PanoramaSkyMaterial.svg b/editor/icons/PanoramaSkyMaterial.svg
new file mode 100644
index 0000000000..9f40ffb63c
--- /dev/null
+++ b/editor/icons/PanoramaSkyMaterial.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 5v2h8 1c0-.554.446-1 1-1h2c.554 0 1 .446 1 1h1v-2z" fill="#9dff70"/><path d="m1 3v2h14v-2h-1.589844c-2.86436 1.357608-6.9481434 1.30996-10.347656 0z" fill="#ffeb70"/><path d="m1 2v1h2.0625c-.7241713-.2790504-1.419865-.6077805-2.0625-1zm14 0c-.465784.3952185-1.005424.7230054-1.589844 1h1.589844z" fill="#ff7070"/><path d="m1 7v2h2 1 5c-.554 0-1-.446-1-1s.446-1 1-1zm13 0c0 .554-.446 1-1 1h-1c0 .554-.446 1-1 1h4v-2z" fill="#70ffb9"/><path d="m1 9v2h2c-.554 0-1-.446-1-1s.446-1 1-1zm3 0c.554 0 1 .446 1 1s-.446 1-1 1h11v-2h-4-2z" fill="#70deff"/><path d="m1 13v-2h14v2h-1.589844c-2.86436-1.357608-6.9481434-1.30996-10.347656 0z" fill="#9f70ff"/><path d="m1 14v-1h2.0625c-.7241713.27905-1.419865.60778-2.0625 1zm14 0c-.465784-.395219-1.005424-.723005-1.589844-1h1.589844z" fill="#ff70ac"/></svg> \ No newline at end of file
diff --git a/editor/icons/PhysicalSkyMaterial.svg b/editor/icons/PhysicalSkyMaterial.svg
new file mode 100644
index 0000000000..5831cb2c63
--- /dev/null
+++ b/editor/icons/PhysicalSkyMaterial.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 5v2h8 1c0-.554.446-1 1-1h2c.554 0 1 .446 1 1h1v-2z" fill="#9dff70"/><path d="m1 7v2h2 1 5c-.554 0-1-.446-1-1s.446-1 1-1zm13 0c0 .554-.446 1-1 1h-1c0 .554-.446 1-1 1h4v-2z" fill="#70ffb9"/><path d="m1 9v2h2c-.554 0-1-.446-1-1s.446-1 1-1zm3 0c.554 0 1 .446 1 1s-.446 1-1 1h11v-2h-4-2z" fill="#70deff"/><path d="m1 3v2h14v-2z" fill="#ffeb70"/><path d="m1 11v2h14v-2z" fill="#9f70ff"/></svg> \ No newline at end of file
diff --git a/editor/icons/ProceduralSky.svg b/editor/icons/ProceduralSky.svg
deleted file mode 100644
index 356a966fe9..0000000000
--- a/editor/icons/ProceduralSky.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="8" x2="8" y1="1040.4" y2="1050.4"><stop offset="0" stop-color="#1ec3ff"/><stop offset="1" stop-color="#b2e1ff"/></linearGradient><g transform="translate(0 -1037.4)"><path d="m8 1040.4a7 7 0 0 0 -7 7 7 7 0 0 0 .68555 3h12.631a7 7 0 0 0 .68359-3 7 7 0 0 0 -7-7z" fill="url(#a)"/><path d="m10 7c-.554 0-1 .446-1 1h-1c-.554 0-1 .446-1 1s.446 1 1 1h2c.554 0 1-.446 1-1h1c.554 0 1-.446 1-1s-.446-1-1-1zm-7 3c-.554 0-1 .446-1 1s.446 1 1 1h1c.554 0 1-.446 1-1s-.446-1-1-1z" fill="#fff" transform="translate(0 1037.4)"/></g></svg> \ No newline at end of file
diff --git a/editor/icons/ProceduralSkyMaterial.svg b/editor/icons/ProceduralSkyMaterial.svg
new file mode 100644
index 0000000000..f7a3944671
--- /dev/null
+++ b/editor/icons/ProceduralSkyMaterial.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1.0761719 11a7 7 0 0 0 .609375 2h12.6308591a7 7 0 0 0 .609375-2h-9.925781c0 .554-.446 1-1 1h-1c-.554 0-1-.446-1-1z" fill="#9f70ff"/><path d="m1.0722656 9a7 7 0 0 0 -.0722656 1 7 7 0 0 0 .0761719 1h.9238281c0-.554.446-1 1-1h1c.554 0 1 .446 1 1h9.925781a7 7 0 0 0 .074219-1 7 7 0 0 0 -.072266-1h-2.927734-1c0 .554-.446 1-1 1h-2c-.554 0-1-.446-1-1z" fill="#70deff"/><path d="m1.6757812 7a7 7 0 0 0 -.6035156 2h5.9277344c0-.554.446-1 1-1h1c0-.554.446-1 1-1zm10.3242188 0c.554 0 1 .446 1 1s-.446 1-1 1h2.927734a7 7 0 0 0 -.603515-2z" fill="#70ffb9"/><path d="m3.1035156 5a7 7 0 0 0 -1.4277344 2h12.6484378a7 7 0 0 0 -1.425781-2z" fill="#9dff70"/><path d="m8 3a7 7 0 0 0 -4.8964844 2h9.7949224a7 7 0 0 0 -4.898438-2z" fill="#ffeb70"/></svg> \ No newline at end of file
diff --git a/editor/icons/RootMotionView.svg b/editor/icons/RootMotionView.svg
new file mode 100644
index 0000000000..4d33420383
--- /dev/null
+++ b/editor/icons/RootMotionView.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><radialGradient id="a" cx="8" cy="8" gradientTransform="matrix(.85714281 -.00000007 .00000004 .85714284 1.142858 1.142858)" gradientUnits="userSpaceOnUse" r="7"><stop offset="0" stop-color="#fc9c9c"/><stop offset=".83333331" stop-color="#fc9c9c" stop-opacity=".701961"/><stop offset="1" stop-color="#fc9c9c" stop-opacity="0"/></radialGradient><path d="m5 2v3h-3v2h3v2h-3v2h3v3h2v-3h2v3h2v-3h3v-2h-3v-2h3v-2h-3v-3h-2v3h-2v-3zm2 5h2v2h-2z" fill="url(#a)"/></svg> \ No newline at end of file
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index f0d51999f0..e143276259 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -2,6 +2,8 @@
Import("env")
+import os
+
from platform_methods import run_in_subprocess
import editor_icons_builders
@@ -15,7 +17,10 @@ env["BUILDERS"]["MakeEditorIconsBuilder"] = make_editor_icons_builder
icon_sources = Glob("*.svg")
# Module icons
-for module_icons in env.module_icons_paths:
- icon_sources += Glob("#" + module_icons + "/*.svg")
+for path in env.module_icons_paths:
+ if not os.path.isabs(path):
+ icon_sources += Glob("#" + path + "/*.svg") # Built-in.
+ else:
+ icon_sources += Glob(path + "/*.svg") # Custom.
env.Alias("editor_icons", [env.MakeEditorIconsBuilder("#editor/editor_icons.gen.h", icon_sources)])
diff --git a/editor/icons/ShaderGlobalsOverride.svg b/editor/icons/ShaderGlobalsOverride.svg
new file mode 100644
index 0000000000..2fe76ed777
--- /dev/null
+++ b/editor/icons/ShaderGlobalsOverride.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.55226.0001-.99994.4477-1 1v12c.0000552.5523.44774.9999 1 1h12c.55226-.0001.99994-.4477 1-1v-8l-5-5zm1 2h6v3c0 .554.44599 1 1 1h3v6h-10zm1 1v1h3v-1zm0 2v1h2v-1zm3 0v1h1v-1zm-2 3 3 3 3-3z" fill="#e0e0e0"/></svg> \ No newline at end of file
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index 9e49fa9066..41e71248a9 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -45,14 +45,12 @@
/* HELPERS */
String Collada::Effect::get_texture_path(const String &p_source, Collada &state) const {
-
const String &image = p_source;
ERR_FAIL_COND_V(!state.state.image_map.has(image), "");
return state.state.image_map[image].path;
}
Transform Collada::get_root_transform() const {
-
Transform unit_scale_transform;
#ifndef COLLADA_IMPORT_SCALE_SCENE
unit_scale_transform.scale(Vector3(state.unit_scale, state.unit_scale, state.unit_scale));
@@ -67,27 +65,27 @@ void Collada::Vertex::fix_unit_scale(Collada &state) {
}
static String _uri_to_id(const String &p_uri) {
-
- if (p_uri.begins_with("#"))
+ if (p_uri.begins_with("#")) {
return p_uri.substr(1, p_uri.size() - 1);
- else
+ } else {
return p_uri;
+ }
}
/** HELPER FUNCTIONS **/
Transform Collada::fix_transform(const Transform &p_transform) {
-
Transform tr = p_transform;
#ifndef NO_UP_AXIS_SWAP
if (state.up_axis != Vector3::AXIS_Y) {
-
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < 3; i++) {
SWAP(tr.basis[1][i], tr.basis[state.up_axis][i]);
- for (int i = 0; i < 3; i++)
+ }
+ for (int i = 0; i < 3; i++) {
SWAP(tr.basis[i][1], tr.basis[i][state.up_axis]);
+ }
SWAP(tr.origin[1], tr.origin[state.up_axis]);
@@ -105,7 +103,6 @@ Transform Collada::fix_transform(const Transform &p_transform) {
}
static Transform _read_transform_from_array(const Vector<float> &array, int ofs = 0) {
-
Transform tr;
// i wonder why collada matrices are transposed, given that's opposed to opengl..
tr.basis.elements[0][0] = array[0 + ofs];
@@ -126,39 +123,30 @@ static Transform _read_transform_from_array(const Vector<float> &array, int ofs
/* STRUCTURES */
Transform Collada::Node::compute_transform(Collada &state) const {
-
Transform xform;
for (int i = 0; i < xform_list.size(); i++) {
-
Transform xform_step;
const XForm &xf = xform_list[i];
switch (xf.op) {
-
case XForm::OP_ROTATE: {
if (xf.data.size() >= 4) {
-
xform_step.rotate(Vector3(xf.data[0], xf.data[1], xf.data[2]), Math::deg2rad(xf.data[3]));
}
} break;
case XForm::OP_SCALE: {
-
if (xf.data.size() >= 3) {
-
xform_step.scale(Vector3(xf.data[0], xf.data[1], xf.data[2]));
}
} break;
case XForm::OP_TRANSLATE: {
-
if (xf.data.size() >= 3) {
-
xform_step.origin = Vector3(xf.data[0], xf.data[1], xf.data[2]);
}
} break;
case XForm::OP_MATRIX: {
-
if (xf.data.size() >= 16) {
xform_step = _read_transform_from_array(xf.data, 0);
}
@@ -178,39 +166,37 @@ Transform Collada::Node::compute_transform(Collada &state) const {
}
Transform Collada::Node::get_transform() const {
-
return default_transform;
}
Transform Collada::Node::get_global_transform() const {
-
- if (parent)
+ if (parent) {
return parent->get_global_transform() * default_transform;
- else
+ } else {
return default_transform;
+ }
}
Vector<float> Collada::AnimationTrack::get_value_at_time(float p_time) const {
-
ERR_FAIL_COND_V(keys.size() == 0, Vector<float>());
int i = 0;
for (i = 0; i < keys.size(); i++) {
-
- if (keys[i].time > p_time)
+ if (keys[i].time > p_time) {
break;
+ }
}
- if (i == 0)
+ if (i == 0) {
return keys[0].data;
- if (i == keys.size())
+ }
+ if (i == keys.size()) {
return keys[keys.size() - 1].data;
+ }
switch (keys[i].interp_type) {
-
case INTERP_BEZIER: //wait for bezier
case INTERP_LINEAR: {
-
float c = (p_time - keys[i - 1].time) / (keys[i].time - keys[i - 1].time);
if (keys[i].data.size() == 16) {
@@ -243,11 +229,9 @@ Vector<float> Collada::AnimationTrack::get_value_at_time(float p_time) const {
return ret;
} else {
-
Vector<float> dest;
dest.resize(keys[i].data.size());
for (int j = 0; j < dest.size(); j++) {
-
dest.write[j] = keys[i].data[j] * c + keys[i - 1].data[j] * (1.0 - c);
}
return dest;
@@ -260,42 +244,41 @@ Vector<float> Collada::AnimationTrack::get_value_at_time(float p_time) const {
}
void Collada::_parse_asset(XMLParser &parser) {
-
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
if (name == "up_axis") {
-
parser.read();
- if (parser.get_node_data() == "X_UP")
+ if (parser.get_node_data() == "X_UP") {
state.up_axis = Vector3::AXIS_X;
- if (parser.get_node_data() == "Y_UP")
+ }
+ if (parser.get_node_data() == "Y_UP") {
state.up_axis = Vector3::AXIS_Y;
- if (parser.get_node_data() == "Z_UP")
+ }
+ if (parser.get_node_data() == "Z_UP") {
state.up_axis = Vector3::AXIS_Z;
+ }
COLLADA_PRINT("up axis: " + parser.get_node_data());
} else if (name == "unit") {
-
state.unit_scale = parser.get_attribute_value("meter").to_double();
COLLADA_PRINT("unit scale: " + rtos(state.unit_scale));
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "asset")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "asset") {
break; //end of <asset>
+ }
}
}
void Collada::_parse_image(XMLParser &parser) {
-
String id = parser.get_attribute_value("id");
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
@@ -309,15 +292,11 @@ void Collada::_parse_image(XMLParser &parser) {
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.percent_decode()));
}
} else {
-
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
if (name == "init_from") {
-
parser.read();
String path = parser.get_node_data().strip_edges().percent_decode();
@@ -333,14 +312,15 @@ void Collada::_parse_image(XMLParser &parser) {
image.path = path;
} else if (name == "data") {
-
ERR_PRINT("COLLADA Embedded image data not supported!");
- } else if (name == "extra" && !parser.is_empty())
+ } else if (name == "extra" && !parser.is_empty()) {
parser.skip_section();
+ }
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "image")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "image") {
break; //end of <asset>
+ }
}
}
@@ -348,31 +328,30 @@ void Collada::_parse_image(XMLParser &parser) {
}
void Collada::_parse_material(XMLParser &parser) {
-
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
Material material;
String id = parser.get_attribute_value("id");
- if (parser.has_attribute("name"))
+ if (parser.has_attribute("name")) {
material.name = parser.get_attribute_value("name");
+ }
if (state.version < State::Version(1, 4, 0)) {
/* <1.4 */
ERR_PRINT("Collada Materials < 1.4 are not supported (yet)");
} else {
-
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT && parser.get_node_name() == "instance_effect") {
-
material.instance_effect = _uri_to_id(parser.get_attribute_value("url"));
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "material")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "material") {
break; //end of <asset>
+ }
}
}
@@ -381,9 +360,9 @@ void Collada::_parse_material(XMLParser &parser) {
//! reads floats from inside of xml element until end of xml element
Vector<float> Collada::_read_float_array(XMLParser &parser) {
-
- if (parser.is_empty())
+ if (parser.is_empty()) {
return Vector<float>();
+ }
Vector<String> splitters;
splitters.push_back(" ");
@@ -401,17 +380,18 @@ Vector<float> Collada::_read_float_array(XMLParser &parser) {
String str = parser.get_node_data();
array = str.split_floats_mk(splitters, false);
//array=str.split_floats(" ",false);
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) {
break; // end parsing text
+ }
}
return array;
}
Vector<String> Collada::_read_string_array(XMLParser &parser) {
-
- if (parser.is_empty())
+ if (parser.is_empty()) {
return Vector<String>();
+ }
Vector<String> array;
while (parser.read() == OK) {
@@ -422,17 +402,18 @@ Vector<String> Collada::_read_string_array(XMLParser &parser) {
// parse String data
String str = parser.get_node_data();
array = str.split_spaces();
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) {
break; // end parsing text
+ }
}
return array;
}
Transform Collada::_read_transform(XMLParser &parser) {
-
- if (parser.is_empty())
+ if (parser.is_empty()) {
return Transform();
+ }
Vector<String> array;
while (parser.read() == OK) {
@@ -443,8 +424,9 @@ Transform Collada::_read_transform(XMLParser &parser) {
// parse float data
String str = parser.get_node_data();
array = str.split_spaces();
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) {
break; // end parsing text
+ }
}
ERR_FAIL_COND_V(array.size() != 16, Transform());
@@ -458,103 +440,88 @@ Transform Collada::_read_transform(XMLParser &parser) {
}
String Collada::_read_empty_draw_type(XMLParser &parser) {
-
String empty_draw_type = "";
- if (parser.is_empty())
+ if (parser.is_empty()) {
return empty_draw_type;
+ }
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_TEXT) {
empty_draw_type = parser.get_node_data();
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) {
break; // end parsing text
+ }
}
return empty_draw_type;
}
Variant Collada::_parse_param(XMLParser &parser) {
-
- if (parser.is_empty())
+ if (parser.is_empty()) {
return Variant();
+ }
String from = parser.get_node_name();
Variant data;
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "float") {
-
parser.read();
if (parser.get_node_type() == XMLParser::NODE_TEXT) {
-
data = parser.get_node_data().to_double();
}
} else if (parser.get_node_name() == "float2") {
-
Vector<float> v2 = _read_float_array(parser);
if (v2.size() >= 2) {
-
data = Vector2(v2[0], v2[1]);
}
} else if (parser.get_node_name() == "float3") {
-
Vector<float> v3 = _read_float_array(parser);
if (v3.size() >= 3) {
-
data = Vector3(v3[0], v3[1], v3[2]);
}
} else if (parser.get_node_name() == "float4") {
-
Vector<float> v4 = _read_float_array(parser);
if (v4.size() >= 4) {
-
data = Color(v4[0], v4[1], v4[2], v4[3]);
}
} else if (parser.get_node_name() == "sampler2D") {
-
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "source") {
-
parser.read();
if (parser.get_node_type() == XMLParser::NODE_TEXT) {
-
data = parser.get_node_data();
}
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "sampler2D")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "sampler2D") {
break;
+ }
}
} else if (parser.get_node_name() == "surface") {
-
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "init_from") {
-
parser.read();
if (parser.get_node_type() == XMLParser::NODE_TEXT) {
-
data = parser.get_node_data();
}
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "surface")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "surface") {
break;
+ }
}
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == from)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == from) {
break;
+ }
}
COLLADA_PRINT("newparam ending " + parser.get_node_name());
@@ -562,23 +529,20 @@ Variant Collada::_parse_param(XMLParser &parser) {
}
void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &id) {
-
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
// first come the tags we descend, but ignore the top-levels
COLLADA_PRINT("node name: " + parser.get_node_name());
if (!parser.is_empty() && (parser.get_node_name() == "profile_COMMON" || parser.get_node_name() == "technique" || parser.get_node_name() == "extra")) {
-
_parse_effect_material(parser, effect, id); // try again
} else if (parser.get_node_name() == "newparam") {
@@ -591,45 +555,39 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
parser.get_node_name() == "lambert" ||
parser.get_node_name() == "phong" ||
parser.get_node_name() == "blinn") {
-
COLLADA_PRINT("shade model: " + parser.get_node_name());
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String what = parser.get_node_name();
if (what == "emission" ||
what == "diffuse" ||
what == "specular" ||
what == "reflective") {
-
// color or texture types
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "color") {
-
Vector<float> colorarr = _read_float_array(parser);
COLLADA_PRINT("colorarr size: " + rtos(colorarr.size()));
if (colorarr.size() >= 3) {
-
// alpha strangely not alright? maybe it needs to be multiplied by value as a channel intensity
Color color(colorarr[0], colorarr[1], colorarr[2], 1.0);
- if (what == "diffuse")
+ if (what == "diffuse") {
effect.diffuse.color = color;
- if (what == "specular")
+ }
+ if (what == "specular") {
effect.specular.color = color;
- if (what == "emission")
+ }
+ if (what == "emission") {
effect.emission.color = color;
+ }
COLLADA_PRINT(what + " color: " + color);
}
} else if (parser.get_node_name() == "texture") {
-
String sampler = parser.get_attribute_value("texture");
if (!effect.params.has(sampler)) {
ERR_PRINT(String("Couldn't find sampler: " + sampler + " in material:" + id).utf8().get_data());
@@ -658,11 +616,13 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
COLLADA_PRINT(what + " texture: " + uri);
}
}
- } else if (!parser.is_empty())
+ } else if (!parser.is_empty()) {
parser.skip_section();
+ }
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == what)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == what) {
break;
+ }
}
} else if (what == "shininess") {
@@ -671,8 +631,9 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && (parser.get_node_name() == "constant" ||
parser.get_node_name() == "lambert" ||
parser.get_node_name() == "phong" ||
- parser.get_node_name() == "blinn"))
+ parser.get_node_name() == "blinn")) {
break;
+ }
}
} else if (parser.get_node_name() == "double_sided" || parser.get_node_name() == "show_double_sided") { // colladamax / google earth
@@ -685,14 +646,10 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
parser.read();
effect.unshaded = parser.get_node_data().to_int();
} else if (parser.get_node_name() == "bump") {
-
// color or texture types
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "texture") {
-
String sampler = parser.get_attribute_value("texture");
if (!effect.params.has(sampler)) {
ERR_PRINT(String("Couldn't find sampler: " + sampler + " in material:" + id).utf8().get_data());
@@ -712,37 +669,42 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
COLLADA_PRINT(" bump: " + uri);
}
}
- } else if (!parser.is_empty())
+ } else if (!parser.is_empty()) {
parser.skip_section();
+ }
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "bump")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "bump") {
break;
+ }
}
- } else if (!parser.is_empty())
+ } else if (!parser.is_empty()) {
parser.skip_section();
+ }
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END &&
(parser.get_node_name() == "effect" ||
parser.get_node_name() == "profile_COMMON" ||
parser.get_node_name() == "technique" ||
- parser.get_node_name() == "extra"))
+ parser.get_node_name() == "extra")) {
break;
+ }
}
}
void Collada::_parse_effect(XMLParser &parser) {
-
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
String id = parser.get_attribute_value("id");
Effect effect;
- if (parser.has_attribute("name"))
+ if (parser.has_attribute("name")) {
effect.name = parser.get_attribute_value("name");
+ }
_parse_effect_material(parser, effect, id);
state.effect_map[id] = effect;
@@ -751,10 +713,10 @@ void Collada::_parse_effect(XMLParser &parser) {
}
void Collada::_parse_camera(XMLParser &parser) {
-
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
@@ -764,63 +726,53 @@ void Collada::_parse_camera(XMLParser &parser) {
CameraData &camera = state.camera_data_map[id];
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
if (name == "perspective") {
-
camera.mode = CameraData::MODE_PERSPECTIVE;
} else if (name == "orthographic") {
-
camera.mode = CameraData::MODE_ORTHOGONAL;
} else if (name == "xfov") {
-
parser.read();
camera.perspective.x_fov = parser.get_node_data().to_double();
} else if (name == "yfov") {
-
parser.read();
camera.perspective.y_fov = parser.get_node_data().to_double();
} else if (name == "xmag") {
-
parser.read();
camera.orthogonal.x_mag = parser.get_node_data().to_double();
} else if (name == "ymag") {
-
parser.read();
camera.orthogonal.y_mag = parser.get_node_data().to_double();
} else if (name == "aspect_ratio") {
-
parser.read();
camera.aspect = parser.get_node_data().to_double();
} else if (name == "znear") {
-
parser.read();
camera.z_near = parser.get_node_data().to_double();
} else if (name == "zfar") {
-
parser.read();
camera.z_far = parser.get_node_data().to_double();
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "camera")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "camera") {
break; //end of <asset>
+ }
}
COLLADA_PRINT("Camera ID:" + id);
}
void Collada::_parse_light(XMLParser &parser) {
-
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
@@ -830,25 +782,18 @@ void Collada::_parse_light(XMLParser &parser) {
LightData &light = state.light_data_map[id];
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
if (name == "ambient") {
-
light.mode = LightData::MODE_AMBIENT;
} else if (name == "directional") {
-
light.mode = LightData::MODE_DIRECTIONAL;
} else if (name == "point") {
-
light.mode = LightData::MODE_OMNI;
} else if (name == "spot") {
-
light.mode = LightData::MODE_SPOT;
} else if (name == "color") {
-
parser.read();
Vector<float> colorarr = _read_float_array(parser);
COLLADA_PRINT("colorarr size: " + rtos(colorarr.size()));
@@ -860,40 +805,36 @@ void Collada::_parse_light(XMLParser &parser) {
}
} else if (name == "constant_attenuation") {
-
parser.read();
light.constant_att = parser.get_node_data().to_double();
} else if (name == "linear_attenuation") {
-
parser.read();
light.linear_att = parser.get_node_data().to_double();
} else if (name == "quadratic_attenuation") {
-
parser.read();
light.quad_att = parser.get_node_data().to_double();
} else if (name == "falloff_angle") {
-
parser.read();
light.spot_angle = parser.get_node_data().to_double();
} else if (name == "falloff_exponent") {
-
parser.read();
light.spot_exp = parser.get_node_data().to_double();
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "light")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "light") {
break; //end of <asset>
+ }
}
COLLADA_PRINT("Light ID:" + id);
}
void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_name) {
-
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
@@ -914,13 +855,10 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam
}
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String section = parser.get_node_name();
if (section == "source") {
-
String id = parser.get_attribute_value("id");
curvedata.sources[id] = CurveData::Source();
current_source = id;
@@ -929,14 +867,12 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam
} else if (section == "float_array" || section == "array") {
// create a new array and read it.
if (curvedata.sources.has(current_source)) {
-
curvedata.sources[current_source].array = _read_float_array(parser);
COLLADA_PRINT("section: " + current_source + " read " + itos(curvedata.sources[current_source].array.size()) + " values.");
}
} else if (section == "Name_array") {
// create a new array and read it.
if (curvedata.sources.has(current_source)) {
-
curvedata.sources[current_source].sarray = _read_string_array(parser);
COLLADA_PRINT("section: " + current_source + " read " + itos(curvedata.sources[current_source].array.size()) + " values.");
}
@@ -950,13 +886,9 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam
COLLADA_PRINT("section: " + current_source + " stride " + itos(curvedata.sources[current_source].stride));
}
} else if (section == "control_vertices") {
-
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "input") {
-
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
@@ -964,24 +896,25 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam
COLLADA_PRINT(section + " input semantic: " + semantic + " source: " + source);
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section) {
break;
+ }
}
} else if (!parser.is_empty()) {
-
parser.skip_section();
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "spline")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "spline") {
break;
+ }
}
}
void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name) {
-
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
@@ -1002,13 +935,10 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
}
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String section = parser.get_node_name();
if (section == "source") {
-
String id = parser.get_attribute_value("id");
meshdata.sources[id] = MeshData::Source();
current_source = id;
@@ -1017,7 +947,6 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
} else if (section == "float_array" || section == "array") {
// create a new array and read it.
if (meshdata.sources.has(current_source)) {
-
meshdata.sources[current_source].array = _read_float_array(parser);
COLLADA_PRINT("section: " + current_source + " read " + itos(meshdata.sources[current_source].array.size()) + " values.");
}
@@ -1030,16 +959,12 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
COLLADA_PRINT("section: " + current_source + " stride " + itos(meshdata.sources[current_source].stride));
}
} else if (section == "vertices") {
-
MeshData::Vertices vert;
String id = parser.get_attribute_value("id");
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "input") {
-
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
@@ -1047,32 +972,30 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
COLLADA_PRINT(section + " input semantic: " + semantic + " source: " + source);
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section) {
break;
+ }
}
meshdata.vertices[id] = vert;
} else if (section == "triangles" || section == "polylist" || section == "polygons") {
-
bool polygons = (section == "polygons");
if (polygons) {
WARN_PRINT("Primitive type \"polygons\" is not well supported (concave shapes may fail). To ensure that the geometry is properly imported, please re-export using \"triangles\" or \"polylist\".");
}
MeshData::Primitives prim;
- if (parser.has_attribute("material"))
+ if (parser.has_attribute("material")) {
prim.material = parser.get_attribute_value("material");
+ }
prim.count = parser.get_attribute_value("count").to_int();
prim.vertex_size = 0;
int last_ref = 0;
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "input") {
-
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
@@ -1098,13 +1021,13 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
Vector<float> values = _read_float_array(parser);
if (polygons) {
-
ERR_CONTINUE(prim.vertex_size == 0);
prim.polygons.push_back(values.size() / prim.vertex_size);
int from = prim.indices.size();
prim.indices.resize(from + values.size());
- for (int i = 0; i < values.size(); i++)
+ for (int i = 0; i < values.size(); i++) {
prim.indices.write[from + i] = values[i];
+ }
} else if (prim.vertex_size > 0) {
prim.indices = values;
@@ -1118,14 +1041,14 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
prim.polygons = values;
COLLADA_PRINT("read " + itos(values.size()) + " polygon values");
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section) {
break;
+ }
}
meshdata.primitives.push_back(prim);
} else if (parser.get_node_name() == "double_sided") {
-
parser.read();
meshdata.found_double_sided = true;
meshdata.double_sided = parser.get_node_data().to_int();
@@ -1133,16 +1056,15 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
} else if (parser.get_node_name() == "polygons") {
ERR_PRINT("Primitive type \"polygons\" not supported, re-export using \"polylist\" or \"triangles\".");
} else if (!parser.is_empty()) {
-
parser.skip_section();
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "mesh")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "mesh") {
break;
+ }
}
}
void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
-
state.skin_controller_data_map[p_id] = SkinControllerData();
SkinControllerData &skindata = state.skin_controller_data_map[p_id];
@@ -1151,13 +1073,10 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
String current_source;
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String section = parser.get_node_name();
if (section == "bind_shape_matrix") {
-
skindata.bind_shape = _read_transform(parser);
#ifdef COLLADA_IMPORT_SCALE_SCENE
skindata.bind_shape.origin *= state.unit_scale;
@@ -1166,7 +1085,6 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
COLLADA_PRINT("skeleton bind shape transform: " + skindata.bind_shape);
} else if (section == "source") {
-
String id = parser.get_attribute_value("id");
skindata.sources[id] = SkinControllerData::Source();
current_source = id;
@@ -1175,22 +1093,22 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
} else if (section == "float_array" || section == "array") {
// create a new array and read it.
if (skindata.sources.has(current_source)) {
-
skindata.sources[current_source].array = _read_float_array(parser);
COLLADA_PRINT("section: " + current_source + " read " + itos(skindata.sources[current_source].array.size()) + " values.");
}
} else if (section == "Name_array" || section == "IDREF_array") {
// create a new array and read it.
- if (section == "IDREF_array")
+ if (section == "IDREF_array") {
skindata.use_idrefs = true;
+ }
if (skindata.sources.has(current_source)) {
-
skindata.sources[current_source].sarray = _read_string_array(parser);
if (section == "IDREF_array") {
Vector<String> sa = skindata.sources[current_source].sarray;
- for (int i = 0; i < sa.size(); i++)
+ for (int i = 0; i < sa.size(); i++) {
state.idref_joints.insert(sa[i]);
+ }
}
COLLADA_PRINT("section: " + current_source + " read " + itos(skindata.sources[current_source].array.size()) + " values.");
}
@@ -1199,25 +1117,21 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
} else if (section == "accessor") { // child of source (below a technique tag)
if (skindata.sources.has(current_source)) {
-
int stride = 1;
- if (parser.has_attribute("stride"))
+ if (parser.has_attribute("stride")) {
stride = parser.get_attribute_value("stride").to_int();
+ }
skindata.sources[current_source].stride = stride;
COLLADA_PRINT("section: " + current_source + " stride " + itos(skindata.sources[current_source].stride));
}
} else if (section == "joints") {
-
SkinControllerData::Joints joint;
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "input") {
-
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
@@ -1225,24 +1139,21 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
COLLADA_PRINT(section + " input semantic: " + semantic + " source: " + source);
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section) {
break;
+ }
}
skindata.joints = joint;
} else if (section == "vertex_weights") {
-
SkinControllerData::Weights weights;
weights.count = parser.get_attribute_value("count").to_int();
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "input") {
-
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
@@ -1267,8 +1178,9 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
weights.sets = values;
COLLADA_PRINT("read " + itos(values.size()) + " polygon values");
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section) {
break;
+ }
}
skindata.weights = weights;
@@ -1278,8 +1190,9 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
parser.skip_section();
*/
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "skin")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "skin") {
break;
+ }
}
/* STORE REST MATRICES */
@@ -1300,7 +1213,6 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
ERR_FAIL_COND(joint_source.sarray.size() != ibm_source.array.size() / 16);
for (int i = 0; i < joint_source.sarray.size(); i++) {
-
String name = joint_source.sarray[i];
Transform xform = _read_transform_from_array(ibm_source.array, i * 16); //<- this is a mistake, it must be applied to vertices
xform.affine_invert(); // inverse for rest, because it's an inverse
@@ -1312,7 +1224,6 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
}
void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
-
state.morph_controller_data_map[p_id] = MorphControllerData();
MorphControllerData &morphdata = state.morph_controller_data_map[p_id];
@@ -1321,13 +1232,10 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
String current_source;
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String section = parser.get_node_name();
if (section == "source") {
-
String id = parser.get_attribute_value("id");
morphdata.sources[id] = MorphControllerData::Source();
current_source = id;
@@ -1336,7 +1244,6 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
} else if (section == "float_array" || section == "array") {
// create a new array and read it.
if (morphdata.sources.has(current_source)) {
-
morphdata.sources[current_source].array = _read_float_array(parser);
COLLADA_PRINT("section: " + current_source + " read " + itos(morphdata.sources[current_source].array.size()) + " values.");
}
@@ -1348,7 +1255,6 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
morphdata.use_idrefs=true;
*/
if (morphdata.sources.has(current_source)) {
-
morphdata.sources[current_source].sarray = _read_string_array(parser);
/*
if (section=="IDREF_array") {
@@ -1363,23 +1269,19 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
} else if (section == "accessor") { // child of source (below a technique tag)
if (morphdata.sources.has(current_source)) {
-
int stride = 1;
- if (parser.has_attribute("stride"))
+ if (parser.has_attribute("stride")) {
stride = parser.get_attribute_value("stride").to_int();
+ }
morphdata.sources[current_source].stride = stride;
COLLADA_PRINT("section: " + current_source + " stride " + itos(morphdata.sources[current_source].stride));
}
} else if (section == "targets") {
-
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "input") {
-
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
@@ -1387,8 +1289,9 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
COLLADA_PRINT(section + " input semantic: " + semantic + " source: " + source);
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == section) {
break;
+ }
}
}
/*
@@ -1396,18 +1299,17 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
parser.skip_section();
*/
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "morph")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "morph") {
break;
+ }
}
if (morphdata.targets.has("MORPH_WEIGHT")) {
-
state.morph_name_map[morphdata.targets["MORPH_WEIGHT"]] = p_id;
}
}
void Collada::_parse_controller(XMLParser &parser) {
-
String id = parser.get_attribute_value("id");
if (parser.is_empty()) {
@@ -1415,9 +1317,7 @@ void Collada::_parse_controller(XMLParser &parser) {
}
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String section = parser.get_node_name();
if (section == "skin") {
@@ -1425,27 +1325,25 @@ void Collada::_parse_controller(XMLParser &parser) {
} else if (section == "morph") {
_parse_morph_controller(parser, id);
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "controller")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "controller") {
break;
+ }
}
}
Collada::Node *Collada::_parse_visual_instance_geometry(XMLParser &parser) {
-
String type = parser.get_node_name();
NodeGeometry *geom = memnew(NodeGeometry);
geom->controller = type == "instance_controller";
geom->source = _uri_to_id(parser.get_attribute_value_safe("url"));
- if (parser.is_empty()) //nothing else to parse...
+ if (parser.is_empty()) { //nothing else to parse...
return geom;
+ }
// try to find also many materials and skeletons!
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "instance_material") {
-
String symbol = parser.get_attribute_value("symbol");
String target = _uri_to_id(parser.get_attribute_value("target"));
@@ -1454,7 +1352,6 @@ Collada::Node *Collada::_parse_visual_instance_geometry(XMLParser &parser) {
geom->material_map[symbol] = mat;
COLLADA_PRINT("uses material: '" + target + "' on primitive'" + symbol + "'");
} else if (parser.get_node_name() == "skeleton") {
-
parser.read();
String uri = _uri_to_id(parser.get_node_data());
if (uri != "") {
@@ -1462,12 +1359,12 @@ Collada::Node *Collada::_parse_visual_instance_geometry(XMLParser &parser) {
}
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == type)
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == type) {
break;
+ }
}
if (geom->controller) {
-
if (geom->skeletons.empty()) {
//XSI style
@@ -1487,72 +1384,72 @@ Collada::Node *Collada::_parse_visual_instance_geometry(XMLParser &parser) {
}
Collada::Node *Collada::_parse_visual_instance_camera(XMLParser &parser) {
-
NodeCamera *cam = memnew(NodeCamera);
cam->camera = _uri_to_id(parser.get_attribute_value_safe("url"));
- if (state.up_axis == Vector3::AXIS_Z) //collada weirdness
+ if (state.up_axis == Vector3::AXIS_Z) { //collada weirdness
cam->post_transform.basis.rotate(Vector3(1, 0, 0), -Math_PI * 0.5);
+ }
- if (parser.is_empty()) //nothing else to parse...
+ if (parser.is_empty()) { //nothing else to parse...
return cam;
+ }
while (parser.read() == OK) {
-
- if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "instance_camera")
+ if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "instance_camera") {
break;
+ }
}
return cam;
}
Collada::Node *Collada::_parse_visual_instance_light(XMLParser &parser) {
-
NodeLight *cam = memnew(NodeLight);
cam->light = _uri_to_id(parser.get_attribute_value_safe("url"));
- if (state.up_axis == Vector3::AXIS_Z) //collada weirdness
+ if (state.up_axis == Vector3::AXIS_Z) { //collada weirdness
cam->post_transform.basis.rotate(Vector3(1, 0, 0), -Math_PI * 0.5);
+ }
- if (parser.is_empty()) //nothing else to parse...
+ if (parser.is_empty()) { //nothing else to parse...
return cam;
+ }
while (parser.read() == OK) {
-
- if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "instance_light")
+ if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "instance_light") {
break;
+ }
}
return cam;
}
Collada::Node *Collada::_parse_visual_node_instance_data(XMLParser &parser) {
-
String instance_type = parser.get_node_name();
if (instance_type == "instance_geometry" || instance_type == "instance_controller") {
return _parse_visual_instance_geometry(parser);
} else if (instance_type == "instance_camera") {
-
return _parse_visual_instance_camera(parser);
} else if (instance_type == "instance_light") {
return _parse_visual_instance_light(parser);
}
- if (parser.is_empty()) //nothing else to parse...
+ if (parser.is_empty()) { //nothing else to parse...
return nullptr;
+ }
while (parser.read() == OK) {
-
- if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == instance_type)
+ if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == instance_type) {
break;
+ }
}
return nullptr;
}
Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
-
String name;
String id = parser.get_attribute_value_safe("id");
@@ -1560,7 +1457,6 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
bool found_name = false;
if (id == "") {
-
id = "%NODEID%" + itos(Math::rand());
} else {
@@ -1576,7 +1472,6 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
name = parser.has_attribute("name") ? parser.get_attribute_value_safe("name") : parser.get_attribute_value_safe("id");
if (name == "") {
-
name = id;
} else {
found_name = true;
@@ -1604,9 +1499,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
}
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String section = parser.get_node_name();
if (section == "translate") {
@@ -1657,8 +1550,9 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
xf.data = matrix;
String mtx;
- for (int i = 0; i < matrix.size(); i++)
+ for (int i = 0; i < matrix.size(); i++) {
mtx += " " + rtos(matrix[i]);
+ }
xform_list.push_back(xf);
@@ -1678,13 +1572,10 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
} else if (section == "empty_draw_type") {
empty_draw_type = _read_empty_draw_type(parser);
} else if (section == "technique" || section == "extra") {
-
} else if (section != "node") {
//usually what defines the type of node
if (section.begins_with("instance_")) {
-
if (!node) {
-
node = _parse_visual_node_instance_data(parser);
} else {
@@ -1693,19 +1584,18 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
}
} else {
-
/* Found a child node!! what to do..*/
Node *child = _parse_visual_scene_node(parser);
children.push_back(child);
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "node")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "node") {
break;
+ }
}
if (!node) {
-
node = memnew(Node); //generic node, nothing of relevance found
}
@@ -1734,7 +1624,6 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
}
void Collada::_parse_visual_scene(XMLParser &parser) {
-
String id = parser.get_attribute_value("id");
if (parser.is_empty()) {
@@ -1744,31 +1633,31 @@ void Collada::_parse_visual_scene(XMLParser &parser) {
state.visual_scene_map[id] = VisualScene();
VisualScene &vscene = state.visual_scene_map[id];
- if (parser.has_attribute("name"))
+ if (parser.has_attribute("name")) {
vscene.name = parser.get_attribute_value("name");
+ }
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String section = parser.get_node_name();
if (section == "node") {
vscene.root_nodes.push_back(_parse_visual_scene_node(parser));
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "visual_scene")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "visual_scene") {
break;
+ }
}
COLLADA_PRINT("Scene ID:" + id);
}
void Collada::_parse_animation(XMLParser &parser) {
-
if (!(state.import_flags & IMPORT_FLAG_ANIMATION)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
@@ -1781,8 +1670,9 @@ void Collada::_parse_animation(XMLParser &parser) {
Map<String, Vector<String>> source_param_types;
String id = "";
- if (parser.has_attribute("id"))
+ if (parser.has_attribute("id")) {
id = parser.get_attribute_value("id");
+ }
String current_source;
String current_sampler;
@@ -1790,67 +1680,58 @@ void Collada::_parse_animation(XMLParser &parser) {
Vector<String> channel_targets;
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
if (name == "source") {
-
current_source = parser.get_attribute_value("id");
source_param_names[current_source] = Vector<String>();
source_param_types[current_source] = Vector<String>();
} else if (name == "float_array") {
-
if (current_source != "") {
float_sources[current_source] = _read_float_array(parser);
}
} else if (name == "Name_array") {
-
if (current_source != "") {
string_sources[current_source] = _read_string_array(parser);
}
} else if (name == "accessor") {
-
if (current_source != "" && parser.has_attribute("stride")) {
source_strides[current_source] = parser.get_attribute_value("stride").to_int();
}
} else if (name == "sampler") {
-
current_sampler = parser.get_attribute_value("id");
samplers[current_sampler] = Map<String, String>();
} else if (name == "param") {
-
- if (parser.has_attribute("name"))
+ if (parser.has_attribute("name")) {
source_param_names[current_source].push_back(parser.get_attribute_value("name"));
- else
+ } else {
source_param_names[current_source].push_back("");
+ }
- if (parser.has_attribute("type"))
+ if (parser.has_attribute("type")) {
source_param_types[current_source].push_back(parser.get_attribute_value("type"));
- else
+ } else {
source_param_types[current_source].push_back("");
+ }
} else if (name == "input") {
-
if (current_sampler != "") {
-
samplers[current_sampler][parser.get_attribute_value("semantic")] = parser.get_attribute_value("source");
}
} else if (name == "channel") {
-
channel_sources.push_back(parser.get_attribute_value("source"));
channel_targets.push_back(parser.get_attribute_value("target"));
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "animation")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "animation") {
break; //end of <asset>
+ }
}
for (int i = 0; i < channel_sources.size(); i++) {
-
String source = _uri_to_id(channel_sources[i]);
String target = channel_targets[i];
ERR_CONTINUE(!samplers.has(source));
@@ -1870,7 +1751,6 @@ void Collada::_parse_animation(XMLParser &parser) {
Vector<String> &names = source_param_names[output_id];
for (int l = 0; l < names.size(); l++) {
-
String name = names[l];
Vector<float> &time_keys = float_sources[input_id];
@@ -1890,8 +1770,9 @@ void Collada::_parse_animation(XMLParser &parser) {
int stride = 1;
- if (source_strides.has(output_id))
+ if (source_strides.has(output_id)) {
stride = source_strides[output_id];
+ }
int output_len = stride / names.size();
ERR_CONTINUE(output_len == 0);
@@ -1903,22 +1784,23 @@ void Collada::_parse_animation(XMLParser &parser) {
for (int j = 0; j < key_count; j++) {
track.keys.write[j].data.resize(output_len);
- for (int k = 0; k < output_len; k++)
+ for (int k = 0; k < output_len; k++) {
track.keys.write[j].data.write[k] = output[l + j * stride + k]; //super weird but should work:
+ }
}
if (sampler.has("INTERPOLATION")) {
-
String interp_id = _uri_to_id(sampler["INTERPOLATION"]);
ERR_CONTINUE(!string_sources.has(interp_id));
Vector<String> &interps = string_sources[interp_id];
ERR_CONTINUE(interps.size() != key_count);
for (int j = 0; j < key_count; j++) {
- if (interps[j] == "BEZIER")
+ if (interps[j] == "BEZIER") {
track.keys.write[j].interp_type = AnimationTrack::INTERP_BEZIER;
- else
+ } else {
track.keys.write[j].interp_type = AnimationTrack::INTERP_LINEAR;
+ }
}
}
@@ -1944,8 +1826,9 @@ void Collada::_parse_animation(XMLParser &parser) {
if (target.find("/") != -1) { //transform component
track.target = target.get_slicec('/', 0);
track.param = target.get_slicec('/', 1);
- if (track.param.find(".") != -1)
+ if (track.param.find(".") != -1) {
track.component = track.param.get_slice(".", 1).to_upper();
+ }
track.param = track.param.get_slice(".", 0);
if (names.size() > 1 && track.component == "") {
//this is a guess because the collada spec is ambiguous here...
@@ -1958,14 +1841,16 @@ void Collada::_parse_animation(XMLParser &parser) {
state.animation_tracks.push_back(track);
- if (!state.referenced_tracks.has(target))
+ if (!state.referenced_tracks.has(target)) {
state.referenced_tracks[target] = Vector<int>();
+ }
state.referenced_tracks[target].push_back(state.animation_tracks.size() - 1);
if (id != "") {
- if (!state.by_id_tracks.has(id))
+ if (!state.by_id_tracks.has(id)) {
state.by_id_tracks[id] = Vector<int>();
+ }
state.by_id_tracks[id].push_back(state.animation_tracks.size() - 1);
}
@@ -1976,158 +1861,138 @@ void Collada::_parse_animation(XMLParser &parser) {
}
void Collada::_parse_animation_clip(XMLParser &parser) {
-
if (!(state.import_flags & IMPORT_FLAG_ANIMATION)) {
- if (!parser.is_empty())
+ if (!parser.is_empty()) {
parser.skip_section();
+ }
return;
}
AnimationClip clip;
- if (parser.has_attribute("name"))
+ if (parser.has_attribute("name")) {
clip.name = parser.get_attribute_value("name");
- else if (parser.has_attribute("id"))
+ } else if (parser.has_attribute("id")) {
clip.name = parser.get_attribute_value("id");
- if (parser.has_attribute("start"))
+ }
+ if (parser.has_attribute("start")) {
clip.begin = parser.get_attribute_value("start").to_double();
- if (parser.has_attribute("end"))
+ }
+ if (parser.has_attribute("end")) {
clip.end = parser.get_attribute_value("end").to_double();
+ }
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
if (name == "instance_animation") {
-
String url = _uri_to_id(parser.get_attribute_value("url"));
clip.tracks.push_back(url);
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "animation_clip")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "animation_clip") {
break; //end of <asset>
+ }
}
state.animation_clips.push_back(clip);
}
void Collada::_parse_scene(XMLParser &parser) {
-
if (parser.is_empty()) {
return;
}
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
if (name == "instance_visual_scene") {
-
state.root_visual_scene = _uri_to_id(parser.get_attribute_value("url"));
} else if (name == "instance_physics_scene") {
-
state.root_physics_scene = _uri_to_id(parser.get_attribute_value("url"));
}
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "scene")
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "scene") {
break; //end of <asset>
+ }
}
}
void Collada::_parse_library(XMLParser &parser) {
-
if (parser.is_empty()) {
return;
}
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
String name = parser.get_node_name();
COLLADA_PRINT("library name is: " + name);
if (name == "image") {
-
_parse_image(parser);
} else if (name == "material") {
-
_parse_material(parser);
} else if (name == "effect") {
-
_parse_effect(parser);
} else if (name == "camera") {
-
_parse_camera(parser);
} else if (name == "light") {
-
_parse_light(parser);
} else if (name == "geometry") {
-
String id = parser.get_attribute_value("id");
String name2 = parser.get_attribute_value_safe("name");
while (parser.read() == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "mesh") {
state.mesh_name_map[id] = (name2 != "") ? name2 : id;
_parse_mesh_geometry(parser, id, name2);
} else if (parser.get_node_name() == "spline") {
state.mesh_name_map[id] = (name2 != "") ? name2 : id;
_parse_curve_geometry(parser, id, name2);
- } else if (!parser.is_empty())
+ } else if (!parser.is_empty()) {
parser.skip_section();
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "geometry")
+ }
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "geometry") {
break;
+ }
}
} else if (name == "controller") {
-
_parse_controller(parser);
} else if (name == "animation") {
-
_parse_animation(parser);
} else if (name == "animation_clip") {
-
_parse_animation_clip(parser);
} else if (name == "visual_scene") {
-
COLLADA_PRINT("visual scene");
_parse_visual_scene(parser);
- } else if (!parser.is_empty())
+ } else if (!parser.is_empty()) {
parser.skip_section();
+ }
- } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name().begins_with("library_"))
+ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name().begins_with("library_")) {
break; //end of <asset>
+ }
}
}
void Collada::_joint_set_owner(Collada::Node *p_node, NodeSkeleton *p_owner) {
-
if (p_node->type == Node::TYPE_JOINT) {
-
NodeJoint *nj = static_cast<NodeJoint *>(p_node);
nj->owner = p_owner;
for (int i = 0; i < nj->children.size(); i++) {
-
_joint_set_owner(nj->children.write[i], p_owner);
}
}
}
void Collada::_create_skeletons(Collada::Node **p_node, NodeSkeleton *p_skeleton) {
-
Node *node = *p_node;
if (node->type == Node::TYPE_JOINT) {
-
if (!p_skeleton) {
-
// ohohohoohoo it's a joint node, time to work!
NodeSkeleton *sk = memnew(NodeSkeleton);
*p_node = sk;
@@ -2149,47 +2014,41 @@ void Collada::_create_skeletons(Collada::Node **p_node, NodeSkeleton *p_skeleton
}
bool Collada::_remove_node(Node *p_parent, Node *p_node) {
-
for (int i = 0; i < p_parent->children.size(); i++) {
-
if (p_parent->children[i] == p_node) {
p_parent->children.remove(i);
return true;
}
- if (_remove_node(p_parent->children[i], p_node))
+ if (_remove_node(p_parent->children[i], p_node)) {
return true;
+ }
}
return false;
}
void Collada::_remove_node(VisualScene *p_vscene, Node *p_node) {
-
for (int i = 0; i < p_vscene->root_nodes.size(); i++) {
if (p_vscene->root_nodes[i] == p_node) {
-
p_vscene->root_nodes.remove(i);
return;
}
- if (_remove_node(p_vscene->root_nodes[i], p_node))
+ if (_remove_node(p_vscene->root_nodes[i], p_node)) {
return;
+ }
}
ERR_PRINT("ERROR: Not found node to remove?");
}
void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
-
if (p_node->type == Node::TYPE_GEOMETRY) {
-
NodeGeometry *gnode = static_cast<NodeGeometry *>(p_node);
if (gnode->controller) {
-
// recount skeletons used
Set<NodeSkeleton *> skeletons;
for (int i = 0; i < gnode->skeletons.size(); i++) {
-
String nodeid = gnode->skeletons[i];
ERR_CONTINUE(!state.scene_map.has(nodeid)); //weird, it should have it...
@@ -2206,17 +2065,14 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
}
if (skeletons.size() > 1) {
-
//do the merger!!
Set<NodeSkeleton *>::Element *E = skeletons.front();
NodeSkeleton *base = E->get();
for (E = E->next(); E; E = E->next()) {
-
NodeSkeleton *merged = E->get();
_remove_node(p_vscene, merged);
for (int i = 0; i < merged->children.size(); i++) {
-
_joint_set_owner(merged->children[i], base);
base->children.push_back(merged->children[i]);
merged->children[i]->parent = base;
@@ -2235,15 +2091,12 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
}
void Collada::_merge_skeletons2(VisualScene *p_vscene) {
-
for (Map<String, SkinControllerData>::Element *E = state.skin_controller_data_map.front(); E; E = E->next()) {
-
SkinControllerData &cd = E->get();
NodeSkeleton *skeleton = nullptr;
for (Map<String, Transform>::Element *F = cd.bone_rest_map.front(); F; F = F->next()) {
-
String name;
if (!state.sid_to_node_map.has(F->key())) {
@@ -2260,7 +2113,6 @@ void Collada::_merge_skeletons2(VisualScene *p_vscene) {
NodeSkeleton *sk = nullptr;
while (node && !sk) {
-
if (node->type == Node::TYPE_SKELETON) {
sk = static_cast<NodeSkeleton *>(node);
}
@@ -2278,7 +2130,6 @@ void Collada::_merge_skeletons2(VisualScene *p_vscene) {
//whoa.. wtf, merge.
_remove_node(p_vscene, sk);
for (int i = 0; i < sk->children.size(); i++) {
-
_joint_set_owner(sk->children[i], skeleton);
skeleton->children.push_back(sk->children[i]);
sk->children[i]->parent = skeleton;
@@ -2292,7 +2143,6 @@ void Collada::_merge_skeletons2(VisualScene *p_vscene) {
}
bool Collada::_optimize_skeletons(VisualScene *p_vscene, Node *p_node) {
-
Node *node = p_node;
if (node->type == Node::TYPE_SKELETON && node->parent && node->parent->type == Node::TYPE_NODE && node->parent->children.size() == 1) {
@@ -2312,7 +2162,6 @@ bool Collada::_optimize_skeletons(VisualScene *p_vscene, Node *p_node) {
Node *gp = parent->parent;
bool found = false;
for (int i = 0; i < gp->children.size(); i++) {
-
if (gp->children[i] == parent) {
gp->children.write[i] = node;
found = true;
@@ -2323,13 +2172,10 @@ bool Collada::_optimize_skeletons(VisualScene *p_vscene, Node *p_node) {
ERR_PRINT("BUG");
}
} else {
-
bool found = false;
for (int i = 0; i < p_vscene->root_nodes.size(); i++) {
-
if (p_vscene->root_nodes[i] == parent) {
-
p_vscene->root_nodes.write[i] = node;
found = true;
break;
@@ -2346,27 +2192,25 @@ bool Collada::_optimize_skeletons(VisualScene *p_vscene, Node *p_node) {
}
for (int i = 0; i < node->children.size(); i++) {
-
- if (_optimize_skeletons(p_vscene, node->children[i]))
+ if (_optimize_skeletons(p_vscene, node->children[i])) {
return false; //stop processing, go up
+ }
}
return false;
}
bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, List<Node *> *p_mgeom) {
-
// Bind Shape Matrix scales the bones and makes them gigantic, so the matrix then shrinks the model?
// Solution: apply the Bind Shape Matrix to the VERTICES, and if the object comes scaled, it seems to be left alone!
if (p_node->type == Node::TYPE_GEOMETRY) {
-
NodeGeometry *ng = static_cast<NodeGeometry *>(p_node);
- if (ng->ignore_anim)
+ if (ng->ignore_anim) {
return false; //already made child of skeleton and processeg
+ }
if (ng->controller && ng->skeletons.size()) {
-
String nodeid = ng->skeletons[0];
ERR_FAIL_COND_V(!state.scene_map.has(nodeid), false); //weird, it should have it...
@@ -2401,7 +2245,6 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L
//make rests relative to the skeleton (they seem to be always relative to world)
for (Map<String, Transform>::Element *E = skin.bone_rest_map.front(); E; E = E->next()) {
-
E->get() = skel_inv * E->get(); //make the bone rest local to the skeleton
state.bone_rest_map[E->key()] = E->get(); // make it remember where the bone is globally, now that it's relative
}
@@ -2419,7 +2262,6 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L
}
for (int i = 0; i < p_node->children.size(); i++) {
-
if (_move_geometry_to_skeletons(p_vscene, p_node->children[i], p_mgeom)) {
p_node->children.remove(i);
i--;
@@ -2430,23 +2272,17 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L
}
void Collada::_find_morph_nodes(VisualScene *p_vscene, Node *p_node) {
-
if (p_node->type == Node::TYPE_GEOMETRY) {
-
NodeGeometry *nj = static_cast<NodeGeometry *>(p_node);
if (nj->controller) {
-
String base = nj->source;
while (base != "" && !state.mesh_data_map.has(base)) {
-
if (state.skin_controller_data_map.has(base)) {
-
SkinControllerData &sk = state.skin_controller_data_map[base];
base = sk.base;
} else if (state.morph_controller_data_map.has(base)) {
-
state.morph_ownership_map[base] = nj->id;
break;
} else {
@@ -2457,15 +2293,12 @@ void Collada::_find_morph_nodes(VisualScene *p_vscene, Node *p_node) {
}
for (int i = 0; i < p_node->children.size(); i++) {
-
_find_morph_nodes(p_vscene, p_node->children[i]);
}
}
void Collada::_optimize() {
-
for (Map<String, VisualScene>::Element *E = state.visual_scene_map.front(); E; E = E->next()) {
-
VisualScene &vs = E->get();
for (int i = 0; i < vs.root_nodes.size(); i++) {
_create_skeletons(&vs.root_nodes.write[i]);
@@ -2482,7 +2315,6 @@ void Collada::_optimize() {
}
for (int i = 0; i < vs.root_nodes.size(); i++) {
-
List<Node *> mgeom;
if (_move_geometry_to_skeletons(&vs, vs.root_nodes[i], &mgeom)) {
vs.root_nodes.remove(i);
@@ -2490,7 +2322,6 @@ void Collada::_optimize() {
}
while (!mgeom.empty()) {
-
Node *n = mgeom.front()->get();
n->parent->children.push_back(n);
mgeom.pop_front();
@@ -2504,9 +2335,7 @@ void Collada::_optimize() {
}
int Collada::get_uv_channel(String p_name) {
-
if (!channel_map.has(p_name)) {
-
ERR_FAIL_COND_V(channel_map.size() == 2, 0);
channel_map[p_name] = channel_map.size();
@@ -2516,7 +2345,6 @@ int Collada::get_uv_channel(String p_name) {
}
Error Collada::load(const String &p_path, int p_flags) {
-
Ref<XMLParser> parserr = memnew(XMLParser);
XMLParser &parser = *parserr.ptr();
Error err = parser.open(p_path);
@@ -2526,13 +2354,12 @@ Error Collada::load(const String &p_path, int p_flags) {
state.import_flags = p_flags;
/* Skip headers */
while ((err = parser.read()) == OK) {
-
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
-
if (parser.get_node_name() == "COLLADA") {
break;
- } else if (!parser.is_empty())
+ } else if (!parser.is_empty()) {
parser.skip_section(); // unknown section, likely headers
+ }
}
}
@@ -2550,11 +2377,11 @@ Error Collada::load(const String &p_path, int p_flags) {
}
while ((err = parser.read()) == OK) {
-
/* Read all the main sections.. */
- if (parser.get_node_type() != XMLParser::NODE_ELEMENT)
+ if (parser.get_node_type() != XMLParser::NODE_ELEMENT) {
continue; //no idea what this may be, but skipping anyway
+ }
String section = parser.get_node_name();
@@ -2564,10 +2391,8 @@ Error Collada::load(const String &p_path, int p_flags) {
_parse_asset(parser);
} else if (section.begins_with("library_")) {
-
_parse_library(parser);
} else if (section == "scene") {
-
_parse_scene(parser);
} else if (!parser.is_empty()) {
parser.skip_section(); // unknown section, likely headers
diff --git a/editor/import/collada.h b/editor/import/collada.h
index b74332fb22..90c6c47e0b 100644
--- a/editor/import/collada.h
+++ b/editor/import/collada.h
@@ -44,82 +44,65 @@ public:
};
struct Image {
-
String path;
};
struct Material {
-
String name;
String instance_effect;
};
struct Effect {
-
String name;
Map<String, Variant> params;
struct Channel {
-
- int uv_idx;
+ int uv_idx = 0;
String texture;
Color color;
- Channel() { uv_idx = 0; }
+ Channel() {}
};
Channel diffuse, specular, emission, bump;
- float shininess;
- bool found_double_sided;
- bool double_sided;
- bool unshaded;
+ float shininess = 40;
+ bool found_double_sided = false;
+ bool double_sided = true;
+ bool unshaded = false;
String get_texture_path(const String &p_source, Collada &state) const;
Effect() {
diffuse.color = Color(1, 1, 1, 1);
- double_sided = true;
- found_double_sided = false;
- shininess = 40;
- unshaded = false;
}
};
struct CameraData {
-
enum Mode {
MODE_PERSPECTIVE,
MODE_ORTHOGONAL
};
- Mode mode;
+ Mode mode = MODE_PERSPECTIVE;
union {
struct {
- float x_fov;
- float y_fov;
+ float x_fov = 0;
+ float y_fov = 0;
} perspective;
struct {
- float x_mag;
- float y_mag;
+ float x_mag = 0;
+ float y_mag = 0;
} orthogonal;
};
- float aspect;
- float z_near;
- float z_far;
-
- CameraData() :
- mode(MODE_PERSPECTIVE),
- aspect(1),
- z_near(0.1),
- z_far(100) {
- perspective.x_fov = 0;
- perspective.y_fov = 0;
- }
+ float aspect = 1;
+ float z_near = 0.1;
+ float z_far = 100;
+
+ CameraData() {}
};
struct LightData {
-
enum Mode {
MODE_AMBIENT,
MODE_DIRECTIONAL,
@@ -127,33 +110,23 @@ public:
MODE_SPOT
};
- Mode mode;
+ Mode mode = MODE_AMBIENT;
- Color color;
+ Color color = Color(1, 1, 1, 1);
- float constant_att;
- float linear_att;
- float quad_att;
-
- float spot_angle;
- float spot_exp;
-
- LightData() :
- mode(MODE_AMBIENT),
- color(Color(1, 1, 1, 1)),
- constant_att(0),
- linear_att(0),
- quad_att(0),
- spot_angle(45),
- spot_exp(1) {
- }
+ float constant_att = 0;
+ float linear_att = 0;
+ float quad_att = 0;
+
+ float spot_angle = 45;
+ float spot_exp = 1;
+
+ LightData() {}
};
struct MeshData {
-
String name;
struct Source {
-
Vector<float> array;
int stride;
};
@@ -161,16 +134,13 @@ public:
Map<String, Source> sources;
struct Vertices {
-
Map<String, String> sources;
};
Map<String, Vertices> vertices;
struct Primitives {
-
struct SourceRef {
-
String source;
int offset;
};
@@ -185,22 +155,17 @@ public:
Vector<Primitives> primitives;
- bool found_double_sided;
- bool double_sided;
+ bool found_double_sided = false;
+ bool double_sided = true;
- MeshData() {
- found_double_sided = false;
- double_sided = true;
- }
+ MeshData() {}
};
struct CurveData {
-
String name;
- bool closed;
+ bool closed = false;
struct Source {
-
Vector<String> sarray;
Vector<float> array;
int stride;
@@ -210,39 +175,30 @@ public:
Map<String, String> control_vertices;
- CurveData() {
-
- closed = false;
- }
+ CurveData() {}
};
- struct SkinControllerData {
+ struct SkinControllerData {
String base;
- bool use_idrefs;
+ bool use_idrefs = false;
Transform bind_shape;
struct Source {
-
Vector<String> sarray; //maybe for names
Vector<float> array;
- int stride;
- Source() {
- stride = 1;
- }
+ int stride = 1;
+ Source() {}
};
Map<String, Source> sources;
struct Joints {
-
Map<String, String> sources;
} joints;
struct Weights {
-
struct SourceRef {
-
String source;
int offset;
};
@@ -256,20 +212,18 @@ public:
Map<String, Transform> bone_rest_map;
- SkinControllerData() { use_idrefs = false; }
+ SkinControllerData() {}
};
struct MorphControllerData {
-
String mesh;
String mode;
struct Source {
-
- int stride;
+ int stride = 1;
Vector<String> sarray; //maybe for names
Vector<float> array;
- Source() { stride = 1; }
+ Source() {}
};
Map<String, Source> sources;
@@ -279,15 +233,14 @@ public:
};
struct Vertex {
-
- int idx;
+ int idx = 0;
Vector3 vertex;
Vector3 normal;
Vector3 uv;
Vector3 uv2;
Plane tangent;
Color color;
- int uid;
+ int uid = 0;
struct Weight {
int bone_idx;
float weight;
@@ -297,40 +250,40 @@ public:
Vector<Weight> weights;
void fix_weights() {
-
weights.sort();
if (weights.size() > 4) {
//cap to 4 and make weights add up 1
weights.resize(4);
float total = 0;
- for (int i = 0; i < 4; i++)
+ for (int i = 0; i < 4; i++) {
total += weights[i].weight;
- if (total)
- for (int i = 0; i < 4; i++)
+ }
+ if (total) {
+ for (int i = 0; i < 4; i++) {
weights.write[i].weight /= total;
+ }
+ }
}
}
void fix_unit_scale(Collada &state);
bool operator<(const Vertex &p_vert) const {
-
if (uid == p_vert.uid) {
if (vertex == p_vert.vertex) {
if (normal == p_vert.normal) {
if (uv == p_vert.uv) {
if (uv2 == p_vert.uv2) {
-
if (!weights.empty() || !p_vert.weights.empty()) {
-
if (weights.size() == p_vert.weights.size()) {
-
for (int i = 0; i < weights.size(); i++) {
- if (weights[i].bone_idx != p_vert.weights[i].bone_idx)
+ if (weights[i].bone_idx != p_vert.weights[i].bone_idx) {
return weights[i].bone_idx < p_vert.weights[i].bone_idx;
+ }
- if (weights[i].weight != p_vert.weights[i].weight)
+ if (weights[i].weight != p_vert.weights[i].weight) {
return weights[i].weight < p_vert.weights[i].weight;
+ }
}
} else {
return weights.size() < p_vert.weights.size();
@@ -338,25 +291,27 @@ public:
}
return (color < p_vert.color);
- } else
+ } else {
return (uv2 < p_vert.uv2);
- } else
+ }
+ } else {
return (uv < p_vert.uv);
- } else
+ }
+ } else {
return (normal < p_vert.normal);
- } else
+ }
+ } else {
return vertex < p_vert.vertex;
- } else
+ }
+ } else {
return uid < p_vert.uid;
+ }
}
- Vertex() {
- uid = 0;
- idx = 0;
- }
+ Vertex() {}
};
- struct Node {
+ struct Node {
enum Type {
TYPE_NODE,
@@ -368,7 +323,6 @@ public:
};
struct XForm {
-
enum Op {
OP_ROTATE,
OP_SCALE,
@@ -382,54 +336,46 @@ public:
Vector<float> data;
};
- Type type;
+ Type type = TYPE_NODE;
String name;
String id;
String empty_draw_type;
- bool noname;
+ bool noname = false;
Vector<XForm> xform_list;
Transform default_transform;
Transform post_transform;
Vector<Node *> children;
- Node *parent;
+ Node *parent = nullptr;
Transform compute_transform(Collada &state) const;
Transform get_global_transform() const;
Transform get_transform() const;
- bool ignore_anim;
+ bool ignore_anim = false;
- Node() {
- noname = false;
- type = TYPE_NODE;
- parent = nullptr;
- ignore_anim = false;
- }
+ Node() {}
virtual ~Node() {
- for (int i = 0; i < children.size(); i++)
+ for (int i = 0; i < children.size(); i++) {
memdelete(children[i]);
+ }
};
};
struct NodeSkeleton : public Node {
-
NodeSkeleton() { type = TYPE_SKELETON; }
};
struct NodeJoint : public Node {
-
- NodeSkeleton *owner;
+ NodeSkeleton *owner = nullptr;
String sid;
NodeJoint() {
type = TYPE_JOINT;
- owner = nullptr;
}
};
struct NodeGeometry : public Node {
-
bool controller;
String source;
@@ -444,50 +390,43 @@ public:
};
struct NodeCamera : public Node {
-
String camera;
NodeCamera() { type = TYPE_CAMERA; }
};
struct NodeLight : public Node {
-
String light;
NodeLight() { type = TYPE_LIGHT; }
};
struct VisualScene {
-
String name;
Vector<Node *> root_nodes;
~VisualScene() {
- for (int i = 0; i < root_nodes.size(); i++)
+ for (int i = 0; i < root_nodes.size(); i++) {
memdelete(root_nodes[i]);
+ }
}
};
struct AnimationClip {
-
String name;
- float begin;
- float end;
+ float begin = 0;
+ float end = 1;
Vector<String> tracks;
- AnimationClip() {
- begin = 0;
- end = 1;
- }
+ AnimationClip() {}
};
struct AnimationTrack {
-
String id;
String target;
String param;
String component;
- bool property;
+ bool property = false;
enum InterpolationType {
INTERP_LINEAR,
@@ -495,7 +434,6 @@ public:
};
struct Key {
-
enum Type {
TYPE_FLOAT,
TYPE_MATRIX
@@ -505,16 +443,16 @@ public:
Vector<float> data;
Point2 in_tangent;
Point2 out_tangent;
- InterpolationType interp_type;
+ InterpolationType interp_type = INTERP_LINEAR;
- Key() { interp_type = INTERP_LINEAR; }
+ Key() {}
};
Vector<float> get_value_at_time(float p_time) const;
Vector<Key> keys;
- AnimationTrack() { property = false; }
+ AnimationTrack() {}
};
/****************/
@@ -522,15 +460,13 @@ public:
/****************/
struct State {
+ int import_flags = 0;
- int import_flags;
-
- float unit_scale;
- Vector3::Axis up_axis;
+ float unit_scale = 1.0;
+ Vector3::Axis up_axis = Vector3::AXIS_Y;
bool z_up;
struct Version {
-
int major, minor, rev;
bool operator<(const Version &p_ver) const { return (major == p_ver.major) ? ((minor == p_ver.minor) ? (rev < p_ver.rev) : minor < p_ver.minor) : major < p_ver.major; }
@@ -573,14 +509,9 @@ public:
Map<String, Vector<int>> referenced_tracks;
Map<String, Vector<int>> by_id_tracks;
- float animation_length;
+ float animation_length = 0;
- State() :
- import_flags(0),
- unit_scale(1.0),
- up_axis(Vector3::AXIS_Y),
- animation_length(0) {
- }
+ State() {}
} state;
Error load(const String &p_path, int p_flags = 0);
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 697ddfba96..12cbaaa885 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -45,7 +45,6 @@
#include "scene/resources/surface_tool.h"
struct ColladaImport {
-
Collada collada;
Node3D *scene;
@@ -101,7 +100,6 @@ struct ColladaImport {
void _pre_process_lights(Collada::Node *p_node);
ColladaImport() {
-
found_ambient = false;
found_directional = false;
force_make_tangents = false;
@@ -111,15 +109,16 @@ struct ColladaImport {
};
Error ColladaImport::_populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p_node, int &r_bone, int p_parent) {
-
- if (p_node->type != Collada::Node::TYPE_JOINT)
+ if (p_node->type != Collada::Node::TYPE_JOINT) {
return OK;
+ }
Collada::NodeJoint *joint = static_cast<Collada::NodeJoint *>(p_node);
p_skeleton->add_bone(p_node->name);
- if (p_parent >= 0)
+ if (p_parent >= 0) {
p_skeleton->set_bone_parent(r_bone, p_parent);
+ }
NodeMap nm;
nm.node = p_skeleton;
@@ -130,7 +129,6 @@ Error ColladaImport::_populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p
skeleton_bone_map[p_skeleton][joint->sid] = r_bone;
if (collada.state.bone_rest_map.has(joint->sid)) {
-
p_skeleton->set_bone_rest(r_bone, collada.fix_transform(collada.state.bone_rest_map[joint->sid]));
//should map this bone to something for animation?
} else {
@@ -139,22 +137,19 @@ Error ColladaImport::_populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p
int id = r_bone++;
for (int i = 0; i < p_node->children.size(); i++) {
-
Error err = _populate_skeleton(p_skeleton, p_node->children[i], r_bone, id);
- if (err)
+ if (err) {
return err;
+ }
}
return OK;
}
void ColladaImport::_pre_process_lights(Collada::Node *p_node) {
-
if (p_node->type == Collada::Node::TYPE_LIGHT) {
-
Collada::NodeLight *light = static_cast<Collada::NodeLight *>(p_node);
if (collada.state.light_data_map.has(light->light)) {
-
Collada::LightData &ld = collada.state.light_data_map[light->light];
if (ld.mode == Collada::LightData::MODE_AMBIENT) {
found_ambient = true;
@@ -166,18 +161,16 @@ void ColladaImport::_pre_process_lights(Collada::Node *p_node) {
}
}
- for (int i = 0; i < p_node->children.size(); i++)
+ for (int i = 0; i < p_node->children.size(); i++) {
_pre_process_lights(p_node->children[i]);
+ }
}
Error ColladaImport::_create_scene_skeletons(Collada::Node *p_node) {
-
if (p_node->type == Collada::Node::TYPE_SKELETON) {
-
Skeleton3D *sk = memnew(Skeleton3D);
int bone = 0;
for (int i = 0; i < p_node->children.size(); i++) {
-
_populate_skeleton(sk, p_node->children[i], bone, -1);
}
sk->localize_rests(); //after creating skeleton, rests must be localized...!
@@ -185,43 +178,38 @@ Error ColladaImport::_create_scene_skeletons(Collada::Node *p_node) {
}
for (int i = 0; i < p_node->children.size(); i++) {
-
Error err = _create_scene_skeletons(p_node->children[i]);
- if (err)
+ if (err) {
return err;
+ }
}
return OK;
}
Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
-
Node3D *node = nullptr;
switch (p_node->type) {
-
case Collada::Node::TYPE_NODE: {
-
node = memnew(Node3D);
} break;
case Collada::Node::TYPE_JOINT: {
-
return OK; // do nothing
} break;
case Collada::Node::TYPE_LIGHT: {
-
//node = memnew( Light)
Collada::NodeLight *light = static_cast<Collada::NodeLight *>(p_node);
if (collada.state.light_data_map.has(light->light)) {
-
Collada::LightData &ld = collada.state.light_data_map[light->light];
if (ld.mode == Collada::LightData::MODE_AMBIENT) {
-
- if (found_directional)
+ if (found_directional) {
return OK; //do nothing not needed
+ }
- if (!bool(GLOBAL_DEF("collada/use_ambient", false)))
+ if (!bool(GLOBAL_DEF("collada/use_ambient", false))) {
return OK;
+ }
//well, it's an ambient light..
Light3D *l = memnew(DirectionalLight3D);
//l->set_color(Light::COLOR_AMBIENT,ld.color);
@@ -230,7 +218,6 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
node = l;
} else if (ld.mode == Collada::LightData::MODE_DIRECTIONAL) {
-
//well, it's an ambient light..
Light3D *l = memnew(DirectionalLight3D);
/*
@@ -242,12 +229,11 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
*/
node = l;
} else {
-
Light3D *l;
- if (ld.mode == Collada::LightData::MODE_OMNI)
+ if (ld.mode == Collada::LightData::MODE_OMNI) {
l = memnew(OmniLight3D);
- else {
+ } else {
l = memnew(SpotLight3D);
//l->set_parameter(Light::PARAM_SPOT_ANGLE,ld.spot_angle);
//l->set_parameter(Light::PARAM_SPOT_ATTENUATION,ld.spot_exp);
@@ -261,43 +247,33 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
}
} else {
-
node = memnew(Node3D);
}
} break;
case Collada::Node::TYPE_CAMERA: {
-
Collada::NodeCamera *cam = static_cast<Collada::NodeCamera *>(p_node);
Camera3D *camera = memnew(Camera3D);
if (collada.state.camera_data_map.has(cam->camera)) {
-
const Collada::CameraData &cd = collada.state.camera_data_map[cam->camera];
switch (cd.mode) {
-
case Collada::CameraData::MODE_ORTHOGONAL: {
-
if (cd.orthogonal.y_mag) {
-
camera->set_keep_aspect_mode(Camera3D::KEEP_HEIGHT);
camera->set_orthogonal(cd.orthogonal.y_mag * 2.0, cd.z_near, cd.z_far);
} else if (!cd.orthogonal.y_mag && cd.orthogonal.x_mag) {
-
camera->set_keep_aspect_mode(Camera3D::KEEP_WIDTH);
camera->set_orthogonal(cd.orthogonal.x_mag * 2.0, cd.z_near, cd.z_far);
}
} break;
case Collada::CameraData::MODE_PERSPECTIVE: {
-
if (cd.perspective.y_fov) {
-
camera->set_perspective(cd.perspective.y_fov, cd.z_near, cd.z_far);
} else if (!cd.perspective.y_fov && cd.perspective.x_fov) {
-
camera->set_perspective(cd.perspective.x_fov / cd.aspect, cd.z_near, cd.z_far);
}
@@ -309,11 +285,9 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
} break;
case Collada::Node::TYPE_GEOMETRY: {
-
Collada::NodeGeometry *ng = static_cast<Collada::NodeGeometry *>(p_node);
if (collada.state.curve_data_map.has(ng->source)) {
-
node = memnew(Path3D);
} else {
//mesh since nothing else
@@ -322,15 +296,15 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
}
} break;
case Collada::Node::TYPE_SKELETON: {
-
ERR_FAIL_COND_V(!skeleton_map.has(p_node), ERR_CANT_CREATE);
Skeleton3D *sk = skeleton_map[p_node];
node = sk;
} break;
}
- if (p_node->name != "")
+ if (p_node->name != "") {
node->set_name(p_node->name);
+ }
NodeMap nm;
nm.node = node;
node_map[p_node->id] = nm;
@@ -347,16 +321,15 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
}
for (int i = 0; i < p_node->children.size(); i++) {
-
Error err = _create_scene(p_node->children[i], node);
- if (err)
+ if (err) {
return err;
+ }
}
return OK;
}
Error ColladaImport::_create_material(const String &p_target) {
-
ERR_FAIL_COND_V(material_cache.has(p_target), ERR_ALREADY_EXISTS);
ERR_FAIL_COND_V(!collada.state.material_map.has(p_target), ERR_INVALID_PARAMETER);
Collada::Material &src_mat = collada.state.material_map[p_target];
@@ -365,24 +338,22 @@ Error ColladaImport::_create_material(const String &p_target) {
Ref<StandardMaterial3D> material = memnew(StandardMaterial3D);
- if (src_mat.name != "")
+ if (src_mat.name != "") {
material->set_name(src_mat.name);
- else if (effect.name != "")
+ } else if (effect.name != "") {
material->set_name(effect.name);
+ }
// DIFFUSE
if (effect.diffuse.texture != "") {
-
String texfile = effect.get_texture_path(effect.diffuse.texture, collada);
if (texfile != "") {
-
if (texfile.begins_with("/")) {
texfile = texfile.replace_first("/", "res://");
}
Ref<Texture2D> texture = ResourceLoader::load(texfile, "Texture2D");
if (texture.is_valid()) {
-
material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, texture);
material->set_albedo(Color(1, 1, 1, 1));
//material->set_parameter(StandardMaterial3D::PARAM_DIFFUSE,Color(1,1,1,1));
@@ -397,10 +368,8 @@ Error ColladaImport::_create_material(const String &p_target) {
// SPECULAR
if (effect.specular.texture != "") {
-
String texfile = effect.get_texture_path(effect.specular.texture, collada);
if (texfile != "") {
-
if (texfile.begins_with("/")) {
texfile = texfile.replace_first("/", "res://");
}
@@ -424,17 +393,14 @@ Error ColladaImport::_create_material(const String &p_target) {
// EMISSION
if (effect.emission.texture != "") {
-
String texfile = effect.get_texture_path(effect.emission.texture, collada);
if (texfile != "") {
-
if (texfile.begins_with("/")) {
texfile = texfile.replace_first("/", "res://");
}
Ref<Texture2D> texture = ResourceLoader::load(texfile, "Texture2D");
if (texture.is_valid()) {
-
material->set_feature(StandardMaterial3D::FEATURE_EMISSION, true);
material->set_texture(StandardMaterial3D::TEXTURE_EMISSION, texture);
material->set_emission(Color(1, 1, 1, 1));
@@ -454,10 +420,8 @@ Error ColladaImport::_create_material(const String &p_target) {
// NORMAL
if (effect.bump.texture != "") {
-
String texfile = effect.get_texture_path(effect.bump.texture, collada);
if (texfile != "") {
-
if (texfile.begins_with("/")) {
texfile = texfile.replace_first("/", "res://");
}
@@ -490,33 +454,30 @@ Error ColladaImport::_create_material(const String &p_target) {
}
Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) {
-
bool local_xform_mirror = p_local_xform.basis.determinant() < 0;
if (p_morph_data) {
-
//add morphie target
ERR_FAIL_COND_V(!p_morph_data->targets.has("MORPH_TARGET"), ERR_INVALID_DATA);
String mt = p_morph_data->targets["MORPH_TARGET"];
ERR_FAIL_COND_V(!p_morph_data->sources.has(mt), ERR_INVALID_DATA);
int morph_targets = p_morph_data->sources[mt].sarray.size();
for (int i = 0; i < morph_targets; i++) {
-
String target = p_morph_data->sources[mt].sarray[i];
ERR_FAIL_COND_V(!collada.state.mesh_data_map.has(target), ERR_INVALID_DATA);
String name = collada.state.mesh_data_map[target].name;
p_mesh->add_blend_shape(name);
}
- if (p_morph_data->mode == "RELATIVE")
+ if (p_morph_data->mode == "RELATIVE") {
p_mesh->set_blend_shape_mode(Mesh::BLEND_SHAPE_MODE_RELATIVE);
- else if (p_morph_data->mode == "NORMALIZED")
+ } else if (p_morph_data->mode == "NORMALIZED") {
p_mesh->set_blend_shape_mode(Mesh::BLEND_SHAPE_MODE_NORMALIZED);
+ }
}
int surface = 0;
for (int p_i = 0; p_i < meshdata.primitives.size(); p_i++) {
-
const Collada::MeshData::Primitives &p = meshdata.primitives[p_i];
/* VERTEX SOURCE */
@@ -540,7 +501,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int normal_ofs = 0;
if (p.sources.has("NORMAL")) {
-
String normal_source_id = p.sources["NORMAL"].source;
normal_ofs = p.sources["NORMAL"].offset;
ERR_FAIL_COND_V(!meshdata.sources.has(normal_source_id), ERR_INVALID_DATA);
@@ -551,7 +511,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int binormal_ofs = 0;
if (p.sources.has("TEXBINORMAL")) {
-
String binormal_source_id = p.sources["TEXBINORMAL"].source;
binormal_ofs = p.sources["TEXBINORMAL"].offset;
ERR_FAIL_COND_V(!meshdata.sources.has(binormal_source_id), ERR_INVALID_DATA);
@@ -562,7 +521,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int tangent_ofs = 0;
if (p.sources.has("TEXTANGENT")) {
-
String tangent_source_id = p.sources["TEXTANGENT"].source;
tangent_ofs = p.sources["TEXTANGENT"].offset;
ERR_FAIL_COND_V(!meshdata.sources.has(tangent_source_id), ERR_INVALID_DATA);
@@ -573,7 +531,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int uv_ofs = 0;
if (p.sources.has("TEXCOORD0")) {
-
String uv_source_id = p.sources["TEXCOORD0"].source;
uv_ofs = p.sources["TEXCOORD0"].offset;
ERR_FAIL_COND_V(!meshdata.sources.has(uv_source_id), ERR_INVALID_DATA);
@@ -584,7 +541,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int uv2_ofs = 0;
if (p.sources.has("TEXCOORD1")) {
-
String uv2_source_id = p.sources["TEXCOORD1"].source;
uv2_ofs = p.sources["TEXCOORD1"].offset;
ERR_FAIL_COND_V(!meshdata.sources.has(uv2_source_id), ERR_INVALID_DATA);
@@ -595,7 +551,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int color_ofs = 0;
if (p.sources.has("COLOR")) {
-
String color_source_id = p.sources["COLOR"].source;
color_ofs = p.sources["COLOR"].offset;
ERR_FAIL_COND_V(!meshdata.sources.has(color_source_id), ERR_INVALID_DATA);
@@ -613,16 +568,13 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
bool has_weights = false;
if (p_skin_controller) {
-
const Collada::SkinControllerData::Source *weight_src = nullptr;
int weight_ofs = 0;
if (p_skin_controller->weights.sources.has("WEIGHT")) {
-
String weight_id = p_skin_controller->weights.sources["WEIGHT"].source;
weight_ofs = p_skin_controller->weights.sources["WEIGHT"].offset;
if (p_skin_controller->sources.has(weight_id)) {
-
weight_src = &p_skin_controller->sources[weight_id];
}
}
@@ -630,7 +582,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int joint_ofs = 0;
if (p_skin_controller->weights.sources.has("JOINT")) {
-
joint_ofs = p_skin_controller->weights.sources["JOINT"].offset;
}
@@ -639,13 +590,11 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int index_ofs = 0;
int wstride = p_skin_controller->weights.sources.size();
for (int w_i = 0; w_i < p_skin_controller->weights.sets.size(); w_i++) {
-
int amount = p_skin_controller->weights.sets[w_i];
Vector<Collada::Vertex::Weight> weights;
for (int a_i = 0; a_i < amount; a_i++) {
-
Collada::Vertex::Weight w;
int read_from = index_ofs + a_i * wstride;
@@ -656,8 +605,9 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
w.weight = weight_src->array[weight_index];
int bone_index = p_skin_controller->weights.indices[read_from + joint_ofs];
- if (bone_index == -1)
+ if (bone_index == -1) {
continue; //ignore this weight (refers to bind shape)
+ }
ERR_FAIL_INDEX_V(bone_index, bone_remap.size(), ERR_INVALID_DATA);
w.bone_idx = bone_remap[bone_index];
@@ -676,11 +626,14 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
//make sure weights always add up to 1
float total = 0;
- for (int i = 0; i < weights.size(); i++)
+ for (int i = 0; i < weights.size(); i++) {
total += weights[i].weight;
- if (total)
- for (int i = 0; i < weights.size(); i++)
+ }
+ if (total) {
+ for (int i = 0; i < weights.size(); i++) {
weights.write[i].weight /= total;
+ }
+ }
if (weights.size() == 0 || total == 0) { //if nothing, add a weight to bone 0
//no weights assigned
@@ -715,10 +668,8 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int _prim_ofs = 0;
int vertidx = 0;
for (int p_j = 0; p_j < p.count; p_j++) {
-
int amount;
if (p.polygons.size()) {
-
ERR_FAIL_INDEX_V(p_j, p.polygons.size(), ERR_INVALID_DATA);
amount = p.polygons[p_j];
} else {
@@ -730,15 +681,15 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int prev2[2] = { 0, 0 };
for (int j = 0; j < amount; j++) {
-
int src = _prim_ofs;
//_prim_ofs+=p.sources.size()
ERR_FAIL_INDEX_V(src, p.indices.size(), ERR_INVALID_DATA);
Collada::Vertex vertex;
- if (!p_optimize)
+ if (!p_optimize) {
vertex.uid = vertidx++;
+ }
int vertex_index = p.indices[src + vertex_ofs]; //used for index field (later used by controllers)
int vertex_pos = (vertex_src->stride ? vertex_src->stride : 3) * vertex_index;
@@ -750,13 +701,11 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
}
if (normal_src) {
-
int normal_pos = (normal_src->stride ? normal_src->stride : 3) * p.indices[src + normal_ofs];
ERR_FAIL_INDEX_V(normal_pos, normal_src->array.size(), ERR_INVALID_DATA);
vertex.normal = Vector3(normal_src->array[normal_pos + 0], normal_src->array[normal_pos + 1], normal_src->array[normal_pos + 2]);
if (tangent_src && binormal_src) {
-
int binormal_pos = (binormal_src->stride ? binormal_src->stride : 3) * p.indices[src + binormal_ofs];
ERR_FAIL_INDEX_V(binormal_pos, binormal_src->array.size(), ERR_INVALID_DATA);
Vector3 binormal = Vector3(binormal_src->array[binormal_pos + 0], binormal_src->array[binormal_pos + 1], binormal_src->array[binormal_pos + 2]);
@@ -771,21 +720,18 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
}
if (uv_src) {
-
int uv_pos = (uv_src->stride ? uv_src->stride : 2) * p.indices[src + uv_ofs];
ERR_FAIL_INDEX_V(uv_pos, uv_src->array.size(), ERR_INVALID_DATA);
vertex.uv = Vector3(uv_src->array[uv_pos + 0], 1.0 - uv_src->array[uv_pos + 1], 0);
}
if (uv2_src) {
-
int uv2_pos = (uv2_src->stride ? uv2_src->stride : 2) * p.indices[src + uv2_ofs];
ERR_FAIL_INDEX_V(uv2_pos, uv2_src->array.size(), ERR_INVALID_DATA);
vertex.uv2 = Vector3(uv2_src->array[uv2_pos + 0], 1.0 - uv2_src->array[uv2_pos + 1], 0);
}
if (color_src) {
-
int color_pos = (color_src->stride ? color_src->stride : 3) * p.indices[src + color_ofs]; // colors are RGB in collada..
ERR_FAIL_INDEX_V(color_pos, color_src->array.size(), ERR_INVALID_DATA);
vertex.color = Color(color_src->array[color_pos + 0], color_src->array[color_pos + 1], color_src->array[color_pos + 2], (color_src->stride > 3) ? color_src->array[color_pos + 3] : 1.0);
@@ -793,7 +739,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
#ifndef NO_UP_AXIS_SWAP
if (collada.state.up_axis == Vector3::AXIS_Z) {
-
Vector3 bn = vertex.normal.cross(vertex.tangent.normal) * vertex.tangent.d;
SWAP(vertex.vertex.z, vertex.vertex.y);
@@ -815,23 +760,21 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
//COLLADA_PRINT("vertex: "+vertex.vertex);
if (vertex_set.has(vertex)) {
-
index = vertex_set.find(vertex)->get().idx;
} else {
-
index = vertex_set.size();
vertex.idx = index;
vertex_set.insert(vertex);
}
//build triangles if needed
- if (j == 0)
+ if (j == 0) {
prev2[0] = index;
+ }
if (j >= 2) {
//insert indices in reverse order (collada uses CCW as frontface)
if (local_xform_mirror) {
-
indices_list.push_back(prev2[0]);
indices_list.push_back(prev2[1]);
indices_list.push_back(index);
@@ -852,16 +795,13 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
vertex_array.resize(vertex_set.size());
for (Set<Collada::Vertex>::Element *F = vertex_set.front(); F; F = F->next()) {
-
vertex_array.write[F->get().idx] = F->get();
}
if (has_weights) {
-
//if skeleton, localize
Transform local_xform = p_local_xform;
for (int i = 0; i < vertex_array.size(); i++) {
-
vertex_array.write[i].vertex = local_xform.xform(vertex_array[i].vertex);
vertex_array.write[i].normal = local_xform.basis.xform(vertex_array[i].normal).normalized();
vertex_array.write[i].tangent.normal = local_xform.basis.xform(vertex_array[i].tangent.normal).normalized();
@@ -878,20 +818,20 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
/*****************/
{
-
Ref<StandardMaterial3D> material;
{
-
if (p_material_map.has(p.material)) {
String target = p_material_map[p.material].target;
if (!material_cache.has(target)) {
Error err = _create_material(target);
- if (!err)
+ if (!err) {
material = material_cache[target];
- } else
+ }
+ } else {
material = material_cache[target];
+ }
} else if (p.material != "") {
WARN_PRINT("Collada: Unreferenced material in geometry instance: " + p.material);
@@ -931,7 +871,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
bones.write[l] = vertex_array[k].weights[l].bone_idx;
//sum += vertex_array[k].weights[l].weight;
} else {
-
weights.write[l] = 0;
bones.write[l] = 0;
}
@@ -954,7 +893,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
}
if ((!binormal_src || !tangent_src) && normal_src && uv_src && force_make_tangents) {
-
surftool->generate_tangents();
}
@@ -972,7 +910,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
////////////////////////////
for (int mi = 0; mi < p_morph_meshes.size(); mi++) {
-
Array a = p_morph_meshes[mi]->surface_get_arrays(surface);
//add valid weight and bone arrays if they exist, TODO check if they are unique to shape (generally not)
@@ -1007,21 +944,16 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
}
Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compression) {
-
if (p_node->type == Collada::Node::TYPE_GEOMETRY && node_map.has(p_node->id)) {
-
Node3D *node = node_map[p_node->id].node;
Collada::NodeGeometry *ng = static_cast<Collada::NodeGeometry *>(p_node);
if (Object::cast_to<Path3D>(node)) {
-
Path3D *path = Object::cast_to<Path3D>(node);
if (curve_cache.has(ng->source)) {
-
path->set_curve(curve_cache[ng->source]);
} else {
-
Ref<Curve3D> c = memnew(Curve3D);
const Collada::CurveData &cd = collada.state.curve_data_map[ng->source];
@@ -1048,19 +980,18 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
ERR_FAIL_COND_V(interps.stride != 1, ERR_INVALID_DATA);
const Collada::CurveData::Source *tilts = nullptr;
- if (cd.control_vertices.has("TILT") && cd.sources.has(cd.control_vertices["TILT"]))
+ if (cd.control_vertices.has("TILT") && cd.sources.has(cd.control_vertices["TILT"])) {
tilts = &cd.sources[cd.control_vertices["TILT"]];
+ }
int pc = vertices.array.size() / 3;
for (int i = 0; i < pc; i++) {
-
Vector3 pos(vertices.array[i * 3 + 0], vertices.array[i * 3 + 1], vertices.array[i * 3 + 2]);
Vector3 in(in_tangents.array[i * 3 + 0], in_tangents.array[i * 3 + 1], in_tangents.array[i * 3 + 2]);
Vector3 out(out_tangents.array[i * 3 + 0], out_tangents.array[i * 3 + 1], out_tangents.array[i * 3 + 2]);
#ifndef NO_UP_AXIS_SWAP
if (collada.state.up_axis == Vector3::AXIS_Z) {
-
SWAP(pos.y, pos.z);
pos.z = -pos.z;
SWAP(in.y, in.z);
@@ -1074,8 +1005,9 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
out *= collada.state.unit_scale;
c->add_point(pos, in - pos, out - pos);
- if (tilts)
+ if (tilts) {
c->set_point_tilt(i, tilts->array[i]);
+ }
}
curve_cache[ng->source] = c;
@@ -1084,7 +1016,6 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
}
if (Object::cast_to<MeshInstance3D>(node)) {
-
Collada::NodeGeometry *ng2 = static_cast<Collada::NodeGeometry *>(p_node);
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(node);
@@ -1099,11 +1030,9 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
Vector<Ref<ArrayMesh>> morphs;
if (ng2->controller) {
-
String ngsource = ng2->source;
if (collada.state.skin_controller_data_map.has(ngsource)) {
-
ERR_FAIL_COND_V(!collada.state.skin_controller_data_map.has(ngsource), ERR_INVALID_DATA);
skin = &collada.state.skin_controller_data_map[ngsource];
@@ -1147,7 +1076,6 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
bone_remap.resize(joint_src->sarray.size());
for (int i = 0; i < bone_remap.size(); i++) {
-
String str = joint_src->sarray[i];
ERR_FAIL_COND_V(!bone_remap_map.has(str), ERR_INVALID_DATA);
bone_remap.write[i] = bone_remap_map[str];
@@ -1155,7 +1083,6 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
}
if (collada.state.morph_controller_data_map.has(ngsource)) {
-
//it's a morph!!
morph = &collada.state.morph_controller_data_map[ngsource];
meshid = morph->mesh;
@@ -1167,7 +1094,6 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
valid = true;
Vector<String> names = morph->sources[target].sarray;
for (int i = 0; i < names.size(); i++) {
-
String meshid2 = names[i];
if (collada.state.mesh_data_map.has(meshid2)) {
Ref<ArrayMesh> mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
@@ -1183,8 +1109,9 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
}
}
- if (!valid)
+ if (!valid) {
morphs.clear();
+ }
ngsource = "";
}
}
@@ -1211,19 +1138,16 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
mesh_cache[meshid] = mesh;
} else {
-
WARN_PRINT("Collada: Will not import geometry: " + meshid);
}
}
if (!mesh.is_null()) {
-
mi->set_mesh(mesh);
if (!use_mesh_builtin_materials) {
const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid];
for (int i = 0; i < meshdata.primitives.size(); i++) {
-
String matname = meshdata.primitives[i].material;
if (ng2->material_map.has(matname)) {
@@ -1232,10 +1156,12 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
Ref<Material> material;
if (!material_cache.has(target)) {
Error err = _create_material(target);
- if (!err)
+ if (!err) {
material = material_cache[target];
- } else
+ }
+ } else {
material = material_cache[target];
+ }
mi->set_surface_material(i, material);
} else if (matname != "") {
@@ -1248,16 +1174,15 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
}
for (int i = 0; i < p_node->children.size(); i++) {
-
Error err = _create_resources(p_node->children[i], p_use_compression);
- if (err)
+ if (err) {
return err;
+ }
}
return OK;
}
Error ColladaImport::load(const String &p_path, int p_flags, bool p_force_make_tangents, bool p_use_compression) {
-
Error err = collada.load(p_path, p_flags);
ERR_FAIL_COND_V_MSG(err, err, "Cannot load file '" + p_path + "'.");
@@ -1269,13 +1194,11 @@ Error ColladaImport::load(const String &p_path, int p_flags, bool p_force_make_t
//determine what's going on with the lights
for (int i = 0; i < vs.root_nodes.size(); i++) {
-
_pre_process_lights(vs.root_nodes[i]);
}
//import scene
for (int i = 0; i < vs.root_nodes.size(); i++) {
-
Error err2 = _create_scene_skeletons(vs.root_nodes[i]);
if (err2 != OK) {
memdelete(scene);
@@ -1284,7 +1207,6 @@ Error ColladaImport::load(const String &p_path, int p_flags, bool p_force_make_t
}
for (int i = 0; i < vs.root_nodes.size(); i++) {
-
Error err2 = _create_scene(vs.root_nodes[i], scene);
if (err2 != OK) {
memdelete(scene);
@@ -1305,48 +1227,36 @@ Error ColladaImport::load(const String &p_path, int p_flags, bool p_force_make_t
}
void ColladaImport::_fix_param_animation_tracks() {
-
for (Map<String, Collada::Node *>::Element *E = collada.state.scene_map.front(); E; E = E->next()) {
-
Collada::Node *n = E->get();
switch (n->type) {
-
case Collada::Node::TYPE_NODE: {
// ? do nothing
} break;
case Collada::Node::TYPE_JOINT: {
-
} break;
case Collada::Node::TYPE_SKELETON: {
-
} break;
case Collada::Node::TYPE_LIGHT: {
-
} break;
case Collada::Node::TYPE_CAMERA: {
-
} break;
case Collada::Node::TYPE_GEOMETRY: {
-
Collada::NodeGeometry *ng = static_cast<Collada::NodeGeometry *>(n);
// test source(s)
String source = ng->source;
while (source != "") {
-
if (collada.state.skin_controller_data_map.has(source)) {
-
const Collada::SkinControllerData &skin = collada.state.skin_controller_data_map[source];
//nothing to animate here i think
source = skin.base;
} else if (collada.state.morph_controller_data_map.has(source)) {
-
const Collada::MorphControllerData &morph = collada.state.morph_controller_data_map[source];
if (morph.targets.has("MORPH_WEIGHT") && morph.targets.has("MORPH_TARGET")) {
-
String weights = morph.targets["MORPH_WEIGHT"];
String targets = morph.targets["MORPH_TARGET"];
//fails here
@@ -1358,11 +1268,9 @@ void ColladaImport::_fix_param_animation_tracks() {
ERR_FAIL_COND(weight_src.array.size() != target_src.sarray.size());
for (int i = 0; i < weight_src.array.size(); i++) {
-
String track_name = weights + "(" + itos(i) + ")";
String mesh_name = target_src.sarray[i];
if (collada.state.mesh_name_map.has(mesh_name) && collada.state.referenced_tracks.has(track_name)) {
-
const Vector<int> &rt = collada.state.referenced_tracks[track_name];
for (int rti = 0; rti < rt.size(); rti++) {
@@ -1379,7 +1287,6 @@ void ColladaImport::_fix_param_animation_tracks() {
}
source = morph.mesh;
} else {
-
source = ""; // for now nothing else supported
}
}
@@ -1390,24 +1297,20 @@ void ColladaImport::_fix_param_animation_tracks() {
}
void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_import_value_tracks) {
-
_fix_param_animation_tracks();
for (int i = 0; i < collada.state.animation_clips.size(); i++) {
-
- for (int j = 0; j < collada.state.animation_clips[i].tracks.size(); j++)
+ for (int j = 0; j < collada.state.animation_clips[i].tracks.size(); j++) {
tracks_in_clips.insert(collada.state.animation_clips[i].tracks[j]);
+ }
}
for (int i = 0; i < collada.state.animation_tracks.size(); i++) {
-
const Collada::AnimationTrack &at = collada.state.animation_tracks[i];
String node;
if (!node_map.has(at.target)) {
-
if (node_name_map.has(at.target)) {
-
node = node_name_map[at.target];
} else {
WARN_PRINT("Collada: Couldn't find node: " + at.target);
@@ -1418,23 +1321,21 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im
}
if (at.property) {
-
valid_animated_properties.push_back(i);
} else {
-
node_map[node].anim_tracks.push_back(i);
valid_animated_nodes.insert(node);
}
}
create_animation(-1, p_make_tracks_in_all_bones, p_import_value_tracks);
- for (int i = 0; i < collada.state.animation_clips.size(); i++)
+ for (int i = 0; i < collada.state.animation_clips.size(); i++) {
create_animation(i, p_make_tracks_in_all_bones, p_import_value_tracks);
+ }
}
void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks) {
-
Ref<Animation> animation = Ref<Animation>(memnew(Animation));
if (p_clip == -1) {
@@ -1444,9 +1345,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
}
for (Map<String, NodeMap>::Element *E = node_map.front(); E; E = E->next()) {
-
- if (E->get().bone < 0)
+ if (E->get().bone < 0) {
continue;
+ }
bones_with_animation[E->key()] = false;
}
//store and validate tracks
@@ -1458,15 +1359,11 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
Set<int> track_filter;
if (p_clip == -1) {
-
for (int i = 0; i < collada.state.animation_clips.size(); i++) {
-
int tc = collada.state.animation_clips[i].tracks.size();
for (int j = 0; j < tc; j++) {
-
String n = collada.state.animation_clips[i].tracks[j];
if (collada.state.by_id_tracks.has(n)) {
-
const Vector<int> &ti = collada.state.by_id_tracks[n];
for (int k = 0; k < ti.size(); k++) {
track_filter.insert(ti[k]);
@@ -1475,13 +1372,10 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
}
}
} else {
-
int tc = collada.state.animation_clips[p_clip].tracks.size();
for (int j = 0; j < tc; j++) {
-
String n = collada.state.animation_clips[p_clip].tracks[j];
if (collada.state.by_id_tracks.has(n)) {
-
const Vector<int> &ti = collada.state.by_id_tracks[n];
for (int k = 0; k < ti.size(); k++) {
track_filter.insert(ti[k]);
@@ -1499,11 +1393,11 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
float snapshot_interval = 1.0 / bake_fps; //should be customizable somewhere...
float anim_length = collada.state.animation_length;
- if (p_clip >= 0 && collada.state.animation_clips[p_clip].end)
+ if (p_clip >= 0 && collada.state.animation_clips[p_clip].end) {
anim_length = collada.state.animation_clips[p_clip].end;
+ }
while (f < anim_length) {
-
base_snapshots.push_back(f);
f += snapshot_interval;
@@ -1518,11 +1412,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
bool tracks_found = false;
for (Set<String>::Element *E = valid_animated_nodes.front(); E; E = E->next()) {
-
// take snapshots
if (!collada.state.scene_map.has(E->get())) {
-
continue;
}
@@ -1539,7 +1431,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
Collada::Node *cn = collada.state.scene_map[E->get()];
if (cn->ignore_anim) {
-
continue;
}
@@ -1554,25 +1445,23 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
//use snapshot keys from anim track instead, because this was most likely exported baked
const Collada::AnimationTrack &at = collada.state.animation_tracks[nm.anim_tracks.front()->get()];
snapshots.clear();
- for (int i = 0; i < at.keys.size(); i++)
+ for (int i = 0; i < at.keys.size(); i++) {
snapshots.push_back(at.keys[i].time);
+ }
}
for (int i = 0; i < snapshots.size(); i++) {
-
for (List<int>::Element *ET = nm.anim_tracks.front(); ET; ET = ET->next()) {
//apply tracks
if (p_clip == -1) {
-
if (track_filter.has(ET->get())) {
-
continue;
}
} else {
-
- if (!track_filter.has(ET->get()))
+ if (!track_filter.has(ET->get())) {
continue;
+ }
}
found_anim = true;
@@ -1581,9 +1470,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
int xform_idx = -1;
for (int j = 0; j < cn->xform_list.size(); j++) {
-
if (cn->xform_list[j].id == at.param) {
-
xform_idx = j;
break;
}
@@ -1623,10 +1510,8 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
//make bone transform relative to rest (in case of skeleton)
Skeleton3D *sk = Object::cast_to<Skeleton3D>(nm.node);
if (sk) {
-
xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform;
} else {
-
ERR_PRINT("Collada: Invalid skeleton");
}
}
@@ -1640,24 +1525,24 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
}
if (nm.bone >= 0) {
- if (found_anim)
+ if (found_anim) {
bones_with_animation[E->get()] = true;
+ }
}
- if (found_anim)
+ if (found_anim) {
tracks_found = true;
- else {
+ } else {
animation->remove_track(track);
}
}
if (p_make_tracks_in_all_bones) {
-
//some bones may lack animation, but since we don't store pose as a property, we must add keyframes!
for (Map<String, bool>::Element *E = bones_with_animation.front(); E; E = E->next()) {
-
- if (E->get())
+ if (E->get()) {
continue;
+ }
NodeMap &nm = node_map[E->key()];
String path = scene->get_path_to(nm.node);
@@ -1695,24 +1580,24 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
if (p_import_value_tracks) {
for (int i = 0; i < valid_animated_properties.size(); i++) {
-
int ti = valid_animated_properties[i];
if (p_clip == -1) {
-
- if (track_filter.has(ti))
+ if (track_filter.has(ti)) {
continue;
+ }
} else {
-
- if (!track_filter.has(ti))
+ if (!track_filter.has(ti)) {
continue;
+ }
}
const Collada::AnimationTrack &at = collada.state.animation_tracks[ti];
// take snapshots
- if (!collada.state.scene_map.has(at.target))
+ if (!collada.state.scene_map.has(at.target)) {
continue;
+ }
NodeMap &nm = node_map[at.target];
String path = scene->get_path_to(nm.node);
@@ -1725,7 +1610,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
animation->track_set_imported(track, true); //helps merging later
for (int j = 0; j < at.keys.size(); j++) {
-
float time = at.keys[j].time;
Variant value;
Vector<float> data = at.keys[j].data;
@@ -1748,7 +1632,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
}
if (tracks_found) {
-
animations.push_back(animation);
}
}
@@ -1758,19 +1641,19 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
/*********************************************************************************/
uint32_t EditorSceneImporterCollada::get_import_flags() const {
-
return IMPORT_SCENE | IMPORT_ANIMATION;
}
-void EditorSceneImporterCollada::get_extensions(List<String> *r_extensions) const {
+void EditorSceneImporterCollada::get_extensions(List<String> *r_extensions) const {
r_extensions->push_back("dae");
}
-Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
+Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
ColladaImport state;
uint32_t flags = Collada::IMPORT_FLAG_SCENE;
- if (p_flags & IMPORT_ANIMATION)
+ if (p_flags & IMPORT_ANIMATION) {
flags |= Collada::IMPORT_FLAG_ANIMATION;
+ }
state.use_mesh_builtin_materials = !(p_flags & IMPORT_MATERIALS_IN_INSTANCES);
state.bake_fps = p_bake_fps;
@@ -1780,15 +1663,13 @@ Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_
ERR_FAIL_COND_V_MSG(err != OK, nullptr, "Cannot load scene from file '" + p_path + "'.");
if (state.missing_textures.size()) {
-
/*
- for(int i=0;i<state.missing_textures.size();i++) {
- EditorNode::add_io_error("Texture Not Found: "+state.missing_textures[i]);
- }
- */
+ for(int i=0;i<state.missing_textures.size();i++) {
+ EditorNode::add_io_error("Texture Not Found: "+state.missing_textures[i]);
+ }
+ */
if (r_missing_deps) {
-
for (int i = 0; i < state.missing_textures.size(); i++) {
//EditorNode::add_io_error("Texture Not Found: "+state.missing_textures[i]);
r_missing_deps->push_back(state.missing_textures[i]);
@@ -1797,18 +1678,17 @@ Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_
}
if (p_flags & IMPORT_ANIMATION) {
-
state.create_animations(p_flags & IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS, p_flags & EditorSceneImporter::IMPORT_ANIMATION_KEEP_VALUE_TRACKS);
AnimationPlayer *ap = memnew(AnimationPlayer);
for (int i = 0; i < state.animations.size(); i++) {
String name;
- if (state.animations[i]->get_name() == "")
+ if (state.animations[i]->get_name() == "") {
name = "default";
- else
+ } else {
name = state.animations[i]->get_name();
+ }
if (p_flags & IMPORT_ANIMATION_DETECT_LOOP) {
-
if (name.begins_with("loop") || name.ends_with("loop") || name.begins_with("cycle") || name.ends_with("cycle")) {
state.animations.write[i]->set_loop(true);
}
@@ -1824,7 +1704,6 @@ Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_
}
Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
-
ColladaImport state;
state.use_mesh_builtin_materials = false;
@@ -1833,15 +1712,16 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path
ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot load animation from file '" + p_path + "'.");
state.create_animations(p_flags & EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS, p_flags & EditorSceneImporter::IMPORT_ANIMATION_KEEP_VALUE_TRACKS);
- if (state.scene)
+ if (state.scene) {
memdelete(state.scene);
+ }
- if (state.animations.size() == 0)
+ if (state.animations.size() == 0) {
return Ref<Animation>();
+ }
Ref<Animation> anim = state.animations[0];
String base = p_path.get_basename().to_lower();
if (p_flags & IMPORT_ANIMATION_DETECT_LOOP) {
-
if (base.begins_with("loop") || base.ends_with("loop") || base.begins_with("cycle") || base.ends_with("cycle")) {
anim->set_loop(true);
}
diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h
index 932a064e76..57c694b698 100644
--- a/editor/import/editor_import_collada.h
+++ b/editor/import/editor_import_collada.h
@@ -34,7 +34,6 @@
#include "editor/import/resource_importer_scene.h"
class EditorSceneImporterCollada : public EditorSceneImporter {
-
GDCLASS(EditorSceneImporterCollada, EditorSceneImporter);
public:
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index aad378c94f..6d46d4d2e9 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -87,7 +87,6 @@ int EditorImportPlugin::get_import_order() const {
}
void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> *r_options, int p_preset) const {
-
ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("get_import_options")));
Array needed;
needed.push_back("name");
@@ -131,7 +130,6 @@ bool EditorImportPlugin::get_option_visibility(const String &p_option, const Map
}
Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("import")), ERR_UNAVAILABLE);
Dictionary options;
Array platform_variants, gen_files;
@@ -153,7 +151,6 @@ Error EditorImportPlugin::import(const String &p_source_file, const String &p_sa
}
void EditorImportPlugin::_bind_methods() {
-
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_importer_name"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_visible_name"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_preset_count"));
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index 1a1e7171b9..1a232658fe 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -44,17 +44,15 @@
#include "scene/resources/surface_tool.h"
uint32_t EditorSceneImporterGLTF::get_import_flags() const {
-
return IMPORT_SCENE | IMPORT_ANIMATION;
}
-void EditorSceneImporterGLTF::get_extensions(List<String> *r_extensions) const {
+void EditorSceneImporterGLTF::get_extensions(List<String> *r_extensions) const {
r_extensions->push_back("gltf");
r_extensions->push_back("glb");
}
Error EditorSceneImporterGLTF::_parse_json(const String &p_path, GLTFState &state) {
-
Error err;
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ, &err);
if (!f) {
@@ -81,7 +79,6 @@ Error EditorSceneImporterGLTF::_parse_json(const String &p_path, GLTFState &stat
}
Error EditorSceneImporterGLTF::_parse_glb(const String &p_path, GLTFState &state) {
-
Error err;
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ, &err);
if (!f) {
@@ -163,7 +160,6 @@ String EditorSceneImporterGLTF::_sanitize_scene_name(const String &name) {
}
String EditorSceneImporterGLTF::_gen_unique_name(GLTFState &state, const String &p_name) {
-
const String s_name = _sanitize_scene_name(p_name);
String name;
@@ -204,7 +200,6 @@ String EditorSceneImporterGLTF::_sanitize_bone_name(const String &name) {
}
String EditorSceneImporterGLTF::_gen_unique_bone_name(GLTFState &state, const GLTFSkeletonIndex skel_i, const String &p_name) {
-
const String s_name = _sanitize_bone_name(p_name);
String name;
@@ -227,7 +222,6 @@ String EditorSceneImporterGLTF::_gen_unique_bone_name(GLTFState &state, const GL
}
Error EditorSceneImporterGLTF::_parse_scenes(GLTFState &state) {
-
ERR_FAIL_COND_V(!state.json.has("scenes"), ERR_FILE_CORRUPT);
const Array &scenes = state.json["scenes"];
int loaded_scene = 0;
@@ -257,11 +251,9 @@ Error EditorSceneImporterGLTF::_parse_scenes(GLTFState &state) {
}
Error EditorSceneImporterGLTF::_parse_nodes(GLTFState &state) {
-
ERR_FAIL_COND_V(!state.json.has("nodes"), ERR_FILE_CORRUPT);
const Array &nodes = state.json["nodes"];
for (int i = 0; i < nodes.size(); i++) {
-
GLTFNode *node = memnew(GLTFNode);
const Dictionary &n = nodes[i];
@@ -281,7 +273,6 @@ Error EditorSceneImporterGLTF::_parse_nodes(GLTFState &state) {
node->xform = _arr_to_xform(n["matrix"]);
} else {
-
if (n.has("translation")) {
node->translation = _arr_to_vec3(n["translation"]);
}
@@ -295,7 +286,16 @@ Error EditorSceneImporterGLTF::_parse_nodes(GLTFState &state) {
node->xform.basis.set_quat_scale(node->rotation, node->scale);
node->xform.origin = node->translation;
}
-
+ if (n.has("extensions")) {
+ Dictionary extensions = n["extensions"];
+ if (extensions.has("KHR_lights_punctual")) {
+ Dictionary lights_punctual = extensions["KHR_lights_punctual"];
+ if (lights_punctual.has("light")) {
+ GLTFLightIndex light = lights_punctual["light"];
+ node->light = light;
+ }
+ }
+ }
if (n.has("children")) {
const Array &children = n["children"];
for (int j = 0; j < children.size(); j++) {
@@ -308,7 +308,6 @@ Error EditorSceneImporterGLTF::_parse_nodes(GLTFState &state) {
// build the hierarchy
for (GLTFNodeIndex node_i = 0; node_i < state.nodes.size(); node_i++) {
-
for (int j = 0; j < state.nodes[node_i]->children.size(); j++) {
GLTFNodeIndex child_i = state.nodes[node_i]->children[j];
@@ -325,7 +324,6 @@ Error EditorSceneImporterGLTF::_parse_nodes(GLTFState &state) {
}
void EditorSceneImporterGLTF::_compute_node_heights(GLTFState &state) {
-
state.root_nodes.clear();
for (GLTFNodeIndex node_i = 0; node_i < state.nodes.size(); ++node_i) {
GLTFNode *node = state.nodes[node_i];
@@ -347,7 +345,6 @@ void EditorSceneImporterGLTF::_compute_node_heights(GLTFState &state) {
}
static Vector<uint8_t> _parse_base64_uri(const String &uri) {
-
int start = uri.find(",");
ERR_FAIL_COND_V(start == -1, Vector<uint8_t>());
@@ -367,20 +364,18 @@ static Vector<uint8_t> _parse_base64_uri(const String &uri) {
}
Error EditorSceneImporterGLTF::_parse_buffers(GLTFState &state, const String &p_base_path) {
-
- if (!state.json.has("buffers"))
+ if (!state.json.has("buffers")) {
return OK;
+ }
const Array &buffers = state.json["buffers"];
for (GLTFBufferIndex i = 0; i < buffers.size(); i++) {
-
if (i == 0 && state.glb_data.size()) {
state.buffers.push_back(state.glb_data);
} else {
const Dictionary &buffer = buffers[i];
if (buffer.has("uri")) {
-
Vector<uint8_t> buffer_data;
String uri = buffer["uri"];
@@ -388,7 +383,6 @@ Error EditorSceneImporterGLTF::_parse_buffers(GLTFState &state, const String &p_
//embedded data
buffer_data = _parse_base64_uri(uri);
} else {
-
uri = p_base_path.plus_file(uri).replace("\\", "/"); //fix for windows
buffer_data = FileAccess::get_file_as_array(uri);
ERR_FAIL_COND_V(buffer.size() == 0, ERR_PARSE_ERROR);
@@ -408,11 +402,9 @@ Error EditorSceneImporterGLTF::_parse_buffers(GLTFState &state, const String &p_
}
Error EditorSceneImporterGLTF::_parse_buffer_views(GLTFState &state) {
-
ERR_FAIL_COND_V(!state.json.has("bufferViews"), ERR_FILE_CORRUPT);
const Array &buffers = state.json["bufferViews"];
for (GLTFBufferViewIndex i = 0; i < buffers.size(); i++) {
-
const Dictionary &d = buffers[i];
GLTFBufferView buffer_view;
@@ -444,33 +436,37 @@ Error EditorSceneImporterGLTF::_parse_buffer_views(GLTFState &state) {
}
EditorSceneImporterGLTF::GLTFType EditorSceneImporterGLTF::_get_type_from_str(const String &p_string) {
-
- if (p_string == "SCALAR")
+ if (p_string == "SCALAR") {
return TYPE_SCALAR;
+ }
- if (p_string == "VEC2")
+ if (p_string == "VEC2") {
return TYPE_VEC2;
- if (p_string == "VEC3")
+ }
+ if (p_string == "VEC3") {
return TYPE_VEC3;
- if (p_string == "VEC4")
+ }
+ if (p_string == "VEC4") {
return TYPE_VEC4;
+ }
- if (p_string == "MAT2")
+ if (p_string == "MAT2") {
return TYPE_MAT2;
- if (p_string == "MAT3")
+ }
+ if (p_string == "MAT3") {
return TYPE_MAT3;
- if (p_string == "MAT4")
+ }
+ if (p_string == "MAT4") {
return TYPE_MAT4;
+ }
ERR_FAIL_V(TYPE_SCALAR);
}
Error EditorSceneImporterGLTF::_parse_accessors(GLTFState &state) {
-
ERR_FAIL_COND_V(!state.json.has("accessors"), ERR_FILE_CORRUPT);
const Array &accessors = state.json["accessors"];
for (GLTFAccessorIndex i = 0; i < accessors.size(); i++) {
-
const Dictionary &d = accessors[i];
GLTFAccessor accessor;
@@ -536,7 +532,6 @@ Error EditorSceneImporterGLTF::_parse_accessors(GLTFState &state) {
}
String EditorSceneImporterGLTF::_get_component_type_name(const uint32_t p_component) {
-
switch (p_component) {
case COMPONENT_TYPE_BYTE:
return "Byte";
@@ -556,7 +551,6 @@ String EditorSceneImporterGLTF::_get_component_type_name(const uint32_t p_compon
}
String EditorSceneImporterGLTF::_get_type_name(const GLTFType p_component) {
-
static const char *names[] = {
"float",
"vec2",
@@ -571,7 +565,6 @@ String EditorSceneImporterGLTF::_get_type_name(const GLTFType p_component) {
}
Error EditorSceneImporterGLTF::_decode_buffer_view(GLTFState &state, double *dst, const GLTFBufferViewIndex p_buffer_view, const int skip_every, const int skip_bytes, const int element_size, const int count, const GLTFType type, const int component_count, const int component_type, const int component_size, const bool normalized, const int byte_offset, const bool for_vertex) {
-
const GLTFBufferView &bv = state.buffer_views[p_buffer_view];
int stride = bv.byte_stride ? bv.byte_stride : element_size;
@@ -597,11 +590,9 @@ Error EditorSceneImporterGLTF::_decode_buffer_view(GLTFState &state, double *dst
//fill everything as doubles
for (int i = 0; i < count; i++) {
-
const uint8_t *src = &bufptr[offset + i * stride];
for (int j = 0; j < component_count; j++) {
-
if (skip_every && j > 0 && (j % skip_every) == 0) {
src += skip_bytes;
}
@@ -659,7 +650,6 @@ Error EditorSceneImporterGLTF::_decode_buffer_view(GLTFState &state, double *dst
}
int EditorSceneImporterGLTF::_get_component_type_size(const int component_type) {
-
switch (component_type) {
case COMPONENT_TYPE_BYTE:
return 1;
@@ -687,7 +677,6 @@ int EditorSceneImporterGLTF::_get_component_type_size(const int component_type)
}
Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
//spec, for reference:
//https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#data-alignment
@@ -710,7 +699,6 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, const
switch (a.component_type) {
case COMPONENT_TYPE_BYTE:
case COMPONENT_TYPE_UNSIGNED_BYTE: {
-
if (a.type == TYPE_MAT2) {
skip_every = 2;
skip_bytes = 2;
@@ -740,12 +728,12 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, const
double *dst = dst_buffer.ptrw();
if (a.buffer_view >= 0) {
-
ERR_FAIL_INDEX_V(a.buffer_view, state.buffer_views.size(), Vector<double>());
const Error err = _decode_buffer_view(state, dst, a.buffer_view, skip_every, skip_bytes, element_size, a.count, a.type, component_count, a.component_type, component_size, a.normalized, a.byte_offset, p_for_vertex);
- if (err != OK)
+ if (err != OK) {
return Vector<double>();
+ }
} else {
//fill with zeros, as bufferview is not defined.
@@ -761,14 +749,16 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, const
const int indices_component_size = _get_component_type_size(a.sparse_indices_component_type);
Error err = _decode_buffer_view(state, indices.ptrw(), a.sparse_indices_buffer_view, 0, 0, indices_component_size, a.sparse_count, TYPE_SCALAR, 1, a.sparse_indices_component_type, indices_component_size, false, a.sparse_indices_byte_offset, false);
- if (err != OK)
+ if (err != OK) {
return Vector<double>();
+ }
Vector<double> data;
data.resize(component_count * a.sparse_count);
err = _decode_buffer_view(state, data.ptrw(), a.sparse_values_buffer_view, skip_every, skip_bytes, element_size, a.sparse_count, a.type, component_count, a.component_type, component_size, a.normalized, a.sparse_values_byte_offset, p_for_vertex);
- if (err != OK)
+ if (err != OK) {
return Vector<double>();
+ }
for (int i = 0; i < indices.size(); i++) {
const int write_offset = int(indices[i]) * component_count;
@@ -783,12 +773,12 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, const
}
Vector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<int> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
const double *attribs_ptr = attribs.ptr();
const int ret_size = attribs.size();
@@ -803,12 +793,12 @@ Vector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &state,
}
Vector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<float> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
const double *attribs_ptr = attribs.ptr();
const int ret_size = attribs.size();
@@ -823,12 +813,12 @@ Vector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState &sta
}
Vector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Vector2> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
ERR_FAIL_COND_V(attribs.size() % 2 != 0, ret);
const double *attribs_ptr = attribs.ptr();
@@ -844,12 +834,12 @@ Vector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState &sta
}
Vector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Vector3> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
ERR_FAIL_COND_V(attribs.size() % 3 != 0, ret);
const double *attribs_ptr = attribs.ptr();
@@ -865,12 +855,12 @@ Vector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState &sta
}
Vector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Color> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
const int type = state.accessors[p_accessor].type;
ERR_FAIL_COND_V(!(type == TYPE_VEC3 || type == TYPE_VEC4), ret);
@@ -893,12 +883,12 @@ Vector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState &stat
}
Vector<Quat> EditorSceneImporterGLTF::_decode_accessor_as_quat(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Quat> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
ERR_FAIL_COND_V(attribs.size() % 4 != 0, ret);
const double *attribs_ptr = attribs.ptr();
@@ -911,13 +901,14 @@ Vector<Quat> EditorSceneImporterGLTF::_decode_accessor_as_quat(GLTFState &state,
}
return ret;
}
-Vector<Transform2D> EditorSceneImporterGLTF::_decode_accessor_as_xform2d(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
+Vector<Transform2D> EditorSceneImporterGLTF::_decode_accessor_as_xform2d(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Transform2D> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
ERR_FAIL_COND_V(attribs.size() % 4 != 0, ret);
ret.resize(attribs.size() / 4);
@@ -929,12 +920,12 @@ Vector<Transform2D> EditorSceneImporterGLTF::_decode_accessor_as_xform2d(GLTFSta
}
Vector<Basis> EditorSceneImporterGLTF::_decode_accessor_as_basis(GLTFState &state, const GLTFAccessorIndex p_accessor, bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Basis> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
ERR_FAIL_COND_V(attribs.size() % 9 != 0, ret);
ret.resize(attribs.size() / 9);
@@ -947,12 +938,12 @@ Vector<Basis> EditorSceneImporterGLTF::_decode_accessor_as_basis(GLTFState &stat
}
Vector<Transform> EditorSceneImporterGLTF::_decode_accessor_as_xform(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
-
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
Vector<Transform> ret;
- if (attribs.size() == 0)
+ if (attribs.size() == 0) {
return ret;
+ }
ERR_FAIL_COND_V(attribs.size() % 16 != 0, ret);
ret.resize(attribs.size() / 16);
@@ -966,13 +957,15 @@ Vector<Transform> EditorSceneImporterGLTF::_decode_accessor_as_xform(GLTFState &
}
Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
-
- if (!state.json.has("meshes"))
+ if (!state.json.has("meshes")) {
return OK;
+ }
+
+ bool compress_vert_data = state.import_flags & IMPORT_USE_COMPRESSION;
+ uint32_t mesh_flags = compress_vert_data ? Mesh::ARRAY_COMPRESS_DEFAULT : 0;
Array meshes = state.json["meshes"];
for (GLTFMeshIndex i = 0; i < meshes.size(); i++) {
-
print_verbose("glTF: Parsing mesh: " + itos(i));
Dictionary d = meshes[i];
@@ -985,7 +978,6 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
const Dictionary &extras = d.has("extras") ? (Dictionary)d["extras"] : Dictionary();
for (int j = 0; j < primitives.size(); j++) {
-
Dictionary p = primitives[j];
Array array;
@@ -1123,7 +1115,6 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
}
for (int k = 0; k < targets.size(); k++) {
-
const Dictionary &t = targets[k];
Array array_copy;
@@ -1141,7 +1132,6 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
const int size = src_varr.size();
ERR_FAIL_COND_V(size == 0, ERR_PARSE_ERROR);
{
-
const int max_idx = varr.size();
varr.resize(size);
@@ -1188,7 +1178,6 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
Vector<float> tangents_v4;
{
-
int max_idx = tangents_v3.size();
int size4 = src_tangents.size();
@@ -1199,7 +1188,6 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
const float *r4 = src_tangents.ptr();
for (int l = 0; l < size4 / 4; l++) {
-
if (l < max_idx) {
w4[l * 4 + 0] = r3[l].x + r4[l * 4 + 0];
w4[l * 4 + 1] = r3[l].y + r4[l * 4 + 1];
@@ -1230,7 +1218,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
}
//just add it
- mesh.mesh->add_surface_from_arrays(primitive, array, morphs);
+ mesh.mesh->add_surface_from_arrays(primitive, array, morphs, Dictionary(), mesh_flags);
if (p.has("material")) {
const int material = p["material"];
@@ -1259,13 +1247,12 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
}
Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_base_path) {
-
- if (!state.json.has("images"))
+ if (!state.json.has("images")) {
return OK;
+ }
const Array &images = state.json["images"];
for (int i = 0; i < images.size(); i++) {
-
const Dictionary &d = images[i];
String mimetype;
@@ -1287,7 +1274,6 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b
data_ptr = data.ptr();
data_size = data.size();
} else {
-
uri = p_base_path.plus_file(uri).replace("\\", "/"); //fix for windows
Ref<Texture2D> texture = ResourceLoader::load(uri);
state.images.push_back(texture);
@@ -1355,13 +1341,12 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b
}
Error EditorSceneImporterGLTF::_parse_textures(GLTFState &state) {
-
- if (!state.json.has("textures"))
+ if (!state.json.has("textures")) {
return OK;
+ }
const Array &textures = state.json["textures"];
for (GLTFTextureIndex i = 0; i < textures.size(); i++) {
-
const Dictionary &d = textures[i];
ERR_FAIL_COND_V(!d.has("source"), ERR_PARSE_ERROR);
@@ -1384,13 +1369,12 @@ Ref<Texture2D> EditorSceneImporterGLTF::_get_texture(GLTFState &state, const GLT
}
Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
-
- if (!state.json.has("materials"))
+ if (!state.json.has("materials")) {
return OK;
+ }
const Array &materials = state.json["materials"];
for (GLTFMaterialIndex i = 0; i < materials.size(); i++) {
-
const Dictionary &d = materials[i];
Ref<StandardMaterial3D> material;
@@ -1400,7 +1384,6 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
}
if (d.has("pbrMetallicRoughness")) {
-
const Dictionary &mr = d["pbrMetallicRoughness"];
if (mr.has("baseColorFactor")) {
const Array &arr = mr["baseColorFactor"];
@@ -1534,7 +1517,6 @@ EditorSceneImporterGLTF::GLTFNodeIndex EditorSceneImporterGLTF::_find_highest_no
}
bool EditorSceneImporterGLTF::_capture_nodes_in_skin(GLTFState &state, GLTFSkin &skin, const GLTFNodeIndex node_index) {
-
bool found_joint = false;
for (int i = 0; i < state.nodes[node_index]->children.size(); ++i) {
@@ -1558,7 +1540,6 @@ bool EditorSceneImporterGLTF::_capture_nodes_in_skin(GLTFState &state, GLTFSkin
}
void EditorSceneImporterGLTF::_capture_nodes_for_multirooted_skin(GLTFState &state, GLTFSkin &skin) {
-
DisjointSet<GLTFNodeIndex> disjoint_set;
for (int i = 0; i < skin.joints.size(); ++i) {
@@ -1592,7 +1573,6 @@ void EditorSceneImporterGLTF::_capture_nodes_for_multirooted_skin(GLTFState &sta
// Go up the tree till all of the multiple roots of the skin are at the same hierarchy level.
// This sucks, but 99% of all game engines (not just Godot) would have this same issue.
for (int i = 0; i < roots.size(); ++i) {
-
GLTFNodeIndex current_node = roots[i];
while (state.nodes[current_node]->height > maxHeight) {
GLTFNodeIndex parent = state.nodes[current_node]->parent;
@@ -1640,7 +1620,6 @@ void EditorSceneImporterGLTF::_capture_nodes_for_multirooted_skin(GLTFState &sta
}
Error EditorSceneImporterGLTF::_expand_skin(GLTFState &state, GLTFSkin &skin) {
-
_capture_nodes_for_multirooted_skin(state, skin);
// Grab all nodes that lay in between skin joints/nodes
@@ -1686,7 +1665,6 @@ Error EditorSceneImporterGLTF::_expand_skin(GLTFState &state, GLTFSkin &skin) {
}
Error EditorSceneImporterGLTF::_verify_skin(GLTFState &state, GLTFSkin &skin) {
-
// This may seem duplicated from expand_skins, but this is really a sanity check! (so it kinda is)
// In case additional interpolating logic is added to the skins, this will help ensure that you
// do not cause it to self implode into a fiery blaze
@@ -1752,15 +1730,14 @@ Error EditorSceneImporterGLTF::_verify_skin(GLTFState &state, GLTFSkin &skin) {
}
Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
-
- if (!state.json.has("skins"))
+ if (!state.json.has("skins")) {
return OK;
+ }
const Array &skins = state.json["skins"];
// Create the base skins, and mark nodes that are joints
for (int i = 0; i < skins.size(); i++) {
-
const Dictionary &d = skins[i];
GLTFSkin skin;
@@ -1810,7 +1787,6 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
}
Error EditorSceneImporterGLTF::_determine_skeletons(GLTFState &state) {
-
// Using a disjoint set, we are going to potentially combine all skins that are actually branches
// of a main skeleton, or treat skins defining the same set of nodes as ONE skeleton.
// This is another unclear issue caused by the current glTF specification.
@@ -1888,7 +1864,6 @@ Error EditorSceneImporterGLTF::_determine_skeletons(GLTFState &state) {
// Mark all the skins actual skeletons, after we have merged them
for (GLTFSkeletonIndex skel_i = 0; skel_i < skeleton_owners.size(); ++skel_i) {
-
const GLTFNodeIndex skeleton_owner = skeleton_owners[skel_i];
GLTFSkeleton skeleton;
@@ -1943,7 +1918,6 @@ Error EditorSceneImporterGLTF::_determine_skeletons(GLTFState &state) {
}
Error EditorSceneImporterGLTF::_reparent_non_joint_skeleton_subtrees(GLTFState &state, GLTFSkeleton &skeleton, const Vector<GLTFNodeIndex> &non_joints) {
-
DisjointSet<GLTFNodeIndex> subtree_set;
// Populate the disjoint set with ONLY non joints that are in the skeleton hierarchy (non_joints vector)
@@ -2003,8 +1977,9 @@ Error EditorSceneImporterGLTF::_reparent_to_fake_joint(GLTFState &state, GLTFSke
state.nodes.push_back(fake_joint);
// We better not be a joint, or we messed up in our logic
- if (node->joint)
+ if (node->joint) {
return FAILED;
+ }
fake_joint->translation = node->translation;
fake_joint->rotation = node->rotation;
@@ -2058,7 +2033,6 @@ Error EditorSceneImporterGLTF::_reparent_to_fake_joint(GLTFState &state, GLTFSke
}
Error EditorSceneImporterGLTF::_determine_skeleton_roots(GLTFState &state, const GLTFSkeletonIndex skel_i) {
-
DisjointSet<GLTFNodeIndex> disjoint_set;
for (GLTFNodeIndex i = 0; i < state.nodes.size(); ++i) {
@@ -2113,7 +2087,6 @@ Error EditorSceneImporterGLTF::_determine_skeleton_roots(GLTFState &state, const
Error EditorSceneImporterGLTF::_create_skeletons(GLTFState &state) {
for (GLTFSkeletonIndex skel_i = 0; skel_i < state.skeletons.size(); ++skel_i) {
-
GLTFSkeleton &gltf_skeleton = state.skeletons.write[skel_i];
Skeleton3D *skeleton = memnew(Skeleton3D);
@@ -2214,7 +2187,6 @@ Error EditorSceneImporterGLTF::_create_skins(GLTFState &state) {
const bool has_ibms = !gltf_skin.inverse_binds.empty();
for (int joint_i = 0; joint_i < gltf_skin.joints_original.size(); ++joint_i) {
-
Transform xform;
if (has_ibms) {
xform = gltf_skin.inverse_binds[joint_i];
@@ -2253,7 +2225,6 @@ bool EditorSceneImporterGLTF::_skins_are_same(const Ref<Skin> &skin_a, const Ref
}
for (int i = 0; i < skin_a->get_bind_count(); ++i) {
-
if (skin_a->get_bind_bone(i) != skin_b->get_bind_bone(i)) {
return false;
}
@@ -2283,22 +2254,72 @@ void EditorSceneImporterGLTF::_remove_duplicate_skins(GLTFState &state) {
}
}
-Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) {
+Error EditorSceneImporterGLTF::_parse_lights(GLTFState &state) {
+ if (!state.json.has("extensions")) {
+ return OK;
+ }
+ Dictionary extensions = state.json["extensions"];
+ if (!extensions.has("KHR_lights_punctual")) {
+ return OK;
+ }
+ Dictionary lights_punctual = extensions["KHR_lights_punctual"];
+ if (!lights_punctual.has("lights")) {
+ return OK;
+ }
+
+ const Array &lights = lights_punctual["lights"];
+
+ for (GLTFLightIndex light_i = 0; light_i < lights.size(); light_i++) {
+ const Dictionary &d = lights[light_i];
+
+ GLTFLight light;
+ ERR_FAIL_COND_V(!d.has("type"), ERR_PARSE_ERROR);
+ const String &type = d["type"];
+ light.type = type;
+
+ if (d.has("color")) {
+ const Array &arr = d["color"];
+ ERR_FAIL_COND_V(arr.size() != 3, ERR_PARSE_ERROR);
+ const Color c = Color(arr[0], arr[1], arr[2]).to_srgb();
+ light.color = c;
+ }
+ if (d.has("intensity")) {
+ light.intensity = d["intensity"];
+ }
+ if (d.has("range")) {
+ light.range = d["range"];
+ }
+ if (type == "spot") {
+ const Dictionary &spot = d["spot"];
+ light.inner_cone_angle = spot["innerConeAngle"];
+ light.outer_cone_angle = spot["outerConeAngle"];
+ ERR_FAIL_COND_V_MSG(light.inner_cone_angle >= light.outer_cone_angle, ERR_PARSE_ERROR, "The inner angle must be smaller than the outer angle.");
+ } else if (type != "point" && type != "directional") {
+ ERR_FAIL_V_MSG(ERR_PARSE_ERROR, "Light type is unknown.");
+ }
+
+ state.lights.push_back(light);
+ }
+
+ print_verbose("glTF: Total lights: " + itos(state.lights.size()));
- if (!state.json.has("cameras"))
+ return OK;
+}
+
+Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) {
+ if (!state.json.has("cameras")) {
return OK;
+ }
const Array &cameras = state.json["cameras"];
for (GLTFCameraIndex i = 0; i < cameras.size(); i++) {
-
const Dictionary &d = cameras[i];
GLTFCamera camera;
ERR_FAIL_COND_V(!d.has("type"), ERR_PARSE_ERROR);
const String &type = d["type"];
if (type == "orthographic") {
-
camera.perspective = false;
if (d.has("orthographic")) {
const Dictionary &og = d["orthographic"];
@@ -2310,7 +2331,6 @@ Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) {
}
} else if (type == "perspective") {
-
camera.perspective = true;
if (d.has("perspective")) {
const Dictionary &ppt = d["perspective"];
@@ -2334,20 +2354,20 @@ Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) {
}
Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
-
- if (!state.json.has("animations"))
+ if (!state.json.has("animations")) {
return OK;
+ }
const Array &animations = state.json["animations"];
for (GLTFAnimationIndex i = 0; i < animations.size(); i++) {
-
const Dictionary &d = animations[i];
GLTFAnimation animation;
- if (!d.has("channels") || !d.has("samplers"))
+ if (!d.has("channels") || !d.has("samplers")) {
continue;
+ }
Array channels = d["channels"];
Array samplers = d["samplers"];
@@ -2361,10 +2381,10 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
}
for (int j = 0; j < channels.size(); j++) {
-
const Dictionary &c = channels[j];
- if (!c.has("target"))
+ if (!c.has("target")) {
continue;
+ }
const Dictionary &t = c["target"];
if (!t.has("node") || !t.has("path")) {
@@ -2471,13 +2491,13 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
}
void EditorSceneImporterGLTF::_assign_scene_names(GLTFState &state) {
-
for (int i = 0; i < state.nodes.size(); i++) {
GLTFNode *n = state.nodes[i];
// Any joints get unique names generated when the skeleton is made, unique to the skeleton
- if (n->skeleton >= 0)
+ if (n->skeleton >= 0) {
continue;
+ }
if (n->name.empty()) {
if (n->mesh >= 0) {
@@ -2494,7 +2514,6 @@ void EditorSceneImporterGLTF::_assign_scene_names(GLTFState &state) {
}
BoneAttachment3D *EditorSceneImporterGLTF::_generate_bone_attachment(GLTFState &state, Skeleton3D *skeleton, const GLTFNodeIndex node_index) {
-
const GLTFNode *gltf_node = state.nodes[node_index];
const GLTFNode *bone_node = state.nodes[gltf_node->parent];
@@ -2530,6 +2549,58 @@ MeshInstance3D *EditorSceneImporterGLTF::_generate_mesh_instance(GLTFState &stat
return mi;
}
+Light3D *EditorSceneImporterGLTF::_generate_light(GLTFState &state, Node *scene_parent, const GLTFNodeIndex node_index) {
+ const GLTFNode *gltf_node = state.nodes[node_index];
+
+ ERR_FAIL_INDEX_V(gltf_node->light, state.lights.size(), nullptr);
+
+ print_verbose("glTF: Creating light for: " + gltf_node->name);
+
+ const GLTFLight &l = state.lights[gltf_node->light];
+
+ float intensity = l.intensity;
+ if (intensity > 10) {
+ // GLTF spec has the default around 1, but Blender defaults lights to 100.
+ // The only sane way to handle this is to check where it came from and
+ // handle it accordingly. If it's over 10, it probably came from Blender.
+ intensity /= 100;
+ }
+
+ if (l.type == "directional") {
+ DirectionalLight3D *light = memnew(DirectionalLight3D);
+ light->set_param(Light3D::PARAM_ENERGY, intensity);
+ light->set_color(l.color);
+ return light;
+ }
+
+ const float range = CLAMP(l.range, 0, 4096);
+ // Doubling the range will double the effective brightness, so we need double attenuation (half brightness).
+ // We want to have double intensity give double brightness, so we need half the attenuation.
+ const float attenuation = range / intensity;
+ if (l.type == "point") {
+ OmniLight3D *light = memnew(OmniLight3D);
+ light->set_param(OmniLight3D::PARAM_ATTENUATION, attenuation);
+ light->set_param(OmniLight3D::PARAM_RANGE, range);
+ light->set_color(l.color);
+ return light;
+ }
+ if (l.type == "spot") {
+ SpotLight3D *light = memnew(SpotLight3D);
+ light->set_param(SpotLight3D::PARAM_ATTENUATION, attenuation);
+ light->set_param(SpotLight3D::PARAM_RANGE, range);
+ light->set_param(SpotLight3D::PARAM_SPOT_ANGLE, Math::rad2deg(l.outer_cone_angle));
+ light->set_color(l.color);
+
+ // Line of best fit derived from guessing, see https://www.desmos.com/calculator/biiflubp8b
+ // The points in desmos are not exact, except for (1, infinity).
+ float angle_ratio = l.inner_cone_angle / l.outer_cone_angle;
+ float angle_attenuation = 0.2 / (1 - angle_ratio) - 0.1;
+ light->set_param(SpotLight3D::PARAM_SPOT_ATTENUATION, angle_attenuation);
+ return light;
+ }
+ return nullptr;
+}
+
Camera3D *EditorSceneImporterGLTF::_generate_camera(GLTFState &state, Node *scene_parent, const GLTFNodeIndex node_index) {
const GLTFNode *gltf_node = state.nodes[node_index];
@@ -2558,7 +2629,6 @@ Node3D *EditorSceneImporterGLTF::_generate_spatial(GLTFState &state, Node *scene
}
void EditorSceneImporterGLTF::_generate_scene_node(GLTFState &state, Node *scene_parent, Node3D *scene_root, const GLTFNodeIndex node_index) {
-
const GLTFNode *gltf_node = state.nodes[node_index];
Node3D *current_node = nullptr;
@@ -2604,6 +2674,8 @@ void EditorSceneImporterGLTF::_generate_scene_node(GLTFState &state, Node *scene
current_node = _generate_mesh_instance(state, scene_parent, node_index);
} else if (gltf_node->camera >= 0) {
current_node = _generate_camera(state, scene_parent, node_index);
+ } else if (gltf_node->light >= 0) {
+ current_node = _generate_light(state, scene_parent, node_index);
} else {
current_node = _generate_spatial(state, scene_parent, node_index);
}
@@ -2623,14 +2695,11 @@ void EditorSceneImporterGLTF::_generate_scene_node(GLTFState &state, Node *scene
template <class T>
struct EditorSceneImporterGLTFInterpolate {
-
T lerp(const T &a, const T &b, float c) const {
-
return a + (b - a) * c;
}
T catmull_rom(const T &p0, const T &p1, const T &p2, const T &p3, float t) {
-
const float t2 = t * t;
const float t3 = t2 * t;
@@ -2652,7 +2721,6 @@ struct EditorSceneImporterGLTFInterpolate {
// thank you for existing, partial specialization
template <>
struct EditorSceneImporterGLTFInterpolate<Quat> {
-
Quat lerp(const Quat &a, const Quat &b, const float c) const {
ERR_FAIL_COND_V_MSG(!a.is_normalized(), Quat(), "The quaternion \"a\" must be normalized.");
ERR_FAIL_COND_V_MSG(!b.is_normalized(), Quat(), "The quaternion \"b\" must be normalized.");
@@ -2677,12 +2745,12 @@ struct EditorSceneImporterGLTFInterpolate<Quat> {
template <class T>
T EditorSceneImporterGLTF::_interpolate_track(const Vector<float> &p_times, const Vector<T> &p_values, const float p_time, const GLTFAnimation::Interpolation p_interp) {
-
//could use binary search, worth it?
int idx = -1;
for (int i = 0; i < p_times.size(); i++) {
- if (p_times[i] > p_time)
+ if (p_times[i] > p_time) {
break;
+ }
idx++;
}
@@ -2690,7 +2758,6 @@ T EditorSceneImporterGLTF::_interpolate_track(const Vector<float> &p_times, cons
switch (p_interp) {
case GLTFAnimation::INTERP_LINEAR: {
-
if (idx == -1) {
return p_values[0];
} else if (idx >= p_times.size() - 1) {
@@ -2703,7 +2770,6 @@ T EditorSceneImporterGLTF::_interpolate_track(const Vector<float> &p_times, cons
} break;
case GLTFAnimation::INTERP_STEP: {
-
if (idx == -1) {
return p_values[0];
} else if (idx >= p_times.size() - 1) {
@@ -2714,7 +2780,6 @@ T EditorSceneImporterGLTF::_interpolate_track(const Vector<float> &p_times, cons
} break;
case GLTFAnimation::INTERP_CATMULLROMSPLINE: {
-
if (idx == -1) {
return p_values[1];
} else if (idx >= p_times.size() - 1) {
@@ -2727,7 +2792,6 @@ T EditorSceneImporterGLTF::_interpolate_track(const Vector<float> &p_times, cons
} break;
case GLTFAnimation::INTERP_CUBIC_SPLINE: {
-
if (idx == -1) {
return p_values[1];
} else if (idx >= p_times.size() - 1) {
@@ -2750,7 +2814,6 @@ T EditorSceneImporterGLTF::_interpolate_track(const Vector<float> &p_times, cons
}
void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlayer *ap, const GLTFAnimationIndex index, const int bake_fps) {
-
const GLTFAnimation &anim = state.animations[index];
String name = anim.name;
@@ -2770,7 +2833,6 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye
float length = 0;
for (Map<int, GLTFAnimation::Track>::Element *E = anim.tracks.front(); E; E = E->next()) {
-
const GLTFAnimation::Track &track = E->get();
//need to find the path
NodePath node_path;
@@ -2838,7 +2900,6 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye
bool last = false;
while (true) {
-
Vector3 pos = base_pos;
Quat rot = base_rot;
Vector3 scale = base_scale;
@@ -2856,7 +2917,6 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye
}
if (node->skeleton >= 0) {
-
Transform xform;
xform.basis.set_quat_scale(rot, scale);
xform.origin = pos;
@@ -2958,7 +3018,6 @@ void EditorSceneImporterGLTF::_process_mesh_instances(GLTFState &state, Node3D *
}
Node3D *EditorSceneImporterGLTF::_generate_scene(GLTFState &state, const int p_bake_fps) {
-
Node3D *root = memnew(Node3D);
// scene_name is already unique
@@ -2985,20 +3044,21 @@ Node3D *EditorSceneImporterGLTF::_generate_scene(GLTFState &state, const int p_b
}
Node *EditorSceneImporterGLTF::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
-
GLTFState state;
if (p_path.to_lower().ends_with("glb")) {
//binary file
//text file
Error err = _parse_glb(p_path, state);
- if (err)
+ if (err) {
return nullptr;
+ }
} else {
//text file
Error err = _parse_json(p_path, state);
- if (err)
+ if (err) {
return nullptr;
+ }
}
ERR_FAIL_COND_V(!state.json.has("asset"), nullptr);
@@ -3009,96 +3069,117 @@ Node *EditorSceneImporterGLTF::import_scene(const String &p_path, uint32_t p_fla
String version = asset["version"];
+ state.import_flags = p_flags;
state.major_version = version.get_slice(".", 0).to_int();
state.minor_version = version.get_slice(".", 1).to_int();
state.use_named_skin_binds = p_flags & IMPORT_USE_NAMED_SKIN_BINDS;
/* STEP 0 PARSE SCENE */
Error err = _parse_scenes(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 1 PARSE NODES */
err = _parse_nodes(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 2 PARSE BUFFERS */
err = _parse_buffers(state, p_path.get_base_dir());
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 3 PARSE BUFFER VIEWS */
err = _parse_buffer_views(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 4 PARSE ACCESSORS */
err = _parse_accessors(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 5 PARSE IMAGES */
err = _parse_images(state, p_path.get_base_dir());
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 6 PARSE TEXTURES */
err = _parse_textures(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 7 PARSE TEXTURES */
err = _parse_materials(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 9 PARSE SKINS */
err = _parse_skins(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 10 DETERMINE SKELETONS */
err = _determine_skeletons(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 11 CREATE SKELETONS */
err = _create_skeletons(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 12 CREATE SKINS */
err = _create_skins(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
/* STEP 13 PARSE MESHES (we have enough info now) */
err = _parse_meshes(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
- /* STEP 14 PARSE CAMERAS */
+ /* STEP 14 PARSE LIGHTS */
+ err = _parse_lights(state);
+ if (err != OK) {
+ return NULL;
+ }
+
+ /* STEP 15 PARSE CAMERAS */
err = _parse_cameras(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
- /* STEP 15 PARSE ANIMATIONS */
+ /* STEP 16 PARSE ANIMATIONS */
err = _parse_animations(state);
- if (err != OK)
+ if (err != OK) {
return nullptr;
+ }
- /* STEP 16 ASSIGN SCENE NAMES */
+ /* STEP 17 ASSIGN SCENE NAMES */
_assign_scene_names(state);
- /* STEP 17 MAKE SCENE! */
+ /* STEP 18 MAKE SCENE! */
Node3D *scene = _generate_scene(state, p_bake_fps);
return scene;
}
Ref<Animation> EditorSceneImporterGLTF::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
-
return Ref<Animation>();
}
diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h
index d127a87782..95c6b87af5 100644
--- a/editor/import/editor_scene_importer_gltf.h
+++ b/editor/import/editor_scene_importer_gltf.h
@@ -32,6 +32,7 @@
#define EDITOR_SCENE_IMPORTER_GLTF_H
#include "editor/import/resource_importer_scene.h"
+#include "scene/3d/light_3d.h"
#include "scene/3d/node_3d.h"
#include "scene/3d/skeleton_3d.h"
@@ -40,7 +41,6 @@ class BoneAttachment3D;
class MeshInstance3D;
class EditorSceneImporterGLTF : public EditorSceneImporter {
-
GDCLASS(EditorSceneImporterGLTF, EditorSceneImporter);
typedef int GLTFAccessorIndex;
@@ -51,6 +51,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
typedef int GLTFImageIndex;
typedef int GLTFMaterialIndex;
typedef int GLTFMeshIndex;
+ typedef int GLTFLightIndex;
typedef int GLTFNodeIndex;
typedef int GLTFSkeletonIndex;
typedef int GLTFSkinIndex;
@@ -92,92 +93,61 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
String _get_type_name(const GLTFType p_component);
struct GLTFNode {
-
//matrices need to be transformed to this
- GLTFNodeIndex parent;
- int height;
+ GLTFNodeIndex parent = -1;
+ int height = -1;
Transform xform;
String name;
- GLTFMeshIndex mesh;
- GLTFCameraIndex camera;
- GLTFSkinIndex skin;
+ GLTFMeshIndex mesh = -1;
+ GLTFCameraIndex camera = -1;
+ GLTFSkinIndex skin = -1;
- GLTFSkeletonIndex skeleton;
- bool joint;
+ GLTFSkeletonIndex skeleton = -1;
+ bool joint = false;
Vector3 translation;
Quat rotation;
- Vector3 scale;
+ Vector3 scale = Vector3(1, 1, 1);
Vector<int> children;
- GLTFNodeIndex fake_joint_parent;
-
- GLTFNode() :
- parent(-1),
- height(-1),
- mesh(-1),
- camera(-1),
- skin(-1),
- skeleton(-1),
- joint(false),
- translation(0, 0, 0),
- scale(Vector3(1, 1, 1)),
- fake_joint_parent(-1) {}
+ GLTFNodeIndex fake_joint_parent = -1;
+
+ GLTFLightIndex light = -1;
+
+ GLTFNode() {}
};
struct GLTFBufferView {
-
- GLTFBufferIndex buffer;
- int byte_offset;
- int byte_length;
- int byte_stride;
- bool indices;
+ GLTFBufferIndex buffer = -1;
+ int byte_offset = 0;
+ int byte_length = 0;
+ int byte_stride = 0;
+ bool indices = false;
//matrices need to be transformed to this
- GLTFBufferView() :
- buffer(-1),
- byte_offset(0),
- byte_length(0),
- byte_stride(0),
- indices(false) {
- }
+ GLTFBufferView() {}
};
struct GLTFAccessor {
-
- GLTFBufferViewIndex buffer_view;
- int byte_offset;
- int component_type;
- bool normalized;
- int count;
+ GLTFBufferViewIndex buffer_view = 0;
+ int byte_offset = 0;
+ int component_type = 0;
+ bool normalized = false;
+ int count = 0;
GLTFType type;
- float min;
- float max;
- int sparse_count;
- int sparse_indices_buffer_view;
- int sparse_indices_byte_offset;
- int sparse_indices_component_type;
- int sparse_values_buffer_view;
- int sparse_values_byte_offset;
-
- GLTFAccessor() {
- buffer_view = 0;
- byte_offset = 0;
- component_type = 0;
- normalized = false;
- count = 0;
- min = 0;
- max = 0;
- sparse_count = 0;
- sparse_indices_buffer_view = 0;
- sparse_indices_byte_offset = 0;
- sparse_indices_component_type = 0;
- sparse_values_buffer_view = 0;
- sparse_values_byte_offset = 0;
- }
+ float min = 0;
+ float max = 0;
+ int sparse_count = 0;
+ int sparse_indices_buffer_view = 0;
+ int sparse_indices_byte_offset = 0;
+ int sparse_indices_component_type = 0;
+ int sparse_values_buffer_view = 0;
+ int sparse_values_byte_offset = 0;
+
+ GLTFAccessor() {}
};
struct GLTFTexture {
GLTFImageIndex src_image;
@@ -192,21 +162,19 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Vector<GLTFNodeIndex> roots;
// The created Skeleton for the scene
- Skeleton3D *godot_skeleton;
+ Skeleton3D *godot_skeleton = nullptr;
// Set of unique bone names for the skeleton
Set<String> unique_names;
- GLTFSkeleton() :
- godot_skeleton(nullptr) {
- }
+ GLTFSkeleton() {}
};
struct GLTFSkin {
String name;
// The "skeleton" property defined in the gltf spec. -1 = Scene Root
- GLTFNodeIndex skin_root;
+ GLTFNodeIndex skin_root = -1;
Vector<GLTFNodeIndex> joints_original;
Vector<Transform> inverse_binds;
@@ -226,7 +194,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Vector<GLTFNodeIndex> roots;
// The GLTF Skeleton this Skin points to (after we determine skeletons)
- GLTFSkeletonIndex skeleton;
+ GLTFSkeletonIndex skeleton = -1;
// A mapping from the joint indices (in the order of joints_original) to the
// Godot Skeleton's bone_indices
@@ -237,9 +205,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
// to the generated skeleton for the mesh instances.
Ref<Skin> godot_skin;
- GLTFSkin() :
- skin_root(-1),
- skeleton(-1) {}
+ GLTFSkin() {}
};
struct GLTFMesh {
@@ -248,18 +214,23 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
};
struct GLTFCamera {
+ bool perspective = true;
+ float fov_size = 64;
+ float zfar = 500;
+ float znear = 0.1;
+
+ GLTFCamera() {}
+ };
- bool perspective;
- float fov_size;
- float zfar;
- float znear;
+ struct GLTFLight {
+ Color color = Color(1.0f, 1.0f, 1.0f);
+ float intensity = 1.0f;
+ String type = "";
+ float range = Math_INF;
+ float inner_cone_angle = 0.0f;
+ float outer_cone_angle = Math_PI / 4.0;
- GLTFCamera() {
- perspective = true;
- fov_size = 65;
- zfar = 500;
- znear = 0.1;
- }
+ GLTFLight() {}
};
struct GLTFAnimation {
@@ -280,7 +251,6 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
};
struct Track {
-
Channel<Vector3> translation_track;
Channel<Quat> rotation_track;
Channel<Vector3> scale_track;
@@ -293,7 +263,6 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
};
struct GLTFState {
-
Dictionary json;
int major_version;
int minor_version;
@@ -317,6 +286,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Vector<GLTFSkin> skins;
Vector<GLTFCamera> cameras;
+ Vector<GLTFLight> lights;
Set<String> unique_names;
@@ -325,6 +295,9 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Map<GLTFNodeIndex, Node *> scene_nodes;
+ // EditorSceneImporter::ImportFlags
+ uint32_t import_flags;
+
~GLTFState() {
for (int i = 0; i < nodes.size(); i++) {
memdelete(nodes[i]);
@@ -392,12 +365,13 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
void _remove_duplicate_skins(GLTFState &state);
Error _parse_cameras(GLTFState &state);
-
+ Error _parse_lights(GLTFState &state);
Error _parse_animations(GLTFState &state);
BoneAttachment3D *_generate_bone_attachment(GLTFState &state, Skeleton3D *skeleton, const GLTFNodeIndex node_index);
MeshInstance3D *_generate_mesh_instance(GLTFState &state, Node *scene_parent, const GLTFNodeIndex node_index);
Camera3D *_generate_camera(GLTFState &state, Node *scene_parent, const GLTFNodeIndex node_index);
+ Light3D *_generate_light(GLTFState &state, Node *scene_parent, const GLTFNodeIndex node_index);
Node3D *_generate_spatial(GLTFState &state, Node *scene_parent, const GLTFNodeIndex node_index);
void _generate_scene_node(GLTFState &state, Node *scene_parent, Node3D *scene_root, const GLTFNodeIndex node_index);
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index 252af9050b..da2d1c9bdf 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -38,55 +38,51 @@
#include "scene/resources/texture.h"
String ResourceImporterBitMap::get_importer_name() const {
-
return "bitmap";
}
String ResourceImporterBitMap::get_visible_name() const {
-
return "BitMap";
}
-void ResourceImporterBitMap::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterBitMap::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
+
String ResourceImporterBitMap::get_save_extension() const {
return "res";
}
String ResourceImporterBitMap::get_resource_type() const {
-
return "BitMap";
}
bool ResourceImporterBitMap::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
return true;
}
int ResourceImporterBitMap::get_preset_count() const {
return 0;
}
-String ResourceImporterBitMap::get_preset_name(int p_idx) const {
+String ResourceImporterBitMap::get_preset_name(int p_idx) const {
return String();
}
void ResourceImporterBitMap::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "create_from", PROPERTY_HINT_ENUM, "Black & White,Alpha"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5));
}
Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
int create_from = p_options["create_from"];
float threshold = p_options["threshold"];
Ref<Image> image;
image.instance();
Error err = ImageLoader::load_image(p_source_file, image);
- if (err != OK)
+ if (err != OK) {
return err;
+ }
int w = image->get_width();
int h = image->get_height();
@@ -97,7 +93,6 @@ Error ResourceImporterBitMap::import(const String &p_source_file, const String &
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
-
bool bit;
Color c = image->get_pixel(j, i);
if (create_from == 0) { //b&W
diff --git a/editor/import/resource_importer_csv.cpp b/editor/import/resource_importer_csv.cpp
index 424f90bd54..d29ba28a96 100644
--- a/editor/import/resource_importer_csv.cpp
+++ b/editor/import/resource_importer_csv.cpp
@@ -34,16 +34,14 @@
#include "core/os/file_access.h"
String ResourceImporterCSV::get_importer_name() const {
-
return "csv";
}
String ResourceImporterCSV::get_visible_name() const {
-
return "CSV";
}
-void ResourceImporterCSV::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterCSV::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("csv");
}
@@ -52,20 +50,18 @@ String ResourceImporterCSV::get_save_extension() const {
}
String ResourceImporterCSV::get_resource_type() const {
-
return "TextFile";
}
bool ResourceImporterCSV::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
return true;
}
int ResourceImporterCSV::get_preset_count() const {
return 0;
}
-String ResourceImporterCSV::get_preset_name(int p_idx) const {
+String ResourceImporterCSV::get_preset_name(int p_idx) const {
return "";
}
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index 9d72396449..04e20dee86 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -36,16 +36,14 @@
#include "core/translation.h"
String ResourceImporterCSVTranslation::get_importer_name() const {
-
return "csv_translation";
}
String ResourceImporterCSVTranslation::get_visible_name() const {
-
return "CSV Translation";
}
-void ResourceImporterCSVTranslation::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterCSVTranslation::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("csv");
}
@@ -54,31 +52,27 @@ String ResourceImporterCSVTranslation::get_save_extension() const {
}
String ResourceImporterCSVTranslation::get_resource_type() const {
-
return "Translation";
}
bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
return true;
}
int ResourceImporterCSVTranslation::get_preset_count() const {
return 0;
}
-String ResourceImporterCSVTranslation::get_preset_name(int p_idx) const {
+String ResourceImporterCSVTranslation::get_preset_name(int p_idx) const {
return "";
}
void ResourceImporterCSVTranslation::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0));
}
Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
bool compress = p_options["compress"];
String delimiter;
@@ -105,7 +99,6 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
Vector<Ref<Translation>> translations;
for (int i = 1; i < line.size(); i++) {
-
String locale = line[i];
ERR_FAIL_COND_V_MSG(!TranslationServer::is_locale_valid(locale), ERR_PARSE_ERROR, "Error importing CSV translation: '" + locale + "' is not a valid locale.");
@@ -119,10 +112,8 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
line = f->get_csv_line(delimiter);
while (line.size() == locales.size() + 1) {
-
String key = line[0];
if (key != "") {
-
for (int i = 1; i < line.size(); i++) {
translations.write[i - 1]->add_message(key, line[i].c_unescape());
}
diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp
index a1f5a79b00..885b00865b 100644
--- a/editor/import/resource_importer_image.cpp
+++ b/editor/import/resource_importer_image.cpp
@@ -36,16 +36,14 @@
#include "scene/resources/texture.h"
String ResourceImporterImage::get_importer_name() const {
-
return "image";
}
String ResourceImporterImage::get_visible_name() const {
-
return "Image";
}
-void ResourceImporterImage::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterImage::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
@@ -54,20 +52,18 @@ String ResourceImporterImage::get_save_extension() const {
}
String ResourceImporterImage::get_resource_type() const {
-
return "Image";
}
bool ResourceImporterImage::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
return true;
}
int ResourceImporterImage::get_preset_count() const {
return 0;
}
-String ResourceImporterImage::get_preset_name(int p_idx) const {
+String ResourceImporterImage::get_preset_name(int p_idx) const {
return String();
}
@@ -75,7 +71,6 @@ void ResourceImporterImage::get_import_options(List<ImportOption> *r_options, in
}
Error ResourceImporterImage::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
FileAccess *f = FileAccess::open(p_source_file, FileAccess::READ);
ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, "Cannot open file from path '" + p_source_file + "'.");
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index c46cf4c1a8..b57ea3745d 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -40,7 +40,6 @@
#include "scene/resources/texture.h"
String ResourceImporterLayeredTexture::get_importer_name() const {
-
switch (mode) {
case MODE_CUBEMAP: {
return "cubemap_texture";
@@ -60,7 +59,6 @@ String ResourceImporterLayeredTexture::get_importer_name() const {
}
String ResourceImporterLayeredTexture::get_visible_name() const {
-
switch (mode) {
case MODE_CUBEMAP: {
return "Cubemap";
@@ -78,10 +76,11 @@ String ResourceImporterLayeredTexture::get_visible_name() const {
ERR_FAIL_V("");
}
-void ResourceImporterLayeredTexture::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterLayeredTexture::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
+
String ResourceImporterLayeredTexture::get_save_extension() const {
switch (mode) {
case MODE_CUBEMAP: {
@@ -102,7 +101,6 @@ String ResourceImporterLayeredTexture::get_save_extension() const {
}
String ResourceImporterLayeredTexture::get_resource_type() const {
-
switch (mode) {
case MODE_CUBEMAP: {
return "StreamCubemap";
@@ -121,7 +119,6 @@ String ResourceImporterLayeredTexture::get_resource_type() const {
}
bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
if (p_option == "compress/lossy_quality" && p_options.has("compress/mode")) {
return int(p_options["compress/mode"]) == COMPRESS_LOSSY;
}
@@ -131,14 +128,13 @@ bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_optio
int ResourceImporterLayeredTexture::get_preset_count() const {
return 0;
}
-String ResourceImporterLayeredTexture::get_preset_name(int p_idx) const {
+String ResourceImporterLayeredTexture::get_preset_name(int p_idx) const {
return "";
}
void ResourceImporterLayeredTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,Video RAM,Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless (PNG),Lossy (WebP),Video RAM (S3TC/ETC/BPTC),Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/bptc_ldr", PROPERTY_HINT_ENUM, "Disabled,Enabled,RGBA Only"), 0));
@@ -160,9 +156,7 @@ void ResourceImporterLayeredTexture::get_import_options(List<ImportOption> *r_op
}
void ResourceImporterLayeredTexture::_save_tex(Vector<Ref<Image>> p_images, const String &p_to_path, int p_compress_mode, float p_lossy, Image::CompressMode p_vram_compression, Image::CompressSource p_csource, Image::UsedChannels used_channels, bool p_mipmaps, bool p_force_po2) {
-
for (int i = 0; i < p_images.size(); i++) {
-
if (p_force_po2) {
p_images.write[i]->resize_to_po2();
}
@@ -199,7 +193,6 @@ void ResourceImporterLayeredTexture::_save_tex(Vector<Ref<Image>> p_images, cons
}
Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
int compress_mode = p_options["compress/mode"];
float lossy = p_options["compress/lossy_quality"];
int hdr_compression = p_options["compress/hdr_compression"];
@@ -246,8 +239,9 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
Ref<Image> image;
image.instance();
Error err = ImageLoader::load_image(p_source_file, image, nullptr, false, 1.0);
- if (err != OK)
+ if (err != OK) {
return err;
+ }
if (compress_mode == COMPRESS_BASIS_UNIVERSAL && image->get_format() >= Image::FORMAT_RF) {
//basis universal does not support float formats, fall back
@@ -315,7 +309,6 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
bool can_compress_hdr = hdr_compression > 0;
if (is_hdr && can_compress_hdr) {
-
if (used_channels == Image::USED_CHANNELS_LA || used_channels == Image::USED_CHANNELS_RGBA) {
//can compress hdr, but hdr with alpha is not compressible
@@ -337,9 +330,7 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
}
if (can_compress_hdr) {
-
if (!can_bptc) {
-
//default to rgbe
if (image->get_format() != Image::FORMAT_RGBE9995) {
for (int i = 0; i < slices.size(); i++) {
@@ -366,14 +357,12 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) {
-
_save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, lossy, Image::COMPRESS_ETC2, csource, used_channels, mipmaps, true);
r_platform_variants->push_back("etc2");
formats_imported.push_back("etc2");
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) {
-
_save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, lossy, Image::COMPRESS_ETC2, csource, used_channels, mipmaps, true);
r_platform_variants->push_back("pvrtc");
formats_imported.push_back("pvrtc");
@@ -408,7 +397,6 @@ const char *ResourceImporterLayeredTexture::compression_formats[] = {
nullptr
};
String ResourceImporterLayeredTexture::get_import_settings_string() const {
-
String s;
int index = 0;
@@ -425,7 +413,6 @@ String ResourceImporterLayeredTexture::get_import_settings_string() const {
}
bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_path) const {
-
//will become invalid if formats are missing to import
Dictionary metadata = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
@@ -463,7 +450,6 @@ bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_p
ResourceImporterLayeredTexture *ResourceImporterLayeredTexture::singleton = nullptr;
ResourceImporterLayeredTexture::ResourceImporterLayeredTexture() {
-
singleton = this;
mode = MODE_CUBEMAP;
}
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index 6a6eadfa5c..49b47bf4be 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -38,12 +38,10 @@
#include "scene/resources/surface_tool.h"
uint32_t EditorOBJImporter::get_import_flags() const {
-
return IMPORT_SCENE;
}
static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) {
-
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path));
@@ -51,7 +49,6 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand
String current_name;
String base_path = p_path.get_base_dir();
while (true) {
-
String l = f->get_line().strip_edges();
if (l.begins_with("newmtl ")) {
@@ -204,7 +201,6 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand
}
static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, Vector3 p_offset_mesh, List<String> *r_missing_deps) {
-
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path));
@@ -231,7 +227,6 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
String current_group;
while (true) {
-
String l = f->get_line().strip_edges();
while (l.length() && l[l.length() - 1] == '\\') {
String add = f->get_line().strip_edges();
@@ -283,12 +278,10 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
ERR_FAIL_COND_V(face[0].size() != face[1].size(), ERR_FILE_CORRUPT);
for (int i = 2; i < v.size() - 1; i++) {
-
face[2] = v[i + 1].split("/");
ERR_FAIL_COND_V(face[0].size() != face[2].size(), ERR_FILE_CORRUPT);
for (int j = 0; j < 3; j++) {
-
int idx = j;
if (idx < 2) {
@@ -297,23 +290,26 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
if (face[idx].size() == 3) {
int norm = face[idx][2].to_int() - 1;
- if (norm < 0)
+ if (norm < 0) {
norm += normals.size() + 1;
+ }
ERR_FAIL_INDEX_V(norm, normals.size(), ERR_FILE_CORRUPT);
surf_tool->add_normal(normals[norm]);
}
if (face[idx].size() >= 2 && face[idx][1] != String()) {
int uv = face[idx][1].to_int() - 1;
- if (uv < 0)
+ if (uv < 0) {
uv += uvs.size() + 1;
+ }
ERR_FAIL_INDEX_V(uv, uvs.size(), ERR_FILE_CORRUPT);
surf_tool->add_uv(uvs[uv]);
}
int vtx = face[idx][0].to_int() - 1;
- if (vtx < 0)
+ if (vtx < 0) {
vtx += vertices.size() + 1;
+ }
ERR_FAIL_INDEX_V(vtx, vertices.size(), ERR_FILE_CORRUPT);
Vector3 vertex = vertices[vtx];
@@ -326,10 +322,11 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
}
} else if (l.begins_with("s ")) { //smoothing
String what = l.substr(2, l.length()).strip_edges();
- if (what == "off")
+ if (what == "off") {
surf_tool->add_smooth_group(false);
- else
+ } else {
surf_tool->add_smooth_group(true);
+ }
} else if (/*l.begins_with("g ") ||*/ l.begins_with("usemtl ") || (l.begins_with("o ") || f->eof_reached())) { //commit group to mesh
//groups are too annoying
if (surf_tool->get_vertex_array().size()) {
@@ -365,7 +362,6 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
}
if (l.begins_with("o ") || f->eof_reached()) {
-
if (!p_single_mesh) {
mesh->set_name(name);
r_meshes.push_back(mesh);
@@ -384,12 +380,10 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
}
if (l.begins_with("usemtl ")) {
-
current_material = l.replace("usemtl", "").strip_edges();
}
if (l.begins_with("g ")) {
-
current_group = l.substr(2, l.length()).strip_edges();
}
@@ -411,7 +405,6 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
}
if (p_single_mesh) {
-
r_meshes.push_back(mesh);
}
@@ -419,7 +412,6 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
}
Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
-
List<Ref<Mesh>> meshes;
Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, p_flags & IMPORT_USE_COMPRESSION, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps);
@@ -434,7 +426,6 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in
Node3D *scene = memnew(Node3D);
for (List<Ref<Mesh>>::Element *E = meshes.front(); E; E = E->next()) {
-
MeshInstance3D *mi = memnew(MeshInstance3D);
mi->set_mesh(E->get());
mi->set_name(E->get()->get_name());
@@ -448,33 +439,36 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in
return scene;
}
-Ref<Animation> EditorOBJImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
+Ref<Animation> EditorOBJImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
return Ref<Animation>();
}
void EditorOBJImporter::get_extensions(List<String> *r_extensions) const {
-
r_extensions->push_back("obj");
}
EditorOBJImporter::EditorOBJImporter() {
}
+
////////////////////////////////////////////////////
String ResourceImporterOBJ::get_importer_name() const {
return "wavefront_obj";
}
+
String ResourceImporterOBJ::get_visible_name() const {
return "OBJ As Mesh";
}
-void ResourceImporterOBJ::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterOBJ::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("obj");
}
+
String ResourceImporterOBJ::get_save_extension() const {
return "mesh";
}
+
String ResourceImporterOBJ::get_resource_type() const {
return "Mesh";
}
@@ -482,24 +476,23 @@ String ResourceImporterOBJ::get_resource_type() const {
int ResourceImporterOBJ::get_preset_count() const {
return 0;
}
+
String ResourceImporterOBJ::get_preset_name(int p_idx) const {
return "";
}
void ResourceImporterOBJ::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "generate_tangents"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "scale_mesh"), Vector3(1, 1, 1)));
r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "offset_mesh"), Vector3(0, 0, 0)));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "optimize_mesh"), true));
}
-bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
+bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
return true;
}
Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
List<Ref<Mesh>> meshes;
Error err = _parse_obj(p_source_file, meshes, true, p_options["generate_tangents"], p_options["optimize_mesh"], p_options["scale_mesh"], p_options["offset_mesh"], nullptr);
diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h
index 7485e60f7b..aec5de3dcc 100644
--- a/editor/import/resource_importer_obj.h
+++ b/editor/import/resource_importer_obj.h
@@ -34,7 +34,6 @@
#include "resource_importer_scene.h"
class EditorOBJImporter : public EditorSceneImporter {
-
GDCLASS(EditorOBJImporter, EditorSceneImporter);
public:
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 37941109a1..ec82f78e75 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -47,15 +47,14 @@
#include "scene/resources/world_margin_shape_3d.h"
uint32_t EditorSceneImporter::get_import_flags() const {
-
if (get_script_instance()) {
return get_script_instance()->call("_get_import_flags");
}
ERR_FAIL_V(0);
}
-void EditorSceneImporter::get_extensions(List<String> *r_extensions) const {
+void EditorSceneImporter::get_extensions(List<String> *r_extensions) const {
if (get_script_instance()) {
Array arr = get_script_instance()->call("_get_extensions");
for (int i = 0; i < arr.size(); i++) {
@@ -66,8 +65,8 @@ void EditorSceneImporter::get_extensions(List<String> *r_extensions) const {
ERR_FAIL();
}
-Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
+Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
if (get_script_instance()) {
return get_script_instance()->call("_import_scene", p_path, p_flags, p_bake_fps);
}
@@ -76,7 +75,6 @@ Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags,
}
Ref<Animation> EditorSceneImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
-
if (get_script_instance()) {
return get_script_instance()->call("_import_animation", p_path, p_flags);
}
@@ -88,17 +86,14 @@ Ref<Animation> EditorSceneImporter::import_animation(const String &p_path, uint3
//and you want to load the resulting file
Node *EditorSceneImporter::import_scene_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps) {
-
return ResourceImporterScene::get_singleton()->import_scene_from_other_importer(this, p_path, p_flags, p_bake_fps);
}
Ref<Animation> EditorSceneImporter::import_animation_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps) {
-
return ResourceImporterScene::get_singleton()->import_animation_from_other_importer(this, p_path, p_flags, p_bake_fps);
}
void EditorSceneImporter::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("import_scene_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneImporter::import_scene_from_other_importer);
ClassDB::bind_method(D_METHOD("import_animation_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneImporter::import_animation_from_other_importer);
@@ -126,27 +121,24 @@ void EditorSceneImporter::_bind_methods() {
/////////////////////////////////
void EditorScenePostImport::_bind_methods() {
-
BIND_VMETHOD(MethodInfo(Variant::OBJECT, "post_import", PropertyInfo(Variant::OBJECT, "scene")));
ClassDB::bind_method(D_METHOD("get_source_folder"), &EditorScenePostImport::get_source_folder);
ClassDB::bind_method(D_METHOD("get_source_file"), &EditorScenePostImport::get_source_file);
}
Node *EditorScenePostImport::post_import(Node *p_scene) {
-
- if (get_script_instance())
+ if (get_script_instance()) {
return get_script_instance()->call("post_import", p_scene);
+ }
return p_scene;
}
String EditorScenePostImport::get_source_folder() const {
-
return source_folder;
}
String EditorScenePostImport::get_source_file() const {
-
return source_file;
}
@@ -159,17 +151,14 @@ EditorScenePostImport::EditorScenePostImport() {
}
String ResourceImporterScene::get_importer_name() const {
-
return "scene";
}
String ResourceImporterScene::get_visible_name() const {
-
return "Scene";
}
void ResourceImporterScene::get_recognized_extensions(List<String> *p_extensions) const {
-
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
E->get()->get_extensions(p_extensions);
}
@@ -180,27 +169,29 @@ String ResourceImporterScene::get_save_extension() const {
}
String ResourceImporterScene::get_resource_type() const {
-
return "PackedScene";
}
bool ResourceImporterScene::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
if (p_option.begins_with("animation/")) {
- if (p_option != "animation/import" && !bool(p_options["animation/import"]))
+ if (p_option != "animation/import" && !bool(p_options["animation/import"])) {
return false;
+ }
- if (p_option == "animation/keep_custom_tracks" && int(p_options["animation/storage"]) == 0)
+ if (p_option == "animation/keep_custom_tracks" && int(p_options["animation/storage"]) == 0) {
return false;
+ }
- if (p_option.begins_with("animation/optimizer/") && p_option != "animation/optimizer/enabled" && !bool(p_options["animation/optimizer/enabled"]))
+ if (p_option.begins_with("animation/optimizer/") && p_option != "animation/optimizer/enabled" && !bool(p_options["animation/optimizer/enabled"])) {
return false;
+ }
if (p_option.begins_with("animation/clip_")) {
int max_clip = p_options["animation/clips/amount"];
int clip = p_option.get_slice("/", 1).get_slice("_", 1).to_int() - 1;
- if (clip >= max_clip)
+ if (clip >= max_clip) {
return false;
+ }
}
}
@@ -218,8 +209,8 @@ bool ResourceImporterScene::get_option_visibility(const String &p_option, const
int ResourceImporterScene::get_preset_count() const {
return PRESET_MAX;
}
-String ResourceImporterScene::get_preset_name(int p_idx) const {
+String ResourceImporterScene::get_preset_name(int p_idx) const {
switch (p_idx) {
case PRESET_SINGLE_SCENE:
return TTR("Import as Single Scene");
@@ -247,53 +238,52 @@ String ResourceImporterScene::get_preset_name(int p_idx) const {
}
static bool _teststr(const String &p_what, const String &p_str) {
-
String what = p_what;
//remove trailing spaces and numbers, some apps like blender add ".number" to duplicates so also compensate for this
while (what.length() && ((what[what.length() - 1] >= '0' && what[what.length() - 1] <= '9') || what[what.length() - 1] <= 32 || what[what.length() - 1] == '.')) {
-
what = what.substr(0, what.length() - 1);
}
- if (what.findn("$" + p_str) != -1) //blender and other stuff
+ if (what.findn("$" + p_str) != -1) { //blender and other stuff
return true;
- if (what.to_lower().ends_with("-" + p_str)) //collada only supports "_" and "-" besides letters
+ }
+ if (what.to_lower().ends_with("-" + p_str)) { //collada only supports "_" and "-" besides letters
return true;
- if (what.to_lower().ends_with("_" + p_str)) //collada only supports "_" and "-" besides letters
+ }
+ if (what.to_lower().ends_with("_" + p_str)) { //collada only supports "_" and "-" besides letters
return true;
+ }
return false;
}
static String _fixstr(const String &p_what, const String &p_str) {
-
String what = p_what;
//remove trailing spaces and numbers, some apps like blender add ".number" to duplicates so also compensate for this
while (what.length() && ((what[what.length() - 1] >= '0' && what[what.length() - 1] <= '9') || what[what.length() - 1] <= 32 || what[what.length() - 1] == '.')) {
-
what = what.substr(0, what.length() - 1);
}
String end = p_what.substr(what.length(), p_what.length() - what.length());
- if (what.findn("$" + p_str) != -1) //blender and other stuff
+ if (what.findn("$" + p_str) != -1) { //blender and other stuff
return what.replace("$" + p_str, "") + end;
- if (what.to_lower().ends_with("-" + p_str)) //collada only supports "_" and "-" besides letters
+ }
+ if (what.to_lower().ends_with("-" + p_str)) { //collada only supports "_" and "-" besides letters
return what.substr(0, what.length() - (p_str.length() + 1)) + end;
- if (what.to_lower().ends_with("_" + p_str)) //collada only supports "_" and "-" besides letters
+ }
+ if (what.to_lower().ends_with("_" + p_str)) { //collada only supports "_" and "-" besides letters
return what.substr(0, what.length() - (p_str.length() + 1)) + end;
+ }
return what;
}
static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape3D>> &r_shape_list, bool p_convex) {
-
if (!p_convex) {
-
Ref<Shape3D> shape = mesh->create_trimesh_shape();
r_shape_list.push_back(shape);
} else {
-
Vector<Ref<Shape3D>> cd = mesh->convex_decompose();
if (cd.size()) {
for (int i = 0; i < cd.size(); i++) {
@@ -304,10 +294,8 @@ static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape3D>> &r_shape_l
}
Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape3D>>> &collision_map, LightBakeMode p_light_bake_mode) {
-
// children first
for (int i = 0; i < p_node->get_child_count(); i++) {
-
Node *r = _fix_node(p_node->get_child(i), p_root, collision_map, p_light_bake_mode);
if (!r) {
i--; //was erased
@@ -319,32 +307,27 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
bool isroot = p_node == p_root;
if (!isroot && _teststr(name, "noimp")) {
-
memdelete(p_node);
return nullptr;
}
if (Object::cast_to<MeshInstance3D>(p_node)) {
-
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_node);
Ref<ArrayMesh> m = mi->get_mesh();
if (m.is_valid()) {
-
for (int i = 0; i < m->get_surface_count(); i++) {
-
Ref<StandardMaterial3D> mat = m->surface_get_material(i);
- if (!mat.is_valid())
+ if (!mat.is_valid()) {
continue;
+ }
if (_teststr(mat->get_name(), "alpha")) {
-
mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
mat->set_name(_fixstr(mat->get_name(), "alpha"));
}
if (_teststr(mat->get_name(), "vcol")) {
-
mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
mat->set_name(_fixstr(mat->get_name(), "vcol"));
@@ -353,7 +336,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
}
if (p_light_bake_mode != LIGHT_BAKE_DISABLED) {
-
mi->set_gi_mode(GeometryInstance3D::GI_MODE_BAKED);
}
}
@@ -365,7 +347,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
List<StringName> anims;
ap->get_animation_list(&anims);
for (List<StringName>::Element *E = anims.front(); E; E = E->next()) {
-
Ref<Animation> anim = ap->get_animation(E->get());
ERR_CONTINUE(anim.is_null());
for (int i = 0; i < anim->get_track_count(); i++) {
@@ -384,9 +365,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
}
if (_teststr(name, "colonly") || _teststr(name, "convcolonly")) {
-
- if (isroot)
+ if (isroot) {
return p_node;
+ }
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_node);
if (mi) {
Ref<Mesh> mesh = mi->get_mesh();
@@ -413,7 +394,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
ERR_FAIL_COND_V(fixed_name == String(), nullptr);
if (shapes.size()) {
-
StaticBody3D *col = memnew(StaticBody3D);
col->set_transform(mi->get_transform());
col->set_name(fixed_name);
@@ -423,7 +403,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
int idx = 0;
for (List<Ref<Shape3D>>::Element *E = shapes.front(); E; E = E->next()) {
-
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E->get());
col->add_child(cshape);
@@ -470,9 +449,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
}
} else if (_teststr(name, "rigid") && Object::cast_to<MeshInstance3D>(p_node)) {
-
- if (isroot)
+ if (isroot) {
return p_node;
+ }
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_node);
Ref<Mesh> mesh = mi->get_mesh();
@@ -497,7 +476,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
int idx = 0;
for (List<Ref<Shape3D>>::Element *E = shapes.front(); E; E = E->next()) {
-
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E->get());
rigid_body->add_child(cshape);
@@ -509,7 +487,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
}
} else if ((_teststr(name, "col") || (_teststr(name, "convcol"))) && Object::cast_to<MeshInstance3D>(p_node)) {
-
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_node);
Ref<Mesh> mesh = mi->get_mesh();
@@ -547,7 +524,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
int idx = 0;
for (List<Ref<Shape3D>>::Element *E = shapes.front(); E; E = E->next()) {
-
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E->get());
col->add_child(cshape);
@@ -561,9 +537,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
}
} else if (_teststr(name, "navmesh") && Object::cast_to<MeshInstance3D>(p_node)) {
-
- if (isroot)
+ if (isroot) {
return p_node;
+ }
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_node);
@@ -580,9 +556,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
memdelete(p_node);
p_node = nmi;
} else if (_teststr(name, "vehicle")) {
-
- if (isroot)
+ if (isroot) {
return p_node;
+ }
Node *owner = p_node->get_owner();
Node3D *s = Object::cast_to<Node3D>(p_node);
@@ -600,9 +576,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
p_node = bv;
} else if (_teststr(name, "wheel")) {
-
- if (isroot)
+ if (isroot) {
return p_node;
+ }
Node *owner = p_node->get_owner();
Node3D *s = Object::cast_to<Node3D>(p_node);
@@ -620,14 +596,12 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
p_node = bv;
} else if (Object::cast_to<MeshInstance3D>(p_node)) {
-
//last attempt, maybe collision inside the mesh data
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_node);
Ref<ArrayMesh> mesh = mi->get_mesh();
if (!mesh.is_null()) {
-
List<Ref<Shape3D>> shapes;
if (collision_map.has(mesh)) {
shapes = collision_map[mesh];
@@ -649,7 +623,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
int idx = 0;
for (List<Ref<Shape3D>>::Element *E = shapes.front(); E; E = E->next()) {
-
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E->get());
col->add_child(cshape);
@@ -666,41 +639,39 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
}
void ResourceImporterScene::_create_clips(Node *scene, const Array &p_clips, bool p_bake_all) {
-
- if (!scene->has_node(String("AnimationPlayer")))
+ if (!scene->has_node(String("AnimationPlayer"))) {
return;
+ }
Node *n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
AnimationPlayer *anim = Object::cast_to<AnimationPlayer>(n);
ERR_FAIL_COND(!anim);
- if (!anim->has_animation("default"))
+ if (!anim->has_animation("default")) {
return;
+ }
Ref<Animation> default_anim = anim->get_animation("default");
for (int i = 0; i < p_clips.size(); i += 4) {
-
String name = p_clips[i];
float from = p_clips[i + 1];
float to = p_clips[i + 2];
bool loop = p_clips[i + 3];
- if (from >= to)
+ if (from >= to) {
continue;
+ }
Ref<Animation> new_anim = memnew(Animation);
for (int j = 0; j < default_anim->get_track_count(); j++) {
-
List<float> keys;
int kc = default_anim->track_get_key_count(j);
int dtrack = -1;
for (int k = 0; k < kc; k++) {
-
float kt = default_anim->track_get_key_time(j, k);
if (kt >= from && kt < to) {
-
//found a key within range, so create track
if (dtrack == -1) {
new_anim->add_track(default_anim->track_get_type(j));
@@ -708,7 +679,6 @@ void ResourceImporterScene::_create_clips(Node *scene, const Array &p_clips, boo
new_anim->track_set_path(dtrack, default_anim->track_get_path(j));
if (kt > (from + 0.01) && k > 0) {
-
if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM) {
Quat q;
Vector3 p;
@@ -737,7 +707,6 @@ void ResourceImporterScene::_create_clips(Node *scene, const Array &p_clips, boo
}
if (dtrack != -1 && kt >= to) {
-
if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM) {
Quat q;
Vector3 p;
@@ -757,7 +726,6 @@ void ResourceImporterScene::_create_clips(Node *scene, const Array &p_clips, boo
dtrack = new_anim->get_track_count() - 1;
new_anim->track_set_path(dtrack, default_anim->track_get_path(j));
if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM) {
-
Quat q;
Vector3 p;
Vector3 s;
@@ -784,12 +752,10 @@ void ResourceImporterScene::_create_clips(Node *scene, const Array &p_clips, boo
}
void ResourceImporterScene::_filter_anim_tracks(Ref<Animation> anim, Set<String> &keep) {
-
Ref<Animation> a = anim;
ERR_FAIL_COND(!a.is_valid());
for (int j = 0; j < a->get_track_count(); j++) {
-
String path = a->track_get_path(j);
if (!keep.has(path)) {
@@ -800,9 +766,9 @@ void ResourceImporterScene::_filter_anim_tracks(Ref<Animation> anim, Set<String>
}
void ResourceImporterScene::_filter_tracks(Node *scene, const String &p_text) {
-
- if (!scene->has_node(String("AnimationPlayer")))
+ if (!scene->has_node(String("AnimationPlayer"))) {
return;
+ }
Node *n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
AnimationPlayer *anim = Object::cast_to<AnimationPlayer>(n);
@@ -810,14 +776,12 @@ void ResourceImporterScene::_filter_tracks(Node *scene, const String &p_text) {
Vector<String> strings = p_text.split("\n");
for (int i = 0; i < strings.size(); i++) {
-
strings.write[i] = strings[i].strip_edges();
}
List<StringName> anim_names;
anim->get_animation_list(&anim_names);
for (List<StringName>::Element *E = anim_names.front(); E; E = E->next()) {
-
String name = E->get();
bool valid_for_this = false;
bool valid = false;
@@ -826,9 +790,7 @@ void ResourceImporterScene::_filter_tracks(Node *scene, const String &p_text) {
Set<String> keep_local;
for (int i = 0; i < strings.size(); i++) {
-
if (strings[i].begins_with("@")) {
-
valid_for_this = false;
for (Set<String>::Element *F = keep_local.front(); F; F = F->next()) {
keep.insert(F->get());
@@ -837,59 +799,64 @@ void ResourceImporterScene::_filter_tracks(Node *scene, const String &p_text) {
Vector<String> filters = strings[i].substr(1, strings[i].length()).split(",");
for (int j = 0; j < filters.size(); j++) {
-
String fname = filters[j].strip_edges();
- if (fname == "")
+ if (fname == "") {
continue;
+ }
int fc = fname[0];
bool plus;
- if (fc == '+')
+ if (fc == '+') {
plus = true;
- else if (fc == '-')
+ } else if (fc == '-') {
plus = false;
- else
+ } else {
continue;
+ }
String filter = fname.substr(1, fname.length()).strip_edges();
- if (!name.matchn(filter))
+ if (!name.matchn(filter)) {
continue;
+ }
valid_for_this = plus;
}
- if (valid_for_this)
+ if (valid_for_this) {
valid = true;
+ }
} else if (valid_for_this) {
-
Ref<Animation> a = anim->get_animation(name);
- if (!a.is_valid())
+ if (!a.is_valid()) {
continue;
+ }
for (int j = 0; j < a->get_track_count(); j++) {
-
String path = a->track_get_path(j);
String tname = strings[i];
- if (tname == "")
+ if (tname == "") {
continue;
+ }
int fc = tname[0];
bool plus;
- if (fc == '+')
+ if (fc == '+') {
plus = true;
- else if (fc == '-')
+ } else if (fc == '-') {
plus = false;
- else
+ } else {
continue;
+ }
String filter = tname.substr(1, tname.length()).strip_edges();
- if (!path.matchn(filter))
+ if (!path.matchn(filter)) {
continue;
+ }
- if (plus)
+ if (plus) {
keep_local.insert(path);
- else if (!keep.has(path)) {
+ } else if (!keep.has(path)) {
keep_local.erase(path);
}
}
@@ -906,9 +873,9 @@ void ResourceImporterScene::_filter_tracks(Node *scene, const String &p_text) {
}
void ResourceImporterScene::_optimize_animations(Node *scene, float p_max_lin_error, float p_max_ang_error, float p_max_angle) {
-
- if (!scene->has_node(String("AnimationPlayer")))
+ if (!scene->has_node(String("AnimationPlayer"))) {
return;
+ }
Node *n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
AnimationPlayer *anim = Object::cast_to<AnimationPlayer>(n);
@@ -917,14 +884,12 @@ void ResourceImporterScene::_optimize_animations(Node *scene, float p_max_lin_er
List<StringName> anim_names;
anim->get_animation_list(&anim_names);
for (List<StringName>::Element *E = anim_names.front(); E; E = E->next()) {
-
Ref<Animation> a = anim->get_animation(E->get());
a->optimize(p_max_lin_error, p_max_ang_error, Math::deg2rad(p_max_angle));
}
}
static String _make_extname(const String &p_str) {
-
String ext_name = p_str.replace(".", "_");
ext_name = ext_name.replace(":", "_");
ext_name = ext_name.replace("\"", "_");
@@ -940,14 +905,12 @@ static String _make_extname(const String &p_str) {
}
void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Transform> &meshes) {
-
List<PropertyInfo> pi;
p_node->get_property_list(&pi);
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_node);
if (mi) {
-
Ref<ArrayMesh> mesh = mi->get_mesh();
if (mesh.is_valid() && !meshes.has(mesh)) {
@@ -962,13 +925,11 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans
}
}
for (int i = 0; i < p_node->get_child_count(); i++) {
-
_find_meshes(p_node->get_child(i), meshes);
}
}
void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation>> &p_animations, Map<Ref<Material>, Ref<Material>> &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh>> &p_meshes) {
-
List<PropertyInfo> pi;
if (p_make_animations) {
@@ -978,12 +939,10 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
List<StringName> anims;
ap->get_animation_list(&anims);
for (List<StringName>::Element *E = anims.front(); E; E = E->next()) {
-
Ref<Animation> anim = ap->get_animation(E->get());
ERR_CONTINUE(anim.is_null());
if (!p_animations.has(anim)) {
-
//mark what comes from the file first, this helps eventually keep user data
for (int i = 0; i < anim->get_track_count(); i++) {
anim->track_set_imported(i, true);
@@ -1022,15 +981,11 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
p_node->get_property_list(&pi);
for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) {
-
if (E->get().type == Variant::OBJECT) {
-
Ref<Material> mat = p_node->get(E->get().name);
if (p_make_materials && mat.is_valid() && mat->get_name() != "") {
-
if (!p_materials.has(mat)) {
-
String ext_name;
if (p_materials_as_text) {
@@ -1043,28 +998,22 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
//if exists, use it
p_materials[mat] = ResourceLoader::load(ext_name);
} else {
-
ResourceSaver::save(ext_name, mat, ResourceSaver::FLAG_CHANGE_PATH);
p_materials[mat] = ResourceLoader::load(ext_name, "", true); // disable loading from the cache.
}
}
if (p_materials[mat] != mat) {
-
p_node->set(E->get().name, p_materials[mat]);
}
} else {
-
Ref<ArrayMesh> mesh = p_node->get(E->get().name);
if (mesh.is_valid()) {
-
bool mesh_just_added = false;
if (p_make_meshes) {
-
if (!p_meshes.has(mesh)) {
-
//meshes are always overwritten, keeping them is not practical
String ext_name;
@@ -1082,16 +1031,16 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
}
if (p_make_materials) {
-
if (mesh_just_added || !p_meshes.has(mesh)) {
-
for (int i = 0; i < mesh->get_surface_count(); i++) {
mat = mesh->surface_get_material(i);
- if (!mat.is_valid())
+ if (!mat.is_valid()) {
continue;
- if (mat->get_name() == "")
+ }
+ if (mat->get_name() == "") {
continue;
+ }
if (!p_materials.has(mat)) {
String ext_name;
@@ -1106,19 +1055,16 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
//if exists, use it
p_materials[mat] = ResourceLoader::load(ext_name);
} else {
-
ResourceSaver::save(ext_name, mat, ResourceSaver::FLAG_CHANGE_PATH);
p_materials[mat] = ResourceLoader::load(ext_name, "", true); // disable loading from the cache.
}
}
if (p_materials[mat] != mat) {
-
mesh->surface_set_material(i, p_materials[mat]);
//re-save the mesh since a material is now assigned
if (p_make_meshes) {
-
String ext_name;
if (p_meshes_as_text) {
@@ -1144,13 +1090,11 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
}
for (int i = 0; i < p_node->get_child_count(); i++) {
-
_make_external_resources(p_node->get_child(i), p_base_path, p_make_animations, p_animations_as_text, p_keep_animations, p_make_materials, p_materials_as_text, p_keep_materials, p_make_meshes, p_meshes_as_text, p_animations, p_materials, p_meshes);
}
}
void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_type", PROPERTY_HINT_TYPE_STRING, "Node"), "Node3D"));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_name"), "Scene Root"));
@@ -1160,8 +1104,9 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
String script_ext_hint;
for (List<String>::Element *E = script_extentions.front(); E; E = E->next()) {
- if (script_ext_hint != "")
+ if (script_ext_hint != "") {
script_ext_hint += ",";
+ }
script_ext_hint += "*." + E->get();
}
@@ -1203,7 +1148,6 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
}
void ResourceImporterScene::_replace_owner(Node *p_node, Node *p_scene, Node *p_new_owner) {
-
if (p_node != p_new_owner && p_node->get_owner() == p_scene) {
p_node->set_owner(p_new_owner);
}
@@ -1215,28 +1159,26 @@ void ResourceImporterScene::_replace_owner(Node *p_node, Node *p_scene, Node *p_
}
Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps) {
-
Ref<EditorSceneImporter> importer;
String ext = p_path.get_extension().to_lower();
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
-
- if (E->get().ptr() == p_exception)
+ if (E->get().ptr() == p_exception) {
continue;
+ }
List<String> extensions;
E->get()->get_extensions(&extensions);
for (List<String>::Element *F = extensions.front(); F; F = F->next()) {
-
if (F->get().to_lower() == ext) {
-
importer = E->get();
break;
}
}
- if (importer.is_valid())
+ if (importer.is_valid()) {
break;
+ }
}
ERR_FAIL_COND_V(!importer.is_valid(), nullptr);
@@ -1247,28 +1189,26 @@ Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneImporte
}
Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps) {
-
Ref<EditorSceneImporter> importer;
String ext = p_path.get_extension().to_lower();
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
-
- if (E->get().ptr() == p_exception)
+ if (E->get().ptr() == p_exception) {
continue;
+ }
List<String> extensions;
E->get()->get_extensions(&extensions);
for (List<String>::Element *F = extensions.front(); F; F = F->next()) {
-
if (F->get().to_lower() == ext) {
-
importer = E->get();
break;
}
}
- if (importer.is_valid())
+ if (importer.is_valid()) {
break;
+ }
}
ERR_FAIL_COND_V(!importer.is_valid(), nullptr);
@@ -1277,7 +1217,6 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito
}
Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
const String &src_path = p_source_file;
Ref<EditorSceneImporter> importer;
@@ -1287,21 +1226,19 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
progress.step(TTR("Importing Scene..."), 0);
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
-
List<String> extensions;
E->get()->get_extensions(&extensions);
for (List<String>::Element *F = extensions.front(); F; F = F->next()) {
-
if (F->get().to_lower() == ext) {
-
importer = E->get();
break;
}
}
- if (importer.is_valid())
+ if (importer.is_valid()) {
break;
+ }
}
ERR_FAIL_COND_V(!importer.is_valid(), ERR_FILE_UNRECOGNIZED);
@@ -1309,23 +1246,29 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
float fps = p_options["animation/fps"];
int import_flags = EditorSceneImporter::IMPORT_ANIMATION_DETECT_LOOP;
- if (!bool(p_options["animation/optimizer/remove_unused_tracks"]))
+ if (!bool(p_options["animation/optimizer/remove_unused_tracks"])) {
import_flags |= EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS;
+ }
- if (bool(p_options["animation/import"]))
+ if (bool(p_options["animation/import"])) {
import_flags |= EditorSceneImporter::IMPORT_ANIMATION;
+ }
- if (int(p_options["meshes/compress"]))
+ if (int(p_options["meshes/compress"])) {
import_flags |= EditorSceneImporter::IMPORT_USE_COMPRESSION;
+ }
- if (bool(p_options["meshes/ensure_tangents"]))
+ if (bool(p_options["meshes/ensure_tangents"])) {
import_flags |= EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS;
+ }
- if (int(p_options["materials/location"]) == 0)
+ if (int(p_options["materials/location"]) == 0) {
import_flags |= EditorSceneImporter::IMPORT_MATERIALS_IN_INSTANCES;
+ }
- if (bool(p_options["skins/use_named_skins"]))
+ if (bool(p_options["skins/use_named_skins"])) {
import_flags |= EditorSceneImporter::IMPORT_USE_NAMED_SKIN_BINDS;
+ }
Error err = OK;
List<String> missing_deps; // for now, not much will be done with this
@@ -1347,7 +1290,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Node *base_node = Object::cast_to<Node>(ClassDB::instance(root_type));
if (base_node) {
-
scene->replace_by(base_node);
memdelete(scene);
scene = base_node;
@@ -1364,10 +1306,11 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Object::cast_to<Node3D>(scene)->scale(Vector3(root_scale, root_scale, root_scale));
}
- if (p_options["nodes/root_name"] != "Scene Root")
+ if (p_options["nodes/root_name"] != "Scene Root") {
scene->set_name(p_options["nodes/root_name"]);
- else
+ } else {
scene->set_name(p_save_path.get_file().get_basename());
+ }
err = OK;
@@ -1389,7 +1332,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Array animation_clips;
{
-
int clip_count = p_options["animation/clips/amount"];
for (int i = 0; i < clip_count; i++) {
@@ -1424,7 +1366,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
String base_path = p_source_file.get_base_dir();
if (external_animations || external_materials || external_meshes || external_scenes) {
-
if (bool(p_options["external_files/store_in_subdir"])) {
String subdir_name = p_source_file.get_file().get_basename();
DirAccess *da = DirAccess::open(base_path);
@@ -1436,7 +1377,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
}
if (light_bake_mode == 2 /* || generate LOD */) {
-
Map<Ref<ArrayMesh>, Transform> meshes;
_find_meshes(scene, meshes);
@@ -1450,8 +1390,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
FileAccess *file = FileAccess::open(cache_file_path, FileAccess::READ, &err2);
if (err2) {
- if (file)
+ if (file) {
memdelete(file);
+ }
} else {
int cache_size = file->get_len();
cache_data.resize(cache_size);
@@ -1467,7 +1408,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
EditorProgress progress2("gen_lightmaps", TTR("Generating Lightmaps"), meshes.size());
int step = 0;
for (Map<Ref<ArrayMesh>, Transform>::Element *E = meshes.front(); E; E = E->next()) {
-
Ref<ArrayMesh> mesh = E->key();
String name = mesh->get_name();
if (name == "") { //should not happen but..
@@ -1484,7 +1424,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
if (err2 != OK) {
EditorNode::add_io_error("Mesh '" + name + "' failed lightmap generation. Please fix geometry.");
} else {
-
String hash = String::md5((unsigned char *)ret_cache_data);
used_unwraps.insert(hash, ret_cache_size);
@@ -1512,10 +1451,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
FileAccess *file = FileAccess::open(cache_file_path, FileAccess::WRITE, &err2);
if (err2) {
- if (file)
+ if (file) {
memdelete(file);
+ }
} else {
-
// Store number of entries
file->store_32(used_unwraps.size());
@@ -1567,7 +1506,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
if (!scr.is_valid()) {
EditorNode::add_io_error(TTR("Couldn't load post-import script:") + " " + post_import_script_path);
} else {
-
post_import_script = Ref<EditorScenePostImport>(memnew(EditorScenePostImport));
post_import_script->set_script(scr);
if (!post_import_script->get_script_instance()) {
@@ -1595,8 +1533,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
//save sub-scenes as instances!
for (int i = 0; i < scene->get_child_count(); i++) {
Node *child = scene->get_child(i);
- if (child->get_owner() != scene)
+ if (child->get_owner() != scene) {
continue; //not a real child probably created by scene type (ig, a scrollbar)
+ }
_replace_owner(child, scene, child);
String cn = String(child->get_name()).strip_edges().replace(".", "_").replace(":", "_");
@@ -1632,16 +1571,18 @@ ResourceImporterScene *ResourceImporterScene::singleton = nullptr;
ResourceImporterScene::ResourceImporterScene() {
singleton = this;
}
+
///////////////////////////////////////
uint32_t EditorSceneImporterESCN::get_import_flags() const {
return IMPORT_SCENE;
}
+
void EditorSceneImporterESCN::get_extensions(List<String> *r_extensions) const {
r_extensions->push_back("escn");
}
-Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
+Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
Error error;
Ref<PackedScene> ps = ResourceFormatLoaderText::singleton->load(p_path, p_path, &error);
ERR_FAIL_COND_V_MSG(!ps.is_valid(), nullptr, "Cannot load scene as text resource from path '" + p_path + "'.");
@@ -1651,6 +1592,7 @@ Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_fla
return scene;
}
+
Ref<Animation> EditorSceneImporterESCN::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
ERR_FAIL_V(Ref<Animation>());
}
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index f48f181951..34d96bbc44 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -39,7 +39,6 @@
class Material;
class EditorSceneImporter : public Reference {
-
GDCLASS(EditorSceneImporter, Reference);
protected:
@@ -73,7 +72,6 @@ public:
};
class EditorScenePostImport : public Reference {
-
GDCLASS(EditorScenePostImport, Reference);
String source_folder;
diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp
index f085341969..a2e80dfa18 100644
--- a/editor/import/resource_importer_shader_file.cpp
+++ b/editor/import/resource_importer_shader_file.cpp
@@ -38,32 +38,30 @@
#include "servers/rendering/rendering_device_binds.h"
String ResourceImporterShaderFile::get_importer_name() const {
-
return "glsl";
}
String ResourceImporterShaderFile::get_visible_name() const {
-
return "GLSL Shader File";
}
-void ResourceImporterShaderFile::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterShaderFile::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("glsl");
}
+
String ResourceImporterShaderFile::get_save_extension() const {
return "res";
}
String ResourceImporterShaderFile::get_resource_type() const {
-
return "RDShaderFile";
}
int ResourceImporterShaderFile::get_preset_count() const {
return 0;
}
-String ResourceImporterShaderFile::get_preset_name(int p_idx) const {
+String ResourceImporterShaderFile::get_preset_name(int p_idx) const {
return String();
}
@@ -73,6 +71,7 @@ void ResourceImporterShaderFile::get_import_options(List<ImportOption> *r_option
bool ResourceImporterShaderFile::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
return true;
}
+
static String _include_function(const String &p_path, void *userpointer) {
Error err;
@@ -91,7 +90,6 @@ static String _include_function(const String &p_path, void *userpointer) {
}
Error ResourceImporterShaderFile::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
/* STEP 1, Read shader code */
Error err;
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 111eab78b4..3a0e624a8f 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -37,7 +37,6 @@
#include "editor/editor_node.h"
void ResourceImporterTexture::_texture_reimport_roughness(const Ref<StreamTexture2D> &p_tex, const String &p_normal_path, RS::TextureDetectRoughnessChannel p_channel) {
-
MutexLock lock(singleton->mutex);
StringName path = p_tex->get_path();
@@ -52,7 +51,6 @@ void ResourceImporterTexture::_texture_reimport_roughness(const Ref<StreamTextur
}
void ResourceImporterTexture::_texture_reimport_3d(const Ref<StreamTexture2D> &p_tex) {
-
MutexLock lock(singleton->mutex);
StringName path = p_tex->get_path();
@@ -65,7 +63,6 @@ void ResourceImporterTexture::_texture_reimport_3d(const Ref<StreamTexture2D> &p
}
void ResourceImporterTexture::_texture_reimport_normal(const Ref<StreamTexture2D> &p_tex) {
-
MutexLock lock(singleton->mutex);
StringName path = p_tex->get_path();
@@ -78,7 +75,6 @@ void ResourceImporterTexture::_texture_reimport_normal(const Ref<StreamTexture2D
}
void ResourceImporterTexture::update_imports() {
-
if (EditorFileSystem::get_singleton()->is_scanning() || EditorFileSystem::get_singleton()->is_importing()) {
return; // do nothing for now
}
@@ -91,7 +87,6 @@ void ResourceImporterTexture::update_imports() {
}
for (Map<StringName, MakeInfo>::Element *E = make_flags.front(); E; E = E->next()) {
-
Ref<ConfigFile> cf;
cf.instance();
String src_path = String(E->key()) + ".import";
@@ -139,29 +134,26 @@ void ResourceImporterTexture::update_imports() {
}
String ResourceImporterTexture::get_importer_name() const {
-
return "texture";
}
String ResourceImporterTexture::get_visible_name() const {
-
return "Texture2D";
}
-void ResourceImporterTexture::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterTexture::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
+
String ResourceImporterTexture::get_save_extension() const {
return "stex";
}
String ResourceImporterTexture::get_resource_type() const {
-
return "StreamTexture2D";
}
bool ResourceImporterTexture::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
if (p_option == "compress/lossy_quality") {
int compress_mode = int(p_options["compress/mode"]);
if (compress_mode != COMPRESS_LOSSY && compress_mode != COMPRESS_VRAM_COMPRESSED) {
@@ -189,22 +181,20 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_option, cons
}
int ResourceImporterTexture::get_preset_count() const {
- return 4;
+ return 3;
}
-String ResourceImporterTexture::get_preset_name(int p_idx) const {
+String ResourceImporterTexture::get_preset_name(int p_idx) const {
static const char *preset_names[] = {
- "2D, Detect 3D",
+ "2D/3D (Auto-Detect)",
"2D",
- "2D Pixel",
- "3D"
+ "3D",
};
return preset_names[p_idx];
}
void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1));
@@ -226,10 +216,8 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options,
}
void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality) {
-
switch (p_compress_mode) {
case COMPRESS_LOSSLESS: {
-
f->store_32(StreamTexture2D::DATA_FORMAT_LOSSLESS);
f->store_16(p_image->get_width());
f->store_16(p_image->get_height());
@@ -237,7 +225,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
f->store_32(p_image->get_format());
for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) {
-
Vector<uint8_t> data = Image::lossless_packer(p_image->get_image_from_mipmap(i));
int data_len = data.size();
f->store_32(data_len);
@@ -248,7 +235,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
} break;
case COMPRESS_LOSSY: {
-
f->store_32(StreamTexture2D::DATA_FORMAT_LOSSY);
f->store_16(p_image->get_width());
f->store_16(p_image->get_height());
@@ -256,7 +242,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
f->store_32(p_image->get_format());
for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) {
-
Vector<uint8_t> data = Image::lossy_packer(p_image->get_image_from_mipmap(i), p_lossy_quality);
int data_len = data.size();
f->store_32(data_len);
@@ -266,7 +251,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
}
} break;
case COMPRESS_VRAM_COMPRESSED: {
-
Ref<Image> image = p_image->duplicate();
image->compress_from_channels(p_compress_format, p_channels, p_lossy_quality);
@@ -283,7 +267,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
f->store_buffer(r, dl);
} break;
case COMPRESS_VRAM_UNCOMPRESSED: {
-
f->store_32(StreamTexture2D::DATA_FORMAT_IMAGE);
f->store_16(p_image->get_width());
f->store_16(p_image->get_height());
@@ -298,7 +281,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
} break;
case COMPRESS_BASIS_UNIVERSAL: {
-
f->store_32(StreamTexture2D::DATA_FORMAT_BASIS_UNIVERSAL);
f->store_16(p_image->get_width());
f->store_16(p_image->get_height());
@@ -306,7 +288,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
f->store_32(p_image->get_format());
for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) {
-
Vector<uint8_t> data = Image::basis_universal_packer(p_image->get_image_from_mipmap(i), p_channels);
int data_len = data.size();
f->store_32(data_len);
@@ -319,7 +300,6 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
}
void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String &p_to_path, CompressMode p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, bool p_streamable, bool p_detect_3d, bool p_detect_roughness, bool p_detect_normal, bool p_force_normal, bool p_srgb_friendly, bool p_force_po2_for_compressed, uint32_t p_limit_mipmap, const Ref<Image> &p_normal, Image::RoughnessChannel p_roughness_channel) {
-
FileAccess *f = FileAccess::open(p_to_path, FileAccess::WRITE);
f->store_8('G');
f->store_8('S');
@@ -333,16 +313,21 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String
f->store_32(p_image->get_height());
uint32_t flags = 0;
- if (p_streamable)
+ if (p_streamable) {
flags |= StreamTexture2D::FORMAT_BIT_STREAM;
- if (p_mipmaps)
+ }
+ if (p_mipmaps) {
flags |= StreamTexture2D::FORMAT_BIT_HAS_MIPMAPS; //mipmaps bit
- if (p_detect_3d)
+ }
+ if (p_detect_3d) {
flags |= StreamTexture2D::FORMAT_BIT_DETECT_3D;
- if (p_detect_roughness)
+ }
+ if (p_detect_roughness) {
flags |= StreamTexture2D::FORMAT_BIT_DETECT_ROUGNESS;
- if (p_detect_normal)
+ }
+ if (p_detect_normal) {
flags |= StreamTexture2D::FORMAT_BIT_DETECT_NORMAL;
+ }
f->store_32(flags);
f->store_32(p_limit_mipmap);
@@ -396,7 +381,6 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String
}
Error ResourceImporterTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
CompressMode compress_mode = CompressMode(int(p_options["compress/mode"]));
float lossy = p_options["compress/lossy_quality"];
int pack_channels = p_options["compress/channel_pack"];
@@ -427,8 +411,9 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
Ref<Image> image;
image.instance();
Error err = ImageLoader::load_image(p_source_file, image, nullptr, hdr_as_srgb, scale);
- if (err != OK)
+ if (err != OK) {
return err;
+ }
Array formats_imported;
@@ -440,7 +425,6 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
image->resize(new_width, new_height, Image::INTERPOLATE_CUBIC);
} else {
-
int new_height = size_limit;
int new_width = image->get_width() * new_height / image->get_height();
@@ -501,7 +485,6 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
bool has_alpha = image->detect_alpha() != Image::ALPHA_NONE;
if (is_hdr && can_compress_hdr) {
-
if (has_alpha) {
//can compress hdr, but hdr with alpha is not compressible
if (hdr_compression == 2) {
@@ -542,7 +525,6 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) {
-
_save_stex(image, p_save_path + ".etc2.stex", compress_mode, lossy, Image::COMPRESS_ETC2, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
r_platform_variants->push_back("etc2");
formats_imported.push_back("etc2");
@@ -555,7 +537,6 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) {
-
_save_stex(image, p_save_path + ".pvrtc.stex", compress_mode, lossy, Image::COMPRESS_PVRTC4, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
r_platform_variants->push_back("pvrtc");
formats_imported.push_back("pvrtc");
@@ -589,7 +570,6 @@ const char *ResourceImporterTexture::compression_formats[] = {
nullptr
};
String ResourceImporterTexture::get_import_settings_string() const {
-
String s;
int index = 0;
@@ -606,7 +586,6 @@ String ResourceImporterTexture::get_import_settings_string() const {
}
bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) const {
-
//will become invalid if formats are missing to import
Dictionary metadata = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
@@ -644,7 +623,6 @@ bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) co
ResourceImporterTexture *ResourceImporterTexture::singleton = nullptr;
ResourceImporterTexture::ResourceImporterTexture() {
-
singleton = this;
StreamTexture2D::request_3d_callback = _texture_reimport_3d;
StreamTexture2D::request_roughness_callback = _texture_reimport_roughness;
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index da8ce3c0a8..12eb7f67c2 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -60,7 +60,6 @@ protected:
Mutex mutex;
struct MakeInfo {
-
int flags;
String normal_path_for_roughness;
RS::TextureDetectRoughnessChannel channel_for_roughness;
@@ -94,7 +93,6 @@ public:
enum Preset {
PRESET_DETECT,
PRESET_2D,
- PRESET_2D_PIXEL,
PRESET_3D,
};
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index 2765bb7fae..2423553d22 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -33,22 +33,21 @@
#include "atlas_import_failed.xpm"
#include "core/io/image_loader.h"
#include "core/io/resource_saver.h"
+#include "core/math/geometry_2d.h"
#include "core/os/file_access.h"
#include "editor/editor_atlas_packer.h"
#include "scene/resources/mesh.h"
#include "scene/resources/texture.h"
String ResourceImporterTextureAtlas::get_importer_name() const {
-
return "texture_atlas";
}
String ResourceImporterTextureAtlas::get_visible_name() const {
-
return "TextureAtlas";
}
-void ResourceImporterTextureAtlas::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterTextureAtlas::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
@@ -57,25 +56,22 @@ String ResourceImporterTextureAtlas::get_save_extension() const {
}
String ResourceImporterTextureAtlas::get_resource_type() const {
-
return "Texture2D";
}
bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
return true;
}
int ResourceImporterTextureAtlas::get_preset_count() const {
return 0;
}
-String ResourceImporterTextureAtlas::get_preset_name(int p_idx) const {
+String ResourceImporterTextureAtlas::get_preset_name(int p_idx) const {
return String();
}
void ResourceImporterTextureAtlas::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "atlas_file", PROPERTY_HINT_SAVE_FILE, "*.png"), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_mode", PROPERTY_HINT_ENUM, "Region,Mesh2D"), 0));
}
@@ -85,7 +81,6 @@ String ResourceImporterTextureAtlas::get_option_group_file() const {
}
Error ResourceImporterTextureAtlas::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
/* If this happens, it's because the atlas_file field was not filled, so just import a broken texture */
//use an xpm because it's size independent, the editor images are vector and size dependent
@@ -103,7 +98,6 @@ Error ResourceImporterTextureAtlas::import(const String &p_source_file, const St
}
static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_transposed, Ref<Image> p_image, const Ref<Image> &p_src_image) {
-
int width = p_image->get_width();
int height = p_image->get_height();
int src_width = p_src_image->get_width();
@@ -113,7 +107,6 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
int y[3];
for (int j = 0; j < 3; j++) {
-
x[j] = vertices[j].x;
y[j] = vertices[j].y;
}
@@ -137,10 +130,10 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
double dx_low = double(x[2] - x[1]) / (y[2] - y[1] + 1);
double xf = x[0];
double xt = x[0] + dx_upper; // if y[0] == y[1], special case
- for (int yi = y[0]; yi <= (y[2] > height - 1 ? height - 1 : y[2]); yi++) {
+ int max_y = MIN(y[2], height - p_offset.y - 1);
+ for (int yi = y[0]; yi <= max_y; yi++) {
if (yi >= 0) {
for (int xi = (xf > 0 ? int(xf) : 0); xi <= (xt < width ? xt : width - 1); xi++) {
-
int px = xi, py = yi;
int sx = px, sy = py;
sx = CLAMP(sx, 0, src_width - 1);
@@ -185,15 +178,15 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
}
}
xf += dx_far;
- if (yi < y[1])
+ if (yi < y[1]) {
xt += dx_upper;
- else
+ } else {
xt += dx_low;
+ }
}
}
Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) {
-
ERR_FAIL_COND_V(p_source_file_options.size() == 0, ERR_BUG); //should never happen
Vector<EditorAtlasPacker::Chart> charts;
@@ -203,7 +196,6 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
int idx = 0;
for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) {
-
PackData &pack_data = pack_data_files.write[idx];
const String &source = E->key();
const Map<StringName, Variant> &options = E->get();
@@ -218,7 +210,6 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
int mode = options["import_mode"];
if (mode == IMPORT_MODE_REGION) {
-
pack_data.is_mesh = false;
EditorAtlasPacker::Chart chart;
@@ -254,14 +245,12 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
Vector<Vector<Vector2>> polygons = bit_map->clip_opaque_to_polygons(Rect2(0, 0, image->get_width(), image->get_height()));
for (int j = 0; j < polygons.size(); j++) {
-
EditorAtlasPacker::Chart chart;
chart.vertices = polygons[j];
chart.can_transpose = true;
- Vector<int> poly = Geometry::triangulate_polygon(polygons[j]);
+ Vector<int> poly = Geometry2D::triangulate_polygon(polygons[j]);
for (int i = 0; i < poly.size(); i += 3) {
-
EditorAtlasPacker::Chart::Face f;
f.vertex[0] = poly[i + 0];
f.vertex[1] = poly[i + 1];
@@ -287,7 +276,6 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
new_atlas->create(atlas_width, atlas_height, false, Image::FORMAT_RGBA8);
for (int i = 0; i < pack_data_files.size(); i++) {
-
PackData &pack_data = pack_data_files.write[i];
for (int j = 0; j < pack_data.chart_pieces.size(); j++) {
@@ -324,7 +312,6 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
//save the images
idx = 0;
for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) {
-
PackData &pack_data = pack_data_files.write[idx];
Ref<Texture2D> texture;
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index 71f81051bc..cb669b4c89 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -39,29 +39,26 @@ const float TRIM_DB_LIMIT = -50;
const int TRIM_FADE_OUT_FRAMES = 500;
String ResourceImporterWAV::get_importer_name() const {
-
return "wav";
}
String ResourceImporterWAV::get_visible_name() const {
-
return "Microsoft WAV";
}
-void ResourceImporterWAV::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterWAV::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("wav");
}
+
String ResourceImporterWAV::get_save_extension() const {
return "sample";
}
String ResourceImporterWAV::get_resource_type() const {
-
return "AudioStreamSample";
}
bool ResourceImporterWAV::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
-
if (p_option == "force/max_rate_hz" && !bool(p_options["force/max_rate"])) {
return false;
}
@@ -72,13 +69,12 @@ bool ResourceImporterWAV::get_option_visibility(const String &p_option, const Ma
int ResourceImporterWAV::get_preset_count() const {
return 0;
}
-String ResourceImporterWAV::get_preset_name(int p_idx) const {
+String ResourceImporterWAV::get_preset_name(int p_idx) const {
return String();
}
void ResourceImporterWAV::get_import_options(List<ImportOption> *r_options, int p_preset) const {
-
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/8_bit"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/mono"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/max_rate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
@@ -90,7 +86,6 @@ void ResourceImporterWAV::get_import_options(List<ImportOption> *r_options, int
}
Error ResourceImporterWAV::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
-
/* STEP 1, READ WAVE FILE */
Error err;
@@ -104,7 +99,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
file->get_buffer((uint8_t *)&riff, 4); //RIFF
if (riff[0] != 'R' || riff[1] != 'I' || riff[2] != 'F' || riff[3] != 'F') {
-
file->close();
memdelete(file);
ERR_FAIL_V(ERR_FILE_UNRECOGNIZED);
@@ -120,7 +114,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
file->get_buffer((uint8_t *)&wave, 4); //RIFF
if (wave[0] != 'W' || wave[1] != 'A' || wave[2] != 'V' || wave[3] != 'E') {
-
file->close();
memdelete(file);
ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "Not a WAV file (no WAVE RIFF header).");
@@ -141,7 +134,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
Vector<float> data;
while (!file->eof_reached()) {
-
/* chunk */
char chunkID[4];
file->get_buffer((uint8_t *)&chunkID, 4); //RIFF
@@ -151,7 +143,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
uint32_t file_pos = file->get_position(); //save file pos, so we can skip to next chunk safely
if (file->eof_reached()) {
-
//ERR_PRINT("EOF REACH");
break;
}
@@ -242,7 +233,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
uint32_t s = 0;
for (int b = 0; b < (format_bits >> 3); b++) {
-
s |= ((uint32_t)file->get_8()) << (b * 8);
}
s <<= (32 - format_bits);
@@ -270,8 +260,9 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
* 22:38 06.07.2017 GMT
**/
- for (int i = 0; i < 10; i++)
+ for (int i = 0; i < 10; i++) {
file->get_32(); // i wish to know why should i do this... no doc!
+ }
// only read 0x00 (loop forward), 0x01 (loop ping-pong) and 0x02 (loop backward)
// Skip anything else because it's not supported, reserved for future uses or sampler specific
@@ -322,12 +313,10 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
Vector<float> new_data;
new_data.resize(new_data_frames * format_channels);
for (int c = 0; c < format_channels; c++) {
-
float frac = .0f;
int ipos = 0;
for (int i = 0; i < new_data_frames; i++) {
-
//simple cubic interpolation should be enough.
float mu = frac;
@@ -370,20 +359,17 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
bool normalize = p_options["edit/normalize"];
if (normalize) {
-
float max = 0;
for (int i = 0; i < data.size(); i++) {
-
float amp = Math::abs(data[i]);
- if (amp > max)
+ if (amp > max) {
max = amp;
+ }
}
if (max > 0) {
-
float mult = 1.0 / max;
for (int i = 0; i < data.size(); i++) {
-
data.write[i] *= mult;
}
}
@@ -392,7 +378,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
bool trim = p_options["edit/trim"];
if (trim && !loop && format_channels > 0) {
-
int first = 0;
int last = (frames / format_channels) - 1;
bool found = false;
@@ -420,7 +405,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
Vector<float> new_data;
new_data.resize((last - first) * format_channels);
for (int i = first; i < last; i++) {
-
float fadeOutMult = 1;
if (last - i < TRIM_FADE_OUT_FRAMES) {
@@ -440,7 +424,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
bool make_loop = p_options["edit/loop"];
if (make_loop && !loop) {
-
loop = AudioStreamSample::LOOP_FORWARD;
loop_begin = 0;
loop_end = frames;
@@ -450,7 +433,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
bool force_mono = p_options["force/mono"];
if (force_mono && format_channels == 2) {
-
Vector<float> new_data;
new_data.resize(data.size() / 2);
for (int i = 0; i < frames; i++) {
@@ -463,7 +445,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
bool force_8_bit = p_options["force/8_bit"];
if (force_8_bit) {
-
is16 = false;
}
@@ -471,12 +452,10 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
AudioStreamSample::Format dst_format;
if (compression == 1) {
-
dst_format = AudioStreamSample::FORMAT_IMA_ADPCM;
if (format_channels == 1) {
_compress_ima_adpcm(data, dst_data);
} else {
-
//byte interleave
Vector<float> left;
Vector<float> right;
@@ -510,7 +489,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
}
} else {
-
dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS;
dst_data.resize(data.size() * (is16 ? 2 : 1));
{
@@ -518,7 +496,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
int ds = data.size();
for (int i = 0; i < ds; i++) {
-
if (is16) {
int16_t v = CLAMP(data[i] * 32768, -32768, 32767);
encode_uint16(v, &w[i * 2]);
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index bc2f023e6b..3ff3aea9f4 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -72,8 +72,9 @@ public:
int datalen = p_data.size();
int datamax = datalen;
- if (datalen & 1)
+ if (datalen & 1) {
datalen++;
+ }
dst_data.resize(datalen / 2 + 4);
uint8_t *w = dst_data.ptrw();
@@ -96,10 +97,9 @@ public:
uint8_t nibble;
int16_t xm_sample;
- if (i >= datamax)
+ if (i >= datamax) {
xm_sample = 0;
- else {
-
+ } else {
xm_sample = CLAMP(in[i] * 32767.0, -32768, 32767);
/*
if (xm_sample==32767 || xm_sample==-32768)
@@ -121,9 +121,7 @@ public:
}
mask = 4;
while (mask) {
-
if (diff >= step) {
-
nibble |= mask;
diff -= step;
vpdiff += step;
@@ -133,10 +131,11 @@ public:
mask >>= 1;
};
- if (nibble & 8)
+ if (nibble & 8) {
prev -= vpdiff;
- else
+ } else {
prev += vpdiff;
+ }
if (prev > 32767) {
//printf("%i,xms %i, prev %i,diff %i, vpdiff %i, clip up %i\n",i,xm_sample,prev,diff,vpdiff,prev);
@@ -147,10 +146,11 @@ public:
}
step_idx += _ima_adpcm_index_table[nibble];
- if (step_idx < 0)
+ if (step_idx < 0) {
step_idx = 0;
- else if (step_idx > 88)
+ } else if (step_idx > 88) {
step_idx = 88;
+ }
if (i & 1) {
*out |= nibble << 4;
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 22f6aedeaa..8ab2e0aef1 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -44,7 +44,6 @@ public:
bool checking;
bool _set(const StringName &p_name, const Variant &p_value) {
-
if (values.has(p_name)) {
values[p_name] = p_value;
if (checking) {
@@ -58,7 +57,6 @@ public:
}
bool _get(const StringName &p_name, Variant &r_ret) const {
-
if (values.has(p_name)) {
r_ret = values[p_name];
return true;
@@ -67,10 +65,10 @@ public:
return false;
}
void _get_property_list(List<PropertyInfo> *p_list) const {
-
for (const List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
- if (!importer->get_option_visibility(E->get().name, values))
+ if (!importer->get_option_visibility(E->get().name, values)) {
continue;
+ }
PropertyInfo pi = E->get();
if (checking) {
pi.usage |= PROPERTY_USAGE_CHECKABLE;
@@ -92,7 +90,6 @@ public:
};
void ImportDock::set_edit_path(const String &p_path) {
-
Ref<ConfigFile> config;
config.instance();
Error err = config->load(p_path + ".import");
@@ -140,7 +137,6 @@ void ImportDock::set_edit_path(const String &p_path) {
}
void ImportDock::_update_options(const Ref<ConfigFile> &p_config) {
-
List<ResourceImporter::ImportOption> options;
params->importer->get_import_options(&options);
@@ -150,7 +146,6 @@ void ImportDock::_update_options(const Ref<ConfigFile> &p_config) {
params->checked.clear();
for (List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) {
-
params->properties.push_back(E->get().option);
if (p_config.is_valid() && p_config->has_section_key("params", E->get().option.name)) {
params->values[E->get().option.name] = p_config->get_value("params", E->get().option.name);
@@ -164,14 +159,12 @@ void ImportDock::_update_options(const Ref<ConfigFile> &p_config) {
}
void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
-
clear();
// Use the value that is repeated the most.
Map<String, Dictionary> value_frequency;
for (int i = 0; i < p_paths.size(); i++) {
-
Ref<ConfigFile> config;
config.instance();
Error err = config->load(p_paths[i] + ".import");
@@ -189,7 +182,6 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
config->get_section_keys("params", &keys);
for (List<String>::Element *E = keys.front(); E; E = E->next()) {
-
if (!value_frequency.has(E->get())) {
value_frequency[E->get()] = Dictionary();
}
@@ -215,11 +207,9 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
params->checked.clear();
for (List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) {
-
params->properties.push_back(E->get().option);
if (value_frequency.has(E->get().option.name)) {
-
Dictionary d = value_frequency[E->get().option.name];
int freq = 0;
List<Variant> v;
@@ -309,7 +299,6 @@ void ImportDock::_importer_selected(int i_idx) {
}
void ImportDock::_preset_selected(int p_idx) {
-
int item_id = preset->get_popup()->get_item_id(p_idx);
switch (item_id) {
@@ -325,7 +314,6 @@ void ImportDock::_preset_selected(int p_idx) {
_update_preset_menu();
} break;
case ITEM_LOAD_DEFAULT: {
-
ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name()));
Dictionary d = ProjectSettings::get_singleton()->get("importer_defaults/" + params->importer->get_importer_name());
@@ -344,13 +332,11 @@ void ImportDock::_preset_selected(int p_idx) {
params->update();
} break;
case ITEM_CLEAR_DEFAULT: {
-
ProjectSettings::get_singleton()->set("importer_defaults/" + params->importer->get_importer_name(), Variant());
ProjectSettings::get_singleton()->save();
_update_preset_menu();
} break;
default: {
-
List<ResourceImporter::ImportOption> options;
params->importer->get_import_options(&options, p_idx);
@@ -370,7 +356,6 @@ void ImportDock::_preset_selected(int p_idx) {
}
void ImportDock::clear() {
-
imported->set_text("");
import->set_disabled(true);
import_as->clear();
@@ -383,28 +368,27 @@ void ImportDock::clear() {
}
static bool _find_owners(EditorFileSystemDirectory *efsd, const String &p_path) {
-
- if (!efsd)
+ if (!efsd) {
return false;
+ }
for (int i = 0; i < efsd->get_subdir_count(); i++) {
-
if (_find_owners(efsd->get_subdir(i), p_path)) {
return true;
}
}
for (int i = 0; i < efsd->get_file_count(); i++) {
-
Vector<String> deps = efsd->get_file_deps(i);
- if (deps.find(p_path) != -1)
+ if (deps.find(p_path) != -1) {
return true;
+ }
}
return false;
}
-void ImportDock::_reimport_attempt() {
+void ImportDock::_reimport_attempt() {
bool need_restart = false;
bool used_in_resources = false;
for (int i = 0; i < params->paths.size(); i++) {
@@ -432,7 +416,6 @@ void ImportDock::_reimport_attempt() {
}
void ImportDock::_reimport_and_restart() {
-
EditorNode::get_singleton()->save_all_scenes();
EditorResourcePreview::get_singleton()->stop(); //don't try to re-create previews after import
_reimport();
@@ -440,9 +423,7 @@ void ImportDock::_reimport_and_restart() {
}
void ImportDock::_reimport() {
-
for (int i = 0; i < params->paths.size(); i++) {
-
Ref<ConfigFile> config;
config.instance();
Error err = config->load(params->paths[i] + ".import");
@@ -460,7 +441,9 @@ void ImportDock::_reimport() {
} else {
//override entirely
config->set_value("remap", "importer", importer_name);
- config->erase_section("params");
+ if (config->has_section("params")) {
+ config->erase_section("params");
+ }
for (List<PropertyInfo>::Element *E = params->properties.front(); E; E = E->next()) {
config->set_value("params", E->get().name, params->values[E->get().name]);
@@ -489,14 +472,11 @@ void ImportDock::_reimport() {
void ImportDock::_notification(int p_what) {
switch (p_what) {
-
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
imported->add_theme_style_override("normal", get_theme_stylebox("normal", "LineEdit"));
} break;
case NOTIFICATION_ENTER_TREE: {
-
import_opts->edit(params);
label_warning->add_theme_color_override("font_color", get_theme_color("warning_color", "Editor"));
} break;
@@ -510,20 +490,18 @@ void ImportDock::_property_toggled(const StringName &p_prop, bool p_checked) {
params->checked.erase(p_prop);
}
}
-void ImportDock::_bind_methods() {
+void ImportDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_reimport"), &ImportDock::_reimport);
}
void ImportDock::initialize_import_options() const {
-
ERR_FAIL_COND(!import_opts || !params);
import_opts->edit(params);
}
ImportDock::ImportDock() {
-
set_name("Import");
imported = memnew(Label);
imported->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox("normal", "LineEdit"));
@@ -572,6 +550,5 @@ ImportDock::ImportDock() {
}
ImportDock::~ImportDock() {
-
memdelete(params);
}
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 3715547bdc..2b26851140 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -68,14 +68,16 @@ void InspectorDock::_menu_option(int p_option) {
case OBJECT_COPY_PARAMS: {
editor_data->apply_changes_in_editors();
- if (current)
+ if (current) {
editor_data->copy_object_params(current);
+ }
} break;
case OBJECT_PASTE_PARAMS: {
editor_data->apply_changes_in_editors();
- if (current)
+ if (current) {
editor_data->paste_object_params(current);
+ }
} break;
case OBJECT_UNIQUE_RESOURCES: {
@@ -85,18 +87,16 @@ void InspectorDock::_menu_option(int p_option) {
current->get_property_list(&props);
Map<RES, RES> duplicates;
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
-
- if (!(E->get().usage & PROPERTY_USAGE_STORAGE))
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
continue;
+ }
Variant v = current->get(E->get().name);
if (v.is_ref()) {
REF ref = v;
if (ref.is_valid()) {
-
RES res = ref;
if (res.is_valid()) {
-
if (!duplicates.has(res)) {
duplicates[res] = res->duplicate();
}
@@ -172,10 +172,11 @@ void InspectorDock::_save_resource(bool save_as) const {
RES current_res = RES(Object::cast_to<Resource>(current_obj));
- if (save_as)
+ if (save_as) {
editor->save_resource_as(current_res);
- else
+ } else {
editor->save_resource(current_res);
+ }
}
void InspectorDock::_unref_resource() const {
@@ -217,7 +218,6 @@ void InspectorDock::_prepare_history() {
Ref<Texture2D> base_icon = get_theme_icon("Object", "EditorIcons");
Set<ObjectID> already;
for (int i = editor_history->get_history_len() - 1; i >= history_to; i--) {
-
ObjectID id = editor_history->get_history_obj(i);
Object *obj = ObjectDB::get_instance(id);
if (!obj || already.has(id)) {
@@ -237,9 +237,9 @@ void InspectorDock::_prepare_history() {
String text;
if (Object::cast_to<Resource>(obj)) {
Resource *r = Object::cast_to<Resource>(obj);
- if (r->get_path().is_resource_file())
+ if (r->get_path().is_resource_file()) {
text = r->get_path().get_file();
- else if (r->get_name() != String()) {
+ } else if (r->get_name() != String()) {
text = r->get_name();
} else {
text = r->get_class();
@@ -263,8 +263,9 @@ void InspectorDock::_select_history(int p_idx) {
//push it to the top, it is not correct, but it's more useful
ObjectID id = EditorNode::get_singleton()->get_editor_history()->get_history_obj(p_idx);
Object *obj = ObjectDB::get_instance(id);
- if (!obj)
+ if (!obj) {
return;
+ }
editor->push_item(obj);
}
@@ -280,21 +281,25 @@ void InspectorDock::_resource_created() {
}
void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) {
- if (p_res.is_null())
+ if (p_res.is_null()) {
return;
+ }
RES r = p_res;
editor->push_item(r.operator->(), p_property);
}
void InspectorDock::_edit_forward() {
- if (EditorNode::get_singleton()->get_editor_history()->next())
+ if (EditorNode::get_singleton()->get_editor_history()->next()) {
editor->edit_current();
+ }
}
+
void InspectorDock::_edit_back() {
EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
- if ((current && editor_history->previous()) || editor_history->get_path_size() == 1)
+ if ((current && editor_history->previous()) || editor_history->get_path_size() == 1) {
editor->edit_current();
+ }
}
void InspectorDock::_menu_collapseall() {
@@ -311,8 +316,9 @@ void InspectorDock::_property_keyed(const String &p_keyed, const Variant &p_valu
void InspectorDock::_transform_keyed(Object *sp, const String &p_sub, const Transform &p_key) {
Node3D *s = Object::cast_to<Node3D>(sp);
- if (!s)
+ if (!s) {
return;
+ }
AnimationPlayerEditor::singleton->get_track_editor()->insert_transform_key(s, p_sub, p_key);
}
@@ -342,7 +348,6 @@ void InspectorDock::_notification(int p_what) {
}
void InspectorDock::_bind_methods() {
-
ClassDB::bind_method("update_keying", &InspectorDock::update_keying);
ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); // Still used by some connect_compat.
@@ -376,7 +381,6 @@ void InspectorDock::clear() {
}
void InspectorDock::update(Object *p_object) {
-
EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
backward_button->set_disabled(editor_history->is_at_beginning());
forward_button->set_disabled(editor_history->is_at_end());
@@ -442,12 +446,10 @@ void InspectorDock::update(Object *p_object) {
p_object->get_method_list(&methods);
if (!methods.empty()) {
-
bool found = false;
List<MethodInfo>::Element *I = methods.front();
int i = 0;
while (I) {
-
if (I->get().flags & METHOD_FLAG_EDITOR) {
if (!found) {
p->add_separator();
@@ -469,13 +471,10 @@ void InspectorDock::update_keying() {
bool valid = false;
if (AnimationPlayerEditor::singleton->get_track_editor()->has_keying()) {
-
EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
if (editor_history->get_path_size() >= 1) {
-
Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0));
if (Object::cast_to<Node>(obj)) {
-
valid = true;
}
}
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index 61b3239169..2a99a7db45 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -47,7 +47,6 @@
class EditorNode;
class InspectorDock : public VBoxContainer {
-
GDCLASS(InspectorDock, VBoxContainer);
enum MenuOptions {
diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp
index 7bc67b54c1..1077aca7b3 100644
--- a/editor/multi_node_edit.cpp
+++ b/editor/multi_node_edit.cpp
@@ -39,8 +39,9 @@ bool MultiNodeEdit::_set(const StringName &p_name, const Variant &p_value) {
bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value, const String &p_field) {
Node *es = EditorNode::get_singleton()->get_edited_scene();
- if (!es)
+ if (!es) {
return false;
+ }
String name = p_name;
@@ -52,13 +53,14 @@ bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value,
ur->create_action(TTR("MultiNode Set") + " " + String(name), UndoRedo::MERGE_ENDS);
for (const List<NodePath>::Element *E = nodes.front(); E; E = E->next()) {
-
- if (!es->has_node(E->get()))
+ if (!es->has_node(E->get())) {
continue;
+ }
Node *n = es->get_node(E->get());
- if (!n)
+ if (!n) {
continue;
+ }
if (p_value.get_type() == Variant::NODE_PATH) {
Node *tonode = n->get_node(p_value);
@@ -87,8 +89,9 @@ bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value,
bool MultiNodeEdit::_get(const StringName &p_name, Variant &r_ret) const {
Node *es = EditorNode::get_singleton()->get_edited_scene();
- if (!es)
+ if (!es) {
return false;
+ }
String name = p_name;
if (name == "scripts") { // script set is intercepted at object level (check Variant Object::get() ) ,so use a different name
@@ -96,18 +99,20 @@ bool MultiNodeEdit::_get(const StringName &p_name, Variant &r_ret) const {
}
for (const List<NodePath>::Element *E = nodes.front(); E; E = E->next()) {
-
- if (!es->has_node(E->get()))
+ if (!es->has_node(E->get())) {
continue;
+ }
const Node *n = es->get_node(E->get());
- if (!n)
+ if (!n) {
continue;
+ }
bool found;
r_ret = n->get(name, &found);
- if (found)
+ if (found) {
return true;
+ }
}
return false;
@@ -117,29 +122,31 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
HashMap<String, PLData> usage;
Node *es = EditorNode::get_singleton()->get_edited_scene();
- if (!es)
+ if (!es) {
return;
+ }
int nc = 0;
List<PLData *> data_list;
for (const List<NodePath>::Element *E = nodes.front(); E; E = E->next()) {
-
- if (!es->has_node(E->get()))
+ if (!es->has_node(E->get())) {
continue;
+ }
Node *n = es->get_node(E->get());
- if (!n)
+ if (!n) {
continue;
+ }
List<PropertyInfo> plist;
n->get_property_list(&plist, true);
for (List<PropertyInfo>::Element *F = plist.front(); F; F = F->next()) {
-
- if (F->get().name == "script")
+ if (F->get().name == "script") {
continue; //added later manually, since this is intercepted before being set (check Variant Object::get() )
+ }
if (!usage.has(F->get().name)) {
PLData pld;
pld.uses = 0;
@@ -149,15 +156,15 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
}
// Make sure only properties with the same exact PropertyInfo data will appear
- if (usage[F->get().name].info == F->get())
+ if (usage[F->get().name].info == F->get()) {
usage[F->get().name].uses++;
+ }
}
nc++;
}
for (List<PLData *>::Element *E = data_list.front(); E; E = E->next()) {
-
if (nc == E->get()->uses) {
p_list->push_back(E->get()->info);
}
diff --git a/editor/multi_node_edit.h b/editor/multi_node_edit.h
index d3eefafcec..694dad76f1 100644
--- a/editor/multi_node_edit.h
+++ b/editor/multi_node_edit.h
@@ -34,7 +34,6 @@
#include "scene/main/node.h"
class MultiNodeEdit : public Reference {
-
GDCLASS(MultiNodeEdit, Reference);
List<NodePath> nodes;
diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp
index cb0d9fa02b..2ddcf3d877 100644
--- a/editor/node_3d_editor_gizmos.cpp
+++ b/editor/node_3d_editor_gizmos.cpp
@@ -30,7 +30,8 @@
#include "node_3d_editor_gizmos.h"
-#include "core/math/geometry.h"
+#include "core/math/geometry_2d.h"
+#include "core/math/geometry_3d.h"
#include "core/math/quick_hull.h"
#include "scene/3d/audio_stream_player_3d.h"
#include "scene/3d/baked_lightmap.h"
@@ -69,26 +70,27 @@
#define HANDLE_HALF_SIZE 9.5
bool EditorNode3DGizmo::is_editable() const {
-
ERR_FAIL_COND_V(!spatial_node, false);
Node *edited_root = spatial_node->get_tree()->get_edited_scene_root();
- if (spatial_node == edited_root)
+ if (spatial_node == edited_root) {
return true;
- if (spatial_node->get_owner() == edited_root)
+ }
+ if (spatial_node->get_owner() == edited_root) {
return true;
+ }
- if (edited_root->is_editable_instance(spatial_node->get_owner()))
+ if (edited_root->is_editable_instance(spatial_node->get_owner())) {
return true;
+ }
return false;
}
void EditorNode3DGizmo::clear() {
-
for (int i = 0; i < instances.size(); i++) {
-
- if (instances[i].instance.is_valid())
+ if (instances[i].instance.is_valid()) {
RS::get_singleton()->free(instances[i].instance);
+ }
}
billboard_handle = false;
@@ -100,7 +102,6 @@ void EditorNode3DGizmo::clear() {
}
void EditorNode3DGizmo::redraw() {
-
if (get_script_instance() && get_script_instance()->has_method("redraw")) {
get_script_instance()->call("redraw");
return;
@@ -111,7 +112,6 @@ void EditorNode3DGizmo::redraw() {
}
String EditorNode3DGizmo::get_handle_name(int p_idx) const {
-
if (get_script_instance() && get_script_instance()->has_method("get_handle_name")) {
return get_script_instance()->call("get_handle_name", p_idx);
}
@@ -121,7 +121,6 @@ String EditorNode3DGizmo::get_handle_name(int p_idx) const {
}
bool EditorNode3DGizmo::is_handle_highlighted(int p_idx) const {
-
if (get_script_instance() && get_script_instance()->has_method("is_handle_highlighted")) {
return get_script_instance()->call("is_handle_highlighted", p_idx);
}
@@ -131,7 +130,6 @@ bool EditorNode3DGizmo::is_handle_highlighted(int p_idx) const {
}
Variant EditorNode3DGizmo::get_handle_value(int p_idx) {
-
if (get_script_instance() && get_script_instance()->has_method("get_handle_value")) {
return get_script_instance()->call("get_handle_value", p_idx);
}
@@ -141,7 +139,6 @@ Variant EditorNode3DGizmo::get_handle_value(int p_idx) {
}
void EditorNode3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) {
-
if (get_script_instance() && get_script_instance()->has_method("set_handle")) {
get_script_instance()->call("set_handle", p_idx, p_camera, p_point);
return;
@@ -152,7 +149,6 @@ void EditorNode3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &
}
void EditorNode3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_cancel) {
-
if (get_script_instance() && get_script_instance()->has_method("commit_handle")) {
get_script_instance()->call("commit_handle", p_idx, p_restore, p_cancel);
return;
@@ -163,27 +159,25 @@ void EditorNode3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool
}
void EditorNode3DGizmo::set_spatial_node(Node3D *p_node) {
-
ERR_FAIL_NULL(p_node);
spatial_node = p_node;
}
void EditorNode3DGizmo::Instance::create_instance(Node3D *p_base, bool p_hidden) {
-
instance = RS::get_singleton()->instance_create2(mesh->get_rid(), p_base->get_world_3d()->get_scenario());
RS::get_singleton()->instance_attach_object_instance_id(instance, p_base->get_instance_id());
if (skin_reference.is_valid()) {
RS::get_singleton()->instance_attach_skeleton(instance, skin_reference->get_skeleton());
}
- if (extra_margin)
+ if (extra_margin) {
RS::get_singleton()->instance_set_extra_visibility_margin(instance, 1);
+ }
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(instance, RS::SHADOW_CASTING_SETTING_OFF);
int layer = p_hidden ? 0 : 1 << Node3DEditorViewport::GIZMO_EDIT_LAYER;
RS::get_singleton()->instance_set_layer_mask(instance, layer); //gizmos are 26
}
void EditorNode3DGizmo::add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard, const Ref<SkinReference> &p_skin_reference, const Ref<Material> &p_material) {
-
ERR_FAIL_COND(!spatial_node);
Instance ins;
@@ -221,10 +215,11 @@ void EditorNode3DGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mate
{
Color *w = color.ptrw();
for (int i = 0; i < p_lines.size(); i++) {
- if (is_selected())
+ if (is_selected()) {
w[i] = Color(1, 1, 1, 0.8) * p_modulate;
- else
+ } else {
w[i] = Color(1, 1, 1, 0.2) * p_modulate;
+ }
}
}
@@ -236,7 +231,6 @@ void EditorNode3DGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mate
if (p_billboard) {
float md = 0;
for (int i = 0; i < p_lines.size(); i++) {
-
md = MAX(0, p_lines[i].length());
}
if (md) {
@@ -255,7 +249,6 @@ void EditorNode3DGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mate
}
void EditorNode3DGizmo::add_unscaled_billboard(const Ref<Material> &p_material, float p_scale, const Color &p_modulate) {
-
ERR_FAIL_COND(!spatial_node);
Instance ins;
@@ -297,7 +290,6 @@ void EditorNode3DGizmo::add_unscaled_billboard(const Ref<Material> &p_material,
float md = 0;
for (int i = 0; i < vs.size(); i++) {
-
md = MAX(0, vs[i].length());
}
if (md) {
@@ -325,21 +317,19 @@ void EditorNode3DGizmo::add_collision_triangles(const Ref<TriangleMesh> &p_tmesh
}
void EditorNode3DGizmo::add_collision_segments(const Vector<Vector3> &p_lines) {
-
int from = collision_segments.size();
collision_segments.resize(from + p_lines.size());
for (int i = 0; i < p_lines.size(); i++) {
-
collision_segments.write[from + i] = p_lines[i];
}
}
void EditorNode3DGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref<Material> &p_material, bool p_billboard, bool p_secondary) {
-
billboard_handle = p_billboard;
- if (!is_selected() || !is_editable())
+ if (!is_selected() || !is_editable()) {
return;
+ }
ERR_FAIL_COND(!spatial_node);
@@ -355,13 +345,14 @@ void EditorNode3DGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref<
colors.resize(p_handles.size());
Color *w = colors.ptrw();
for (int i = 0; i < p_handles.size(); i++) {
-
Color col(1, 1, 1, 1);
- if (is_handle_highlighted(i))
+ if (is_handle_highlighted(i)) {
col = Color(0, 0, 1, 0.9);
+ }
- if (Node3DEditor::get_singleton()->get_over_gizmo_handle() != i)
+ if (Node3DEditor::get_singleton()->get_over_gizmo_handle() != i) {
col.a = 0.8;
+ }
w[i] = col;
}
@@ -373,7 +364,6 @@ void EditorNode3DGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref<
if (p_billboard) {
float md = 0;
for (int i = 0; i < p_handles.size(); i++) {
-
md = MAX(0, p_handles[i].length());
}
if (md) {
@@ -396,7 +386,6 @@ void EditorNode3DGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref<
handles.write[i + chs] = p_handles[i];
}
} else {
-
int chs = secondary_handles.size();
secondary_handles.resize(chs + p_handles.size());
for (int i = 0; i < p_handles.size(); i++) {
@@ -428,12 +417,12 @@ void EditorNode3DGizmo::add_solid_box(Ref<Material> &p_material, Vector3 p_size,
}
bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector<Plane> &p_frustum) {
-
ERR_FAIL_COND_V(!spatial_node, false);
ERR_FAIL_COND_V(!valid, false);
- if (hidden && !gizmo_plugin->is_selectable_when_hidden())
+ if (hidden && !gizmo_plugin->is_selectable_when_hidden()) {
return false;
+ }
if (selectable_icon_size > 0.0f) {
Vector3 origin = spatial_node->get_global_transform().get_origin();
@@ -444,7 +433,6 @@ bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector
bool any_out = false;
for (int j = 0; j < fc; j++) {
-
if (p[j].is_point_over(origin)) {
any_out = true;
break;
@@ -455,7 +443,6 @@ bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector
}
if (collision_segments.size()) {
-
const Plane *p = p_frustum.ptr();
int fc = p_frustum.size();
@@ -472,12 +459,14 @@ bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector
break;
}
}
- if (any_out)
+ if (any_out) {
break;
+ }
}
- if (!any_out)
+ if (!any_out) {
return true;
+ }
}
if (collision_mesh.is_valid()) {
@@ -494,7 +483,7 @@ bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector
transformed_frustum.push_back(it.xform(p_frustum[i]));
}
- Vector<Vector3> convex_points = Geometry::compute_convex_mesh_points(p_frustum.ptr(), p_frustum.size());
+ Vector<Vector3> convex_points = Geometry3D::compute_convex_mesh_points(p_frustum.ptr(), p_frustum.size());
if (collision_mesh->inside_convex_shape(transformed_frustum.ptr(), transformed_frustum.size(), convex_points.ptr(), convex_points.size(), mesh_scale)) {
return true;
}
@@ -504,15 +493,14 @@ bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector
}
bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, Vector3 &r_pos, Vector3 &r_normal, int *r_gizmo_handle, bool p_sec_first) {
-
ERR_FAIL_COND_V(!spatial_node, false);
ERR_FAIL_COND_V(!valid, false);
- if (hidden && !gizmo_plugin->is_selectable_when_hidden())
+ if (hidden && !gizmo_plugin->is_selectable_when_hidden()) {
return false;
+ }
if (r_gizmo_handle && !hidden) {
-
Transform t = spatial_node->get_global_transform();
if (billboard_handle) {
t.set_look_at(t.origin, t.origin - p_camera->get_transform().basis.get_axis(2), p_camera->get_transform().basis.get_axis(1));
@@ -522,15 +510,12 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
int idx = -1;
for (int i = 0; i < secondary_handles.size(); i++) {
-
Vector3 hpos = t.xform(secondary_handles[i]);
Vector2 p = p_camera->unproject_position(hpos);
if (p.distance_to(p_point) < HANDLE_HALF_SIZE) {
-
real_t dp = p_camera->get_transform().origin.distance_to(hpos);
if (dp < min_d) {
-
r_pos = t.xform(hpos);
r_normal = p_camera->get_transform().basis.get_axis(2);
min_d = dp;
@@ -540,7 +525,6 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
}
if (p_sec_first && idx != -1) {
-
*r_gizmo_handle = idx;
return true;
}
@@ -548,15 +532,12 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
min_d = 1e20;
for (int i = 0; i < handles.size(); i++) {
-
Vector3 hpos = t.xform(handles[i]);
Vector2 p = p_camera->unproject_position(hpos);
if (p.distance_to(p_point) < HANDLE_HALF_SIZE) {
-
real_t dp = p_camera->get_transform().origin.distance_to(hpos);
if (dp < min_d) {
-
r_pos = t.xform(hpos);
r_normal = p_camera->get_transform().basis.get_axis(2);
min_d = dp;
@@ -572,7 +553,6 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
}
if (selectable_icon_size > 0.0f) {
-
Transform t = spatial_node->get_global_transform();
Vector3 camera_position = p_camera->get_camera_transform().origin;
if (camera_position.distance_squared_to(t.origin) > 0.01) {
@@ -618,7 +598,6 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
}
if (collision_segments.size()) {
-
Plane camp(p_camera->get_transform().origin, (-p_camera->get_transform().basis.get_axis(2)).normalized());
int vc = collision_segments.size();
@@ -632,23 +611,20 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
float cpd = 1e20;
for (int i = 0; i < vc / 2; i++) {
-
Vector3 a = t.xform(vptr[i * 2 + 0]);
Vector3 b = t.xform(vptr[i * 2 + 1]);
Vector2 s[2];
s[0] = p_camera->unproject_position(a);
s[1] = p_camera->unproject_position(b);
- Vector2 p = Geometry::get_closest_point_to_segment_2d(p_point, s);
+ Vector2 p = Geometry2D::get_closest_point_to_segment(p_point, s);
float pd = p.distance_to(p_point);
if (pd < cpd) {
-
float d = s[0].distance_to(s[1]);
Vector3 tcp;
if (d > 0) {
-
float d2 = s[0].distance_to(p) / d;
tcp = a + (b - a) * d2;
@@ -656,15 +632,15 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
tcp = a;
}
- if (camp.distance_to(tcp) < p_camera->get_znear())
+ if (camp.distance_to(tcp) < p_camera->get_znear()) {
continue;
+ }
cp = tcp;
cpd = pd;
}
}
if (cpd < 8) {
-
r_pos = cp;
r_normal = -p_camera->project_ray_normal(p_point);
return true;
@@ -686,7 +662,6 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
Vector3 rpos, rnorm;
if (collision_mesh->intersect_ray(ray_from, ray_dir, rpos, rnorm)) {
-
r_pos = gt.xform(rpos);
r_normal = gt.basis.xform(rnorm).normalized();
return true;
@@ -697,13 +672,11 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
}
void EditorNode3DGizmo::create() {
-
ERR_FAIL_COND(!spatial_node);
ERR_FAIL_COND(valid);
valid = true;
for (int i = 0; i < instances.size(); i++) {
-
instances.write[i].create_instance(spatial_node, hidden);
}
@@ -711,7 +684,6 @@ void EditorNode3DGizmo::create() {
}
void EditorNode3DGizmo::transform() {
-
ERR_FAIL_COND(!spatial_node);
ERR_FAIL_COND(!valid);
for (int i = 0; i < instances.size(); i++) {
@@ -720,14 +692,13 @@ void EditorNode3DGizmo::transform() {
}
void EditorNode3DGizmo::free() {
-
ERR_FAIL_COND(!spatial_node);
ERR_FAIL_COND(!valid);
for (int i = 0; i < instances.size(); i++) {
-
- if (instances[i].instance.is_valid())
+ if (instances[i].instance.is_valid()) {
RS::get_singleton()->free(instances[i].instance);
+ }
instances.write[i].instance = RID();
}
@@ -749,7 +720,6 @@ void EditorNode3DGizmo::set_plugin(EditorNode3DGizmoPlugin *p_plugin) {
}
void EditorNode3DGizmo::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("add_lines", "lines", "material", "billboard", "modulate"), &EditorNode3DGizmo::add_lines, DEFVAL(false), DEFVAL(Color(1, 1, 1)));
ClassDB::bind_method(D_METHOD("add_mesh", "mesh", "billboard", "skeleton", "material"), &EditorNode3DGizmo::add_mesh, DEFVAL(false), DEFVAL(Ref<SkinReference>()), DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("add_collision_segments", "segments"), &EditorNode3DGizmo::add_collision_segments);
@@ -789,14 +759,13 @@ EditorNode3DGizmo::EditorNode3DGizmo() {
}
EditorNode3DGizmo::~EditorNode3DGizmo() {
-
- if (gizmo_plugin != nullptr)
+ if (gizmo_plugin != nullptr) {
gizmo_plugin->unregister_gizmo(this);
+ }
clear();
}
Vector3 EditorNode3DGizmo::get_handle_pos(int p_idx) const {
-
ERR_FAIL_INDEX_V(p_idx, handles.size(), Vector3());
return handles[p_idx];
@@ -805,7 +774,6 @@ Vector3 EditorNode3DGizmo::get_handle_pos(int p_idx) const {
//// light gizmo
Light3DGizmoPlugin::Light3DGizmoPlugin() {
-
// Enable vertex colors for the materials below as the gizmo color depends on the light color.
create_material("lines_primary", Color(1, 1, 1), false, false, true);
create_material("lines_secondary", Color(1, 1, 1, 0.35), false, false, true);
@@ -832,40 +800,39 @@ int Light3DGizmoPlugin::get_priority() const {
}
String Light3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
- if (p_idx == 0)
+ if (p_idx == 0) {
return "Radius";
- else
+ } else {
return "Aperture";
+ }
}
Variant Light3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
- if (p_idx == 0)
+ if (p_idx == 0) {
return light->get_param(Light3D::PARAM_RANGE);
- if (p_idx == 1)
+ }
+ if (p_idx == 1) {
return light->get_param(Light3D::PARAM_SPOT_ANGLE);
+ }
return Variant();
}
static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vector3 &p_to, float p_arc_radius, const Transform &p_arc_xform) {
-
//bleh, discrete is simpler
static const int arc_test_points = 64;
float min_d = 1e20;
Vector3 min_p;
for (int i = 0; i < arc_test_points; i++) {
-
float a = i * Math_PI * 0.5 / arc_test_points;
float an = (i + 1) * Math_PI * 0.5 / arc_test_points;
Vector3 p = Vector3(Math::cos(a), 0, -Math::sin(a)) * p_arc_radius;
Vector3 n = Vector3(Math::cos(an), 0, -Math::sin(an)) * p_arc_radius;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(p, n, p_from, p_to, ra, rb);
+ Geometry3D::get_closest_points_between_segments(p, n, p_from, p_to, ra, rb);
float d = ra.distance_to(rb);
if (d < min_d) {
@@ -880,7 +847,6 @@ static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vec
}
void Light3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
-
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
Transform gt = light->get_global_transform();
Transform gi = gt.affine_inverse();
@@ -890,27 +856,25 @@ void Light3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camer
Vector3 s[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
if (p_idx == 0) {
-
if (Object::cast_to<SpotLight3D>(light)) {
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), Vector3(0, 0, -4096), s[0], s[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), Vector3(0, 0, -4096), s[0], s[1], ra, rb);
float d = -ra.z;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d <= 0) // Equal is here for negative zero.
+ if (d <= 0) { // Equal is here for negative zero.
d = 0;
+ }
light->set_param(Light3D::PARAM_RANGE, d);
} else if (Object::cast_to<OmniLight3D>(light)) {
-
Plane cp = Plane(gt.origin, p_camera->get_transform().basis.get_axis(2));
Vector3 inters;
if (cp.intersects_ray(ray_from, ray_dir, &inters)) {
-
float r = inters.distance_to(gt.origin);
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
r = Math::stepify(r, Node3DEditor::get_singleton()->get_translate_snap());
@@ -921,28 +885,23 @@ void Light3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camer
}
} else if (p_idx == 1) {
-
float a = _find_closest_angle_to_half_pi_arc(s[0], s[1], light->get_param(Light3D::PARAM_RANGE), gt);
light->set_param(Light3D::PARAM_SPOT_ANGLE, CLAMP(a, 0.01, 89.99));
}
}
void Light3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
if (p_cancel) {
-
light->set_param(p_idx == 0 ? Light3D::PARAM_RANGE : Light3D::PARAM_SPOT_ANGLE, p_restore);
} else if (p_idx == 0) {
-
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light, "set_param", Light3D::PARAM_RANGE, light->get_param(Light3D::PARAM_RANGE));
ur->add_undo_method(light, "set_param", Light3D::PARAM_RANGE, p_restore);
ur->commit_action();
} else if (p_idx == 1) {
-
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light, "set_param", Light3D::PARAM_SPOT_ANGLE, light->get_param(Light3D::PARAM_SPOT_ANGLE));
@@ -952,7 +911,6 @@ void Light3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, co
}
void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
Color color = light->get_color();
@@ -962,7 +920,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
if (Object::cast_to<DirectionalLight3D>(light)) {
-
Ref<Material> material = get_material("lines_primary", p_gizmo);
Ref<Material> icon = get_material("light_directional_icon", p_gizmo);
@@ -1000,7 +957,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<OmniLight3D>(light)) {
-
// Use both a billboard circle and 3 non-billboard circles for a better sphere-like representation
const Ref<Material> lines_material = get_material("lines_secondary", p_gizmo);
const Ref<Material> lines_billboard_material = get_material("lines_billboard", p_gizmo);
@@ -1012,7 +968,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> points_billboard;
for (int i = 0; i < 120; i++) {
-
// Create a circle
const float ra = Math::deg2rad((float)(i * 3));
const float rb = Math::deg2rad((float)((i + 1) * 3));
@@ -1042,7 +997,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<SpotLight3D>(light)) {
-
const Ref<Material> material_primary = get_material("lines_primary", p_gizmo);
const Ref<Material> material_secondary = get_material("lines_secondary", p_gizmo);
const Ref<Material> icon = get_material("light_spot_icon", p_gizmo);
@@ -1056,7 +1010,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
float d = r * Math::cos(Math::deg2rad(sl->get_param(Light3D::PARAM_SPOT_ANGLE)));
for (int i = 0; i < 120; i++) {
-
// Draw a circle
const float ra = Math::deg2rad((float)(i * 3));
const float rb = Math::deg2rad((float)((i + 1) * 3));
@@ -1095,7 +1048,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
//// player gizmo
AudioStreamPlayer3DGizmoPlugin::AudioStreamPlayer3DGizmoPlugin() {
-
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1));
create_icon_material("stream_player_3d_icon", Node3DEditor::get_singleton()->get_theme_icon("Gizmo3DSamplePlayer", "EditorIcons"));
@@ -1117,7 +1069,6 @@ int AudioStreamPlayer3DGizmoPlugin::get_priority() const {
}
String AudioStreamPlayer3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
return "Emission Radius";
}
@@ -1127,7 +1078,6 @@ Variant AudioStreamPlayer3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gi
}
void AudioStreamPlayer3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
-
AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
Transform gt = player->get_global_transform();
@@ -1144,7 +1094,6 @@ void AudioStreamPlayer3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
float closest_angle = 1e20;
for (int i = 0; i < 180; i++) {
-
float a = i * Math_PI / 180.0;
float an = (i + 1) * Math_PI / 180.0;
@@ -1152,7 +1101,7 @@ void AudioStreamPlayer3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
Vector3 to(Math::sin(an), 0, -Math::cos(an));
Vector3 r1, r2;
- Geometry::get_closest_points_between_segments(from, to, ray_from, ray_to, r1, r2);
+ Geometry3D::get_closest_points_between_segments(from, to, ray_from, ray_to, r1, r2);
float d = r1.distance_to(r2);
if (d < closest_dist) {
closest_dist = d;
@@ -1166,15 +1115,12 @@ void AudioStreamPlayer3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
}
void AudioStreamPlayer3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
if (p_cancel) {
-
player->set_emission_angle(p_restore);
} else {
-
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
ur->create_action(TTR("Change AudioStreamPlayer3D Emission Angle"));
ur->add_do_method(player, "set_emission_angle", player->get_emission_angle());
@@ -1184,7 +1130,6 @@ void AudioStreamPlayer3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, i
}
void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
const AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -1192,7 +1137,6 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
const Ref<Material> icon = get_material("stream_player_3d_icon", p_gizmo);
if (player->is_emission_angle_enabled()) {
-
const float pc = player->get_emission_angle();
const float ofs = -Math::cos(Math::deg2rad(pc));
const float radius = Math::sin(Math::deg2rad(pc));
@@ -1201,7 +1145,6 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
points_primary.resize(200);
for (int i = 0; i < 100; i++) {
-
const float a = i * 2.0 * Math_PI / 100.0;
const float an = (i + 1) * 2.0 * Math_PI / 100.0;
@@ -1219,7 +1162,6 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
points_secondary.resize(16);
for (int i = 0; i < 8; i++) {
-
const float a = i * 2.0 * Math_PI / 8.0;
const Vector3 from(Math::sin(a) * radius, Math::cos(a) * radius, ofs);
@@ -1242,7 +1184,6 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
//////
Camera3DGizmoPlugin::Camera3DGizmoPlugin() {
-
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8));
create_material("camera_material", gizmo_color);
@@ -1262,7 +1203,6 @@ int Camera3DGizmoPlugin::get_priority() const {
}
String Camera3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
@@ -1273,19 +1213,16 @@ String Camera3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, in
}
Variant Camera3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
return camera->get_fov();
} else {
-
return camera->get_size();
}
}
void Camera3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
-
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
Transform gt = camera->get_global_transform();
@@ -1301,9 +1238,8 @@ void Camera3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Came
float a = _find_closest_angle_to_half_pi_arc(s[0], s[1], 1.0, gt2);
camera->set("fov", CLAMP(a * 2.0, 1, 179));
} else {
-
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(0, 0, -1), Vector3(4096, 0, -1), s[0], s[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(0, 0, -1), Vector3(4096, 0, -1), s[0], s[1], ra, rb);
float d = ra.x * 2.0;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
@@ -1316,13 +1252,10 @@ void Camera3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Came
}
void Camera3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
-
if (p_cancel) {
-
camera->set("fov", p_restore);
} else {
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
@@ -1333,9 +1266,7 @@ void Camera3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, c
}
} else {
-
if (p_cancel) {
-
camera->set("size", p_restore);
} else {
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
@@ -1348,7 +1279,6 @@ void Camera3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, c
}
void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -1381,9 +1311,7 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
switch (camera->get_projection()) {
-
case Camera3D::PROJECTION_PERSPECTIVE: {
-
// The real FOV is halved for accurate representation
float fov = camera->get_fov() / 2.0;
@@ -1405,7 +1333,6 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
} break;
case Camera3D::PROJECTION_ORTHOGONAL: {
-
float size = camera->get_size();
float hsize = size * 0.5;
@@ -1517,15 +1444,15 @@ bool MeshInstance3DGizmoPlugin::can_be_hidden() const {
}
void MeshInstance3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
MeshInstance3D *mesh = Object::cast_to<MeshInstance3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
Ref<Mesh> m = mesh->get_mesh();
- if (!m.is_valid())
+ if (!m.is_valid()) {
return; //none
+ }
Ref<TriangleMesh> tm = m->generate_triangle_mesh();
if (tm.is_valid()) {
@@ -1554,7 +1481,6 @@ bool Sprite3DGizmoPlugin::can_be_hidden() const {
}
void Sprite3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
Sprite3D *sprite = Object::cast_to<Sprite3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -1613,7 +1539,6 @@ int Position3DGizmoPlugin::get_priority() const {
}
void Position3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
p_gizmo->clear();
p_gizmo->add_mesh(pos3d_mesh);
p_gizmo->add_collision_segments(cursor_points);
@@ -1622,7 +1547,6 @@ void Position3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
Skeleton3DGizmoPlugin::Skeleton3DGizmoPlugin() {
-
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4));
create_material("skeleton_material", gizmo_color);
}
@@ -1640,7 +1564,6 @@ int Skeleton3DGizmoPlugin::get_priority() const {
}
void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
Skeleton3D *skel = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -1672,7 +1595,6 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Color rootcolor = Color(0.4, 1.0, 0.4, 0.1);
for (int i_bone = 0; i_bone < skel->get_bone_count(); i_bone++) {
-
int i = skel->get_process_order(i_bone);
int parent = skel->get_bone_parent(i);
@@ -1691,8 +1613,9 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
for (int j = 0; j < 3; j++) {
float dp = Math::abs(grests[parent].basis[j].normalized().dot(d));
- if (j == 0 || dp > closest_d)
+ if (j == 0 || dp > closest_d) {
closest = j;
+ }
}
//find closest other
@@ -1700,7 +1623,6 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector3 points[4];
int pointidx = 0;
for (int j = 0; j < 3; j++) {
-
bones.write[0] = parent;
surface_tool->add_bones(bones);
surface_tool->add_weights(weights);
@@ -1711,8 +1633,9 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
surface_tool->add_color(rootcolor);
surface_tool->add_vertex(v0 + grests[parent].basis[j].normalized() * dist * 0.05);
- if (j == closest)
+ if (j == closest) {
continue;
+ }
Vector3 axis;
if (first == Vector3()) {
@@ -1723,9 +1646,9 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
for (int k = 0; k < 2; k++) {
-
- if (k == 1)
+ if (k == 1) {
axis = -axis;
+ }
Vector3 point = v0 + d * dist * 0.2;
point += axis * dist * 0.1;
@@ -1755,7 +1678,6 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
SWAP(points[1], points[2]);
for (int j = 0; j < 4; j++) {
-
bones.write[0] = parent;
surface_tool->add_bones(bones);
surface_tool->add_weights(weights);
@@ -1780,7 +1702,6 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
surface_tool->add_vertex(v1);
*/
} else {
-
grests.write[i] = skel->get_bone_rest(i);
bones.write[0] = i;
}
@@ -1847,35 +1768,36 @@ int PhysicalBone3DGizmoPlugin::get_priority() const {
}
void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
p_gizmo->clear();
PhysicalBone3D *physical_bone = Object::cast_to<PhysicalBone3D>(p_gizmo->get_spatial_node());
- if (!physical_bone)
+ if (!physical_bone) {
return;
+ }
Skeleton3D *sk(physical_bone->find_skeleton_parent());
- if (!sk)
+ if (!sk) {
return;
+ }
PhysicalBone3D *pb(sk->get_physical_bone(physical_bone->get_bone_id()));
- if (!pb)
+ if (!pb) {
return;
+ }
PhysicalBone3D *pbp(sk->get_physical_bone_parent(physical_bone->get_bone_id()));
- if (!pbp)
+ if (!pbp) {
return;
+ }
Vector<Vector3> points;
switch (physical_bone->get_joint_type()) {
case PhysicalBone3D::JOINT_TYPE_PIN: {
-
Joint3DGizmoPlugin::CreatePinJointGizmo(physical_bone->get_joint_offset(), points);
} break;
case PhysicalBone3D::JOINT_TYPE_CONE: {
-
const PhysicalBone3D::ConeJointData *cjd(static_cast<const PhysicalBone3D::ConeJointData *>(physical_bone->get_joint_data()));
Joint3DGizmoPlugin::CreateConeTwistJointGizmo(
physical_bone->get_joint_offset(),
@@ -1888,7 +1810,6 @@ void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
&points);
} break;
case PhysicalBone3D::JOINT_TYPE_HINGE: {
-
const PhysicalBone3D::HingeJointData *hjd(static_cast<const PhysicalBone3D::HingeJointData *>(physical_bone->get_joint_data()));
Joint3DGizmoPlugin::CreateHingeJointGizmo(
physical_bone->get_joint_offset(),
@@ -1903,7 +1824,6 @@ void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
&points);
} break;
case PhysicalBone3D::JOINT_TYPE_SLIDER: {
-
const PhysicalBone3D::SliderJointData *sjd(static_cast<const PhysicalBone3D::SliderJointData *>(physical_bone->get_joint_data()));
Joint3DGizmoPlugin::CreateSliderJointGizmo(
physical_bone->get_joint_offset(),
@@ -1919,7 +1839,6 @@ void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
&points);
} break;
case PhysicalBone3D::JOINT_TYPE_6DOF: {
-
const PhysicalBone3D::SixDOFJointData *sdofjd(static_cast<const PhysicalBone3D::SixDOFJointData *>(physical_bone->get_joint_data()));
Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
physical_bone->get_joint_offset(),
@@ -1966,7 +1885,6 @@ void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
RayCast3DGizmoPlugin::RayCast3DGizmoPlugin() {
-
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
const float gizmo_value = gizmo_color.get_v();
@@ -1987,7 +1905,6 @@ int RayCast3DGizmoPlugin::get_priority() const {
}
void RayCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
RayCast3D *raycast = Object::cast_to<RayCast3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2007,7 +1924,6 @@ void RayCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
void SpringArm3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
SpringArm3D *spring_arm = Object::cast_to<SpringArm3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2043,7 +1959,6 @@ int SpringArm3DGizmoPlugin::get_priority() const {
/////
VehicleWheel3DGizmoPlugin::VehicleWheel3DGizmoPlugin() {
-
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
}
@@ -2061,7 +1976,6 @@ int VehicleWheel3DGizmoPlugin::get_priority() const {
}
void VehicleWheel3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
VehicleWheel3D *car_wheel = Object::cast_to<VehicleWheel3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2071,7 +1985,6 @@ void VehicleWheel3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
float r = car_wheel->get_radius();
const int skip = 10;
for (int i = 0; i <= 360; i += skip) {
-
float ra = Math::deg2rad((float)i);
float rb = Math::deg2rad((float)i + skip);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * r;
@@ -2211,7 +2124,6 @@ int VisibilityNotifier3DGizmoPlugin::get_priority() const {
}
String VisibilityNotifier3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
switch (p_idx) {
case 0:
return "Size X";
@@ -2231,12 +2143,11 @@ String VisibilityNotifier3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo
}
Variant VisibilityNotifier3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
return notifier->get_aabb();
}
-void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
Transform gt = notifier->get_global_transform();
@@ -2258,9 +2169,8 @@ void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
axis[p_idx] = 1.0;
if (move) {
-
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(ofs - axis * 4096, ofs + axis * 4096, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(ofs - axis * 4096, ofs + axis * 4096, sg[0], sg[1], ra, rb);
float d = ra[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
@@ -2272,15 +2182,16 @@ void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
} else {
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(ofs, ofs + axis * 4096, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(ofs, ofs + axis * 4096, sg[0], sg[1], ra, rb);
float d = ra[p_idx] - ofs[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
//resize
aabb.position[p_idx] = (aabb.position[p_idx] + aabb.size[p_idx] * 0.5) - d;
aabb.size[p_idx] = d * 2;
@@ -2289,7 +2200,6 @@ void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
}
void VisibilityNotifier3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
if (p_cancel) {
@@ -2305,7 +2215,6 @@ void VisibilityNotifier3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo,
}
void VisibilityNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2323,7 +2232,6 @@ void VisibilityNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> handles;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = aabb.position[i] + aabb.size[i];
ax[(i + 1) % 3] = aabb.position[(i + 1) % 3] + aabb.size[(i + 1) % 3] * 0.5;
@@ -2333,7 +2241,6 @@ void VisibilityNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector3 center = aabb.position + aabb.size * 0.5;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = 1.0;
handles.push_back(center + ax);
@@ -2409,7 +2316,6 @@ bool GPUParticles3DGizmoPlugin::is_selectable_when_hidden() const {
}
String GPUParticles3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
switch (p_idx) {
case 0:
return "Size X";
@@ -2427,13 +2333,13 @@ String GPUParticles3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_giz
return "";
}
-Variant GPUParticles3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant GPUParticles3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
return particles->get_visibility_aabb();
}
-void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
Transform gt = particles->get_global_transform();
@@ -2454,9 +2360,8 @@ void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx
axis[p_idx] = 1.0;
if (move) {
-
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(ofs - axis * 4096, ofs + axis * 4096, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(ofs - axis * 4096, ofs + axis * 4096, sg[0], sg[1], ra, rb);
float d = ra[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
@@ -2468,15 +2373,16 @@ void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx
} else {
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(ofs, ofs + axis * 4096, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(ofs, ofs + axis * 4096, sg[0], sg[1], ra, rb);
float d = ra[p_idx] - ofs[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
//resize
aabb.position[p_idx] = (aabb.position[p_idx] + aabb.size[p_idx] * 0.5) - d;
aabb.size[p_idx] = d * 2;
@@ -2485,7 +2391,6 @@ void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx
}
void GPUParticles3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
if (p_cancel) {
@@ -2501,7 +2406,6 @@ void GPUParticles3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_
}
void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2519,7 +2423,6 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> handles;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = aabb.position[i] + aabb.size[i];
ax[(i + 1) % 3] = aabb.position[(i + 1) % 3] + aabb.size[(i + 1) % 3] * 0.5;
@@ -2529,7 +2432,6 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector3 center = aabb.position + aabb.size * 0.5;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = 1.0;
handles.push_back(center + ax);
@@ -2550,6 +2452,7 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_handles(handles, get_material("handles"));
p_gizmo->add_unscaled_billboard(icon, 0.05);
}
+
////
ReflectionProbeGizmoPlugin::ReflectionProbeGizmoPlugin() {
@@ -2580,7 +2483,6 @@ int ReflectionProbeGizmoPlugin::get_priority() const {
}
String ReflectionProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
switch (p_idx) {
case 0:
return "Extents X";
@@ -2598,13 +2500,13 @@ String ReflectionProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gi
return "";
}
-Variant ReflectionProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant ReflectionProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
return AABB(probe->get_extents(), probe->get_origin_offset());
}
-void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
Transform gt = probe->get_global_transform();
@@ -2622,19 +2524,19 @@ void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_id
axis[p_idx] = 1.0;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
float d = ra[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
extents[p_idx] = d;
probe->set_extents(extents);
} else {
-
p_idx -= 3;
Vector3 origin = probe->get_origin_offset();
@@ -2649,7 +2551,7 @@ void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_id
axis[p_idx] = 1.0;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(origin - axis * 16384, origin + axis * 16384, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(origin - axis * 16384, origin + axis * 16384, sg[0], sg[1], ra, rb);
// Adjust the actual position to account for the gizmo handle position
float d = ra[p_idx] + 0.25;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
@@ -2662,7 +2564,6 @@ void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_id
}
void ReflectionProbeGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
AABB restore = p_restore;
@@ -2683,7 +2584,6 @@ void ReflectionProbeGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p
}
void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2712,14 +2612,12 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> handles;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = aabb.position[i] + aabb.size[i];
handles.push_back(ax);
}
for (int i = 0; i < 3; i++) {
-
Vector3 orig_handle = probe->get_origin_offset();
orig_handle[i] -= 0.25;
lines.push_back(orig_handle);
@@ -2744,6 +2642,7 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_unscaled_billboard(icon, 0.05);
p_gizmo->add_handles(handles, get_material("handles"));
}
+
///////////////////////////////
////
@@ -2769,7 +2668,6 @@ int DecalGizmoPlugin::get_priority() const {
}
String DecalGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
switch (p_idx) {
case 0:
return "Extents X";
@@ -2781,13 +2679,13 @@ String DecalGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p
return "";
}
-Variant DecalGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant DecalGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
return decal->get_extents();
}
-void DecalGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void DecalGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
Transform gt = decal->get_global_transform();
@@ -2804,21 +2702,21 @@ void DecalGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3
axis[p_idx] = 1.0;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
float d = ra[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
extents[p_idx] = d;
decal->set_extents(extents);
}
void DecalGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
Vector3 restore = p_restore;
@@ -2836,7 +2734,6 @@ void DecalGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, cons
}
void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2870,7 +2767,6 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> handles;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = aabb.position[i] + aabb.size[i];
handles.push_back(ax);
@@ -2913,7 +2809,6 @@ int GIProbeGizmoPlugin::get_priority() const {
}
String GIProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
switch (p_idx) {
case 0:
return "Extents X";
@@ -2925,13 +2820,13 @@ String GIProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int
return "";
}
-Variant GIProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant GIProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node());
return probe->get_extents();
}
-void GIProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void GIProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node());
Transform gt = probe->get_global_transform();
@@ -2948,21 +2843,21 @@ void GIProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camer
axis[p_idx] = 1.0;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
float d = ra[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
extents[p_idx] = d;
probe->set_extents(extents);
}
void GIProbeGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
-
GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node());
Vector3 restore = p_restore;
@@ -2980,7 +2875,6 @@ void GIProbeGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, co
}
void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node());
Ref<Material> material = get_material("gi_probe_material", p_gizmo);
@@ -3010,9 +2904,7 @@ void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
lines.clear();
for (int i = 1; i < subdiv; i++) {
-
for (int j = 0; j < 3; j++) {
-
if (cell_size * i > aabb.size[j]) {
continue;
}
@@ -3026,7 +2918,6 @@ void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
tb[j_n2] = 1.0;
for (int k = 0; k < 4; k++) {
-
Vector3 from = aabb.position, to = aabb.position;
from[j] += cell_size * i;
to[j] += cell_size * i;
@@ -3034,7 +2925,6 @@ void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
if (k & 1) {
to[j_n1] += aabb.size[j_n1];
} else {
-
to[j_n2] += aabb.size[j_n2];
}
@@ -3054,7 +2944,6 @@ void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> handles;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = aabb.position[i] + aabb.size[i];
handles.push_back(ax);
@@ -3089,13 +2978,13 @@ BakedLightmapGizmoPlugin::BakedLightmapGizmoPlugin() {
}
String BakedLightmapGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
return "";
}
-Variant BakedLightmapGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant BakedLightmapGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
return Variant();
}
+
void BakedLightmapGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
}
@@ -3115,7 +3004,6 @@ int BakedLightmapGizmoPlugin::get_priority() const {
}
void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
Ref<Material> icon = get_material("baked_indirect_light_icon", p_gizmo);
BakedLightmap *baker = Object::cast_to<BakedLightmap>(p_gizmo->get_spatial_node());
Ref<BakedLightmapData> data = baker->get_light_data();
@@ -3146,10 +3034,8 @@ void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<int> tetrahedrons = data->get_capture_tetrahedra();
for (int i = 0; i < tetrahedrons.size(); i += 4) {
-
for (int j = 0; j < 4; j++) {
for (int k = j + 1; k < 4; k++) {
-
Vector2i pair;
pair.x = tetrahedrons[i + j];
pair.y = tetrahedrons[i + k];
@@ -3181,7 +3067,6 @@ void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
float radius = 0.3;
for (int p = 0; p < points.size(); p++) {
-
int vertex_base = vertices.size();
Vector3 sh_col[9];
for (int i = 0; i < 9; i++) {
@@ -3264,6 +3149,7 @@ void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_mesh(mesh);
}
+
/////////
LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() {
@@ -3274,13 +3160,13 @@ LightmapProbeGizmoPlugin::LightmapProbeGizmoPlugin() {
}
String LightmapProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
return "";
}
-Variant LightmapProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant LightmapProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
return Variant();
}
+
void LightmapProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
}
@@ -3300,7 +3186,6 @@ int LightmapProbeGizmoPlugin::get_priority() const {
}
void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
Ref<Material> material_lines = get_material("lightprobe_lines", p_gizmo);
p_gizmo->clear();
@@ -3360,6 +3245,7 @@ void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_lines(lines, material_lines);
}
+
////
CollisionShape3DGizmoPlugin::CollisionShape3DGizmoPlugin() {
@@ -3384,35 +3270,30 @@ int CollisionShape3DGizmoPlugin::get_priority() const {
}
String CollisionShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
const CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
Ref<Shape3D> s = cs->get_shape();
- if (s.is_null())
+ if (s.is_null()) {
return "";
+ }
if (Object::cast_to<SphereShape3D>(*s)) {
-
return "Radius";
}
if (Object::cast_to<BoxShape3D>(*s)) {
-
return "Extents";
}
if (Object::cast_to<CapsuleShape3D>(*s)) {
-
return p_idx == 0 ? "Radius" : "Height";
}
if (Object::cast_to<CylinderShape3D>(*s)) {
-
return p_idx == 0 ? "Radius" : "Height";
}
if (Object::cast_to<RayShape3D>(*s)) {
-
return "Length";
}
@@ -3420,52 +3301,48 @@ String CollisionShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_g
}
Variant CollisionShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
-
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
Ref<Shape3D> s = cs->get_shape();
- if (s.is_null())
+ if (s.is_null()) {
return Variant();
+ }
if (Object::cast_to<SphereShape3D>(*s)) {
-
Ref<SphereShape3D> ss = s;
return ss->get_radius();
}
if (Object::cast_to<BoxShape3D>(*s)) {
-
Ref<BoxShape3D> bs = s;
return bs->get_extents();
}
if (Object::cast_to<CapsuleShape3D>(*s)) {
-
Ref<CapsuleShape3D> cs2 = s;
return p_idx == 0 ? cs2->get_radius() : cs2->get_height();
}
if (Object::cast_to<CylinderShape3D>(*s)) {
-
Ref<CylinderShape3D> cs2 = s;
return p_idx == 0 ? cs2->get_radius() : cs2->get_height();
}
if (Object::cast_to<RayShape3D>(*s)) {
-
Ref<RayShape3D> cs2 = s;
return cs2->get_length();
}
return Variant();
}
-void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
Ref<Shape3D> s = cs->get_shape();
- if (s.is_null())
+ if (s.is_null()) {
return;
+ }
Transform gt = cs->get_global_transform();
Transform gi = gt.affine_inverse();
@@ -3476,51 +3353,51 @@ void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_i
Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
if (Object::cast_to<SphereShape3D>(*s)) {
-
Ref<SphereShape3D> ss = s;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), Vector3(4096, 0, 0), sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), Vector3(4096, 0, 0), sg[0], sg[1], ra, rb);
float d = ra.x;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
ss->set_radius(d);
}
if (Object::cast_to<RayShape3D>(*s)) {
-
Ref<RayShape3D> rs = s;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), Vector3(0, 0, 4096), sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), Vector3(0, 0, 4096), sg[0], sg[1], ra, rb);
float d = ra.z;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
rs->set_length(d);
}
if (Object::cast_to<BoxShape3D>(*s)) {
-
Vector3 axis;
axis[p_idx] = 1.0;
Ref<BoxShape3D> bs = s;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
float d = ra[p_idx];
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
Vector3 he = bs->get_extents();
he[p_idx] = d;
@@ -3528,60 +3405,63 @@ void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_i
}
if (Object::cast_to<CapsuleShape3D>(*s)) {
-
Vector3 axis;
axis[p_idx == 0 ? 0 : 2] = 1.0;
Ref<CapsuleShape3D> cs2 = s;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
float d = axis.dot(ra);
- if (p_idx == 1)
+ if (p_idx == 1) {
d -= cs2->get_radius();
+ }
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
- if (p_idx == 0)
+ if (p_idx == 0) {
cs2->set_radius(d);
- else if (p_idx == 1)
+ } else if (p_idx == 1) {
cs2->set_height(d * 2.0);
+ }
}
if (Object::cast_to<CylinderShape3D>(*s)) {
-
Vector3 axis;
axis[p_idx == 0 ? 0 : 1] = 1.0;
Ref<CylinderShape3D> cs2 = s;
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
+ Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
float d = axis.dot(ra);
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::stepify(d, Node3DEditor::get_singleton()->get_translate_snap());
}
- if (d < 0.001)
+ if (d < 0.001) {
d = 0.001;
+ }
- if (p_idx == 0)
+ if (p_idx == 0) {
cs2->set_radius(d);
- else if (p_idx == 1)
+ } else if (p_idx == 1) {
cs2->set_height(d * 2.0);
+ }
}
}
-void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
Ref<Shape3D> s = cs->get_shape();
- if (s.is_null())
+ if (s.is_null()) {
return;
+ }
if (Object::cast_to<SphereShape3D>(*s)) {
-
Ref<SphereShape3D> ss = s;
if (p_cancel) {
ss->set_radius(p_restore);
@@ -3596,7 +3476,6 @@ void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int
}
if (Object::cast_to<BoxShape3D>(*s)) {
-
Ref<BoxShape3D> ss = s;
if (p_cancel) {
ss->set_extents(p_restore);
@@ -3611,13 +3490,13 @@ void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int
}
if (Object::cast_to<CapsuleShape3D>(*s)) {
-
Ref<CapsuleShape3D> ss = s;
if (p_cancel) {
- if (p_idx == 0)
+ if (p_idx == 0) {
ss->set_radius(p_restore);
- else
+ } else {
ss->set_height(p_restore);
+ }
return;
}
@@ -3636,13 +3515,13 @@ void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int
}
if (Object::cast_to<CylinderShape3D>(*s)) {
-
Ref<CylinderShape3D> ss = s;
if (p_cancel) {
- if (p_idx == 0)
+ if (p_idx == 0) {
ss->set_radius(p_restore);
- else
+ } else {
ss->set_height(p_restore);
+ }
return;
}
@@ -3665,7 +3544,6 @@ void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int
}
if (Object::cast_to<RayShape3D>(*s)) {
-
Ref<RayShape3D> ss = s;
if (p_cancel) {
ss->set_length(p_restore);
@@ -3679,29 +3557,28 @@ void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int
ur->commit_action();
}
}
-void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
Ref<Shape3D> s = cs->get_shape();
- if (s.is_null())
+ if (s.is_null()) {
return;
+ }
const Ref<Material> material =
get_material(!cs->is_disabled() ? "shape_material" : "shape_material_disabled", p_gizmo);
Ref<Material> handles_material = get_material("handles");
if (Object::cast_to<SphereShape3D>(*s)) {
-
Ref<SphereShape3D> sp = s;
float r = sp->get_radius();
Vector<Vector3> points;
for (int i = 0; i <= 360; i++) {
-
float ra = Math::deg2rad((float)i);
float rb = Math::deg2rad((float)i + 1);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * r;
@@ -3718,7 +3595,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> collision_segments;
for (int i = 0; i < 64; i++) {
-
float ra = i * Math_PI * 2.0 / 64.0;
float rb = (i + 1) * Math_PI * 2.0 / 64.0;
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * r;
@@ -3740,7 +3616,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<BoxShape3D>(*s)) {
-
Ref<BoxShape3D> bs = s;
Vector<Vector3> lines;
AABB aabb;
@@ -3757,7 +3632,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> handles;
for (int i = 0; i < 3; i++) {
-
Vector3 ax;
ax[i] = bs->get_extents()[i];
handles.push_back(ax);
@@ -3769,7 +3643,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<CapsuleShape3D>(*s)) {
-
Ref<CapsuleShape3D> cs2 = s;
float radius = cs2->get_radius();
float height = cs2->get_height();
@@ -3778,7 +3651,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector3 d(0, height * 0.5, 0);
for (int i = 0; i < 360; i++) {
-
float ra = Math::deg2rad((float)i);
float rb = Math::deg2rad((float)i + 1);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
@@ -3791,7 +3663,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
points.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 90 == 0) {
-
points.push_back(Vector3(a.x, 0, a.y) + d);
points.push_back(Vector3(a.x, 0, a.y) - d);
}
@@ -3809,7 +3680,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> collision_segments;
for (int i = 0; i < 64; i++) {
-
float ra = i * Math_PI * 2.0 / 64.0;
float rb = (i + 1) * Math_PI * 2.0 / 64.0;
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
@@ -3822,7 +3692,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
collision_segments.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 16 == 0) {
-
collision_segments.push_back(Vector3(a.x, 0, a.y) + d);
collision_segments.push_back(Vector3(a.x, 0, a.y) - d);
}
@@ -3844,7 +3713,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<CylinderShape3D>(*s)) {
-
Ref<CylinderShape3D> cs2 = s;
float radius = cs2->get_radius();
float height = cs2->get_height();
@@ -3853,7 +3721,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector3 d(0, height * 0.5, 0);
for (int i = 0; i < 360; i++) {
-
float ra = Math::deg2rad((float)i);
float rb = Math::deg2rad((float)i + 1);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
@@ -3866,7 +3733,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
points.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 90 == 0) {
-
points.push_back(Vector3(a.x, 0, a.y) + d);
points.push_back(Vector3(a.x, 0, a.y) - d);
}
@@ -3877,7 +3743,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> collision_segments;
for (int i = 0; i < 64; i++) {
-
float ra = i * Math_PI * 2.0 / 64.0;
float rb = (i + 1) * Math_PI * 2.0 / 64.0;
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
@@ -3890,7 +3755,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
collision_segments.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 16 == 0) {
-
collision_segments.push_back(Vector3(a.x, 0, a.y) + d);
collision_segments.push_back(Vector3(a.x, 0, a.y) - d);
}
@@ -3905,7 +3769,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<WorldMarginShape3D>(*s)) {
-
Ref<WorldMarginShape3D> ps = s;
Plane p = ps->get_plane();
Vector<Vector3> points;
@@ -3936,13 +3799,11 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<ConvexPolygonShape3D>(*s)) {
-
Vector<Vector3> points = Object::cast_to<ConvexPolygonShape3D>(*s)->get_points();
if (points.size() > 3) {
-
Vector<Vector3> varr = Variant(points);
- Geometry::MeshData md;
+ Geometry3D::MeshData md;
Error err = QuickHull::build(varr, md);
if (err == OK) {
Vector<Vector3> points2;
@@ -3959,7 +3820,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<ConcavePolygonShape3D>(*s)) {
-
Ref<ConcavePolygonShape3D> cs2 = s;
Ref<ArrayMesh> mesh = cs2->get_debug_mesh();
p_gizmo->add_mesh(mesh, false, Ref<SkinReference>(), material);
@@ -3967,7 +3827,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<RayShape3D>(*s)) {
-
Ref<RayShape3D> rs = s;
Vector<Vector3> points;
@@ -3981,7 +3840,6 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
if (Object::cast_to<HeightMapShape3D>(*s)) {
-
Ref<HeightMapShape3D> hms = s;
Ref<ArrayMesh> mesh = hms->get_debug_mesh();
@@ -4012,7 +3870,6 @@ int CollisionPolygon3DGizmoPlugin::get_priority() const {
}
void CollisionPolygon3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
CollisionPolygon3D *polygon = Object::cast_to<CollisionPolygon3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -4022,7 +3879,6 @@ void CollisionPolygon3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> lines;
for (int i = 0; i < points.size(); i++) {
-
int n = (i + 1) % points.size();
lines.push_back(Vector3(points[i].x, points[i].y, depth));
lines.push_back(Vector3(points[n].x, points[n].y, depth));
@@ -4061,7 +3917,6 @@ int NavigationRegion3DGizmoPlugin::get_priority() const {
}
void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
-
NavigationRegion3D *navmesh = Object::cast_to<NavigationRegion3D>(p_gizmo->get_spatial_node());
Ref<Material> edge_material = get_material("navigation_edge_material", p_gizmo);
@@ -4071,8 +3926,9 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
Ref<NavigationMesh> navmeshie = navmesh->get_navigation_mesh();
- if (navmeshie.is_null())
+ if (navmeshie.is_null()) {
return;
+ }
Vector<Vector3> vertices = navmeshie->get_vertices();
const Vector3 *vr = vertices.ptr();
@@ -4090,8 +3946,9 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
}
- if (faces.empty())
+ if (faces.empty()) {
return;
+ }
Map<_EdgeKey, bool> edge_map;
Vector<Vector3> tmeshfaces;
@@ -4102,26 +3959,23 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
int tidx = 0;
for (List<Face3>::Element *E = faces.front(); E; E = E->next()) {
-
const Face3 &f = E->get();
for (int j = 0; j < 3; j++) {
-
tw[tidx++] = f.vertex[j];
_EdgeKey ek;
ek.from = f.vertex[j].snapped(Vector3(CMP_EPSILON, CMP_EPSILON, CMP_EPSILON));
ek.to = f.vertex[(j + 1) % 3].snapped(Vector3(CMP_EPSILON, CMP_EPSILON, CMP_EPSILON));
- if (ek.from < ek.to)
+ if (ek.from < ek.to) {
SWAP(ek.from, ek.to);
+ }
Map<_EdgeKey, bool>::Element *F = edge_map.find(ek);
if (F) {
-
F->get() = false;
} else {
-
edge_map[ek] = true;
}
}
@@ -4130,7 +3984,6 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> lines;
for (Map<_EdgeKey, bool>::Element *E = edge_map.front(); E; E = E->next()) {
-
if (E->get()) {
lines.push_back(E->key().from);
lines.push_back(E->key().to);
@@ -4140,8 +3993,9 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Ref<TriangleMesh> tmesh = memnew(TriangleMesh);
tmesh->create(tmeshfaces);
- if (lines.size())
+ if (lines.size()) {
p_gizmo->add_lines(lines, navmesh->is_enabled() ? edge_material : edge_material_disabled);
+ }
p_gizmo->add_collision_triangles(tmesh);
Ref<ArrayMesh> m = memnew(ArrayMesh);
Array a;
@@ -4184,7 +4038,6 @@ Basis JointGizmosDrawer::look_body(const Transform &p_joint_transform, const Tra
}
Basis JointGizmosDrawer::look_body_toward(Vector3::Axis p_axis, const Transform &joint_transform, const Transform &body_transform) {
-
switch (p_axis) {
case Vector3::AXIS_X:
return look_body_toward_x(joint_transform, body_transform);
@@ -4198,7 +4051,6 @@ Basis JointGizmosDrawer::look_body_toward(Vector3::Axis p_axis, const Transform
}
Basis JointGizmosDrawer::look_body_toward_x(const Transform &p_joint_transform, const Transform &p_body_transform) {
-
const Vector3 &p_eye(p_joint_transform.origin);
const Vector3 &p_target(p_body_transform.origin);
@@ -4230,7 +4082,6 @@ Basis JointGizmosDrawer::look_body_toward_x(const Transform &p_joint_transform,
}
Basis JointGizmosDrawer::look_body_toward_y(const Transform &p_joint_transform, const Transform &p_body_transform) {
-
const Vector3 &p_eye(p_joint_transform.origin);
const Vector3 &p_target(p_body_transform.origin);
@@ -4262,7 +4113,6 @@ Basis JointGizmosDrawer::look_body_toward_y(const Transform &p_joint_transform,
}
Basis JointGizmosDrawer::look_body_toward_z(const Transform &p_joint_transform, const Transform &p_body_transform) {
-
const Vector3 &p_eye(p_joint_transform.origin);
const Vector3 &p_target(p_body_transform.origin);
@@ -4294,14 +4144,11 @@ Basis JointGizmosDrawer::look_body_toward_z(const Transform &p_joint_transform,
}
void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const Transform &p_offset, const Basis &p_base, real_t p_limit_lower, real_t p_limit_upper, Vector<Vector3> &r_points, bool p_inverse) {
-
if (p_limit_lower == p_limit_upper) {
-
r_points.push_back(p_offset.translated(Vector3()).origin);
r_points.push_back(p_offset.translated(p_base.xform(Vector3(0.5, 0, 0))).origin);
} else {
-
if (p_limit_lower > p_limit_upper) {
p_limit_lower = -Math_PI;
p_limit_upper = Math_PI;
@@ -4310,7 +4157,6 @@ void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const
const int points = 32;
for (int i = 0; i < points; i++) {
-
real_t s = p_limit_lower + i * (p_limit_upper - p_limit_lower) / points;
real_t n = p_limit_lower + (i + 1) * (p_limit_upper - p_limit_lower) / points;
@@ -4360,14 +4206,12 @@ void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const
}
void JointGizmosDrawer::draw_cone(const Transform &p_offset, const Basis &p_base, real_t p_swing, real_t p_twist, Vector<Vector3> &r_points) {
-
float r = 1.0;
float w = r * Math::sin(p_swing);
float d = r * Math::cos(p_swing);
//swing
for (int i = 0; i < 360; i += 10) {
-
float ra = Math::deg2rad((float)i);
float rb = Math::deg2rad((float)i + 10);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * w;
@@ -4377,7 +4221,6 @@ void JointGizmosDrawer::draw_cone(const Transform &p_offset, const Basis &p_base
r_points.push_back(p_offset.translated(p_base.xform(Vector3(d, b.x, b.y))).origin);
if (i % 90 == 0) {
-
r_points.push_back(p_offset.translated(p_base.xform(Vector3(d, a.x, a.y))).origin);
r_points.push_back(p_offset.translated(p_base.xform(Vector3())).origin);
}
@@ -4391,7 +4234,6 @@ void JointGizmosDrawer::draw_cone(const Transform &p_offset, const Basis &p_base
ts = MIN(ts, 720);
for (int i = 0; i < int(ts); i += 5) {
-
float ra = Math::deg2rad((float)i);
float rb = Math::deg2rad((float)i + 5);
float c = i / 720.0;
@@ -4474,7 +4316,6 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
HingeJoint3D *hinge = Object::cast_to<HingeJoint3D>(joint);
if (hinge) {
-
CreateHingeJointGizmo(
Transform(),
hinge->get_global_transform(),
@@ -4498,7 +4339,6 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
SliderJoint3D *slider = Object::cast_to<SliderJoint3D>(joint);
if (slider) {
-
CreateSliderJointGizmo(
Transform(),
slider->get_global_transform(),
@@ -4523,7 +4363,6 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
ConeTwistJoint3D *cone = Object::cast_to<ConeTwistJoint3D>(joint);
if (cone) {
-
CreateConeTwistJointGizmo(
Transform(),
cone->get_global_transform(),
@@ -4543,7 +4382,6 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Generic6DOFJoint3D *gen = Object::cast_to<Generic6DOFJoint3D>(joint);
if (gen) {
-
CreateGeneric6DOFJointGizmo(
Transform(),
gen->get_global_transform(),
@@ -4597,7 +4435,6 @@ void Joint3DGizmoPlugin::CreatePinJointGizmo(const Transform &p_offset, Vector<V
}
void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
-
r_common_points.push_back(p_offset.translated(Vector3(0, 0, 0.5)).origin);
r_common_points.push_back(p_offset.translated(Vector3(0, 0, -0.5)).origin);
@@ -4607,7 +4444,6 @@ void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, const
}
if (r_body_a_points) {
-
JointGizmosDrawer::draw_circle(Vector3::AXIS_Z,
BODY_A_RADIUS,
p_offset,
@@ -4629,7 +4465,6 @@ void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, const
}
void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_angular_limit_lower, real_t p_angular_limit_upper, real_t p_linear_limit_lower, real_t p_linear_limit_upper, Vector<Vector3> &r_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
-
p_linear_limit_lower = -p_linear_limit_lower;
p_linear_limit_upper = -p_linear_limit_upper;
@@ -4638,7 +4473,6 @@ void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const
r_points.push_back(p_offset.translated(Vector3(0, 0, -0.5)).origin);
if (p_linear_limit_lower >= p_linear_limit_upper) {
-
r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, 0, 0)).origin);
r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, 0, 0)).origin);
@@ -4661,12 +4495,11 @@ void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const
r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, -cs, -cs)).origin);
} else {
-
r_points.push_back(p_offset.translated(Vector3(+cs * 2, 0, 0)).origin);
r_points.push_back(p_offset.translated(Vector3(-cs * 2, 0, 0)).origin);
}
- if (r_body_a_points)
+ if (r_body_a_points) {
JointGizmosDrawer::draw_circle(
Vector3::AXIS_X,
BODY_A_RADIUS,
@@ -4675,8 +4508,9 @@ void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const
p_angular_limit_lower,
p_angular_limit_upper,
*r_body_a_points);
+ }
- if (r_body_b_points)
+ if (r_body_b_points) {
JointGizmosDrawer::draw_circle(
Vector3::AXIS_X,
BODY_B_RADIUS,
@@ -4686,25 +4520,27 @@ void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const
p_angular_limit_upper,
*r_body_b_points,
true);
+ }
}
void Joint3DGizmoPlugin::CreateConeTwistJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_swing, real_t p_twist, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
-
- if (r_body_a_points)
+ if (r_body_a_points) {
JointGizmosDrawer::draw_cone(
p_offset,
JointGizmosDrawer::look_body(p_trs_joint, p_trs_body_a),
p_swing,
p_twist,
*r_body_a_points);
+ }
- if (r_body_b_points)
+ if (r_body_b_points) {
JointGizmosDrawer::draw_cone(
p_offset,
JointGizmosDrawer::look_body(p_trs_joint, p_trs_body_b),
p_swing,
p_twist,
*r_body_b_points);
+ }
}
void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
@@ -4733,7 +4569,6 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
Vector<Vector3> &r_points,
Vector<Vector3> *r_body_a_points,
Vector<Vector3> *r_body_b_points) {
-
float cs = 0.25;
for (int ax = 0; ax < 3; ax++) {
@@ -4794,7 +4629,6 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
}
if (enable_lin && lll >= lul) {
-
ADD_VTX(lul, 0, 0);
ADD_VTX(lll, 0, 0);
@@ -4817,7 +4651,6 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
ADD_VTX(lll, -cs, -cs);
} else {
-
ADD_VTX(+cs * 2, 0, 0);
ADD_VTX(-cs * 2, 0, 0);
}
@@ -4827,7 +4660,7 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
ul = -1;
}
- if (r_body_a_points)
+ if (r_body_a_points) {
JointGizmosDrawer::draw_circle(
static_cast<Vector3::Axis>(ax),
BODY_A_RADIUS,
@@ -4837,8 +4670,9 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
ul,
*r_body_a_points,
true);
+ }
- if (r_body_b_points)
+ if (r_body_b_points) {
JointGizmosDrawer::draw_circle(
static_cast<Vector3::Axis>(ax),
BODY_B_RADIUS,
@@ -4847,6 +4681,7 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
ll,
ul,
*r_body_b_points);
+ }
}
#undef ADD_VTX
diff --git a/editor/node_3d_editor_gizmos.h b/editor/node_3d_editor_gizmos.h
index c25fff528c..8154dc7a6d 100644
--- a/editor/node_3d_editor_gizmos.h
+++ b/editor/node_3d_editor_gizmos.h
@@ -37,7 +37,6 @@
class Camera3D;
class Light3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(Light3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -55,7 +54,6 @@ public:
};
class AudioStreamPlayer3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(AudioStreamPlayer3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -73,7 +71,6 @@ public:
};
class Camera3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(Camera3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -91,7 +88,6 @@ public:
};
class MeshInstance3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(MeshInstance3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -105,7 +101,6 @@ public:
};
class Sprite3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(Sprite3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -119,7 +114,6 @@ public:
};
class Position3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(Position3DGizmoPlugin, EditorNode3DGizmoPlugin);
Ref<ArrayMesh> pos3d_mesh;
@@ -135,7 +129,6 @@ public:
};
class Skeleton3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(Skeleton3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -148,7 +141,6 @@ public:
};
class PhysicalBone3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(PhysicalBone3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -161,7 +153,6 @@ public:
};
class RayCast3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(RayCast3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -174,7 +165,6 @@ public:
};
class SpringArm3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(SpringArm3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -187,7 +177,6 @@ public:
};
class VehicleWheel3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(VehicleWheel3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -200,7 +189,6 @@ public:
};
class SoftBody3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(SoftBody3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -219,7 +207,6 @@ public:
};
class VisibilityNotifier3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(VisibilityNotifier3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -249,7 +236,6 @@ public:
};
class GPUParticles3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(GPUParticles3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -268,7 +254,6 @@ public:
};
class ReflectionProbeGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(ReflectionProbeGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -286,7 +271,6 @@ public:
};
class DecalGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(DecalGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -304,7 +288,6 @@ public:
};
class GIProbeGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(GIProbeGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -322,7 +305,6 @@ public:
};
class BakedLightmapGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(BakedLightmapGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -340,7 +322,6 @@ public:
};
class LightmapProbeGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(LightmapProbeGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -358,7 +339,6 @@ public:
};
class CollisionShape3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(CollisionShape3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
@@ -387,11 +367,9 @@ public:
};
class NavigationRegion3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(NavigationRegion3DGizmoPlugin, EditorNode3DGizmoPlugin);
struct _EdgeKey {
-
Vector3 from;
Vector3 to;
@@ -423,7 +401,6 @@ public:
};
class Joint3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(Joint3DGizmoPlugin, EditorNode3DGizmoPlugin);
Timer *update_timer;
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index a076b1eecc..9b9cfad9eb 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -34,7 +34,6 @@
#include "editor_scale.h"
void NodeDock::show_groups() {
-
groups_button->set_pressed(true);
connections_button->set_pressed(false);
groups->show();
@@ -42,7 +41,6 @@ void NodeDock::show_groups() {
}
void NodeDock::show_connections() {
-
groups_button->set_pressed(false);
connections_button->set_pressed(true);
groups->hide();
@@ -53,7 +51,6 @@ void NodeDock::_bind_methods() {
}
void NodeDock::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
connections_button->set_icon(get_theme_icon("Signals", "EditorIcons"));
groups_button->set_icon(get_theme_icon("Groups", "EditorIcons"));
@@ -63,20 +60,19 @@ void NodeDock::_notification(int p_what) {
NodeDock *NodeDock::singleton = nullptr;
void NodeDock::update_lists() {
-
connections->update_tree();
}
void NodeDock::set_node(Node *p_node) {
-
connections->set_node(p_node);
groups->set_current(p_node);
if (p_node) {
- if (connections_button->is_pressed())
+ if (connections_button->is_pressed()) {
connections->show();
- else
+ } else {
groups->show();
+ }
mode_hb->show();
select_a_node->hide();
@@ -89,7 +85,6 @@ void NodeDock::set_node(Node *p_node) {
}
NodeDock::NodeDock() {
-
singleton = this;
set_name("Node");
diff --git a/editor/node_dock.h b/editor/node_dock.h
index ae33c5b9a5..c165974678 100644
--- a/editor/node_dock.h
+++ b/editor/node_dock.h
@@ -35,7 +35,6 @@
#include "groups_editor.h"
class NodeDock : public VBoxContainer {
-
GDCLASS(NodeDock, VBoxContainer);
ToolButton *connections_button;
diff --git a/editor/pane_drag.cpp b/editor/pane_drag.cpp
index ce90fa94dc..09f2b90b90 100644
--- a/editor/pane_drag.cpp
+++ b/editor/pane_drag.cpp
@@ -31,23 +31,19 @@
#include "pane_drag.h"
void PaneDrag::_gui_input(const Ref<InputEvent> &p_input) {
-
Ref<InputEventMouseMotion> mm = p_input;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
-
emit_signal("dragged", Point2(mm->get_relative().x, mm->get_relative().y));
}
}
void PaneDrag::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_DRAW: {
-
Ref<Texture2D> icon = mouse_over ? get_theme_icon("PaneDragHover", "EditorIcons") : get_theme_icon("PaneDrag", "EditorIcons");
- if (!icon.is_null())
+ if (!icon.is_null()) {
icon->draw(get_canvas_item(), Point2(0, 0));
+ }
} break;
case NOTIFICATION_MOUSE_ENTER:
@@ -60,21 +56,20 @@ void PaneDrag::_notification(int p_what) {
break;
}
}
-Size2 PaneDrag::get_minimum_size() const {
+Size2 PaneDrag::get_minimum_size() const {
Ref<Texture2D> icon = get_theme_icon("PaneDrag", "EditorIcons");
- if (!icon.is_null())
+ if (!icon.is_null()) {
return icon->get_size();
+ }
return Size2();
}
void PaneDrag::_bind_methods() {
-
ClassDB::bind_method("_gui_input", &PaneDrag::_gui_input);
ADD_SIGNAL(MethodInfo("dragged", PropertyInfo(Variant::VECTOR2, "amount")));
}
PaneDrag::PaneDrag() {
-
mouse_over = false;
}
diff --git a/editor/pane_drag.h b/editor/pane_drag.h
index 7e66bb429f..81aff4b2a8 100644
--- a/editor/pane_drag.h
+++ b/editor/pane_drag.h
@@ -34,7 +34,6 @@
#include "scene/gui/control.h"
class PaneDrag : public Control {
-
GDCLASS(PaneDrag, Control);
bool mouse_over;
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 4317a5e80f..3ad6938498 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -52,13 +52,13 @@ void PluginConfigDialog::_clear_fields() {
}
void PluginConfigDialog::_on_confirmed() {
-
String path = "res://addons/" + subfolder_edit->get_text();
if (!_edit_mode) {
DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- if (!d || d->make_dir_recursive(path) != OK)
+ if (!d || d->make_dir_recursive(path) != OK) {
return;
+ }
}
Ref<ConfigFile> cf = memnew(ConfigFile);
diff --git a/editor/plugin_config_dialog.h b/editor/plugin_config_dialog.h
index fa148125bc..93c8c01c70 100644
--- a/editor/plugin_config_dialog.h
+++ b/editor/plugin_config_dialog.h
@@ -38,7 +38,6 @@
#include "scene/gui/text_edit.h"
class PluginConfigDialog : public ConfirmationDialog {
-
GDCLASS(PluginConfigDialog, ConfirmationDialog);
LineEdit *name_edit;
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index c26daa3857..b905c8db12 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -31,135 +31,89 @@
#include "abstract_polygon_2d_editor.h"
#include "canvas_item_editor_plugin.h"
+#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
#include "editor/editor_scale.h"
-AbstractPolygon2DEditor::Vertex::Vertex() :
- polygon(-1),
- vertex(-1) {
- // invalid vertex
-}
-
-AbstractPolygon2DEditor::Vertex::Vertex(int p_vertex) :
- polygon(-1),
- vertex(p_vertex) {
- // vertex p_vertex of current wip polygon
-}
-
-AbstractPolygon2DEditor::Vertex::Vertex(int p_polygon, int p_vertex) :
- polygon(p_polygon),
- vertex(p_vertex) {
- // vertex p_vertex of polygon p_polygon
-}
-
bool AbstractPolygon2DEditor::Vertex::operator==(const AbstractPolygon2DEditor::Vertex &p_vertex) const {
-
return polygon == p_vertex.polygon && vertex == p_vertex.vertex;
}
bool AbstractPolygon2DEditor::Vertex::operator!=(const AbstractPolygon2DEditor::Vertex &p_vertex) const {
-
return !(*this == p_vertex);
}
bool AbstractPolygon2DEditor::Vertex::valid() const {
-
return vertex >= 0;
}
-AbstractPolygon2DEditor::PosVertex::PosVertex() {
- // invalid vertex
-}
-
-AbstractPolygon2DEditor::PosVertex::PosVertex(const Vertex &p_vertex, const Vector2 &p_pos) :
- Vertex(p_vertex.polygon, p_vertex.vertex),
- pos(p_pos) {
-}
-
-AbstractPolygon2DEditor::PosVertex::PosVertex(int p_polygon, int p_vertex, const Vector2 &p_pos) :
- Vertex(p_polygon, p_vertex),
- pos(p_pos) {
-}
-
bool AbstractPolygon2DEditor::_is_empty() const {
-
- if (!_get_node())
+ if (!_get_node()) {
return true;
+ }
const int n = _get_polygon_count();
for (int i = 0; i < n; i++) {
-
Vector<Vector2> vertices = _get_polygon(i);
- if (vertices.size() != 0)
+ if (vertices.size() != 0) {
return false;
+ }
}
return true;
}
bool AbstractPolygon2DEditor::_is_line() const {
-
return false;
}
bool AbstractPolygon2DEditor::_has_uv() const {
-
return false;
}
int AbstractPolygon2DEditor::_get_polygon_count() const {
-
return 1;
}
Variant AbstractPolygon2DEditor::_get_polygon(int p_idx) const {
-
return _get_node()->get("polygon");
}
void AbstractPolygon2DEditor::_set_polygon(int p_idx, const Variant &p_polygon) const {
-
_get_node()->set("polygon", p_polygon);
}
void AbstractPolygon2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
-
Node2D *node = _get_node();
undo_redo->add_do_method(node, "set_polygon", p_polygon);
undo_redo->add_undo_method(node, "set_polygon", p_previous);
}
Vector2 AbstractPolygon2DEditor::_get_offset(int p_idx) const {
-
return Vector2(0, 0);
}
void AbstractPolygon2DEditor::_commit_action() {
-
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
undo_redo->commit_action();
}
void AbstractPolygon2DEditor::_action_add_polygon(const Variant &p_polygon) {
-
_action_set_polygon(0, p_polygon);
}
void AbstractPolygon2DEditor::_action_remove_polygon(int p_idx) {
-
_action_set_polygon(p_idx, _get_polygon(p_idx), Vector<Vector2>());
}
void AbstractPolygon2DEditor::_action_set_polygon(int p_idx, const Variant &p_polygon) {
-
_action_set_polygon(p_idx, _get_polygon(p_idx), p_polygon);
}
bool AbstractPolygon2DEditor::_has_resource() const {
-
return true;
}
@@ -167,18 +121,14 @@ void AbstractPolygon2DEditor::_create_resource() {
}
void AbstractPolygon2DEditor::_menu_option(int p_option) {
-
switch (p_option) {
-
case MODE_CREATE: {
-
mode = MODE_CREATE;
button_create->set_pressed(true);
button_edit->set_pressed(false);
button_delete->set_pressed(false);
} break;
case MODE_EDIT: {
-
_wip_close();
mode = MODE_EDIT;
button_create->set_pressed(false);
@@ -186,7 +136,6 @@ void AbstractPolygon2DEditor::_menu_option(int p_option) {
button_delete->set_pressed(false);
} break;
case MODE_DELETE: {
-
_wip_close();
mode = MODE_DELETE;
button_create->set_pressed(false);
@@ -197,11 +146,8 @@ void AbstractPolygon2DEditor::_menu_option(int p_option) {
}
void AbstractPolygon2DEditor::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_READY: {
-
disable_polygon_editing(false, String());
button_create->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("CurveCreate", "EditorIcons"));
@@ -216,7 +162,6 @@ void AbstractPolygon2DEditor::_notification(int p_what) {
}
void AbstractPolygon2DEditor::_node_removed(Node *p_node) {
-
if (p_node == _get_node()) {
edit(nullptr);
hide();
@@ -226,14 +171,12 @@ void AbstractPolygon2DEditor::_node_removed(Node *p_node) {
}
void AbstractPolygon2DEditor::_wip_changed() {
-
if (wip_active && _is_line()) {
_set_polygon(0, wip);
}
}
void AbstractPolygon2DEditor::_wip_cancel() {
-
wip.clear();
wip_active = false;
@@ -245,14 +188,13 @@ void AbstractPolygon2DEditor::_wip_cancel() {
}
void AbstractPolygon2DEditor::_wip_close() {
- if (!wip_active)
+ if (!wip_active) {
return;
+ }
if (_is_line()) {
-
_set_polygon(0, wip);
} else if (wip.size() >= (_is_line() ? 2 : 3)) {
-
undo_redo->create_action(TTR("Create Polygon"));
_action_add_polygon(wip);
if (_has_uv()) {
@@ -261,7 +203,6 @@ void AbstractPolygon2DEditor::_wip_close() {
}
_commit_action();
} else {
-
return;
}
@@ -279,7 +220,6 @@ void AbstractPolygon2DEditor::_wip_close() {
}
void AbstractPolygon2DEditor::disable_polygon_editing(bool p_disable, String p_reason) {
-
_polygon_editing_enabled = !p_disable;
button_create->set_disabled(p_disable);
@@ -287,12 +227,10 @@ void AbstractPolygon2DEditor::disable_polygon_editing(bool p_disable, String p_r
button_delete->set_disabled(p_disable);
if (p_disable) {
-
button_create->set_tooltip(p_reason);
button_edit->set_tooltip(p_reason);
button_delete->set_tooltip(p_reason);
} else {
-
button_create->set_tooltip(TTR("Create points."));
button_edit->set_tooltip(TTR("Edit points.\nLMB: Move Point\nRMB: Erase Point"));
button_delete->set_tooltip(TTR("Erase points."));
@@ -300,14 +238,13 @@ void AbstractPolygon2DEditor::disable_polygon_editing(bool p_disable, String p_r
}
bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
-
- if (!_get_node() || !_polygon_editing_enabled)
+ if (!_get_node() || !_polygon_editing_enabled) {
return false;
+ }
Ref<InputEventMouseButton> mb = p_event;
if (!_has_resource()) {
-
if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
create_resource->set_text(String("No polygon resource on this node.\nCreate and assign one?"));
create_resource->popup_centered();
@@ -316,11 +253,11 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
}
CanvasItemEditor::Tool tool = CanvasItemEditor::get_singleton()->get_current_tool();
- if (tool != CanvasItemEditor::TOOL_SELECT)
+ if (tool != CanvasItemEditor::TOOL_SELECT) {
return false;
+ }
if (mb.is_valid()) {
-
Transform2D xform = canvas_item_editor->get_canvas_transform() * _get_node()->get_global_transform();
Vector2 gpoint = mb->get_position();
@@ -329,17 +266,16 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
if (mode == MODE_EDIT || (_is_line() && mode == MODE_CREATE)) {
if (mb->get_button_index() == BUTTON_LEFT) {
if (mb->is_pressed()) {
- if (mb->get_control() || mb->get_shift() || mb->get_alt())
+ if (mb->get_control() || mb->get_shift() || mb->get_alt()) {
return false;
+ }
const PosVertex insert = closest_edge_point(gpoint);
if (insert.valid()) {
-
Vector<Vector2> vertices = _get_polygon(insert.polygon);
if (vertices.size() < (_is_line() ? 2 : 3)) {
-
vertices.push_back(cpoint);
undo_redo->create_action(TTR("Edit Polygon"));
selected_point = Vertex(insert.polygon, vertices.size());
@@ -347,7 +283,6 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
_commit_action();
return true;
} else {
-
Vector<Vector2> vertices2 = _get_polygon(insert.polygon);
pre_move_edit = vertices2;
edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos));
@@ -361,12 +296,10 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return true;
}
} else {
-
//look for points to move
const PosVertex closest = closest_point(gpoint);
if (closest.valid()) {
-
pre_move_edit = _get_polygon(closest.polygon);
edited_point = PosVertex(closest, xform.affine_inverse().xform(closest.pos));
selected_point = closest;
@@ -374,14 +307,11 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
canvas_item_editor->update_viewport();
return true;
} else {
-
selected_point = Vertex();
}
}
} else {
-
if (edited_point.valid()) {
-
//apply
Vector<Vector2> vertices = _get_polygon(edited_point.polygon);
@@ -397,23 +327,18 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
}
}
} else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && !edited_point.valid()) {
-
const PosVertex closest = closest_point(gpoint);
if (closest.valid()) {
-
remove_point(closest);
return true;
}
}
} else if (mode == MODE_DELETE) {
-
if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
-
const PosVertex closest = closest_point(gpoint);
if (closest.valid()) {
-
remove_point(closest);
return true;
}
@@ -421,11 +346,8 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
}
if (mode == MODE_CREATE) {
-
if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
-
if (_is_line()) {
-
// for lines, we don't have a wip mode, and we can undo each single add point.
Vector<Vector2> vertices = _get_polygon(0);
vertices.push_back(cpoint);
@@ -434,7 +356,6 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
_commit_action();
return true;
} else if (!wip_active) {
-
wip.clear();
wip.push_back(cpoint);
wip_active = true;
@@ -446,7 +367,6 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
edge_point = PosVertex();
return true;
} else {
-
const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) {
@@ -455,7 +375,6 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return true;
} else {
-
//add wip point
wip.push_back(cpoint);
_wip_changed();
@@ -474,11 +393,9 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
-
Vector2 gpoint = mm->get_position();
if (edited_point.valid() && (wip_active || (mm->get_button_mask() & BUTTON_MASK_LEFT))) {
-
Vector2 cpoint = _get_node()->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)));
//Move the point in a single axis. Should only work when editing a polygon and while holding shift.
@@ -494,7 +411,6 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
edited_point = PosVertex(edited_point, cpoint);
if (!wip_active) {
-
Vector<Vector2> vertices = _get_polygon(edited_point.polygon);
ERR_FAIL_INDEX_V(edited_point.vertex, vertices.size(), false);
vertices.write[edited_point.vertex] = cpoint - _get_offset(edited_point.polygon);
@@ -503,25 +419,20 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
canvas_item_editor->update_viewport();
} else if (mode == MODE_EDIT || (_is_line() && mode == MODE_CREATE)) {
-
const PosVertex onEdgeVertex = closest_edge_point(gpoint);
if (onEdgeVertex.valid()) {
-
hover_point = Vertex();
edge_point = onEdgeVertex;
canvas_item_editor->update_viewport();
} else {
-
if (edge_point.valid()) {
-
edge_point = PosVertex();
canvas_item_editor->update_viewport();
}
const PosVertex new_hover_point = closest_point(gpoint);
if (hover_point != new_hover_point) {
-
hover_point = new_hover_point;
canvas_item_editor->update_viewport();
}
@@ -532,13 +443,9 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed()) {
-
if (k->get_keycode() == KEY_DELETE || k->get_keycode() == KEY_BACKSPACE) {
-
if (wip_active && selected_point.polygon == -1) {
-
if (wip.size() > selected_point.vertex) {
-
wip.remove(selected_point.vertex);
_wip_changed();
selected_point = wip.size() - 1;
@@ -546,17 +453,14 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return true;
}
} else {
-
const Vertex active_point = get_active_point();
if (active_point.valid()) {
-
remove_point(active_point);
return true;
}
}
} else if (wip_active && k->get_keycode() == KEY_ENTER) {
-
_wip_close();
} else if (wip_active && k->get_keycode() == KEY_ESCAPE) {
_wip_cancel();
@@ -567,9 +471,9 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
}
void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
-
- if (!_get_node())
+ if (!_get_node()) {
return;
+ }
Transform2D xform = canvas_item_editor->get_canvas_transform() * _get_node()->get_global_transform();
// All polygon points are sharp, so use the sharp handle icon
@@ -580,31 +484,28 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
const bool is_closed = !_is_line();
for (int j = -1; j < n_polygons; j++) {
-
- if (wip_active && wip_destructive && j != -1)
+ if (wip_active && wip_destructive && j != -1) {
continue;
+ }
Vector<Vector2> points;
Vector2 offset;
if (wip_active && j == edited_point.polygon) {
-
points = Variant(wip);
offset = Vector2(0, 0);
} else {
-
- if (j == -1)
+ if (j == -1) {
continue;
+ }
points = _get_polygon(j);
offset = _get_offset(j);
}
if (!wip_active && j == edited_point.polygon && EDITOR_GET("editors/poly_editor/show_previous_outline")) {
-
const Color col = Color(0.5, 0.5, 0.5); // FIXME polygon->get_outline_color();
const int n = pre_move_edit.size();
for (int i = 0; i < n - (is_closed ? 0 : 1); i++) {
-
Vector2 p, p2;
p = pre_move_edit[i] + offset;
p2 = pre_move_edit[(i + 1) % n] + offset;
@@ -620,20 +521,19 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
const Color col = Color(1, 0.3, 0.1, 0.8);
for (int i = 0; i < n_points; i++) {
-
const Vertex vertex(j, i);
const Vector2 p = (vertex == edited_point) ? edited_point.pos : (points[i] + offset);
const Vector2 point = xform.xform(p);
if (is_closed || i < n_points - 1) {
-
Vector2 p2;
if (j == edited_point.polygon &&
- ((wip_active && i == n_points - 1) || (((i + 1) % n_points) == edited_point.vertex)))
+ ((wip_active && i == n_points - 1) || (((i + 1) % n_points) == edited_point.vertex))) {
p2 = edited_point.pos;
- else
+ } else {
p2 = points[(i + 1) % n_points] + offset;
+ }
const Vector2 next_point = xform.xform(p2);
p_overlay->draw_line(point, next_point, col, Math::round(2 * EDSCALE));
@@ -641,7 +541,6 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
}
for (int i = 0; i < n_points; i++) {
-
const Vertex vertex(j, i);
const Vector2 p = (vertex == edited_point) ? edited_point.pos : (points[i] + offset);
@@ -660,26 +559,25 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
}
if (edge_point.valid()) {
-
Ref<Texture2D> add_handle = get_theme_icon("EditorHandleAdd", "EditorIcons");
p_overlay->draw_texture(add_handle, edge_point.pos - add_handle->get_size() * 0.5);
}
}
void AbstractPolygon2DEditor::edit(Node *p_polygon) {
-
- if (!canvas_item_editor)
+ if (!canvas_item_editor) {
canvas_item_editor = CanvasItemEditor::get_singleton();
+ }
if (p_polygon) {
-
_set_node(p_polygon);
// Enable the pencil tool if the polygon is empty.
- if (_is_empty())
+ if (_is_empty()) {
_menu_option(MODE_CREATE);
- else
+ } else {
_menu_option(MODE_EDIT);
+ }
wip.clear();
wip_active = false;
@@ -689,7 +587,6 @@ void AbstractPolygon2DEditor::edit(Node *p_polygon) {
canvas_item_editor->update_viewport();
} else {
-
_set_node(nullptr);
}
}
@@ -698,38 +595,35 @@ void AbstractPolygon2DEditor::_bind_methods() {
}
void AbstractPolygon2DEditor::remove_point(const Vertex &p_vertex) {
-
Vector<Vector2> vertices = _get_polygon(p_vertex.polygon);
if (vertices.size() > (_is_line() ? 2 : 3)) {
-
vertices.remove(p_vertex.vertex);
undo_redo->create_action(TTR("Edit Polygon (Remove Point)"));
_action_set_polygon(p_vertex.polygon, vertices);
_commit_action();
} else {
-
undo_redo->create_action(TTR("Remove Polygon And Point"));
_action_remove_polygon(p_vertex.polygon);
_commit_action();
}
- if (_is_empty())
+ if (_is_empty()) {
_menu_option(MODE_CREATE);
+ }
hover_point = Vertex();
- if (selected_point == p_vertex)
+ if (selected_point == p_vertex) {
selected_point = Vertex();
+ }
}
AbstractPolygon2DEditor::Vertex AbstractPolygon2DEditor::get_active_point() const {
-
return hover_point.valid() ? hover_point : selected_point;
}
AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_point(const Vector2 &p_pos) const {
-
const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
const int n_polygons = _get_polygon_count();
@@ -739,13 +633,11 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_point(const
real_t closest_dist = 1e10;
for (int j = 0; j < n_polygons; j++) {
-
Vector<Vector2> points = _get_polygon(j);
const Vector2 offset = _get_offset(j);
const int n_points = points.size();
for (int i = 0; i < n_points; i++) {
-
Vector2 cp = xform.xform(points[i] + offset);
real_t d = cp.distance_to(p_pos);
@@ -760,7 +652,6 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_point(const
}
AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(const Vector2 &p_pos) const {
-
const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
const real_t eps = grab_threshold * 2;
const real_t eps2 = eps * eps;
@@ -772,21 +663,20 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c
real_t closest_dist = 1e10;
for (int j = 0; j < n_polygons; j++) {
-
Vector<Vector2> points = _get_polygon(j);
const Vector2 offset = _get_offset(j);
const int n_points = points.size();
const int n_segments = n_points - (_is_line() ? 1 : 0);
for (int i = 0; i < n_segments; i++) {
-
Vector2 segment[2] = { xform.xform(points[i] + offset),
xform.xform(points[(i + 1) % n_points] + offset) };
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(p_pos, segment);
+ Vector2 cp = Geometry2D::get_closest_point_to_segment(p_pos, segment);
- if (cp.distance_squared_to(segment[0]) < eps2 || cp.distance_squared_to(segment[1]) < eps2)
+ if (cp.distance_squared_to(segment[0]) < eps2 || cp.distance_squared_to(segment[1]) < eps2) {
continue; //not valid to reuse point
+ }
real_t d = cp.distance_to(p_pos);
if (d < closest_dist && d < grab_threshold) {
@@ -800,7 +690,6 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c
}
AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wip_destructive) {
-
canvas_item_editor = nullptr;
editor = p_editor;
undo_redo = EditorNode::get_undo_redo();
@@ -837,22 +726,17 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wi
}
void AbstractPolygon2DEditorPlugin::edit(Object *p_object) {
-
polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool AbstractPolygon2DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class(klass);
}
void AbstractPolygon2DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
polygon_editor->show();
} else {
-
polygon_editor->hide();
polygon_editor->edit(nullptr);
}
diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h
index 6ed6d0a257..d5b3a916d1 100644
--- a/editor/plugins/abstract_polygon_2d_editor.h
+++ b/editor/plugins/abstract_polygon_2d_editor.h
@@ -39,7 +39,6 @@
class CanvasItemEditor;
class AbstractPolygon2DEditor : public HBoxContainer {
-
GDCLASS(AbstractPolygon2DEditor, HBoxContainer);
ToolButton *button_create;
@@ -47,23 +46,30 @@ class AbstractPolygon2DEditor : public HBoxContainer {
ToolButton *button_delete;
struct Vertex {
- Vertex();
- Vertex(int p_vertex);
- Vertex(int p_polygon, int p_vertex);
+ Vertex() {}
+ Vertex(int p_vertex) :
+ vertex(p_vertex) {}
+ Vertex(int p_polygon, int p_vertex) :
+ polygon(p_polygon),
+ vertex(p_vertex) {}
bool operator==(const Vertex &p_vertex) const;
bool operator!=(const Vertex &p_vertex) const;
bool valid() const;
- int polygon;
- int vertex;
+ int polygon = -1;
+ int vertex = -1;
};
struct PosVertex : public Vertex {
- PosVertex();
- PosVertex(const Vertex &p_vertex, const Vector2 &p_pos);
- PosVertex(int p_polygon, int p_vertex, const Vector2 &p_pos);
+ PosVertex() {}
+ PosVertex(const Vertex &p_vertex, const Vector2 &p_pos) :
+ Vertex(p_vertex.polygon, p_vertex.vertex),
+ pos(p_pos) {}
+ PosVertex(int p_polygon, int p_vertex, const Vector2 &p_pos) :
+ Vertex(p_polygon, p_vertex),
+ pos(p_pos) {}
Vector2 pos;
};
@@ -144,7 +150,6 @@ public:
};
class AbstractPolygon2DEditorPlugin : public EditorPlugin {
-
GDCLASS(AbstractPolygon2DEditorPlugin, EditorPlugin);
AbstractPolygon2DEditor *polygon_editor;
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index eb50df2166..75eacf56ec 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -81,8 +81,9 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
for (List<StringName>::Element *E = classes.front(); E; E = E->next()) {
String name = String(E->get()).replace_first("AnimationNode", "");
- if (name == "Animation")
+ if (name == "Animation") {
continue;
+ }
int idx = menu->get_item_count();
menu->add_item(vformat("Add %s", name), idx);
@@ -117,7 +118,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
_update_tool_erase();
for (int i = 0; i < points.size(); i++) {
-
if (Math::abs(float(points[i] - mb->get_position().x)) < 10 * EDSCALE) {
selected_point = i;
@@ -196,7 +196,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
}
void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
-
Color linecolor = get_theme_color("font_color", "Label");
Color linecolor_soft = linecolor;
linecolor_soft.a *= 0.5;
@@ -227,7 +226,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
}
if (snap->is_pressed()) {
-
linecolor_soft.a = linecolor.a * 0.1;
if (blend_space->get_snap() > 0) {
@@ -303,9 +301,9 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
}
void AnimationNodeBlendSpace1DEditor::_update_space() {
-
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
@@ -322,8 +320,9 @@ void AnimationNodeBlendSpace1DEditor::_update_space() {
}
void AnimationNodeBlendSpace1DEditor::_config_changed(double) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
undo_redo->create_action(TTR("Change BlendSpace1D Limits"));
@@ -342,8 +341,9 @@ void AnimationNodeBlendSpace1DEditor::_config_changed(double) {
}
void AnimationNodeBlendSpace1DEditor::_labels_changed(String) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
undo_redo->create_action(TTR("Change BlendSpace1D Labels"), UndoRedo::MERGE_ENDS);
@@ -360,7 +360,6 @@ void AnimationNodeBlendSpace1DEditor::_snap_toggled() {
}
void AnimationNodeBlendSpace1DEditor::_file_opened(const String &p_file) {
-
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
@@ -370,7 +369,6 @@ void AnimationNodeBlendSpace1DEditor::_file_opened(const String &p_file) {
void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
Ref<AnimationRootNode> node;
if (p_index == MENU_LOAD_FILE) {
-
open_file->clear_filters();
List<String> filters;
ResourceLoader::get_recognized_extensions_for_type("AnimationRootNode", &filters);
@@ -383,7 +381,6 @@ void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
node = file_loaded;
file_loaded.unref();
} else if (p_index == MENU_PASTE) {
-
node = EditorSettings::get_singleton()->get_resource_clipboard();
} else {
String type = menu->get_item_metadata(p_index);
@@ -432,7 +429,6 @@ void AnimationNodeBlendSpace1DEditor::_add_animation_type(int p_index) {
}
void AnimationNodeBlendSpace1DEditor::_tool_switch(int p_tool) {
-
if (p_tool == 0) {
tool_erase->show();
tool_erase_sep->show();
@@ -446,8 +442,9 @@ void AnimationNodeBlendSpace1DEditor::_tool_switch(int p_tool) {
}
void AnimationNodeBlendSpace1DEditor::_update_edited_point_pos() {
- if (updating)
+ if (updating) {
return;
+ }
if (selected_point >= 0 && selected_point < blend_space->get_blend_point_count()) {
float pos = blend_space->get_blend_point_position(selected_point);
@@ -467,7 +464,6 @@ void AnimationNodeBlendSpace1DEditor::_update_edited_point_pos() {
}
void AnimationNodeBlendSpace1DEditor::_update_tool_erase() {
-
bool point_valid = selected_point >= 0 && selected_point < blend_space->get_blend_point_count();
tool_erase->set_disabled(!point_valid);
@@ -504,8 +500,9 @@ void AnimationNodeBlendSpace1DEditor::_erase_selected() {
}
void AnimationNodeBlendSpace1DEditor::_edit_point_pos(double) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
undo_redo->create_action(TTR("Move BlendSpace1D Node Point"));
@@ -522,7 +519,6 @@ void AnimationNodeBlendSpace1DEditor::_edit_point_pos(double) {
}
void AnimationNodeBlendSpace1DEditor::_open_editor() {
-
if (selected_point >= 0 && selected_point < blend_space->get_blend_point_count()) {
Ref<AnimationNode> an = blend_space->get_blend_point_node(selected_point);
ERR_FAIL_COND(an.is_null());
@@ -575,13 +571,11 @@ void AnimationNodeBlendSpace1DEditor::_bind_methods() {
}
bool AnimationNodeBlendSpace1DEditor::can_edit(const Ref<AnimationNode> &p_node) {
-
Ref<AnimationNodeBlendSpace1D> b1d = p_node;
return b1d.is_valid();
}
void AnimationNodeBlendSpace1DEditor::edit(const Ref<AnimationNode> &p_node) {
-
blend_space = p_node;
if (!blend_space.is_null()) {
diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h
index 346ad36cff..8cfd6714ad 100644
--- a/editor/plugins/animation_blend_space_1d_editor.h
+++ b/editor/plugins/animation_blend_space_1d_editor.h
@@ -42,7 +42,6 @@
#include "scene/gui/tree.h"
class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
-
GDCLASS(AnimationNodeBlendSpace1DEditor, AnimationTreeNodeEditorPlugin);
Ref<AnimationNodeBlendSpace1D> blend_space;
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 4ea84e716b..a7d5c2207b 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -32,7 +32,7 @@
#include "core/input/input.h"
#include "core/io/resource_loader.h"
-#include "core/math/delaunay_2d.h"
+#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
#include "core/project_settings.h"
#include "editor/editor_scale.h"
@@ -43,7 +43,6 @@
#include "scene/main/window.h"
bool AnimationNodeBlendSpace2DEditor::can_edit(const Ref<AnimationNode> &p_node) {
-
Ref<AnimationNodeBlendSpace2D> bs2d = p_node;
return bs2d.is_valid();
}
@@ -53,7 +52,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_changed() {
}
void AnimationNodeBlendSpace2DEditor::edit(const Ref<AnimationNode> &p_node) {
-
if (blend_space.is_valid()) {
blend_space->disconnect("triangles_updated", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_changed));
}
@@ -71,7 +69,6 @@ StringName AnimationNodeBlendSpace2DEditor::get_blend_position_path() const {
}
void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) {
if (selected_point != -1 || selected_triangle != -1) {
@@ -107,10 +104,10 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
for (List<StringName>::Element *E = classes.front(); E; E = E->next()) {
-
String name = String(E->get()).replace_first("AnimationNode", "");
- if (name == "Animation")
+ if (name == "Animation") {
continue; // nope
+ }
int idx = menu->get_item_count();
menu->add_item(vformat("Add %s", name), idx);
menu->set_item_metadata(idx, E->get());
@@ -138,7 +135,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
if (mb.is_valid() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
blend_space_draw->update(); //update anyway
//try to see if a point can be selected
selected_point = -1;
@@ -146,7 +142,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
_update_tool_erase();
for (int i = 0; i < points.size(); i++) {
-
if (points[i].distance_to(mb->get_position()) < 10 * EDSCALE) {
selected_point = i;
Ref<AnimationNode> node = blend_space->get_blend_point_node(i);
@@ -170,7 +165,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
triangle.push_back(points[idx]);
}
- if (Geometry::is_point_in_triangle(mb->get_position(), triangle[0], triangle[1], triangle[2])) {
+ if (Geometry2D::is_point_in_triangle(mb->get_position(), triangle[0], triangle[1], triangle[2])) {
selected_triangle = i;
_update_tool_erase();
return;
@@ -180,15 +175,14 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
if (mb.is_valid() && mb->is_pressed() && tool_triangle->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
blend_space_draw->update(); //update anyway
//try to see if a point can be selected
selected_point = -1;
for (int i = 0; i < points.size(); i++) {
-
- if (making_triangle.find(i) != -1)
+ if (making_triangle.find(i) != -1) {
continue;
+ }
if (points[i].distance_to(mb->get_position()) < 10 * EDSCALE) {
making_triangle.push_back(i);
@@ -243,7 +237,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
if (mb.is_valid() && mb->is_pressed() && tool_blend->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
Vector2 blend_pos = (mb->get_position() / blend_space_draw->get_size());
blend_pos.y = 1.0 - blend_pos.y;
blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space());
@@ -278,7 +271,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
if (mm.is_valid() && tool_blend->is_pressed() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
-
Vector2 blend_pos = (mm->get_position() / blend_space_draw->get_size());
blend_pos.y = 1.0 - blend_pos.y;
blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space());
@@ -291,7 +283,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
void AnimationNodeBlendSpace2DEditor::_file_opened(const String &p_file) {
-
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
@@ -299,10 +290,8 @@ void AnimationNodeBlendSpace2DEditor::_file_opened(const String &p_file) {
}
void AnimationNodeBlendSpace2DEditor::_add_menu_type(int p_index) {
-
Ref<AnimationRootNode> node;
if (p_index == MENU_LOAD_FILE) {
-
open_file->clear_filters();
List<String> filters;
ResourceLoader::get_recognized_extensions_for_type("AnimationRootNode", &filters);
@@ -315,7 +304,6 @@ void AnimationNodeBlendSpace2DEditor::_add_menu_type(int p_index) {
node = file_loaded;
file_loaded.unref();
} else if (p_index == MENU_PASTE) {
-
node = EditorSettings::get_singleton()->get_resource_clipboard();
} else {
String type = menu->get_item_metadata(p_index);
@@ -346,7 +334,6 @@ void AnimationNodeBlendSpace2DEditor::_add_menu_type(int p_index) {
}
void AnimationNodeBlendSpace2DEditor::_add_animation_type(int p_index) {
-
Ref<AnimationNodeAnimation> anim;
anim.instance();
@@ -405,7 +392,6 @@ void AnimationNodeBlendSpace2DEditor::_tool_switch(int p_tool) {
}
void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
-
Color linecolor = get_theme_color("font_color", "Label");
Color linecolor_soft = linecolor;
linecolor_soft.a *= 0.5;
@@ -438,14 +424,11 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
}
if (snap->is_pressed()) {
-
linecolor_soft.a = linecolor.a * 0.1;
if (blend_space->get_snap().x > 0) {
-
int prev_idx = 0;
for (int i = 0; i < s.x; i++) {
-
float v = blend_space->get_min_space().x + i * (blend_space->get_max_space().x - blend_space->get_min_space().x) / s.x;
int idx = int(v / blend_space->get_snap().x);
@@ -458,10 +441,8 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
}
if (blend_space->get_snap().y > 0) {
-
int prev_idx = 0;
for (int i = 0; i < s.y; i++) {
-
float v = blend_space->get_max_space().y - i * (blend_space->get_max_space().y - blend_space->get_min_space().y) / s.y;
int idx = int(v / blend_space->get_snap().y);
@@ -476,7 +457,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
//triangles first
for (int i = 0; i < blend_space->get_triangle_count(); i++) {
-
Vector<Vector2> points;
points.resize(3);
@@ -518,7 +498,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
points.clear();
for (int i = 0; i < blend_space->get_blend_point_count(); i++) {
-
Vector2 point = blend_space->get_blend_point_position(i);
if (dragging_selected && selected_point == i) {
point += drag_ofs;
@@ -597,14 +576,13 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
}
void AnimationNodeBlendSpace2DEditor::_snap_toggled() {
-
blend_space_draw->update();
}
void AnimationNodeBlendSpace2DEditor::_update_space() {
-
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
@@ -636,8 +614,9 @@ void AnimationNodeBlendSpace2DEditor::_update_space() {
}
void AnimationNodeBlendSpace2DEditor::_config_changed(double) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
undo_redo->create_action(TTR("Change BlendSpace2D Limits"));
@@ -658,8 +637,9 @@ void AnimationNodeBlendSpace2DEditor::_config_changed(double) {
}
void AnimationNodeBlendSpace2DEditor::_labels_changed(String) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
undo_redo->create_action(TTR("Change BlendSpace2D Labels"), UndoRedo::MERGE_ENDS);
@@ -674,9 +654,7 @@ void AnimationNodeBlendSpace2DEditor::_labels_changed(String) {
}
void AnimationNodeBlendSpace2DEditor::_erase_selected() {
-
if (selected_point != -1) {
-
updating = true;
undo_redo->create_action(TTR("Remove BlendSpace2D Point"));
undo_redo->add_do_method(blend_space.ptr(), "remove_blend_point", selected_point);
@@ -699,7 +677,6 @@ void AnimationNodeBlendSpace2DEditor::_erase_selected() {
blend_space_draw->update();
} else if (selected_triangle != -1) {
-
updating = true;
undo_redo->create_action(TTR("Remove BlendSpace2D Triangle"));
undo_redo->add_do_method(blend_space.ptr(), "remove_triangle", selected_triangle);
@@ -715,8 +692,9 @@ void AnimationNodeBlendSpace2DEditor::_erase_selected() {
}
void AnimationNodeBlendSpace2DEditor::_update_edited_point_pos() {
- if (updating)
+ if (updating) {
return;
+ }
if (selected_point >= 0 && selected_point < blend_space->get_blend_point_count()) {
Vector2 pos = blend_space->get_blend_point_position(selected_point);
@@ -735,8 +713,9 @@ void AnimationNodeBlendSpace2DEditor::_update_edited_point_pos() {
}
void AnimationNodeBlendSpace2DEditor::_edit_point_pos(double) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
undo_redo->create_action(TTR("Move Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, Vector2(edit_x->get_value(), edit_y->get_value()));
@@ -752,7 +731,6 @@ void AnimationNodeBlendSpace2DEditor::_edit_point_pos(double) {
}
void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
error_panel->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree"));
error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor"));
@@ -772,7 +750,6 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_PROCESS) {
-
String error;
if (!AnimationTreeEditor::get_singleton()->get_tree()) {
@@ -801,7 +778,6 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
}
void AnimationNodeBlendSpace2DEditor::_open_editor() {
-
if (selected_point >= 0 && selected_point < blend_space->get_blend_point_count()) {
Ref<AnimationNode> an = blend_space->get_blend_point_node(selected_point);
ERR_FAIL_COND(an.is_null());
@@ -814,7 +790,6 @@ void AnimationNodeBlendSpace2DEditor::_removed_from_graph() {
}
void AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled() {
-
undo_redo->create_action(TTR("Toggle Auto Triangles"));
undo_redo->add_do_method(blend_space.ptr(), "set_auto_triangles", auto_triangles->is_pressed());
undo_redo->add_undo_method(blend_space.ptr(), "set_auto_triangles", blend_space->get_auto_triangles());
@@ -824,7 +799,6 @@ void AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled() {
}
void AnimationNodeBlendSpace2DEditor::_bind_methods() {
-
ClassDB::bind_method("_update_space", &AnimationNodeBlendSpace2DEditor::_update_space);
ClassDB::bind_method("_update_tool_erase", &AnimationNodeBlendSpace2DEditor::_update_tool_erase);
@@ -836,7 +810,6 @@ void AnimationNodeBlendSpace2DEditor::_bind_methods() {
AnimationNodeBlendSpace2DEditor *AnimationNodeBlendSpace2DEditor::singleton = nullptr;
AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
-
singleton = this;
updating = false;
diff --git a/editor/plugins/animation_blend_space_2d_editor.h b/editor/plugins/animation_blend_space_2d_editor.h
index 50b0d9a06c..b430a12297 100644
--- a/editor/plugins/animation_blend_space_2d_editor.h
+++ b/editor/plugins/animation_blend_space_2d_editor.h
@@ -42,7 +42,6 @@
#include "scene/gui/tree.h"
class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
-
GDCLASS(AnimationNodeBlendSpace2DEditor, AnimationTreeNodeEditorPlugin);
Ref<AnimationNodeBlendSpace2D> blend_space;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 23e547f55d..82d942821f 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -43,7 +43,6 @@
#include "scene/main/window.h"
void AnimationNodeBlendTreeEditor::add_custom_type(const String &p_name, const Ref<Script> &p_script) {
-
for (int i = 0; i < add_options.size(); i++) {
ERR_FAIL_COND(add_options[i].script == p_script);
}
@@ -57,7 +56,6 @@ void AnimationNodeBlendTreeEditor::add_custom_type(const String &p_name, const R
}
void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_script) {
-
for (int i = 0; i < add_options.size(); i++) {
if (add_options[i].script == p_script) {
add_options.remove(i);
@@ -69,7 +67,6 @@ void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_scrip
}
void AnimationNodeBlendTreeEditor::_update_options_menu() {
-
add_node->get_popup()->clear();
for (int i = 0; i < add_options.size(); i++) {
add_node->get_popup()->add_item(add_options[i].name, i);
@@ -86,12 +83,10 @@ void AnimationNodeBlendTreeEditor::_update_options_menu() {
}
Size2 AnimationNodeBlendTreeEditor::get_minimum_size() const {
-
return Size2(10, 200);
}
void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_property, const Variant &p_value, const String &p_field, bool p_changing) {
-
AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_tree();
updating = true;
undo_redo->create_action(TTR("Parameter Changed") + ": " + String(p_property), UndoRedo::MERGE_ENDS);
@@ -104,9 +99,9 @@ void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_propert
}
void AnimationNodeBlendTreeEditor::_update_graph() {
-
- if (updating)
+ if (updating) {
return;
+ }
visible_properties.clear();
@@ -115,7 +110,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
graph->clear_connections();
//erase all nodes
for (int i = 0; i < graph->get_child_count(); i++) {
-
if (Object::cast_to<GraphNode>(graph->get_child(i))) {
memdelete(graph->get_child(i));
i--;
@@ -128,7 +122,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
blend_tree->get_node_list(&nodes);
for (List<StringName>::Element *E = nodes.front(); E; E = E->next()) {
-
GraphNode *node = memnew(GraphNode);
graph->add_child(node);
@@ -163,7 +156,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
List<PropertyInfo> pinfo;
agnode->get_parameter_list(&pinfo);
for (List<PropertyInfo>::Element *F = pinfo.front(); F; F = F->next()) {
-
if (!(F->get().usage & PROPERTY_USAGE_EDITOR)) {
continue;
}
@@ -192,7 +184,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
}
if (agnode->has_filter()) {
-
node->add_child(memnew(HSeparator));
Button *edit_filters = memnew(Button);
edit_filters->set_text(TTR("Edit Filters"));
@@ -204,7 +195,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
Ref<AnimationNodeAnimation> anim = agnode;
if (anim.is_valid()) {
-
MenuButton *mb = memnew(MenuButton);
mb->set_text(anim->get_animation());
mb->set_icon(get_theme_icon("Animation", "EditorIcons"));
@@ -259,7 +249,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
blend_tree->get_node_connections(&connections);
for (List<AnimationNodeBlendTree::NodeConnection>::Element *E = connections.front(); E; E = E->next()) {
-
StringName from = E->get().output_node;
StringName to = E->get().input_node;
int to_idx = E->get().input_index;
@@ -269,7 +258,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
}
void AnimationNodeBlendTreeEditor::_file_opened(const String &p_file) {
-
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_node(MENU_LOAD_FILE_CONFIRM);
@@ -277,13 +265,11 @@ void AnimationNodeBlendTreeEditor::_file_opened(const String &p_file) {
}
void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
-
Ref<AnimationNode> anode;
String base_name;
if (p_idx == MENU_LOAD_FILE) {
-
open_file->clear_filters();
List<String> filters;
ResourceLoader::get_recognized_extensions_for_type("AnimationNode", &filters);
@@ -297,7 +283,6 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
file_loaded.unref();
base_name = anode->get_class();
} else if (p_idx == MENU_PASTE) {
-
anode = EditorSettings::get_singleton()->get_resource_clipboard();
ERR_FAIL_COND(!anode.is_valid());
base_name = anode->get_class();
@@ -347,7 +332,6 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
}
void AnimationNodeBlendTreeEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_to, const StringName &p_which) {
-
updating = true;
undo_redo->create_action(TTR("Node Moved"));
undo_redo->add_do_method(blend_tree.ptr(), "set_node_position", p_which, p_to / EDSCALE);
@@ -359,7 +343,6 @@ void AnimationNodeBlendTreeEditor::_node_dragged(const Vector2 &p_from, const Ve
}
void AnimationNodeBlendTreeEditor::_connection_request(const String &p_from, int p_from_index, const String &p_to, int p_to_index) {
-
AnimationNodeBlendTree::ConnectionError err = blend_tree->can_connect_node(p_to, p_to_index, p_from);
if (err != AnimationNodeBlendTree::CONNECTION_OK) {
@@ -376,7 +359,6 @@ void AnimationNodeBlendTreeEditor::_connection_request(const String &p_from, int
}
void AnimationNodeBlendTreeEditor::_disconnection_request(const String &p_from, int p_from_index, const String &p_to, int p_to_index) {
-
graph->disconnect_node(p_from, p_from_index, p_to, p_to_index);
updating = true;
@@ -390,7 +372,6 @@ void AnimationNodeBlendTreeEditor::_disconnection_request(const String &p_from,
}
void AnimationNodeBlendTreeEditor::_anim_selected(int p_index, Array p_options, const String &p_node) {
-
String option = p_options[p_index];
Ref<AnimationNodeAnimation> anim = blend_tree->get_node(p_node);
@@ -405,7 +386,6 @@ void AnimationNodeBlendTreeEditor::_anim_selected(int p_index, Array p_options,
}
void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
-
undo_redo->create_action(TTR("Delete Node"));
undo_redo->add_do_method(blend_tree.ptr(), "remove_node", p_which);
undo_redo->add_undo_method(blend_tree.ptr(), "add_node", p_which, blend_tree->get_node(p_which), blend_tree.ptr()->get_node_position(p_which));
@@ -425,7 +405,6 @@ void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
}
void AnimationNodeBlendTreeEditor::_delete_nodes_request() {
-
List<StringName> to_erase;
for (int i = 0; i < graph->get_child_count(); i++) {
@@ -437,8 +416,9 @@ void AnimationNodeBlendTreeEditor::_delete_nodes_request() {
}
}
- if (to_erase.empty())
+ if (to_erase.empty()) {
return;
+ }
undo_redo->create_action(TTR("Delete Node(s)"));
@@ -450,7 +430,6 @@ void AnimationNodeBlendTreeEditor::_delete_nodes_request() {
}
void AnimationNodeBlendTreeEditor::_popup_request(const Vector2 &p_position) {
-
_update_options_menu();
use_popup_menu_position = true;
popup_menu_position = graph->get_local_mouse_position();
@@ -459,7 +438,6 @@ void AnimationNodeBlendTreeEditor::_popup_request(const Vector2 &p_position) {
}
void AnimationNodeBlendTreeEditor::_node_selected(Object *p_node) {
-
GraphNode *gn = Object::cast_to<GraphNode>(p_node);
ERR_FAIL_COND(!gn);
@@ -472,14 +450,12 @@ void AnimationNodeBlendTreeEditor::_node_selected(Object *p_node) {
}
void AnimationNodeBlendTreeEditor::_open_in_editor(const String &p_which) {
-
Ref<AnimationNode> an = blend_tree->get_node(p_which);
ERR_FAIL_COND(!an.is_valid());
AnimationTreeEditor::get_singleton()->enter_editor(p_which);
}
void AnimationNodeBlendTreeEditor::_filter_toggled() {
-
updating = true;
undo_redo->create_action(TTR("Toggle Filter On/Off"));
undo_redo->add_do_method(_filter_edit.ptr(), "set_filter_enabled", filter_enabled->is_pressed());
@@ -491,7 +467,6 @@ void AnimationNodeBlendTreeEditor::_filter_toggled() {
}
void AnimationNodeBlendTreeEditor::_filter_edited() {
-
TreeItem *edited = filters->get_edited();
ERR_FAIL_COND(!edited);
@@ -509,9 +484,9 @@ void AnimationNodeBlendTreeEditor::_filter_edited() {
}
bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &anode) {
-
- if (updating || _filter_edit != anode)
+ if (updating || _filter_edit != anode) {
return false;
+ }
NodePath player_path = AnimationTreeEditor::get_singleton()->get_tree()->get_animation_player();
@@ -542,7 +517,6 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
player->get_animation_list(&animations);
for (List<StringName>::Element *E = animations.front(); E; E = E->next()) {
-
Ref<Animation> anim = player->get_animation(E->get());
for (int i = 0; i < anim->get_track_count(); i++) {
String track_path = anim->track_get_path(i);
@@ -577,7 +551,6 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
Map<String, TreeItem *> parenthood;
for (Set<String>::Element *E = paths.front(); E; E = E->next()) {
-
NodePath path = E->get();
TreeItem *ti = nullptr;
String accum;
@@ -612,11 +585,11 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
if (base->has_node(accum)) {
node = base->get_node(accum);
}
- if (!node)
+ if (!node) {
continue; //no node, can't edit
+ }
if (path.get_subname_count()) {
-
String concat = path.get_concatenated_subnames();
Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
@@ -697,13 +670,13 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
}
void AnimationNodeBlendTreeEditor::_edit_filters(const String &p_which) {
-
Ref<AnimationNode> anode = blend_tree->get_node(p_which);
ERR_FAIL_COND(!anode.is_valid());
_filter_edit = anode;
- if (!_update_filters(anode))
+ if (!_update_filters(anode)) {
return;
+ }
filter_dialog->popup_centered(Size2(500, 500) * EDSCALE);
}
@@ -715,18 +688,16 @@ void AnimationNodeBlendTreeEditor::_removed_from_graph() {
}
void AnimationNodeBlendTreeEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
-
error_panel->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree"));
error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor"));
- if (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree())
+ if (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree()) {
_update_graph();
+ }
}
if (p_what == NOTIFICATION_PROCESS) {
-
String error;
if (!AnimationTreeEditor::get_singleton()->get_tree()->is_active()) {
@@ -789,15 +760,15 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
}
void AnimationNodeBlendTreeEditor::_scroll_changed(const Vector2 &p_scroll) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
blend_tree->set_graph_offset(p_scroll / EDSCALE);
updating = false;
}
void AnimationNodeBlendTreeEditor::_bind_methods() {
-
ClassDB::bind_method("_update_graph", &AnimationNodeBlendTreeEditor::_update_graph);
ClassDB::bind_method("_update_filters", &AnimationNodeBlendTreeEditor::_update_filters);
}
@@ -805,7 +776,6 @@ void AnimationNodeBlendTreeEditor::_bind_methods() {
AnimationNodeBlendTreeEditor *AnimationNodeBlendTreeEditor::singleton = nullptr;
void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<AnimationNode> p_node) {
-
String prev_name = blend_tree->get_node_name(p_node);
ERR_FAIL_COND(prev_name == String());
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_node(prev_name));
@@ -858,7 +828,6 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
blend_tree->get_node_connections(&connections);
for (List<AnimationNodeBlendTree::NodeConnection>::Element *E = connections.front(); E; E = E->next()) {
-
StringName from = E->get().output_node;
StringName to = E->get().input_node;
int to_idx = E->get().input_index;
@@ -888,7 +857,6 @@ bool AnimationNodeBlendTreeEditor::can_edit(const Ref<AnimationNode> &p_node) {
}
void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
-
if (blend_tree.is_valid()) {
blend_tree->disconnect("removed_from_graph", callable_mp(this, &AnimationNodeBlendTreeEditor::_removed_from_graph));
}
@@ -905,7 +873,6 @@ void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
}
AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
-
singleton = this;
updating = false;
use_popup_menu_position = false;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h
index 4f5badea9f..6bdb7e7909 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.h
+++ b/editor/plugins/animation_blend_tree_editor_plugin.h
@@ -44,7 +44,6 @@
class ProgressBar;
class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
-
GDCLASS(AnimationNodeBlendTreeEditor, AnimationTreeNodeEditorPlugin);
Ref<AnimationNodeBlendTree> blend_tree;
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 0a252cc0a3..1e0a9535e2 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -44,7 +44,6 @@
#include "servers/rendering_server.h"
void AnimationPlayerEditor::_node_removed(Node *p_node) {
-
if (player && player == p_node) {
player = nullptr;
@@ -58,24 +57,21 @@ void AnimationPlayerEditor::_node_removed(Node *p_node) {
}
void AnimationPlayerEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_PROCESS: {
-
- if (!player)
+ if (!player) {
return;
+ }
updating = true;
if (player->is_playing()) {
-
{
String animname = player->get_assigned_animation();
if (player->has_animation(animname)) {
Ref<Animation> anim = player->get_animation(animname);
if (!anim.is_null()) {
-
frame->set_max(anim->get_length());
}
}
@@ -96,7 +92,6 @@ void AnimationPlayerEditor::_notification(int p_what) {
updating = false;
} break;
case NOTIFICATION_ENTER_TREE: {
-
tool_anim->get_popup()->connect("id_pressed", callable_mp(this, &AnimationPlayerEditor::_animation_tool_menu));
onion_skinning->get_popup()->connect("id_pressed", callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
@@ -108,11 +103,9 @@ void AnimationPlayerEditor::_notification(int p_what) {
add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox("panel", "Panel"));
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox("panel", "Panel"));
} break;
case NOTIFICATION_THEME_CHANGED: {
-
autoplay->set_icon(get_theme_icon("AutoPlay", "EditorIcons"));
play->set_icon(get_theme_icon("PlayStart", "EditorIcons"));
@@ -147,9 +140,9 @@ void AnimationPlayerEditor::_notification(int p_what) {
}
void AnimationPlayerEditor::_autoplay_pressed() {
-
- if (updating)
+ if (updating) {
return;
+ }
if (animation->get_item_count() == 0) {
return;
}
@@ -176,17 +169,15 @@ void AnimationPlayerEditor::_autoplay_pressed() {
}
void AnimationPlayerEditor::_play_pressed() {
-
String current;
if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) {
-
current = animation->get_item_text(animation->get_selected());
}
if (current != "") {
-
- if (current == player->get_assigned_animation())
+ if (current == player->get_assigned_animation()) {
player->stop(); //so it won't blend with itself
+ }
player->play(current);
}
@@ -195,19 +186,15 @@ void AnimationPlayerEditor::_play_pressed() {
}
void AnimationPlayerEditor::_play_from_pressed() {
-
String current;
if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) {
-
current = animation->get_item_text(animation->get_selected());
}
if (current != "") {
-
float time = player->get_current_animation_position();
if (current == player->get_assigned_animation() && player->is_playing()) {
-
player->stop(); //so it won't blend with itself
}
@@ -220,17 +207,15 @@ void AnimationPlayerEditor::_play_from_pressed() {
}
void AnimationPlayerEditor::_play_bw_pressed() {
-
String current;
if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) {
-
current = animation->get_item_text(animation->get_selected());
}
if (current != "") {
-
- if (current == player->get_assigned_animation())
+ if (current == player->get_assigned_animation()) {
player->stop(); //so it won't blend with itself
+ }
player->play(current, -1, -1, true);
}
@@ -239,18 +224,16 @@ void AnimationPlayerEditor::_play_bw_pressed() {
}
void AnimationPlayerEditor::_play_bw_from_pressed() {
-
String current;
if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) {
-
current = animation->get_item_text(animation->get_selected());
}
if (current != "") {
-
float time = player->get_current_animation_position();
- if (current == player->get_assigned_animation())
+ if (current == player->get_assigned_animation()) {
player->stop(); //so it won't blend with itself
+ }
player->play(current, -1, -1, true);
player->seek(time);
@@ -259,8 +242,8 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
//unstop
stop->set_pressed(false);
}
-void AnimationPlayerEditor::_stop_pressed() {
+void AnimationPlayerEditor::_stop_pressed() {
if (!player) {
return;
}
@@ -271,24 +254,21 @@ void AnimationPlayerEditor::_stop_pressed() {
}
void AnimationPlayerEditor::_animation_selected(int p_which) {
-
- if (updating)
+ if (updating) {
return;
+ }
// when selecting an animation, the idea is that the only interesting behavior
// ui-wise is that it should play/blend the next one if currently playing
String current;
if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) {
-
current = animation->get_item_text(animation->get_selected());
}
if (current != "") {
-
player->set_assigned_animation(current);
Ref<Animation> anim = player->get_animation(current);
{
-
track_editor->set_animation(anim);
Node *root = player->get_node(player->get_root());
if (root) {
@@ -310,7 +290,6 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
}
void AnimationPlayerEditor::_animation_new() {
-
renaming = false;
name_title->set_text(TTR("New Animation Name:"));
@@ -318,8 +297,9 @@ void AnimationPlayerEditor::_animation_new() {
String base = TTR("New Anim");
while (true) {
String attempt = base;
- if (count > 1)
+ if (count > 1) {
attempt += " (" + itos(count) + ")";
+ }
if (player->has_animation(attempt)) {
count++;
continue;
@@ -333,10 +313,11 @@ void AnimationPlayerEditor::_animation_new() {
name->select_all();
name->grab_focus();
}
-void AnimationPlayerEditor::_animation_rename() {
- if (animation->get_item_count() == 0)
+void AnimationPlayerEditor::_animation_rename() {
+ if (animation->get_item_count() == 0) {
return;
+ }
int selected = animation->get_selected();
String selected_name = animation->get_item_text(selected);
@@ -347,6 +328,7 @@ void AnimationPlayerEditor::_animation_rename() {
name->select_all();
name->grab_focus();
}
+
void AnimationPlayerEditor::_animation_load() {
ERR_FAIL_COND(!player);
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
@@ -355,7 +337,6 @@ void AnimationPlayerEditor::_animation_load() {
ResourceLoader::get_recognized_extensions_for_type("Animation", &extensions);
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
-
file->add_filter("*." + E->get() + " ; " + E->get().to_upper());
}
@@ -364,10 +345,10 @@ void AnimationPlayerEditor::_animation_load() {
}
void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resource, const String &p_path) {
-
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
+ }
String path = ProjectSettings::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
@@ -382,7 +363,6 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resou
}
void AnimationPlayerEditor::_animation_save(const Ref<Resource> &p_resource) {
-
if (p_resource->get_path().is_resource_file()) {
_animation_save_in_path(p_resource, p_resource->get_path());
} else {
@@ -391,14 +371,12 @@ void AnimationPlayerEditor::_animation_save(const Ref<Resource> &p_resource) {
}
void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource) {
-
file->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
List<String> extensions;
ResourceSaver::get_recognized_extensions(p_resource, &extensions);
file->clear_filters();
for (int i = 0; i < extensions.size(); i++) {
-
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
@@ -412,7 +390,6 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource)
}
}
} else {
-
String existing;
if (extensions.size()) {
if (p_resource->get_name() != "") {
@@ -429,9 +406,9 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource)
}
void AnimationPlayerEditor::_animation_remove() {
-
- if (animation->get_item_count() == 0)
+ if (animation->get_item_count() == 0) {
return;
+ }
String current = animation->get_item_text(animation->get_selected());
@@ -440,7 +417,6 @@ void AnimationPlayerEditor::_animation_remove() {
}
void AnimationPlayerEditor::_animation_remove_confirmed() {
-
String current = animation->get_item_text(animation->get_selected());
Ref<Animation> anim = player->get_animation(current);
@@ -463,12 +439,9 @@ void AnimationPlayerEditor::_animation_remove_confirmed() {
}
void AnimationPlayerEditor::_select_anim_by_name(const String &p_anim) {
-
int idx = -1;
for (int i = 0; i < animation->get_item_count(); i++) {
-
if (animation->get_item_text(i) == p_anim) {
-
idx = i;
break;
}
@@ -482,7 +455,6 @@ void AnimationPlayerEditor::_select_anim_by_name(const String &p_anim) {
}
double AnimationPlayerEditor::_get_editor_step() const {
-
// Returns the effective snapping value depending on snapping modifiers, or 0 if snapping is disabled.
if (track_editor->is_snap_enabled()) {
const String current = player->get_assigned_animation();
@@ -497,7 +469,6 @@ double AnimationPlayerEditor::_get_editor_step() const {
}
void AnimationPlayerEditor::_animation_name_edited() {
-
player->stop();
String new_name = name->get_text();
@@ -534,7 +505,6 @@ void AnimationPlayerEditor::_animation_name_edited() {
_select_anim_by_name(new_name);
} else {
-
Ref<Animation> new_anim = Ref<Animation>(memnew(Animation));
new_anim->set_name(new_name);
@@ -556,9 +526,9 @@ void AnimationPlayerEditor::_animation_name_edited() {
}
void AnimationPlayerEditor::_blend_editor_next_changed(const int p_idx) {
-
- if (animation->get_item_count() == 0)
+ if (animation->get_item_count() == 0) {
return;
+ }
String current = animation->get_item_text(animation->get_selected());
@@ -571,14 +541,15 @@ void AnimationPlayerEditor::_blend_editor_next_changed(const int p_idx) {
}
void AnimationPlayerEditor::_animation_blend() {
-
- if (updating_blends)
+ if (updating_blends) {
return;
+ }
blend_editor.tree->clear();
- if (animation->get_item_count() == 0)
+ if (animation->get_item_count() == 0) {
return;
+ }
String current = animation->get_item_text(animation->get_selected());
@@ -599,7 +570,6 @@ void AnimationPlayerEditor::_animation_blend() {
blend_editor.next->add_item("", i);
for (List<StringName>::Element *E = anims.front(); E; E = E->next()) {
-
String to = E->get();
TreeItem *blend = blend_editor.tree->create_item(root);
blend->set_editable(0, false);
@@ -627,18 +597,20 @@ void AnimationPlayerEditor::_animation_blend() {
}
void AnimationPlayerEditor::_blend_edited() {
-
- if (updating_blends)
+ if (updating_blends) {
return;
+ }
- if (animation->get_item_count() == 0)
+ if (animation->get_item_count() == 0) {
return;
+ }
String current = animation->get_item_text(animation->get_selected());
TreeItem *selected = blend_editor.tree->get_edited();
- if (!selected)
+ if (!selected) {
return;
+ }
updating_blends = true;
String to = selected->get_text(0);
@@ -655,15 +627,14 @@ void AnimationPlayerEditor::_blend_edited() {
}
void AnimationPlayerEditor::ensure_visibility() {
-
- if (player && pin->is_pressed())
+ if (player && pin->is_pressed()) {
return; // another player is pinned, don't reset
+ }
_animation_edit();
}
Dictionary AnimationPlayerEditor::get_state() const {
-
Dictionary d;
d["visible"] = is_visible_in_tree();
@@ -675,8 +646,8 @@ Dictionary AnimationPlayerEditor::get_state() const {
return d;
}
-void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
+void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
if (!p_state.has("visible") || !p_state["visible"]) {
return;
}
@@ -685,7 +656,6 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
}
if (p_state.has("player")) {
-
Node *n = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["player"]);
if (Object::cast_to<AnimationPlayer>(n) && EditorNode::get_singleton()->get_editor_selection()->is_selected(n)) {
player = Object::cast_to<AnimationPlayer>(n);
@@ -710,7 +680,6 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
}
void AnimationPlayerEditor::_animation_resource_edit() {
-
if (animation->get_item_count()) {
String current = animation->get_item_text(animation->get_selected());
Ref<Animation> anim = player->get_animation(current);
@@ -719,7 +688,6 @@ void AnimationPlayerEditor::_animation_resource_edit() {
}
void AnimationPlayerEditor::_animation_edit() {
-
if (animation->get_item_count()) {
String current = animation->get_item_text(animation->get_selected());
Ref<Animation> anim = player->get_animation(current);
@@ -736,7 +704,6 @@ void AnimationPlayerEditor::_animation_edit() {
}
void AnimationPlayerEditor::_dialog_action(String p_file) {
-
switch (current_option) {
case RESOURCE_LOAD: {
ERR_FAIL_COND(!player);
@@ -745,16 +712,15 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
ERR_FAIL_COND_MSG(res.is_null(), "Cannot load Animation from file '" + p_file + "'.");
ERR_FAIL_COND_MSG(!res->is_class("Animation"), "Loaded resource from file '" + p_file + "' is not Animation.");
if (p_file.find_last("/") != -1) {
-
p_file = p_file.substr(p_file.find_last("/") + 1, p_file.length());
}
if (p_file.find_last("\\") != -1) {
-
p_file = p_file.substr(p_file.find_last("\\") + 1, p_file.length());
}
- if (p_file.find(".") != -1)
+ if (p_file.find(".") != -1) {
p_file = p_file.substr(0, p_file.find("."));
+ }
undo_redo->create_action(TTR("Load Animation"));
undo_redo->add_do_method(player, "add_animation", p_file, res);
@@ -768,7 +734,6 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
break;
}
case RESOURCE_SAVE: {
-
String current = animation->get_item_text(animation->get_selected());
if (current != "") {
Ref<Animation> anim = player->get_animation(current);
@@ -784,24 +749,20 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
}
void AnimationPlayerEditor::_scale_changed(const String &p_scale) {
-
player->set_speed_scale(p_scale.to_double());
}
void AnimationPlayerEditor::_update_animation() {
-
// the purpose of _update_animation is to reflect the current state
// of the animation player in the current editor..
updating = true;
if (player->is_playing()) {
-
play->set_pressed(true);
stop->set_pressed(false);
} else {
-
play->set_pressed(false);
stop->set_pressed(true);
}
@@ -810,7 +771,6 @@ void AnimationPlayerEditor::_update_animation() {
String current = player->get_assigned_animation();
for (int i = 0; i < animation->get_item_count(); i++) {
-
if (animation->get_item_text(i) == current) {
animation->select(i);
break;
@@ -821,11 +781,11 @@ void AnimationPlayerEditor::_update_animation() {
}
void AnimationPlayerEditor::_update_player() {
-
updating = true;
List<StringName> animlist;
- if (player)
+ if (player) {
player->get_animation_list(&animlist);
+ }
animation->clear();
@@ -860,14 +820,15 @@ void AnimationPlayerEditor::_update_player() {
int active_idx = -1;
for (List<StringName>::Element *E = animlist.front(); E; E = E->next()) {
-
- if (player->get_autoplay() == E->get())
+ if (player->get_autoplay() == E->get()) {
animation->add_icon_item(autoplay_icon, E->get());
- else
+ } else {
animation->add_item(E->get());
+ }
- if (player->get_assigned_animation() == E->get())
+ if (player->get_assigned_animation() == E->get()) {
active_idx = animation->get_item_count() - 1;
+ }
}
updating = false;
@@ -877,7 +838,6 @@ void AnimationPlayerEditor::_update_player() {
_animation_selected(active_idx);
} else if (animation->get_item_count() > 0) {
-
animation->select(0);
autoplay->set_pressed(animation->get_item_text(0) == player->get_autoplay());
_animation_selected(0);
@@ -899,38 +859,41 @@ void AnimationPlayerEditor::_update_player() {
}
void AnimationPlayerEditor::edit(AnimationPlayer *p_player) {
-
- if (player && pin->is_pressed())
+ if (player && pin->is_pressed()) {
return; // Ignore, pinned.
+ }
player = p_player;
if (player) {
_update_player();
if (onion.enabled) {
- if (animation->get_item_count() > 0)
+ if (animation->get_item_count() > 0) {
_start_onion_skinning();
- else
+ } else {
_stop_onion_skinning();
+ }
}
track_editor->show_select_node_warning(false);
} else {
- if (onion.enabled)
+ if (onion.enabled) {
_stop_onion_skinning();
+ }
track_editor->show_select_node_warning(true);
}
}
void AnimationPlayerEditor::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
-
- if (!onion.can_overlay)
+ if (!onion.can_overlay) {
return;
+ }
// Can happen on viewport resize, at least.
- if (!_are_onion_layers_valid())
+ if (!_are_onion_layers_valid()) {
return;
+ }
RID ci = p_overlay->get_canvas_item();
Rect2 src_rect = p_overlay->get_global_rect();
@@ -973,22 +936,21 @@ void AnimationPlayerEditor::forward_canvas_force_draw_over_viewport(Control *p_o
}
void AnimationPlayerEditor::_animation_duplicate() {
-
- if (!animation->get_item_count())
+ if (!animation->get_item_count()) {
return;
+ }
String current = animation->get_item_text(animation->get_selected());
Ref<Animation> anim = player->get_animation(current);
- if (!anim.is_valid())
+ if (!anim.is_valid()) {
return;
+ }
Ref<Animation> new_anim = memnew(Animation);
List<PropertyInfo> plist;
anim->get_property_list(&plist);
for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) {
-
if (E->get().usage & PROPERTY_USAGE_STORAGE) {
-
new_anim->set(E->get().name, anim->get(E->get().name));
}
}
@@ -1009,9 +971,7 @@ void AnimationPlayerEditor::_animation_duplicate() {
undo_redo->commit_action();
for (int i = 0; i < animation->get_item_count(); i++) {
-
if (animation->get_item_text(i) == new_name) {
-
animation->select(i);
_animation_selected(i);
return;
@@ -1020,7 +980,6 @@ void AnimationPlayerEditor::_animation_duplicate() {
}
void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set) {
-
if (updating || !player || player->is_playing()) {
return;
};
@@ -1056,41 +1015,42 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set) {
};
void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) {
-
if (player == p_pl && is_visible_in_tree()) {
-
_update_player();
- if (blend_editor.dialog->is_visible())
+ if (blend_editor.dialog->is_visible()) {
_animation_blend(); // Update.
+ }
}
}
void AnimationPlayerEditor::_list_changed() {
-
- if (is_visible_in_tree())
+ if (is_visible_in_tree()) {
_update_player();
+ }
}
void AnimationPlayerEditor::_animation_key_editor_anim_len_changed(float p_len) {
-
frame->set_max(p_len);
}
void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_drag) {
-
timeline_position = p_pos;
- if (!is_visible_in_tree())
+ if (!is_visible_in_tree()) {
return;
+ }
- if (!player)
+ if (!player) {
return;
+ }
- if (player->is_playing())
+ if (player->is_playing()) {
return;
+ }
- if (!player->has_animation(player->get_assigned_animation()))
+ if (!player->has_animation(player->get_assigned_animation())) {
return;
+ }
updating = true;
frame->set_value(Math::stepify(p_pos, _get_editor_step()));
@@ -1101,7 +1061,6 @@ void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_drag)
}
void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
-
String current;
if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) {
current = animation->get_item_text(animation->get_selected());
@@ -1113,47 +1072,37 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
}
switch (p_option) {
-
case TOOL_NEW_ANIM: {
-
_animation_new();
} break;
case TOOL_LOAD_ANIM: {
-
_animation_load();
} break;
case TOOL_SAVE_ANIM: {
-
if (anim.is_valid()) {
_animation_save(anim);
}
} break;
case TOOL_SAVE_AS_ANIM: {
-
if (anim.is_valid()) {
_animation_save_as(anim);
}
} break;
case TOOL_DUPLICATE_ANIM: {
-
_animation_duplicate();
[[fallthrough]]; // Allow immediate rename after animation is duplicated
}
case TOOL_RENAME_ANIM: {
-
_animation_rename();
} break;
case TOOL_EDIT_TRANSITIONS: {
-
_animation_blend();
} break;
case TOOL_REMOVE_ANIM: {
-
_animation_remove();
} break;
case TOOL_COPY_ANIM: {
-
if (!animation->get_item_count()) {
error_dialog->set_text(TTR("No animation to copy!"));
error_dialog->popup_centered();
@@ -1165,7 +1114,6 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
EditorSettings::get_singleton()->set_resource_clipboard(anim2);
} break;
case TOOL_PASTE_ANIM: {
-
Ref<Animation> anim2 = EditorSettings::get_singleton()->get_resource_clipboard();
if (!anim2.is_valid()) {
error_dialog->set_text(TTR("No animation resource on clipboard!"));
@@ -1181,7 +1129,6 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
int idx = 1;
String base = name;
while (player->has_animation(name)) {
-
idx++;
name = base + " " + itos(idx);
}
@@ -1196,7 +1143,6 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
_select_anim_by_name(name);
} break;
case TOOL_EDIT_RESOURCE: {
-
if (!animation->get_item_count()) {
error_dialog->set_text(TTR("No animation to edit!"));
error_dialog->popup_centered();
@@ -1211,30 +1157,26 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
}
void AnimationPlayerEditor::_onion_skinning_menu(int p_option) {
-
PopupMenu *menu = onion_skinning->get_popup();
int idx = menu->get_item_index(p_option);
switch (p_option) {
-
case ONION_SKINNING_ENABLE: {
-
onion.enabled = !onion.enabled;
- if (onion.enabled)
+ if (onion.enabled) {
_start_onion_skinning();
- else
+ } else {
_stop_onion_skinning();
+ }
} break;
case ONION_SKINNING_PAST: {
-
// Ensure at least one of past/future is checked.
onion.past = onion.future ? !onion.past : true;
menu->set_item_checked(idx, onion.past);
} break;
case ONION_SKINNING_FUTURE: {
-
// Ensure at least one of past/future is checked.
onion.future = onion.past ? !onion.future : true;
menu->set_item_checked(idx, onion.future);
@@ -1242,7 +1184,6 @@ void AnimationPlayerEditor::_onion_skinning_menu(int p_option) {
case ONION_SKINNING_1_STEP: // Fall-through.
case ONION_SKINNING_2_STEPS:
case ONION_SKINNING_3_STEPS: {
-
onion.steps = (p_option - ONION_SKINNING_1_STEP) + 1;
int one_frame_idx = menu->get_item_index(ONION_SKINNING_1_STEP);
for (int i = 0; i <= ONION_SKINNING_LAST_STEPS_OPTION - ONION_SKINNING_1_STEP; i++) {
@@ -1250,17 +1191,14 @@ void AnimationPlayerEditor::_onion_skinning_menu(int p_option) {
}
} break;
case ONION_SKINNING_DIFFERENCES_ONLY: {
-
onion.differences_only = !onion.differences_only;
menu->set_item_checked(idx, onion.differences_only);
} break;
case ONION_SKINNING_FORCE_WHITE_MODULATE: {
-
onion.force_white_modulate = !onion.force_white_modulate;
menu->set_item_checked(idx, onion.force_white_modulate);
} break;
case ONION_SKINNING_INCLUDE_GIZMOS: {
-
onion.include_gizmos = !onion.include_gizmos;
menu->set_item_checked(idx, onion.include_gizmos);
} break;
@@ -1268,40 +1206,37 @@ void AnimationPlayerEditor::_onion_skinning_menu(int p_option) {
}
void AnimationPlayerEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
-
Ref<InputEventKey> k = p_ev;
if (is_visible_in_tree() && k.is_valid() && k->is_pressed() && !k->is_echo() && !k->get_alt() && !k->get_control() && !k->get_metakey()) {
-
switch (k->get_keycode()) {
-
case KEY_A: {
- if (!k->get_shift())
+ if (!k->get_shift()) {
_play_bw_from_pressed();
- else
+ } else {
_play_bw_pressed();
+ }
} break;
case KEY_S: {
_stop_pressed();
} break;
case KEY_D: {
- if (!k->get_shift())
+ if (!k->get_shift()) {
_play_from_pressed();
- else
+ } else {
_play_pressed();
+ }
} break;
}
}
}
void AnimationPlayerEditor::_editor_visibility_changed() {
-
if (is_visible() && animation->get_item_count() > 0) {
_start_onion_skinning();
}
}
bool AnimationPlayerEditor::_are_onion_layers_valid() {
-
ERR_FAIL_COND_V(!onion.past && !onion.future, false);
Point2 capture_size = get_tree()->get_root()->get_size();
@@ -1309,7 +1244,6 @@ bool AnimationPlayerEditor::_are_onion_layers_valid() {
}
void AnimationPlayerEditor::_allocate_onion_layers() {
-
_free_onion_layers();
int captures = onion.get_needed_capture_count();
@@ -1338,7 +1272,6 @@ void AnimationPlayerEditor::_allocate_onion_layers() {
}
void AnimationPlayerEditor::_free_onion_layers() {
-
for (int i = 0; i < onion.captures.size(); i++) {
if (onion.captures[i].is_valid()) {
RS::get_singleton()->free(onion.captures[i]);
@@ -1349,11 +1282,11 @@ void AnimationPlayerEditor::_free_onion_layers() {
}
void AnimationPlayerEditor::_prepare_onion_layers_1() {
-
// This would be called per viewport and we want to act once only.
int64_t frame = get_tree()->get_frame();
- if (frame == onion.last_frame)
+ if (frame == onion.last_frame) {
return;
+ }
if (!onion.enabled || !is_processing() || !is_visible() || !get_player()) {
_stop_onion_skinning();
@@ -1366,8 +1299,9 @@ void AnimationPlayerEditor::_prepare_onion_layers_1() {
onion.can_overlay = false;
plugin->update_overlays();
- if (player->is_playing())
+ if (player->is_playing()) {
return;
+ }
// And go to next step afterwards.
call_deferred("_prepare_onion_layers_2");
@@ -1378,13 +1312,14 @@ void AnimationPlayerEditor::_prepare_onion_layers_1_deferred() {
}
void AnimationPlayerEditor::_prepare_onion_layers_2() {
-
Ref<Animation> anim = player->get_animation(player->get_assigned_animation());
- if (!anim.is_valid())
+ if (!anim.is_valid()) {
return;
+ }
- if (!_are_onion_layers_valid())
+ if (!_are_onion_layers_valid()) {
_allocate_onion_layers();
+ }
// Hide superfluous elements that would make the overlay unnecessary cluttered.
Dictionary canvas_edit_state;
@@ -1455,11 +1390,11 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
int cidx = 0;
onion.capture.material->set_shader_param("dir_color", onion.force_white_modulate ? Color(1, 1, 1) : Color(EDITOR_GET("editors/animation/onion_layers_past_color")));
for (int step_off = step_off_a; step_off <= step_off_b; step_off++) {
-
if (step_off == 0) {
// Skip present step and switch to the color of future.
- if (!onion.force_white_modulate)
+ if (!onion.force_white_modulate) {
onion.capture.material->set_shader_param("dir_color", EDITOR_GET("editors/animation/onion_layers_future_color"));
+ }
continue;
}
@@ -1507,7 +1442,6 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
}
void AnimationPlayerEditor::_start_onion_skinning() {
-
// FIXME: Using "idle_frame" makes onion layers update one frame behind the current.
if (!get_tree()->is_connected("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) {
get_tree()->connect("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred));
@@ -1515,9 +1449,7 @@ void AnimationPlayerEditor::_start_onion_skinning() {
}
void AnimationPlayerEditor::_stop_onion_skinning() {
-
if (get_tree()->is_connected("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) {
-
get_tree()->disconnect("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred));
_free_onion_layers();
@@ -1529,12 +1461,10 @@ void AnimationPlayerEditor::_stop_onion_skinning() {
}
void AnimationPlayerEditor::_pin_pressed() {
-
EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->update_tree();
}
void AnimationPlayerEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_animation_new"), &AnimationPlayerEditor::_animation_new);
ClassDB::bind_method(D_METHOD("_animation_rename"), &AnimationPlayerEditor::_animation_rename);
ClassDB::bind_method(D_METHOD("_animation_load"), &AnimationPlayerEditor::_animation_load);
@@ -1556,7 +1486,6 @@ void AnimationPlayerEditor::_bind_methods() {
AnimationPlayerEditor *AnimationPlayerEditor::singleton = nullptr;
AnimationPlayer *AnimationPlayerEditor::get_player() const {
-
return player;
}
@@ -1800,39 +1729,33 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
}
AnimationPlayerEditor::~AnimationPlayerEditor() {
-
_free_onion_layers();
RS::get_singleton()->free(onion.capture.canvas);
RS::get_singleton()->free(onion.capture.canvas_item);
}
void AnimationPlayerEditorPlugin::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
-
set_force_draw_over_forwarding_enabled();
} break;
}
}
void AnimationPlayerEditorPlugin::edit(Object *p_object) {
-
anim_editor->set_undo_redo(&get_undo_redo());
- if (!p_object)
+ if (!p_object) {
return;
+ }
anim_editor->edit(Object::cast_to<AnimationPlayer>(p_object));
}
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("AnimationPlayer");
}
void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
editor->make_bottom_panel_item_visible(anim_editor);
anim_editor->set_process(true);
anim_editor->ensure_visibility();
@@ -1840,7 +1763,6 @@ void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
}
AnimationPlayerEditorPlugin::AnimationPlayerEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
anim_editor = memnew(AnimationPlayerEditor(editor, this));
anim_editor->set_undo_redo(EditorNode::get_undo_redo());
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index 1abefad635..18f2d3b25e 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -43,7 +43,6 @@ class AnimationTrackEditor;
class AnimationPlayerEditorPlugin;
class AnimationPlayerEditor : public VBoxContainer {
-
GDCLASS(AnimationPlayerEditor, VBoxContainer);
EditorNode *editor;
@@ -114,7 +113,6 @@ class AnimationPlayerEditor : public VBoxContainer {
int current_option;
struct BlendEditor {
-
AcceptDialog *dialog;
Tree *tree;
OptionButton *next;
@@ -244,7 +242,6 @@ public:
};
class AnimationPlayerEditorPlugin : public EditorPlugin {
-
GDCLASS(AnimationPlayerEditorPlugin, EditorPlugin);
AnimationPlayerEditor *anim_editor;
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 509bf59716..a435b1c482 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -32,7 +32,7 @@
#include "core/input/input.h"
#include "core/io/resource_loader.h"
-#include "core/math/delaunay_2d.h"
+#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
#include "core/project_settings.h"
#include "editor/editor_scale.h"
@@ -43,17 +43,14 @@
#include "scene/main/window.h"
bool AnimationNodeStateMachineEditor::can_edit(const Ref<AnimationNode> &p_node) {
-
Ref<AnimationNodeStateMachine> ansm = p_node;
return ansm.is_valid();
}
void AnimationNodeStateMachineEditor::edit(const Ref<AnimationNode> &p_node) {
-
state_machine = p_node;
if (state_machine.is_valid()) {
-
selected_transition_from = StringName();
selected_transition_to = StringName();
selected_node = StringName();
@@ -63,10 +60,10 @@ void AnimationNodeStateMachineEditor::edit(const Ref<AnimationNode> &p_node) {
}
void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
- if (playback.is_null())
+ if (playback.is_null()) {
return;
+ }
Ref<InputEventKey> k = p_event;
if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) {
@@ -104,10 +101,10 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
}
for (List<StringName>::Element *E = classes.front(); E; E = E->next()) {
-
String name = String(E->get()).replace_first("AnimationNode", "");
- if (name == "Animation")
+ if (name == "Animation") {
continue; // nope
+ }
int idx = menu->get_item_count();
menu->add_item(vformat("Add %s", name), idx);
menu->set_item_metadata(idx, E->get());
@@ -128,7 +125,6 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
// select node or push a field inside
if (mb.is_valid() && !mb->get_shift() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
selected_transition_from = StringName();
selected_transition_to = StringName();
selected_node = StringName();
@@ -191,12 +187,11 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
int closest = -1;
float closest_d = 1e20;
for (int i = 0; i < transition_lines.size(); i++) {
-
Vector2 s[2] = {
transition_lines[i].from,
transition_lines[i].to
};
- Vector2 cpoint = Geometry::get_closest_point_to_segment_2d(mb->get_position(), s);
+ Vector2 cpoint = Geometry2D::get_closest_point_to_segment(mb->get_position(), s);
float d = cpoint.distance_to(mb->get_position());
if (d > transition_lines[i].width) {
continue;
@@ -222,9 +217,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
//end moving node
if (mb.is_valid() && dragging_selected_attempt && mb->get_button_index() == BUTTON_LEFT && !mb->is_pressed()) {
-
if (dragging_selected) {
-
Ref<AnimationNode> an = state_machine->get_node(selected_node);
updating = true;
undo_redo->create_action(TTR("Move Node"));
@@ -245,7 +238,6 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
//connect nodes
if (mb.is_valid() && ((tool_select->is_pressed() && mb->get_shift()) || tool_connect->is_pressed()) && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
-
for (int i = node_rects.size() - 1; i >= 0; i--) { //inverse to draw order
if (node_rects[i].node.has_point(mb->get_position())) { //select node since nothing else was selected
connecting = true;
@@ -259,14 +251,11 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
//end connecting nodes
if (mb.is_valid() && connecting && mb->get_button_index() == BUTTON_LEFT && !mb->is_pressed()) {
-
if (connecting_to_node != StringName()) {
-
if (state_machine->has_transition(connecting_from, connecting_to_node)) {
EditorNode::get_singleton()->show_warning(TTR("Transition exists!"));
} else {
-
Ref<AnimationNodeStateMachineTransition> tr;
tr.instance();
tr->set_switch_mode(AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected()));
@@ -296,14 +285,12 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
//pan window
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_MIDDLE) {
-
h_scroll->set_value(h_scroll->get_value() - mm->get_relative().x);
v_scroll->set_value(v_scroll->get_value() - mm->get_relative().y);
}
//move mouse while connecting
if (mm.is_valid() && connecting) {
-
connecting_to = mm->get_position();
connecting_to_node = StringName();
state_machine_draw->update();
@@ -318,7 +305,6 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
//move mouse while moving a node
if (mm.is_valid() && dragging_selected_attempt) {
-
dragging_selected = true;
drag_ofs = mm->get_position() - drag_from;
snap_x = StringName();
@@ -333,8 +319,9 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
float best_d_y = 1e20;
for (List<StringName>::Element *E = nodes.front(); E; E = E->next()) {
- if (E->get() == selected_node)
+ if (E->get() == selected_node) {
continue;
+ }
Vector2 npos = state_machine->get_node_position(E->get());
float d_x = ABS(npos.x - cpos.x);
@@ -358,14 +345,12 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
//put ibeam (text cursor) over names to make it clearer that they are editable
if (mm.is_valid()) {
-
state_machine_draw->grab_focus();
bool over_text_now = false;
String new_over_node = StringName();
int new_over_node_what = -1;
if (tool_select->is_pressed()) {
-
for (int i = node_rects.size() - 1; i >= 0; i--) { //inverse to draw order
if (node_rects[i].name.has_point(mm->get_position())) {
@@ -392,7 +377,6 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
}
if (over_text != over_text_now) {
-
if (over_text_now) {
state_machine_draw->set_default_cursor_shape(CURSOR_IBEAM);
} else {
@@ -405,7 +389,6 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
}
void AnimationNodeStateMachineEditor::_file_opened(const String &p_file) {
-
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
@@ -413,12 +396,10 @@ void AnimationNodeStateMachineEditor::_file_opened(const String &p_file) {
}
void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) {
-
String base_name;
Ref<AnimationRootNode> node;
if (p_index == MENU_LOAD_FILE) {
-
open_file->clear_filters();
List<String> filters;
ResourceLoader::get_recognized_extensions_for_type("AnimationRootNode", &filters);
@@ -431,7 +412,6 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) {
node = file_loaded;
file_loaded.unref();
} else if (p_index == MENU_PASTE) {
-
node = EditorSettings::get_singleton()->get_resource_clipboard();
} else {
@@ -452,7 +432,6 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) {
}
if (base_name == String()) {
-
base_name = node->get_class().replace_first("AnimationNode", "");
}
@@ -476,7 +455,6 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) {
}
void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) {
-
Ref<AnimationNodeAnimation> anim;
anim.instance();
@@ -503,7 +481,6 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) {
}
void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, bool p_auto_advance) {
-
Color linecolor = get_theme_color("font_color", "Label");
Color icon_color(1, 1, 1);
Color accent = get_theme_color("accent_color", "Editor");
@@ -546,9 +523,9 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co
}
void AnimationNodeStateMachineEditor::_clip_src_line_to_rect(Vector2 &r_from, Vector2 &r_to, const Rect2 &p_rect) {
-
- if (r_to == r_from)
+ if (r_to == r_from) {
return;
+ }
//this could be optimized...
Vector2 n = (r_to - r_from).normalized();
@@ -558,9 +535,9 @@ void AnimationNodeStateMachineEditor::_clip_src_line_to_rect(Vector2 &r_from, Ve
}
void AnimationNodeStateMachineEditor::_clip_dst_line_to_rect(Vector2 &r_from, Vector2 &r_to, const Rect2 &p_rect) {
-
- if (r_to == r_from)
+ if (r_to == r_from) {
return;
+ }
//this could be optimized...
Vector2 n = (r_to - r_from).normalized();
@@ -570,7 +547,6 @@ void AnimationNodeStateMachineEditor::_clip_dst_line_to_rect(Vector2 &r_from, Ve
}
void AnimationNodeStateMachineEditor::_state_machine_draw() {
-
Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
Ref<StyleBox> style = get_theme_stylebox("state_machine_frame", "GraphNode");
@@ -611,7 +587,6 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
//snap lines
if (dragging_selected) {
-
Vector2 from = (state_machine->get_node_position(selected_node) * EDSCALE) + drag_ofs - state_machine->get_graph_offset() * EDSCALE;
if (snap_x != StringName()) {
Vector2 to = (state_machine->get_node_position(snap_x) * EDSCALE) - state_machine->get_graph_offset() * EDSCALE;
@@ -625,7 +600,6 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
//pre pass nodes so we know the rectangles
for (List<StringName>::Element *E = nodes.front(); E; E = E->next()) {
-
Ref<AnimationNode> anode = state_machine->get_node(E->get());
String name = E->get();
bool needs_editor = EditorNode::get_singleton()->item_has_editor(anode.ptr());
@@ -691,7 +665,6 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
//draw transition lines
for (int i = 0; i < state_machine->get_transition_count(); i++) {
-
TransitionLine tl;
tl.from_node = state_machine->get_transition_from(i);
Vector2 ofs_from = (dragging_selected && tl.from_node == selected_node) ? drag_ofs : Vector2();
@@ -733,7 +706,6 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
if (travel_path.size()) {
-
if (current == tl.from_node && travel_path[0] == tl.to_node) {
travel = true;
} else {
@@ -759,7 +731,6 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
//draw actual nodes
for (int i = 0; i < node_rects.size(); i++) {
-
String name = node_rects[i].node_name;
Ref<AnimationNode> anode = state_machine->get_node(name);
bool needs_editor = AnimationTreeEditor::get_singleton()->can_edit(anode);
@@ -786,7 +757,6 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
if (state_machine->get_end_node() == name) {
-
int endofs = nr.node.size.x - font->get_string_size(TTR("End")).x;
state_machine_draw->draw_string(font, offset + Vector2(endofs, -font->get_height() - 3 * EDSCALE + font->get_ascent()), TTR("End"), font_color);
}
@@ -844,11 +814,11 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
-
Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
- if (!playback.is_valid() || !playback->is_playing())
+ if (!playback.is_valid() || !playback->is_playing()) {
return;
+ }
int idx = -1;
for (int i = 0; i < node_rects.size(); i++) {
@@ -858,8 +828,9 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
}
}
- if (idx == -1)
+ if (idx == -1) {
return;
+ }
const NodeRect &nr = node_rects[idx];
@@ -891,9 +862,9 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
}
void AnimationNodeStateMachineEditor::_update_graph() {
-
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
@@ -903,7 +874,6 @@ void AnimationNodeStateMachineEditor::_update_graph() {
}
void AnimationNodeStateMachineEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
error_panel->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree"));
error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor"));
@@ -928,7 +898,6 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_PROCESS) {
-
String error;
Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
@@ -1017,7 +986,6 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
}
{
-
if (last_travel_path.size() != tp.size()) {
same_travel_path = false;
} else {
@@ -1032,7 +1000,6 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
//update if travel state changed
if (!same_travel_path || last_active != is_playing || last_current_node != current_node || last_blend_from_node != blend_from_node) {
-
state_machine_draw->update();
last_travel_path = tp;
last_current_node = current_node;
@@ -1043,7 +1010,6 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
{
if (current_node != StringName() && state_machine->has_node(current_node)) {
-
String next = current_node;
Ref<AnimationNodeStateMachine> anodesm = state_machine->get_node(next);
Ref<AnimationNodeStateMachinePlayback> current_node_playback;
@@ -1063,7 +1029,6 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
}
if (last_play_pos != play_pos) {
-
last_play_pos = play_pos;
state_machine_play_pos->update();
}
@@ -1076,17 +1041,14 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
}
void AnimationNodeStateMachineEditor::_open_editor(const String &p_name) {
-
AnimationTreeEditor::get_singleton()->enter_editor(p_name);
}
void AnimationNodeStateMachineEditor::_removed_from_graph() {
-
EditorNode::get_singleton()->edit_item(nullptr);
}
void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
-
const String &new_name = p_text;
ERR_FAIL_COND(new_name == "" || new_name.find(".") != -1 || new_name.find("/") != -1);
@@ -1117,24 +1079,23 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
}
void AnimationNodeStateMachineEditor::_name_edited_focus_out() {
-
- if (updating)
+ if (updating) {
return;
+ }
_name_edited(name_edit->get_text());
}
void AnimationNodeStateMachineEditor::_scroll_changed(double) {
-
- if (updating)
+ if (updating) {
return;
+ }
state_machine->set_graph_offset(Vector2(h_scroll->get_value(), v_scroll->get_value()));
state_machine_draw->update();
}
void AnimationNodeStateMachineEditor::_erase_selected() {
-
if (selected_node != StringName() && state_machine->has_node(selected_node)) {
updating = true;
undo_redo->create_action(TTR("Node Removed"));
@@ -1158,7 +1119,6 @@ void AnimationNodeStateMachineEditor::_erase_selected() {
}
if (selected_transition_to != StringName() && selected_transition_from != StringName() && state_machine->has_transition(selected_transition_from, selected_transition_to)) {
-
Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(state_machine->find_transition(selected_transition_from, selected_transition_to));
updating = true;
undo_redo->create_action(TTR("Transition Removed"));
@@ -1176,9 +1136,7 @@ void AnimationNodeStateMachineEditor::_erase_selected() {
}
void AnimationNodeStateMachineEditor::_autoplay_selected() {
-
if (selected_node != StringName() && state_machine->has_node(selected_node)) {
-
StringName new_start_node;
if (state_machine->get_start_node() == selected_node) { //toggle it
new_start_node = StringName();
@@ -1199,9 +1157,7 @@ void AnimationNodeStateMachineEditor::_autoplay_selected() {
}
void AnimationNodeStateMachineEditor::_end_selected() {
-
if (selected_node != StringName() && state_machine->has_node(selected_node)) {
-
StringName new_end_node;
if (state_machine->get_end_node() == selected_node) { //toggle it
new_end_node = StringName();
@@ -1220,8 +1176,8 @@ void AnimationNodeStateMachineEditor::_end_selected() {
state_machine_draw->update();
}
}
-void AnimationNodeStateMachineEditor::_update_mode() {
+void AnimationNodeStateMachineEditor::_update_mode() {
if (tool_select->is_pressed()) {
tool_erase_hb->show();
tool_erase->set_disabled(selected_node == StringName() && selected_transition_from == StringName() && selected_transition_to == StringName());
@@ -1233,7 +1189,6 @@ void AnimationNodeStateMachineEditor::_update_mode() {
}
void AnimationNodeStateMachineEditor::_bind_methods() {
-
ClassDB::bind_method("_update_graph", &AnimationNodeStateMachineEditor::_update_graph);
ClassDB::bind_method("_removed_from_graph", &AnimationNodeStateMachineEditor::_removed_from_graph);
@@ -1244,7 +1199,6 @@ void AnimationNodeStateMachineEditor::_bind_methods() {
AnimationNodeStateMachineEditor *AnimationNodeStateMachineEditor::singleton = nullptr;
AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
-
singleton = this;
updating = false;
diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h
index 5c4fc87df5..022c32ef48 100644
--- a/editor/plugins/animation_state_machine_editor.h
+++ b/editor/plugins/animation_state_machine_editor.h
@@ -42,7 +42,6 @@
#include "scene/gui/tree.h"
class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
-
GDCLASS(AnimationNodeStateMachineEditor, AnimationTreeNodeEditorPlugin);
Ref<AnimationNodeStateMachine> state_machine;
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 9c48444e3e..ec3e25f999 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -48,9 +48,9 @@
#include "scene/scene_string_names.h"
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
-
- if (tree == p_tree)
+ if (tree == p_tree) {
return;
+ }
tree = p_tree;
@@ -64,7 +64,6 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) {
}
void AnimationTreeEditor::_path_button_pressed(int p_path) {
-
edited_path.clear();
for (int i = 0; i <= p_path; i++) {
edited_path.push_back(button_path[i]);
@@ -100,7 +99,6 @@ void AnimationTreeEditor::_update_path() {
}
void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
-
button_path.clear();
Ref<AnimationNode> node = tree->get_tree_root();
@@ -109,7 +107,6 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
current_root = node->get_instance_id();
for (int i = 0; i < p_path.size(); i++) {
-
Ref<AnimationNode> child = node->get_child_by_name(p_path[i]);
ERR_BREAK(child.is_null());
node = child;
@@ -140,7 +137,6 @@ Vector<String> AnimationTreeEditor::get_edited_path() const {
}
void AnimationTreeEditor::enter_editor(const String &p_path) {
-
Vector<String> path = edited_path;
path.push_back(p_path);
edit_path(path);
@@ -204,19 +200,20 @@ bool AnimationTreeEditor::can_edit(const Ref<AnimationNode> &p_node) const {
}
Vector<String> AnimationTreeEditor::get_animation_list() {
-
if (!singleton->is_visible()) {
return Vector<String>();
}
AnimationTree *tree = singleton->tree;
- if (!tree || !tree->has_node(tree->get_animation_player()))
+ if (!tree || !tree->has_node(tree->get_animation_player())) {
return Vector<String>();
+ }
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
- if (!ap)
+ if (!ap) {
return Vector<String>();
+ }
List<StringName> anims;
ap->get_animation_list(&anims);
@@ -229,7 +226,6 @@ Vector<String> AnimationTreeEditor::get_animation_list() {
}
AnimationTreeEditor::AnimationTreeEditor() {
-
AnimationNodeAnimation::get_editable_animation_list = get_animation_list;
path_edit = memnew(ScrollContainer);
add_child(path_edit);
@@ -253,17 +249,14 @@ AnimationTreeEditor::AnimationTreeEditor() {
}
void AnimationTreeEditorPlugin::edit(Object *p_object) {
-
anim_tree_editor->edit(Object::cast_to<AnimationTree>(p_object));
}
bool AnimationTreeEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("AnimationTree");
}
void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
//editor->hide_animation_player_editors();
//editor->animation_panel_make_visible(true);
@@ -271,16 +264,15 @@ void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
editor->make_bottom_panel_item_visible(anim_tree_editor);
anim_tree_editor->set_process(true);
} else {
-
- if (anim_tree_editor->is_visible_in_tree())
+ if (anim_tree_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
+ }
button->hide();
anim_tree_editor->set_process(false);
}
}
AnimationTreeEditorPlugin::AnimationTreeEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
anim_tree_editor = memnew(AnimationTreeEditor);
anim_tree_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index 0b93b0fd8e..25af81ea9b 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -49,7 +49,6 @@ public:
};
class AnimationTreeEditor : public VBoxContainer {
-
GDCLASS(AnimationTreeEditor, VBoxContainer);
ScrollContainer *path_edit;
@@ -95,7 +94,6 @@ public:
};
class AnimationTreeEditorPlugin : public EditorPlugin {
-
GDCLASS(AnimationTreeEditorPlugin, EditorPlugin);
AnimationTreeEditor *anim_tree_editor;
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 1928d49556..da170cd498 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -40,7 +40,6 @@
#include "editor/project_settings_editor.h"
void EditorAssetLibraryItem::configure(const String &p_title, int p_asset_id, const String &p_category, int p_category_id, const String &p_author, int p_author_id, const String &p_cost) {
-
title->set_text(p_title);
asset_id = p_asset_id;
category->set_text(p_category);
@@ -51,7 +50,6 @@ void EditorAssetLibraryItem::configure(const String &p_title, int p_asset_id, co
}
void EditorAssetLibraryItem::set_image(int p_type, int p_index, const Ref<Texture2D> &p_image) {
-
ERR_FAIL_COND(p_type != EditorAssetLibrary::IMAGE_QUEUE_ICON);
ERR_FAIL_COND(p_index != 0);
@@ -59,9 +57,7 @@ void EditorAssetLibraryItem::set_image(int p_type, int p_index, const Ref<Textur
}
void EditorAssetLibraryItem::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
icon->set_normal_texture(get_theme_icon("ProjectIconLoading", "EditorIcons"));
category->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
author->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
@@ -70,21 +66,18 @@ void EditorAssetLibraryItem::_notification(int p_what) {
}
void EditorAssetLibraryItem::_asset_clicked() {
-
emit_signal("asset_selected", asset_id);
}
void EditorAssetLibraryItem::_category_clicked() {
-
emit_signal("category_selected", category_id);
}
-void EditorAssetLibraryItem::_author_clicked() {
+void EditorAssetLibraryItem::_author_clicked() {
emit_signal("author_selected", author_id);
}
void EditorAssetLibraryItem::_bind_methods() {
-
ClassDB::bind_method("set_image", &EditorAssetLibraryItem::set_image);
ADD_SIGNAL(MethodInfo("asset_selected"));
ADD_SIGNAL(MethodInfo("category_selected"));
@@ -92,7 +85,6 @@ void EditorAssetLibraryItem::_bind_methods() {
}
EditorAssetLibraryItem::EditorAssetLibraryItem() {
-
Ref<StyleBoxEmpty> border;
border.instance();
border->set_default_margin(MARGIN_LEFT, 5 * EDSCALE);
@@ -143,16 +135,12 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
//////////////////////////////////////////////////////////////////////////////
void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const Ref<Texture2D> &p_image) {
-
switch (p_type) {
-
case EditorAssetLibrary::IMAGE_QUEUE_ICON: {
-
item->call("set_image", p_type, p_index, p_image);
icon = p_image;
} break;
case EditorAssetLibrary::IMAGE_QUEUE_THUMBNAIL: {
-
for (int i = 0; i < preview_images.size(); i++) {
if (preview_images[i].id == p_index) {
if (preview_images[i].is_video) {
@@ -181,7 +169,6 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
}
} break;
case EditorAssetLibrary::IMAGE_QUEUE_SCREENSHOT: {
-
for (int i = 0; i < preview_images.size(); i++) {
if (preview_images[i].id == p_index) {
preview_images.write[i].image = p_image;
@@ -231,7 +218,6 @@ void EditorAssetLibraryItemDescription::_preview_click(int p_id) {
}
void EditorAssetLibraryItemDescription::configure(const String &p_title, int p_asset_id, const String &p_category, int p_category_id, const String &p_author, int p_author_id, const String &p_cost, int p_version, const String &p_version_string, const String &p_description, const String &p_download_url, const String &p_browse_url, const String &p_sha256_hash) {
-
asset_id = p_asset_id;
title = p_title;
download_url = p_download_url;
@@ -249,7 +235,6 @@ void EditorAssetLibraryItemDescription::configure(const String &p_title, int p_a
}
void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, const String &p_url) {
-
Preview preview;
preview.id = p_id;
preview.video_link = p_url;
@@ -270,7 +255,6 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
}
EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
-
HBoxContainer *hbox = memnew(HBoxContainer);
add_child(hbox);
VBoxContainer *desc_vbox = memnew(VBoxContainer);
@@ -314,14 +298,13 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
get_ok()->set_text(TTR("Download"));
get_cancel()->set_text(TTR("Close"));
}
+
///////////////////////////////////////////////////////////////////////////////////
void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
-
String error_text;
switch (p_status) {
-
case HTTPRequest::RESULT_CHUNKED_BODY_SIZE_MISMATCH:
case HTTPRequest::RESULT_CONNECTION_ERROR:
case HTTPRequest::RESULT_BODY_SIZE_LIMIT_EXCEEDED: {
@@ -388,29 +371,25 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
}
void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asset_id, const Ref<Texture2D> &p_preview, const String &p_download_url, const String &p_sha256_hash) {
-
title->set_text(p_title);
icon->set_texture(p_preview);
asset_id = p_asset_id;
- if (!p_preview.is_valid())
+ if (!p_preview.is_valid()) {
icon->set_texture(get_theme_icon("FileBrokenBigThumb", "EditorIcons"));
+ }
host = p_download_url;
sha256 = p_sha256_hash;
_make_request();
}
void EditorAssetLibraryItemDownload::_notification(int p_what) {
-
switch (p_what) {
-
// FIXME: The editor crashes if 'NOTICATION_THEME_CHANGED' is used.
case NOTIFICATION_ENTER_TREE: {
-
add_theme_style_override("panel", get_theme_stylebox("panel", "TabContainer"));
dismiss->set_normal_texture(get_theme_icon("Close", "EditorIcons"));
} break;
case NOTIFICATION_PROCESS: {
-
// Make the progress bar visible again when retrying the download.
progress->set_modulate(Color(1, 1, 1, 1));
@@ -438,7 +417,6 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
if (cstatus != prev_status) {
switch (cstatus) {
-
case HTTPClient::STATUS_RESOLVING: {
status->set_text(TTR("Resolving..."));
progress->set_max(1);
@@ -462,15 +440,14 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
} break;
}
}
-void EditorAssetLibraryItemDownload::_close() {
+void EditorAssetLibraryItemDownload::_close() {
// Clean up downloaded file.
DirAccess::remove_file_or_error(download->get_download_file());
queue_delete();
}
void EditorAssetLibraryItemDownload::_install() {
-
String file = download->get_download_file();
if (external_install) {
@@ -494,12 +471,10 @@ void EditorAssetLibraryItemDownload::_make_request() {
}
void EditorAssetLibraryItemDownload::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("install_asset", PropertyInfo(Variant::STRING, "zip_path"), PropertyInfo(Variant::STRING, "name")));
}
EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
-
HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb);
icon = memnew(TextureRect);
@@ -566,11 +541,8 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
////////////////////////////////////////////////////////////////////////////////
void EditorAssetLibrary::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_READY: {
-
error_tr->set_texture(get_theme_icon("Error", "EditorIcons"));
filter->set_right_icon(get_theme_icon("Search", "EditorIcons"));
filter->set_clear_button_enabled(true);
@@ -578,13 +550,11 @@ void EditorAssetLibrary::_notification(int p_what) {
error_label->raise();
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
-
if (is_visible() && initial_loading) {
_repository_changed(0); // Update when shown for the first time.
}
} break;
case NOTIFICATION_PROCESS: {
-
HTTPClient::Status s = request->get_http_client_status();
const bool loading = s != HTTPClient::STATUS_DISCONNECTED;
@@ -601,7 +571,6 @@ void EditorAssetLibrary::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
-
library_scroll_bg->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree"));
downloads_scroll->add_theme_style_override("bg", get_theme_stylebox("bg", "Tree"));
error_tr->set_texture(get_theme_icon("Error", "EditorIcons"));
@@ -612,13 +581,10 @@ void EditorAssetLibrary::_notification(int p_what) {
}
void EditorAssetLibrary::_unhandled_input(const Ref<InputEvent> &p_event) {
-
const Ref<InputEventKey> key = p_event;
if (key.is_valid() && key->is_pressed()) {
-
if (key->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F) && is_visible_in_tree()) {
-
filter->grab_focus();
filter->select_all();
accept_event();
@@ -627,16 +593,14 @@ void EditorAssetLibrary::_unhandled_input(const Ref<InputEvent> &p_event) {
}
void EditorAssetLibrary::_install_asset() {
-
ERR_FAIL_COND(!description);
for (int i = 0; i < downloads_hb->get_child_count(); i++) {
-
EditorAssetLibraryItemDownload *d = Object::cast_to<EditorAssetLibraryItemDownload>(downloads_hb->get_child(i));
if (d && d->get_asset_id() == description->get_asset_id()) {
-
- if (EditorNode::get_singleton() != nullptr)
+ if (EditorNode::get_singleton() != nullptr) {
EditorNode::get_singleton()->show_warning(TTR("Download for this asset is already in progress!"));
+ }
return;
}
}
@@ -676,16 +640,14 @@ const char *EditorAssetLibrary::support_key[SUPPORT_MAX] = {
};
void EditorAssetLibrary::_select_author(int p_id) {
-
// Open author window.
}
void EditorAssetLibrary::_select_category(int p_id) {
-
for (int i = 0; i < categories->get_item_count(); i++) {
-
- if (i == 0)
+ if (i == 0) {
continue;
+ }
int id = categories->get_item_metadata(i);
if (id == p_id) {
categories->select(i);
@@ -694,8 +656,8 @@ void EditorAssetLibrary::_select_category(int p_id) {
}
}
}
-void EditorAssetLibrary::_select_asset(int p_id) {
+void EditorAssetLibrary::_select_asset(int p_id) {
_api_request("asset/" + itos(p_id), REQUESTING_ASSET);
}
@@ -780,11 +742,9 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PackedB
}
void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id) {
-
ERR_FAIL_COND(!image_queue.has(p_queue_id));
if (p_status == HTTPRequest::RESULT_SUCCESS && p_code < HTTPClient::RESPONSE_BAD_REQUEST) {
-
if (p_code != HTTPClient::RESPONSE_NOT_MODIFIED) {
for (int i = 0; i < headers.size(); i++) {
if (headers[i].findn("ETag:") == 0) { // Save etag
@@ -830,14 +790,12 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons
}
void EditorAssetLibrary::_update_image_queue() {
-
const int max_images = 6;
int current_images = 0;
List<int> to_delete;
for (Map<int, ImageQueue>::Element *E = image_queue.front(); E; E = E->next()) {
if (!E->get().active && current_images < max_images) {
-
String cache_filename_base = EditorSettings::get_singleton()->get_cache_dir().plus_file("assetimage_" + E->get().image_url.md5_text());
Vector<String> headers;
@@ -870,7 +828,6 @@ void EditorAssetLibrary::_update_image_queue() {
}
void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, ImageType p_type, int p_image_index) {
-
ImageQueue iq;
iq.image_url = p_image_url;
iq.image_index = p_image_index;
@@ -911,7 +868,6 @@ void EditorAssetLibrary::_rerun_search(int p_ignore) {
}
void EditorAssetLibrary::_search(int p_page) {
-
String args;
if (templates_only) {
@@ -935,7 +891,6 @@ void EditorAssetLibrary::_search(int p_page) {
}
if (categories->get_selected() > 0) {
-
args += "&category=" + itos(categories->get_item_metadata(categories->get_selected()));
}
@@ -956,24 +911,25 @@ void EditorAssetLibrary::_search(int p_page) {
}
void EditorAssetLibrary::_search_text_entered(const String &p_text) {
-
_search();
}
HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int p_page_len, int p_total_items, int p_current_items) {
-
HBoxContainer *hbc = memnew(HBoxContainer);
- if (p_page_count < 2)
+ if (p_page_count < 2) {
return hbc;
+ }
//do the mario
int from = p_page - 5;
- if (from < 0)
+ if (from < 0) {
from = 0;
+ }
int to = from + 10;
- if (to > p_page_count)
+ if (to > p_page_count) {
to = p_page_count;
+ }
hbc->add_spacer();
hbc->add_theme_constant_override("separation", 5 * EDSCALE);
@@ -1000,9 +956,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
hbc->add_child(memnew(VSeparator));
for (int i = from; i < to; i++) {
-
if (i == p_page) {
-
Button *current = memnew(Button);
current->set_text(itos(i + 1));
current->set_disabled(true);
@@ -1010,7 +964,6 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
hbc->add_child(current);
} else {
-
Button *current = memnew(Button);
current->set_text(itos(i + 1));
current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(i));
@@ -1046,7 +999,6 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
}
void EditorAssetLibrary::_api_request(const String &p_request, RequestType p_request_type, const String &p_arguments) {
-
if (requesting != REQUESTING_NONE) {
request->cancel_request();
}
@@ -1058,7 +1010,6 @@ void EditorAssetLibrary::_api_request(const String &p_request, RequestType p_req
}
void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
-
String str;
{
@@ -1070,7 +1021,6 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
bool error_abort = true;
switch (p_status) {
-
case HTTPRequest::RESULT_CANT_RESOLVE: {
error_label->set_text(TTR("Can't resolve hostname:") + " " + host);
} break;
@@ -1097,7 +1047,6 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
if (p_code != 200) {
error_label->set_text(TTR("Request failed, return code:") + " " + itos(p_code));
} else {
-
error_abort = false;
}
} break;
@@ -1122,7 +1071,6 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
switch (requested) {
case REQUESTING_CONFIG: {
-
categories->clear();
categories->add_item(TTR("All"));
categories->set_item_metadata(0, 0);
@@ -1130,8 +1078,9 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
Array clist = d["categories"];
for (int i = 0; i < clist.size(); i++) {
Dictionary cat = clist[i];
- if (!cat.has("name") || !cat.has("id"))
+ if (!cat.has("name") || !cat.has("id")) {
continue;
+ }
String name = cat["name"];
int id = cat["id"];
categories->add_item(name);
@@ -1143,7 +1092,6 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
_search();
} break;
case REQUESTING_SEARCH: {
-
initial_loading = false;
// The loading text only needs to be displayed before the first page is loaded.
@@ -1214,7 +1162,6 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
}
for (int i = 0; i < result.size(); i++) {
-
Dictionary r = result[i];
ERR_CONTINUE(!r.has("title"));
@@ -1273,7 +1220,6 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
Array previews = d["previews"];
for (int i = 0; i < previews.size(); i++) {
-
Dictionary p = previews[i];
ERR_CONTINUE(!p.has("type"));
@@ -1303,7 +1249,6 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
}
void EditorAssetLibrary::_asset_file_selected(const String &p_file) {
-
if (asset_installer) {
memdelete(asset_installer);
asset_installer = nullptr;
@@ -1315,18 +1260,15 @@ void EditorAssetLibrary::_asset_file_selected(const String &p_file) {
}
void EditorAssetLibrary::_asset_open() {
-
asset_open->popup_centered_ratio();
}
void EditorAssetLibrary::_manage_plugins() {
-
ProjectSettingsEditor::get_singleton()->popup_project_settings();
ProjectSettingsEditor::get_singleton()->set_plugins_page();
}
void EditorAssetLibrary::_install_external_asset(String p_zip_path, String p_title) {
-
emit_signal("install_asset", p_zip_path, p_title);
}
@@ -1335,14 +1277,12 @@ void EditorAssetLibrary::disable_community_support() {
}
void EditorAssetLibrary::_bind_methods() {
-
ClassDB::bind_method("_unhandled_input", &EditorAssetLibrary::_unhandled_input);
ADD_SIGNAL(MethodInfo("install_asset", PropertyInfo(Variant::STRING, "zip_path"), PropertyInfo(Variant::STRING, "name")));
}
EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
-
requesting = REQUESTING_NONE;
templates_only = p_templates_only;
initial_loading = true;
@@ -1364,8 +1304,9 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
search->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), make_binds(0));
search_hb->add_child(search);
- if (!p_templates_only)
+ if (!p_templates_only) {
search_hb->add_child(memnew(VSeparator));
+ }
Button *open_asset = memnew(Button);
open_asset->set_text(TTR("Import..."));
@@ -1527,18 +1468,14 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
///////
void AssetLibraryEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
addon_library->show();
} else {
-
addon_library->hide();
}
}
AssetLibraryEditorPlugin::AssetLibraryEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
addon_library = memnew(EditorAssetLibrary);
addon_library->set_v_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index 536a855d03..d5d381dee3 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -50,7 +50,6 @@
#include "scene/main/http_request.h"
class EditorAssetLibraryItem : public PanelContainer {
-
GDCLASS(EditorAssetLibraryItem, PanelContainer);
TextureButton *icon;
@@ -81,7 +80,6 @@ public:
};
class EditorAssetLibraryItemDescription : public ConfirmationDialog {
-
GDCLASS(EditorAssetLibraryItemDescription, ConfirmationDialog);
EditorAssetLibraryItem *item;
@@ -129,7 +127,6 @@ public:
};
class EditorAssetLibraryItemDownload : public PanelContainer {
-
GDCLASS(EditorAssetLibraryItemDownload, PanelContainer);
TextureRect *icon;
@@ -237,7 +234,6 @@ class EditorAssetLibrary : public PanelContainer {
};
struct ImageQueue {
-
bool active;
int queue_id;
ImageType image_type;
@@ -309,7 +305,6 @@ public:
};
class AssetLibraryEditorPlugin : public EditorPlugin {
-
GDCLASS(AssetLibraryEditorPlugin, EditorPlugin);
EditorAssetLibrary *addon_library;
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index 0459ac7618..3b7a9320f0 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -37,7 +37,6 @@
#include "editor/editor_settings.h"
void AudioStreamEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_READY) {
AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AudioStreamEditor::_preview_changed));
}
@@ -75,7 +74,6 @@ void AudioStreamEditor::_draw_preview() {
lines.resize(size.width * 2);
for (int i = 0; i < size.width; i++) {
-
float ofs = i * preview_len / size.width;
float ofs_n = (i + 1) * preview_len / size.width;
float max = preview->get_max(ofs, ofs_n) * 0.5 + 0.5;
@@ -93,21 +91,19 @@ void AudioStreamEditor::_draw_preview() {
}
void AudioStreamEditor::_preview_changed(ObjectID p_which) {
-
if (stream.is_valid() && stream->get_instance_id() == p_which) {
_preview->update();
}
}
void AudioStreamEditor::_changed_callback(Object *p_changed, const char *p_prop) {
-
- if (!is_visible())
+ if (!is_visible()) {
return;
+ }
update();
}
void AudioStreamEditor::_play() {
-
if (_player->is_playing()) {
_player->stop();
_play_button->set_icon(get_theme_icon("MainPlay", "EditorIcons"));
@@ -120,7 +116,6 @@ void AudioStreamEditor::_play() {
}
void AudioStreamEditor::_stop() {
-
_player->stop();
_play_button->set_icon(get_theme_icon("MainPlay", "EditorIcons"));
_current = 0;
@@ -129,7 +124,6 @@ void AudioStreamEditor::_stop() {
}
void AudioStreamEditor::_on_finished() {
-
_play_button->set_icon(get_theme_icon("MainPlay", "EditorIcons"));
if (_current == _player->get_stream()->get_length()) {
_current = 0;
@@ -138,7 +132,6 @@ void AudioStreamEditor::_on_finished() {
}
void AudioStreamEditor::_draw_indicator() {
-
if (!stream.is_valid()) {
return;
}
@@ -178,9 +171,9 @@ void AudioStreamEditor::_seek_to(real_t p_x) {
}
void AudioStreamEditor::edit(Ref<AudioStream> p_stream) {
-
- if (!stream.is_null())
+ if (!stream.is_null()) {
stream->remove_change_receptor(this);
+ }
stream = p_stream;
_player->set_stream(stream);
@@ -200,7 +193,6 @@ void AudioStreamEditor::_bind_methods() {
}
AudioStreamEditor::AudioStreamEditor() {
-
set_custom_minimum_size(Size2(1, 100) * EDSCALE);
_current = 0;
_dragging = false;
@@ -251,26 +243,23 @@ AudioStreamEditor::AudioStreamEditor() {
}
void AudioStreamEditorPlugin::edit(Object *p_object) {
-
AudioStream *s = Object::cast_to<AudioStream>(p_object);
- if (!s)
+ if (!s) {
return;
+ }
audio_editor->edit(Ref<AudioStream>(s));
}
bool AudioStreamEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("AudioStream");
}
void AudioStreamEditorPlugin::make_visible(bool p_visible) {
-
audio_editor->set_visible(p_visible);
}
AudioStreamEditorPlugin::AudioStreamEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
audio_editor = memnew(AudioStreamEditor);
add_control_to_container(CONTAINER_PROPERTY_EDITOR_BOTTOM, audio_editor);
diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h
index 2191b541f6..dd7caaa15e 100644
--- a/editor/plugins/audio_stream_editor_plugin.h
+++ b/editor/plugins/audio_stream_editor_plugin.h
@@ -38,7 +38,6 @@
#include "scene/resources/texture.h"
class AudioStreamEditor : public ColorRect {
-
GDCLASS(AudioStreamEditor, ColorRect);
Ref<AudioStream> stream;
@@ -73,7 +72,6 @@ public:
};
class AudioStreamEditorPlugin : public EditorPlugin {
-
GDCLASS(AudioStreamEditorPlugin, EditorPlugin);
AudioStreamEditor *audio_editor;
diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/baked_lightmap_editor_plugin.cpp
index f754dd4725..8fbe1646f7 100644
--- a/editor/plugins/baked_lightmap_editor_plugin.cpp
+++ b/editor/plugins/baked_lightmap_editor_plugin.cpp
@@ -31,7 +31,6 @@
#include "baked_lightmap_editor_plugin.h"
void BakedLightmapEditorPlugin::_bake_select_file(const String &p_file) {
-
if (lightmap) {
BakedLightmap::BakeError err;
if (get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root() == lightmap) {
@@ -71,30 +70,26 @@ void BakedLightmapEditorPlugin::_bake_select_file(const String &p_file) {
}
void BakedLightmapEditorPlugin::_bake() {
-
_bake_select_file("");
}
void BakedLightmapEditorPlugin::edit(Object *p_object) {
-
BakedLightmap *s = Object::cast_to<BakedLightmap>(p_object);
- if (!s)
+ if (!s) {
return;
+ }
lightmap = s;
}
bool BakedLightmapEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("BakedLightmap");
}
void BakedLightmapEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
bake->show();
} else {
-
bake->hide();
}
}
@@ -102,7 +97,6 @@ void BakedLightmapEditorPlugin::make_visible(bool p_visible) {
EditorProgress *BakedLightmapEditorPlugin::tmp_progress = nullptr;
bool BakedLightmapEditorPlugin::bake_func_step(float p_progress, const String &p_description, void *, bool p_refresh) {
-
if (!tmp_progress) {
tmp_progress = memnew(EditorProgress("bake_lightmaps", TTR("Bake Lightmaps"), 1000, false));
ERR_FAIL_COND_V(tmp_progress == nullptr, false);
@@ -118,12 +112,10 @@ void BakedLightmapEditorPlugin::bake_func_end() {
}
void BakedLightmapEditorPlugin::_bind_methods() {
-
ClassDB::bind_method("_bake", &BakedLightmapEditorPlugin::_bake);
}
BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
bake = memnew(ToolButton);
bake->set_icon(editor->get_gui_base()->get_theme_icon("Bake", "EditorIcons"));
diff --git a/editor/plugins/baked_lightmap_editor_plugin.h b/editor/plugins/baked_lightmap_editor_plugin.h
index 2dbc09fc1d..67fb368a86 100644
--- a/editor/plugins/baked_lightmap_editor_plugin.h
+++ b/editor/plugins/baked_lightmap_editor_plugin.h
@@ -37,7 +37,6 @@
#include "scene/resources/material.h"
class BakedLightmapEditorPlugin : public EditorPlugin {
-
GDCLASS(BakedLightmapEditorPlugin, EditorPlugin);
BakedLightmap *lightmap;
diff --git a/editor/plugins/camera_3d_editor_plugin.cpp b/editor/plugins/camera_3d_editor_plugin.cpp
index 8bc1374269..48f9f208a5 100644
--- a/editor/plugins/camera_3d_editor_plugin.cpp
+++ b/editor/plugins/camera_3d_editor_plugin.cpp
@@ -33,7 +33,6 @@
#include "node_3d_editor_plugin.h"
void Camera3DEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
Node3DEditor::get_singleton()->set_custom_camera(nullptr);
@@ -42,7 +41,6 @@ void Camera3DEditor::_node_removed(Node *p_node) {
}
void Camera3DEditor::_pressed() {
-
Node *sn = (node && preview->is_pressed()) ? node : nullptr;
Node3DEditor::get_singleton()->set_custom_camera(sn);
}
@@ -51,23 +49,21 @@ void Camera3DEditor::_bind_methods() {
}
void Camera3DEditor::edit(Node *p_camera) {
-
node = p_camera;
if (!node) {
preview->set_pressed(false);
Node3DEditor::get_singleton()->set_custom_camera(nullptr);
} else {
-
- if (preview->is_pressed())
+ if (preview->is_pressed()) {
Node3DEditor::get_singleton()->set_custom_camera(p_camera);
- else
+ } else {
Node3DEditor::get_singleton()->set_custom_camera(nullptr);
+ }
}
}
Camera3DEditor::Camera3DEditor() {
-
preview = memnew(Button);
add_child(preview);
@@ -83,18 +79,15 @@ Camera3DEditor::Camera3DEditor() {
}
void Camera3DEditorPlugin::edit(Object *p_object) {
-
Node3DEditor::get_singleton()->set_can_preview(Object::cast_to<Camera3D>(p_object));
//camera_editor->edit(Object::cast_to<Node>(p_object));
}
bool Camera3DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("Camera3D");
}
void Camera3DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
//Node3DEditor::get_singleton()->set_can_preview(Object::cast_to<Camera3D>(p_object));
} else {
@@ -103,7 +96,6 @@ void Camera3DEditorPlugin::make_visible(bool p_visible) {
}
Camera3DEditorPlugin::Camera3DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
/* camera_editor = memnew( CameraEditor );
editor->get_viewport()->add_child(camera_editor);
diff --git a/editor/plugins/camera_3d_editor_plugin.h b/editor/plugins/camera_3d_editor_plugin.h
index 1e57ac7cd2..2603229a46 100644
--- a/editor/plugins/camera_3d_editor_plugin.h
+++ b/editor/plugins/camera_3d_editor_plugin.h
@@ -36,7 +36,6 @@
#include "scene/3d/camera_3d.h"
class Camera3DEditor : public Control {
-
GDCLASS(Camera3DEditor, Control);
Panel *panel;
@@ -55,7 +54,6 @@ public:
};
class Camera3DEditorPlugin : public EditorPlugin {
-
GDCLASS(Camera3DEditorPlugin, EditorPlugin);
//CameraEditor *camera_editor;
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index b5fcf82d76..2f7080b1a5 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -31,6 +31,7 @@
#include "canvas_item_editor_plugin.h"
#include "core/input/input.h"
+#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
#include "core/print_string.h"
#include "core/project_settings.h"
@@ -53,15 +54,16 @@
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
-#define MIN_ZOOM 0.01
-#define MAX_ZOOM 100
+// Min and Max are power of two in order to play nicely with successive increment.
+// That way, we can naturally reach a 100% zoom from boundaries.
+#define MIN_ZOOM 1. / 128
+#define MAX_ZOOM 128
#define RULER_WIDTH (15 * EDSCALE)
#define SCALE_HANDLE_DISTANCE 25
#define MOVE_HANDLE_DISTANCE 25
class SnapDialog : public ConfirmationDialog {
-
GDCLASS(SnapDialog, ConfirmationDialog);
friend class CanvasItemEditor;
@@ -87,7 +89,6 @@ public:
GridContainer *child_container;
set_title(TTR("Configure Snap"));
- get_ok()->set_text(TTR("Close"));
container = memnew(VBoxContainer);
add_child(container);
@@ -252,7 +253,6 @@ void CanvasItemEditor::_snap_if_closer_float(
float &r_current_snap, SnapTarget &r_current_snap_target,
float p_target_value, SnapTarget p_snap_target,
float p_radius) {
-
float radius = p_radius / zoom;
float dist = Math::abs(p_value - p_target_value);
if ((p_radius < 0 || dist < radius) && (r_current_snap_target == SNAP_TARGET_NONE || dist < Math::abs(r_current_snap - p_value))) {
@@ -267,7 +267,6 @@ void CanvasItemEditor::_snap_if_closer_point(
Point2 p_target_value, SnapTarget p_snap_target,
real_t rotation,
float p_radius) {
-
Transform2D rot_trans = Transform2D(rotation, Point2());
p_value = rot_trans.inverse().xform(p_value);
p_target_value = rot_trans.inverse().xform(p_target_value);
@@ -330,7 +329,6 @@ void CanvasItemEditor::_snap_other_nodes(
}
Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsigned int p_forced_modes, const CanvasItem *p_self_canvas_item, List<CanvasItem *> p_other_nodes_exceptions) {
-
snap_target[0] = SNAP_TARGET_NONE;
snap_target[1] = SNAP_TARGET_NONE;
@@ -474,11 +472,11 @@ float CanvasItemEditor::snap_angle(float p_target, float p_start) const {
}
void CanvasItemEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
-
Ref<InputEventKey> k = p_ev;
- if (!is_visible_in_tree())
+ if (!is_visible_in_tree()) {
return;
+ }
if (k->get_keycode() == KEY_CONTROL || k->get_keycode() == KEY_ALT || k->get_keycode() == KEY_SHIFT) {
viewport->update();
@@ -492,28 +490,29 @@ void CanvasItemEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
} else if ((grid_snap_active || show_grid) && divide_grid_step_shortcut.is_valid() && divide_grid_step_shortcut->is_shortcut(p_ev)) {
// Divide the grid size
Point2 new_grid_step = grid_step * Math::pow(2.0, grid_step_multiplier - 1);
- if (new_grid_step.x >= 1.0 && new_grid_step.y >= 1.0)
+ if (new_grid_step.x >= 1.0 && new_grid_step.y >= 1.0) {
grid_step_multiplier--;
+ }
viewport->update();
}
}
}
Object *CanvasItemEditor::_get_editor_data(Object *p_what) {
-
CanvasItem *ci = Object::cast_to<CanvasItem>(p_what);
- if (!ci)
+ if (!ci) {
return nullptr;
+ }
return memnew(CanvasItemEditorSelectedItem);
}
void CanvasItemEditor::_keying_changed() {
-
- if (AnimationPlayerEditor::singleton->get_track_editor()->is_visible_in_tree())
+ if (AnimationPlayerEditor::singleton->get_track_editor()->is_visible_in_tree()) {
animation_hb->show();
- else
+ } else {
animation_hb->hide();
+ }
}
Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_list) {
@@ -539,10 +538,12 @@ Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_li
}
void CanvasItemEditor::_expand_encompassing_rect_using_children(Rect2 &r_rect, const Node *p_node, bool &r_first, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, bool include_locked_nodes) {
- if (!p_node)
+ if (!p_node) {
return;
- if (Object::cast_to<Viewport>(p_node))
+ }
+ if (Object::cast_to<Viewport>(p_node)) {
return;
+ }
const CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
@@ -578,10 +579,12 @@ Rect2 CanvasItemEditor::_get_encompassing_rect(const Node *p_node) {
}
void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, Vector<_SelectResult> &r_items, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
- if (!p_node)
+ if (!p_node) {
return;
- if (Object::cast_to<Viewport>(p_node))
+ }
+ if (Object::cast_to<Viewport>(p_node)) {
return;
+ }
const real_t grab_distance = EDITOR_GET("editors/poly_editor/point_grab_radius");
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
@@ -615,7 +618,6 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
}
void CanvasItemEditor::_get_canvas_items_at_pos(const Point2 &p_pos, Vector<_SelectResult> &r_items, bool p_allow_locked) {
-
Node *scene = editor->get_edited_scene();
_find_canvas_items_at_pos(p_pos, scene, r_items);
@@ -667,11 +669,12 @@ void CanvasItemEditor::_get_bones_at_pos(const Point2 &p_pos, Vector<_SelectResu
Node2D *from_node = Object::cast_to<Node2D>(ObjectDB::get_instance(E->key().from));
Vector<Vector2> bone_shape;
- if (!_get_bone_shape(&bone_shape, nullptr, E))
+ if (!_get_bone_shape(&bone_shape, nullptr, E)) {
continue;
+ }
// Check if the point is inside the Polygon2D
- if (Geometry::is_point_in_polygon(screen_pos, bone_shape)) {
+ if (Geometry2D::is_point_in_polygon(screen_pos, bone_shape)) {
// Check if the item is already in the list
bool duplicate = false;
for (int i = 0; i < r_items.size(); i++) {
@@ -680,8 +683,9 @@ void CanvasItemEditor::_get_bones_at_pos(const Point2 &p_pos, Vector<_SelectResu
break;
}
}
- if (duplicate)
+ if (duplicate) {
continue;
+ }
// Else, add it
_SelectResult res;
@@ -700,21 +704,25 @@ bool CanvasItemEditor::_get_bone_shape(Vector<Vector2> *shape, Vector<Vector2> *
Node2D *from_node = Object::cast_to<Node2D>(ObjectDB::get_instance(bone->key().from));
Node2D *to_node = Object::cast_to<Node2D>(ObjectDB::get_instance(bone->key().to));
- if (!from_node)
+ if (!from_node) {
return false;
- if (!from_node->is_inside_tree())
+ }
+ if (!from_node->is_inside_tree()) {
return false; //may have been removed
+ }
- if (!to_node && bone->get().length == 0)
+ if (!to_node && bone->get().length == 0) {
return false;
+ }
Vector2 from = transform.xform(from_node->get_global_position());
Vector2 to;
- if (to_node)
+ if (to_node) {
to = transform.xform(to_node->get_global_position());
- else
+ } else {
to = transform.xform(from_node->get_global_transform().xform(Vector2(bone->get().length, 0)));
+ }
Vector2 rel = to - from;
Vector2 relt = rel.tangent().normalized() * bone_width;
@@ -742,10 +750,12 @@ bool CanvasItemEditor::_get_bone_shape(Vector<Vector2> *shape, Vector<Vector2> *
}
void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_node, List<CanvasItem *> *r_items, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
- if (!p_node)
+ if (!p_node) {
return;
- if (Object::cast_to<Viewport>(p_node))
+ }
+ if (Object::cast_to<Viewport>(p_node)) {
return;
+ }
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
Node *scene = editor->get_edited_scene();
@@ -778,7 +788,6 @@ void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_n
p_rect.has_point(xform.xform(rect.position + Vector2(rect.size.x, 0))) &&
p_rect.has_point(xform.xform(rect.position + Vector2(rect.size.x, rect.size.y))) &&
p_rect.has_point(xform.xform(rect.position + Vector2(0, rect.size.y)))) {
-
r_items->push_back(canvas_item);
}
} else {
@@ -861,10 +870,12 @@ Vector2 CanvasItemEditor::_position_to_anchor(const Control *p_control, Vector2
}
void CanvasItemEditor::_save_canvas_item_ik_chain(const CanvasItem *p_canvas_item, List<float> *p_bones_length, List<Dictionary> *p_bones_state) {
- if (p_bones_length)
+ if (p_bones_length) {
*p_bones_length = List<float>();
- if (p_bones_state)
+ }
+ if (p_bones_state) {
*p_bones_state = List<Dictionary>();
+ }
const Node2D *bone = Object::cast_to<Node2D>(p_canvas_item);
if (bone && bone->has_meta("_edit_bone_")) {
@@ -890,10 +901,12 @@ void CanvasItemEditor::_save_canvas_item_ik_chain(const CanvasItem *p_canvas_ite
for (List<const Node2D *>::Element *bone_E = bone_ik_list.front(); bone_E; bone_E = bone_E->next()) {
bone_xform = bone_xform * bone->get_transform().affine_inverse();
const Node2D *parent_bone = bone_E->get();
- if (p_bones_length)
+ if (p_bones_length) {
p_bones_length->push_back(parent_bone->get_global_transform().get_origin().distance_to(bone->get_global_position()));
- if (p_bones_state)
+ }
+ if (p_bones_state) {
p_bones_state->push_back(parent_bone->_edit_get_state());
+ }
bone = parent_bone;
}
}
@@ -965,18 +978,18 @@ void CanvasItemEditor::_snap_changed() {
}
void CanvasItemEditor::_selection_result_pressed(int p_result) {
-
- if (selection_results.size() <= p_result)
+ if (selection_results.size() <= p_result) {
return;
+ }
CanvasItem *item = selection_results[p_result].item;
- if (item)
+ if (item) {
_select_click_on_item(item, Point2(), selection_menu_additive_selection);
+ }
}
void CanvasItemEditor::_selection_menu_hide() {
-
selection_results.clear();
selection_menu->clear();
selection_menu->set_size(Vector2(0, 0));
@@ -1027,7 +1040,6 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve
// Start dragging a guide
if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
-
// Press button
if (b->get_position().x < RULER_WIDTH && b->get_position().y < RULER_WIDTH) {
// Drag a new double guide
@@ -1203,7 +1215,11 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo
view_offset.y += int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor();
update_viewport();
} else {
- _zoom_on_position(zoom * (1 - (0.05 * b->get_factor())), b->get_position());
+ float new_zoom = _get_next_zoom_value(-1);
+ if (b->get_factor() != 1.f) {
+ new_zoom = zoom * ((new_zoom / zoom - 1.f) * b->get_factor() + 1.f);
+ }
+ _zoom_on_position(new_zoom, b->get_position());
}
return true;
}
@@ -1214,7 +1230,11 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo
view_offset.y -= int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor();
update_viewport();
} else {
- _zoom_on_position(zoom * ((0.95 + (0.05 * b->get_factor())) / 0.95), b->get_position());
+ float new_zoom = _get_next_zoom_value(1);
+ if (b->get_factor() != 1.f) {
+ new_zoom = zoom * ((new_zoom / zoom - 1.f) * b->get_factor() + 1.f);
+ }
+ _zoom_on_position(new_zoom, b->get_position());
}
return true;
}
@@ -1274,8 +1294,9 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo
}
}
- if (is_pan_key)
+ if (is_pan_key) {
pan_pressed = k->is_pressed();
+ }
}
Ref<InputEventMouseMotion> m = p_event;
@@ -1362,10 +1383,11 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
drag_to = transform.affine_inverse().xform(m->get_position());
_restore_canvas_item_state(drag_selection);
Vector2 new_pos;
- if (drag_selection.size() == 1)
+ if (drag_selection.size() == 1) {
new_pos = snap_point(drag_to, SNAP_NODE_SIDES | SNAP_NODE_CENTER | SNAP_NODE_ANCHORS | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, drag_selection[0]);
- else
+ } else {
new_pos = snap_point(drag_to, SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL);
+ }
for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = E->get();
canvas_item->_edit_set_pivot(canvas_item->get_global_transform_with_canvas().affine_inverse().xform(new_pos));
@@ -1397,7 +1419,6 @@ void CanvasItemEditor::_solve_IK(Node2D *leaf_node, Point2 target_position) {
if (se) {
int nb_bones = se->pre_drag_bones_undo_state.size();
if (nb_bones > 0) {
-
// Build the node list
Point2 leaf_pos = target_position;
@@ -1475,8 +1496,9 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) {
// Remove not movable nodes
for (List<CanvasItem *>::Element *E = selection.front(); E; E = E->next()) {
- if (!_is_node_movable(E->get(), true))
+ if (!_is_node_movable(E->get(), true)) {
selection.erase(E);
+ }
}
drag_selection = selection;
@@ -1624,28 +1646,36 @@ bool CanvasItemEditor::_gui_input_anchors(const Ref<InputEvent> &p_event) {
switch (drag_type) {
case DRAG_ANCHOR_TOP_LEFT:
- if (!use_single_axis || !use_y)
+ if (!use_single_axis || !use_y) {
control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
- if (!use_single_axis || use_y)
+ }
+ if (!use_single_axis || use_y) {
control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
+ }
break;
case DRAG_ANCHOR_TOP_RIGHT:
- if (!use_single_axis || !use_y)
+ if (!use_single_axis || !use_y) {
control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
- if (!use_single_axis || use_y)
+ }
+ if (!use_single_axis || use_y) {
control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
+ }
break;
case DRAG_ANCHOR_BOTTOM_RIGHT:
- if (!use_single_axis || !use_y)
+ if (!use_single_axis || !use_y) {
control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
- if (!use_single_axis || use_y)
+ }
+ if (!use_single_axis || use_y) {
control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
+ }
break;
case DRAG_ANCHOR_BOTTOM_LEFT:
- if (!use_single_axis || !use_y)
+ if (!use_single_axis || !use_y) {
control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
- if (!use_single_axis || use_y)
+ }
+ if (!use_single_axis || use_y) {
control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
+ }
break;
case DRAG_ANCHOR_ALL:
if (!use_single_axis || !use_y) {
@@ -1723,13 +1753,15 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) {
Vector2 ofs = ((endpoints[i] - endpoints[prev]).normalized() + ((endpoints[i] - endpoints[next]).normalized())).normalized();
ofs *= (select_handle->get_size().width / 2);
ofs += endpoints[i];
- if (ofs.distance_to(b->get_position()) < radius)
+ if (ofs.distance_to(b->get_position()) < radius) {
resize_drag = dragger[i * 2];
+ }
ofs = (endpoints[i] + endpoints[next]) / 2;
ofs += (endpoints[next] - endpoints[i]).tangent().normalized() * (select_handle->get_size().width / 2);
- if (ofs.distance_to(b->get_position()) < radius)
+ if (ofs.distance_to(b->get_position()) < radius) {
resize_drag = dragger[i * 2 + 1];
+ }
}
if (resize_drag != DRAG_NONE) {
@@ -1866,7 +1898,6 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) {
}
bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> b = p_event;
Ref<InputEventMouseMotion> m = p_event;
@@ -1878,7 +1909,6 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
CanvasItem *canvas_item = selection[0];
if (_is_node_movable(canvas_item)) {
-
Transform2D xform = transform * canvas_item->get_global_transform_with_canvas();
Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
@@ -2041,7 +2071,6 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if (drag_type == DRAG_MOVE || drag_type == DRAG_MOVE_X || drag_type == DRAG_MOVE_Y) {
// Move the nodes
if (m.is_valid()) {
-
// Save the ik chain for reapplying before IK solve
Vector<List<Dictionary>> all_bones_ik_states;
for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
@@ -2143,7 +2172,6 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
if (drag_selection.size() > 0) {
-
// Save the ik chain for reapplying before IK solve
Vector<List<Dictionary>> all_bones_ik_states;
for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
@@ -2158,20 +2186,23 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
bool move_local_base_rotated = k->get_control() || k->get_metakey();
Vector2 dir;
- if (k->get_keycode() == KEY_UP)
+ if (k->get_keycode() == KEY_UP) {
dir += Vector2(0, -1);
- else if (k->get_keycode() == KEY_DOWN)
+ } else if (k->get_keycode() == KEY_DOWN) {
dir += Vector2(0, 1);
- else if (k->get_keycode() == KEY_LEFT)
+ } else if (k->get_keycode() == KEY_LEFT) {
dir += Vector2(-1, 0);
- else if (k->get_keycode() == KEY_RIGHT)
+ } else if (k->get_keycode() == KEY_RIGHT) {
dir += Vector2(1, 0);
- if (k->get_shift())
+ }
+ if (k->get_shift()) {
dir *= grid_step * Math::pow(2.0, grid_step_multiplier);
+ }
drag_to += dir;
- if (k->get_shift())
+ if (k->get_shift()) {
drag_to = drag_to.snapped(grid_step * Math::pow(2.0, grid_step_multiplier));
+ }
Point2 previous_pos;
if (drag_selection.size() == 1) {
@@ -2219,7 +2250,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
return true;
}
- if (k.is_valid() && !k->is_pressed() && drag_type == DRAG_KEY_MOVE && tool == TOOL_SELECT &&
+ if (k.is_valid() && !k->is_pressed() && drag_type == DRAG_KEY_MOVE && (tool == TOOL_SELECT || tool == TOOL_MOVE) &&
(k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)) {
// Confirm canvas items move by arrow keys
if ((!Input::get_singleton()->is_key_pressed(KEY_UP)) &&
@@ -2310,8 +2341,9 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
Point2 click = transform.affine_inverse().xform(b->get_position());
Node *scene = editor->get_edited_scene();
- if (!scene)
+ if (!scene) {
return true;
+ }
// Find the item to select
CanvasItem *canvas_item = nullptr;
@@ -2379,10 +2411,12 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
Point2 bsfrom = drag_from;
Point2 bsto = box_selecting_to;
- if (bsfrom.x > bsto.x)
+ if (bsfrom.x > bsto.x) {
SWAP(bsfrom.x, bsto.x);
- if (bsfrom.y > bsto.y)
+ }
+ if (bsfrom.y > bsto.y) {
SWAP(bsfrom.y, bsto.y);
+ }
_find_canvas_items_in_rect(Rect2(bsfrom, bsto - bsfrom), scene, &selitems);
for (List<CanvasItem *>::Element *E = selitems.front(); E; E = E->next()) {
@@ -2419,16 +2453,17 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
}
bool CanvasItemEditor::_gui_input_ruler_tool(const Ref<InputEvent> &p_event) {
-
- if (tool != TOOL_RULER)
+ if (tool != TOOL_RULER) {
return false;
+ }
Ref<InputEventMouseButton> b = p_event;
Ref<InputEventMouseMotion> m = p_event;
Point2 previous_origin = ruler_tool_origin;
- if (!ruler_tool_active)
+ if (!ruler_tool_active) {
ruler_tool_origin = snap_point(viewport->get_local_mouse_position() / zoom + view_offset);
+ }
if (b.is_valid() && b->get_button_index() == BUTTON_LEFT) {
if (b->is_pressed()) {
@@ -2442,7 +2477,6 @@ bool CanvasItemEditor::_gui_input_ruler_tool(const Ref<InputEvent> &p_event) {
}
if (m.is_valid() && (ruler_tool_active || (grid_snap_active && previous_origin != ruler_tool_origin))) {
-
viewport->update();
return true;
}
@@ -2451,7 +2485,6 @@ bool CanvasItemEditor::_gui_input_ruler_tool(const Ref<InputEvent> &p_event) {
}
bool CanvasItemEditor::_gui_input_hover(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseMotion> m = p_event;
if (m.is_valid()) {
Point2 click = transform.affine_inverse().xform(m->get_position());
@@ -2466,8 +2499,9 @@ bool CanvasItemEditor::_gui_input_hover(const Ref<InputEvent> &p_event) {
for (int i = 0; i < hovering_results_items.size(); i++) {
CanvasItem *canvas_item = hovering_results_items[i].item;
- if (canvas_item->_edit_use_rect())
+ if (canvas_item->_edit_use_rect()) {
continue;
+ }
_HoverResult hover_result;
hover_result.position = canvas_item->get_global_transform_with_canvas().get_origin();
@@ -2536,8 +2570,9 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
accepted = (_gui_input_zoom_or_pan(p_event, accepted) || accepted);
- if (accepted)
+ if (accepted) {
accept_event();
+ }
// Handles the mouse hovering
_gui_input_hover(p_event);
@@ -2589,10 +2624,11 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
break;
}
- if (is_hovering_h_guide)
+ if (is_hovering_h_guide) {
c = CURSOR_VSIZE;
- else if (is_hovering_v_guide)
+ } else if (is_hovering_v_guide) {
c = CURSOR_HSIZE;
+ }
viewport->set_default_cursor_shape(c);
@@ -2646,7 +2682,6 @@ void CanvasItemEditor::_draw_focus() {
}
void CanvasItemEditor::_draw_guides() {
-
Color guide_color = EditorSettings::get_singleton()->get("editors/2d/guides_color");
Transform2D xform = viewport_scrollable->get_transform() * transform;
@@ -2654,8 +2689,9 @@ void CanvasItemEditor::_draw_guides() {
if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
for (int i = 0; i < vguides.size(); i++) {
- if (drag_type == DRAG_V_GUIDE && i == dragged_guide_index)
+ if (drag_type == DRAG_V_GUIDE && i == dragged_guide_index) {
continue;
+ }
float x = xform.xform(Point2(vguides[i], 0)).x;
viewport->draw_line(Point2(x, 0), Point2(x, viewport->get_size().y), guide_color, Math::round(EDSCALE));
}
@@ -2664,8 +2700,9 @@ void CanvasItemEditor::_draw_guides() {
if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) {
Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_");
for (int i = 0; i < hguides.size(); i++) {
- if (drag_type == DRAG_H_GUIDE && i == dragged_guide_index)
+ if (drag_type == DRAG_H_GUIDE && i == dragged_guide_index) {
continue;
+ }
float y = xform.xform(Point2(0, hguides[i])).y;
viewport->draw_line(Point2(0, y), Point2(viewport->get_size().x, y), guide_color, Math::round(EDSCALE));
}
@@ -2793,7 +2830,6 @@ void CanvasItemEditor::_draw_rulers() {
}
void CanvasItemEditor::_draw_grid() {
-
if (show_grid || grid_snap_active) {
// Draw the grid
Vector2 real_grid_offset;
@@ -2866,9 +2902,9 @@ void CanvasItemEditor::_draw_grid() {
}
void CanvasItemEditor::_draw_ruler_tool() {
-
- if (tool != TOOL_RULER)
+ if (tool != TOOL_RULER) {
return;
+ }
if (ruler_tool_active) {
Color ruler_primary_color = get_theme_color("accent_color", "Editor");
@@ -2967,7 +3003,6 @@ void CanvasItemEditor::_draw_ruler_tool() {
}
if (grid_snap_active) {
-
text_pos = (begin + end) / 2 + Vector2(-text_width / 2, text_height / 2);
text_pos.x = CLAMP(text_pos.x, text_width / 2, viewport->get_rect().size.x - text_width * 1.5);
text_pos.y = CLAMP(text_pos.y, text_height * 2.5, viewport->get_rect().size.y - text_height / 2);
@@ -2987,7 +3022,6 @@ void CanvasItemEditor::_draw_ruler_tool() {
}
}
} else {
-
if (grid_snap_active) {
Ref<Texture2D> position_icon = get_theme_icon("EditorPosition", "EditorIcons");
viewport->draw_texture(get_theme_icon("EditorPosition", "EditorIcons"), (ruler_tool_origin - view_offset) * zoom - position_icon->get_size() / 2);
@@ -2999,7 +3033,6 @@ void CanvasItemEditor::_draw_control_anchors(Control *control) {
Transform2D xform = transform * control->get_global_transform_with_canvas();
RID ci = viewport->get_canvas_item();
if (tool == TOOL_SELECT && !Object::cast_to<Container>(control->get_parent())) {
-
// Compute the anchors
float anchors_values[4];
anchors_values[0] = control->get_anchor(MARGIN_LEFT);
@@ -3264,7 +3297,6 @@ void CanvasItemEditor::_draw_selection() {
viewport->draw_line(endpoints[i], endpoints[(i + 1) % 4], c, Math::round(2 * EDSCALE));
}
} else {
-
Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
viewport->draw_set_transform_matrix(simple_xform);
@@ -3275,7 +3307,6 @@ void CanvasItemEditor::_draw_selection() {
if (single && !item_locked && (tool == TOOL_SELECT || tool == TOOL_MOVE || tool == TOOL_SCALE || tool == TOOL_ROTATE || tool == TOOL_EDIT_PIVOT)) { //kind of sucks
// Draw the pivot
if (canvas_item->_edit_use_pivot()) {
-
// Draw the node's pivot
Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
@@ -3453,15 +3484,12 @@ void CanvasItemEditor::_draw_straight_line(Point2 p_from, Point2 p_to, Color p_c
}
void CanvasItemEditor::_draw_axis() {
-
if (show_origin) {
-
_draw_straight_line(Point2(), Point2(1, 0), get_theme_color("axis_x_color", "Editor") * Color(1, 1, 1, 0.75));
_draw_straight_line(Point2(), Point2(0, 1), get_theme_color("axis_y_color", "Editor") * Color(1, 1, 1, 0.75));
}
if (show_viewport) {
-
RID ci = viewport->get_canvas_item();
Color area_axis_color = EditorSettings::get_singleton()->get("editors/2d/viewport_border_color");
@@ -3492,15 +3520,16 @@ void CanvasItemEditor::_draw_bones() {
Color bone_selected_color = EditorSettings::get_singleton()->get("editors/2d/bone_selected_color");
for (Map<BoneKey, BoneList>::Element *E = bone_list.front(); E; E = E->next()) {
-
Vector<Vector2> bone_shape;
Vector<Vector2> bone_shape_outline;
- if (!_get_bone_shape(&bone_shape, &bone_shape_outline, E))
+ if (!_get_bone_shape(&bone_shape, &bone_shape_outline, E)) {
continue;
+ }
Node2D *from_node = Object::cast_to<Node2D>(ObjectDB::get_instance(E->key().from));
- if (!from_node->is_visible_in_tree())
+ if (!from_node->is_visible_in_tree()) {
continue;
+ }
Vector<Color> colors;
if (from_node->has_meta("_edit_ik_")) {
@@ -3543,11 +3572,13 @@ void CanvasItemEditor::_draw_invisible_nodes_positions(Node *p_node, const Trans
ERR_FAIL_COND(!p_node);
Node *scene = editor->get_edited_scene();
- if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner()))
+ if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner())) {
return;
+ }
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
- if (canvas_item && !canvas_item->is_visible())
+ if (canvas_item && !canvas_item->is_visible()) {
return;
+ }
Transform2D parent_xform = p_parent_xform;
Transform2D canvas_xform = p_canvas_xform;
@@ -3581,7 +3612,6 @@ void CanvasItemEditor::_draw_hover() {
List<Rect2> previous_rects;
for (int i = 0; i < hovering_results.size(); i++) {
-
Ref<Texture2D> node_icon = hovering_results[i].icon;
String node_name = hovering_results[i].name;
@@ -3611,11 +3641,13 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p
ERR_FAIL_COND(!p_node);
Node *scene = editor->get_edited_scene();
- if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner()))
+ if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner())) {
return;
+ }
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
- if (canvas_item && !canvas_item->is_visible())
+ if (canvas_item && !canvas_item->is_visible()) {
return;
+ }
Transform2D parent_xform = p_parent_xform;
Transform2D canvas_xform = p_canvas_xform;
@@ -3717,7 +3749,6 @@ bool CanvasItemEditor::_build_bones_list(Node *p_node) {
}
void CanvasItemEditor::_draw_viewport() {
-
// Update the transform
transform = Transform2D();
transform.scale_basis(Size2(zoom, zoom));
@@ -3777,10 +3808,12 @@ void CanvasItemEditor::_draw_viewport() {
}
_draw_bones();
- if (show_rulers)
+ if (show_rulers) {
_draw_rulers();
- if (show_guides)
+ }
+ if (show_guides) {
_draw_guides();
+ }
_draw_smart_snapping();
_draw_focus();
_draw_hover();
@@ -3796,7 +3829,6 @@ void CanvasItemEditor::set_current_tool(Tool p_tool) {
}
void CanvasItemEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
EditorNode::get_singleton()->get_scene_root()->set_snap_controls_to_pixels(GLOBAL_GET("gui/common/snap_controls_to_pixels"));
@@ -3882,10 +3914,8 @@ void CanvasItemEditor::_notification(int p_what) {
// Update the viewport if bones changes
for (Map<BoneKey, BoneList>::Element *E = bone_list.front(); E; E = E->next()) {
-
Object *b = ObjectDB::get_instance(E->key().from);
if (!b) {
-
viewport->update();
break;
}
@@ -3898,14 +3928,12 @@ void CanvasItemEditor::_notification(int p_what) {
Transform2D global_xform = b2->get_global_transform();
if (global_xform != E->get().xform) {
-
E->get().xform = global_xform;
viewport->update();
}
Bone2D *bone = Object::cast_to<Bone2D>(b);
if (bone && bone->get_default_length() != E->get().length) {
-
E->get().length = bone->get_default_length();
viewport->update();
}
@@ -3913,7 +3941,6 @@ void CanvasItemEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_ENTER_TREE) {
-
select_sb->set_texture(get_theme_icon("EditorRect2D", "EditorIcons"));
for (int i = 0; i < 4; i++) {
select_sb->set_margin_size(Margin(i), 4);
@@ -3926,7 +3953,6 @@ void CanvasItemEditor::_notification(int p_what) {
get_tree()->connect("node_removed", callable_mp(this, &CanvasItemEditor::_tree_changed), varray());
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
-
select_sb->set_texture(get_theme_icon("EditorRect2D", "EditorIcons"));
}
@@ -4034,10 +4060,12 @@ void CanvasItemEditor::_selection_changed() {
List<Node *> selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
Control *control = Object::cast_to<Control>(E->get());
- if (!control)
+ if (!control) {
continue;
- if (Object::cast_to<Container>(control->get_parent()))
+ }
+ if (Object::cast_to<Container>(control->get_parent())) {
continue;
+ }
nbValidControls++;
if (control->has_meta("_edit_use_anchors_") && control->get_meta("_edit_use_anchors_")) {
@@ -4054,7 +4082,6 @@ void CanvasItemEditor::_selection_changed() {
}
void CanvasItemEditor::edit(CanvasItem *p_canvas_item) {
-
Array selection = editor_selection->get_selected_nodes();
if (selection.size() != 1 || (Node *)selection[0] != p_canvas_item) {
drag_type = DRAG_NONE;
@@ -4066,16 +4093,15 @@ void CanvasItemEditor::edit(CanvasItem *p_canvas_item) {
}
void CanvasItemEditor::_queue_update_bone_list() {
-
- if (bone_list_dirty)
+ if (bone_list_dirty) {
return;
+ }
call_deferred("_update_bone_list");
bone_list_dirty = true;
}
void CanvasItemEditor::_update_bone_list() {
-
bone_last_frame++;
if (editor->get_edited_scene()) {
@@ -4107,7 +4133,6 @@ void CanvasItemEditor::_tree_changed(Node *) {
}
void CanvasItemEditor::_update_scrollbars() {
-
updating_scroll = true;
// Move the zoom buttons.
@@ -4225,9 +4250,9 @@ void CanvasItemEditor::_popup_warning_temporarily(Control *p_control, const floa
}
void CanvasItemEditor::_update_scroll(float) {
-
- if (updating_scroll)
+ if (updating_scroll) {
return;
+ }
view_offset.x = h_scroll->get_value();
view_offset.y = v_scroll->get_value();
@@ -4240,7 +4265,6 @@ void CanvasItemEditor::_set_anchors_and_margins_preset(Control::LayoutPreset p_p
undo_redo->create_action(TTR("Change Anchors and Margins"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Control *control = Object::cast_to<Control>(E->get());
if (control) {
undo_redo->add_do_method(control, "set_anchors_preset", p_preset);
@@ -4282,7 +4306,6 @@ void CanvasItemEditor::_set_anchors_and_margins_to_keep_ratio() {
undo_redo->create_action(TTR("Change Anchors and Margins"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Control *control = Object::cast_to<Control>(E->get());
if (control) {
Point2 top_left_anchor = _position_to_anchor(control, Point2());
@@ -4310,7 +4333,6 @@ void CanvasItemEditor::_set_anchors_preset(Control::LayoutPreset p_preset) {
undo_redo->create_action(TTR("Change Anchors"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Control *control = Object::cast_to<Control>(E->get());
if (control) {
undo_redo->add_do_method(control, "set_anchors_preset", p_preset);
@@ -4321,9 +4343,39 @@ void CanvasItemEditor::_set_anchors_preset(Control::LayoutPreset p_preset) {
undo_redo->commit_action();
}
+float CanvasItemEditor::_get_next_zoom_value(int p_increment_count) const {
+ // Base increment factor defined as the twelveth root of two.
+ // This allow a smooth geometric evolution of the zoom, with the advantage of
+ // visiting all integer power of two scale factors.
+ // note: this is analogous to the 'semitones' interval in the music world
+ // In order to avoid numerical imprecisions, we compute and edit a zoom index
+ // with the following relation: zoom = 2 ^ (index / 12)
+
+ if (zoom < CMP_EPSILON || p_increment_count == 0) {
+ return 1.f;
+ }
+
+ // Remove Editor scale from the index computation
+ float zoom_noscale = zoom / MAX(1, EDSCALE);
+
+ // zoom = 2**(index/12) => log2(zoom) = index/12
+ float closest_zoom_index = Math::round(Math::log(zoom_noscale) * 12.f / Math::log(2.f));
+
+ float new_zoom_index = closest_zoom_index + p_increment_count;
+ float new_zoom = Math::pow(2.f, new_zoom_index / 12.f);
+
+ // Restore Editor scale transformation
+ new_zoom *= MAX(1, EDSCALE);
+
+ return new_zoom;
+}
+
void CanvasItemEditor::_zoom_on_position(float p_zoom, Point2 p_position) {
- if (p_zoom < MIN_ZOOM || p_zoom > MAX_ZOOM)
+ p_zoom = CLAMP(p_zoom, MIN_ZOOM, MAX_ZOOM);
+
+ if (p_zoom == zoom) {
return;
+ }
float prev_zoom = zoom;
zoom = p_zoom;
@@ -4363,7 +4415,7 @@ void CanvasItemEditor::_update_zoom_label() {
}
void CanvasItemEditor::_button_zoom_minus() {
- _zoom_on_position(zoom / Math_SQRT2, viewport_scrollable->get_size() / 2.0);
+ _zoom_on_position(_get_next_zoom_value(-6), viewport_scrollable->get_size() / 2.0);
}
void CanvasItemEditor::_button_zoom_reset() {
@@ -4371,7 +4423,7 @@ void CanvasItemEditor::_button_zoom_reset() {
}
void CanvasItemEditor::_button_zoom_plus() {
- _zoom_on_position(zoom * Math_SQRT2, viewport_scrollable->get_size() / 2.0);
+ _zoom_on_position(_get_next_zoom_value(6), viewport_scrollable->get_size() / 2.0);
}
void CanvasItemEditor::_button_toggle_smart_snap(bool p_status) {
@@ -4383,6 +4435,7 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) {
grid_snap_active = p_status;
viewport->update();
}
+
void CanvasItemEditor::_button_override_camera(bool p_pressed) {
EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton();
@@ -4394,7 +4447,6 @@ void CanvasItemEditor::_button_override_camera(bool p_pressed) {
}
void CanvasItemEditor::_button_tool_select(int p_index) {
-
ToolButton *tb[TOOL_MAX] = { select_button, list_select_button, move_button, scale_button, rotate_button, pivot_button, pan_button, ruler_button };
for (int i = 0; i < TOOL_MAX; i++) {
tb[i]->set_pressed(i == p_index);
@@ -4405,27 +4457,30 @@ void CanvasItemEditor::_button_tool_select(int p_index) {
}
void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, bool p_scale, bool p_on_existing) {
-
Map<Node *, Object *> &selection = editor_selection->get_selection();
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_visible_in_tree()) {
continue;
+ }
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
if (Object::cast_to<Node2D>(canvas_item)) {
Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
- if (key_pos && p_location)
+ if (key_pos && p_location) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(n2d, "position", n2d->get_position(), p_on_existing);
- if (key_rot && p_rotation)
+ }
+ if (key_rot && p_rotation) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(n2d, "rotation_degrees", Math::rad2deg(n2d->get_rotation()), p_on_existing);
- if (key_scale && p_scale)
+ }
+ if (key_scale && p_scale) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(n2d, "scale", n2d->get_scale(), p_on_existing);
+ }
if (n2d->has_meta("_edit_bone_") && n2d->get_parent_item()) {
//look for an IK chain
@@ -4435,42 +4490,45 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation,
bool has_chain = false;
while (n) {
-
ik_chain.push_back(n);
if (n->has_meta("_edit_ik_")) {
has_chain = true;
break;
}
- if (!n->get_parent_item())
+ if (!n->get_parent_item()) {
break;
+ }
n = Object::cast_to<Node2D>(n->get_parent_item());
}
if (has_chain && ik_chain.size()) {
-
for (List<Node2D *>::Element *F = ik_chain.front(); F; F = F->next()) {
-
- if (key_pos)
+ if (key_pos) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(F->get(), "position", F->get()->get_position(), p_on_existing);
- if (key_rot)
+ }
+ if (key_rot) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(F->get(), "rotation_degrees", Math::rad2deg(F->get()->get_rotation()), p_on_existing);
- if (key_scale)
+ }
+ if (key_scale) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(F->get(), "scale", F->get()->get_scale(), p_on_existing);
+ }
}
}
}
} else if (Object::cast_to<Control>(canvas_item)) {
-
Control *ctrl = Object::cast_to<Control>(canvas_item);
- if (key_pos)
+ if (key_pos) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl, "rect_position", ctrl->get_position(), p_on_existing);
- if (key_rot)
+ }
+ if (key_rot) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl, "rect_rotation", ctrl->get_rotation_degrees(), p_on_existing);
- if (key_scale)
+ }
+ if (key_scale) {
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl, "rect_size", ctrl->get_size(), p_on_existing);
+ }
}
}
}
@@ -4479,8 +4537,9 @@ void CanvasItemEditor::_button_toggle_anchor_mode(bool p_status) {
List<CanvasItem *> selection = _get_edited_canvas_items(false, false);
for (List<CanvasItem *>::Element *E = selection.front(); E; E = E->next()) {
Control *control = Object::cast_to<Control>(E->get());
- if (!control || Object::cast_to<Container>(control->get_parent()))
+ if (!control || Object::cast_to<Container>(control->get_parent())) {
continue;
+ }
control->set_meta("_edit_use_anchors_", p_status);
}
@@ -4619,10 +4678,12 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_inside_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree()) {
continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ }
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(canvas_item, "set_meta", "_edit_lock_", true);
undo_redo->add_undo_method(canvas_item, "remove_meta", "_edit_lock_");
@@ -4639,10 +4700,12 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_inside_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree()) {
continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ }
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(canvas_item, "remove_meta", "_edit_lock_");
undo_redo->add_undo_method(canvas_item, "set_meta", "_edit_lock_", true);
@@ -4659,10 +4722,12 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_inside_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree()) {
continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ }
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(canvas_item, "set_meta", "_edit_group_", true);
undo_redo->add_undo_method(canvas_item, "remove_meta", "_edit_group_");
@@ -4679,10 +4744,12 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_inside_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree()) {
continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ }
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(canvas_item, "remove_meta", "_edit_group_");
undo_redo->add_undo_method(canvas_item, "set_meta", "_edit_group_", true);
@@ -4796,41 +4863,36 @@ void CanvasItemEditor::_popup_callback(int p_op) {
case ANIM_INSERT_KEY:
case ANIM_INSERT_KEY_EXISTING: {
-
bool existing = p_op == ANIM_INSERT_KEY_EXISTING;
_insert_animation_keys(true, true, true, existing);
} break;
case ANIM_INSERT_POS: {
-
key_pos = key_loc_button->is_pressed();
} break;
case ANIM_INSERT_ROT: {
-
key_rot = key_rot_button->is_pressed();
} break;
case ANIM_INSERT_SCALE: {
-
key_scale = key_scale_button->is_pressed();
} break;
case ANIM_COPY_POSE: {
-
pose_clipboard.clear();
Map<Node *, Object *> &selection = editor_selection->get_selection();
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_visible_in_tree()) {
continue;
+ }
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
if (Object::cast_to<Node2D>(canvas_item)) {
-
Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
PoseClipboard pc;
pc.pos = n2d->get_position();
@@ -4843,16 +4905,16 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case ANIM_PASTE_POSE: {
-
- if (!pose_clipboard.size())
+ if (!pose_clipboard.size()) {
break;
+ }
undo_redo->create_action(TTR("Paste Pose"));
for (List<PoseClipboard>::Element *E = pose_clipboard.front(); E; E = E->next()) {
-
Node2D *n2d = Object::cast_to<Node2D>(ObjectDB::get_instance(E->get().id));
- if (!n2d)
+ if (!n2d) {
continue;
+ }
undo_redo->add_do_method(n2d, "set_position", E->get().pos);
undo_redo->add_do_method(n2d, "set_rotation", E->get().rot);
undo_redo->add_do_method(n2d, "set_scale", E->get().scale);
@@ -4864,33 +4926,36 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case ANIM_CLEAR_POSE: {
-
Map<Node *, Object *> &selection = editor_selection->get_selection();
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_visible_in_tree()) {
continue;
+ }
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
if (Object::cast_to<Node2D>(canvas_item)) {
Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
- if (key_pos)
+ if (key_pos) {
n2d->set_position(Vector2());
- if (key_rot)
+ }
+ if (key_rot) {
n2d->set_rotation(0);
- if (key_scale)
+ }
+ if (key_scale) {
n2d->set_scale(Vector2(1, 1));
+ }
} else if (Object::cast_to<Control>(canvas_item)) {
-
Control *ctrl = Object::cast_to<Control>(canvas_item);
- if (key_pos)
+ if (key_pos) {
ctrl->set_position(Point2());
+ }
/*
if (key_scale)
AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
@@ -4900,7 +4965,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case CLEAR_GUIDES: {
-
Node *const root = EditorNode::get_singleton()->get_edited_scene();
if (root && (root->has_meta("_edit_horizontal_guides_") || root->has_meta("_edit_vertical_guides_"))) {
@@ -4924,12 +4988,10 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case VIEW_CENTER_TO_SELECTION:
case VIEW_FRAME_TO_SELECTION: {
-
_focus_selection(p_op);
} break;
case PREVIEW_CANVAS_SCALE: {
-
bool preview = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(PREVIEW_CANVAS_SCALE));
preview = !preview;
RS::get_singleton()->canvas_set_disable_scale(!preview);
@@ -4937,21 +4999,23 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case SKELETON_MAKE_BONES: {
-
Map<Node *, Object *> &selection = editor_selection->get_selection();
undo_redo->create_action(TTR("Create Custom Bone(s) from Node(s)"));
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
Node2D *n2d = Object::cast_to<Node2D>(E->key());
- if (!n2d)
+ if (!n2d) {
continue;
- if (!n2d->is_visible_in_tree())
+ }
+ if (!n2d->is_visible_in_tree()) {
continue;
- if (!n2d->get_parent_item())
+ }
+ if (!n2d->get_parent_item()) {
continue;
- if (n2d->has_meta("_edit_bone_") && n2d->get_meta("_edit_bone_"))
+ }
+ if (n2d->has_meta("_edit_bone_") && n2d->get_meta("_edit_bone_")) {
continue;
+ }
undo_redo->add_do_method(n2d, "set_meta", "_edit_bone_", true);
undo_redo->add_undo_method(n2d, "remove_meta", "_edit_bone_");
@@ -4964,19 +5028,20 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case SKELETON_CLEAR_BONES: {
-
Map<Node *, Object *> &selection = editor_selection->get_selection();
undo_redo->create_action(TTR("Clear Bones"));
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
Node2D *n2d = Object::cast_to<Node2D>(E->key());
- if (!n2d)
+ if (!n2d) {
continue;
- if (!n2d->is_visible_in_tree())
+ }
+ if (!n2d->is_visible_in_tree()) {
continue;
- if (!n2d->has_meta("_edit_bone_"))
+ }
+ if (!n2d->has_meta("_edit_bone_")) {
continue;
+ }
undo_redo->add_do_method(n2d, "remove_meta", "_edit_bone_");
undo_redo->add_undo_method(n2d, "set_meta", "_edit_bone_", n2d->get_meta("_edit_bone_"));
@@ -4989,19 +5054,20 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case SKELETON_SET_IK_CHAIN: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
undo_redo->create_action(TTR("Make IK Chain"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_visible_in_tree()) {
continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ }
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
- if (canvas_item->has_meta("_edit_ik_") && canvas_item->get_meta("_edit_ik_"))
+ }
+ if (canvas_item->has_meta("_edit_ik_") && canvas_item->get_meta("_edit_ik_")) {
continue;
+ }
undo_redo->add_do_method(canvas_item, "set_meta", "_edit_ik_", true);
undo_redo->add_undo_method(canvas_item, "remove_meta", "_edit_ik_");
@@ -5012,19 +5078,20 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
case SKELETON_CLEAR_IK_CHAIN: {
-
Map<Node *, Object *> &selection = editor_selection->get_selection();
undo_redo->create_action(TTR("Clear IK Chain"));
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *n2d = Object::cast_to<CanvasItem>(E->key());
- if (!n2d)
+ if (!n2d) {
continue;
- if (!n2d->is_visible_in_tree())
+ }
+ if (!n2d->is_visible_in_tree()) {
continue;
- if (!n2d->has_meta("_edit_ik_"))
+ }
+ if (!n2d->has_meta("_edit_ik_")) {
continue;
+ }
undo_redo->add_do_method(n2d, "remove_meta", "_edit_ik_");
undo_redo->add_undo_method(n2d, "set_meta", "_edit_ik_", n2d->get_meta("_edit_ik_"));
@@ -5045,10 +5112,12 @@ void CanvasItemEditor::_focus_selection(int p_op) {
Map<Node *, Object *> &selection = editor_selection->get_selection();
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
- if (!canvas_item)
+ if (!canvas_item) {
continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ }
+ if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
// counting invisible items, for now
//if (!canvas_item->is_visible_in_tree()) continue;
@@ -5074,11 +5143,11 @@ void CanvasItemEditor::_focus_selection(int p_op) {
rect = rect.merge(canvas_item_rect);
}
};
- if (count == 0)
+ if (count == 0) {
return;
+ }
if (p_op == VIEW_CENTER_TO_SELECTION) {
-
center = rect.position + rect.size / 2;
Vector2 offset = viewport->get_size() / 2 - editor->get_scene_root()->get_global_canvas_transform().xform(center);
view_offset.x -= Math::round(offset.x / zoom);
@@ -5100,7 +5169,6 @@ void CanvasItemEditor::_focus_selection(int p_op) {
}
void CanvasItemEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_update_override_camera_button", "game_running"), &CanvasItemEditor::_update_override_camera_button);
ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
ClassDB::bind_method("_unhandled_key_input", &CanvasItemEditor::_unhandled_key_input);
@@ -5114,7 +5182,6 @@ void CanvasItemEditor::_bind_methods() {
}
Dictionary CanvasItemEditor::get_state() const {
-
Dictionary state;
// Take the editor scale into account.
state["zoom"] = zoom / MAX(1, EDSCALE);
@@ -5151,7 +5218,6 @@ Dictionary CanvasItemEditor::get_state() const {
}
void CanvasItemEditor::set_state(const Dictionary &p_state) {
-
bool update_scrollbars = false;
Dictionary state = p_state;
if (state.has("zoom")) {
@@ -5336,7 +5402,6 @@ void CanvasItemEditor::add_control_to_info_overlay(Control *p_control) {
}
void CanvasItemEditor::remove_control_from_info_overlay(Control *p_control) {
-
info_overlay->remove_child(p_control);
info_overlay->set_margin(MARGIN_LEFT, (show_rulers ? RULER_WIDTH : 0) + 10);
}
@@ -5348,17 +5413,14 @@ void CanvasItemEditor::add_control_to_menu_panel(Control *p_control) {
}
void CanvasItemEditor::remove_control_from_menu_panel(Control *p_control) {
-
hb->remove_child(p_control);
}
HSplitContainer *CanvasItemEditor::get_palette_split() {
-
return palette_split;
}
VSplitContainer *CanvasItemEditor::get_bottom_split() {
-
return bottom_split;
}
@@ -5367,7 +5429,6 @@ void CanvasItemEditor::focus_selection() {
}
CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
-
key_pos = true;
key_rot = true;
key_scale = false;
@@ -5588,6 +5649,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
hb->add_child(pan_button);
pan_button->set_toggle_mode(true);
pan_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_PAN));
+ pan_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/pan_mode", TTR("Pan Mode"), KEY_G));
pan_button->set_tooltip(TTR("Pan Mode"));
ruler_button = memnew(ToolButton);
@@ -5826,25 +5888,21 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
CanvasItemEditor *CanvasItemEditor::singleton = nullptr;
void CanvasItemEditorPlugin::edit(Object *p_object) {
-
canvas_item_editor->set_undo_redo(&get_undo_redo());
canvas_item_editor->edit(Object::cast_to<CanvasItem>(p_object));
}
bool CanvasItemEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("CanvasItem");
}
void CanvasItemEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
canvas_item_editor->show();
canvas_item_editor->set_physics_process(true);
RenderingServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(), false);
} else {
-
canvas_item_editor->hide();
canvas_item_editor->set_physics_process(false);
RenderingServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(), true);
@@ -5852,16 +5910,14 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {
}
Dictionary CanvasItemEditorPlugin::get_state() const {
-
return canvas_item_editor->get_state();
}
-void CanvasItemEditorPlugin::set_state(const Dictionary &p_state) {
+void CanvasItemEditorPlugin::set_state(const Dictionary &p_state) {
canvas_item_editor->set_state(p_state);
}
CanvasItemEditorPlugin::CanvasItemEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
canvas_item_editor = memnew(CanvasItemEditor(editor));
canvas_item_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -5887,8 +5943,9 @@ void CanvasItemEditorViewport::_on_select_type(Object *selected) {
}
void CanvasItemEditorViewport::_on_change_type_confirmed() {
- if (!button_group->get_pressed_button())
+ if (!button_group->get_pressed_button()) {
return;
+ }
CheckBox *check = Object::cast_to<CheckBox>(button_group->get_pressed_button());
default_type = check->get_text();
@@ -5897,7 +5954,6 @@ void CanvasItemEditorViewport::_on_change_type_confirmed() {
}
void CanvasItemEditorViewport::_on_change_type_closed() {
-
_remove_preview();
}
@@ -5929,8 +5985,9 @@ void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) cons
}
}
- if (add_preview)
+ if (add_preview) {
editor->get_scene_root()->add_child(preview_node);
+ }
}
void CanvasItemEditorViewport::_remove_preview() {
@@ -6104,20 +6161,21 @@ void CanvasItemEditorViewport::_perform_drop_data() {
Ref<Texture2D> texture = Ref<Texture2D>(Object::cast_to<Texture2D>(*res));
if (texture != nullptr && texture.is_valid()) {
Node *child;
- if (default_type == "Light2D")
+ if (default_type == "Light2D") {
child = memnew(Light2D);
- else if (default_type == "GPUParticles2D")
+ } else if (default_type == "GPUParticles2D") {
child = memnew(GPUParticles2D);
- else if (default_type == "Polygon2D")
+ } else if (default_type == "Polygon2D") {
child = memnew(Polygon2D);
- else if (default_type == "TouchScreenButton")
+ } else if (default_type == "TouchScreenButton") {
child = memnew(TouchScreenButton);
- else if (default_type == "TextureRect")
+ } else if (default_type == "TextureRect") {
child = memnew(TextureRect);
- else if (default_type == "NinePatchRect")
+ } else if (default_type == "NinePatchRect") {
child = memnew(NinePatchRect);
- else
+ } else {
child = memnew(Sprite2D); // default
+ }
_create_nodes(target_node, child, path, drop_pos);
}
@@ -6203,7 +6261,6 @@ void CanvasItemEditorViewport::_show_resource_type_selector() {
}
bool CanvasItemEditorViewport::_only_packed_scenes_selected() const {
-
for (int i = 0; i < selected_files.size(); ++i) {
if (ResourceLoader::load(selected_files[i])->get_class() != "PackedScene") {
return false;
@@ -6222,8 +6279,9 @@ void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p
if (d.has("type") && String(d["type"]) == "files") {
selected_files = d["files"];
}
- if (selected_files.size() == 0)
+ if (selected_files.size() == 0) {
return;
+ }
List<Node *> list = editor->get_editor_selection()->get_selected_node_list();
if (list.size() == 0) {
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 9f1a92f563..765d5f81d0 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -43,15 +43,14 @@
class CanvasItemEditorViewport;
class CanvasItemEditorSelectedItem : public Object {
-
GDCLASS(CanvasItemEditorSelectedItem, Object);
public:
Transform2D prev_xform;
- float prev_rot;
+ float prev_rot = 0;
Rect2 prev_rect;
Vector2 prev_pivot;
- float prev_anchors[4];
+ float prev_anchors[4] = { 0.0f };
Transform2D pre_drag_xform;
Rect2 pre_drag_rect;
@@ -61,14 +60,10 @@ public:
Dictionary undo_state;
- CanvasItemEditorSelectedItem() :
- prev_anchors() {
- prev_rot = 0;
- }
+ CanvasItemEditorSelectedItem() {}
};
class CanvasItemEditor : public VBoxContainer {
-
GDCLASS(CanvasItemEditor, VBoxContainer);
public:
@@ -293,7 +288,6 @@ private:
MenuOption last_option;
struct _SelectResult {
-
CanvasItem *item;
float z_index;
bool has_z;
@@ -304,7 +298,6 @@ private:
Vector<_SelectResult> selection_results;
struct _HoverResult {
-
Point2 position;
Ref<Texture2D> icon;
String name;
@@ -312,14 +305,11 @@ private:
Vector<_HoverResult> hovering_results;
struct BoneList {
-
Transform2D xform;
- float length;
- uint64_t last_pass;
+ float length = 0.f;
+ uint64_t last_pass = 0;
- BoneList() :
- length(0.f),
- last_pass(0) {}
+ BoneList() {}
};
uint64_t bone_last_frame;
@@ -328,10 +318,11 @@ private:
ObjectID from;
ObjectID to;
_FORCE_INLINE_ bool operator<(const BoneKey &p_key) const {
- if (from == p_key.from)
+ if (from == p_key.from) {
return to < p_key.to;
- else
+ } else {
return from < p_key.from;
+ }
}
};
@@ -537,6 +528,7 @@ private:
VBoxContainer *controls_vb;
HBoxContainer *zoom_hb;
+ float _get_next_zoom_value(int p_increment_count) const;
void _zoom_on_position(float p_zoom, Point2 p_position = Point2());
void _update_zoom_label();
void _button_zoom_minus();
@@ -651,7 +643,6 @@ public:
};
class CanvasItemEditorPlugin : public EditorPlugin {
-
GDCLASS(CanvasItemEditorPlugin, EditorPlugin);
CanvasItemEditor *canvas_item_editor;
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 87e9987aa1..08d6fc966d 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -31,12 +31,10 @@
#include "collision_polygon_2d_editor_plugin.h"
Node2D *CollisionPolygon2DEditor::_get_node() const {
-
return node;
}
void CollisionPolygon2DEditor::_set_node(Node *p_polygon) {
-
node = Object::cast_to<CollisionPolygon2D>(p_polygon);
}
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.h b/editor/plugins/collision_polygon_2d_editor_plugin.h
index a4fa7c7b3b..b0be92db44 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/2d/collision_polygon_2d.h"
class CollisionPolygon2DEditor : public AbstractPolygon2DEditor {
-
GDCLASS(CollisionPolygon2DEditor, AbstractPolygon2DEditor);
CollisionPolygon2D *node;
@@ -49,7 +48,6 @@ public:
};
class CollisionPolygon2DEditorPlugin : public AbstractPolygon2DEditorPlugin {
-
GDCLASS(CollisionPolygon2DEditorPlugin, AbstractPolygon2DEditorPlugin);
public:
diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
index 1cee1a040f..d9d9cf6a87 100644
--- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
@@ -32,6 +32,7 @@
#include "canvas_item_editor_plugin.h"
#include "core/input/input.h"
+#include "core/math/geometry_2d.h"
#include "core/os/file_access.h"
#include "core/os/keyboard.h"
#include "editor/editor_settings.h"
@@ -39,11 +40,8 @@
#include "scene/3d/camera_3d.h"
void CollisionPolygon3DEditor::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_READY: {
-
button_create->set_icon(get_theme_icon("Edit", "EditorIcons"));
button_edit->set_icon(get_theme_icon("MovePoint", "EditorIcons"));
button_edit->set_pressed(true);
@@ -63,29 +61,26 @@ void CollisionPolygon3DEditor::_notification(int p_what) {
} break;
}
}
-void CollisionPolygon3DEditor::_node_removed(Node *p_node) {
+void CollisionPolygon3DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
node = nullptr;
- if (imgeom->get_parent() == p_node)
+ if (imgeom->get_parent() == p_node) {
p_node->remove_child(imgeom);
+ }
hide();
set_process(false);
}
}
void CollisionPolygon3DEditor::_menu_option(int p_option) {
-
switch (p_option) {
-
case MODE_CREATE: {
-
mode = MODE_CREATE;
button_create->set_pressed(true);
button_edit->set_pressed(false);
} break;
case MODE_EDIT: {
-
mode = MODE_EDIT;
button_create->set_pressed(false);
button_edit->set_pressed(true);
@@ -94,7 +89,6 @@ void CollisionPolygon3DEditor::_menu_option(int p_option) {
}
void CollisionPolygon3DEditor::_wip_close() {
-
undo_redo->create_action(TTR("Create Polygon3D"));
undo_redo->add_undo_method(node, "set_polygon", node->call("get_polygon"));
undo_redo->add_do_method(node, "set_polygon", wip);
@@ -110,9 +104,9 @@ void CollisionPolygon3DEditor::_wip_close() {
}
bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
-
- if (!node)
+ if (!node) {
return false;
+ }
Transform gt = node->get_global_transform();
Transform gi = gt.affine_inverse();
@@ -123,15 +117,15 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
-
Vector2 gpoint = mb->get_position();
Vector3 ray_from = p_camera->project_ray_origin(gpoint);
Vector3 ray_dir = p_camera->project_ray_normal(gpoint);
Vector3 spoint;
- if (!p.intersects_ray(ray_from, ray_dir, &spoint))
+ if (!p.intersects_ray(ray_from, ray_dir, &spoint)) {
return false;
+ }
spoint = gi.xform(spoint);
@@ -147,13 +141,9 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
switch (mode) {
-
case MODE_CREATE: {
-
if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
-
if (!wip_active) {
-
wip.clear();
wip.push_back(cpoint);
wip_active = true;
@@ -163,14 +153,12 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
edited_point = 1;
return true;
} else {
-
if (wip.size() > 1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x, wip[0].y, depth))).distance_to(gpoint) < grab_threshold) {
//wip closed
_wip_close();
return true;
} else {
-
wip.push_back(cpoint);
edited_point = wip.size();
snap_ignore = false;
@@ -185,14 +173,10 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
} break;
case MODE_EDIT: {
-
if (mb->get_button_index() == BUTTON_LEFT) {
if (mb->is_pressed()) {
-
if (mb->get_control()) {
-
if (poly.size() < 3) {
-
undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_undo_method(node, "set_polygon", poly);
poly.push_back(cpoint);
@@ -208,15 +192,15 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
Vector2 closest_pos;
real_t closest_dist = 1e10;
for (int i = 0; i < poly.size(); i++) {
-
Vector2 points[2] = {
p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth))),
p_camera->unproject_position(gt.xform(Vector3(poly[(i + 1) % poly.size()].x, poly[(i + 1) % poly.size()].y, depth)))
};
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
- if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
+ Vector2 cp = Geometry2D::get_closest_point_to_segment(gpoint, points);
+ if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2) {
continue; //not valid to reuse point
+ }
real_t d = cp.distance_to(gpoint);
if (d < closest_dist && d < grab_threshold) {
@@ -227,7 +211,6 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
}
if (closest_idx >= 0) {
-
pre_move_edit = poly;
poly.insert(closest_idx + 1, cpoint);
edited_point = closest_idx + 1;
@@ -239,14 +222,12 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
return true;
}
} else {
-
//look for points to move
int closest_idx = -1;
Vector2 closest_pos;
real_t closest_dist = 1e10;
for (int i = 0; i < poly.size(); i++) {
-
Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth)));
real_t d = cp.distance_to(gpoint);
@@ -258,7 +239,6 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
}
if (closest_idx >= 0) {
-
pre_move_edit = poly;
edited_point = closest_idx;
edited_point_pos = poly[closest_idx];
@@ -268,11 +248,9 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
}
}
} else {
-
snap_ignore = false;
if (edited_point != -1) {
-
//apply
ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
@@ -290,12 +268,10 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
}
}
if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) {
-
int closest_idx = -1;
Vector2 closest_pos;
real_t closest_dist = 1e10;
for (int i = 0; i < poly.size(); i++) {
-
Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth)));
real_t d = cp.distance_to(gpoint);
@@ -307,7 +283,6 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
}
if (closest_idx >= 0) {
-
undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node, "set_polygon", poly);
poly.remove(closest_idx);
@@ -327,7 +302,6 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
if (mm.is_valid()) {
if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) {
-
Vector2 gpoint = mm->get_position();
Vector3 ray_from = p_camera->project_ray_origin(gpoint);
@@ -335,8 +309,9 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
Vector3 spoint;
- if (!p.intersects_ray(ray_from, ray_dir, &spoint))
+ if (!p.intersects_ray(ray_from, ray_dir, &spoint)) {
return false;
+ }
spoint = gi.xform(spoint);
@@ -361,24 +336,25 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
}
float CollisionPolygon3DEditor::_get_depth() {
-
- if (bool(node->call("_has_editable_3d_polygon_no_depth")))
+ if (bool(node->call("_has_editable_3d_polygon_no_depth"))) {
return 0;
+ }
return float(node->call("get_depth"));
}
void CollisionPolygon3DEditor::_polygon_draw() {
-
- if (!node)
+ if (!node) {
return;
+ }
Vector<Vector2> poly;
- if (wip_active)
+ if (wip_active) {
poly = wip;
- else
+ } else {
poly = node->call("get_polygon");
+ }
float depth = _get_depth() * 0.5;
@@ -389,18 +365,19 @@ void CollisionPolygon3DEditor::_polygon_draw() {
Rect2 rect;
for (int i = 0; i < poly.size(); i++) {
-
Vector2 p, p2;
p = i == edited_point ? edited_point_pos : poly[i];
- if ((wip_active && i == poly.size() - 1) || (((i + 1) % poly.size()) == edited_point))
+ if ((wip_active && i == poly.size() - 1) || (((i + 1) % poly.size()) == edited_point)) {
p2 = edited_point_pos;
- else
+ } else {
p2 = poly[(i + 1) % poly.size()];
+ }
- if (i == 0)
+ if (i == 0) {
rect.position = p;
- else
+ } else {
rect.expand_to(p);
+ }
Vector3 point = Vector3(p.x, p.y, depth);
Vector3 next_point = Vector3(p2.x, p2.y, depth);
@@ -465,18 +442,17 @@ void CollisionPolygon3DEditor::_polygon_draw() {
m->clear_surfaces();
- if (poly.size() == 0)
+ if (poly.size() == 0) {
return;
+ }
Array a;
a.resize(Mesh::ARRAY_MAX);
Vector<Vector3> va;
{
-
va.resize(poly.size());
Vector3 *w = va.ptrw();
for (int i = 0; i < poly.size(); i++) {
-
Vector2 p, p2;
p = i == edited_point ? edited_point_pos : poly[i];
@@ -490,9 +466,7 @@ void CollisionPolygon3DEditor::_polygon_draw() {
}
void CollisionPolygon3DEditor::edit(Node *p_collision_polygon) {
-
if (p_collision_polygon) {
-
node = Object::cast_to<Node3D>(p_collision_polygon);
//Enable the pencil tool if the polygon is empty
if (Vector<Vector2>(node->call("get_polygon")).size() == 0) {
@@ -509,20 +483,19 @@ void CollisionPolygon3DEditor::edit(Node *p_collision_polygon) {
} else {
node = nullptr;
- if (imgeom->get_parent())
+ if (imgeom->get_parent()) {
imgeom->get_parent()->remove_child(imgeom);
+ }
set_process(false);
}
}
void CollisionPolygon3DEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_polygon_draw"), &CollisionPolygon3DEditor::_polygon_draw);
}
CollisionPolygon3DEditor::CollisionPolygon3DEditor(EditorNode *p_editor) {
-
node = nullptr;
editor = p_editor;
undo_redo = EditorNode::get_undo_redo();
@@ -570,33 +543,27 @@ CollisionPolygon3DEditor::CollisionPolygon3DEditor(EditorNode *p_editor) {
}
CollisionPolygon3DEditor::~CollisionPolygon3DEditor() {
-
memdelete(imgeom);
}
void Polygon3DEditorPlugin::edit(Object *p_object) {
-
collision_polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool Polygon3DEditorPlugin::handles(Object *p_object) const {
-
return Object::cast_to<Node3D>(p_object) && bool(p_object->call("_is_editable_3d_polygon"));
}
void Polygon3DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
collision_polygon_editor->show();
} else {
-
collision_polygon_editor->hide();
collision_polygon_editor->edit(nullptr);
}
}
Polygon3DEditorPlugin::Polygon3DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
collision_polygon_editor = memnew(CollisionPolygon3DEditor(p_node));
Node3DEditor::get_singleton()->add_control_to_menu_panel(collision_polygon_editor);
diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.h b/editor/plugins/collision_polygon_3d_editor_plugin.h
index 9751b1f79e..5215cbb678 100644
--- a/editor/plugins/collision_polygon_3d_editor_plugin.h
+++ b/editor/plugins/collision_polygon_3d_editor_plugin.h
@@ -41,7 +41,6 @@
class CanvasItemEditor;
class CollisionPolygon3DEditor : public HBoxContainer {
-
GDCLASS(CollisionPolygon3DEditor, HBoxContainer);
UndoRedo *undo_redo;
@@ -97,7 +96,6 @@ public:
};
class Polygon3DEditorPlugin : public EditorPlugin {
-
GDCLASS(Polygon3DEditorPlugin, EditorPlugin);
CollisionPolygon3DEditor *collision_polygon_editor;
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 8973dca963..596629f8e8 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -36,18 +36,17 @@
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/line_shape_2d.h"
+#include "scene/resources/ray_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
void CollisionShape2DEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
}
}
Variant CollisionShape2DEditor::get_handle_value(int idx) const {
-
switch (shape_type) {
case CAPSULE_SHAPE: {
Ref<CapsuleShape2D> capsule = node->get_shape();
@@ -70,11 +69,9 @@ Variant CollisionShape2DEditor::get_handle_value(int idx) const {
} break;
case CONCAVE_POLYGON_SHAPE: {
-
} break;
case CONVEX_POLYGON_SHAPE: {
-
} break;
case LINE_SHAPE: {
@@ -122,7 +119,6 @@ Variant CollisionShape2DEditor::get_handle_value(int idx) const {
}
void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
-
switch (shape_type) {
case CAPSULE_SHAPE: {
if (idx < 2) {
@@ -150,11 +146,9 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
} break;
case CONCAVE_POLYGON_SHAPE: {
-
} break;
case CONVEX_POLYGON_SHAPE: {
-
} break;
case LINE_SHAPE: {
@@ -217,7 +211,6 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
}
void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
-
undo_redo->create_action(TTR("Set Handle"));
switch (shape_type) {
@@ -249,11 +242,9 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
} break;
case CONCAVE_POLYGON_SHAPE: {
-
} break;
case CONVEX_POLYGON_SHAPE: {
-
} break;
case LINE_SHAPE: {
@@ -314,7 +305,6 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
}
bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
-
if (!node) {
return false;
}
@@ -331,7 +321,6 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
if (mb.is_valid()) {
-
Vector2 gpoint = mb->get_position();
if (mb->get_button_index() == BUTTON_LEFT) {
@@ -373,7 +362,6 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
-
if (edit_handle == -1 || !pressed) {
return false;
}
@@ -390,7 +378,6 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
}
void CollisionShape2DEditor::_get_current_shape_type() {
-
if (!node) {
return;
}
@@ -425,7 +412,6 @@ void CollisionShape2DEditor::_get_current_shape_type() {
}
void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
-
if (!node) {
return;
}
@@ -474,11 +460,9 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
} break;
case CONCAVE_POLYGON_SHAPE: {
-
} break;
case CONVEX_POLYGON_SHAPE: {
-
} break;
case LINE_SHAPE: {
@@ -533,9 +517,7 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
}
void CollisionShape2DEditor::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_ENTER_TREE: {
get_tree()->connect("node_removed", callable_mp(this, &CollisionShape2DEditor::_node_removed));
} break;
@@ -547,7 +529,6 @@ void CollisionShape2DEditor::_notification(int p_what) {
}
void CollisionShape2DEditor::edit(Node *p_node) {
-
if (!canvas_item_editor) {
canvas_item_editor = CanvasItemEditor::get_singleton();
}
@@ -568,12 +549,10 @@ void CollisionShape2DEditor::edit(Node *p_node) {
}
void CollisionShape2DEditor::_bind_methods() {
-
ClassDB::bind_method("_get_current_shape_type", &CollisionShape2DEditor::_get_current_shape_type);
}
CollisionShape2DEditor::CollisionShape2DEditor(EditorNode *p_editor) {
-
node = nullptr;
canvas_item_editor = nullptr;
editor = p_editor;
@@ -585,24 +564,20 @@ CollisionShape2DEditor::CollisionShape2DEditor(EditorNode *p_editor) {
}
void CollisionShape2DEditorPlugin::edit(Object *p_obj) {
-
collision_shape_2d_editor->edit(Object::cast_to<Node>(p_obj));
}
bool CollisionShape2DEditorPlugin::handles(Object *p_obj) const {
-
return p_obj->is_class("CollisionShape2D");
}
void CollisionShape2DEditorPlugin::make_visible(bool visible) {
-
if (!visible) {
edit(nullptr);
}
}
CollisionShape2DEditorPlugin::CollisionShape2DEditorPlugin(EditorNode *p_editor) {
-
editor = p_editor;
collision_shape_2d_editor = memnew(CollisionShape2DEditor(p_editor));
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
index ef4d7d7646..008de7cfb4 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
@@ -37,53 +37,42 @@
#include "scene/resources/particles_material.h"
void CPUParticles2DEditorPlugin::edit(Object *p_object) {
-
particles = Object::cast_to<CPUParticles2D>(p_object);
}
bool CPUParticles2DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("CPUParticles2D");
}
void CPUParticles2DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
toolbar->show();
} else {
-
toolbar->hide();
}
}
void CPUParticles2DEditorPlugin::_file_selected(const String &p_file) {
-
source_emission_file = p_file;
emission_mask->popup_centered();
}
void CPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
-
switch (p_idx) {
case MENU_LOAD_EMISSION_MASK: {
-
file->popup_centered_ratio();
} break;
case MENU_CLEAR_EMISSION_MASK: {
-
emission_mask->popup_centered();
} break;
case MENU_RESTART: {
-
particles->restart();
}
}
}
void CPUParticles2DEditorPlugin::_generate_emission_mask() {
-
Ref<Image> img;
img.instance();
Error err = ImageLoader::load_image(source_emission_file, img);
@@ -123,13 +112,10 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
for (int i = 0; i < s.width; i++) {
for (int j = 0; j < s.height; j++) {
-
uint8_t a = r[(j * s.width + i) * 4 + 3];
if (a > 128) {
-
if (emode == EMISSION_MODE_SOLID) {
-
if (capture_colors) {
valid_colors.write[vpc * 4 + 0] = r[(j * s.width + i) * 4 + 0];
valid_colors.write[vpc * 4 + 1] = r[(j * s.width + i) * 4 + 1];
@@ -139,19 +125,18 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
valid_positions.write[vpc++] = Point2(i, j);
} else {
-
bool on_border = false;
for (int x = i - 1; x <= i + 1; x++) {
for (int y = j - 1; y <= j + 1; y++) {
-
if (x < 0 || y < 0 || x >= s.width || y >= s.height || r[(y * s.width + x) * 4 + 3] <= 128) {
on_border = true;
break;
}
}
- if (on_border)
+ if (on_border) {
break;
+ }
}
if (on_border) {
@@ -161,9 +146,9 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
Vector2 normal;
for (int x = i - 2; x <= i + 2; x++) {
for (int y = j - 2; y <= j + 2; y++) {
-
- if (x == i && y == j)
+ if (x == i && y == j) {
continue;
+ }
if (x < 0 || y < 0 || x >= s.width || y >= s.height || r[(y * s.width + x) * 4 + 3] <= 128) {
normal += Vector2(x - i, y - j).normalized();
@@ -237,9 +222,7 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
}
void CPUParticles2DEditorPlugin::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
menu->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticles2DEditorPlugin::_menu_callback));
menu->set_icon(epoints->get_theme_icon("CPUParticles2D", "EditorIcons"));
file->connect("file_selected", callable_mp(this, &CPUParticles2DEditorPlugin::_file_selected));
@@ -250,7 +233,6 @@ void CPUParticles2DEditorPlugin::_bind_methods() {
}
CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin(EditorNode *p_node) {
-
particles = nullptr;
editor = p_node;
undo_redo = editor->get_undo_redo();
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.h b/editor/plugins/cpu_particles_2d_editor_plugin.h
index 21b06b6489..fecbb8b1cd 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.h
@@ -39,7 +39,6 @@
#include "scene/gui/file_dialog.h"
class CPUParticles2DEditorPlugin : public EditorPlugin {
-
GDCLASS(CPUParticles2DEditorPlugin, EditorPlugin);
enum {
diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.cpp b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
index 59a353a581..ef26ecd767 100644
--- a/editor/plugins/cpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
@@ -33,7 +33,6 @@
#include "editor/plugins/node_3d_editor_plugin.h"
void CPUParticles3DEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
hide();
@@ -41,24 +40,19 @@ void CPUParticles3DEditor::_node_removed(Node *p_node) {
}
void CPUParticles3DEditor::_notification(int p_notification) {
-
if (p_notification == NOTIFICATION_ENTER_TREE) {
options->set_icon(get_theme_icon("CPUParticles3D", "EditorIcons"));
}
}
void CPUParticles3DEditor::_menu_option(int p_option) {
-
switch (p_option) {
-
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
-
emission_tree_dialog->popup_centered_ratio();
} break;
case MENU_OPTION_RESTART: {
-
node->restart();
} break;
@@ -66,13 +60,11 @@ void CPUParticles3DEditor::_menu_option(int p_option) {
}
void CPUParticles3DEditor::edit(CPUParticles3D *p_particles) {
-
base_node = p_particles;
node = p_particles;
}
void CPUParticles3DEditor::_generate_emission_points() {
-
/// hacer codigo aca
Vector<Vector3> points;
Vector<Vector3> normals;
@@ -95,7 +87,6 @@ void CPUParticles3DEditor::_bind_methods() {
}
CPUParticles3DEditor::CPUParticles3DEditor() {
-
particles_editor_hb = memnew(HBoxContainer);
Node3DEditor::get_singleton()->add_control_to_menu_panel(particles_editor_hb);
options = memnew(MenuButton);
@@ -110,17 +101,14 @@ CPUParticles3DEditor::CPUParticles3DEditor() {
}
void CPUParticles3DEditorPlugin::edit(Object *p_object) {
-
particles_editor->edit(Object::cast_to<CPUParticles3D>(p_object));
}
bool CPUParticles3DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("CPUParticles3D");
}
void CPUParticles3DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
particles_editor->show();
particles_editor->particles_editor_hb->show();
@@ -132,7 +120,6 @@ void CPUParticles3DEditorPlugin::make_visible(bool p_visible) {
}
CPUParticles3DEditorPlugin::CPUParticles3DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
particles_editor = memnew(CPUParticles3DEditor);
editor->get_viewport()->add_child(particles_editor);
diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.h b/editor/plugins/cpu_particles_3d_editor_plugin.h
index 796c842e07..d9680496ba 100644
--- a/editor/plugins/cpu_particles_3d_editor_plugin.h
+++ b/editor/plugins/cpu_particles_3d_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/3d/cpu_particles_3d.h"
class CPUParticles3DEditor : public GPUParticles3DEditorBase {
-
GDCLASS(CPUParticles3DEditor, GPUParticles3DEditorBase);
enum Menu {
@@ -65,7 +64,6 @@ public:
};
class CPUParticles3DEditorPlugin : public EditorPlugin {
-
GDCLASS(CPUParticles3DEditorPlugin, EditorPlugin);
CPUParticles3DEditor *particles_editor;
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 9b5c6bae3b..539ab03f5b 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -65,9 +65,9 @@ CurveEditor::CurveEditor() {
}
void CurveEditor::set_curve(Ref<Curve> curve) {
-
- if (curve == _curve_ref)
+ if (curve == _curve_ref) {
return;
+ }
if (_curve_ref.is_valid()) {
_curve_ref->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveEditor::_curve_changed));
@@ -96,24 +96,23 @@ Size2 CurveEditor::get_minimum_size() const {
}
void CurveEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_DRAW)
+ if (p_what == NOTIFICATION_DRAW) {
_draw();
+ }
}
void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> mb_ref = p_event;
if (mb_ref.is_valid()) {
-
const InputEventMouseButton &mb = **mb_ref;
if (mb.is_pressed() && !_dragging) {
-
Vector2 mpos = mb.get_position();
_selected_tangent = get_tangent_at(mpos);
- if (_selected_tangent == TANGENT_NONE)
+ if (_selected_tangent == TANGENT_NONE) {
set_selected_point(get_point_at(mpos));
+ }
switch (mb.get_button_index()) {
case BUTTON_RIGHT:
@@ -134,7 +133,6 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
if (!mb.is_pressed() && _dragging && mb.get_button_index() == BUTTON_LEFT) {
_dragging = false;
if (_has_undo_data) {
-
UndoRedo &ur = *EditorNode::get_singleton()->get_undo_redo();
ur.create_action(_selected_tangent == TANGENT_NONE ? TTR("Modify Curve Point") : TTR("Modify Curve Tangent"));
@@ -151,13 +149,11 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm_ref = p_event;
if (mm_ref.is_valid()) {
-
const InputEventMouseMotion &mm = **mm_ref;
Vector2 mpos = mm.get_position();
if (_dragging && _curve_ref.is_valid()) {
-
if (_selected_point != -1) {
Curve &curve = **_curve_ref;
@@ -189,10 +185,11 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
set_selected_point(i);
// This is to prevent the user from losing a point out of view.
- if (point_pos.y < curve.get_min_value())
+ if (point_pos.y < curve.get_min_value()) {
point_pos.y = curve.get_min_value();
- else if (point_pos.y > curve.get_max_value())
+ } else if (point_pos.y > curve.get_max_value()) {
point_pos.y = curve.get_max_value();
+ }
curve.set_point_value(_selected_point, point_pos.y);
@@ -205,10 +202,11 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
Vector2 dir = (control_pos - point_pos).normalized();
real_t tangent;
- if (!Math::is_zero_approx(dir.x))
+ if (!Math::is_zero_approx(dir.x)) {
tangent = dir.y / dir.x;
- else
+ } else {
tangent = 9999 * (dir.y >= 0 ? 1 : -1);
+ }
bool link = !Input::get_singleton()->is_key_pressed(KEY_SHIFT);
@@ -216,14 +214,16 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
curve.set_point_left_tangent(_selected_point, tangent);
// Note: if a tangent is set to linear, it shouldn't be linked to the other
- if (link && _selected_point != (curve.get_point_count() - 1) && curve.get_point_right_mode(_selected_point) != Curve::TANGENT_LINEAR)
+ if (link && _selected_point != (curve.get_point_count() - 1) && curve.get_point_right_mode(_selected_point) != Curve::TANGENT_LINEAR) {
curve.set_point_right_tangent(_selected_point, tangent);
+ }
} else {
curve.set_point_right_tangent(_selected_point, tangent);
- if (link && _selected_point != 0 && curve.get_point_left_mode(_selected_point) != Curve::TANGENT_LINEAR)
+ if (link && _selected_point != 0 && curve.get_point_left_mode(_selected_point) != Curve::TANGENT_LINEAR) {
curve.set_point_left_tangent(_selected_point, tangent);
+ }
}
}
}
@@ -238,8 +238,9 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
const InputEventKey &key = **key_ref;
if (key.is_pressed() && _selected_point != -1) {
- if (key.get_keycode() == KEY_DELETE)
+ if (key.get_keycode() == KEY_DELETE) {
remove_point(_selected_point);
+ }
}
}
}
@@ -358,8 +359,9 @@ void CurveEditor::open_context_menu(Vector2 pos) {
_context_menu->set_item_checked(_context_menu->get_item_index(CONTEXT_LINEAR), is_linear);
} else {
- if (_selected_point > 0 || _selected_point + 1 < _curve_ref->get_point_count())
+ if (_selected_point > 0 || _selected_point + 1 < _curve_ref->get_point_count()) {
_context_menu->add_separator();
+ }
if (_selected_point > 0) {
_context_menu->add_check_item(TTR("Left Linear"), CONTEXT_LEFT_LINEAR);
@@ -384,8 +386,9 @@ void CurveEditor::open_context_menu(Vector2 pos) {
}
int CurveEditor::get_point_at(Vector2 pos) const {
- if (_curve_ref.is_null())
+ if (_curve_ref.is_null()) {
return -1;
+ }
const Curve &curve = **_curve_ref;
const float r = _hover_radius * _hover_radius;
@@ -401,8 +404,9 @@ int CurveEditor::get_point_at(Vector2 pos) const {
}
CurveEditor::TangentIndex CurveEditor::get_tangent_at(Vector2 pos) const {
- if (_curve_ref.is_null() || _selected_point < 0)
+ if (_curve_ref.is_null() || _selected_point < 0) {
return TANGENT_NONE;
+ }
if (_selected_point != 0) {
Vector2 control_pos = get_tangent_view_pos(_selected_point, TANGENT_LEFT);
@@ -428,10 +432,11 @@ void CurveEditor::add_point(Vector2 pos) {
ur.create_action(TTR("Remove Curve Point"));
Vector2 point_pos = get_world_pos(pos);
- if (point_pos.y < 0.0)
+ if (point_pos.y < 0.0) {
point_pos.y = 0.0;
- else if (point_pos.y > 1.0)
+ } else if (point_pos.y > 1.0) {
point_pos.y = 1.0;
+ }
// Small trick to get the point index to feed the undo method
int i = _curve_ref->add_point(point_pos);
@@ -454,11 +459,13 @@ void CurveEditor::remove_point(int index) {
ur.add_do_method(*_curve_ref, "remove_point", index);
ur.add_undo_method(*_curve_ref, "add_point", p.pos, p.left_tangent, p.right_tangent, p.left_mode, p.right_mode);
- if (index == _selected_point)
+ if (index == _selected_point) {
set_selected_point(-1);
+ }
- if (index == _hover_point)
+ if (index == _hover_point) {
set_hover_point_index(-1);
+ }
ur.commit_action();
}
@@ -469,11 +476,11 @@ void CurveEditor::toggle_linear(TangentIndex tangent) {
UndoRedo &ur = *EditorNode::get_singleton()->get_undo_redo();
ur.create_action(TTR("Toggle Curve Linear Tangent"));
- if (tangent == TANGENT_NONE)
+ if (tangent == TANGENT_NONE) {
tangent = _selected_tangent;
+ }
if (tangent == TANGENT_LEFT) {
-
bool is_linear = _curve_ref->get_point_left_mode(_selected_point) == Curve::TANGENT_LINEAR;
Curve::TangentMode prev_mode = _curve_ref->get_point_left_mode(_selected_point);
@@ -483,7 +490,6 @@ void CurveEditor::toggle_linear(TangentIndex tangent) {
ur.add_undo_method(*_curve_ref, "set_point_left_mode", _selected_point, prev_mode);
} else {
-
bool is_linear = _curve_ref->get_point_right_mode(_selected_point) == Curve::TANGENT_LINEAR;
Curve::TangentMode prev_mode = _curve_ref->get_point_right_mode(_selected_point);
@@ -538,12 +544,12 @@ void CurveEditor::update_view_transform() {
}
Vector2 CurveEditor::get_tangent_view_pos(int i, TangentIndex tangent) const {
-
Vector2 dir;
- if (tangent == TANGENT_LEFT)
+ if (tangent == TANGENT_LEFT) {
dir = -Vector2(1, _curve_ref->get_point_left_tangent(i));
- else
+ } else {
dir = Vector2(1, _curve_ref->get_point_right_tangent(i));
+ }
Vector2 point_pos = get_view_pos(_curve_ref->get_point_position(i));
Vector2 control_pos = get_view_pos(_curve_ref->get_point_position(i) + dir);
@@ -562,7 +568,6 @@ Vector2 CurveEditor::get_world_pos(Vector2 view_pos) const {
// Uses non-baked points, but takes advantage of ordered iteration to be faster
template <typename T>
static void plot_curve_accurate(const Curve &curve, float step, T plot_func) {
-
if (curve.get_point_count() <= 1) {
// Not enough points to make a curve, so it's just a straight line
float y = curve.interpolate(0);
@@ -600,7 +605,6 @@ static void plot_curve_accurate(const Curve &curve, float step, T plot_func) {
}
struct CanvasItemPlotCurve {
-
CanvasItem &ci;
Color color1;
Color color2;
@@ -617,8 +621,9 @@ struct CanvasItemPlotCurve {
};
void CurveEditor::_draw() {
- if (_curve_ref.is_null())
+ if (_curve_ref.is_null()) {
return;
+ }
Curve &curve = **_curve_ref;
update_view_transform();
@@ -685,7 +690,6 @@ void CurveEditor::_draw() {
// Draw tangents for current point
if (_selected_point >= 0) {
-
const Color tangent_color = get_theme_color("accent_color", "Editor");
int i = _selected_point;
@@ -754,12 +758,10 @@ void CurveEditor::_bind_methods() {
//---------------
bool EditorInspectorPluginCurve::can_handle(Object *p_object) {
-
return Object::cast_to<Curve>(p_object) != nullptr;
}
void EditorInspectorPluginCurve::parse_begin(Object *p_object) {
-
Curve *curve = Object::cast_to<Curve>(p_object);
ERR_FAIL_COND(!curve);
Ref<Curve> c(curve);
@@ -785,7 +787,6 @@ bool CurvePreviewGenerator::handles(const String &p_type) const {
}
Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 &p_size) const {
-
Ref<Curve> curve_ref = p_from;
ERR_FAIL_COND_V_MSG(curve_ref.is_null(), Ref<Texture2D>(), "It's not a reference to a valid Resource object.");
Curve &curve = **curve_ref;
@@ -797,7 +798,7 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
img_ref.instance();
Image &im = **img_ref;
- im.create(thumbnail_size, thumbnail_size / 2, 0, Image::FORMAT_RGBA8);
+ im.create(thumbnail_size, thumbnail_size / 2, false, Image::FORMAT_RGBA8);
Color bg_color(0.1, 0.1, 0.1, 1.0);
for (int i = 0; i < thumbnail_size; i++) {
@@ -811,7 +812,6 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
int prev_y = 0;
for (int x = 0; x < im.get_width(); ++x) {
-
float t = static_cast<float>(x) / im.get_width();
float v = (curve.interpolate_baked(t) - curve.get_min_value()) / range_y;
int y = CLAMP(im.get_height() - v * im.get_height(), 0, im.get_height());
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp
index e0d345663c..0a4d173923 100644
--- a/editor/plugins/debugger_editor_plugin.cpp
+++ b/editor/plugins/debugger_editor_plugin.cpp
@@ -68,13 +68,10 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(EditorNode *p_editor, MenuButton *p_d
p->add_check_shortcut(ED_SHORTCUT("editor/visible_navigation", TTR("Visible Navigation")), RUN_DEBUG_NAVIGATION);
p->set_item_tooltip(p->get_item_count() - 1, TTR("Navigation meshes and polygons will be visible on the running game if this option is turned on."));
p->add_separator();
- //those are now on by default, since they are harmless
p->add_check_shortcut(ED_SHORTCUT("editor/sync_scene_changes", TTR("Sync Scene Changes")), RUN_LIVE_DEBUG);
p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any changes made to the scene in the editor will be replicated in the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
- p->set_item_checked(p->get_item_count() - 1, true);
p->add_check_shortcut(ED_SHORTCUT("editor/sync_script_changes", TTR("Sync Script Changes")), RUN_RELOAD_SCRIPTS);
p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
- p->set_item_checked(p->get_item_count() - 1, true);
// Multi-instance, start/stop
instances_menu = memnew(PopupMenu);
@@ -114,7 +111,6 @@ void DebuggerEditorPlugin::_select_run_count(int p_index) {
void DebuggerEditorPlugin::_menu_option(int p_option) {
switch (p_option) {
case RUN_FILE_SERVER: {
-
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER));
if (ischecked) {
@@ -128,7 +124,6 @@ void DebuggerEditorPlugin::_menu_option(int p_option) {
} break;
case RUN_LIVE_DEBUG: {
-
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked);
@@ -137,28 +132,24 @@ void DebuggerEditorPlugin::_menu_option(int p_option) {
} break;
case RUN_DEPLOY_REMOTE_DEBUG: {
-
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG), !ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_deploy_remote_debug", !ischecked);
} break;
case RUN_DEBUG_COLLISONS: {
-
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_COLLISONS));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_COLLISONS), !ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_collisons", !ischecked);
} break;
case RUN_DEBUG_NAVIGATION: {
-
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION), !ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_navigation", !ischecked);
} break;
case RUN_RELOAD_SCRIPTS: {
-
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked);
@@ -170,8 +161,9 @@ void DebuggerEditorPlugin::_menu_option(int p_option) {
}
void DebuggerEditorPlugin::_notification(int p_what) {
- if (p_what == NOTIFICATION_READY)
+ if (p_what == NOTIFICATION_READY) {
_update_debug_options();
+ }
}
void DebuggerEditorPlugin::_update_debug_options() {
@@ -179,22 +171,28 @@ void DebuggerEditorPlugin::_update_debug_options() {
bool check_file_server = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_file_server", false);
bool check_debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false);
bool check_debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false);
- bool check_live_debug = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_live_debug", false);
- bool check_reload_scripts = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_reload_scripts", false);
+ bool check_live_debug = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_live_debug", true);
+ bool check_reload_scripts = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_reload_scripts", true);
int instances = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_instances", 1);
- if (check_deploy_remote)
+ if (check_deploy_remote) {
_menu_option(RUN_DEPLOY_REMOTE_DEBUG);
- if (check_file_server)
+ }
+ if (check_file_server) {
_menu_option(RUN_FILE_SERVER);
- if (check_debug_collisions)
+ }
+ if (check_debug_collisions) {
_menu_option(RUN_DEBUG_COLLISONS);
- if (check_debug_navigation)
+ }
+ if (check_debug_navigation) {
_menu_option(RUN_DEBUG_NAVIGATION);
- if (check_live_debug)
+ }
+ if (check_live_debug) {
_menu_option(RUN_LIVE_DEBUG);
- if (check_reload_scripts)
+ }
+ if (check_reload_scripts) {
_menu_option(RUN_RELOAD_SCRIPTS);
+ }
int len = instances_menu->get_item_count();
for (int idx = 0; idx < len; idx++) {
diff --git a/editor/plugins/debugger_editor_plugin.h b/editor/plugins/debugger_editor_plugin.h
index 5ec6399921..465041b5a7 100644
--- a/editor/plugins/debugger_editor_plugin.h
+++ b/editor/plugins/debugger_editor_plugin.h
@@ -39,7 +39,6 @@ class MenuButton;
class PopupMenu;
class DebuggerEditorPlugin : public EditorPlugin {
-
GDCLASS(DebuggerEditorPlugin, EditorPlugin);
private:
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index a8c4bddccf..9cb167b41c 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -43,9 +43,9 @@
#include "servers/audio/audio_stream.h"
void post_process_preview(Ref<Image> p_image) {
-
- if (p_image->get_format() != Image::FORMAT_RGBA8)
+ if (p_image->get_format() != Image::FORMAT_RGBA8) {
p_image->convert(Image::FORMAT_RGBA8);
+ }
const int w = p_image->get_width();
const int h = p_image->get_height();
@@ -71,7 +71,6 @@ void post_process_preview(Ref<Image> p_image) {
}
bool EditorTexturePreviewPlugin::handles(const String &p_type) const {
-
return ClassDB::is_parent_class(p_type, "Texture2D");
}
@@ -80,7 +79,6 @@ bool EditorTexturePreviewPlugin::generate_small_preview_automatically() const {
}
Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
Ref<Image> img;
Ref<AtlasTexture> atex = p_from;
Ref<LargeTexture> ltex = p_from;
@@ -108,14 +106,16 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Siz
}
}
- if (img.is_null() || img->empty())
+ if (img.is_null() || img->empty()) {
return Ref<Texture2D>();
+ }
img->clear_mipmaps();
if (img->is_compressed()) {
- if (img->decompress() != OK)
+ if (img->decompress() != OK) {
return Ref<Texture2D>();
+ }
} else if (img->get_format() != Image::FORMAT_RGB8 && img->get_format() != Image::FORMAT_RGBA8) {
img->convert(Image::FORMAT_RGBA8);
}
@@ -143,23 +143,23 @@ EditorTexturePreviewPlugin::EditorTexturePreviewPlugin() {
////////////////////////////////////////////////////////////////////////////
bool EditorImagePreviewPlugin::handles(const String &p_type) const {
-
return p_type == "Image";
}
Ref<Texture2D> EditorImagePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
Ref<Image> img = p_from;
- if (img.is_null() || img->empty())
+ if (img.is_null() || img->empty()) {
return Ref<Image>();
+ }
img = img->duplicate();
img->clear_mipmaps();
if (img->is_compressed()) {
- if (img->decompress() != OK)
+ if (img->decompress() != OK) {
return Ref<Image>();
+ }
} else if (img->get_format() != Image::FORMAT_RGB8 && img->get_format() != Image::FORMAT_RGBA8) {
img->convert(Image::FORMAT_RGBA8);
}
@@ -188,15 +188,14 @@ EditorImagePreviewPlugin::EditorImagePreviewPlugin() {
bool EditorImagePreviewPlugin::generate_small_preview_automatically() const {
return true;
}
+
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////
bool EditorBitmapPreviewPlugin::handles(const String &p_type) const {
-
return ClassDB::is_parent_class(p_type, "BitMap");
}
Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
Ref<BitMap> bm = p_from;
if (bm->get_size() == Size2()) {
@@ -223,11 +222,12 @@ Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size
Ref<Image> img;
img.instance();
- img->create(bm->get_size().width, bm->get_size().height, 0, Image::FORMAT_L8, data);
+ img->create(bm->get_size().width, bm->get_size().height, false, Image::FORMAT_L8, data);
if (img->is_compressed()) {
- if (img->decompress() != OK)
+ if (img->decompress() != OK) {
return Ref<Texture2D>();
+ }
} else if (img->get_format() != Image::FORMAT_RGB8 && img->get_format() != Image::FORMAT_RGBA8) {
img->convert(Image::FORMAT_RGBA8);
}
@@ -259,17 +259,14 @@ EditorBitmapPreviewPlugin::EditorBitmapPreviewPlugin() {
///////////////////////////////////////////////////////////////////////////
bool EditorPackedScenePreviewPlugin::handles(const String &p_type) const {
-
return ClassDB::is_parent_class(p_type, "PackedScene");
}
Ref<Texture2D> EditorPackedScenePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
return generate_from_path(p_from->get_path(), p_size);
}
Ref<Texture2D> EditorPackedScenePreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const {
-
String temp_path = EditorSettings::get_singleton()->get_cache_dir();
String cache_base = ProjectSettings::get_singleton()->globalize_path(p_path).md5_text();
cache_base = temp_path.plus_file("resthumb-" + cache_base);
@@ -278,14 +275,14 @@ Ref<Texture2D> EditorPackedScenePreviewPlugin::generate_from_path(const String &
String path = cache_base + ".png";
- if (!FileAccess::exists(path))
+ if (!FileAccess::exists(path)) {
return Ref<Texture2D>();
+ }
Ref<Image> img;
img.instance();
Error err = img->load(path);
if (err == OK) {
-
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
post_process_preview(img);
@@ -303,17 +300,14 @@ EditorPackedScenePreviewPlugin::EditorPackedScenePreviewPlugin() {
//////////////////////////////////////////////////////////////////
void EditorMaterialPreviewPlugin::_preview_done(const Variant &p_udata) {
-
preview_done = true;
}
void EditorMaterialPreviewPlugin::_bind_methods() {
-
ClassDB::bind_method("_preview_done", &EditorMaterialPreviewPlugin::_preview_done);
}
bool EditorMaterialPreviewPlugin::handles(const String &p_type) const {
-
return ClassDB::is_parent_class(p_type, "Material"); //any material
}
@@ -322,12 +316,10 @@ bool EditorMaterialPreviewPlugin::generate_small_preview_automatically() const {
}
Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
Ref<Material> material = p_from;
ERR_FAIL_COND_V(material.is_null(), Ref<Texture2D>());
if (material->get_shader_mode() == Shader::MODE_SPATIAL) {
-
RS::get_singleton()->mesh_surface_set_material(sphere, 0, material->get_rid());
RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture
@@ -357,7 +349,6 @@ Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Si
}
EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
-
scenario = RS::get_singleton()->scenario_create();
viewport = RS::get_singleton()->viewport_create();
@@ -408,7 +399,6 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
double zr1 = Math::cos(lat1);
for (int j = lons; j >= 1; j--) {
-
double lng0 = 2 * Math_PI * (double)(j - 1) / lons;
double x0 = Math::cos(lng0);
double y0 = Math::sin(lng0);
@@ -462,7 +452,6 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
}
EditorMaterialPreviewPlugin::~EditorMaterialPreviewPlugin() {
-
RS::get_singleton()->free(sphere);
RS::get_singleton()->free(sphere_instance);
RS::get_singleton()->free(viewport);
@@ -477,24 +466,23 @@ EditorMaterialPreviewPlugin::~EditorMaterialPreviewPlugin() {
///////////////////////////////////////////////////////////////////////////
static bool _is_text_char(CharType c) {
-
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
}
bool EditorScriptPreviewPlugin::handles(const String &p_type) const {
-
return ClassDB::is_parent_class(p_type, "Script");
}
Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
Ref<Script> scr = p_from;
- if (scr.is_null())
+ if (scr.is_null()) {
return Ref<Texture2D>();
+ }
String code = scr->get_source_code().strip_edges();
- if (code == "")
+ if (code == "") {
return Ref<Texture2D>();
+ }
List<String> kwors;
scr->get_language()->get_reserved_words(&kwors);
@@ -502,7 +490,6 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
Set<String> keywords;
for (List<String>::Element *E = kwors.front(); E; E = E->next()) {
-
keywords.insert(E->get());
}
@@ -511,15 +498,16 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
Ref<Image> img;
img.instance();
int thumbnail_size = MAX(p_size.x, p_size.y);
- img->create(thumbnail_size, thumbnail_size, 0, Image::FORMAT_RGBA8);
+ img->create(thumbnail_size, thumbnail_size, false, Image::FORMAT_RGBA8);
Color bg_color = EditorSettings::get_singleton()->get("text_editor/highlighting/background_color");
Color keyword_color = EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color");
Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color");
- if (bg_color.a == 0)
+ if (bg_color.a == 0) {
bg_color = Color(0, 0, 0, 0);
+ }
bg_color.a = MAX(bg_color.a, 0.2); // some background
for (int i = 0; i < thumbnail_size; i++) {
@@ -536,7 +524,6 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
bool prev_is_text = false;
bool in_keyword = false;
for (int i = 0; i < code.length(); i++) {
-
CharType c = code[i];
if (c > 32) {
if (col < thumbnail_size) {
@@ -553,15 +540,17 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
pos++;
}
String word = code.substr(i, pos - i);
- if (keywords.has(word))
+ if (keywords.has(word)) {
in_keyword = true;
+ }
} else if (!_is_text_char(c)) {
in_keyword = false;
}
- if (in_keyword)
+ if (in_keyword) {
color = keyword_color;
+ }
Color ul = color;
ul.a *= 0.5;
@@ -571,15 +560,15 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
prev_is_text = _is_text_char(c);
}
} else {
-
prev_is_text = false;
in_keyword = false;
if (c == '\n') {
col = x0;
line++;
- if (line >= available_height / 2)
+ if (line >= available_height / 2) {
break;
+ }
} else if (c == '\t') {
col += 3;
}
@@ -597,15 +586,14 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
EditorScriptPreviewPlugin::EditorScriptPreviewPlugin() {
}
+
///////////////////////////////////////////////////////////////////
bool EditorAudioStreamPreviewPlugin::handles(const String &p_type) const {
-
return ClassDB::is_parent_class(p_type, "AudioStream");
}
Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
Ref<AudioStream> stream = p_from;
ERR_FAIL_COND_V(stream.is_null(), Ref<Texture2D>());
@@ -635,7 +623,6 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const
playback->stop();
for (int i = 0; i < w; i++) {
-
float max = -1000;
float min = 1000;
int from = uint64_t(i) * frame_length / w;
@@ -647,7 +634,6 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const
}
for (int j = from; j < to; j++) {
-
max = MAX(max, frames[j].l);
max = MAX(max, frames[j].r);
@@ -688,21 +674,18 @@ EditorAudioStreamPreviewPlugin::EditorAudioStreamPreviewPlugin() {
///////////////////////////////////////////////////////////////////////////
void EditorMeshPreviewPlugin::_preview_done(const Variant &p_udata) {
-
preview_done = true;
}
void EditorMeshPreviewPlugin::_bind_methods() {
-
ClassDB::bind_method("_preview_done", &EditorMeshPreviewPlugin::_preview_done);
}
-bool EditorMeshPreviewPlugin::handles(const String &p_type) const {
+bool EditorMeshPreviewPlugin::handles(const String &p_type) const {
return ClassDB::is_parent_class(p_type, "Mesh"); //any Mesh
}
Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
Ref<Mesh> mesh = p_from;
ERR_FAIL_COND_V(mesh.is_null(), Ref<Texture2D>());
@@ -716,8 +699,9 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2
xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.125) * xform.basis;
AABB rot_aabb = xform.xform(aabb);
float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5;
- if (m == 0)
+ if (m == 0) {
return Ref<Texture2D>();
+ }
m = 1.0 / m;
m *= 0.5;
xform.basis.scale(Vector3(m, m, m));
@@ -758,7 +742,6 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2
}
EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() {
-
scenario = RS::get_singleton()->scenario_create();
viewport = RS::get_singleton()->viewport_create();
@@ -792,7 +775,6 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() {
}
EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() {
-
//RS::get_singleton()->free(sphere);
RS::get_singleton()->free(mesh_instance);
RS::get_singleton()->free(viewport);
@@ -807,22 +789,18 @@ EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() {
///////////////////////////////////////////////////////////////////////////
void EditorFontPreviewPlugin::_preview_done(const Variant &p_udata) {
-
preview_done = true;
}
void EditorFontPreviewPlugin::_bind_methods() {
-
ClassDB::bind_method("_preview_done", &EditorFontPreviewPlugin::_preview_done);
}
bool EditorFontPreviewPlugin::handles(const String &p_type) const {
-
return ClassDB::is_parent_class(p_type, "DynamicFontData") || ClassDB::is_parent_class(p_type, "DynamicFont");
}
Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const {
-
RES res = ResourceLoader::load(p_path);
Ref<DynamicFont> sampled_font;
if (res->is_class("DynamicFont")) {
@@ -881,7 +859,6 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path,
}
Ref<Texture2D> EditorFontPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
-
String path = p_from->get_path();
if (!FileAccess::exists(path)) {
return Ref<Texture2D>();
@@ -890,7 +867,6 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate(const RES &p_from, const Size2
}
EditorFontPreviewPlugin::EditorFontPreviewPlugin() {
-
viewport = RS::get_singleton()->viewport_create();
RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_DISABLED);
RS::get_singleton()->viewport_set_size(viewport, 128, 128);
@@ -905,7 +881,6 @@ EditorFontPreviewPlugin::EditorFontPreviewPlugin() {
}
EditorFontPreviewPlugin::~EditorFontPreviewPlugin() {
-
RS::get_singleton()->free(canvas_item);
RS::get_singleton()->free(canvas);
RS::get_singleton()->free(viewport);
diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h
index 840fa2410a..8a9d6a93fb 100644
--- a/editor/plugins/editor_preview_plugins.h
+++ b/editor/plugins/editor_preview_plugins.h
@@ -69,7 +69,6 @@ public:
};
class EditorPackedScenePreviewPlugin : public EditorResourcePreviewGenerator {
-
public:
virtual bool handles(const String &p_type) const;
virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const;
@@ -79,7 +78,6 @@ public:
};
class EditorMaterialPreviewPlugin : public EditorResourcePreviewGenerator {
-
GDCLASS(EditorMaterialPreviewPlugin, EditorResourcePreviewGenerator);
RID scenario;
@@ -125,7 +123,6 @@ public:
};
class EditorMeshPreviewPlugin : public EditorResourcePreviewGenerator {
-
GDCLASS(EditorMeshPreviewPlugin, EditorResourcePreviewGenerator);
RID scenario;
@@ -153,7 +150,6 @@ public:
};
class EditorFontPreviewPlugin : public EditorResourcePreviewGenerator {
-
GDCLASS(EditorFontPreviewPlugin, EditorResourcePreviewGenerator);
RID viewport;
diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp
index 6a171c4703..94f771e643 100644
--- a/editor/plugins/gi_probe_editor_plugin.cpp
+++ b/editor/plugins/gi_probe_editor_plugin.cpp
@@ -31,7 +31,6 @@
#include "gi_probe_editor_plugin.h"
void GIProbeEditorPlugin::_bake() {
-
if (gi_probe) {
if (gi_probe->get_probe_data().is_null()) {
String path = get_tree()->get_edited_scene_root()->get_filename();
@@ -50,21 +49,19 @@ void GIProbeEditorPlugin::_bake() {
}
void GIProbeEditorPlugin::edit(Object *p_object) {
-
GIProbe *s = Object::cast_to<GIProbe>(p_object);
- if (!s)
+ if (!s) {
return;
+ }
gi_probe = s;
}
bool GIProbeEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("GIProbe");
}
void GIProbeEditorPlugin::_notification(int p_what) {
-
if (p_what == NOTIFICATION_PROCESS) {
if (!gi_probe) {
return;
@@ -102,12 +99,10 @@ void GIProbeEditorPlugin::_notification(int p_what) {
}
void GIProbeEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
bake_hb->show();
set_process(true);
} else {
-
bake_hb->hide();
set_process(false);
}
@@ -116,14 +111,12 @@ void GIProbeEditorPlugin::make_visible(bool p_visible) {
EditorProgress *GIProbeEditorPlugin::tmp_progress = nullptr;
void GIProbeEditorPlugin::bake_func_begin(int p_steps) {
-
ERR_FAIL_COND(tmp_progress != nullptr);
tmp_progress = memnew(EditorProgress("bake_gi", TTR("Bake GI Probe"), p_steps));
}
void GIProbeEditorPlugin::bake_func_step(int p_step, const String &p_description) {
-
ERR_FAIL_COND(tmp_progress == nullptr);
tmp_progress->step(p_description, p_step, false);
}
@@ -147,7 +140,6 @@ void GIProbeEditorPlugin::_bind_methods() {
}
GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
bake_hb = memnew(HBoxContainer);
bake_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/plugins/gi_probe_editor_plugin.h b/editor/plugins/gi_probe_editor_plugin.h
index 2068ebaaa8..508c3d825b 100644
--- a/editor/plugins/gi_probe_editor_plugin.h
+++ b/editor/plugins/gi_probe_editor_plugin.h
@@ -37,7 +37,6 @@
#include "scene/resources/material.h"
class GIProbeEditorPlugin : public EditorPlugin {
-
GDCLASS(GIProbeEditorPlugin, EditorPlugin);
GIProbe *gi_probe;
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.cpp b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
index 5c35285c22..01420dac3e 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
@@ -37,54 +37,45 @@
#include "scene/resources/particles_material.h"
void GPUParticles2DEditorPlugin::edit(Object *p_object) {
-
particles = Object::cast_to<GPUParticles2D>(p_object);
}
bool GPUParticles2DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("GPUParticles2D");
}
void GPUParticles2DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
toolbar->show();
} else {
-
toolbar->hide();
}
}
void GPUParticles2DEditorPlugin::_file_selected(const String &p_file) {
-
source_emission_file = p_file;
emission_mask->popup_centered();
}
void GPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
-
switch (p_idx) {
case MENU_GENERATE_VISIBILITY_RECT: {
float gen_time = particles->get_lifetime();
- if (gen_time < 1.0)
+ if (gen_time < 1.0) {
generate_seconds->set_value(1.0);
- else
+ } else {
generate_seconds->set_value(trunc(gen_time) + 1.0);
+ }
generate_visibility_rect->popup_centered();
} break;
case MENU_LOAD_EMISSION_MASK: {
-
file->popup_centered_ratio();
} break;
case MENU_CLEAR_EMISSION_MASK: {
-
emission_mask->popup_centered();
} break;
case MENU_OPTION_CONVERT_TO_CPU_PARTICLES: {
-
CPUParticles2D *cpu_particles = memnew(CPUParticles2D);
cpu_particles->convert_from_particles(particles);
cpu_particles->set_name(particles->get_name());
@@ -103,14 +94,12 @@ void GPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
} break;
case MENU_RESTART: {
-
particles->restart();
}
}
}
void GPUParticles2DEditorPlugin::_generate_visibility_rect() {
-
float time = generate_seconds->get_value();
float running = 0.0;
@@ -125,16 +114,16 @@ void GPUParticles2DEditorPlugin::_generate_visibility_rect() {
Rect2 rect;
while (running < time) {
-
uint64_t ticks = OS::get_singleton()->get_ticks_usec();
ep.step("Generating...", int(running), true);
OS::get_singleton()->delay_usec(1000);
Rect2 capture = particles->capture_rect();
- if (rect == Rect2())
+ if (rect == Rect2()) {
rect = capture;
- else
+ } else {
rect = rect.merge(capture);
+ }
running += (OS::get_singleton()->get_ticks_usec() - ticks) / 1000000.0;
}
@@ -150,7 +139,6 @@ void GPUParticles2DEditorPlugin::_generate_visibility_rect() {
}
void GPUParticles2DEditorPlugin::_generate_emission_mask() {
-
Ref<ParticlesMaterial> pm = particles->get_process_material();
if (!pm.is_valid()) {
EditorNode::get_singleton()->show_warning(TTR("Can only set point into a ParticlesMaterial process material"));
@@ -196,13 +184,10 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
for (int i = 0; i < s.width; i++) {
for (int j = 0; j < s.height; j++) {
-
uint8_t a = r[(j * s.width + i) * 4 + 3];
if (a > 128) {
-
if (emode == EMISSION_MODE_SOLID) {
-
if (capture_colors) {
valid_colors.write[vpc * 4 + 0] = r[(j * s.width + i) * 4 + 0];
valid_colors.write[vpc * 4 + 1] = r[(j * s.width + i) * 4 + 1];
@@ -212,19 +197,18 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
valid_positions.write[vpc++] = Point2(i, j);
} else {
-
bool on_border = false;
for (int x = i - 1; x <= i + 1; x++) {
for (int y = j - 1; y <= j + 1; y++) {
-
if (x < 0 || y < 0 || x >= s.width || y >= s.height || r[(y * s.width + x) * 4 + 3] <= 128) {
on_border = true;
break;
}
}
- if (on_border)
+ if (on_border) {
break;
+ }
}
if (on_border) {
@@ -234,9 +218,9 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
Vector2 normal;
for (int x = i - 2; x <= i + 2; x++) {
for (int y = j - 2; y <= j + 2; y++) {
-
- if (x == i && y == j)
+ if (x == i && y == j) {
continue;
+ }
if (x < 0 || y < 0 || x >= s.width || y >= s.height || r[(y * s.width + x) * 4 + 3] <= 128) {
normal += Vector2(x - i, y - j).normalized();
@@ -281,7 +265,6 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
uint8_t *tw = texdata.ptrw();
float *twf = (float *)tw;
for (int i = 0; i < vpc; i++) {
-
twf[i * 2 + 0] = valid_positions[i].x;
twf[i * 2 + 1] = valid_positions[i].y;
}
@@ -298,14 +281,12 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
pm->set_emission_point_count(vpc);
if (capture_colors) {
-
Vector<uint8_t> colordata;
colordata.resize(w * h * 4); //use RG texture
{
uint8_t *tw = colordata.ptrw();
for (int i = 0; i < vpc * 4; i++) {
-
tw[i] = valid_colors[i];
}
}
@@ -346,9 +327,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
}
void GPUParticles2DEditorPlugin::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
menu->get_popup()->connect("id_pressed", callable_mp(this, &GPUParticles2DEditorPlugin::_menu_callback));
menu->set_icon(menu->get_theme_icon("GPUParticles2D", "EditorIcons"));
file->connect("file_selected", callable_mp(this, &GPUParticles2DEditorPlugin::_file_selected));
@@ -359,7 +338,6 @@ void GPUParticles2DEditorPlugin::_bind_methods() {
}
GPUParticles2DEditorPlugin::GPUParticles2DEditorPlugin(EditorNode *p_node) {
-
particles = nullptr;
editor = p_node;
undo_redo = editor->get_undo_redo();
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.h b/editor/plugins/gpu_particles_2d_editor_plugin.h
index 008d04a211..c76cecb3a2 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.h
@@ -39,7 +39,6 @@
#include "scene/gui/file_dialog.h"
class GPUParticles2DEditorPlugin : public EditorPlugin {
-
GDCLASS(GPUParticles2DEditorPlugin, EditorPlugin);
enum {
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index 7f80acc176..fa507dd3d7 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -36,25 +36,22 @@
#include "scene/resources/particles_material.h"
bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3> &normals) {
-
bool use_normals = emission_fill->get_selected() == 1;
if (emission_fill->get_selected() < 2) {
-
float area_accum = 0;
Map<float, int> triangle_area_map;
for (int i = 0; i < geometry.size(); i++) {
-
float area = geometry[i].get_area();
- if (area < CMP_EPSILON)
+ if (area < CMP_EPSILON) {
continue;
+ }
triangle_area_map[area_accum] = i;
area_accum += area;
}
if (!triangle_area_map.size() || area_accum == 0) {
-
EditorNode::get_singleton()->show_warning(TTR("The geometry's faces don't contain any area."));
return false;
}
@@ -62,7 +59,6 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3
int emissor_count = emission_amount->get_value();
for (int i = 0; i < emissor_count; i++) {
-
float areapos = Math::random(0.0f, area_accum);
Map<float, int>::Element *E = triangle_area_map.find_closest(areapos);
@@ -84,11 +80,9 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3
}
}
} else {
-
int gcount = geometry.size();
if (gcount == 0) {
-
EditorNode::get_singleton()->show_warning(TTR("The geometry doesn't contain any faces."));
return false;
}
@@ -98,24 +92,21 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3
AABB aabb;
for (int i = 0; i < gcount; i++) {
-
for (int j = 0; j < 3; j++) {
-
- if (i == 0 && j == 0)
+ if (i == 0 && j == 0) {
aabb.position = r[i].vertex[j];
- else
+ } else {
aabb.expand_to(r[i].vertex[j]);
+ }
}
}
int emissor_count = emission_amount->get_value();
for (int i = 0; i < emissor_count; i++) {
-
int attempts = 5;
for (int j = 0; j < attempts; j++) {
-
Vector3 dir;
dir[Math::rand() % 3] = 1.0;
Vector3 ofs = (Vector3(1, 1, 1) - dir) * Vector3(Math::randf(), Math::randf(), Math::randf()) * aabb.size + aabb.position;
@@ -129,24 +120,25 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3
float max = -1e7, min = 1e7;
for (int k = 0; k < gcount; k++) {
-
const Face3 &f3 = r[k];
Vector3 res;
if (f3.intersects_segment(ofs, ofsv, &res)) {
-
res -= ofs;
float d = dir.dot(res);
- if (d < min)
+ if (d < min) {
min = d;
- if (d > max)
+ }
+ if (d > max) {
max = d;
+ }
}
}
- if (max < min)
+ if (max < min) {
continue; //lost attempt
+ }
float val = min + (max - min) * Math::randf();
@@ -162,20 +154,18 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3
}
void GPUParticles3DEditorBase::_node_selected(const NodePath &p_path) {
-
Node *sel = get_node(p_path);
- if (!sel)
+ if (!sel) {
return;
+ }
if (!sel->is_class("Node3D")) {
-
EditorNode::get_singleton()->show_warning(vformat(TTR("\"%s\" doesn't inherit from Node3D."), sel->get_name()));
return;
}
VisualInstance3D *vi = Object::cast_to<VisualInstance3D>(sel);
if (!vi) {
-
EditorNode::get_singleton()->show_warning(vformat(TTR("\"%s\" doesn't contain geometry."), sel->get_name()));
return;
}
@@ -183,7 +173,6 @@ void GPUParticles3DEditorBase::_node_selected(const NodePath &p_path) {
geometry = vi->get_faces(VisualInstance3D::FACES_SOLID);
if (geometry.size() == 0) {
-
EditorNode::get_singleton()->show_warning(vformat(TTR("\"%s\" doesn't contain face geometry."), sel->get_name()));
return;
}
@@ -206,7 +195,6 @@ void GPUParticles3DEditorBase::_bind_methods() {
}
GPUParticles3DEditorBase::GPUParticles3DEditorBase() {
-
emission_dialog = memnew(ConfirmationDialog);
emission_dialog->set_title(TTR("Create Emitter"));
add_child(emission_dialog);
@@ -234,7 +222,6 @@ GPUParticles3DEditorBase::GPUParticles3DEditorBase() {
}
void GPUParticles3DEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
hide();
@@ -242,7 +229,6 @@ void GPUParticles3DEditor::_node_removed(Node *p_node) {
}
void GPUParticles3DEditor::_notification(int p_notification) {
-
if (p_notification == NOTIFICATION_ENTER_TREE) {
options->set_icon(options->get_popup()->get_theme_icon("GPUParticles3D", "EditorIcons"));
get_tree()->connect("node_removed", callable_mp(this, &GPUParticles3DEditor::_node_removed));
@@ -250,16 +236,15 @@ void GPUParticles3DEditor::_notification(int p_notification) {
}
void GPUParticles3DEditor::_menu_option(int p_option) {
-
switch (p_option) {
-
case MENU_OPTION_GENERATE_AABB: {
float gen_time = node->get_lifetime();
- if (gen_time < 1.0)
+ if (gen_time < 1.0) {
generate_seconds->set_value(1.0);
- else
+ } else {
generate_seconds->set_value(trunc(gen_time) + 1.0);
+ }
generate_aabb->popup_centered();
} break;
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
@@ -273,7 +258,6 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CONVERT_TO_CPU_PARTICLES: {
-
CPUParticles3D *cpu_particles = memnew(CPUParticles3D);
cpu_particles->convert_from_particles(node);
cpu_particles->set_name(node->get_name());
@@ -291,7 +275,6 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_RESTART: {
-
node->restart();
} break;
@@ -299,7 +282,6 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
}
void GPUParticles3DEditor::_generate_aabb() {
-
float time = generate_seconds->get_value();
float running = 0.0;
@@ -315,16 +297,16 @@ void GPUParticles3DEditor::_generate_aabb() {
AABB rect;
while (running < time) {
-
uint64_t ticks = OS::get_singleton()->get_ticks_usec();
ep.step("Generating...", int(running), true);
OS::get_singleton()->delay_usec(1000);
AABB capture = node->capture_aabb();
- if (rect == AABB())
+ if (rect == AABB()) {
rect = capture;
- else
+ } else {
rect.merge_with(capture);
+ }
running += (OS::get_singleton()->get_ticks_usec() - ticks) / 1000000.0;
}
@@ -341,13 +323,11 @@ void GPUParticles3DEditor::_generate_aabb() {
}
void GPUParticles3DEditor::edit(GPUParticles3D *p_particles) {
-
base_node = p_particles;
node = p_particles;
}
void GPUParticles3DEditor::_generate_emission_points() {
-
/// hacer codigo aca
Vector<Vector3> points;
Vector<Vector3> normals;
@@ -385,7 +365,6 @@ void GPUParticles3DEditor::_generate_emission_points() {
ERR_FAIL_COND(material.is_null());
if (normals.size() > 0) {
-
material->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
material->set_emission_point_count(point_count);
material->set_emission_point_texture(tex);
@@ -412,7 +391,6 @@ void GPUParticles3DEditor::_generate_emission_points() {
material->set_emission_normal_texture(tex2);
} else {
-
material->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_POINTS);
material->set_emission_point_count(point_count);
material->set_emission_point_texture(tex);
@@ -423,7 +401,6 @@ void GPUParticles3DEditor::_bind_methods() {
}
GPUParticles3DEditor::GPUParticles3DEditor() {
-
node = nullptr;
particles_editor_hb = memnew(HBoxContainer);
Node3DEditor::get_singleton()->add_control_to_menu_panel(particles_editor_hb);
@@ -456,17 +433,14 @@ GPUParticles3DEditor::GPUParticles3DEditor() {
}
void GPUParticles3DEditorPlugin::edit(Object *p_object) {
-
particles_editor->edit(Object::cast_to<GPUParticles3D>(p_object));
}
bool GPUParticles3DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("GPUParticles3D");
}
void GPUParticles3DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
particles_editor->show();
particles_editor->particles_editor_hb->show();
@@ -478,7 +452,6 @@ void GPUParticles3DEditorPlugin::make_visible(bool p_visible) {
}
GPUParticles3DEditorPlugin::GPUParticles3DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
particles_editor = memnew(GPUParticles3DEditor);
editor->get_viewport()->add_child(particles_editor);
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.h b/editor/plugins/gpu_particles_3d_editor_plugin.h
index cf1cff32c0..7838a63436 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.h
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.h
@@ -37,7 +37,6 @@
#include "scene/gui/spin_box.h"
class GPUParticles3DEditorBase : public Control {
-
GDCLASS(GPUParticles3DEditorBase, Control);
protected:
@@ -65,7 +64,6 @@ public:
};
class GPUParticles3DEditor : public GPUParticles3DEditorBase {
-
GDCLASS(GPUParticles3DEditor, GPUParticles3DEditorBase);
ConfirmationDialog *generate_aabb;
@@ -101,7 +99,6 @@ public:
};
class GPUParticles3DEditorPlugin : public EditorPlugin {
-
GDCLASS(GPUParticles3DEditorPlugin, EditorPlugin);
GPUParticles3DEditor *particles_editor;
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 67de610ae7..13b5c8cef5 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -37,10 +37,11 @@
Size2 GradientEditor::get_minimum_size() const {
return Size2(0, 60) * EDSCALE;
}
-void GradientEditor::_gradient_changed() {
- if (editing)
+void GradientEditor::_gradient_changed() {
+ if (editing) {
return;
+ }
editing = true;
Vector<Gradient::Point> points = gradient->get_points();
@@ -49,7 +50,6 @@ void GradientEditor::_gradient_changed() {
}
void GradientEditor::_ramp_changed() {
-
editing = true;
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
undo_redo->create_action(TTR("Gradient Edited"));
@@ -78,12 +78,10 @@ GradientEditor::GradientEditor() {
///////////////////////
bool EditorInspectorPluginGradient::can_handle(Object *p_object) {
-
return Object::cast_to<Gradient>(p_object) != nullptr;
}
void EditorInspectorPluginGradient::parse_begin(Object *p_object) {
-
Gradient *gradient = Object::cast_to<Gradient>(p_object);
Ref<Gradient> g(gradient);
@@ -93,7 +91,6 @@ void EditorInspectorPluginGradient::parse_begin(Object *p_object) {
}
GradientEditorPlugin::GradientEditorPlugin(EditorNode *p_node) {
-
Ref<EditorInspectorPluginGradient> plugin;
plugin.instance();
add_inspector_plugin(plugin);
diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h
index 9ebd9610e5..0641d54d5c 100644
--- a/editor/plugins/gradient_editor_plugin.h
+++ b/editor/plugins/gradient_editor_plugin.h
@@ -62,7 +62,6 @@ public:
};
class GradientEditorPlugin : public EditorPlugin {
-
GDCLASS(GradientEditorPlugin, EditorPlugin);
public:
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index 1dbc78804b..7402baad57 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -34,16 +34,15 @@
#include "editor/editor_scale.h"
bool ItemListPlugin::_set(const StringName &p_name, const Variant &p_value) {
-
String name = p_name;
int idx = name.get_slice("/", 0).to_int();
String what = name.get_slice("/", 1);
- if (what == "text")
+ if (what == "text") {
set_item_text(idx, p_value);
- else if (what == "icon")
+ } else if (what == "icon") {
set_item_icon(idx, p_value);
- else if (what == "checkable") {
+ } else if (what == "checkable") {
// This keeps compatibility to/from versions where this property was a boolean, before radio buttons
switch ((int)p_value) {
case 0:
@@ -54,54 +53,54 @@ bool ItemListPlugin::_set(const StringName &p_name, const Variant &p_value) {
set_item_radio_checkable(idx, true);
break;
}
- } else if (what == "checked")
+ } else if (what == "checked") {
set_item_checked(idx, p_value);
- else if (what == "id")
+ } else if (what == "id") {
set_item_id(idx, p_value);
- else if (what == "enabled")
+ } else if (what == "enabled") {
set_item_enabled(idx, p_value);
- else if (what == "separator")
+ } else if (what == "separator") {
set_item_separator(idx, p_value);
- else
+ } else {
return false;
+ }
return true;
}
bool ItemListPlugin::_get(const StringName &p_name, Variant &r_ret) const {
-
String name = p_name;
int idx = name.get_slice("/", 0).to_int();
String what = name.get_slice("/", 1);
- if (what == "text")
+ if (what == "text") {
r_ret = get_item_text(idx);
- else if (what == "icon")
+ } else if (what == "icon") {
r_ret = get_item_icon(idx);
- else if (what == "checkable") {
+ } else if (what == "checkable") {
// This keeps compatibility to/from versions where this property was a boolean, before radio buttons
if (!is_item_checkable(idx)) {
r_ret = 0;
} else {
r_ret = is_item_radio_checkable(idx) ? 2 : 1;
}
- } else if (what == "checked")
+ } else if (what == "checked") {
r_ret = is_item_checked(idx);
- else if (what == "id")
+ } else if (what == "id") {
r_ret = get_item_id(idx);
- else if (what == "enabled")
+ } else if (what == "enabled") {
r_ret = is_item_enabled(idx);
- else if (what == "separator")
+ } else if (what == "separator") {
r_ret = is_item_separator(idx);
- else
+ } else {
return false;
+ }
return true;
}
-void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const {
+void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < get_item_count(); i++) {
-
String base = itos(i) + "/";
p_list->push_back(PropertyInfo(Variant::STRING, base + "text"));
@@ -114,14 +113,17 @@ void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::BOOL, base + "checked"));
}
- if (flags & FLAG_ID)
+ if (flags & FLAG_ID) {
p_list->push_back(PropertyInfo(Variant::INT, base + "id", PROPERTY_HINT_RANGE, "-1,4096"));
+ }
- if (flags & FLAG_ENABLE)
+ if (flags & FLAG_ENABLE) {
p_list->push_back(PropertyInfo(Variant::BOOL, base + "enabled"));
+ }
- if (flags & FLAG_SEPARATOR)
+ if (flags & FLAG_SEPARATOR) {
p_list->push_back(PropertyInfo(Variant::BOOL, base + "separator"));
+ }
}
}
@@ -130,120 +132,100 @@ void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const {
///////////////////////////////////////////////////////////////
void ItemListOptionButtonPlugin::set_object(Object *p_object) {
-
ob = Object::cast_to<OptionButton>(p_object);
}
bool ItemListOptionButtonPlugin::handles(Object *p_object) const {
-
return p_object->is_class("OptionButton");
}
int ItemListOptionButtonPlugin::get_flags() const {
-
return FLAG_ICON | FLAG_ID | FLAG_ENABLE;
}
void ItemListOptionButtonPlugin::add_item() {
-
ob->add_item(vformat(TTR("Item %d"), ob->get_item_count()));
_change_notify();
}
int ItemListOptionButtonPlugin::get_item_count() const {
-
return ob->get_item_count();
}
void ItemListOptionButtonPlugin::erase(int p_idx) {
-
ob->remove_item(p_idx);
_change_notify();
}
ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() {
-
ob = nullptr;
}
///////////////////////////////////////////////////////////////
void ItemListPopupMenuPlugin::set_object(Object *p_object) {
-
- if (p_object->is_class("MenuButton"))
+ if (p_object->is_class("MenuButton")) {
pp = Object::cast_to<MenuButton>(p_object)->get_popup();
- else
+ } else {
pp = Object::cast_to<PopupMenu>(p_object);
+ }
}
bool ItemListPopupMenuPlugin::handles(Object *p_object) const {
-
return p_object->is_class("PopupMenu") || p_object->is_class("MenuButton");
}
int ItemListPopupMenuPlugin::get_flags() const {
-
return FLAG_ICON | FLAG_CHECKABLE | FLAG_ID | FLAG_ENABLE | FLAG_SEPARATOR;
}
void ItemListPopupMenuPlugin::add_item() {
-
pp->add_item(vformat(TTR("Item %d"), pp->get_item_count()));
_change_notify();
}
int ItemListPopupMenuPlugin::get_item_count() const {
-
return pp->get_item_count();
}
void ItemListPopupMenuPlugin::erase(int p_idx) {
-
pp->remove_item(p_idx);
_change_notify();
}
ItemListPopupMenuPlugin::ItemListPopupMenuPlugin() {
-
pp = nullptr;
}
///////////////////////////////////////////////////////////////
void ItemListItemListPlugin::set_object(Object *p_object) {
-
pp = Object::cast_to<ItemList>(p_object);
}
bool ItemListItemListPlugin::handles(Object *p_object) const {
-
return p_object->is_class("ItemList");
}
int ItemListItemListPlugin::get_flags() const {
-
return FLAG_ICON | FLAG_ENABLE;
}
void ItemListItemListPlugin::add_item() {
-
pp->add_item(vformat(TTR("Item %d"), pp->get_item_count()));
_change_notify();
}
int ItemListItemListPlugin::get_item_count() const {
-
return pp->get_item_count();
}
void ItemListItemListPlugin::erase(int p_idx) {
-
pp->remove_item(p_idx);
_change_notify();
}
ItemListItemListPlugin::ItemListItemListPlugin() {
-
pp = nullptr;
}
@@ -252,7 +234,6 @@ ItemListItemListPlugin::ItemListItemListPlugin() {
///////////////////////////////////////////////////////////////
void ItemListEditor::_node_removed(Node *p_node) {
-
if (p_node == item_list) {
item_list = nullptr;
hide();
@@ -261,34 +242,32 @@ void ItemListEditor::_node_removed(Node *p_node) {
}
void ItemListEditor::_notification(int p_notification) {
-
if (p_notification == NOTIFICATION_ENTER_TREE || p_notification == NOTIFICATION_THEME_CHANGED) {
-
add_button->set_icon(get_theme_icon("Add", "EditorIcons"));
del_button->set_icon(get_theme_icon("Remove", "EditorIcons"));
} else if (p_notification == NOTIFICATION_READY) {
-
get_tree()->connect("node_removed", callable_mp(this, &ItemListEditor::_node_removed));
}
}
void ItemListEditor::_add_pressed() {
-
- if (selected_idx == -1)
+ if (selected_idx == -1) {
return;
+ }
item_plugins[selected_idx]->add_item();
}
void ItemListEditor::_delete_pressed() {
-
- if (selected_idx == -1)
+ if (selected_idx == -1) {
return;
+ }
String current_selected = (String)property_editor->get_selected_path();
- if (current_selected == "")
+ if (current_selected == "") {
return;
+ }
// FIXME: Currently relying on selecting a *property* to derive what item to delete
// e.g. you select "1/enabled" to delete item 1.
@@ -301,12 +280,10 @@ void ItemListEditor::_delete_pressed() {
}
void ItemListEditor::_edit_items() {
-
dialog->popup_centered_clamped(Vector2(425, 1200) * EDSCALE, 0.8);
}
void ItemListEditor::edit(Node *p_item_list) {
-
item_list = p_item_list;
if (!item_list) {
@@ -317,7 +294,6 @@ void ItemListEditor::edit(Node *p_item_list) {
for (int i = 0; i < item_plugins.size(); i++) {
if (item_plugins[i]->handles(p_item_list)) {
-
item_plugins[i]->set_object(p_item_list);
property_editor->edit(item_plugins[i]);
@@ -333,7 +309,6 @@ void ItemListEditor::edit(Node *p_item_list) {
}
bool ItemListEditor::handles(Object *p_object) const {
-
for (int i = 0; i < item_plugins.size(); i++) {
if (item_plugins[i]->handles(p_object)) {
return true;
@@ -347,7 +322,6 @@ void ItemListEditor::_bind_methods() {
}
ItemListEditor::ItemListEditor() {
-
selected_idx = -1;
item_list = nullptr;
@@ -386,34 +360,29 @@ ItemListEditor::ItemListEditor() {
}
ItemListEditor::~ItemListEditor() {
-
- for (int i = 0; i < item_plugins.size(); i++)
+ for (int i = 0; i < item_plugins.size(); i++) {
memdelete(item_plugins[i]);
+ }
}
void ItemListEditorPlugin::edit(Object *p_object) {
-
item_list_editor->edit(Object::cast_to<Node>(p_object));
}
bool ItemListEditorPlugin::handles(Object *p_object) const {
-
return item_list_editor->handles(p_object);
}
void ItemListEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
item_list_editor->show();
} else {
-
item_list_editor->hide();
item_list_editor->edit(nullptr);
}
}
ItemListEditorPlugin::ItemListEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
item_list_editor = memnew(ItemListEditor);
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(item_list_editor);
diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h
index 8dcf938139..61dd617e3b 100644
--- a/editor/plugins/item_list_editor_plugin.h
+++ b/editor/plugins/item_list_editor_plugin.h
@@ -40,7 +40,6 @@
#include "scene/gui/popup_menu.h"
class ItemListPlugin : public Object {
-
GDCLASS(ItemListPlugin, Object);
protected:
@@ -96,7 +95,6 @@ public:
///////////////////////////////////////////////////////////////
class ItemListOptionButtonPlugin : public ItemListPlugin {
-
GDCLASS(ItemListOptionButtonPlugin, ItemListPlugin);
OptionButton *ob;
@@ -126,7 +124,6 @@ public:
};
class ItemListPopupMenuPlugin : public ItemListPlugin {
-
GDCLASS(ItemListPopupMenuPlugin, ItemListPlugin);
PopupMenu *pp;
@@ -169,7 +166,6 @@ public:
///////////////////////////////////////////////////////////////
class ItemListItemListPlugin : public ItemListPlugin {
-
GDCLASS(ItemListItemListPlugin, ItemListPlugin);
ItemList *pp;
@@ -198,7 +194,6 @@ public:
///////////////////////////////////////////////////////////////
class ItemListEditor : public HBoxContainer {
-
GDCLASS(ItemListEditor, HBoxContainer);
Node *item_list;
@@ -235,7 +230,6 @@ public:
};
class ItemListEditorPlugin : public EditorPlugin {
-
GDCLASS(ItemListEditorPlugin, EditorPlugin);
ItemListEditor *item_list_editor;
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index f8550a884b..e422140efa 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -31,10 +31,8 @@
#include "light_occluder_2d_editor_plugin.h"
Ref<OccluderPolygon2D> LightOccluder2DEditor::_ensure_occluder() const {
-
Ref<OccluderPolygon2D> occluder = node->get_occluder_polygon();
if (!occluder.is_valid()) {
-
occluder = Ref<OccluderPolygon2D>(memnew(OccluderPolygon2D));
node->set_occluder_polygon(occluder);
}
@@ -42,64 +40,59 @@ Ref<OccluderPolygon2D> LightOccluder2DEditor::_ensure_occluder() const {
}
Node2D *LightOccluder2DEditor::_get_node() const {
-
return node;
}
void LightOccluder2DEditor::_set_node(Node *p_polygon) {
-
node = Object::cast_to<LightOccluder2D>(p_polygon);
}
bool LightOccluder2DEditor::_is_line() const {
-
Ref<OccluderPolygon2D> occluder = node->get_occluder_polygon();
- if (occluder.is_valid())
+ if (occluder.is_valid()) {
return !occluder->is_closed();
- else
+ } else {
return false;
+ }
}
int LightOccluder2DEditor::_get_polygon_count() const {
-
Ref<OccluderPolygon2D> occluder = node->get_occluder_polygon();
- if (occluder.is_valid())
+ if (occluder.is_valid()) {
return occluder->get_polygon().size();
- else
+ } else {
return 0;
+ }
}
Variant LightOccluder2DEditor::_get_polygon(int p_idx) const {
-
Ref<OccluderPolygon2D> occluder = node->get_occluder_polygon();
- if (occluder.is_valid())
+ if (occluder.is_valid()) {
return occluder->get_polygon();
- else
+ } else {
return Variant(Vector<Vector2>());
+ }
}
void LightOccluder2DEditor::_set_polygon(int p_idx, const Variant &p_polygon) const {
-
Ref<OccluderPolygon2D> occluder = _ensure_occluder();
occluder->set_polygon(p_polygon);
}
void LightOccluder2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
-
Ref<OccluderPolygon2D> occluder = _ensure_occluder();
undo_redo->add_do_method(occluder.ptr(), "set_polygon", p_polygon);
undo_redo->add_undo_method(occluder.ptr(), "set_polygon", p_previous);
}
bool LightOccluder2DEditor::_has_resource() const {
-
return node && node->get_occluder_polygon().is_valid();
}
void LightOccluder2DEditor::_create_resource() {
-
- if (!node)
+ if (!node) {
return;
+ }
undo_redo->create_action(TTR("Create Occluder Polygon"));
undo_redo->add_do_method(node, "set_occluder_polygon", Ref<OccluderPolygon2D>(memnew(OccluderPolygon2D)));
@@ -111,7 +104,6 @@ void LightOccluder2DEditor::_create_resource() {
LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) :
AbstractPolygon2DEditor(p_editor) {
-
node = nullptr;
}
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.h b/editor/plugins/light_occluder_2d_editor_plugin.h
index 74ae9e0889..11c9f2b2a4 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.h
+++ b/editor/plugins/light_occluder_2d_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/2d/light_occluder_2d.h"
class LightOccluder2DEditor : public AbstractPolygon2DEditor {
-
GDCLASS(LightOccluder2DEditor, AbstractPolygon2DEditor);
LightOccluder2D *node;
@@ -61,7 +60,6 @@ public:
};
class LightOccluder2DEditorPlugin : public AbstractPolygon2DEditorPlugin {
-
GDCLASS(LightOccluder2DEditorPlugin, AbstractPolygon2DEditorPlugin);
public:
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 5b887390a6..77eeb19d26 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -31,32 +31,26 @@
#include "line_2d_editor_plugin.h"
Node2D *Line2DEditor::_get_node() const {
-
return node;
}
void Line2DEditor::_set_node(Node *p_line) {
-
node = Object::cast_to<Line2D>(p_line);
}
bool Line2DEditor::_is_line() const {
-
return true;
}
Variant Line2DEditor::_get_polygon(int p_idx) const {
-
return _get_node()->get("points");
}
void Line2DEditor::_set_polygon(int p_idx, const Variant &p_polygon) const {
-
_get_node()->set("points", p_polygon);
}
void Line2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
-
Node2D *node = _get_node();
undo_redo->add_do_method(node, "set_points", p_polygon);
undo_redo->add_undo_method(node, "set_points", p_previous);
diff --git a/editor/plugins/line_2d_editor_plugin.h b/editor/plugins/line_2d_editor_plugin.h
index ef54dbc3f7..bf411a070a 100644
--- a/editor/plugins/line_2d_editor_plugin.h
+++ b/editor/plugins/line_2d_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/2d/line_2d.h"
class Line2DEditor : public AbstractPolygon2DEditor {
-
GDCLASS(Line2DEditor, AbstractPolygon2DEditor);
Line2D *node;
@@ -54,7 +53,6 @@ public:
};
class Line2DEditorPlugin : public AbstractPolygon2DEditorPlugin {
-
GDCLASS(Line2DEditorPlugin, AbstractPolygon2DEditorPlugin);
public:
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index f63bcb69b8..e49cfd51f7 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -36,9 +36,7 @@
#include "scene/resources/sky_material.h"
void MaterialEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_READY) {
-
//get_scene()->connect("node_removed",this,"_node_removed");
if (first_enter) {
@@ -59,7 +57,6 @@ void MaterialEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_DRAW) {
-
Ref<Texture2D> checkerboard = get_theme_icon("Checkerboard", "EditorIcons");
Size2 size = get_size();
@@ -68,20 +65,17 @@ void MaterialEditor::_notification(int p_what) {
}
void MaterialEditor::edit(Ref<Material> p_material, const Ref<Environment> &p_env) {
-
material = p_material;
camera->set_environment(p_env);
if (!material.is_null()) {
sphere_instance->set_material_override(material);
box_instance->set_material_override(material);
} else {
-
hide();
}
}
void MaterialEditor::_button_pressed(Node *p_button) {
-
if (p_button == light_1_switch) {
light1->set_visible(!light_1_switch->is_pressed());
}
@@ -111,7 +105,6 @@ void MaterialEditor::_bind_methods() {
}
MaterialEditor::MaterialEditor() {
-
vc = memnew(SubViewportContainer);
vc->set_stretch(true);
add_child(vc);
@@ -209,16 +202,15 @@ MaterialEditor::MaterialEditor() {
///////////////////////
bool EditorInspectorPluginMaterial::can_handle(Object *p_object) {
-
Material *material = Object::cast_to<Material>(p_object);
- if (!material)
+ if (!material) {
return false;
+ }
return material->get_shader_mode() == Shader::MODE_SPATIAL;
}
void EditorInspectorPluginMaterial::parse_begin(Object *p_object) {
-
Material *material = Object::cast_to<Material>(p_object);
if (!material) {
return;
@@ -240,23 +232,21 @@ EditorInspectorPluginMaterial::EditorInspectorPluginMaterial() {
}
MaterialEditorPlugin::MaterialEditorPlugin(EditorNode *p_node) {
-
Ref<EditorInspectorPluginMaterial> plugin;
plugin.instance();
add_inspector_plugin(plugin);
}
String StandardMaterial3DConversionPlugin::converts_to() const {
-
return "ShaderMaterial";
}
-bool StandardMaterial3DConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+bool StandardMaterial3DConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<StandardMaterial3D> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<StandardMaterial3D> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -276,7 +266,6 @@ Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p
RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), &params);
for (List<PropertyInfo>::Element *E = params.front(); E; E = E->next()) {
-
// Texture parameter has to be treated specially since StandardMaterial3D saved it
// as RID but ShaderMaterial needs Texture itself
Ref<Texture2D> texture = mat->get_texture_by_name(E->get().name);
@@ -293,16 +282,15 @@ Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p
}
String ParticlesMaterialConversionPlugin::converts_to() const {
-
return "ShaderMaterial";
}
-bool ParticlesMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+bool ParticlesMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<ParticlesMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<ParticlesMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -331,16 +319,15 @@ Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_
}
String CanvasItemMaterialConversionPlugin::converts_to() const {
-
return "ShaderMaterial";
}
-bool CanvasItemMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+bool CanvasItemMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<CanvasItemMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<CanvasItemMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -369,16 +356,15 @@ Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p
}
String ProceduralSkyMaterialConversionPlugin::converts_to() const {
-
return "ShaderMaterial";
}
-bool ProceduralSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+bool ProceduralSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<ProceduralSkyMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<ProceduralSkyMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -407,16 +393,15 @@ Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource>
}
String PanoramaSkyMaterialConversionPlugin::converts_to() const {
-
return "ShaderMaterial";
}
-bool PanoramaSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+bool PanoramaSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<PanoramaSkyMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<PanoramaSkyMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -445,16 +430,15 @@ Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> &
}
String PhysicalSkyMaterialConversionPlugin::converts_to() const {
-
return "ShaderMaterial";
}
-bool PhysicalSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+bool PhysicalSkyMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
Ref<PhysicalSkyMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> PhysicalSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+Ref<Resource> PhysicalSkyMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<PhysicalSkyMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 50036e4f72..e03cb1b3ab 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -44,7 +44,6 @@
class SubViewportContainer;
class MaterialEditor : public Control {
-
GDCLASS(MaterialEditor, Control);
SubViewportContainer *vc;
@@ -91,7 +90,6 @@ public:
};
class MaterialEditorPlugin : public EditorPlugin {
-
GDCLASS(MaterialEditorPlugin, EditorPlugin);
public:
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index 3e603fa499..9d396467c3 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -33,15 +33,13 @@
#include "editor/editor_scale.h"
void MeshEditor::_gui_input(Ref<InputEvent> p_event) {
-
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
-
rot_x -= mm->get_relative().y * 0.01;
rot_y -= mm->get_relative().x * 0.01;
- if (rot_x < -Math_PI / 2)
+ if (rot_x < -Math_PI / 2) {
rot_x = -Math_PI / 2;
- else if (rot_x > Math_PI / 2) {
+ } else if (rot_x > Math_PI / 2) {
rot_x = Math_PI / 2;
}
_update_rotation();
@@ -49,9 +47,7 @@ void MeshEditor::_gui_input(Ref<InputEvent> p_event) {
}
void MeshEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_READY) {
-
//get_scene()->connect("node_removed",this,"_node_removed");
if (first_enter) {
@@ -67,7 +63,6 @@ void MeshEditor::_notification(int p_what) {
}
void MeshEditor::_update_rotation() {
-
Transform t;
t.basis.rotate(Vector3(0, 1, 0), -rot_y);
t.basis.rotate(Vector3(1, 0, 0), -rot_x);
@@ -75,7 +70,6 @@ void MeshEditor::_update_rotation() {
}
void MeshEditor::edit(Ref<Mesh> p_mesh) {
-
mesh = p_mesh;
mesh_instance->set_mesh(mesh);
@@ -98,7 +92,6 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) {
}
void MeshEditor::_button_pressed(Node *p_button) {
-
if (p_button == light_1_switch) {
light1->set_visible(!light_1_switch->is_pressed());
}
@@ -109,12 +102,10 @@ void MeshEditor::_button_pressed(Node *p_button) {
}
void MeshEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_gui_input"), &MeshEditor::_gui_input);
}
MeshEditor::MeshEditor() {
-
viewport = memnew(SubViewport);
Ref<World3D> world_3d;
world_3d.instance();
@@ -172,12 +163,10 @@ MeshEditor::MeshEditor() {
///////////////////////
bool EditorInspectorPluginMesh::can_handle(Object *p_object) {
-
return Object::cast_to<Mesh>(p_object) != nullptr;
}
void EditorInspectorPluginMesh::parse_begin(Object *p_object) {
-
Mesh *mesh = Object::cast_to<Mesh>(p_object);
if (!mesh) {
return;
@@ -190,7 +179,6 @@ void EditorInspectorPluginMesh::parse_begin(Object *p_object) {
}
MeshEditorPlugin::MeshEditorPlugin(EditorNode *p_node) {
-
Ref<EditorInspectorPluginMesh> plugin;
plugin.instance();
add_inspector_plugin(plugin);
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 072e21f260..6f171a0eab 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -40,7 +40,6 @@
#include "scene/resources/material.h"
class MeshEditor : public SubViewportContainer {
-
GDCLASS(MeshEditor, SubViewportContainer);
float rot_x;
@@ -82,7 +81,6 @@ public:
};
class MeshEditorPlugin : public EditorPlugin {
-
GDCLASS(MeshEditorPlugin, EditorPlugin);
public:
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index 7819f62bc7..1b65987af0 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -38,7 +38,6 @@
#include "scene/gui/box_container.h"
void MeshInstance3DEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
options->hide();
@@ -46,12 +45,10 @@ void MeshInstance3DEditor::_node_removed(Node *p_node) {
}
void MeshInstance3DEditor::edit(MeshInstance3D *p_mesh) {
-
node = p_mesh;
}
void MeshInstance3DEditor::_menu_option(int p_option) {
-
Ref<Mesh> mesh = node->get_mesh();
if (mesh.is_null()) {
err_dialog->set_text(TTR("Mesh is empty!"));
@@ -61,7 +58,6 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
switch (p_option) {
case MENU_OPTION_CREATE_STATIC_TRIMESH_BODY: {
-
EditorSelection *editor_selection = EditorNode::get_singleton()->get_editor_selection();
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
@@ -95,18 +91,20 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->create_action(TTR("Create Static Trimesh Body"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
MeshInstance3D *instance = Object::cast_to<MeshInstance3D>(E->get());
- if (!instance)
+ if (!instance) {
continue;
+ }
Ref<Mesh> m = instance->get_mesh();
- if (m.is_null())
+ if (m.is_null()) {
continue;
+ }
Ref<Shape3D> shape = m->create_trimesh_shape();
- if (shape.is_null())
+ if (shape.is_null()) {
continue;
+ }
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(shape);
@@ -127,7 +125,6 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE: {
-
if (node == get_tree()->get_edited_scene_root()) {
err_dialog->set_text(TTR("This doesn't work on scene root!"));
err_dialog->popup_centered();
@@ -135,8 +132,9 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
}
Ref<Shape3D> shape = mesh->create_trimesh_shape();
- if (shape.is_null())
+ if (shape.is_null()) {
return;
+ }
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(shape);
@@ -155,7 +153,6 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->commit_action();
} break;
case MENU_OPTION_CREATE_SINGLE_CONVEX_COLLISION_SHAPE: {
-
if (node == get_tree()->get_edited_scene_root()) {
err_dialog->set_text(TTR("Can't create a single convex collision shape for the scene root."));
err_dialog->popup_centered();
@@ -189,7 +186,6 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CREATE_MULTIPLE_CONVEX_COLLISION_SHAPES: {
-
if (node == get_tree()->get_edited_scene_root()) {
err_dialog->set_text(TTR("Can't create multiple convex collision shapes for the scene root."));
err_dialog->popup_centered();
@@ -208,7 +204,6 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->create_action(TTR("Create Multiple Convex Shapes"));
for (int i = 0; i < shapes.size(); i++) {
-
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(shapes[i]);
cshape->set_transform(node->get_transform());
@@ -226,11 +221,11 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CREATE_NAVMESH: {
-
Ref<NavigationMesh> nmesh = memnew(NavigationMesh);
- if (nmesh.is_null())
+ if (nmesh.is_null()) {
return;
+ }
nmesh->create_from_mesh(mesh);
NavigationRegion3D *nmi = memnew(NavigationRegion3D);
@@ -250,11 +245,9 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CREATE_OUTLINE_MESH: {
-
outline_dialog->popup_centered(Vector2(200, 90));
} break;
case MENU_OPTION_CREATE_UV2: {
-
Ref<ArrayMesh> mesh2 = node->get_mesh();
if (!mesh2.is_valid()) {
err_dialog->set_text(TTR("Contained Mesh is not of type ArrayMesh."));
@@ -292,15 +285,15 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
}
struct MeshInstance3DEditorEdgeSort {
-
Vector2 a;
Vector2 b;
bool operator<(const MeshInstance3DEditorEdgeSort &p_b) const {
- if (a == p_b.a)
+ if (a == p_b.a) {
return b < p_b.b;
- else
+ } else {
return a < p_b.a;
+ }
}
MeshInstance3DEditorEdgeSort() {}
@@ -316,15 +309,15 @@ struct MeshInstance3DEditorEdgeSort {
};
void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
-
Ref<Mesh> mesh = node->get_mesh();
ERR_FAIL_COND(!mesh.is_valid());
Set<MeshInstance3DEditorEdgeSort> edges;
uv_lines.clear();
for (int i = 0; i < mesh->get_surface_count(); i++) {
- if (mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES)
+ if (mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) {
continue;
+ }
Array a = mesh->surface_get_arrays(i);
Vector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2];
@@ -349,9 +342,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
}
for (int j = 0; j < ic; j += 3) {
-
for (int k = 0; k < 3; k++) {
-
MeshInstance3DEditorEdgeSort edge;
if (ri) {
edge.a = r[ri[j + k]];
@@ -361,8 +352,9 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
edge.b = r[j + ((k + 1) % 3)];
}
- if (edges.has(edge))
+ if (edges.has(edge)) {
continue;
+ }
uv_lines.push_back(edge.a);
uv_lines.push_back(edge.b);
@@ -375,9 +367,9 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
}
void MeshInstance3DEditor::_debug_uv_draw() {
-
- if (uv_lines.size() == 0)
+ if (uv_lines.size() == 0) {
return;
+ }
debug_uv->set_clip_contents(true);
debug_uv->draw_rect(Rect2(Vector2(), debug_uv->get_size()), Color(0.2, 0.2, 0.0));
@@ -386,7 +378,6 @@ void MeshInstance3DEditor::_debug_uv_draw() {
}
void MeshInstance3DEditor::_create_outline_mesh() {
-
Ref<Mesh> mesh = node->get_mesh();
if (mesh.is_null()) {
err_dialog->set_text(TTR("MeshInstance3D lacks a Mesh."));
@@ -435,7 +426,6 @@ void MeshInstance3DEditor::_bind_methods() {
}
MeshInstance3DEditor::MeshInstance3DEditor() {
-
options = memnew(MenuButton);
options->set_switch_on_hover(true);
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
@@ -495,28 +485,23 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
}
void MeshInstance3DEditorPlugin::edit(Object *p_object) {
-
mesh_editor->edit(Object::cast_to<MeshInstance3D>(p_object));
}
bool MeshInstance3DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("MeshInstance3D");
}
void MeshInstance3DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
mesh_editor->options->show();
} else {
-
mesh_editor->options->hide();
mesh_editor->edit(nullptr);
}
}
MeshInstance3DEditorPlugin::MeshInstance3DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
mesh_editor = memnew(MeshInstance3DEditor);
editor->get_viewport()->add_child(mesh_editor);
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.h b/editor/plugins/mesh_instance_3d_editor_plugin.h
index a5d90c42d5..3350a792bc 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.h
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.h
@@ -37,7 +37,6 @@
#include "scene/gui/spin_box.h"
class MeshInstance3DEditor : public Control {
-
GDCLASS(MeshInstance3DEditor, Control);
enum Menu {
@@ -84,7 +83,6 @@ public:
};
class MeshInstance3DEditorPlugin : public EditorPlugin {
-
GDCLASS(MeshInstance3DEditorPlugin, EditorPlugin);
MeshInstance3DEditor *mesh_editor;
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index a3e3d88ae2..7690beeee8 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -41,18 +41,15 @@
#include "scene/resources/packed_scene.h"
void MeshLibraryEditor::edit(const Ref<MeshLibrary> &p_mesh_library) {
-
mesh_library = p_mesh_library;
- if (mesh_library.is_valid())
+ if (mesh_library.is_valid()) {
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), !mesh_library->has_meta("_editor_source_scene"));
+ }
}
void MeshLibraryEditor::_menu_confirm() {
-
switch (option) {
-
case MENU_OPTION_REMOVE_ITEM: {
-
mesh_library->remove_item(to_erase);
} break;
case MENU_OPTION_UPDATE_FROM_SCENE: {
@@ -67,14 +64,13 @@ void MeshLibraryEditor::_menu_confirm() {
}
void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, bool p_merge) {
-
- if (!p_merge)
+ if (!p_merge) {
p_library->clear();
+ }
Map<int, MeshInstance3D *> mesh_instances;
for (int i = 0; i < p_scene->get_child_count(); i++) {
-
Node *child = p_scene->get_child(i);
if (!Object::cast_to<MeshInstance3D>(child)) {
@@ -84,14 +80,16 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
continue;
}
- } else
+ } else {
continue;
+ }
}
MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(child);
Ref<Mesh> mesh = mi->get_mesh();
- if (mesh.is_null())
+ if (mesh.is_null()) {
continue;
+ }
mesh = mesh->duplicate();
for (int j = 0; j < mesh->get_surface_count(); ++j) {
@@ -104,7 +102,6 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
int id = p_library->find_item_by_name(mi->get_name());
if (id < 0) {
-
id = p_library->get_last_unused_item_id();
p_library->create_item(id);
p_library->set_item_name(id, mi->get_name());
@@ -116,28 +113,29 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
Vector<MeshLibrary::ShapeData> collisions;
for (int j = 0; j < mi->get_child_count(); j++) {
-
Node *child2 = mi->get_child(j);
- if (!Object::cast_to<StaticBody3D>(child2))
+ if (!Object::cast_to<StaticBody3D>(child2)) {
continue;
+ }
StaticBody3D *sb = Object::cast_to<StaticBody3D>(child2);
List<uint32_t> shapes;
sb->get_shape_owners(&shapes);
for (List<uint32_t>::Element *E = shapes.front(); E; E = E->next()) {
- if (sb->is_shape_owner_disabled(E->get()))
+ if (sb->is_shape_owner_disabled(E->get())) {
continue;
+ }
//Transform shape_transform = sb->shape_owner_get_transform(E->get());
//shape_transform.set_origin(shape_transform.get_origin() - phys_offset);
for (int k = 0; k < sb->shape_owner_get_shape_count(E->get()); k++) {
-
Ref<Shape3D> collision = sb->shape_owner_get_shape(E->get(), k);
- if (!collision.is_valid())
+ if (!collision.is_valid()) {
continue;
+ }
MeshLibrary::ShapeData shape_data;
shape_data.shape = collision;
shape_data.local_transform = sb->get_transform() * sb->shape_owner_get_transform(E->get());
@@ -152,13 +150,15 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
Transform navmesh_transform;
for (int j = 0; j < mi->get_child_count(); j++) {
Node *child2 = mi->get_child(j);
- if (!Object::cast_to<NavigationRegion3D>(child2))
+ if (!Object::cast_to<NavigationRegion3D>(child2)) {
continue;
+ }
NavigationRegion3D *sb = Object::cast_to<NavigationRegion3D>(child2);
navmesh = sb->get_navigation_mesh();
navmesh_transform = sb->get_transform();
- if (!navmesh.is_null())
+ if (!navmesh.is_null()) {
break;
+ }
}
if (!navmesh.is_null()) {
p_library->set_item_navmesh(id, navmesh);
@@ -168,15 +168,12 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
//generate previews!
- if (1) {
-
+ if (true) {
Vector<Ref<Mesh>> meshes;
Vector<Transform> transforms;
Vector<int> ids = p_library->get_item_list();
for (int i = 0; i < ids.size(); i++) {
-
if (mesh_instances.find(ids[i])) {
-
meshes.push_back(p_library->get_item_mesh(ids[i]));
transforms.push_back(mesh_instances[ids[i]]->get_transform());
}
@@ -185,9 +182,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
Vector<Ref<Texture2D>> textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, &transforms, EditorSettings::get_singleton()->get("editors/grid_map/preview_size"));
int j = 0;
for (int i = 0; i < ids.size(); i++) {
-
if (mesh_instances.find(ids[i])) {
-
p_library->set_item_preview(ids[i], textures[j]);
j++;
}
@@ -196,7 +191,6 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
}
void MeshLibraryEditor::_import_scene_cbk(const String &p_str) {
-
Ref<PackedScene> ps = ResourceLoader::load(p_str, "PackedScene");
ERR_FAIL_COND(ps.is_null());
Node *scene = ps->instance();
@@ -211,36 +205,28 @@ void MeshLibraryEditor::_import_scene_cbk(const String &p_str) {
}
Error MeshLibraryEditor::update_library_file(Node *p_base_scene, Ref<MeshLibrary> ml, bool p_merge) {
-
_import_scene(p_base_scene, ml, p_merge);
return OK;
}
void MeshLibraryEditor::_menu_cbk(int p_option) {
-
option = p_option;
switch (p_option) {
-
case MENU_OPTION_ADD_ITEM: {
-
mesh_library->create_item(mesh_library->get_last_unused_item_id());
} break;
case MENU_OPTION_REMOVE_ITEM: {
-
String p = editor->get_inspector()->get_selected_path();
if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/") >= 3) {
-
to_erase = p.get_slice("/", 3).to_int();
cd->set_text(vformat(TTR("Remove item %d?"), to_erase));
cd->popup_centered(Size2(300, 60));
}
} break;
case MENU_OPTION_IMPORT_FROM_SCENE: {
-
file->popup_centered_ratio();
} break;
case MENU_OPTION_UPDATE_FROM_SCENE: {
-
cd->set_text(vformat(TTR("Update from existing scene?:\n%s"), String(mesh_library->get_meta("_editor_source_scene"))));
cd->popup_centered(Size2(500, 60));
} break;
@@ -251,7 +237,6 @@ void MeshLibraryEditor::_bind_methods() {
}
MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
-
file = memnew(EditorFileDialog);
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
//not for now?
@@ -260,7 +245,6 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
file->clear_filters();
file->set_title(TTR("Import Scene"));
for (int i = 0; i < extensions.size(); i++) {
-
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
add_child(file);
@@ -287,21 +271,19 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
}
void MeshLibraryEditorPlugin::edit(Object *p_node) {
-
if (Object::cast_to<MeshLibrary>(p_node)) {
mesh_library_editor->edit(Object::cast_to<MeshLibrary>(p_node));
mesh_library_editor->show();
- } else
+ } else {
mesh_library_editor->hide();
+ }
}
bool MeshLibraryEditorPlugin::handles(Object *p_node) const {
-
return p_node->is_class("MeshLibrary");
}
void MeshLibraryEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
mesh_library_editor->show();
mesh_library_editor->get_menu_button()->show();
@@ -312,7 +294,6 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible) {
}
MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) {
-
EDITOR_DEF("editors/grid_map/preview_size", 64);
mesh_library_editor = memnew(MeshLibraryEditor(p_node));
diff --git a/editor/plugins/mesh_library_editor_plugin.h b/editor/plugins/mesh_library_editor_plugin.h
index 74b0a280e3..61ce5692bc 100644
--- a/editor/plugins/mesh_library_editor_plugin.h
+++ b/editor/plugins/mesh_library_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/resources/mesh_library.h"
class MeshLibraryEditor : public Control {
-
GDCLASS(MeshLibraryEditor, Control);
Ref<MeshLibrary> mesh_library;
@@ -74,7 +73,6 @@ public:
};
class MeshLibraryEditorPlugin : public EditorPlugin {
-
GDCLASS(MeshLibraryEditorPlugin, EditorPlugin);
MeshLibraryEditor *mesh_library_editor;
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 4f482c2b43..3904389e09 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -35,7 +35,6 @@
#include "scene/gui/box_container.h"
void MultiMeshEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
hide();
@@ -43,24 +42,21 @@ void MultiMeshEditor::_node_removed(Node *p_node) {
}
void MultiMeshEditor::_populate() {
-
- if (!node)
+ if (!node) {
return;
+ }
Ref<Mesh> mesh;
if (mesh_source->get_text() == "") {
-
Ref<MultiMesh> multimesh;
multimesh = node->get_multimesh();
if (multimesh.is_null()) {
-
err_dialog->set_text(TTR("No mesh source specified (and no MultiMesh set in node)."));
err_dialog->popup_centered();
return;
}
if (multimesh->get_mesh().is_null()) {
-
err_dialog->set_text(TTR("No mesh source specified (and MultiMesh contains no Mesh)."));
err_dialog->popup_centered();
return;
@@ -68,11 +64,9 @@ void MultiMeshEditor::_populate() {
mesh = multimesh->get_mesh();
} else {
-
Node *ms_node = node->get_node(mesh_source->get_text());
if (!ms_node) {
-
err_dialog->set_text(TTR("Mesh source is invalid (invalid path)."));
err_dialog->popup_centered();
return;
@@ -81,7 +75,6 @@ void MultiMeshEditor::_populate() {
MeshInstance3D *ms_instance = Object::cast_to<MeshInstance3D>(ms_node);
if (!ms_instance) {
-
err_dialog->set_text(TTR("Mesh source is invalid (not a MeshInstance3D)."));
err_dialog->popup_centered();
return;
@@ -90,7 +83,6 @@ void MultiMeshEditor::_populate() {
mesh = ms_instance->get_mesh();
if (mesh.is_null()) {
-
err_dialog->set_text(TTR("Mesh source is invalid (contains no Mesh resource)."));
err_dialog->popup_centered();
return;
@@ -98,7 +90,6 @@ void MultiMeshEditor::_populate() {
}
if (surface_source->get_text() == "") {
-
err_dialog->set_text(TTR("No surface source specified."));
err_dialog->popup_centered();
return;
@@ -107,7 +98,6 @@ void MultiMeshEditor::_populate() {
Node *ss_node = node->get_node(surface_source->get_text());
if (!ss_node) {
-
err_dialog->set_text(TTR("Surface source is invalid (invalid path)."));
err_dialog->popup_centered();
return;
@@ -116,7 +106,6 @@ void MultiMeshEditor::_populate() {
GeometryInstance3D *ss_instance = Object::cast_to<MeshInstance3D>(ss_node);
if (!ss_instance) {
-
err_dialog->set_text(TTR("Surface source is invalid (no geometry)."));
err_dialog->popup_centered();
return;
@@ -127,7 +116,6 @@ void MultiMeshEditor::_populate() {
Vector<Face3> geometry = ss_instance->get_faces(VisualInstance3D::FACES_SOLID);
if (geometry.size() == 0) {
-
err_dialog->set_text(TTR("Surface source is invalid (no faces)."));
err_dialog->popup_centered();
return;
@@ -153,10 +141,10 @@ void MultiMeshEditor::_populate() {
float area_accum = 0;
Map<float, int> triangle_area_map;
for (int i = 0; i < facecount; i++) {
-
float area = r[i].get_area();
- if (area < CMP_EPSILON)
+ if (area < CMP_EPSILON) {
continue;
+ }
triangle_area_map[area_accum] = i;
area_accum += area;
}
@@ -188,7 +176,6 @@ void MultiMeshEditor::_populate() {
}
for (int i = 0; i < instance_count; i++) {
-
float areapos = Math::random(0.0f, area_accum);
Map<float, int>::Element *E = triangle_area_map.find_closest(areapos);
@@ -227,23 +214,19 @@ void MultiMeshEditor::_populate() {
}
void MultiMeshEditor::_browsed(const NodePath &p_path) {
-
NodePath path = node->get_path_to(get_node(p_path));
- if (browsing_source)
+ if (browsing_source) {
mesh_source->set_text(path);
- else
+ } else {
surface_source->set_text(path);
+ }
}
void MultiMeshEditor::_menu_option(int p_option) {
-
switch (p_option) {
-
case MENU_OPTION_POPULATE: {
-
if (_last_pp_node != node) {
-
surface_source->set_text("..");
mesh_source->set_text("..");
populate_axis->select(1);
@@ -262,26 +245,24 @@ void MultiMeshEditor::_menu_option(int p_option) {
}
void MultiMeshEditor::edit(MultiMeshInstance3D *p_multimesh) {
-
node = p_multimesh;
}
void MultiMeshEditor::_browse(bool p_source) {
-
browsing_source = p_source;
std->get_scene_tree()->set_marked(node, false);
std->popup_centered_ratio();
- if (p_source)
+ if (p_source) {
std->set_title(TTR("Select a Source Mesh:"));
- else
+ } else {
std->set_title(TTR("Select a Target Surface:"));
+ }
}
void MultiMeshEditor::_bind_methods() {
}
MultiMeshEditor::MultiMeshEditor() {
-
options = memnew(MenuButton);
options->set_switch_on_hover(true);
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
@@ -378,28 +359,23 @@ MultiMeshEditor::MultiMeshEditor() {
}
void MultiMeshEditorPlugin::edit(Object *p_object) {
-
multimesh_editor->edit(Object::cast_to<MultiMeshInstance3D>(p_object));
}
bool MultiMeshEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("MultiMeshInstance3D");
}
void MultiMeshEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
multimesh_editor->options->show();
} else {
-
multimesh_editor->options->hide();
multimesh_editor->edit(nullptr);
}
}
MultiMeshEditorPlugin::MultiMeshEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
multimesh_editor = memnew(MultiMeshEditor);
editor->get_viewport()->add_child(multimesh_editor);
diff --git a/editor/plugins/multimesh_editor_plugin.h b/editor/plugins/multimesh_editor_plugin.h
index 15c9b91fee..2b0a0c137f 100644
--- a/editor/plugins/multimesh_editor_plugin.h
+++ b/editor/plugins/multimesh_editor_plugin.h
@@ -37,7 +37,6 @@
#include "scene/gui/spin_box.h"
class MultiMeshEditor : public Control {
-
GDCLASS(MultiMeshEditor, Control);
friend class MultiMeshEditorPlugin;
@@ -83,7 +82,6 @@ public:
};
class MultiMeshEditorPlugin : public EditorPlugin {
-
GDCLASS(MultiMeshEditorPlugin, EditorPlugin);
MultiMeshEditor *multimesh_editor;
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index e41b32ac86..8cf9f01fa0 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -31,10 +31,8 @@
#include "navigation_polygon_editor_plugin.h"
Ref<NavigationPolygon> NavigationPolygonEditor::_ensure_navpoly() const {
-
Ref<NavigationPolygon> navpoly = node->get_navigation_polygon();
if (!navpoly.is_valid()) {
-
navpoly = Ref<NavigationPolygon>(memnew(NavigationPolygon));
node->set_navigation_polygon(navpoly);
}
@@ -42,42 +40,38 @@ Ref<NavigationPolygon> NavigationPolygonEditor::_ensure_navpoly() const {
}
Node2D *NavigationPolygonEditor::_get_node() const {
-
return node;
}
void NavigationPolygonEditor::_set_node(Node *p_polygon) {
-
node = Object::cast_to<NavigationRegion2D>(p_polygon);
}
int NavigationPolygonEditor::_get_polygon_count() const {
-
Ref<NavigationPolygon> navpoly = node->get_navigation_polygon();
- if (navpoly.is_valid())
+ if (navpoly.is_valid()) {
return navpoly->get_outline_count();
- else
+ } else {
return 0;
+ }
}
Variant NavigationPolygonEditor::_get_polygon(int p_idx) const {
-
Ref<NavigationPolygon> navpoly = node->get_navigation_polygon();
- if (navpoly.is_valid())
+ if (navpoly.is_valid()) {
return navpoly->get_outline(p_idx);
- else
+ } else {
return Variant(Vector<Vector2>());
+ }
}
void NavigationPolygonEditor::_set_polygon(int p_idx, const Variant &p_polygon) const {
-
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
navpoly->set_outline(p_idx, p_polygon);
navpoly->make_polygons_from_outlines();
}
void NavigationPolygonEditor::_action_add_polygon(const Variant &p_polygon) {
-
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
undo_redo->add_do_method(navpoly.ptr(), "add_outline", p_polygon);
undo_redo->add_undo_method(navpoly.ptr(), "remove_outline", navpoly->get_outline_count());
@@ -86,7 +80,6 @@ void NavigationPolygonEditor::_action_add_polygon(const Variant &p_polygon) {
}
void NavigationPolygonEditor::_action_remove_polygon(int p_idx) {
-
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
undo_redo->add_do_method(navpoly.ptr(), "remove_outline", p_idx);
undo_redo->add_undo_method(navpoly.ptr(), "add_outline_at_index", navpoly->get_outline(p_idx), p_idx);
@@ -95,7 +88,6 @@ void NavigationPolygonEditor::_action_remove_polygon(int p_idx) {
}
void NavigationPolygonEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
-
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
undo_redo->add_do_method(navpoly.ptr(), "set_outline", p_idx, p_polygon);
undo_redo->add_undo_method(navpoly.ptr(), "set_outline", p_idx, p_previous);
@@ -104,14 +96,13 @@ void NavigationPolygonEditor::_action_set_polygon(int p_idx, const Variant &p_pr
}
bool NavigationPolygonEditor::_has_resource() const {
-
return node && node->get_navigation_polygon().is_valid();
}
void NavigationPolygonEditor::_create_resource() {
-
- if (!node)
+ if (!node) {
return;
+ }
undo_redo->create_action(TTR("Create Navigation Polygon"));
undo_redo->add_do_method(node, "set_navigation_polygon", Ref<NavigationPolygon>(memnew(NavigationPolygon)));
diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index 0bc35e2498..0767322c17 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/2d/navigation_region_2d.h"
class NavigationPolygonEditor : public AbstractPolygon2DEditor {
-
GDCLASS(NavigationPolygonEditor, AbstractPolygon2DEditor);
NavigationRegion2D *node;
@@ -62,7 +61,6 @@ public:
};
class NavigationPolygonEditorPlugin : public AbstractPolygon2DEditorPlugin {
-
GDCLASS(NavigationPolygonEditorPlugin, AbstractPolygon2DEditorPlugin);
public:
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 69f8efa86e..7bf8fd7d26 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -77,7 +77,6 @@
#define MAX_FOV 179
void ViewportRotationControl::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
axis_menu_options.clear();
axis_menu_options.push_back(Node3DEditorViewport::VIEW_RIGHT);
@@ -255,19 +254,16 @@ void ViewportRotationControl::_bind_methods() {
}
void Node3DEditorViewport::_update_camera(float p_interp_delta) {
-
bool is_orthogonal = camera->get_projection() == Camera3D::PROJECTION_ORTHOGONAL;
Cursor old_camera_cursor = camera_cursor;
camera_cursor = cursor;
if (p_interp_delta > 0) {
-
//-------
// Perform smoothing
if (is_freelook_active()) {
-
// Higher inertia should increase "lag" (lerp with factor between 0 and 1)
// Inertia of zero should produce instant movement (lerp with factor of 1) in this case it returns a really high value and gets clamped to 1.
real_t inertia = EDITOR_GET("editors/3d/freelook/freelook_inertia");
@@ -294,7 +290,6 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) {
camera_cursor.pos = camera_cursor.eye_pos + forward * camera_cursor.distance;
} else {
-
//when not being manipulated, move softly
float free_orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia");
float free_translation_inertia = EDITOR_GET("editors/3d/navigation_feel/translation_inertia");
@@ -333,22 +328,17 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) {
//-------
// Apply camera transform
- float tolerance = 0.001;
+ real_t tolerance = 0.001;
bool equal = true;
- if (Math::abs(old_camera_cursor.x_rot - camera_cursor.x_rot) > tolerance || Math::abs(old_camera_cursor.y_rot - camera_cursor.y_rot) > tolerance) {
+ if (!Math::is_equal_approx(old_camera_cursor.x_rot, camera_cursor.x_rot, tolerance) || !Math::is_equal_approx(old_camera_cursor.y_rot, camera_cursor.y_rot, tolerance)) {
equal = false;
- }
-
- if (equal && old_camera_cursor.pos.distance_squared_to(camera_cursor.pos) > tolerance * tolerance) {
+ } else if (!old_camera_cursor.pos.is_equal_approx(camera_cursor.pos)) {
equal = false;
- }
-
- if (equal && Math::abs(old_camera_cursor.distance - camera_cursor.distance) > tolerance) {
+ } else if (!Math::is_equal_approx(old_camera_cursor.distance, camera_cursor.distance, tolerance)) {
equal = false;
}
if (!equal || p_interp_delta == 0 || is_freelook_active() || is_orthogonal != orthogonal) {
-
camera->set_global_transform(to_camera_transform(camera_cursor));
if (orthogonal) {
@@ -362,6 +352,7 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) {
update_transform_gizmo_view();
rotation_control->update();
}
+ spatial_editor->update_grid();
}
Transform Node3DEditorViewport::to_camera_transform(const Cursor &p_cursor) const {
@@ -370,29 +361,30 @@ Transform Node3DEditorViewport::to_camera_transform(const Cursor &p_cursor) cons
camera_transform.basis.rotate(Vector3(1, 0, 0), -p_cursor.x_rot);
camera_transform.basis.rotate(Vector3(0, 1, 0), -p_cursor.y_rot);
- if (orthogonal)
+ if (orthogonal) {
camera_transform.translate(0, 0, (get_zfar() - get_znear()) / 2.0);
- else
+ } else {
camera_transform.translate(0, 0, p_cursor.distance);
+ }
return camera_transform;
}
int Node3DEditorViewport::get_selected_count() const {
-
Map<Node *, Object *> &selection = editor_selection->get_selection();
int count = 0;
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->key());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
count++;
}
@@ -401,62 +393,55 @@ int Node3DEditorViewport::get_selected_count() const {
}
float Node3DEditorViewport::get_znear() const {
-
return CLAMP(spatial_editor->get_znear(), MIN_Z, MAX_Z);
}
-float Node3DEditorViewport::get_zfar() const {
+float Node3DEditorViewport::get_zfar() const {
return CLAMP(spatial_editor->get_zfar(), MIN_Z, MAX_Z);
}
-float Node3DEditorViewport::get_fov() const {
+float Node3DEditorViewport::get_fov() const {
return CLAMP(spatial_editor->get_fov(), MIN_FOV, MAX_FOV);
}
Transform Node3DEditorViewport::_get_camera_transform() const {
-
return camera->get_global_transform();
}
Vector3 Node3DEditorViewport::_get_camera_position() const {
-
return _get_camera_transform().origin;
}
Point2 Node3DEditorViewport::_point_to_screen(const Vector3 &p_point) {
-
return camera->unproject_position(p_point) * subviewport_container->get_stretch_shrink();
}
Vector3 Node3DEditorViewport::_get_ray_pos(const Vector2 &p_pos) const {
-
return camera->project_ray_origin(p_pos / subviewport_container->get_stretch_shrink());
}
Vector3 Node3DEditorViewport::_get_camera_normal() const {
-
return -_get_camera_transform().basis.get_axis(2);
}
Vector3 Node3DEditorViewport::_get_ray(const Vector2 &p_pos) const {
-
return camera->project_ray_normal(p_pos / subviewport_container->get_stretch_shrink());
}
void Node3DEditorViewport::_clear_selected() {
-
editor_selection->clear();
}
void Node3DEditorViewport::_select_clicked(bool p_append, bool p_single, bool p_allow_locked) {
-
- if (clicked.is_null())
+ if (clicked.is_null()) {
return;
+ }
Node *node = Object::cast_to<Node>(ObjectDB::get_instance(clicked));
Node3D *selected = Object::cast_to<Node3D>(node);
- if (!selected)
+ if (!selected) {
return;
+ }
if (!p_allow_locked) {
// Replace the node by the group if grouped
@@ -475,7 +460,6 @@ void Node3DEditorViewport::_select_clicked(bool p_append, bool p_single, bool p_
}
void Node3DEditorViewport::_select(Node *p_node, bool p_append, bool p_single) {
-
if (!p_append) {
editor_selection->clear();
}
@@ -484,20 +468,20 @@ void Node3DEditorViewport::_select(Node *p_node, bool p_append, bool p_single) {
//erase
editor_selection->remove_node(p_node);
} else {
-
editor_selection->add_node(p_node);
}
if (p_single) {
- if (Engine::get_singleton()->is_editor_hint())
+ if (Engine::get_singleton()->is_editor_hint()) {
editor->call("edit_node", p_node);
+ }
}
}
ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos, bool p_append, bool &r_includes_current, int *r_gizmo_handle, bool p_alt_select) {
-
- if (r_gizmo_handle)
+ if (r_gizmo_handle) {
*r_gizmo_handle = -1;
+ }
Vector3 ray = _get_ray(p_pos);
Vector3 pos = _get_ray_pos(p_pos);
@@ -513,11 +497,11 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos, bool p_append, b
int selected_handle = -1;
for (int i = 0; i < instances.size(); i++) {
-
Node3D *spat = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i]));
- if (!spat)
+ if (!spat) {
continue;
+ }
Ref<EditorNode3DGizmo> seg = spat->get_gizmo();
@@ -532,16 +516,17 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos, bool p_append, b
int handle = -1;
bool inters = seg->intersect_ray(camera, shrinked_pos, point, normal, &handle, p_alt_select);
- if (!inters)
+ if (!inters) {
continue;
+ }
float dist = pos.distance_to(point);
- if (dist < 0)
+ if (dist < 0) {
continue;
+ }
if (dist < closest_dist) {
-
item = Object::cast_to<Node>(spat);
while (item->get_owner() && item->get_owner() != edited_scene && !edited_scene->is_editable_instance(item->get_owner())) {
item = item->get_owner();
@@ -553,20 +538,20 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos, bool p_append, b
}
}
- if (!item)
+ if (!item) {
return ObjectID();
+ }
if (!editor_selection->is_selected(item) || (r_gizmo_handle && selected_handle >= 0)) {
-
- if (r_gizmo_handle)
+ if (r_gizmo_handle) {
*r_gizmo_handle = selected_handle;
+ }
}
return closest;
}
void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_includes_current, Vector<_RayResult> &results, bool p_alt_select) {
-
Vector3 ray = _get_ray(p_pos);
Vector3 pos = _get_ray_pos(p_pos);
@@ -576,19 +561,21 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_inclu
r_includes_current = false;
for (int i = 0; i < instances.size(); i++) {
-
Node3D *spat = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i]));
- if (!spat)
+ if (!spat) {
continue;
+ }
Ref<EditorNode3DGizmo> seg = spat->get_gizmo();
- if (!seg.is_valid())
+ if (!seg.is_valid()) {
continue;
+ }
- if (found_gizmos.has(seg))
+ if (found_gizmos.has(seg)) {
continue;
+ }
found_gizmos.insert(seg);
Vector3 point;
@@ -597,16 +584,19 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_inclu
int handle = -1;
bool inters = seg->intersect_ray(camera, p_pos, point, normal, nullptr, p_alt_select);
- if (!inters)
+ if (!inters) {
continue;
+ }
float dist = pos.distance_to(point);
- if (dist < 0)
+ if (dist < 0) {
continue;
+ }
- if (editor_selection->is_selected(spat))
+ if (editor_selection->is_selected(spat)) {
r_includes_current = true;
+ }
_RayResult res;
res.item = spat;
@@ -615,14 +605,14 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_inclu
results.push_back(res);
}
- if (results.empty())
+ if (results.empty()) {
return;
+ }
results.sort();
}
Vector3 Node3DEditorViewport::_get_screen_to_space(const Vector3 &p_vector3) {
-
CameraMatrix cm;
if (orthogonal) {
cm.set_orthogonal(camera->get_size(), get_size().aspect(), get_znear() + p_vector3.z, get_zfar());
@@ -641,9 +631,9 @@ Vector3 Node3DEditorViewport::_get_screen_to_space(const Vector3 &p_vector3) {
}
void Node3DEditorViewport::_select_region() {
-
- if (cursor.region_begin == cursor.region_end)
+ if (cursor.region_begin == cursor.region_end) {
return; //nothing really
+ }
float z_offset = MAX(0.0, 5.0 - get_znear());
@@ -671,7 +661,6 @@ void Node3DEditorViewport::_select_region() {
Vector3 cam_pos = _get_camera_position();
for (int i = 0; i < 4; i++) {
-
Vector3 a = _get_screen_to_space(box[i]);
Vector3 b = _get_screen_to_space(box[(i + 1) % 4]);
if (orthogonal) {
@@ -695,10 +684,10 @@ void Node3DEditorViewport::_select_region() {
Node *edited_scene = get_tree()->get_edited_scene_root();
for (int i = 0; i < instances.size(); i++) {
-
Node3D *sp = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i]));
- if (!sp || _is_node_locked(sp))
+ if (!sp || _is_node_locked(sp)) {
continue;
+ }
Node *item = Object::cast_to<Node>(sp);
while (item->get_owner() && item->get_owner() != edited_scene && !edited_scene->is_editable_instance(item->get_owner())) {
@@ -718,16 +707,19 @@ void Node3DEditorViewport::_select_region() {
item = sel;
}
- if (selected.find(item) != -1)
+ if (selected.find(item) != -1) {
continue;
+ }
- if (_is_node_locked(item))
+ if (_is_node_locked(item)) {
continue;
+ }
Ref<EditorNode3DGizmo> seg = sp->get_gizmo();
- if (!seg.is_valid())
+ if (!seg.is_valid()) {
continue;
+ }
if (seg->intersect_frustum(camera, frustum)) {
selected.push_back(item);
@@ -741,23 +733,22 @@ void Node3DEditorViewport::_select_region() {
}
void Node3DEditorViewport::_update_name() {
-
String view_mode = orthogonal ? TTR("Orthogonal") : TTR("Perspective");
if (auto_orthogonal) {
view_mode += " [auto]";
}
- if (name != "")
+ if (name != "") {
view_menu->set_text(name + " " + view_mode);
- else
+ } else {
view_menu->set_text(view_mode);
+ }
view_menu->set_size(Vector2(0, 0)); // resets the button size
}
void Node3DEditorViewport::_compute_edit(const Point2 &p_point) {
-
_edit.click_ray = _get_ray(Vector2(p_point.x, p_point.y));
_edit.click_ray_pos = _get_ray_pos(Vector2(p_point.x, p_point.y));
_edit.plane = TRANSFORM_VIEW;
@@ -767,14 +758,15 @@ void Node3DEditorViewport::_compute_edit(const Point2 &p_point) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
se->original = se->sp->get_global_gizmo_transform();
se->original_local = se->sp->get_local_gizmo_transform();
@@ -782,9 +774,7 @@ void Node3DEditorViewport::_compute_edit(const Point2 &p_point) {
}
static int _get_key_modifier_setting(const String &p_property) {
-
switch (EditorSettings::get_singleton()->get(p_property).operator int()) {
-
case 0:
return 0;
case 1:
@@ -800,24 +790,29 @@ static int _get_key_modifier_setting(const String &p_property) {
}
static int _get_key_modifier(Ref<InputEventWithModifiers> e) {
- if (e->get_shift())
+ if (e->get_shift()) {
return KEY_SHIFT;
- if (e->get_alt())
+ }
+ if (e->get_alt()) {
return KEY_ALT;
- if (e->get_control())
+ }
+ if (e->get_control()) {
return KEY_CONTROL;
- if (e->get_metakey())
+ }
+ if (e->get_metakey()) {
return KEY_META;
+ }
return 0;
}
bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_highlight_only) {
-
- if (!spatial_editor->is_gizmo_visible())
+ if (!spatial_editor->is_gizmo_visible()) {
return false;
+ }
if (get_selected_count() == 0) {
- if (p_highlight_only)
+ if (p_highlight_only) {
spatial_editor->select_gizmo_highlight_axis(-1);
+ }
return false;
}
@@ -828,18 +823,16 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
float gs = gizmo_scale;
if (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE) {
-
int col_axis = -1;
float col_d = 1e20;
for (int i = 0; i < 3; i++) {
-
Vector3 grabber_pos = gt.origin + gt.basis.get_axis(i) * gs * (GIZMO_ARROW_OFFSET + (GIZMO_ARROW_SIZE * 0.5));
float grabber_radius = gs * GIZMO_ARROW_SIZE;
Vector3 r;
- if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * MAX_Z, grabber_pos, grabber_radius, &r)) {
+ if (Geometry3D::segment_intersects_sphere(ray_pos, ray_pos + ray * MAX_Z, grabber_pos, grabber_radius, &r)) {
float d = r.distance_to(ray_pos);
if (d < col_d) {
col_d = d;
@@ -854,7 +847,6 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
col_d = 1e20;
for (int i = 0; i < 3; i++) {
-
Vector3 ivec2 = gt.basis.get_axis((i + 1) % 3).normalized();
Vector3 ivec3 = gt.basis.get_axis((i + 2) % 3).normalized();
@@ -864,10 +856,8 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
Plane plane(gt.origin, gt.basis.get_axis(i).normalized());
if (plane.intersects_ray(ray_pos, ray, &r)) {
-
float dist = r.distance_to(grabber_pos);
if (dist < (gs * GIZMO_PLANE_SIZE)) {
-
float d = ray_pos.distance_to(r);
if (d < col_d) {
col_d = d;
@@ -881,9 +871,7 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
}
if (col_axis != -1) {
-
if (p_highlight_only) {
-
spatial_editor->select_gizmo_highlight_axis(col_axis + (is_plane_translate ? 6 : 0));
} else {
@@ -897,21 +885,19 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
}
if (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_ROTATE) {
-
int col_axis = -1;
float col_d = 1e20;
for (int i = 0; i < 3; i++) {
-
Plane plane(gt.origin, gt.basis.get_axis(i).normalized());
Vector3 r;
- if (!plane.intersects_ray(ray_pos, ray, &r))
+ if (!plane.intersects_ray(ray_pos, ray, &r)) {
continue;
+ }
float dist = r.distance_to(gt.origin);
if (dist > gs * (GIZMO_CIRCLE_SIZE - GIZMO_RING_HALF_WIDTH) && dist < gs * (GIZMO_CIRCLE_SIZE + GIZMO_RING_HALF_WIDTH)) {
-
float d = ray_pos.distance_to(r);
if (d < col_d) {
col_d = d;
@@ -921,9 +907,7 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
}
if (col_axis != -1) {
-
if (p_highlight_only) {
-
spatial_editor->select_gizmo_highlight_axis(col_axis + 3);
} else {
//handle rotate
@@ -936,18 +920,16 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
}
if (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SCALE) {
-
int col_axis = -1;
float col_d = 1e20;
for (int i = 0; i < 3; i++) {
-
Vector3 grabber_pos = gt.origin + gt.basis.get_axis(i) * gs * GIZMO_SCALE_OFFSET;
float grabber_radius = gs * GIZMO_ARROW_SIZE;
Vector3 r;
- if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * MAX_Z, grabber_pos, grabber_radius, &r)) {
+ if (Geometry3D::segment_intersects_sphere(ray_pos, ray_pos + ray * MAX_Z, grabber_pos, grabber_radius, &r)) {
float d = r.distance_to(ray_pos);
if (d < col_d) {
col_d = d;
@@ -962,7 +944,6 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
col_d = 1e20;
for (int i = 0; i < 3; i++) {
-
Vector3 ivec2 = gt.basis.get_axis((i + 1) % 3).normalized();
Vector3 ivec3 = gt.basis.get_axis((i + 2) % 3).normalized();
@@ -972,10 +953,8 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
Plane plane(gt.origin, gt.basis.get_axis(i).normalized());
if (plane.intersects_ray(ray_pos, ray, &r)) {
-
float dist = r.distance_to(grabber_pos);
if (dist < (gs * GIZMO_PLANE_SIZE)) {
-
float d = ray_pos.distance_to(r);
if (d < col_d) {
col_d = d;
@@ -989,9 +968,7 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
}
if (col_axis != -1) {
-
if (p_highlight_only) {
-
spatial_editor->select_gizmo_highlight_axis(col_axis + (is_plane_scale ? 12 : 9));
} else {
@@ -1004,37 +981,36 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high
}
}
- if (p_highlight_only)
+ if (p_highlight_only) {
spatial_editor->select_gizmo_highlight_axis(-1);
+ }
return false;
}
void Node3DEditorViewport::_surface_mouse_enter() {
-
- if (!surface->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
+ if (!surface->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field())) {
surface->grab_focus();
+ }
}
void Node3DEditorViewport::_surface_mouse_exit() {
-
_remove_preview();
}
void Node3DEditorViewport::_surface_focus_enter() {
-
view_menu->set_disable_shortcuts(false);
}
void Node3DEditorViewport::_surface_focus_exit() {
-
view_menu->set_disable_shortcuts(true);
}
+
bool Node3DEditorViewport ::_is_node_locked(const Node *p_node) {
return p_node->has_meta("_edit_lock_") && p_node->get_meta("_edit_lock_");
}
-void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
+void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
_find_items_at_pos(b->get_position(), clicked_includes_current, selection_results, b->get_shift());
Node *scene = editor->get_edited_scene();
@@ -1051,7 +1027,6 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
clicked_wants_append = b->get_shift();
if (selection_results.size() == 1) {
-
clicked = selection_results[0].item->get_instance_id();
selection_results.clear();
@@ -1061,12 +1036,10 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
}
} else if (!selection_results.empty()) {
-
NodePath root_path = get_tree()->get_edited_scene_root()->get_path();
StringName root_name = root_path.get_name(root_path.get_name_count() - 1);
for (int i = 0; i < selection_results.size(); i++) {
-
Node3D *spat = selection_results[i].item;
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(spat, "Node");
@@ -1107,17 +1080,18 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
}
void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
-
- if (previewing)
+ if (previewing) {
return; //do NONE
+ }
{
EditorNode *en = editor;
EditorPluginList *force_input_forwarding_list = en->get_editor_plugins_force_input_forwarding();
if (!force_input_forwarding_list->empty()) {
bool discard = force_input_forwarding_list->forward_spatial_gui_input(camera, p_event, true);
- if (discard)
+ if (discard) {
return;
+ }
}
}
{
@@ -1125,8 +1099,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
if (!over_plugin_list->empty()) {
bool discard = over_plugin_list->forward_spatial_gui_input(camera, p_event, false);
- if (discard)
+ if (discard) {
return;
+ }
}
}
@@ -1137,23 +1112,23 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
float zoom_factor = 1 + (ZOOM_MULTIPLIER - 1) * b->get_factor();
switch (b->get_button_index()) {
-
case BUTTON_WHEEL_UP: {
- if (is_freelook_active())
+ if (is_freelook_active()) {
scale_freelook_speed(zoom_factor);
- else
+ } else {
scale_cursor_distance(1.0 / zoom_factor);
+ }
} break;
case BUTTON_WHEEL_DOWN: {
- if (is_freelook_active())
+ if (is_freelook_active()) {
scale_freelook_speed(1.0 / zoom_factor);
- else
+ } else {
scale_cursor_distance(zoom_factor);
+ }
} break;
case BUTTON_RIGHT: {
-
NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
if (b->is_pressed() && _edit.gizmo.is_valid()) {
@@ -1163,11 +1138,10 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (_edit.mode == TRANSFORM_NONE && b->is_pressed()) {
-
if (b->get_alt()) {
-
- if (nav_scheme == NAVIGATION_MAYA)
+ if (nav_scheme == NAVIGATION_MAYA) {
break;
+ }
_list_select(b);
return;
@@ -1181,14 +1155,15 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
sp->set_global_transform(se->original);
}
@@ -1215,32 +1190,25 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} break;
case BUTTON_MIDDLE: {
-
if (b->is_pressed() && _edit.mode != TRANSFORM_NONE) {
-
switch (_edit.plane) {
-
case TRANSFORM_VIEW: {
-
_edit.plane = TRANSFORM_X_AXIS;
set_message(TTR("X-Axis Transform."), 2);
name = "";
_update_name();
} break;
case TRANSFORM_X_AXIS: {
-
_edit.plane = TRANSFORM_Y_AXIS;
set_message(TTR("Y-Axis Transform."), 2);
} break;
case TRANSFORM_Y_AXIS: {
-
_edit.plane = TRANSFORM_Z_AXIS;
set_message(TTR("Z-Axis Transform."), 2);
} break;
case TRANSFORM_Z_AXIS: {
-
_edit.plane = TRANSFORM_VIEW;
set_message(TTR("View Plane Transform."), 2);
@@ -1253,9 +1221,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
} break;
case BUTTON_LEFT: {
-
if (b->is_pressed()) {
-
NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
if ((nav_scheme == NAVIGATION_MAYA || nav_scheme == NAVIGATION_MODO) && b->get_alt()) {
break;
@@ -1280,7 +1246,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (can_select_gizmos && spatial_editor->get_selected()) {
-
Ref<EditorNode3DGizmo> seg = spatial_editor->get_selected()->get_gizmo();
if (seg.is_valid()) {
int handle = -1;
@@ -1288,7 +1253,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Vector3 normal;
bool inters = seg->intersect_ray(camera, _edit.mouse_pos, point, normal, &handle, b->get_shift());
if (inters && handle != -1) {
-
_edit.gizmo = seg;
_edit.gizmo_handle = handle;
_edit.gizmo_initial_value = seg->get_handle_value(handle);
@@ -1297,17 +1261,18 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
}
- if (_gizmo_select(_edit.mouse_pos))
+ if (_gizmo_select(_edit.mouse_pos)) {
break;
+ }
clicked = ObjectID();
clicked_includes_current = false;
if ((spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT && b->get_control()) || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_ROTATE) {
-
/* HANDLE ROTATION */
- if (get_selected_count() == 0)
+ if (get_selected_count() == 0) {
break; //bye
+ }
//handle rotate
_edit.mode = TRANSFORM_ROTATE;
_compute_edit(b->get_position());
@@ -1315,9 +1280,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE) {
-
- if (get_selected_count() == 0)
+ if (get_selected_count() == 0) {
break; //bye
+ }
//handle translate
_edit.mode = TRANSFORM_TRANSLATE;
_compute_edit(b->get_position());
@@ -1325,9 +1290,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SCALE) {
-
- if (get_selected_count() == 0)
+ if (get_selected_count() == 0) {
break; //bye
+ }
//handle scale
_edit.mode = TRANSFORM_SCALE;
_compute_edit(b->get_position());
@@ -1345,9 +1310,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
clicked_wants_append = b->get_shift();
if (clicked.is_null()) {
-
- if (!clicked_wants_append)
+ if (!clicked_wants_append) {
_clear_selected();
+ }
//default to regionselect
cursor.region_select = true;
@@ -1356,13 +1321,10 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (clicked.is_valid() && gizmo_handle >= 0) {
-
Node3D *spa = Object::cast_to<Node3D>(ObjectDB::get_instance(clicked));
if (spa) {
-
Ref<EditorNode3DGizmo> seg = spa->get_gizmo();
if (seg.is_valid()) {
-
_edit.gizmo = seg;
_edit.gizmo_handle = gizmo_handle;
_edit.gizmo_initial_value = seg->get_handle_value(gizmo_handle);
@@ -1373,9 +1335,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
surface->update();
} else {
-
if (_edit.gizmo.is_valid()) {
-
_edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_initial_value, false);
_edit.gizmo = Ref<EditorNode3DGizmo>();
break;
@@ -1387,9 +1347,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (cursor.region_select) {
-
- if (!clicked_wants_append)
+ if (!clicked_wants_append) {
_clear_selected();
+ }
_select_region();
cursor.region_select = false;
@@ -1397,21 +1357,21 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (_edit.mode != TRANSFORM_NONE) {
-
static const char *_transform_name[4] = { "None", "Rotate", "Translate", "Scale" };
undo_redo->create_action(_transform_name[_edit.mode]);
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
undo_redo->add_do_method(sp, "set_global_transform", sp->get_global_gizmo_transform());
undo_redo->add_undo_method(sp, "set_global_transform", se->original);
@@ -1431,14 +1391,11 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> m = p_event;
if (m.is_valid()) {
-
_edit.mouse_pos = m->get_position();
if (spatial_editor->get_selected()) {
-
Ref<EditorNode3DGizmo> seg = spatial_editor->get_selected()->get_gizmo();
if (seg.is_valid()) {
-
int selected_handle = -1;
int handle = -1;
@@ -1446,21 +1403,20 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Vector3 normal;
bool inters = seg->intersect_ray(camera, _edit.mouse_pos, point, normal, &handle, false);
if (inters && handle != -1) {
-
selected_handle = handle;
}
if (selected_handle != spatial_editor->get_over_gizmo_handle()) {
spatial_editor->set_over_gizmo_handle(selected_handle);
spatial_editor->get_selected()->update_gizmo();
- if (selected_handle != -1)
+ if (selected_handle != -1) {
spatial_editor->select_gizmo_highlight_axis(-1);
+ }
}
}
}
if (spatial_editor->get_over_gizmo_handle() == -1 && !(m->get_button_mask() & 1) && !_edit.gizmo.is_valid()) {
-
_gizmo_select(_edit.mouse_pos, true);
}
@@ -1468,14 +1424,12 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
NavigationMode nav_mode = NAVIGATION_NONE;
if (_edit.gizmo.is_valid()) {
-
_edit.gizmo->set_handle(_edit.gizmo_handle, camera, m->get_position());
Variant v = _edit.gizmo->get_handle_value(_edit.gizmo_handle);
String n = _edit.gizmo->get_handle_name(_edit.gizmo_handle);
set_message(n + ": " + String(v));
} else if (m->get_button_mask() & BUTTON_MASK_LEFT) {
-
if (nav_scheme == NAVIGATION_MAYA && m->get_alt()) {
nav_mode = NAVIGATION_ORBIT;
} else if (nav_scheme == NAVIGATION_MODO && m->get_alt() && m->get_shift()) {
@@ -1486,9 +1440,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
nav_mode = NAVIGATION_ORBIT;
} else {
if (clicked.is_valid()) {
-
if (!clicked_includes_current) {
-
_select_clicked(clicked_wants_append, true);
// Processing was deferred.
}
@@ -1505,8 +1457,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
return;
}
- if (_edit.mode == TRANSFORM_NONE)
+ if (_edit.mode == TRANSFORM_NONE) {
return;
+ }
Vector3 ray_pos = _get_ray_pos(m->get_position());
Vector3 ray = _get_ray(m->get_position());
@@ -1514,9 +1467,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
int snap_step_decimals = Math::range_step_decimals(snap);
switch (_edit.mode) {
-
case TRANSFORM_SCALE: {
-
Vector3 motion_mask;
Plane plane;
bool plane_mv = false;
@@ -1556,22 +1507,21 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
Vector3 intersection;
- if (!plane.intersects_ray(ray_pos, ray, &intersection))
+ if (!plane.intersects_ray(ray_pos, ray, &intersection)) {
break;
+ }
Vector3 click;
- if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click)) {
break;
+ }
Vector3 motion = intersection - click;
if (_edit.plane != TRANSFORM_VIEW) {
-
if (!plane_mv) {
-
motion = motion_mask.dot(motion) * motion_mask;
} else {
-
// Alternative planar scaling mode
if (_get_key_modifier(m) != KEY_SHIFT) {
motion = motion_mask.dot(motion) * motion_mask;
@@ -1581,8 +1531,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} else {
float center_click_dist = click.distance_to(_edit.center);
float center_inters_dist = intersection.distance_to(_edit.center);
- if (center_click_dist == 0)
+ if (center_click_dist == 0) {
break;
+ }
float scale = center_inters_dist - center_click_dist;
motion = Vector3(scale, scale, scale);
@@ -1603,7 +1554,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")");
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
if (!sp) {
continue;
@@ -1625,7 +1575,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Vector3 local_scale;
if (local_coords) {
-
Basis g = original.basis.orthonormalized();
Vector3 local_motion = g.inverse().xform(motion);
@@ -1639,13 +1588,11 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Basis check = original_local.basis;
check.scale(local_scale);
if (check.determinant() != 0) {
-
// Apply scale
sp->set_scale(local_scale);
}
} else {
-
if (_edit.snap || spatial_editor->is_snap_enabled()) {
motion.snap(Vector3(snap, snap, snap));
}
@@ -1664,7 +1611,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} break;
case TRANSFORM_TRANSLATE: {
-
Vector3 motion_mask;
Plane plane;
bool plane_mv = false;
@@ -1700,12 +1646,14 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
Vector3 intersection;
- if (!plane.intersects_ray(ray_pos, ray, &intersection))
+ if (!plane.intersects_ray(ray_pos, ray, &intersection)) {
break;
+ }
Vector3 click;
- if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click)) {
break;
+ }
Vector3 motion = intersection - click;
if (_edit.plane != TRANSFORM_VIEW) {
@@ -1728,7 +1676,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")");
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
if (!sp) {
continue;
@@ -1747,7 +1694,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Transform t;
if (local_coords) {
-
if (_edit.snap || spatial_editor->is_snap_enabled()) {
Basis g = original.basis.orthonormalized();
Vector3 local_motion = g.inverse().xform(motion);
@@ -1757,7 +1703,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
} else {
-
if (_edit.snap || spatial_editor->is_snap_enabled()) {
motion.snap(Vector3(snap, snap, snap));
}
@@ -1774,7 +1719,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} break;
case TRANSFORM_ROTATE: {
-
Plane plane;
Vector3 axis;
@@ -1801,12 +1745,14 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
Vector3 intersection;
- if (!plane.intersects_ray(ray_pos, ray, &intersection))
+ if (!plane.intersects_ray(ray_pos, ray, &intersection)) {
break;
+ }
Vector3 click;
- if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click)) {
break;
+ }
Vector3 y_axis = (click - _edit.center).normalized();
Vector3 x_axis = plane.normal.cross(y_axis).normalized();
@@ -1826,14 +1772,15 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
bool local_coords = (spatial_editor->are_local_coords_enabled() && _edit.plane != TRANSFORM_VIEW); // Disable local transformation for TRANSFORM_VIEW
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
if (sp->has_meta("_edit_lock_")) {
continue;
@@ -1842,7 +1789,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Transform t;
if (local_coords) {
-
Transform original_local = se->original_local;
Basis rot = Basis(axis, angle);
@@ -1854,7 +1800,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
sp->set_scale(original_local.basis.get_scale()); // re-apply original scale
} else {
-
Transform original = se->original;
Transform r;
Transform base = Transform(Basis(), _edit.center);
@@ -1876,7 +1821,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
} else if ((m->get_button_mask() & BUTTON_MASK_RIGHT) || freelook_active) {
-
if (nav_scheme == NAVIGATION_MAYA && m->get_alt()) {
nav_mode = NAVIGATION_ZOOM;
} else if (freelook_active) {
@@ -1886,9 +1830,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
} else if (m->get_button_mask() & BUTTON_MASK_MIDDLE) {
-
if (nav_scheme == NAVIGATION_GODOT) {
-
const int mod = _get_key_modifier(m);
if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) {
@@ -1901,8 +1843,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
} else if (nav_scheme == NAVIGATION_MAYA) {
- if (m->get_alt())
+ if (m->get_alt()) {
nav_mode = NAVIGATION_PAN;
+ }
}
} else if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_3_button_mouse")) {
@@ -1949,21 +1892,19 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Ref<InputEventMagnifyGesture> magnify_gesture = p_event;
if (magnify_gesture.is_valid()) {
-
- if (is_freelook_active())
+ if (is_freelook_active()) {
scale_freelook_speed(magnify_gesture->get_factor());
- else
+ } else {
scale_cursor_distance(1.0 / magnify_gesture->get_factor());
+ }
}
Ref<InputEventPanGesture> pan_gesture = p_event;
if (pan_gesture.is_valid()) {
-
NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
NavigationMode nav_mode = NAVIGATION_NONE;
if (nav_scheme == NAVIGATION_GODOT) {
-
const int mod = _get_key_modifier(pan_gesture);
if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) {
@@ -1976,8 +1917,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
} else if (nav_scheme == NAVIGATION_MAYA) {
- if (pan_gesture->get_alt())
+ if (pan_gesture->get_alt()) {
nav_mode = NAVIGATION_PAN;
+ }
}
switch (nav_mode) {
@@ -2009,8 +1951,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
- if (!k->is_pressed())
+ if (!k->is_pressed()) {
return;
+ }
if (ED_IS_SHORTCUT("spatial_editor/snap", p_event)) {
if (_edit.mode != TRANSFORM_NONE) {
@@ -2053,8 +1996,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
_menu_option(VIEW_ALIGN_ROTATION_WITH_VIEW);
}
if (ED_IS_SHORTCUT("spatial_editor/insert_anim_key", p_event)) {
- if (!get_selected_count() || _edit.mode != TRANSFORM_NONE)
+ if (!get_selected_count() || _edit.mode != TRANSFORM_NONE) {
return;
+ }
if (!AnimationPlayerEditor::singleton->get_track_editor()->has_keying()) {
set_message(TTR("Keying is disabled (no key inserted)."));
@@ -2064,10 +2008,10 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
spatial_editor->emit_signal("transform_key_request", sp, "", sp->get_transform());
}
@@ -2084,25 +2028,27 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (k->get_keycode() == KEY_SPACE) {
- if (!k->is_pressed())
+ if (!k->is_pressed()) {
emit_signal("toggle_maximize_view", this);
+ }
}
}
// freelook uses most of the useful shortcuts, like save, so its ok
// to consider freelook active as end of the line for future events.
- if (freelook_active)
+ if (freelook_active) {
accept_event();
+ }
}
void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative) {
-
const NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
real_t pan_speed = 1 / 150.0;
int pan_speed_modifier = 10;
- if (nav_scheme == NAVIGATION_MAYA && p_event->get_shift())
+ if (nav_scheme == NAVIGATION_MAYA && p_event->get_shift()) {
pan_speed *= pan_speed_modifier;
+ }
Transform camera_transform;
@@ -2116,30 +2062,31 @@ void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const
}
void Node3DEditorViewport::_nav_zoom(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative) {
-
const NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
real_t zoom_speed = 1 / 80.0;
int zoom_speed_modifier = 10;
- if (nav_scheme == NAVIGATION_MAYA && p_event->get_shift())
+ if (nav_scheme == NAVIGATION_MAYA && p_event->get_shift()) {
zoom_speed *= zoom_speed_modifier;
+ }
NavigationZoomStyle zoom_style = (NavigationZoomStyle)EditorSettings::get_singleton()->get("editors/3d/navigation/zoom_style").operator int();
if (zoom_style == NAVIGATION_ZOOM_HORIZONTAL) {
- if (p_relative.x > 0)
+ if (p_relative.x > 0) {
scale_cursor_distance(1 - p_relative.x * zoom_speed);
- else if (p_relative.x < 0)
+ } else if (p_relative.x < 0) {
scale_cursor_distance(1.0 / (1 + p_relative.x * zoom_speed));
+ }
} else {
- if (p_relative.y > 0)
+ if (p_relative.y > 0) {
scale_cursor_distance(1 + p_relative.y * zoom_speed);
- else if (p_relative.y < 0)
+ } else if (p_relative.y < 0) {
scale_cursor_distance(1.0 / (1 - p_relative.y * zoom_speed));
+ }
}
}
void Node3DEditorViewport::_nav_orbit(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative) {
-
if (lock_rotation) {
_nav_pan(p_event, p_relative);
return;
@@ -2159,16 +2106,17 @@ void Node3DEditorViewport::_nav_orbit(Ref<InputEventWithModifiers> p_event, cons
cursor.x_rot += p_relative.y * radians_per_pixel;
}
cursor.y_rot += p_relative.x * radians_per_pixel;
- if (cursor.x_rot > Math_PI / 2.0)
+ if (cursor.x_rot > Math_PI / 2.0) {
cursor.x_rot = Math_PI / 2.0;
- if (cursor.x_rot < -Math_PI / 2.0)
+ }
+ if (cursor.x_rot < -Math_PI / 2.0) {
cursor.x_rot = -Math_PI / 2.0;
+ }
name = "";
_update_name();
}
void Node3DEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative) {
-
if (orthogonal) {
_nav_pan(p_event, p_relative);
return;
@@ -2191,10 +2139,12 @@ void Node3DEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, const
cursor.x_rot += p_relative.y * radians_per_pixel;
}
cursor.y_rot += p_relative.x * radians_per_pixel;
- if (cursor.x_rot > Math_PI / 2.0)
+ if (cursor.x_rot > Math_PI / 2.0) {
cursor.x_rot = Math_PI / 2.0;
- if (cursor.x_rot < -Math_PI / 2.0)
+ }
+ if (cursor.x_rot < -Math_PI / 2.0) {
cursor.x_rot = -Math_PI / 2.0;
+ }
// Look is like the opposite of Orbit: the focus point rotates around the camera
Transform camera_transform = to_camera_transform(cursor);
@@ -2208,7 +2158,6 @@ void Node3DEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, const
}
void Node3DEditorViewport::set_freelook_active(bool active_now) {
-
if (!freelook_active && active_now) {
// Sync camera cursor to cursor to "cut" interpolation jumps due to changing referential
cursor = camera_cursor;
@@ -2240,30 +2189,32 @@ void Node3DEditorViewport::set_freelook_active(bool active_now) {
}
void Node3DEditorViewport::scale_cursor_distance(real_t scale) {
-
// Prevents zero distance which would short-circuit any scaling
- if (cursor.distance < ZOOM_MIN_DISTANCE)
+ if (cursor.distance < ZOOM_MIN_DISTANCE) {
cursor.distance = ZOOM_MIN_DISTANCE;
+ }
cursor.distance *= scale;
- if (cursor.distance < ZOOM_MIN_DISTANCE)
+ if (cursor.distance < ZOOM_MIN_DISTANCE) {
cursor.distance = ZOOM_MIN_DISTANCE;
+ }
zoom_indicator_delay = ZOOM_INDICATOR_DELAY_S;
surface->update();
}
void Node3DEditorViewport::scale_freelook_speed(real_t scale) {
-
// Prevents zero distance which would short-circuit any scaling
- if (freelook_speed < FREELOOK_MIN_SPEED)
+ if (freelook_speed < FREELOOK_MIN_SPEED) {
freelook_speed = FREELOOK_MIN_SPEED;
+ }
freelook_speed *= scale;
- if (freelook_speed < FREELOOK_MIN_SPEED)
+ if (freelook_speed < FREELOOK_MIN_SPEED) {
freelook_speed = FREELOOK_MIN_SPEED;
+ }
zoom_indicator_delay = ZOOM_INDICATOR_DELAY_S;
surface->update();
@@ -2294,7 +2245,6 @@ static bool is_shortcut_pressed(const String &p_path) {
}
void Node3DEditorViewport::_update_freelook(real_t delta) {
-
if (!is_freelook_active()) {
return;
}
@@ -2357,7 +2307,6 @@ void Node3DEditorViewport::_update_freelook(real_t delta) {
}
void Node3DEditorViewport::set_message(String p_message, float p_time) {
-
message = p_message;
message_time = p_time;
}
@@ -2372,9 +2321,7 @@ void Node3DEditorPlugin::edited_scene_changed() {
}
void Node3DEditorViewport::_notification(int p_what) {
-
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
-
bool visible = is_visible_in_tree();
set_process(visible);
@@ -2391,7 +2338,6 @@ void Node3DEditorViewport::_notification(int p_what) {
}
if (p_what == NOTIFICATION_RESIZED) {
-
call_deferred("update_transform_gizmo_view");
}
@@ -2403,7 +2349,6 @@ void Node3DEditorViewport::_notification(int p_what) {
}
if (p_what == NOTIFICATION_PROCESS) {
-
real_t delta = get_process_delta_time();
if (zoom_indicator_delay > 0) {
@@ -2438,20 +2383,22 @@ void Node3DEditorViewport::_notification(int p_what) {
bool exist = false;
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->key());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
Transform t = sp->get_global_gizmo_transform();
exist = true;
- if (se->last_xform == t && !se->last_xform_dirty)
+ if (se->last_xform == t && !se->last_xform_dirty) {
continue;
+ }
changed = true;
se->last_xform_dirty = false;
se->last_xform = t;
@@ -2475,15 +2422,15 @@ void Node3DEditorViewport::_notification(int p_what) {
}
if (message_time > 0) {
-
if (message != last_message) {
surface->update();
last_message = message;
}
message_time -= get_physics_process_delta_time();
- if (message_time < 0)
+ if (message_time < 0) {
surface->update();
+ }
}
//update shadow atlas if changed
@@ -2561,7 +2508,6 @@ void Node3DEditorViewport::_notification(int p_what) {
cpu_time_history_index = 0;
}
if (show_fps) {
-
cpu_time_history[cpu_time_history_index] = RS::get_singleton()->viewport_get_measured_render_time_cpu(viewport->get_viewport_rid());
cpu_time_history_index = (cpu_time_history_index + 1) % FRAME_TIME_HISTORY;
float cpu_time = 0.0;
@@ -2600,7 +2546,6 @@ void Node3DEditorViewport::_notification(int p_what) {
}
if (p_what == NOTIFICATION_ENTER_TREE) {
-
surface->connect("draw", callable_mp(this, &Node3DEditorViewport::_draw));
surface->connect("gui_input", callable_mp(this, &Node3DEditorViewport::_sinput));
surface->connect("mouse_entered", callable_mp(this, &Node3DEditorViewport::_surface_mouse_enter));
@@ -2612,12 +2557,10 @@ void Node3DEditorViewport::_notification(int p_what) {
}
if (p_what == NOTIFICATION_EXIT_TREE) {
-
_finish_gizmo_instances();
}
if (p_what == NOTIFICATION_THEME_CHANGED) {
-
view_menu->set_icon(get_theme_icon("GuiTabMenu", "EditorIcons"));
preview_camera->set_icon(get_theme_icon("Camera3D", "EditorIcons"));
@@ -2640,15 +2583,14 @@ void Node3DEditorViewport::_notification(int p_what) {
}
}
-static void draw_indicator_bar(Control &surface, real_t fill, Ref<Texture2D> icon) {
-
+static void draw_indicator_bar(Control &surface, real_t fill, const Ref<Texture2D> icon, const Ref<Font> font, const String &text) {
// Adjust bar size from control height
- Vector2 surface_size = surface.get_size();
- real_t h = surface_size.y / 2.0;
- real_t y = (surface_size.y - h) / 2.0;
+ const Vector2 surface_size = surface.get_size();
+ const real_t h = surface_size.y / 2.0;
+ const real_t y = (surface_size.y - h) / 2.0;
- Rect2 r(10, y, 6, h);
- real_t sy = r.size.y * fill;
+ const Rect2 r(10 * EDSCALE, y, 6 * EDSCALE, h);
+ const real_t sy = r.size.y * fill;
// Note: because this bar appears over the viewport, it has to stay readable for any background color
// Draw both neutral dark and bright colors to account this
@@ -2656,13 +2598,15 @@ static void draw_indicator_bar(Control &surface, real_t fill, Ref<Texture2D> ico
surface.draw_rect(Rect2(r.position.x, r.position.y + r.size.y - sy, r.size.x, sy), Color(1, 1, 1, 0.6));
surface.draw_rect(r.grow(1), Color(0, 0, 0, 0.7), false, Math::round(EDSCALE));
- Vector2 icon_size = icon->get_size();
- Vector2 icon_pos = Vector2(r.position.x - (icon_size.x - r.size.x) / 2, r.position.y + r.size.y + 2);
+ const Vector2 icon_size = icon->get_size();
+ const Vector2 icon_pos = Vector2(r.position.x - (icon_size.x - r.size.x) / 2, r.position.y + r.size.y + 2 * EDSCALE);
surface.draw_texture(icon, icon_pos);
+
+ // Draw text below the bar (for speed/zoom information).
+ surface.draw_string(font, Vector2(icon_pos.x, icon_pos.y + icon_size.y + 16 * EDSCALE), text);
}
void Node3DEditorViewport::_draw() {
-
EditorPluginList *over_plugin_list = EditorNode::get_singleton()->get_editor_plugins_over();
if (!over_plugin_list->empty()) {
over_plugin_list->forward_spatial_draw_over_viewport(surface);
@@ -2704,7 +2648,6 @@ void Node3DEditorViewport::_draw() {
}
if (_edit.mode == TRANSFORM_ROTATE) {
-
Point2 center = _point_to_screen(_edit.center);
RenderingServer::get_singleton()->canvas_item_add_line(
ci,
@@ -2714,7 +2657,6 @@ void Node3DEditorViewport::_draw() {
Math::round(2 * EDSCALE));
}
if (previewing) {
-
Size2 ss = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
float aspect = ss.aspect();
Size2 s = get_size();
@@ -2723,14 +2665,12 @@ void Node3DEditorViewport::_draw() {
switch (previewing->get_keep_aspect_mode()) {
case Camera3D::KEEP_WIDTH: {
-
draw_rect.size = Size2(s.width, s.width / aspect);
draw_rect.position.x = 0;
draw_rect.position.y = (s.height - draw_rect.size.y) * 0.5;
} break;
case Camera3D::KEEP_HEIGHT: {
-
draw_rect.size = Size2(s.height * aspect, s.height);
draw_rect.position.y = 0;
draw_rect.position.x = (s.width - draw_rect.size.x) * 0.5;
@@ -2743,9 +2683,7 @@ void Node3DEditorViewport::_draw() {
surface->draw_rect(draw_rect, Color(0.6, 0.6, 0.1, 0.5), false, Math::round(2 * EDSCALE));
} else {
-
if (zoom_indicator_delay > 0.0) {
-
if (is_freelook_active()) {
// Show speed
@@ -2758,10 +2696,18 @@ void Node3DEditorViewport::_draw() {
// There is no real maximum speed so that factor can become negative,
// Let's make it look asymptotic instead (will decrease slower and slower).
- if (logscale_t < 0.25)
+ if (logscale_t < 0.25) {
logscale_t = 0.25 * Math::exp(4.0 * logscale_t - 1.0);
+ }
- draw_indicator_bar(*surface, 1.0 - logscale_t, get_theme_icon("ViewportSpeed", "EditorIcons"));
+ // Display the freelook speed to help the user get a better sense of scale.
+ const int precision = freelook_speed < 1.0 ? 2 : 1;
+ draw_indicator_bar(
+ *surface,
+ 1.0 - logscale_t,
+ get_theme_icon("ViewportSpeed", "EditorIcons"),
+ get_theme_font("font", "Label"),
+ vformat("%s u/s", String::num(freelook_speed).pad_decimals(precision)));
}
} else {
@@ -2776,10 +2722,18 @@ void Node3DEditorViewport::_draw() {
// There is no real maximum distance so that factor can become negative,
// Let's make it look asymptotic instead (will decrease slower and slower).
- if (logscale_t < 0.25)
+ if (logscale_t < 0.25) {
logscale_t = 0.25 * Math::exp(4.0 * logscale_t - 1.0);
+ }
- draw_indicator_bar(*surface, logscale_t, get_theme_icon("ViewportZoom", "EditorIcons"));
+ // Display the zoom center distance to help the user get a better sense of scale.
+ const int precision = cursor.distance < 1.0 ? 2 : 1;
+ draw_indicator_bar(
+ *surface,
+ logscale_t,
+ get_theme_icon("ViewportZoom", "EditorIcons"),
+ get_theme_font("font", "Label"),
+ vformat("%s u", String::num(cursor.distance).pad_decimals(precision)));
}
}
}
@@ -2787,11 +2741,8 @@ void Node3DEditorViewport::_draw() {
}
void Node3DEditorViewport::_menu_option(int p_option) {
-
switch (p_option) {
-
case VIEW_TOP: {
-
cursor.y_rot = 0;
cursor.x_rot = Math_PI / 2.0;
set_message(TTR("Top View."), 2);
@@ -2801,7 +2752,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_BOTTOM: {
-
cursor.y_rot = 0;
cursor.x_rot = -Math_PI / 2.0;
set_message(TTR("Bottom View."), 2);
@@ -2811,7 +2761,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_LEFT: {
-
cursor.x_rot = 0;
cursor.y_rot = Math_PI / 2.0;
set_message(TTR("Left View."), 2);
@@ -2821,7 +2770,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_RIGHT: {
-
cursor.x_rot = 0;
cursor.y_rot = -Math_PI / 2.0;
set_message(TTR("Right View."), 2);
@@ -2831,7 +2779,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_FRONT: {
-
cursor.x_rot = 0;
cursor.y_rot = 0;
set_message(TTR("Front View."), 2);
@@ -2841,7 +2788,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_REAR: {
-
cursor.x_rot = 0;
cursor.y_rot = Math_PI;
set_message(TTR("Rear View."), 2);
@@ -2851,19 +2797,17 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_CENTER_TO_ORIGIN: {
-
cursor.pos = Vector3(0, 0, 0);
} break;
case VIEW_CENTER_TO_SELECTION: {
-
focus_selection();
} break;
case VIEW_ALIGN_TRANSFORM_WITH_VIEW: {
-
- if (!get_selected_count())
+ if (!get_selected_count()) {
break;
+ }
Transform camera_transform = camera->get_global_transform();
@@ -2872,14 +2816,15 @@ void Node3DEditorViewport::_menu_option(int p_option) {
undo_redo->create_action(TTR("Align Transform with View"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
Transform xform;
if (orthogonal) {
@@ -2897,9 +2842,9 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_ALIGN_ROTATION_WITH_VIEW: {
-
- if (!get_selected_count())
+ if (!get_selected_count()) {
break;
+ }
Transform camera_transform = camera->get_global_transform();
@@ -2907,14 +2852,15 @@ void Node3DEditorViewport::_menu_option(int p_option) {
undo_redo->create_action(TTR("Align Rotation with View"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
undo_redo->add_do_method(sp, "set_rotation", camera_transform.basis.get_rotation());
undo_redo->add_undo_method(sp, "set_rotation", sp->get_rotation());
@@ -2923,15 +2869,12 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_ENVIRONMENT: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_ENVIRONMENT);
bool current = view_menu->get_popup()->is_item_checked(idx);
current = !current;
if (current) {
-
camera->set_environment(RES());
} else {
-
camera->set_environment(Node3DEditor::get_singleton()->get_viewport_environment());
}
@@ -2939,7 +2882,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_PERSPECTIVE: {
-
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE), true);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_ORTHOGONAL), false);
orthogonal = false;
@@ -2949,7 +2891,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_ORTHOGONAL: {
-
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE), false);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_ORTHOGONAL), true);
orthogonal = true;
@@ -2959,7 +2900,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_AUTO_ORTHOGONAL: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL);
bool current = view_menu->get_popup()->is_item_checked(idx);
current = !current;
@@ -2970,7 +2910,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
}
} break;
case VIEW_LOCK_ROTATION: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_LOCK_ROTATION);
bool current = view_menu->get_popup()->is_item_checked(idx);
lock_rotation = !current;
@@ -2983,7 +2922,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_AUDIO_LISTENER: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_AUDIO_LISTENER);
bool current = view_menu->get_popup()->is_item_checked(idx);
current = !current;
@@ -2992,7 +2930,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_AUDIO_DOPPLER: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_AUDIO_DOPPLER);
bool current = view_menu->get_popup()->is_item_checked(idx);
current = !current;
@@ -3001,7 +2938,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_CINEMATIC_PREVIEW: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_CINEMATIC_PREVIEW);
bool current = view_menu->get_popup()->is_item_checked(idx);
current = !current;
@@ -3012,38 +2948,36 @@ void Node3DEditorViewport::_menu_option(int p_option) {
if (current) {
preview_camera->hide();
} else {
- if (previewing != nullptr)
+ if (previewing != nullptr) {
preview_camera->show();
+ }
}
} break;
case VIEW_GIZMOS: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_GIZMOS);
bool current = view_menu->get_popup()->is_item_checked(idx);
current = !current;
- if (current)
+ if (current) {
camera->set_cull_mask(((1 << 20) - 1) | (1 << (GIZMO_BASE_LAYER + index)) | (1 << GIZMO_EDIT_LAYER) | (1 << GIZMO_GRID_LAYER));
- else
+ } else {
camera->set_cull_mask(((1 << 20) - 1) | (1 << (GIZMO_BASE_LAYER + index)) | (1 << GIZMO_GRID_LAYER));
+ }
view_menu->get_popup()->set_item_checked(idx, current);
} break;
case VIEW_HALF_RESOLUTION: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_HALF_RESOLUTION);
bool current = view_menu->get_popup()->is_item_checked(idx);
current = !current;
view_menu->get_popup()->set_item_checked(idx, current);
} break;
case VIEW_INFORMATION: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_INFORMATION);
bool current = view_menu->get_popup()->is_item_checked(idx);
view_menu->get_popup()->set_item_checked(idx, !current);
} break;
case VIEW_FRAME_TIME: {
-
int idx = view_menu->get_popup()->get_item_index(VIEW_FRAME_TIME);
bool current = view_menu->get_popup()->is_item_checked(idx);
view_menu->get_popup()->set_item_checked(idx, !current);
@@ -3065,7 +2999,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
case VIEW_DISPLAY_DEBUG_PSSM_SPLITS:
case VIEW_DISPLAY_DEBUG_DECAL_ATLAS:
case VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER: {
-
static const int display_options[] = {
VIEW_DISPLAY_NORMAL,
VIEW_DISPLAY_WIREFRAME,
@@ -3109,7 +3042,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
int idx = 0;
while (display_options[idx] != VIEW_MAX) {
-
int id = display_options[idx];
int item_idx = view_menu->get_popup()->get_item_index(id);
if (item_idx != -1) {
@@ -3137,7 +3069,6 @@ void Node3DEditorViewport::_set_auto_orthogonal() {
}
void Node3DEditorViewport::_preview_exited_scene() {
-
preview_camera->disconnect("toggled", callable_mp(this, &Node3DEditorViewport::_toggle_camera_preview));
preview_camera->set_pressed(false);
_toggle_camera_preview(false);
@@ -3146,7 +3077,6 @@ void Node3DEditorViewport::_preview_exited_scene() {
}
void Node3DEditorViewport::_init_gizmo_instance(int p_idx) {
-
uint32_t layer = 1 << (GIZMO_BASE_LAYER + p_idx);
for (int i = 0; i < 3; i++) {
@@ -3188,7 +3118,6 @@ void Node3DEditorViewport::_init_gizmo_instance(int p_idx) {
}
void Node3DEditorViewport::_finish_gizmo_instances() {
-
for (int i = 0; i < 3; i++) {
RS::get_singleton()->free(move_gizmo_instance[i]);
RS::get_singleton()->free(move_plane_gizmo_instance[i]);
@@ -3197,25 +3126,24 @@ void Node3DEditorViewport::_finish_gizmo_instances() {
RS::get_singleton()->free(scale_plane_gizmo_instance[i]);
}
}
-void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
+void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
ERR_FAIL_COND(p_activate && !preview);
ERR_FAIL_COND(!p_activate && !previewing);
rotation_control->set_visible(!p_activate);
if (!p_activate) {
-
previewing->disconnect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
previewing = nullptr;
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore
- if (!preview)
+ if (!preview) {
preview_camera->hide();
+ }
view_menu->set_disabled(false);
surface->update();
} else {
-
previewing = preview;
previewing->connect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace
@@ -3227,8 +3155,9 @@ void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
void Node3DEditorViewport::_toggle_cinema_preview(bool p_activate) {
previewing_cinema = p_activate;
if (!previewing_cinema) {
- if (previewing != nullptr)
+ if (previewing != nullptr) {
previewing->disconnect("tree_exited", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
+ }
previewing = nullptr;
RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore
@@ -3244,9 +3173,9 @@ void Node3DEditorViewport::_toggle_cinema_preview(bool p_activate) {
}
void Node3DEditorViewport::_selection_result_pressed(int p_result) {
-
- if (selection_results.size() <= p_result)
+ if (selection_results.size() <= p_result) {
return;
+ }
clicked = selection_results[p_result].item->get_instance_id();
@@ -3257,24 +3186,23 @@ void Node3DEditorViewport::_selection_result_pressed(int p_result) {
}
void Node3DEditorViewport::_selection_menu_hide() {
-
selection_results.clear();
selection_menu->clear();
selection_menu->set_size(Vector2(0, 0));
}
void Node3DEditorViewport::set_can_preview(Camera3D *p_preview) {
-
preview = p_preview;
- if (!preview_camera->is_pressed() && !previewing_cinema)
+ if (!preview_camera->is_pressed() && !previewing_cinema) {
preview_camera->set_visible(p_preview);
+ }
}
void Node3DEditorViewport::update_transform_gizmo_view() {
-
- if (!is_visible_in_tree())
+ if (!is_visible_in_tree()) {
return;
+ }
Transform xform = spatial_editor->get_gizmo_transform();
@@ -3298,8 +3226,9 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
float d0 = camera->unproject_position(camera_xform.origin + camz * gizmo_d).y;
float d1 = camera->unproject_position(camera_xform.origin + camz * gizmo_d + camy).y;
float dd = Math::abs(d0 - d1);
- if (dd == 0)
+ if (dd == 0) {
dd = 0.0001;
+ }
float gizmo_size = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_size");
// At low viewport heights, multiply the gizmo scale based on the viewport height.
@@ -3328,23 +3257,27 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
}
void Node3DEditorViewport::set_state(const Dictionary &p_state) {
-
- if (p_state.has("position"))
+ if (p_state.has("position")) {
cursor.pos = p_state["position"];
- if (p_state.has("x_rotation"))
+ }
+ if (p_state.has("x_rotation")) {
cursor.x_rot = p_state["x_rotation"];
- if (p_state.has("y_rotation"))
+ }
+ if (p_state.has("y_rotation")) {
cursor.y_rot = p_state["y_rotation"];
- if (p_state.has("distance"))
+ }
+ if (p_state.has("distance")) {
cursor.distance = p_state["distance"];
+ }
if (p_state.has("use_orthogonal")) {
bool orth = p_state["use_orthogonal"];
- if (orth)
+ if (orth) {
_menu_option(VIEW_ORTHOGONAL);
- else
+ } else {
_menu_option(VIEW_PERSPECTIVE);
+ }
}
if (p_state.has("view_name")) {
name = p_state["view_name"];
@@ -3362,8 +3295,9 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) {
int display = p_state["display_mode"];
int idx = view_menu->get_popup()->get_item_index(display);
- if (!view_menu->get_popup()->is_item_checked(idx))
+ if (!view_menu->get_popup()->is_item_checked(idx)) {
_menu_option(display);
+ }
}
if (p_state.has("lock_rotation")) {
lock_rotation = p_state["lock_rotation"];
@@ -3374,8 +3308,9 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) {
if (p_state.has("use_environment")) {
bool env = p_state["use_environment"];
- if (env != camera->get_environment().is_valid())
+ if (env != camera->get_environment().is_valid()) {
_menu_option(VIEW_ENVIRONMENT);
+ }
}
if (p_state.has("listener")) {
bool listener = p_state["listener"];
@@ -3395,22 +3330,25 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) {
bool gizmos = p_state["gizmos"];
int idx = view_menu->get_popup()->get_item_index(VIEW_GIZMOS);
- if (view_menu->get_popup()->is_item_checked(idx) != gizmos)
+ if (view_menu->get_popup()->is_item_checked(idx) != gizmos) {
_menu_option(VIEW_GIZMOS);
+ }
}
if (p_state.has("information")) {
bool information = p_state["information"];
int idx = view_menu->get_popup()->get_item_index(VIEW_INFORMATION);
- if (view_menu->get_popup()->is_item_checked(idx) != information)
+ if (view_menu->get_popup()->is_item_checked(idx) != information) {
_menu_option(VIEW_INFORMATION);
+ }
}
if (p_state.has("frame_time")) {
bool fps = p_state["frame_time"];
int idx = view_menu->get_popup()->get_item_index(VIEW_FRAME_TIME);
- if (view_menu->get_popup()->is_item_checked(idx) != fps)
+ if (view_menu->get_popup()->is_item_checked(idx) != fps) {
_menu_option(VIEW_FRAME_TIME);
+ }
}
if (p_state.has("half_res")) {
bool half_res = p_state["half_res"];
@@ -3444,7 +3382,6 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) {
}
Dictionary Node3DEditorViewport::get_state() const {
-
Dictionary d;
d["position"] = cursor.pos;
d["x_rotation"] = cursor.x_rot;
@@ -3455,14 +3392,15 @@ Dictionary Node3DEditorViewport::get_state() const {
d["view_name"] = name;
d["auto_orthogonal"] = auto_orthogonal;
d["auto_orthogonal_enabled"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL));
- if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_NORMAL)))
+ if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_NORMAL))) {
d["display_mode"] = VIEW_DISPLAY_NORMAL;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_WIREFRAME)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_WIREFRAME))) {
d["display_mode"] = VIEW_DISPLAY_WIREFRAME;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_OVERDRAW)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_OVERDRAW))) {
d["display_mode"] = VIEW_DISPLAY_OVERDRAW;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_SHADELESS)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_SHADELESS))) {
d["display_mode"] = VIEW_DISPLAY_SHADELESS;
+ }
d["listener"] = viewport->is_audio_listener();
d["doppler"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUDIO_DOPPLER));
d["gizmos"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_GIZMOS));
@@ -3470,16 +3408,17 @@ Dictionary Node3DEditorViewport::get_state() const {
d["frame_time"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_FRAME_TIME));
d["half_res"] = subviewport_container->get_stretch_shrink() > 1;
d["cinematic_preview"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_CINEMATIC_PREVIEW));
- if (previewing)
+ if (previewing) {
d["previewing"] = EditorNode::get_singleton()->get_edited_scene()->get_path_to(previewing);
- if (lock_rotation)
+ }
+ if (lock_rotation) {
d["lock_rotation"] = lock_rotation;
+ }
return d;
}
void Node3DEditorViewport::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("update_transform_gizmo_view"), &Node3DEditorViewport::update_transform_gizmo_view); // Used by call_deferred.
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &Node3DEditorViewport::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &Node3DEditorViewport::drop_data_fw);
@@ -3489,7 +3428,6 @@ void Node3DEditorViewport::_bind_methods() {
}
void Node3DEditorViewport::reset() {
-
orthogonal = false;
auto_orthogonal = false;
lock_rotation = false;
@@ -3498,17 +3436,14 @@ void Node3DEditorViewport::reset() {
last_message = "";
name = "";
- cursor.x_rot = 0.5;
- cursor.y_rot = 0.5;
- cursor.distance = 4;
- cursor.region_select = false;
- cursor.pos = Vector3();
+ cursor = Cursor();
_update_name();
}
void Node3DEditorViewport::focus_selection() {
- if (!get_selected_count())
+ if (!get_selected_count()) {
return;
+ }
Vector3 center;
int count = 0;
@@ -3516,14 +3451,15 @@ void Node3DEditorViewport::focus_selection() {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
center += sp->get_global_gizmo_transform().origin;
count++;
@@ -3557,11 +3493,11 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const
Vector3 normal = Vector3(0.0, 0.0, 0.0);
for (int i = 0; i < instances.size(); i++) {
-
MeshInstance3D *mesh_instance = Object::cast_to<MeshInstance3D>(ObjectDB::get_instance(instances[i]));
- if (!mesh_instance)
+ if (!mesh_instance) {
continue;
+ }
Ref<EditorNode3DGizmo> seg = mesh_instance->get_gizmo();
@@ -3575,13 +3511,15 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const
Vector3 hit_normal;
bool inters = seg->intersect_ray(camera, p_pos, hit_point, hit_normal, nullptr, false);
- if (!inters)
+ if (!inters) {
continue;
+ }
float dist = world_pos.distance_to(hit_point);
- if (dist < 0)
+ if (dist < 0) {
continue;
+ }
if (dist < closest_dist) {
closest_dist = dist;
@@ -3591,10 +3529,11 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const
}
Vector3 offset = Vector3();
for (int i = 0; i < 3; i++) {
- if (normal[i] > 0.0)
+ if (normal[i] > 0.0) {
offset[i] = (preview_bounds->get_size()[i] - (preview_bounds->get_size()[i] + preview_bounds->get_position()[i]));
- else if (normal[i] < 0.0)
+ } else if (normal[i] < 0.0) {
offset[i] = -(preview_bounds->get_size()[i] + preview_bounds->get_position()[i]);
+ }
}
return point + offset;
}
@@ -3732,14 +3671,19 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name);
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
- Transform global_transform;
- Node3D *parent_spatial = Object::cast_to<Node3D>(parent);
- if (parent_spatial)
- global_transform = parent_spatial->get_global_gizmo_transform();
+ Node3D *node3d = Object::cast_to<Node3D>(instanced_scene);
+ if (node3d) {
+ Transform global_transform;
+ Node3D *parent_node3d = Object::cast_to<Node3D>(parent);
+ if (parent_node3d) {
+ global_transform = parent_node3d->get_global_gizmo_transform();
+ }
- global_transform.origin = spatial_editor->snap_point(_get_instance_position(p_point));
+ global_transform.origin = spatial_editor->snap_point(_get_instance_position(p_point));
+ global_transform.basis *= node3d->get_transform().basis;
- editor_data->get_undo_redo().add_do_method(instanced_scene, "set_global_transform", global_transform);
+ editor_data->get_undo_redo().add_do_method(instanced_scene, "set_global_transform", global_transform);
+ }
return true;
}
@@ -3781,7 +3725,6 @@ void Node3DEditorViewport::_perform_drop_data() {
}
bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
bool can_instance = false;
if (!preview_node->is_inside_tree()) {
@@ -3838,8 +3781,9 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
}
void Node3DEditorViewport::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
- if (!can_drop_data_fw(p_point, p_data, p_from))
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
bool is_shift = Input::get_singleton()->is_key_pressed(KEY_SHIFT);
@@ -3878,14 +3822,13 @@ void Node3DEditorViewport::drop_data_fw(const Point2 &p_point, const Variant &p_
}
Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, EditorNode *p_editor, int p_index) {
-
cpu_time_history_index = 0;
gpu_time_history_index = 0;
_edit.mode = TRANSFORM_NONE;
_edit.plane = TRANSFORM_VIEW;
_edit.edited_gizmo = 0;
- _edit.snap = 1;
+ _edit.snap = true;
_edit.gizmo_handle = 0;
index = p_index;
@@ -4132,11 +4075,9 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
//////////////////////////////////////////////////////////////
void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT) {
-
if (mb->is_pressed()) {
Vector2 size = get_size();
@@ -4155,25 +4096,21 @@ void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) {
switch (view) {
case VIEW_USE_1_VIEWPORT: {
-
dragging_h = false;
dragging_v = false;
} break;
case VIEW_USE_2_VIEWPORTS: {
-
dragging_h = false;
} break;
case VIEW_USE_2_VIEWPORTS_ALT: {
-
dragging_v = false;
} break;
case VIEW_USE_3_VIEWPORTS:
case VIEW_USE_3_VIEWPORTS_ALT:
case VIEW_USE_4_VIEWPORTS: {
-
// Do nothing.
} break;
@@ -4187,7 +4124,6 @@ void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
-
if (view == VIEW_USE_3_VIEWPORTS || view == VIEW_USE_3_VIEWPORTS_ALT || view == VIEW_USE_4_VIEWPORTS) {
Vector2 size = get_size();
@@ -4225,15 +4161,12 @@ void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) {
}
void Node3DEditorViewportContainer::_notification(int p_what) {
-
if (p_what == NOTIFICATION_MOUSE_ENTER || p_what == NOTIFICATION_MOUSE_EXIT) {
-
mouseover = (p_what == NOTIFICATION_MOUSE_ENTER);
update();
}
if (p_what == NOTIFICATION_DRAW && mouseover) {
-
Ref<Texture2D> h_grabber = get_theme_icon("grabber", "HSplitContainer");
Ref<Texture2D> v_grabber = get_theme_icon("grabber", "VSplitContainer");
@@ -4254,26 +4187,21 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
int size_bottom = size.height - mid_h - v_sep / 2;
switch (view) {
-
case VIEW_USE_1_VIEWPORT: {
-
// Nothing to show.
} break;
case VIEW_USE_2_VIEWPORTS: {
-
draw_texture(v_grabber, Vector2((size.width - v_grabber->get_width()) / 2, mid_h - v_grabber->get_height() / 2));
set_default_cursor_shape(CURSOR_VSPLIT);
} break;
case VIEW_USE_2_VIEWPORTS_ALT: {
-
draw_texture(h_grabber, Vector2(mid_w - h_grabber->get_width() / 2, (size.height - h_grabber->get_height()) / 2));
set_default_cursor_shape(CURSOR_HSPLIT);
} break;
case VIEW_USE_3_VIEWPORTS: {
-
if ((hovering_v && hovering_h && !dragging_v && !dragging_h) || (dragging_v && dragging_h)) {
draw_texture(hdiag_grabber, Vector2(mid_w - hdiag_grabber->get_width() / 2, mid_h - v_grabber->get_height() / 4));
set_default_cursor_shape(CURSOR_DRAG);
@@ -4287,7 +4215,6 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_3_VIEWPORTS_ALT: {
-
if ((hovering_v && hovering_h && !dragging_v && !dragging_h) || (dragging_v && dragging_h)) {
draw_texture(vdiag_grabber, Vector2(mid_w - vdiag_grabber->get_width() + v_grabber->get_height() / 4, mid_h - vdiag_grabber->get_height() / 2));
set_default_cursor_shape(CURSOR_DRAG);
@@ -4301,7 +4228,6 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_4_VIEWPORTS: {
-
Vector2 half(mid_w, mid_h);
if ((hovering_v && hovering_h && !dragging_v && !dragging_h) || (dragging_v && dragging_h)) {
draw_texture(vh_grabber, half - vh_grabber->get_size() / 2.0);
@@ -4319,7 +4245,6 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
}
if (p_what == NOTIFICATION_SORT_CHILDREN) {
-
Node3DEditorViewport *viewports[4];
int vc = 0;
for (int i = 0; i < get_child_count(); i++) {
@@ -4353,12 +4278,9 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
int size_bottom = size.height - mid_h - v_sep / 2;
switch (view) {
-
case VIEW_USE_1_VIEWPORT: {
-
viewports[0]->show();
for (int i = 1; i < 4; i++) {
-
viewports[i]->hide();
}
@@ -4366,13 +4288,12 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_2_VIEWPORTS: {
-
for (int i = 0; i < 4; i++) {
-
- if (i == 1 || i == 3)
+ if (i == 1 || i == 3) {
viewports[i]->hide();
- else
+ } else {
viewports[i]->show();
+ }
}
fit_child_in_rect(viewports[0], Rect2(Vector2(), Vector2(size.width, size_top)));
@@ -4380,26 +4301,24 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_2_VIEWPORTS_ALT: {
-
for (int i = 0; i < 4; i++) {
-
- if (i == 1 || i == 3)
+ if (i == 1 || i == 3) {
viewports[i]->hide();
- else
+ } else {
viewports[i]->show();
+ }
}
fit_child_in_rect(viewports[0], Rect2(Vector2(), Vector2(size_left, size.height)));
fit_child_in_rect(viewports[2], Rect2(Vector2(mid_w + h_sep / 2, 0), Vector2(size_right, size.height)));
} break;
case VIEW_USE_3_VIEWPORTS: {
-
for (int i = 0; i < 4; i++) {
-
- if (i == 1)
+ if (i == 1) {
viewports[i]->hide();
- else
+ } else {
viewports[i]->show();
+ }
}
fit_child_in_rect(viewports[0], Rect2(Vector2(), Vector2(size.width, size_top)));
@@ -4408,13 +4327,12 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_3_VIEWPORTS_ALT: {
-
for (int i = 0; i < 4; i++) {
-
- if (i == 1)
+ if (i == 1) {
viewports[i]->hide();
- else
+ } else {
viewports[i]->show();
+ }
}
fit_child_in_rect(viewports[0], Rect2(Vector2(), Vector2(size_left, size_top)));
@@ -4423,9 +4341,7 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_4_VIEWPORTS: {
-
for (int i = 0; i < 4; i++) {
-
viewports[i]->show();
}
@@ -4440,23 +4356,19 @@ void Node3DEditorViewportContainer::_notification(int p_what) {
}
void Node3DEditorViewportContainer::set_view(View p_view) {
-
view = p_view;
queue_sort();
}
Node3DEditorViewportContainer::View Node3DEditorViewportContainer::get_view() {
-
return view;
}
void Node3DEditorViewportContainer::_bind_methods() {
-
ClassDB::bind_method("_gui_input", &Node3DEditorViewportContainer::_gui_input);
}
Node3DEditorViewportContainer::Node3DEditorViewportContainer() {
-
set_clip_contents(true);
view = VIEW_USE_1_VIEWPORT;
mouseover = false;
@@ -4473,15 +4385,13 @@ Node3DEditorViewportContainer::Node3DEditorViewportContainer() {
Node3DEditor *Node3DEditor::singleton = nullptr;
Node3DEditorSelectedItem::~Node3DEditorSelectedItem() {
-
- if (sbox_instance.is_valid())
+ if (sbox_instance.is_valid()) {
RenderingServer::get_singleton()->free(sbox_instance);
+ }
}
void Node3DEditor::select_gizmo_highlight_axis(int p_axis) {
-
for (int i = 0; i < 3; i++) {
-
move_gizmo[i]->surface_set_material(0, i == p_axis ? gizmo_color_hl[i] : gizmo_color[i]);
move_plane_gizmo[i]->surface_set_material(0, (i + 6) == p_axis ? plane_gizmo_color_hl[i] : plane_gizmo_color[i]);
rotate_gizmo[i]->surface_set_material(0, (i + 3) == p_axis ? gizmo_color_hl[i] : gizmo_color[i]);
@@ -4491,7 +4401,6 @@ void Node3DEditor::select_gizmo_highlight_axis(int p_axis) {
}
void Node3DEditor::update_transform_gizmo() {
-
List<Node *> &selection = editor_selection->get_selected_node_list();
AABB center;
bool first = true;
@@ -4500,14 +4409,15 @@ void Node3DEditor::update_transform_gizmo() {
bool local_gizmo_coords = are_local_coords_enabled();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
Transform xf = se->sp->get_global_gizmo_transform();
@@ -4553,10 +4463,10 @@ void Node3DEditor::update_all_gizmos(Node *p_node) {
}
Object *Node3DEditor::_get_editor_data(Object *p_what) {
-
Node3D *sp = Object::cast_to<Node3D>(p_what);
- if (!sp)
+ if (!sp) {
return nullptr;
+ }
Node3DEditorSelectedItem *si = memnew(Node3DEditorSelectedItem);
@@ -4568,7 +4478,6 @@ Object *Node3DEditor::_get_editor_data(Object *p_what) {
}
void Node3DEditor::_generate_selection_box() {
-
AABB aabb(Vector3(), Vector3(1, 1, 1));
aabb.grow_by(aabb.get_longest_axis_size() / 20.0);
@@ -4576,7 +4485,6 @@ void Node3DEditor::_generate_selection_box() {
st->begin(Mesh::PRIMITIVE_LINES);
for (int i = 0; i < 12; i++) {
-
Vector3 a, b;
aabb.get_edge(i, a, b);
@@ -4602,7 +4510,6 @@ void Node3DEditor::_generate_selection_box() {
}
Dictionary Node3DEditor::get_state() const {
-
Dictionary d;
d["snap_enabled"] = snap_enabled;
@@ -4613,18 +4520,19 @@ Dictionary Node3DEditor::get_state() const {
d["local_coords"] = tool_option_button[TOOL_OPT_LOCAL_COORDS]->is_pressed();
int vc = 0;
- if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT)))
+ if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT))) {
vc = 1;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS))) {
vc = 2;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS))) {
vc = 3;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS))) {
vc = 4;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT))) {
vc = 5;
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT))) {
vc = 6;
+ }
d["viewport_mode"] = vc;
Array vpdata;
@@ -4642,8 +4550,9 @@ Dictionary Node3DEditor::get_state() const {
Dictionary gizmos_status;
for (int i = 0; i < gizmo_plugins_by_name.size(); i++) {
- if (!gizmo_plugins_by_name[i]->can_be_hidden())
+ if (!gizmo_plugins_by_name[i]->can_be_hidden()) {
continue;
+ }
int state = gizmos_menu->get_item_state(gizmos_menu->get_item_index(i));
String name = gizmo_plugins_by_name[i]->get_name();
gizmos_status[name] = state;
@@ -4653,8 +4562,8 @@ Dictionary Node3DEditor::get_state() const {
return d;
}
-void Node3DEditor::set_state(const Dictionary &p_state) {
+void Node3DEditor::set_state(const Dictionary &p_state) {
Dictionary d = p_state;
if (d.has("snap_enabled")) {
@@ -4662,14 +4571,17 @@ void Node3DEditor::set_state(const Dictionary &p_state) {
tool_option_button[TOOL_OPT_USE_SNAP]->set_pressed(d["snap_enabled"]);
}
- if (d.has("translate_snap"))
+ if (d.has("translate_snap")) {
snap_translate_value = d["translate_snap"];
+ }
- if (d.has("rotate_snap"))
+ if (d.has("rotate_snap")) {
snap_rotate_value = d["rotate_snap"];
+ }
- if (d.has("scale_snap"))
+ if (d.has("scale_snap")) {
snap_scale_value = d["scale_snap"];
+ }
_snap_update();
@@ -4681,18 +4593,19 @@ void Node3DEditor::set_state(const Dictionary &p_state) {
if (d.has("viewport_mode")) {
int vc = d["viewport_mode"];
- if (vc == 1)
+ if (vc == 1) {
_menu_item_pressed(MENU_VIEW_USE_1_VIEWPORT);
- else if (vc == 2)
+ } else if (vc == 2) {
_menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS);
- else if (vc == 3)
+ } else if (vc == 3) {
_menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS);
- else if (vc == 4)
+ } else if (vc == 4) {
_menu_item_pressed(MENU_VIEW_USE_4_VIEWPORTS);
- else if (vc == 5)
+ } else if (vc == 5) {
_menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS_ALT);
- else if (vc == 6)
+ } else if (vc == 6) {
_menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS_ALT);
+ }
}
if (d.has("viewports")) {
@@ -4708,12 +4621,15 @@ void Node3DEditor::set_state(const Dictionary &p_state) {
}
}
- if (d.has("zfar"))
+ if (d.has("zfar")) {
settings_zfar->set_value(float(d["zfar"]));
- if (d.has("znear"))
+ }
+ if (d.has("znear")) {
settings_znear->set_value(float(d["znear"]));
- if (d.has("fov"))
+ }
+ if (d.has("fov")) {
settings_fov->set_value(float(d["fov"]));
+ }
if (d.has("show_grid")) {
bool use = d["show_grid"];
@@ -4737,8 +4653,9 @@ void Node3DEditor::set_state(const Dictionary &p_state) {
gizmos_status.get_key_list(&keys);
for (int j = 0; j < gizmo_plugins_by_name.size(); ++j) {
- if (!gizmo_plugins_by_name[j]->can_be_hidden())
+ if (!gizmo_plugins_by_name[j]->can_be_hidden()) {
continue;
+ }
int state = EditorNode3DGizmoPlugin::VISIBLE;
for (int i = 0; i < keys.size(); i++) {
if (gizmo_plugins_by_name.write[j]->get_name() == keys[i]) {
@@ -4754,10 +4671,8 @@ void Node3DEditor::set_state(const Dictionary &p_state) {
}
void Node3DEditor::edit(Node3D *p_spatial) {
-
if (p_spatial != selected) {
if (selected) {
-
Ref<EditorNode3DGizmo> seg = selected->get_gizmo();
if (seg.is_valid()) {
seg->set_selected(false);
@@ -4769,7 +4684,6 @@ void Node3DEditor::edit(Node3D *p_spatial) {
over_gizmo_handle = -1;
if (selected) {
-
Ref<EditorNode3DGizmo> seg = selected->get_gizmo();
if (seg.is_valid()) {
seg->set_selected(true);
@@ -4780,21 +4694,18 @@ void Node3DEditor::edit(Node3D *p_spatial) {
}
void Node3DEditor::_snap_changed() {
-
snap_translate_value = snap_translate->get_text().to_double();
snap_rotate_value = snap_rotate->get_text().to_double();
snap_scale_value = snap_scale->get_text().to_double();
}
void Node3DEditor::_snap_update() {
-
snap_translate->set_text(String::num(snap_translate_value));
snap_rotate->set_text(String::num(snap_rotate_value));
snap_scale->set_text(String::num(snap_scale_value));
}
void Node3DEditor::_xform_dialog_action() {
-
Transform t;
//translation
Vector3 scale;
@@ -4816,22 +4727,22 @@ void Node3DEditor::_xform_dialog_action() {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *sp = Object::cast_to<Node3D>(E->get());
- if (!sp)
+ if (!sp) {
continue;
+ }
Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp);
- if (!se)
+ if (!se) {
continue;
+ }
bool post = xform_type->get_selected() > 0;
Transform tr = sp->get_global_gizmo_transform();
- if (post)
+ if (post) {
tr = tr * t;
- else {
-
+ } else {
tr.basis = t.basis * tr.basis;
tr.origin += t.origin;
}
@@ -4843,10 +4754,8 @@ void Node3DEditor::_xform_dialog_action() {
}
void Node3DEditor::_menu_item_toggled(bool pressed, int p_option) {
-
switch (p_option) {
case MENU_TOOL_LOCAL_COORDS: {
-
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_pressed(pressed);
update_transform_gizmo();
} break;
@@ -4861,7 +4770,6 @@ void Node3DEditor::_menu_item_toggled(bool pressed, int p_option) {
using Override = EditorDebuggerNode::CameraOverride;
if (pressed) {
-
debugger->set_camera_override((Override)(Override::OVERRIDE_3D_1 + camera_override_viewport_id));
} else {
debugger->set_camera_override(Override::OVERRIDE_NONE);
@@ -4872,7 +4780,6 @@ void Node3DEditor::_menu_item_toggled(bool pressed, int p_option) {
}
void Node3DEditor::_menu_gizmo_toggled(int p_option) {
-
const int idx = gizmos_menu->get_item_index(p_option);
gizmos_menu->toggle_item_multistate(idx);
@@ -4911,8 +4818,9 @@ void Node3DEditor::_update_camera_override_button(bool p_game_running) {
void Node3DEditor::_update_camera_override_viewport(Object *p_viewport) {
Node3DEditorViewport *current_viewport = Object::cast_to<Node3DEditorViewport>(p_viewport);
- if (!current_viewport)
+ if (!current_viewport) {
return;
+ }
EditorDebuggerNode *const debugger = EditorDebuggerNode::get_singleton();
@@ -4925,29 +4833,24 @@ void Node3DEditor::_update_camera_override_viewport(Object *p_viewport) {
}
void Node3DEditor::_menu_item_pressed(int p_option) {
-
switch (p_option) {
-
case MENU_TOOL_SELECT:
case MENU_TOOL_MOVE:
case MENU_TOOL_ROTATE:
case MENU_TOOL_SCALE:
case MENU_TOOL_LIST_SELECT: {
-
- for (int i = 0; i < TOOL_MAX; i++)
+ for (int i = 0; i < TOOL_MAX; i++) {
tool_button[i]->set_pressed(i == p_option);
+ }
tool_mode = (ToolMode)p_option;
update_transform_gizmo();
} break;
case MENU_TRANSFORM_CONFIGURE_SNAP: {
-
snap_dialog->popup_centered(Size2(200, 180));
} break;
case MENU_TRANSFORM_DIALOG: {
-
for (int i = 0; i < 3; i++) {
-
xform_translate[i]->set_text("0");
xform_rotate[i]->set_text("0");
xform_scale[i]->set_text("1");
@@ -4957,7 +4860,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_USE_1_VIEWPORT: {
-
viewport_base->set_view(Node3DEditorViewportContainer::VIEW_USE_1_VIEWPORT);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), true);
@@ -4969,7 +4871,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_USE_2_VIEWPORTS: {
-
viewport_base->set_view(Node3DEditorViewportContainer::VIEW_USE_2_VIEWPORTS);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false);
@@ -4981,7 +4882,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_USE_2_VIEWPORTS_ALT: {
-
viewport_base->set_view(Node3DEditorViewportContainer::VIEW_USE_2_VIEWPORTS_ALT);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false);
@@ -4993,7 +4893,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_USE_3_VIEWPORTS: {
-
viewport_base->set_view(Node3DEditorViewportContainer::VIEW_USE_3_VIEWPORTS);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false);
@@ -5005,7 +4904,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_USE_3_VIEWPORTS_ALT: {
-
viewport_base->set_view(Node3DEditorViewportContainer::VIEW_USE_3_VIEWPORTS_ALT);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false);
@@ -5017,7 +4915,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_USE_4_VIEWPORTS: {
-
viewport_base->set_view(Node3DEditorViewportContainer::VIEW_USE_4_VIEWPORTS);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false);
@@ -5029,7 +4926,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_ORIGIN: {
-
bool is_checked = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(p_option));
origin_enabled = !is_checked;
@@ -5041,15 +4937,16 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(p_option), origin_enabled);
} break;
case MENU_VIEW_GRID: {
-
bool is_checked = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(p_option));
grid_enabled = !is_checked;
for (int i = 0; i < 3; ++i) {
if (grid_enable[i]) {
- RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], grid_enabled);
grid_visible[i] = grid_enabled;
+ if (grid_instance[i].is_valid()) {
+ RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], grid_enabled);
+ }
}
}
@@ -5057,7 +4954,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
} break;
case MENU_VIEW_CAMERA_SETTINGS: {
-
settings_dialog->popup_centered(settings_vbc->get_combined_minimum_size() + Size2(50, 50));
} break;
case MENU_SNAP_TO_FLOOR: {
@@ -5069,13 +4965,14 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *spatial = Object::cast_to<Node3D>(E->get());
- if (!spatial || !spatial->is_visible_in_tree())
+ if (!spatial || !spatial->is_visible_in_tree()) {
continue;
+ }
- if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(spatial, "set_meta", "_edit_lock_", true);
undo_redo->add_undo_method(spatial, "remove_meta", "_edit_lock_");
@@ -5093,13 +4990,14 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *spatial = Object::cast_to<Node3D>(E->get());
- if (!spatial || !spatial->is_visible_in_tree())
+ if (!spatial || !spatial->is_visible_in_tree()) {
continue;
+ }
- if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(spatial, "remove_meta", "_edit_lock_");
undo_redo->add_undo_method(spatial, "set_meta", "_edit_lock_", true);
@@ -5117,13 +5015,14 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *spatial = Object::cast_to<Node3D>(E->get());
- if (!spatial || !spatial->is_visible_in_tree())
+ if (!spatial || !spatial->is_visible_in_tree()) {
continue;
+ }
- if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(spatial, "set_meta", "_edit_group_", true);
undo_redo->add_undo_method(spatial, "remove_meta", "_edit_group_");
@@ -5140,13 +5039,14 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node3D *spatial = Object::cast_to<Node3D>(E->get());
- if (!spatial || !spatial->is_visible_in_tree())
+ if (!spatial || !spatial->is_visible_in_tree()) {
continue;
+ }
- if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root())
+ if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
+ }
undo_redo->add_do_method(spatial, "remove_meta", "_edit_group_");
undo_redo->add_undo_method(spatial, "set_meta", "_edit_group_", true);
@@ -5162,7 +5062,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
}
void Node3DEditor::_init_indicators() {
-
{
origin_enabled = true;
grid_enabled = true;
@@ -5171,6 +5070,7 @@ void Node3DEditor::_init_indicators() {
indicator_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
indicator_mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
indicator_mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
+ indicator_mat->set_transparency(StandardMaterial3D::Transparency::TRANSPARENCY_ALPHA_DEPTH_PRE_PASS);
Vector<Color> origin_colors;
Vector<Vector3> origin_points;
@@ -5199,12 +5099,27 @@ void Node3DEditor::_init_indicators() {
origin_colors.push_back(origin_color);
origin_colors.push_back(origin_color);
- origin_points.push_back(axis * 4096);
- origin_points.push_back(axis * -4096);
+ origin_colors.push_back(origin_color);
+ origin_colors.push_back(origin_color);
+ origin_colors.push_back(origin_color);
+ origin_colors.push_back(origin_color);
+ // To both allow having a large origin size and avoid jitter
+ // at small scales, we should segment the line into pieces.
+ // 3 pieces seems to do the trick, and let's use powers of 2.
+ origin_points.push_back(axis * 1048576);
+ origin_points.push_back(axis * 1024);
+ origin_points.push_back(axis * 1024);
+ origin_points.push_back(axis * -1024);
+ origin_points.push_back(axis * -1024);
+ origin_points.push_back(axis * -1048576);
}
- grid_enable[1] = true;
- grid_visible[1] = true;
+ grid_enable[0] = EditorSettings::get_singleton()->get("editors/3d/grid_xy_plane");
+ grid_enable[1] = EditorSettings::get_singleton()->get("editors/3d/grid_yz_plane");
+ grid_enable[2] = EditorSettings::get_singleton()->get("editors/3d/grid_xz_plane");
+ grid_visible[0] = grid_enable[0];
+ grid_visible[1] = grid_enable[1];
+ grid_visible[2] = grid_enable[2];
_init_grid();
@@ -5224,11 +5139,9 @@ void Node3DEditor::_init_indicators() {
}
{
-
//move gizmo
for (int i = 0; i < 3; i++) {
-
Color col;
switch (i) {
case 0:
@@ -5276,7 +5189,6 @@ void Node3DEditor::_init_indicators() {
//translate
{
-
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
@@ -5293,12 +5205,10 @@ void Node3DEditor::_init_indicators() {
int arrow_sides = 16;
for (int k = 0; k < arrow_sides; k++) {
-
Basis ma(ivec, Math_PI * 2 * float(k) / arrow_sides);
Basis mb(ivec, Math_PI * 2 * float(k + 1) / arrow_sides);
for (int j = 0; j < arrow_points - 1; j++) {
-
Vector3 points[4] = {
ma.xform(arrow[j]),
mb.xform(arrow[j]),
@@ -5365,7 +5275,6 @@ void Node3DEditor::_init_indicators() {
// Rotate
{
-
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
@@ -5378,12 +5287,10 @@ void Node3DEditor::_init_indicators() {
};
for (int k = 0; k < 64; k++) {
-
Basis ma(ivec, Math_PI * 2 * float(k) / 64);
Basis mb(ivec, Math_PI * 2 * float(k + 1) / 64);
for (int j = 0; j < 4; j++) {
-
Vector3 points[4] = {
ma.xform(circle[j]),
mb.xform(circle[j]),
@@ -5423,12 +5330,10 @@ void Node3DEditor::_init_indicators() {
int arrow_sides = 4;
for (int k = 0; k < 4; k++) {
-
Basis ma(ivec, Math_PI * 2 * float(k) / arrow_sides);
Basis mb(ivec, Math_PI * 2 * float(k + 1) / arrow_sides);
for (int j = 0; j < arrow_points - 1; j++) {
-
Vector3 points[4] = {
ma.xform(arrow[j]),
mb.xform(arrow[j]),
@@ -5499,16 +5404,19 @@ void Node3DEditor::_init_indicators() {
}
void Node3DEditor::_update_gizmos_menu() {
-
gizmos_menu->clear();
for (int i = 0; i < gizmo_plugins_by_name.size(); ++i) {
- if (!gizmo_plugins_by_name[i]->can_be_hidden())
+ if (!gizmo_plugins_by_name[i]->can_be_hidden()) {
continue;
+ }
String plugin_name = gizmo_plugins_by_name[i]->get_name();
const int plugin_state = gizmo_plugins_by_name[i]->get_state();
gizmos_menu->add_multistate_item(TTR(plugin_name), 3, plugin_state, i);
const int idx = gizmos_menu->get_item_index(i);
+ gizmos_menu->set_item_tooltip(
+ idx,
+ TTR("Click to toggle between visibility states.\n\nOpen eye: Gizmo is visible.\nClosed eye: Gizmo is hidden.\nHalf-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."));
switch (plugin_state) {
case EditorNode3DGizmoPlugin::VISIBLE:
gizmos_menu->set_item_icon(idx, gizmos_menu->get_theme_icon("visibility_visible"));
@@ -5525,8 +5433,9 @@ void Node3DEditor::_update_gizmos_menu() {
void Node3DEditor::_update_gizmos_menu_theme() {
for (int i = 0; i < gizmo_plugins_by_name.size(); ++i) {
- if (!gizmo_plugins_by_name[i]->can_be_hidden())
+ if (!gizmo_plugins_by_name[i]->can_be_hidden()) {
continue;
+ }
const int plugin_state = gizmo_plugins_by_name[i]->get_state();
const int idx = gizmos_menu->get_item_index(i);
switch (plugin_state) {
@@ -5544,6 +5453,14 @@ void Node3DEditor::_update_gizmos_menu_theme() {
}
void Node3DEditor::_init_grid() {
+ if (!grid_enabled) {
+ return;
+ }
+ Camera3D *camera = get_editor_viewport(0)->camera;
+ Vector3 camera_position = camera->get_translation();
+ if (camera_position == Vector3()) {
+ return; // Camera3D is invalid, don't draw the grid.
+ }
Vector<Color> grid_colors[3];
Vector<Vector3> grid_points[3];
@@ -5553,57 +5470,115 @@ void Node3DEditor::_init_grid() {
int grid_size = EditorSettings::get_singleton()->get("editors/3d/grid_size");
int primary_grid_steps = EditorSettings::get_singleton()->get("editors/3d/primary_grid_steps");
- for (int i = 0; i < 3; i++) {
- Vector3 axis;
- axis[i] = 1;
- Vector3 axis_n1;
- axis_n1[(i + 1) % 3] = 1;
- Vector3 axis_n2;
- axis_n2[(i + 2) % 3] = 1;
-
- for (int j = -grid_size; j <= grid_size; j++) {
- Vector3 p1 = axis_n1 * j + axis_n2 * -grid_size;
- Vector3 p1_dest = p1 * (-axis_n2 + axis_n1);
- Vector3 p2 = axis_n2 * j + axis_n1 * -grid_size;
- Vector3 p2_dest = p2 * (-axis_n1 + axis_n2);
-
- Color line_color = secondary_grid_color;
- if (origin_enabled && j == 0) {
- // Don't draw the center lines of the grid if the origin is enabled
- // The origin would overlap the grid lines in this case, causing flickering
- continue;
- } else if (j % primary_grid_steps == 0) {
- line_color = primary_grid_color;
+ // Which grid planes are enabled? Which should we generate?
+ grid_enable[0] = grid_visible[0] = EditorSettings::get_singleton()->get("editors/3d/grid_xy_plane");
+ grid_enable[1] = grid_visible[1] = EditorSettings::get_singleton()->get("editors/3d/grid_yz_plane");
+ grid_enable[2] = grid_visible[2] = EditorSettings::get_singleton()->get("editors/3d/grid_xz_plane");
+
+ // Offsets division_level for bigger or smaller grids.
+ // Default value is -0.2. -1.0 gives Blender-like behavior, 0.5 gives huge grids.
+ real_t division_level_bias = EditorSettings::get_singleton()->get("editors/3d/grid_division_level_bias");
+ // Default largest grid size is 100m, 10^2 (default value is 2).
+ int division_level_max = EditorSettings::get_singleton()->get("editors/3d/grid_division_level_max");
+ // Default smallest grid size is 1cm, 10^-2 (default value is -2).
+ int division_level_min = EditorSettings::get_singleton()->get("editors/3d/grid_division_level_min");
+ ERR_FAIL_COND_MSG(division_level_max < division_level_min, "The 3D grid's maximum division level cannot be lower than its minimum division level.");
+
+ if (primary_grid_steps != 10) { // Log10 of 10 is 1.
+ // Change of base rule, divide by ln(10).
+ real_t div = Math::log((real_t)primary_grid_steps) / (real_t)2.302585092994045901094;
+ // Trucation (towards zero) is intentional.
+ division_level_max = (int)(division_level_max / div);
+ division_level_min = (int)(division_level_min / div);
+ }
+
+ for (int a = 0; a < 3; a++) {
+ if (!grid_enable[a]) {
+ continue; // If this grid plane is disabled, skip generation.
+ }
+ int b = (a + 1) % 3;
+ int c = (a + 2) % 3;
+
+ real_t division_level = Math::log(Math::abs(camera_position[c])) / Math::log((double)primary_grid_steps) + division_level_bias;
+ division_level = CLAMP(division_level, division_level_min, division_level_max);
+ real_t division_level_floored = Math::floor(division_level);
+ real_t division_level_decimals = division_level - division_level_floored;
+
+ real_t small_step_size = Math::pow(primary_grid_steps, division_level_floored);
+ real_t large_step_size = small_step_size * primary_grid_steps;
+ real_t center_a = large_step_size * (int)(camera_position[a] / large_step_size);
+ real_t center_b = large_step_size * (int)(camera_position[b] / large_step_size);
+
+ real_t bgn_a = center_a - grid_size * small_step_size;
+ real_t end_a = center_a + grid_size * small_step_size;
+ real_t bgn_b = center_b - grid_size * small_step_size;
+ real_t end_b = center_b + grid_size * small_step_size;
+
+ // In each iteration of this loop, draw one line in each direction (so two lines per loop, in each if statement).
+ for (int i = -grid_size; i <= grid_size; i++) {
+ Color line_color;
+ // Is this a primary line? Set the appropriate color.
+ if (i % primary_grid_steps == 0) {
+ line_color = primary_grid_color.lerp(secondary_grid_color, division_level_decimals);
+ } else {
+ line_color = secondary_grid_color;
+ line_color.a = line_color.a * (1 - division_level_decimals);
+ }
+ // Makes lines farther from the center fade out.
+ // Due to limitations of lines, any that come near the camera have full opacity always.
+ // This should eventually be replaced by some kind of "distance fade" system, outside of this function.
+ // But the effect is still somewhat convincing...
+ line_color.a *= 1 - (1 - division_level_decimals * 0.9) * (Math::abs(i / (float)grid_size));
+
+ real_t position_a = center_a + i * small_step_size;
+ real_t position_b = center_b + i * small_step_size;
+
+ // Don't draw lines over the origin if it's enabled.
+ if (!(origin_enabled && Math::is_zero_approx(position_a))) {
+ Vector3 line_bgn = Vector3();
+ Vector3 line_end = Vector3();
+ line_bgn[a] = position_a;
+ line_end[a] = position_a;
+ line_bgn[b] = bgn_b;
+ line_end[b] = end_b;
+ grid_points[c].push_back(line_bgn);
+ grid_points[c].push_back(line_end);
+ grid_colors[c].push_back(line_color);
+ grid_colors[c].push_back(line_color);
}
- grid_points[i].push_back(p1);
- grid_points[i].push_back(p1_dest);
- grid_colors[i].push_back(line_color);
- grid_colors[i].push_back(line_color);
-
- grid_points[i].push_back(p2);
- grid_points[i].push_back(p2_dest);
- grid_colors[i].push_back(line_color);
- grid_colors[i].push_back(line_color);
+ if (!(origin_enabled && Math::is_zero_approx(position_b))) {
+ Vector3 line_bgn = Vector3();
+ Vector3 line_end = Vector3();
+ line_bgn[b] = position_b;
+ line_end[b] = position_b;
+ line_bgn[a] = bgn_a;
+ line_end[a] = end_a;
+ grid_points[c].push_back(line_bgn);
+ grid_points[c].push_back(line_end);
+ grid_colors[c].push_back(line_color);
+ grid_colors[c].push_back(line_color);
+ }
}
- grid[i] = RenderingServer::get_singleton()->mesh_create();
+ // Create a mesh from the pushed vector points and colors.
+ grid[c] = RenderingServer::get_singleton()->mesh_create();
Array d;
d.resize(RS::ARRAY_MAX);
- d[RenderingServer::ARRAY_VERTEX] = grid_points[i];
- d[RenderingServer::ARRAY_COLOR] = grid_colors[i];
- RenderingServer::get_singleton()->mesh_add_surface_from_arrays(grid[i], RenderingServer::PRIMITIVE_LINES, d);
- RenderingServer::get_singleton()->mesh_surface_set_material(grid[i], 0, indicator_mat->get_rid());
- grid_instance[i] = RenderingServer::get_singleton()->instance_create2(grid[i], get_tree()->get_root()->get_world_3d()->get_scenario());
+ d[RenderingServer::ARRAY_VERTEX] = grid_points[c];
+ d[RenderingServer::ARRAY_COLOR] = grid_colors[c];
+ RenderingServer::get_singleton()->mesh_add_surface_from_arrays(grid[c], RenderingServer::PRIMITIVE_LINES, d);
+ RenderingServer::get_singleton()->mesh_surface_set_material(grid[c], 0, indicator_mat->get_rid());
+ grid_instance[c] = RenderingServer::get_singleton()->instance_create2(grid[c], get_tree()->get_root()->get_world_3d()->get_scenario());
- RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], grid_visible[i]);
- RenderingServer::get_singleton()->instance_geometry_set_cast_shadows_setting(grid_instance[i], RS::SHADOW_CASTING_SETTING_OFF);
- RS::get_singleton()->instance_set_layer_mask(grid_instance[i], 1 << Node3DEditorViewport::GIZMO_GRID_LAYER);
+ // Yes, the end of this line is supposed to be a.
+ RenderingServer::get_singleton()->instance_set_visible(grid_instance[c], grid_visible[a]);
+ RenderingServer::get_singleton()->instance_geometry_set_cast_shadows_setting(grid_instance[c], RS::SHADOW_CASTING_SETTING_OFF);
+ RS::get_singleton()->instance_set_layer_mask(grid_instance[c], 1 << Node3DEditorViewport::GIZMO_GRID_LAYER);
}
}
void Node3DEditor::_finish_indicators() {
-
RenderingServer::get_singleton()->free(origin_instance);
RenderingServer::get_singleton()->free(origin);
@@ -5617,16 +5592,21 @@ void Node3DEditor::_finish_grid() {
}
}
+void Node3DEditor::update_grid() {
+ _finish_grid();
+ _init_grid();
+}
+
bool Node3DEditor::is_any_freelook_active() const {
for (unsigned int i = 0; i < VIEWPORTS_COUNT; ++i) {
- if (viewports[i]->is_freelook_active())
+ if (viewports[i]->is_freelook_active()) {
return true;
+ }
}
return false;
}
void Node3DEditor::_refresh_menu_icons() {
-
bool all_locked = true;
bool all_grouped = true;
@@ -5798,16 +5778,15 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
}
void Node3DEditor::_unhandled_key_input(Ref<InputEvent> p_event) {
-
- if (!is_visible_in_tree())
+ if (!is_visible_in_tree()) {
return;
+ }
snap_key_enabled = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
}
-void Node3DEditor::_notification(int p_what) {
+void Node3DEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
-
tool_button[Node3DEditor::TOOL_MODE_SELECT]->set_icon(get_theme_icon("ToolSelect", "EditorIcons"));
tool_button[Node3DEditor::TOOL_MODE_MOVE]->set_icon(get_theme_icon("ToolMove", "EditorIcons"));
tool_button[Node3DEditor::TOOL_MODE_ROTATE]->set_icon(get_theme_icon("ToolRotate", "EditorIcons"));
@@ -5840,14 +5819,12 @@ void Node3DEditor::_notification(int p_what) {
editor->connect("stop_pressed", callable_mp(this, &Node3DEditor::_update_camera_override_button), make_binds(false));
editor->connect("play_pressed", callable_mp(this, &Node3DEditor::_update_camera_override_button), make_binds(true));
} else if (p_what == NOTIFICATION_ENTER_TREE) {
-
_register_all_gizmos();
_update_gizmos_menu();
_init_indicators();
} else if (p_what == NOTIFICATION_THEME_CHANGED) {
_update_gizmos_menu_theme();
} else if (p_what == NOTIFICATION_EXIT_TREE) {
-
_finish_indicators();
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
tool_button[Node3DEditor::TOOL_MODE_SELECT]->set_icon(get_theme_icon("ToolSelect", "EditorIcons"));
@@ -5884,39 +5861,33 @@ void Node3DEditor::_notification(int p_what) {
}
void Node3DEditor::add_control_to_menu_panel(Control *p_control) {
-
hbc_menu->add_child(p_control);
}
void Node3DEditor::remove_control_from_menu_panel(Control *p_control) {
-
hbc_menu->remove_child(p_control);
}
void Node3DEditor::set_can_preview(Camera3D *p_preview) {
-
for (int i = 0; i < 4; i++) {
viewports[i]->set_can_preview(p_preview);
}
}
VSplitContainer *Node3DEditor::get_shader_split() {
-
return shader_split;
}
HSplitContainer *Node3DEditor::get_palette_split() {
-
return palette_split;
}
void Node3DEditor::_request_gizmo(Object *p_obj) {
-
Node3D *sp = Object::cast_to<Node3D>(p_obj);
- if (!sp)
+ if (!sp) {
return;
+ }
if (editor->get_edited_scene() && (sp == editor->get_edited_scene() || (sp->get_owner() && editor->get_edited_scene()->is_a_parent_of(sp)))) {
-
Ref<EditorNode3DGizmo> seg;
for (int i = 0; i < gizmo_plugins_by_priority.size(); ++i) {
@@ -5937,57 +5908,62 @@ void Node3DEditor::_request_gizmo(Object *p_obj) {
}
void Node3DEditor::_toggle_maximize_view(Object *p_viewport) {
- if (!p_viewport)
+ if (!p_viewport) {
return;
+ }
Node3DEditorViewport *current_viewport = Object::cast_to<Node3DEditorViewport>(p_viewport);
- if (!current_viewport)
+ if (!current_viewport) {
return;
+ }
int index = -1;
bool maximized = false;
for (int i = 0; i < 4; i++) {
if (viewports[i] == current_viewport) {
index = i;
- if (current_viewport->get_global_rect() == viewport_base->get_global_rect())
+ if (current_viewport->get_global_rect() == viewport_base->get_global_rect()) {
maximized = true;
+ }
break;
}
}
- if (index == -1)
+ if (index == -1) {
return;
+ }
if (!maximized) {
-
for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
- if (i == (uint32_t)index)
+ if (i == (uint32_t)index) {
viewports[i]->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- else
+ } else {
viewports[i]->hide();
+ }
}
} else {
-
- for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++)
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i]->show();
+ }
- if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT)))
+ if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT))) {
_menu_item_pressed(MENU_VIEW_USE_1_VIEWPORT);
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS))) {
_menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS);
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT))) {
_menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS_ALT);
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS))) {
_menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS);
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT))) {
_menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS_ALT);
- else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS)))
+ } else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS))) {
_menu_item_pressed(MENU_VIEW_USE_4_VIEWPORTS);
+ }
}
}
void Node3DEditor::_node_removed(Node *p_node) {
-
- if (p_node == selected)
+ if (p_node == selected) {
selected = nullptr;
+ }
}
void Node3DEditor::_register_all_gizmos() {
@@ -6018,7 +5994,6 @@ void Node3DEditor::_register_all_gizmos() {
}
void Node3DEditor::_bind_methods() {
-
ClassDB::bind_method("_unhandled_key_input", &Node3DEditor::_unhandled_key_input);
ClassDB::bind_method("_get_editor_data", &Node3DEditor::_get_editor_data);
ClassDB::bind_method("_request_gizmo", &Node3DEditor::_request_gizmo);
@@ -6029,7 +6004,6 @@ void Node3DEditor::_bind_methods() {
}
void Node3DEditor::clear() {
-
settings_fov->set_value(EDITOR_DEF("editors/3d/default_fov", 70.0));
settings_znear->set_value(EDITOR_DEF("editors/3d/default_z_near", 0.05));
settings_zfar->set_value(EDITOR_DEF("editors/3d/default_z_far", 1500.0));
@@ -6048,7 +6022,6 @@ void Node3DEditor::clear() {
}
for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
-
viewports[i]->view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(Node3DEditorViewport::VIEW_AUDIO_LISTENER), i == 0);
viewports[i]->viewport->set_as_audio_listener(i == 0);
}
@@ -6057,7 +6030,6 @@ void Node3DEditor::clear() {
}
Node3DEditor::Node3DEditor(EditorNode *p_editor) {
-
gizmo.visible = true;
gizmo.scale = 1.0;
@@ -6270,7 +6242,6 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) {
shader_split->add_child(viewport_base);
viewport_base->set_v_size_flags(SIZE_EXPAND_FILL);
for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
-
viewports[i] = memnew(Node3DEditorViewport(this, editor, i));
viewports[i]->connect("toggle_maximize_view", callable_mp(this, &Node3DEditor::_toggle_maximize_view));
viewports[i]->connect("clicked", callable_mp(this, &Node3DEditor::_update_camera_override_viewport));
@@ -6355,7 +6326,6 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) {
xform_vbc->add_child(xform_hbc);
for (int i = 0; i < 3; i++) {
-
xform_translate[i] = memnew(LineEdit);
xform_translate[i]->set_h_size_flags(SIZE_EXPAND_FILL);
xform_hbc->add_child(xform_translate[i]);
@@ -6420,25 +6390,21 @@ Node3DEditor::~Node3DEditor() {
}
void Node3DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
spatial_editor->show();
spatial_editor->set_process(true);
} else {
-
spatial_editor->hide();
spatial_editor->set_process(false);
}
}
-void Node3DEditorPlugin::edit(Object *p_object) {
+void Node3DEditorPlugin::edit(Object *p_object) {
spatial_editor->edit(Object::cast_to<Node3D>(p_object));
}
bool Node3DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("Node3D");
}
@@ -6447,12 +6413,10 @@ Dictionary Node3DEditorPlugin::get_state() const {
}
void Node3DEditorPlugin::set_state(const Dictionary &p_state) {
-
spatial_editor->set_state(p_state);
}
void Node3DEditor::snap_cursor_to_plane(const Plane &p_plane) {
-
//cursor.pos=p_plane.project(cursor.pos);
}
@@ -6499,17 +6463,14 @@ float Node3DEditor::get_scale_snap() const {
}
void Node3DEditorPlugin::_bind_methods() {
-
ClassDB::bind_method("snap_cursor_to_plane", &Node3DEditorPlugin::snap_cursor_to_plane);
}
void Node3DEditorPlugin::snap_cursor_to_plane(const Plane &p_plane) {
-
spatial_editor->snap_cursor_to_plane(p_plane);
}
struct _GizmoPluginPriorityComparator {
-
bool operator()(const Ref<EditorNode3DGizmoPlugin> &p_a, const Ref<EditorNode3DGizmoPlugin> &p_b) const {
if (p_a->get_priority() == p_b->get_priority()) {
return p_a->get_name() < p_b->get_name();
@@ -6519,7 +6480,6 @@ struct _GizmoPluginPriorityComparator {
};
struct _GizmoPluginNameComparator {
-
bool operator()(const Ref<EditorNode3DGizmoPlugin> &p_a, const Ref<EditorNode3DGizmoPlugin> &p_b) const {
return p_a->get_name() < p_b->get_name();
}
@@ -6545,7 +6505,6 @@ void Node3DEditor::remove_gizmo_plugin(Ref<EditorNode3DGizmoPlugin> p_plugin) {
}
Node3DEditorPlugin::Node3DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
spatial_editor = memnew(Node3DEditor(p_node));
spatial_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -6559,7 +6518,6 @@ Node3DEditorPlugin::~Node3DEditorPlugin() {
}
void EditorNode3DGizmoPlugin::create_material(const String &p_name, const Color &p_color, bool p_billboard, bool p_on_top, bool p_use_vertex_color) {
-
Color instanced_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6));
Vector<Ref<StandardMaterial3D>> mats;
@@ -6601,7 +6559,6 @@ void EditorNode3DGizmoPlugin::create_material(const String &p_name, const Color
}
void EditorNode3DGizmoPlugin::create_icon_material(const String &p_name, const Ref<Texture2D> &p_texture, bool p_on_top, const Color &p_albedo) {
-
Color instanced_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6));
Vector<Ref<StandardMaterial3D>> icons;
@@ -6672,8 +6629,9 @@ Ref<StandardMaterial3D> EditorNode3DGizmoPlugin::get_material(const String &p_na
ERR_FAIL_COND_V(!materials.has(p_name), Ref<StandardMaterial3D>());
ERR_FAIL_COND_V(materials[p_name].size() == 0, Ref<StandardMaterial3D>());
- if (p_gizmo.is_null() || materials[p_name].size() == 1)
+ if (p_gizmo.is_null() || materials[p_name].size() == 1) {
return materials[p_name][0];
+ }
int index = (p_gizmo->is_selected() ? 1 : 0) + (p_gizmo->is_editable() ? 2 : 0);
@@ -6703,15 +6661,15 @@ int EditorNode3DGizmoPlugin::get_priority() const {
}
Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::get_gizmo(Node3D *p_spatial) {
-
if (get_script_instance() && get_script_instance()->has_method("get_gizmo")) {
return get_script_instance()->call("get_gizmo", p_spatial);
}
Ref<EditorNode3DGizmo> ref = create_gizmo(p_spatial);
- if (ref.is_null())
+ if (ref.is_null()) {
return ref;
+ }
ref->set_plugin(this);
ref->set_spatial_node(p_spatial);
@@ -6764,14 +6722,14 @@ bool EditorNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
}
Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial) {
-
if (get_script_instance() && get_script_instance()->has_method("create_gizmo")) {
return get_script_instance()->call("create_gizmo", p_spatial);
}
Ref<EditorNode3DGizmo> ref;
- if (has_gizmo(p_spatial))
+ if (has_gizmo(p_spatial)) {
ref.instance();
+ }
return ref;
}
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index fdc0741651..83173b5ad2 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -46,7 +46,6 @@ class Node3DEditorViewport;
class SubViewportContainer;
class EditorNode3DGizmo : public Node3DGizmo {
-
GDCLASS(EditorNode3DGizmo, Node3DGizmo);
bool selected;
@@ -57,7 +56,6 @@ public:
bool is_selected() const { return selected; }
struct Instance {
-
RID instance;
Ref<ArrayMesh> mesh;
Ref<Material> material;
@@ -68,7 +66,6 @@ public:
bool can_intersect;
bool extra_margin;
Instance() {
-
billboard = false;
unscaled = false;
can_intersect = false;
@@ -179,7 +176,6 @@ public:
};
class Node3DEditorViewport : public Control {
-
GDCLASS(Node3DEditorViewport, Control);
friend class Node3DEditor;
friend class ViewportRotationControl;
@@ -299,7 +295,6 @@ private:
Label *fps_label;
struct _RayResult {
-
Node3D *item;
float depth;
int handle;
@@ -389,7 +384,6 @@ private:
} _edit;
struct Cursor {
-
Vector3 pos;
float x_rot, y_rot, distance;
Vector3 eye_pos; // Used in freelook mode
@@ -397,7 +391,9 @@ private:
Point2 region_begin, region_end;
Cursor() {
- x_rot = y_rot = 0.5;
+ // These rotations place the camera in +X +Y +Z, aka south east, facing north west.
+ x_rot = 0.5;
+ y_rot = -0.5;
distance = 4;
region_select = false;
}
@@ -490,7 +486,6 @@ public:
};
class Node3DEditorSelectedItem : public Object {
-
GDCLASS(Node3DEditorSelectedItem, Object);
public:
@@ -510,7 +505,6 @@ public:
};
class Node3DEditorViewportContainer : public Container {
-
GDCLASS(Node3DEditorViewportContainer, Container);
public:
@@ -551,7 +545,6 @@ public:
};
class Node3DEditor : public VBoxContainer {
-
GDCLASS(Node3DEditor, VBoxContainer);
public:
@@ -629,7 +622,6 @@ private:
AABB preview_bounds;
struct Gizmo {
-
bool visible;
float scale;
Transform transform;
@@ -776,6 +768,7 @@ public:
Ref<ArrayMesh> get_scale_gizmo(int idx) const { return scale_gizmo[idx]; }
Ref<ArrayMesh> get_scale_plane_gizmo(int idx) const { return scale_plane_gizmo[idx]; }
+ void update_grid();
void update_transform_gizmo();
void update_all_gizmos(Node *p_node = nullptr);
void snap_selected_nodes_to_floor();
@@ -819,7 +812,6 @@ public:
};
class Node3DEditorPlugin : public EditorPlugin {
-
GDCLASS(Node3DEditorPlugin, EditorPlugin);
Node3DEditor *spatial_editor;
@@ -849,7 +841,6 @@ public:
};
class EditorNode3DGizmoPlugin : public Resource {
-
GDCLASS(EditorNode3DGizmoPlugin, Resource);
public:
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 2edb337b1c..a3dab665b8 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -37,11 +37,8 @@
#include "editor/editor_settings.h"
void Path2DEditor::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_READY: {
-
//button_create->set_icon( get_icon("Edit","EditorIcons"));
//button_edit->set_icon( get_icon("MovePoint","EditorIcons"));
//set_pressed_button(button_edit);
@@ -49,12 +46,11 @@ void Path2DEditor::_notification(int p_what) {
} break;
case NOTIFICATION_PHYSICS_PROCESS: {
-
} break;
}
}
-void Path2DEditor::_node_removed(Node *p_node) {
+void Path2DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
node = nullptr;
hide();
@@ -62,31 +58,31 @@ void Path2DEditor::_node_removed(Node *p_node) {
}
bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
- if (!node)
+ if (!node) {
return false;
+ }
- if (!node->is_visible_in_tree())
+ if (!node->is_visible_in_tree()) {
return false;
+ }
- if (!node->get_curve().is_valid())
+ if (!node->get_curve().is_valid()) {
return false;
+ }
real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
-
Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
Vector2 gpoint = mb->get_position();
Vector2 cpoint = node->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(mb->get_position())));
if (mb->is_pressed() && action == ACTION_NONE) {
-
Ref<Curve2D> curve = node->get_curve();
for (int i = 0; i < curve->get_point_count(); i++) {
-
real_t dist_to_p = gpoint.distance_to(xform.xform(curve->get_point_position(i)));
real_t dist_to_p_out = gpoint.distance_to(xform.xform(curve->get_point_position(i) + curve->get_point_out(i)));
real_t dist_to_p_in = gpoint.distance_to(xform.xform(curve->get_point_position(i) + curve->get_point_in(i)));
@@ -104,7 +100,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} else if (mode == MODE_EDIT || mode == MODE_EDIT_CURVE) {
// In/out controls can be moved in multiple modes.
if (dist_to_p_out < grab_threshold && i < (curve->get_point_count() - 1)) {
-
action = ACTION_MOVING_OUT;
action_point = i;
moving_from = curve->get_point_out(i);
@@ -112,7 +107,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
orig_in_length = curve->get_point_in(action_point).length();
return true;
} else if (dist_to_p_in < grab_threshold && i > 0) {
-
action = ACTION_MOVING_IN;
action_point = i;
moving_from = curve->get_point_in(i);
@@ -126,7 +120,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
// Check for point deletion.
if ((mb->get_button_index() == BUTTON_RIGHT && mode == MODE_EDIT) || (mb->get_button_index() == BUTTON_LEFT && mode == MODE_DELETE)) {
if (dist_to_p < grab_threshold) {
-
undo_redo->create_action(TTR("Remove Point from Curve"));
undo_redo->add_do_method(curve.ptr(), "remove_point", i);
undo_redo->add_undo_method(curve.ptr(), "add_point", curve->get_point_position(i), curve->get_point_in(i), curve->get_point_out(i), i);
@@ -135,7 +128,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
undo_redo->commit_action();
return true;
} else if (dist_to_p_out < grab_threshold) {
-
undo_redo->create_action(TTR("Remove Out-Control from Curve"));
undo_redo->add_do_method(curve.ptr(), "set_point_out", i, Vector2());
undo_redo->add_undo_method(curve.ptr(), "set_point_out", i, curve->get_point_out(i));
@@ -144,7 +136,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
undo_redo->commit_action();
return true;
} else if (dist_to_p_in < grab_threshold) {
-
undo_redo->create_action(TTR("Remove In-Control from Curve"));
undo_redo->add_do_method(curve.ptr(), "set_point_in", i, Vector2());
undo_redo->add_undo_method(curve.ptr(), "set_point_in", i, curve->get_point_in(i));
@@ -159,7 +150,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
// Check for point creation.
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && ((mb->get_command() && mode == MODE_EDIT) || mode == MODE_CREATE)) {
-
Ref<Curve2D> curve = node->get_curve();
undo_redo->create_action(TTR("Add Point to Curve"));
@@ -189,11 +179,13 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
int len = curve->get_point_count();
for (int i = 0; i < len - 1; i++) {
float compareLength = curve->get_closest_offset(curve->get_point_position(i + 1));
- if (mbLength >= curve->get_closest_offset(curve->get_point_position(i)) && mbLength <= compareLength)
+ if (mbLength >= curve->get_closest_offset(curve->get_point_position(i)) && mbLength <= compareLength) {
insertion_point = i;
+ }
}
- if (insertion_point == -1)
+ if (insertion_point == -1) {
insertion_point = curve->get_point_count() - 2;
+ }
undo_redo->create_action(TTR("Split Curve"));
undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint2), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
@@ -216,18 +208,15 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
// Check for point movement completion.
if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && action != ACTION_NONE) {
-
Ref<Curve2D> curve = node->get_curve();
Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
switch (action) {
-
case ACTION_NONE:
// N/A, handled in above condition.
break;
case ACTION_MOVING_POINT: {
-
undo_redo->create_action(TTR("Move Point in Curve"));
undo_redo->add_do_method(curve.ptr(), "set_point_position", action_point, cpoint);
undo_redo->add_undo_method(curve.ptr(), "set_point_position", action_point, moving_from);
@@ -238,7 +227,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} break;
case ACTION_MOVING_IN: {
-
undo_redo->create_action(TTR("Move In-Control in Curve"));
undo_redo->add_do_method(curve.ptr(), "set_point_in", action_point, new_pos);
undo_redo->add_undo_method(curve.ptr(), "set_point_in", action_point, moving_from);
@@ -254,7 +242,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} break;
case ACTION_MOVING_OUT: {
-
undo_redo->create_action(TTR("Move Out-Control in Curve"));
undo_redo->add_do_method(curve.ptr(), "set_point_out", action_point, new_pos);
undo_redo->add_undo_method(curve.ptr(), "set_point_out", action_point, moving_from);
@@ -279,7 +266,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
-
if (action == ACTION_NONE && mode == MODE_EDIT) {
// Handle Edge Follow
bool old_edge = on_edge;
@@ -288,10 +274,12 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Vector2 gpoint = mm->get_position();
Ref<Curve2D> curve = node->get_curve();
- if (curve == nullptr)
+ if (curve == nullptr) {
return true;
- if (curve->get_point_count() < 2)
+ }
+ if (curve->get_point_count() < 2) {
return true;
+ }
// Find edge
edge_point = xform.xform(curve->get_closest_point(xform.affine_inverse().xform(mm->get_position())));
@@ -336,7 +324,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
switch (action) {
-
case ACTION_NONE:
// N/A, handled in above condition.
break;
@@ -348,15 +335,17 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
case ACTION_MOVING_IN: {
curve->set_point_in(action_point, new_pos);
- if (mirror_handle_angle)
+ if (mirror_handle_angle) {
curve->set_point_out(action_point, mirror_handle_length ? -new_pos : (-new_pos.normalized() * orig_out_length));
+ }
} break;
case ACTION_MOVING_OUT: {
curve->set_point_out(action_point, new_pos);
- if (mirror_handle_angle)
+ if (mirror_handle_angle) {
curve->set_point_in(action_point, mirror_handle_length ? -new_pos : (-new_pos.normalized() * orig_in_length));
+ }
} break;
}
@@ -369,9 +358,9 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
void Path2DEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
-
- if (!node || !node->is_visible_in_tree() || !node->get_curve().is_valid())
+ if (!node || !node->is_visible_in_tree() || !node->get_curve().is_valid()) {
return;
+ }
Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
@@ -428,77 +417,73 @@ void Path2DEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
}
void Path2DEditor::_node_visibility_changed() {
- if (!node)
+ if (!node) {
return;
+ }
canvas_item_editor->update_viewport();
}
void Path2DEditor::edit(Node *p_path2d) {
-
if (!canvas_item_editor) {
canvas_item_editor = CanvasItemEditor::get_singleton();
}
if (p_path2d) {
-
node = Object::cast_to<Path2D>(p_path2d);
- if (!node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed)))
+ if (!node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed))) {
node->connect("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed));
+ }
} else {
-
// node may have been deleted at this point
- if (node && node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed)))
+ if (node && node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed))) {
node->disconnect("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed));
+ }
node = nullptr;
}
}
void Path2DEditor::_bind_methods() {
-
//ClassDB::bind_method(D_METHOD("_menu_option"),&Path2DEditor::_menu_option);
}
void Path2DEditor::_mode_selected(int p_mode) {
-
if (p_mode == MODE_CREATE) {
-
curve_create->set_pressed(true);
curve_edit->set_pressed(false);
curve_edit_curve->set_pressed(false);
curve_del->set_pressed(false);
} else if (p_mode == MODE_EDIT) {
-
curve_create->set_pressed(false);
curve_edit->set_pressed(true);
curve_edit_curve->set_pressed(false);
curve_del->set_pressed(false);
} else if (p_mode == MODE_EDIT_CURVE) {
-
curve_create->set_pressed(false);
curve_edit->set_pressed(false);
curve_edit_curve->set_pressed(true);
curve_del->set_pressed(false);
} else if (p_mode == MODE_DELETE) {
-
curve_create->set_pressed(false);
curve_edit->set_pressed(false);
curve_edit_curve->set_pressed(false);
curve_del->set_pressed(true);
} else if (p_mode == ACTION_CLOSE) {
-
//?
- if (!node->get_curve().is_valid())
+ if (!node->get_curve().is_valid()) {
return;
- if (node->get_curve()->get_point_count() < 3)
+ }
+ if (node->get_curve()->get_point_count() < 3) {
return;
+ }
Vector2 begin = node->get_curve()->get_point_position(0);
Vector2 end = node->get_curve()->get_point_position(node->get_curve()->get_point_count() - 1);
- if (begin.distance_to(end) < CMP_EPSILON)
+ if (begin.distance_to(end) < CMP_EPSILON) {
return;
+ }
undo_redo->create_action(TTR("Remove Point from Curve"));
undo_redo->add_do_method(node->get_curve().ptr(), "add_point", begin);
@@ -513,7 +498,6 @@ void Path2DEditor::_mode_selected(int p_mode) {
}
void Path2DEditor::_handle_option_pressed(int p_option) {
-
PopupMenu *pm;
pm = handle_menu->get_popup();
@@ -533,7 +517,6 @@ void Path2DEditor::_handle_option_pressed(int p_option) {
}
Path2DEditor::Path2DEditor(EditorNode *p_editor) {
-
canvas_item_editor = nullptr;
editor = p_editor;
undo_redo = editor->get_undo_redo();
@@ -603,23 +586,19 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
}
void Path2DEditorPlugin::edit(Object *p_object) {
-
path2d_editor->edit(Object::cast_to<Node>(p_object));
}
bool Path2DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("Path2D");
}
void Path2DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
path2d_editor->show();
path2d_editor->base_hb->show();
} else {
-
path2d_editor->hide();
path2d_editor->base_hb->hide();
path2d_editor->edit(nullptr);
@@ -627,7 +606,6 @@ void Path2DEditorPlugin::make_visible(bool p_visible) {
}
Path2DEditorPlugin::Path2DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
path2d_editor = memnew(Path2DEditor(p_node));
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(path2d_editor);
diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h
index aae0e11c99..390dfdfdf7 100644
--- a/editor/plugins/path_2d_editor_plugin.h
+++ b/editor/plugins/path_2d_editor_plugin.h
@@ -39,7 +39,6 @@
class CanvasItemEditor;
class Path2DEditor : public HBoxContainer {
-
GDCLASS(Path2DEditor, HBoxContainer);
UndoRedo *undo_redo;
@@ -112,7 +111,6 @@ public:
};
class Path2DEditorPlugin : public EditorPlugin {
-
GDCLASS(Path2DEditorPlugin, EditorPlugin);
Path2DEditor *path2d_editor;
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 6c475d829f..25cffa3d6c 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -30,18 +30,19 @@
#include "path_3d_editor_plugin.h"
+#include "core/math/geometry_2d.h"
+#include "core/math/geometry_3d.h"
#include "core/os/keyboard.h"
#include "node_3d_editor_plugin.h"
#include "scene/resources/curve.h"
String Path3DGizmo::get_handle_name(int p_idx) const {
-
Ref<Curve3D> c = path->get_curve();
- if (c.is_null())
+ if (c.is_null()) {
return "";
+ }
if (p_idx < c->get_point_count()) {
-
return TTR("Curve Point #") + itos(p_idx);
}
@@ -50,21 +51,22 @@ String Path3DGizmo::get_handle_name(int p_idx) const {
int idx = p_idx / 2;
int t = p_idx % 2;
String n = TTR("Curve Point #") + itos(idx);
- if (t == 0)
+ if (t == 0) {
n += " In";
- else
+ } else {
n += " Out";
+ }
return n;
}
-Variant Path3DGizmo::get_handle_value(int p_idx) {
+Variant Path3DGizmo::get_handle_value(int p_idx) {
Ref<Curve3D> c = path->get_curve();
- if (c.is_null())
+ if (c.is_null()) {
return Variant();
+ }
if (p_idx < c->get_point_count()) {
-
original = c->get_point_position(p_idx);
return original;
}
@@ -75,20 +77,22 @@ Variant Path3DGizmo::get_handle_value(int p_idx) {
int t = p_idx % 2;
Vector3 ofs;
- if (t == 0)
+ if (t == 0) {
ofs = c->get_point_in(idx);
- else
+ } else {
ofs = c->get_point_out(idx);
+ }
original = ofs + c->get_point_position(idx);
return ofs;
}
-void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) {
Ref<Curve3D> c = path->get_curve();
- if (c.is_null())
+ if (c.is_null()) {
return;
+ }
Transform gt = path->get_global_transform();
Transform gi = gt.affine_inverse();
@@ -97,13 +101,11 @@ void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_poin
// Setting curve point positions
if (p_idx < c->get_point_count()) {
-
Plane p(gt.xform(original), p_camera->get_transform().basis.get_axis(2));
Vector3 inters;
if (p.intersects_ray(ray_from, ray_dir, &inters)) {
-
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
float snap = Node3DEditor::get_singleton()->get_translate_snap();
inters.snap(Vector3(snap, snap, snap));
@@ -129,7 +131,6 @@ void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_poin
// Setting curve in/out positions
if (p.intersects_ray(ray_from, ray_dir, &inters)) {
-
if (!Path3DEditorPlugin::singleton->is_handle_clicked()) {
orig_in_length = c->get_point_in(idx).length();
orig_out_length = c->get_point_out(idx).length();
@@ -144,28 +145,28 @@ void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_poin
if (t == 0) {
c->set_point_in(idx, local);
- if (Path3DEditorPlugin::singleton->mirror_angle_enabled())
+ if (Path3DEditorPlugin::singleton->mirror_angle_enabled()) {
c->set_point_out(idx, Path3DEditorPlugin::singleton->mirror_length_enabled() ? -local : (-local.normalized() * orig_out_length));
+ }
} else {
c->set_point_out(idx, local);
- if (Path3DEditorPlugin::singleton->mirror_angle_enabled())
+ if (Path3DEditorPlugin::singleton->mirror_angle_enabled()) {
c->set_point_in(idx, Path3DEditorPlugin::singleton->mirror_length_enabled() ? -local : (-local.normalized() * orig_in_length));
+ }
}
}
}
void Path3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_cancel) {
-
Ref<Curve3D> c = path->get_curve();
- if (c.is_null())
+ if (c.is_null()) {
return;
+ }
UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
if (p_idx < c->get_point_count()) {
-
if (p_cancel) {
-
c->set_point_position(p_idx, p_restore);
return;
}
@@ -218,7 +219,6 @@ void Path3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_canc
}
void Path3DGizmo::redraw() {
-
clear();
Ref<StandardMaterial3D> path_material = gizmo_plugin->get_material("path_material", this);
@@ -226,21 +226,22 @@ void Path3DGizmo::redraw() {
Ref<StandardMaterial3D> handles_material = gizmo_plugin->get_material("handles");
Ref<Curve3D> c = path->get_curve();
- if (c.is_null())
+ if (c.is_null()) {
return;
+ }
Vector<Vector3> v3a = c->tessellate();
//Vector<Vector3> v3a=c->get_baked_points();
int v3s = v3a.size();
- if (v3s == 0)
+ if (v3s == 0) {
return;
+ }
Vector<Vector3> v3p;
const Vector3 *r = v3a.ptr();
// BUG: the following won't work when v3s, avoid drawing as a temporary workaround.
for (int i = 0; i < v3s - 1; i++) {
-
v3p.push_back(r[i]);
v3p.push_back(r[i + 1]);
//v3p.push_back(r[i]);
@@ -258,7 +259,6 @@ void Path3DGizmo::redraw() {
Vector<Vector3> sec_handles;
for (int i = 0; i < c->get_point_count(); i++) {
-
Vector3 p = c->get_point_position(i);
handles.push_back(p);
if (i > 0) {
@@ -287,18 +287,18 @@ void Path3DGizmo::redraw() {
}
Path3DGizmo::Path3DGizmo(Path3D *p_path) {
-
path = p_path;
set_spatial_node(p_path);
}
bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
-
- if (!path)
+ if (!path) {
return false;
+ }
Ref<Curve3D> c = path->get_curve();
- if (c.is_null())
+ if (c.is_null()) {
return false;
+ }
Transform gt = path->get_global_transform();
Transform it = gt.affine_inverse();
@@ -307,11 +307,11 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
-
Point2 mbpos(mb->get_position().x, mb->get_position().y);
- if (!mb->is_pressed())
+ if (!mb->is_pressed()) {
set_handle_clicked(false);
+ }
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb->get_control()))) {
//click into curve, break it down
@@ -325,17 +325,18 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
if (rc >= 2) {
const Vector3 *r = v3a.ptr();
- if (p_camera->unproject_position(gt.xform(c->get_point_position(0))).distance_to(mbpos) < click_dist)
+ if (p_camera->unproject_position(gt.xform(c->get_point_position(0))).distance_to(mbpos) < click_dist) {
return false; //nope, existing
+ }
for (int i = 0; i < c->get_point_count() - 1; i++) {
//find the offset and point index of the place to break up
int j = idx;
- if (p_camera->unproject_position(gt.xform(c->get_point_position(i + 1))).distance_to(mbpos) < click_dist)
+ if (p_camera->unproject_position(gt.xform(c->get_point_position(i + 1))).distance_to(mbpos) < click_dist) {
return false; //nope, existing
+ }
while (j < rc && c->get_point_position(i + 1) != r[j]) {
-
Vector3 from = r[j];
Vector3 to = r[j + 1];
real_t cdist = from.distance_to(to);
@@ -345,31 +346,32 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
Vector2 s[2];
s[0] = p_camera->unproject_position(from);
s[1] = p_camera->unproject_position(to);
- Vector2 inters = Geometry::get_closest_point_to_segment_2d(mbpos, s);
+ Vector2 inters = Geometry2D::get_closest_point_to_segment(mbpos, s);
float d = inters.distance_to(mbpos);
if (d < 10 && d < closest_d) {
-
closest_d = d;
closest_seg = i;
Vector3 ray_from = p_camera->project_ray_origin(mbpos);
Vector3 ray_dir = p_camera->project_ray_normal(mbpos);
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(ray_from, ray_from + ray_dir * 4096, from, to, ra, rb);
+ Geometry3D::get_closest_points_between_segments(ray_from, ray_from + ray_dir * 4096, from, to, ra, rb);
closest_seg_point = it.xform(rb);
}
}
j++;
}
- if (idx == j)
+ if (idx == j) {
idx++; //force next
- else
+ } else {
idx = j; //swap
+ }
- if (j == rc)
+ if (j == rc) {
break;
+ }
}
}
@@ -384,19 +386,18 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
return true;
} else {
-
Vector3 org;
- if (c->get_point_count() == 0)
+ if (c->get_point_count() == 0) {
org = path->get_transform().get_origin();
- else
+ } else {
org = gt.xform(c->get_point_position(c->get_point_count() - 1));
+ }
Plane p(org, p_camera->get_transform().basis.get_axis(2));
Vector3 ray_from = p_camera->project_ray_origin(mbpos);
Vector3 ray_dir = p_camera->project_ray_normal(mbpos);
Vector3 inters;
if (p.intersects_ray(ray_from, ray_dir, &inters)) {
-
ur->create_action(TTR("Add Point to Curve"));
ur->add_do_method(c.ptr(), "add_point", it.xform(inters), Vector3(), Vector3(), -1);
ur->add_undo_method(c.ptr(), "remove_point", c->get_point_count());
@@ -408,7 +409,6 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
}
} else if (mb->is_pressed() && ((mb->get_button_index() == BUTTON_LEFT && curve_del->is_pressed()) || (mb->get_button_index() == BUTTON_RIGHT && curve_edit->is_pressed()))) {
-
for (int i = 0; i < c->get_point_count(); i++) {
real_t dist_to_p = p_camera->unproject_position(gt.xform(c->get_point_position(i))).distance_to(mbpos);
real_t dist_to_p_out = p_camera->unproject_position(gt.xform(c->get_point_position(i) + c->get_point_out(i))).distance_to(mbpos);
@@ -417,7 +417,6 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
// Find the offset and point index of the place to break up.
// Also check for the control points.
if (dist_to_p < click_dist) {
-
UndoRedo *ur = editor->get_undo_redo();
ur->create_action(TTR("Remove Path Point"));
ur->add_do_method(c.ptr(), "remove_point", i);
@@ -425,7 +424,6 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
ur->commit_action();
return true;
} else if (dist_to_p_out < click_dist) {
-
UndoRedo *ur = editor->get_undo_redo();
ur->create_action(TTR("Remove Out-Control Point"));
ur->add_do_method(c.ptr(), "set_point_out", i, Vector3());
@@ -433,7 +431,6 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
ur->commit_action();
return true;
} else if (dist_to_p_in < click_dist) {
-
UndoRedo *ur = editor->get_undo_redo();
ur->create_action(TTR("Remove In-Control Point"));
ur->add_do_method(c.ptr(), "set_point_in", i, Vector3());
@@ -449,11 +446,9 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
}
void Path3DEditorPlugin::edit(Object *p_object) {
-
if (p_object) {
path = Object::cast_to<Path3D>(p_object);
if (path) {
-
if (path->get_curve().is_valid()) {
path->get_curve()->emit_signal("changed");
}
@@ -469,14 +464,11 @@ void Path3DEditorPlugin::edit(Object *p_object) {
}
bool Path3DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("Path3D");
}
void Path3DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
curve_create->show();
curve_edit->show();
curve_del->show();
@@ -484,7 +476,6 @@ void Path3DEditorPlugin::make_visible(bool p_visible) {
handle_menu->show();
sep->show();
} else {
-
curve_create->hide();
curve_edit->hide();
curve_del->hide();
@@ -503,24 +494,23 @@ void Path3DEditorPlugin::make_visible(bool p_visible) {
}
void Path3DEditorPlugin::_mode_changed(int p_idx) {
-
curve_create->set_pressed(p_idx == 0);
curve_edit->set_pressed(p_idx == 1);
curve_del->set_pressed(p_idx == 2);
}
void Path3DEditorPlugin::_close_curve() {
-
Ref<Curve3D> c = path->get_curve();
- if (c.is_null())
+ if (c.is_null()) {
return;
- if (c->get_point_count() < 2)
+ }
+ if (c->get_point_count() < 2) {
return;
+ }
c->add_point(c->get_point_position(0), c->get_point_in(0), c->get_point_out(0));
}
void Path3DEditorPlugin::_handle_option_pressed(int p_option) {
-
PopupMenu *pm;
pm = handle_menu->get_popup();
@@ -540,9 +530,7 @@ void Path3DEditorPlugin::_handle_option_pressed(int p_option) {
}
void Path3DEditorPlugin::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
curve_create->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed), make_binds(0));
curve_edit->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed), make_binds(1));
curve_del->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed), make_binds(2));
@@ -556,7 +544,6 @@ void Path3DEditorPlugin::_bind_methods() {
Path3DEditorPlugin *Path3DEditorPlugin::singleton = nullptr;
Path3DEditorPlugin::Path3DEditorPlugin(EditorNode *p_node) {
-
path = nullptr;
editor = p_node;
singleton = this;
@@ -631,8 +618,9 @@ Ref<EditorNode3DGizmo> Path3DGizmoPlugin::create_gizmo(Node3D *p_spatial) {
Ref<Path3DGizmo> ref;
Path3D *path = Object::cast_to<Path3D>(p_spatial);
- if (path)
+ if (path) {
ref = Ref<Path3DGizmo>(memnew(Path3DGizmo(path)));
+ }
return ref;
}
@@ -646,7 +634,6 @@ int Path3DGizmoPlugin::get_priority() const {
}
Path3DGizmoPlugin::Path3DGizmoPlugin() {
-
Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8));
create_material("path_material", path_color);
create_material("path_thin_material", Color(0.5, 0.5, 0.5));
diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h
index 3f18cadacd..8bec5df797 100644
--- a/editor/plugins/path_3d_editor_plugin.h
+++ b/editor/plugins/path_3d_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/3d/path_3d.h"
class Path3DGizmo : public EditorNode3DGizmo {
-
GDCLASS(Path3DGizmo, EditorNode3DGizmo);
Path3D *path;
@@ -54,7 +53,6 @@ public:
};
class Path3DGizmoPlugin : public EditorNode3DGizmoPlugin {
-
GDCLASS(Path3DGizmoPlugin, EditorNode3DGizmoPlugin);
protected:
@@ -67,7 +65,6 @@ public:
};
class Path3DEditorPlugin : public EditorPlugin {
-
GDCLASS(Path3DEditorPlugin, EditorPlugin);
Separator *sep;
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.cpp b/editor/plugins/physical_bone_3d_editor_plugin.cpp
index 6d38f7f318..bcbf88e7dc 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.cpp
+++ b/editor/plugins/physical_bone_3d_editor_plugin.cpp
@@ -37,7 +37,6 @@ void PhysicalBone3DEditor::_bind_methods() {
}
void PhysicalBone3DEditor::_on_toggle_button_transform_joint(bool p_is_pressed) {
-
_set_move_joint();
}
@@ -48,9 +47,7 @@ void PhysicalBone3DEditor::_set_move_joint() {
}
PhysicalBone3DEditor::PhysicalBone3DEditor(EditorNode *p_editor) :
- editor(p_editor),
- selected(nullptr) {
-
+ editor(p_editor) {
spatial_editor_hb = memnew(HBoxContainer);
spatial_editor_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
spatial_editor_hb->set_alignment(BoxContainer::ALIGN_BEGIN);
@@ -69,10 +66,7 @@ PhysicalBone3DEditor::PhysicalBone3DEditor(EditorNode *p_editor) :
hide();
}
-PhysicalBone3DEditor::~PhysicalBone3DEditor() {}
-
void PhysicalBone3DEditor::set_selected(PhysicalBone3D *p_pb) {
-
button_transform_joint->set_pressed(false);
_set_move_joint();
@@ -90,15 +84,12 @@ void PhysicalBone3DEditor::show() {
PhysicalBone3DEditorPlugin::PhysicalBone3DEditorPlugin(EditorNode *p_editor) :
editor(p_editor),
- selected(nullptr),
physical_bone_editor(editor) {}
void PhysicalBone3DEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
-
physical_bone_editor.show();
} else {
-
physical_bone_editor.hide();
physical_bone_editor.set_selected(nullptr);
selected = nullptr;
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.h b/editor/plugins/physical_bone_3d_editor_plugin.h
index 74932710d6..79c7cc4bb1 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.h
+++ b/editor/plugins/physical_bone_3d_editor_plugin.h
@@ -40,7 +40,7 @@ class PhysicalBone3DEditor : public Object {
HBoxContainer *spatial_editor_hb;
ToolButton *button_transform_joint;
- PhysicalBone3D *selected;
+ PhysicalBone3D *selected = nullptr;
protected:
static void _bind_methods();
@@ -51,7 +51,7 @@ private:
public:
PhysicalBone3DEditor(EditorNode *p_editor);
- ~PhysicalBone3DEditor();
+ ~PhysicalBone3DEditor() {}
void set_selected(PhysicalBone3D *p_pb);
@@ -63,7 +63,7 @@ class PhysicalBone3DEditorPlugin : public EditorPlugin {
GDCLASS(PhysicalBone3DEditorPlugin, EditorPlugin);
EditorNode *editor;
- PhysicalBone3D *selected;
+ PhysicalBone3D *selected = nullptr;
PhysicalBone3DEditor physical_bone_editor;
public:
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index e15d8556e4..1f98c0139b 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -32,6 +32,7 @@
#include "canvas_item_editor_plugin.h"
#include "core/input/input.h"
+#include "core/math/geometry_2d.h"
#include "core/os/file_access.h"
#include "core/os/keyboard.h"
#include "editor/editor_scale.h"
@@ -39,23 +40,19 @@
#include "scene/2d/skeleton_2d.h"
Node2D *Polygon2DEditor::_get_node() const {
-
return node;
}
void Polygon2DEditor::_set_node(Node *p_polygon) {
-
node = Object::cast_to<Polygon2D>(p_polygon);
_update_polygon_editing_state();
}
Vector2 Polygon2DEditor::_get_offset(int p_idx) const {
-
return node->get_offset();
}
int Polygon2DEditor::_get_polygon_count() const {
-
if (node->get_internal_vertex_count() > 0) {
return 0; //do not edit if internal vertices exist
} else {
@@ -64,17 +61,13 @@ int Polygon2DEditor::_get_polygon_count() const {
}
void Polygon2DEditor::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
-
uv_edit_draw->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree"));
bone_scroll->add_theme_style_override("bg", get_theme_stylebox("bg", "Tree"));
} break;
case NOTIFICATION_READY: {
-
button_uv->set_icon(get_theme_icon("Uv", "EditorIcons"));
uv_button[UV_MODE_CREATE]->set_icon(get_theme_icon("Edit", "EditorIcons"));
@@ -97,7 +90,6 @@ void Polygon2DEditor::_notification(int p_what) {
uv_hscroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE);
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
-
if (!is_visible()) {
uv_edit->hide();
}
@@ -106,7 +98,6 @@ void Polygon2DEditor::_notification(int p_what) {
}
void Polygon2DEditor::_sync_bones() {
-
Skeleton2D *skeleton = nullptr;
if (!node->has_node(node->get_skeleton())) {
error->set_text(TTR("The skeleton property of the Polygon2D does not point to a Skeleton2D node"));
@@ -161,7 +152,6 @@ void Polygon2DEditor::_sync_bones() {
}
void Polygon2DEditor::_update_bone_list() {
-
NodePath selected;
while (bone_scroll_vb->get_child_count()) {
CheckBox *cb = Object::cast_to<CheckBox>(bone_scroll_vb->get_child(0));
@@ -189,8 +179,9 @@ void Polygon2DEditor::_update_bone_list() {
cb->set_focus_mode(FOCUS_NONE);
bone_scroll_vb->add_child(cb);
- if (np == selected || bone_scroll_vb->get_child_count() < 2)
+ if (np == selected || bone_scroll_vb->get_child_count() < 2) {
cb->set_pressed(true);
+ }
cb->connect("pressed", callable_mp(this, &Polygon2DEditor::_bone_paint_selected), varray(i));
}
@@ -203,7 +194,6 @@ void Polygon2DEditor::_bone_paint_selected(int p_index) {
}
void Polygon2DEditor::_uv_edit_mode_select(int p_mode) {
-
if (p_mode == 0) { //uv
uv_button[UV_MODE_CREATE]->hide();
@@ -274,20 +264,15 @@ void Polygon2DEditor::_uv_edit_mode_select(int p_mode) {
}
void Polygon2DEditor::_uv_edit_popup_hide() {
-
EditorSettings::get_singleton()->set("interface/dialogs/uv_editor_bounds", Rect2(uv_edit->get_position(), uv_edit->get_size()));
_cancel_editing();
}
void Polygon2DEditor::_menu_option(int p_option) {
-
switch (p_option) {
-
case MODE_EDIT_UV: {
-
if (node->get_texture().is_null()) {
-
error->set_text(TTR("No texture in this polygon.\nSet a texture to be able to edit UV."));
error->popup_centered();
return;
@@ -304,17 +289,18 @@ void Polygon2DEditor::_menu_option(int p_option) {
undo_redo->commit_action();
}
- if (EditorSettings::get_singleton()->has_setting("interface/dialogs/uv_editor_bounds"))
+ if (EditorSettings::get_singleton()->has_setting("interface/dialogs/uv_editor_bounds")) {
uv_edit->popup(EditorSettings::get_singleton()->get("interface/dialogs/uv_editor_bounds"));
- else
+ } else {
uv_edit->popup_centered_ratio(0.85);
+ }
_update_bone_list();
} break;
case UVEDIT_POLYGON_TO_UV: {
-
Vector<Vector2> points = node->get_polygon();
- if (points.size() == 0)
+ if (points.size() == 0) {
break;
+ }
Vector<Vector2> uvs = node->get_uv();
undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node, "set_uv", points);
@@ -324,11 +310,11 @@ void Polygon2DEditor::_menu_option(int p_option) {
undo_redo->commit_action();
} break;
case UVEDIT_UV_TO_POLYGON: {
-
Vector<Vector2> points = node->get_polygon();
Vector<Vector2> uvs = node->get_uv();
- if (uvs.size() == 0)
+ if (uvs.size() == 0) {
break;
+ }
undo_redo->create_action(TTR("Create Polygon"));
undo_redo->add_do_method(node, "set_polygon", uvs);
@@ -338,10 +324,10 @@ void Polygon2DEditor::_menu_option(int p_option) {
undo_redo->commit_action();
} break;
case UVEDIT_UV_CLEAR: {
-
Vector<Vector2> uvs = node->get_uv();
- if (uvs.size() == 0)
+ if (uvs.size() == 0) {
break;
+ }
undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node, "set_uv", Vector<Vector2>());
undo_redo->add_undo_method(node, "set_uv", uvs);
@@ -350,18 +336,15 @@ void Polygon2DEditor::_menu_option(int p_option) {
undo_redo->commit_action();
} break;
case UVEDIT_GRID_SETTINGS: {
-
grid_settings->popup_centered();
} break;
default: {
-
AbstractPolygon2DEditor::_menu_option(p_option);
} break;
}
}
void Polygon2DEditor::_cancel_editing() {
-
if (uv_create) {
uv_drag = false;
uv_create = false;
@@ -386,18 +369,18 @@ void Polygon2DEditor::_cancel_editing() {
}
void Polygon2DEditor::_update_polygon_editing_state() {
-
- if (!_get_node())
+ if (!_get_node()) {
return;
+ }
- if (node->get_internal_vertex_count() > 0)
+ if (node->get_internal_vertex_count() > 0) {
disable_polygon_editing(true, TTR("Polygon 2D has internal vertices, so it can no longer be edited in the viewport."));
- else
+ } else {
disable_polygon_editing(false, String());
+ }
}
void Polygon2DEditor::_commit_action() {
-
// Makes that undo/redoing actions made outside of the UV editor still affect its polygon.
undo_redo->add_do_method(uv_edit_draw, "update");
undo_redo->add_undo_method(uv_edit_draw, "update");
@@ -442,7 +425,6 @@ void Polygon2DEditor::_set_snap_step_y(float p_val) {
}
void Polygon2DEditor::_uv_mode(int p_mode) {
-
polygon_create.clear();
uv_drag = false;
uv_create = false;
@@ -454,9 +436,9 @@ void Polygon2DEditor::_uv_mode(int p_mode) {
}
void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
-
- if (!_get_node())
+ if (!_get_node()) {
return;
+ }
Transform2D mtx;
mtx.elements[2] = -uv_draw_ofs;
@@ -465,11 +447,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid()) {
-
if (mb->get_button_index() == BUTTON_LEFT) {
-
if (mb->is_pressed()) {
-
uv_drag_from = snap_point(Vector2(mb->get_position().x, mb->get_position().y));
uv_drag = true;
points_prev = node->get_uv();
@@ -482,9 +461,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
uv_move_current = uv_mode;
if (uv_move_current == UV_MODE_CREATE) {
-
if (!uv_create) {
-
points_prev.resize(0);
Vector2 tuv = mtx.affine_inverse().xform(snap_point(Vector2(mb->get_position().x, mb->get_position().y)));
points_prev.push_back(tuv);
@@ -506,7 +483,6 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
uv_edit_draw->update();
} else {
-
Vector2 tuv = mtx.affine_inverse().xform(snap_point(Vector2(mb->get_position().x, mb->get_position().y)));
if (points_prev.size() > 2 && tuv.distance_to(points_prev[0]) < 8) {
@@ -544,7 +520,6 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (uv_move_current == UV_MODE_CREATE_INTERNAL) {
-
uv_create_uv_prev = node->get_uv();
uv_create_poly_prev = node->get_polygon();
uv_create_colors_prev = node->get_vertex_colors();
@@ -582,21 +557,20 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (uv_move_current == UV_MODE_REMOVE_INTERNAL) {
-
uv_create_uv_prev = node->get_uv();
uv_create_poly_prev = node->get_polygon();
uv_create_colors_prev = node->get_vertex_colors();
uv_create_bones_prev = node->call("_get_bones");
int internal_vertices = node->get_internal_vertex_count();
- if (internal_vertices <= 0)
+ if (internal_vertices <= 0) {
return;
+ }
int closest = -1;
float closest_dist = 1e20;
for (int i = points_prev.size() - internal_vertices; i < points_prev.size(); i++) {
-
Vector2 tuv = mtx.xform(uv_create_poly_prev[i]);
float dist = tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y));
if (dist < 8 && dist < closest_dist) {
@@ -605,8 +579,9 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
}
- if (closest == -1)
+ if (closest == -1) {
return;
+ }
uv_create_poly_prev.remove(closest);
uv_create_uv_prev.remove(closest);
@@ -637,20 +612,18 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (uv_move_current == UV_MODE_EDIT_POINT) {
-
- if (mb->get_shift() && mb->get_command())
+ if (mb->get_shift() && mb->get_command()) {
uv_move_current = UV_MODE_SCALE;
- else if (mb->get_shift())
+ } else if (mb->get_shift()) {
uv_move_current = UV_MODE_MOVE;
- else if (mb->get_command())
+ } else if (mb->get_command()) {
uv_move_current = UV_MODE_ROTATE;
+ }
}
if (uv_move_current == UV_MODE_EDIT_POINT) {
-
point_drag_index = -1;
for (int i = 0; i < points_prev.size(); i++) {
-
Vector2 tuv = mtx.xform(points_prev[i]);
if (tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y)) < 8) {
uv_drag_from = tuv;
@@ -664,12 +637,10 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (uv_move_current == UV_MODE_ADD_POLYGON) {
-
int closest = -1;
float closest_dist = 1e20;
for (int i = 0; i < points_prev.size(); i++) {
-
Vector2 tuv = mtx.xform(points_prev[i]);
float dist = tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y));
if (dist < 8 && dist < closest_dist) {
@@ -717,12 +688,13 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
polys.resize(points.size());
for (int j = 0; j < polys.size(); j++) {
int idx = points[j];
- if (idx < 0 || idx >= points_prev.size())
+ if (idx < 0 || idx >= points_prev.size()) {
continue;
+ }
polys.write[j] = mtx.xform(points_prev[idx]);
}
- if (Geometry::is_point_in_polygon(Vector2(mb->get_position().x, mb->get_position().y), polys)) {
+ if (Geometry2D::is_point_in_polygon(Vector2(mb->get_position().x, mb->get_position().y), polys)) {
erase_index = i;
break;
}
@@ -740,7 +712,6 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (uv_move_current == UV_MODE_PAINT_WEIGHT || uv_move_current == UV_MODE_CLEAR_WEIGHT) {
-
int bone_selected = -1;
for (int i = 0; i < bone_scroll_vb->get_child_count(); i++) {
CheckBox *c = Object::cast_to<CheckBox>(bone_scroll_vb->get_child(i));
@@ -751,7 +722,6 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (bone_selected != -1 && node->get_bone_weights(bone_selected).size() == points_prev.size()) {
-
prev_weights = node->get_bone_weights(bone_selected);
bone_painting = true;
bone_painting_bone = bone_selected;
@@ -759,7 +729,6 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
} else if (uv_drag && !uv_create) {
-
if (uv_edit_mode[0]->is_pressed()) { // Edit UV.
undo_redo->create_action(TTR("Transform UV Map"));
undo_redo->add_do_method(node, "set_uv", node->get_uv());
@@ -778,7 +747,6 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
uv_drag = false;
} else if (bone_painting) {
-
undo_redo->create_action(TTR("Paint Bone Weights"));
undo_redo->add_do_method(node, "set_bone_weights", bone_painting_bone, node->get_bone_weights(bone_painting_bone));
undo_redo->add_undo_method(node, "set_bone_weights", bone_painting_bone, prev_weights);
@@ -789,19 +757,17 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
} else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
-
_cancel_editing();
- if (bone_painting)
+ if (bone_painting) {
node->set_bone_weights(bone_painting_bone, prev_weights);
+ }
uv_edit_draw->update();
} else if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
-
uv_zoom->set_value(uv_zoom->get_value() / (1 - (0.1 * mb->get_factor())));
} else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
-
uv_zoom->set_value(uv_zoom->get_value() * (1 - (0.1 * mb->get_factor())));
}
}
@@ -809,29 +775,23 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMouseMotion> mm = p_input;
if (mm.is_valid()) {
-
if ((mm->get_button_mask() & BUTTON_MASK_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
-
Vector2 drag(mm->get_relative().x, mm->get_relative().y);
uv_hscroll->set_value(uv_hscroll->get_value() - drag.x);
uv_vscroll->set_value(uv_vscroll->get_value() - drag.y);
} else if (uv_drag) {
-
Vector2 uv_drag_to = mm->get_position();
uv_drag_to = snap_point(uv_drag_to); // FIXME: Only works correctly with 'UV_MODE_EDIT_POINT', it's imprecise with the rest.
Vector2 drag = mtx.affine_inverse().xform(uv_drag_to) - mtx.affine_inverse().xform(uv_drag_from);
switch (uv_move_current) {
-
case UV_MODE_CREATE: {
-
if (uv_create) {
uv_create_to = mtx.affine_inverse().xform(snap_point(Vector2(mm->get_position().x, mm->get_position().y)));
}
} break;
case UV_MODE_EDIT_POINT: {
-
Vector<Vector2> uv_new = points_prev;
uv_new.set(point_drag_index, uv_new[point_drag_index] + drag);
@@ -842,10 +802,10 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
} break;
case UV_MODE_MOVE: {
-
Vector<Vector2> uv_new = points_prev;
- for (int i = 0; i < uv_new.size(); i++)
+ for (int i = 0; i < uv_new.size(); i++) {
uv_new.set(i, uv_new[i] + drag);
+ }
if (uv_edit_mode[0]->is_pressed()) { //edit uv
node->set_uv(uv_new);
@@ -854,12 +814,12 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
} break;
case UV_MODE_ROTATE: {
-
Vector2 center;
Vector<Vector2> uv_new = points_prev;
- for (int i = 0; i < uv_new.size(); i++)
+ for (int i = 0; i < uv_new.size(); i++) {
center += points_prev[i];
+ }
center /= uv_new.size();
float angle = (uv_drag_from - mtx.xform(center)).normalized().angle_to((uv_drag_to - mtx.xform(center)).normalized());
@@ -877,18 +837,19 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
} break;
case UV_MODE_SCALE: {
-
Vector2 center;
Vector<Vector2> uv_new = points_prev;
- for (int i = 0; i < uv_new.size(); i++)
+ for (int i = 0; i < uv_new.size(); i++) {
center += points_prev[i];
+ }
center /= uv_new.size();
float from_dist = uv_drag_from.distance_to(mtx.xform(center));
float to_dist = uv_drag_to.distance_to(mtx.xform(center));
- if (from_dist < 2)
+ if (from_dist < 2) {
break;
+ }
float scale = to_dist / from_dist;
@@ -906,7 +867,6 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
} break;
case UV_MODE_PAINT_WEIGHT:
case UV_MODE_CLEAR_WEIGHT: {
-
bone_paint_pos = Vector2(mm->get_position().x, mm->get_position().y);
} break;
default: {
@@ -952,22 +912,20 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMagnifyGesture> magnify_gesture = p_input;
if (magnify_gesture.is_valid()) {
-
uv_zoom->set_value(uv_zoom->get_value() * magnify_gesture->get_factor());
}
Ref<InputEventPanGesture> pan_gesture = p_input;
if (pan_gesture.is_valid()) {
-
uv_hscroll->set_value(uv_hscroll->get_value() + uv_hscroll->get_page() * pan_gesture->get_delta().x / 8);
uv_vscroll->set_value(uv_vscroll->get_value() + uv_vscroll->get_page() * pan_gesture->get_delta().y / 8);
}
}
void Polygon2DEditor::_uv_scroll_changed(float) {
-
- if (updating_uv_scroll)
+ if (updating_uv_scroll) {
return;
+ }
uv_draw_ofs.x = uv_hscroll->get_value();
uv_draw_ofs.y = uv_vscroll->get_value();
@@ -976,13 +934,14 @@ void Polygon2DEditor::_uv_scroll_changed(float) {
}
void Polygon2DEditor::_uv_draw() {
-
- if (!uv_edit->is_visible() || !_get_node())
+ if (!uv_edit->is_visible() || !_get_node()) {
return;
+ }
Ref<Texture2D> base_tex = node->get_texture();
- if (base_tex.is_null())
+ if (base_tex.is_null()) {
return;
+ }
String warning;
@@ -1002,10 +961,12 @@ void Polygon2DEditor::_uv_draw() {
if (snap_step.x != 0) {
for (int i = 0; i < s.width; i++) {
int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(i, 0)).x - snap_offset.x) / snap_step.x));
- if (i == 0)
+ if (i == 0) {
last_cell = cell;
- if (last_cell != cell)
+ }
+ if (last_cell != cell) {
uv_edit_draw->draw_line(Point2(i, 0), Point2(i, s.height), grid_color, Math::round(EDSCALE));
+ }
last_cell = cell;
}
}
@@ -1013,10 +974,12 @@ void Polygon2DEditor::_uv_draw() {
if (snap_step.y != 0) {
for (int i = 0; i < s.height; i++) {
int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(0, i)).y - snap_offset.y) / snap_step.y));
- if (i == 0)
+ if (i == 0) {
last_cell = cell;
- if (last_cell != cell)
+ }
+ if (last_cell != cell) {
uv_edit_draw->draw_line(Point2(0, i), Point2(s.width, i), grid_color, Math::round(EDSCALE));
+ }
last_cell = cell;
}
}
@@ -1073,7 +1036,6 @@ void Polygon2DEditor::_uv_draw() {
}
for (int i = 0; i < uvs.size(); i++) {
-
int next = uv_draw_max > 0 ? (i + 1) % uv_draw_max : 0;
if (i < uv_draw_max && uv_drag && uv_move_current == UV_MODE_EDIT_POINT && EDITOR_DEF("editors/poly_editor/show_previous_outline", true)) {
@@ -1092,7 +1054,6 @@ void Polygon2DEditor::_uv_draw() {
}
for (int i = 0; i < polygons.size(); i++) {
-
Vector<int> points = polygons[i];
Vector<Vector2> polypoints;
for (int j = 0; j < points.size(); j++) {
@@ -1100,12 +1061,14 @@ void Polygon2DEditor::_uv_draw() {
int idx = points[j];
int idx_next = points[next];
- if (idx < 0 || idx >= uvs.size())
+ if (idx < 0 || idx >= uvs.size()) {
continue;
+ }
polypoints.push_back(mtx.xform(uvs[idx]));
- if (idx_next < 0 || idx_next >= uvs.size())
+ if (idx_next < 0 || idx_next >= uvs.size()) {
continue;
+ }
uv_edit_draw->draw_line(mtx.xform(uvs[idx]), mtx.xform(uvs[idx_next]), polygon_line_color, Math::round(EDSCALE));
}
if (points.size() >= 3) {
@@ -1114,7 +1077,6 @@ void Polygon2DEditor::_uv_draw() {
}
for (int i = 0; i < uvs.size(); i++) {
-
if (weight_r) {
Vector2 draw_pos = mtx.xform(uvs[i]);
float weight = weight_r[i];
@@ -1138,7 +1100,6 @@ void Polygon2DEditor::_uv_draw() {
}
if (uv_mode == UV_MODE_PAINT_WEIGHT || uv_mode == UV_MODE_CLEAR_WEIGHT) {
-
NodePath bone_path;
for (int i = 0; i < bone_scroll_vb->get_child_count(); i++) {
CheckBox *c = Object::cast_to<CheckBox>(bone_scroll_vb->get_child(i));
@@ -1154,20 +1115,20 @@ void Polygon2DEditor::_uv_draw() {
Skeleton2D *skeleton = Object::cast_to<Skeleton2D>(node->get_node(skeleton_path));
if (skeleton) {
for (int i = 0; i < skeleton->get_bone_count(); i++) {
-
Bone2D *bone = skeleton->get_bone(i);
- if (bone->get_rest() == Transform2D(0, 0, 0, 0, 0, 0))
+ if (bone->get_rest() == Transform2D(0, 0, 0, 0, 0, 0)) {
continue; //not set
+ }
bool current = bone_path == skeleton->get_path_to(bone);
bool found_child = false;
for (int j = 0; j < bone->get_child_count(); j++) {
-
Bone2D *n = Object::cast_to<Bone2D>(bone->get_child(j));
- if (!n)
+ if (!n) {
continue;
+ }
found_child = true;
@@ -1232,7 +1193,6 @@ void Polygon2DEditor::_uv_draw() {
}
void Polygon2DEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_update_bone_list"), &Polygon2DEditor::_update_bone_list);
ClassDB::bind_method(D_METHOD("_update_polygon_editing_state"), &Polygon2DEditor::_update_polygon_editing_state);
}
@@ -1248,7 +1208,6 @@ Vector2 Polygon2DEditor::snap_point(Vector2 p_target) const {
Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
AbstractPolygon2DEditor(p_editor) {
-
node = nullptr;
snap_offset = EditorSettings::get_singleton()->get_project_metadata("polygon_2d_uv_editor", "snap_offset", Vector2());
snap_step = EditorSettings::get_singleton()->get_project_metadata("polygon_2d_uv_editor", "snap_step", Vector2(10, 10));
@@ -1305,7 +1264,6 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_main_vb->add_child(uv_mode_hb);
for (int i = 0; i < UV_MODE_MAX; i++) {
-
uv_button[i] = memnew(ToolButton);
uv_button[i]->set_toggle_mode(true);
uv_mode_hb->add_child(uv_button[i]);
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index 2b00b50e5c..b94ae53e2b 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -35,7 +35,6 @@
#include "scene/gui/scroll_container.h"
class Polygon2DEditor : public AbstractPolygon2DEditor {
-
GDCLASS(Polygon2DEditor, AbstractPolygon2DEditor);
enum Mode {
@@ -165,7 +164,6 @@ public:
};
class Polygon2DEditorPlugin : public AbstractPolygon2DEditorPlugin {
-
GDCLASS(Polygon2DEditorPlugin, AbstractPolygon2DEditorPlugin);
public:
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index 852feeb675..75cb93ee76 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -39,13 +39,11 @@ void ResourcePreloaderEditor::_gui_input(Ref<InputEvent> p_event) {
}
void ResourcePreloaderEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
load->set_icon(get_theme_icon("Folder", "EditorIcons"));
}
if (p_what == NOTIFICATION_READY) {
-
//NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true);
}
@@ -54,9 +52,7 @@ void ResourcePreloaderEditor::_notification(int p_what) {
}
void ResourcePreloaderEditor::_files_load_request(const Vector<String> &p_paths) {
-
for (int i = 0; i < p_paths.size(); i++) {
-
String path = p_paths[i];
RES resource;
@@ -89,14 +85,14 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String> &p_paths)
}
void ResourcePreloaderEditor::_load_pressed() {
-
loading_scene = false;
file->clear_filters();
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("", &extensions);
- for (int i = 0; i < extensions.size(); i++)
+ for (int i = 0; i < extensions.size(); i++) {
file->add_filter("*." + extensions[i]);
+ }
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
@@ -104,9 +100,9 @@ void ResourcePreloaderEditor::_load_pressed() {
}
void ResourcePreloaderEditor::_item_edited() {
-
- if (!tree->get_selected())
+ if (!tree->get_selected()) {
return;
+ }
TreeItem *s = tree->get_selected();
@@ -114,11 +110,11 @@ void ResourcePreloaderEditor::_item_edited() {
// renamed
String old_name = s->get_metadata(0);
String new_name = s->get_text(0);
- if (old_name == new_name)
+ if (old_name == new_name) {
return;
+ }
if (new_name == "" || new_name.find("\\") != -1 || new_name.find("/") != -1 || preloader->has_resource(new_name)) {
-
s->set_text(0, old_name);
return;
}
@@ -136,7 +132,6 @@ void ResourcePreloaderEditor::_item_edited() {
}
void ResourcePreloaderEditor::_remove_resource(const String &p_to_remove) {
-
undo_redo->create_action(TTR("Delete Resource"));
undo_redo->add_do_method(preloader, "remove_resource", p_to_remove);
undo_redo->add_undo_method(preloader, "add_resource", p_to_remove, preloader->get_resource(p_to_remove));
@@ -146,7 +141,6 @@ void ResourcePreloaderEditor::_remove_resource(const String &p_to_remove) {
}
void ResourcePreloaderEditor::_paste_pressed() {
-
RES r = EditorSettings::get_singleton()->get_resource_clipboard();
if (!r.is_valid()) {
dialog->set_text(TTR("Resource clipboard is empty!"));
@@ -157,10 +151,12 @@ void ResourcePreloaderEditor::_paste_pressed() {
}
String name = r->get_name();
- if (name == "")
+ if (name == "") {
name = r->get_path().get_file();
- if (name == "")
+ }
+ if (name == "") {
name = r->get_class();
+ }
String basename = name;
int counter = 1;
@@ -178,7 +174,6 @@ void ResourcePreloaderEditor::_paste_pressed() {
}
void ResourcePreloaderEditor::_update_library() {
-
tree->clear();
tree->set_hide_root(true);
TreeItem *root = tree->create_item(nullptr);
@@ -194,7 +189,6 @@ void ResourcePreloaderEditor::_update_library() {
names.sort();
for (List<String>::Element *E = names.front(); E; E = E->next()) {
-
TreeItem *ti = tree->create_item(root);
ti->set_cell_mode(0, TreeItem::CELL_MODE_STRING);
ti->set_editable(0, true);
@@ -226,7 +220,6 @@ void ResourcePreloaderEditor::_update_library() {
}
void ResourcePreloaderEditor::_cell_button_pressed(Object *p_item, int p_column, int p_id) {
-
TreeItem *item = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!item);
@@ -244,42 +237,42 @@ void ResourcePreloaderEditor::_cell_button_pressed(Object *p_item, int p_column,
}
void ResourcePreloaderEditor::edit(ResourcePreloader *p_preloader) {
-
preloader = p_preloader;
if (p_preloader) {
_update_library();
} else {
-
hide();
set_physics_process(false);
}
}
Variant ResourcePreloaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
TreeItem *ti = tree->get_item_at_position(p_point);
- if (!ti)
+ if (!ti) {
return Variant();
+ }
String name = ti->get_metadata(0);
RES res = preloader->get_resource(name);
- if (!res.is_valid())
+ if (!res.is_valid()) {
return Variant();
+ }
return EditorNode::get_singleton()->drag_resource(res, p_from);
}
bool ResourcePreloaderEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return false;
+ }
- if (d.has("from") && (Object *)(d["from"]) == tree)
+ if (d.has("from") && (Object *)(d["from"]) == tree) {
return false;
+ }
if (String(d["type"]) == "resource" && d.has("resource")) {
RES r = d["resource"];
@@ -288,7 +281,6 @@ bool ResourcePreloaderEditor::can_drop_data_fw(const Point2 &p_point, const Vari
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
return files.size() != 0;
@@ -297,20 +289,20 @@ bool ResourcePreloaderEditor::can_drop_data_fw(const Point2 &p_point, const Vari
}
void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
- if (!can_drop_data_fw(p_point, p_data, p_from))
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return;
+ }
if (String(d["type"]) == "resource" && d.has("resource")) {
RES r = d["resource"];
if (r.is_valid()) {
-
String basename;
if (r->get_name() != "") {
basename = r->get_name();
@@ -337,7 +329,6 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
_files_load_request(files);
@@ -345,7 +336,6 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant
}
void ResourcePreloaderEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_gui_input"), &ResourcePreloaderEditor::_gui_input);
ClassDB::bind_method(D_METHOD("_update_library"), &ResourcePreloaderEditor::_update_library);
ClassDB::bind_method(D_METHOD("_remove_resource", "to_remove"), &ResourcePreloaderEditor::_remove_resource);
@@ -356,7 +346,6 @@ void ResourcePreloaderEditor::_bind_methods() {
}
ResourcePreloaderEditor::ResourcePreloaderEditor() {
-
//add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("panel","Panel"));
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -399,31 +388,29 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
}
void ResourcePreloaderEditorPlugin::edit(Object *p_object) {
-
preloader_editor->set_undo_redo(&get_undo_redo());
ResourcePreloader *s = Object::cast_to<ResourcePreloader>(p_object);
- if (!s)
+ if (!s) {
return;
+ }
preloader_editor->edit(s);
}
bool ResourcePreloaderEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("ResourcePreloader");
}
void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
//preloader_editor->show();
button->show();
editor->make_bottom_panel_item_visible(preloader_editor);
//preloader_editor->set_process(true);
} else {
-
- if (preloader_editor->is_visible_in_tree())
+ if (preloader_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
+ }
button->hide();
//preloader_editor->hide();
//preloader_editor->set_process(false);
@@ -431,7 +418,6 @@ void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) {
}
ResourcePreloaderEditorPlugin::ResourcePreloaderEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
preloader_editor = memnew(ResourcePreloaderEditor);
preloader_editor->set_custom_minimum_size(Size2(0, 250) * EDSCALE);
diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h
index 88e9cf4956..2d7a54eda5 100644
--- a/editor/plugins/resource_preloader_editor_plugin.h
+++ b/editor/plugins/resource_preloader_editor_plugin.h
@@ -39,7 +39,6 @@
#include "scene/main/resource_preloader.h"
class ResourcePreloaderEditor : public PanelContainer {
-
GDCLASS(ResourcePreloaderEditor, PanelContainer);
enum {
@@ -87,7 +86,6 @@ public:
};
class ResourcePreloaderEditorPlugin : public EditorPlugin {
-
GDCLASS(ResourcePreloaderEditorPlugin, EditorPlugin);
ResourcePreloaderEditor *preloader_editor;
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index a7120c5d68..e107435373 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -33,10 +33,10 @@
#include "scene/main/window.h"
void EditorPropertyRootMotion::_confirmed() {
-
TreeItem *ti = filters->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
NodePath path = ti->get_metadata(0);
emit_changed(get_edited_property(), path);
@@ -45,7 +45,6 @@ void EditorPropertyRootMotion::_confirmed() {
}
void EditorPropertyRootMotion::_node_assign() {
-
NodePath current = get_edited_object()->get(get_edited_property());
AnimationTree *atree = Object::cast_to<AnimationTree>(get_edited_object());
@@ -72,7 +71,6 @@ void EditorPropertyRootMotion::_node_assign() {
player->get_animation_list(&animations);
for (List<StringName>::Element *E = animations.front(); E; E = E->next()) {
-
Ref<Animation> anim = player->get_animation(E->get());
for (int i = 0; i < anim->get_track_count(); i++) {
paths.insert(anim->track_get_path(i));
@@ -86,7 +84,6 @@ void EditorPropertyRootMotion::_node_assign() {
Map<String, TreeItem *> parenthood;
for (Set<String>::Element *E = paths.front(); E; E = E->next()) {
-
NodePath path = E->get();
TreeItem *ti = nullptr;
String accum;
@@ -121,11 +118,11 @@ void EditorPropertyRootMotion::_node_assign() {
if (base->has_node(accum)) {
node = base->get_node(accum);
}
- if (!node)
+ if (!node) {
continue; //no node, can't edit
+ }
if (path.get_subname_count()) {
-
String concat = path.get_concatenated_subnames();
Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
@@ -194,13 +191,11 @@ void EditorPropertyRootMotion::_node_assign() {
}
void EditorPropertyRootMotion::_node_clear() {
-
emit_changed(get_edited_property(), NodePath());
update_property();
}
void EditorPropertyRootMotion::update_property() {
-
NodePath p = get_edited_object()->get(get_edited_property());
assign->set_tooltip(p);
@@ -235,12 +230,10 @@ void EditorPropertyRootMotion::update_property() {
}
void EditorPropertyRootMotion::setup(const NodePath &p_base_hint) {
-
base_hint = p_base_hint;
}
void EditorPropertyRootMotion::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Ref<Texture2D> t = get_theme_icon("Clear", "EditorIcons");
clear->set_icon(t);
@@ -251,7 +244,6 @@ void EditorPropertyRootMotion::_bind_methods() {
}
EditorPropertyRootMotion::EditorPropertyRootMotion() {
-
HBoxContainer *hbc = memnew(HBoxContainer);
add_child(hbc);
assign = memnew(Button);
@@ -278,6 +270,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
filters->connect("item_activated", callable_mp(this, &EditorPropertyRootMotion::_confirmed));
//filters->connect("item_edited", this, "_filter_edited");
}
+
//////////////////////////
bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) {
@@ -289,7 +282,6 @@ void EditorInspectorRootMotionPlugin::parse_begin(Object *p_object) {
}
bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
-
if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) {
EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion);
if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && p_hint_text != String()) {
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index e6d3f17f12..48a9febcf9 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -54,7 +54,6 @@
/*** SCRIPT EDITOR ****/
void ScriptEditorBase::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("name_changed"));
ADD_SIGNAL(MethodInfo("edited_script_changed"));
ADD_SIGNAL(MethodInfo("request_help", PropertyInfo(Variant::STRING, "topic")));
@@ -73,7 +72,6 @@ static bool _is_built_in_script(Script *p_script) {
}
class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache {
-
struct Cache {
uint64_t time_loaded;
RES cache;
@@ -86,7 +84,6 @@ public:
int max_cache_size;
void cleanup() {
-
List<Map<String, Cache>::Element *> to_clean;
Map<String, Cache>::Element *I = cached.front();
@@ -104,10 +101,8 @@ public:
}
virtual RES get_cached_resource(const String &p_path) {
-
Map<String, Cache>::Element *E = cached.find(p_path);
if (!E) {
-
Cache c;
c.cache = ResourceLoader::load(p_path);
E = cached.insert(p_path, c);
@@ -137,7 +132,6 @@ public:
}
EditorScriptCodeCompletionCache() {
-
max_cache_size = 128;
max_time_cache = 5 * 60 * 1000; //minutes, five
}
@@ -146,50 +140,45 @@ public:
};
void ScriptEditorQuickOpen::popup_dialog(const Vector<String> &p_functions, bool p_dontclear) {
-
popup_centered_ratio(0.6);
- if (p_dontclear)
+ if (p_dontclear) {
search_box->select_all();
- else
+ } else {
search_box->clear();
+ }
search_box->grab_focus();
functions = p_functions;
_update_search();
}
void ScriptEditorQuickOpen::_text_changed(const String &p_newtext) {
-
_update_search();
}
void ScriptEditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
-
Ref<InputEventKey> k = p_ie;
if (k.is_valid() && (k->get_keycode() == KEY_UP ||
k->get_keycode() == KEY_DOWN ||
k->get_keycode() == KEY_PAGEUP ||
k->get_keycode() == KEY_PAGEDOWN)) {
-
search_options->call("_gui_input", k);
search_box->accept_event();
}
}
void ScriptEditorQuickOpen::_update_search() {
-
search_options->clear();
TreeItem *root = search_options->create_item();
for (int i = 0; i < functions.size(); i++) {
-
String file = functions[i];
if ((search_box->get_text() == "" || file.findn(search_box->get_text()) != -1)) {
-
TreeItem *ti = search_options->create_item(root);
ti->set_text(0, file);
- if (root->get_children() == ti)
+ if (root->get_children() == ti) {
ti->select(0);
+ }
}
}
@@ -197,10 +186,10 @@ void ScriptEditorQuickOpen::_update_search() {
}
void ScriptEditorQuickOpen::_confirmed() {
-
TreeItem *ti = search_options->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
int line = ti->get_text(0).get_slice(":", 1).to_int();
emit_signal("goto_line", line - 1);
@@ -208,7 +197,6 @@ void ScriptEditorQuickOpen::_confirmed() {
}
void ScriptEditorQuickOpen::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
@@ -226,12 +214,10 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
}
void ScriptEditorQuickOpen::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("goto_line", PropertyInfo(Variant::INT, "line")));
}
ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
-
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
search_box = memnew(LineEdit);
@@ -257,24 +243,20 @@ ScriptEditor *ScriptEditor::script_editor = nullptr;
/*** SCRIPT EDITOR ******/
String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) {
-
String val = EditorDebuggerNode::get_singleton()->get_var_value(p_text);
if (val != String()) {
return p_text + ": " + val;
} else {
-
return String();
}
}
void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) {
-
if (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
return;
}
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
continue;
@@ -289,14 +271,13 @@ void ScriptEditor::_script_created(Ref<Script> p_script) {
}
void ScriptEditor::_goto_script_line2(int p_line) {
-
ScriptEditorBase *current = _get_current_editor();
- if (current)
+ if (current) {
current->goto_line(p_line);
+ }
}
void ScriptEditor::_goto_script_line(REF p_script, int p_line) {
-
Ref<Script> script = Object::cast_to<Script>(*p_script);
if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
if (edit(p_script, p_line, 0)) {
@@ -316,10 +297,10 @@ void ScriptEditor::_set_execution(REF p_script, int p_line) {
Ref<Script> script = Object::cast_to<Script>(*p_script);
if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
if ((script != nullptr && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == script->get_path()) {
se->set_executing_line(p_line);
@@ -332,10 +313,10 @@ void ScriptEditor::_clear_execution(REF p_script) {
Ref<Script> script = Object::cast_to<Script>(*p_script);
if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
if ((script != nullptr && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == script->get_path()) {
se->clear_executing_line();
@@ -345,32 +326,27 @@ void ScriptEditor::_clear_execution(REF p_script) {
}
ScriptEditorBase *ScriptEditor::_get_current_editor() const {
-
int selected = tab_container->get_current_tab();
- if (selected < 0 || selected >= tab_container->get_child_count())
+ if (selected < 0 || selected >= tab_container->get_child_count()) {
return nullptr;
+ }
return Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
}
void ScriptEditor::_update_history_arrows() {
-
script_back->set_disabled(history_pos <= 0);
script_forward->set_disabled(history_pos >= history.size() - 1);
}
void ScriptEditor::_save_history() {
-
if (history_pos >= 0 && history_pos < history.size() && history[history_pos].control == tab_container->get_current_tab_control()) {
-
Node *n = tab_container->get_current_tab_control();
if (Object::cast_to<ScriptEditorBase>(n)) {
-
history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
}
if (Object::cast_to<EditorHelp>(n)) {
-
history.write[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
}
}
@@ -387,29 +363,25 @@ void ScriptEditor::_save_history() {
}
void ScriptEditor::_go_to_tab(int p_idx) {
-
ScriptEditorBase *current = _get_current_editor();
if (current) {
if (current->is_unsaved()) {
-
current->apply_code();
}
}
Control *c = Object::cast_to<Control>(tab_container->get_child(p_idx));
- if (!c)
+ if (!c) {
return;
+ }
if (history_pos >= 0 && history_pos < history.size() && history[history_pos].control == tab_container->get_current_tab_control()) {
-
Node *n = tab_container->get_current_tab_control();
if (Object::cast_to<ScriptEditorBase>(n)) {
-
history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
}
if (Object::cast_to<EditorHelp>(n)) {
-
history.write[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
}
}
@@ -427,11 +399,11 @@ void ScriptEditor::_go_to_tab(int p_idx) {
c = tab_container->get_current_tab_control();
if (Object::cast_to<ScriptEditorBase>(c)) {
-
script_name_label->set_text(Object::cast_to<ScriptEditorBase>(c)->get_name());
script_icon->set_texture(Object::cast_to<ScriptEditorBase>(c)->get_theme_icon());
- if (is_visible_in_tree())
+ if (is_visible_in_tree()) {
Object::cast_to<ScriptEditorBase>(c)->ensure_focus();
+ }
Ref<Script> script = Object::cast_to<ScriptEditorBase>(c)->get_edited_resource();
if (script != nullptr) {
@@ -441,11 +413,11 @@ void ScriptEditor::_go_to_tab(int p_idx) {
Object::cast_to<ScriptEditorBase>(c)->validate();
}
if (Object::cast_to<EditorHelp>(c)) {
-
script_name_label->set_text(Object::cast_to<EditorHelp>(c)->get_class());
script_icon->set_texture(get_theme_icon("Help", "EditorIcons"));
- if (is_visible_in_tree())
+ if (is_visible_in_tree()) {
Object::cast_to<EditorHelp>(c)->set_focused();
+ }
}
c->set_meta("__editor_pass", ++edit_pass);
@@ -459,7 +431,6 @@ void ScriptEditor::_go_to_tab(int p_idx) {
}
void ScriptEditor::_add_recent_script(String p_path) {
-
if (p_path.empty()) {
return;
}
@@ -478,13 +449,11 @@ void ScriptEditor::_add_recent_script(String p_path) {
}
void ScriptEditor::_update_recent_scripts() {
-
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scripts", Array());
recent_scripts->clear();
String path;
for (int i = 0; i < rc.size(); i++) {
-
path = rc[i];
recent_scripts->add_item(path.replace("res://", ""));
}
@@ -496,7 +465,6 @@ void ScriptEditor::_update_recent_scripts() {
}
void ScriptEditor::_open_recent_script(int p_idx) {
-
// clear button
if (p_idx == recent_scripts->get_item_count() - 1) {
EditorSettings::get_singleton()->set_project_metadata("recent_files", "scripts", Array());
@@ -555,16 +523,15 @@ void ScriptEditor::_open_recent_script(int p_idx) {
}
void ScriptEditor::_show_error_dialog(String p_path) {
-
error_dialog->set_text(vformat(TTR("Can't open '%s'. The file could have been moved or deleted."), p_path));
error_dialog->popup_centered();
}
void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
-
int selected = p_idx;
- if (selected < 0 || selected >= tab_container->get_child_count())
+ if (selected < 0 || selected >= tab_container->get_child_count()) {
return;
+ }
Node *tselected = tab_container->get_child(selected);
@@ -606,10 +573,10 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
current->clear_edit_menu();
}
memdelete(tselected);
- if (idx >= tab_container->get_child_count())
+ if (idx >= tab_container->get_child_count()) {
idx = tab_container->get_child_count() - 1;
+ }
if (idx >= 0) {
-
if (history_pos >= 0) {
idx = history[history_pos].control->get_index();
}
@@ -627,7 +594,6 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
}
void ScriptEditor::_close_current_tab() {
-
_close_tab(tab_container->get_current_tab());
}
@@ -637,10 +603,8 @@ void ScriptEditor::_close_discard_current_tab(const String &p_str) {
}
void ScriptEditor::_close_docs_tab() {
-
int child_count = tab_container->get_child_count();
for (int i = child_count - 1; i >= 0; i--) {
-
EditorHelp *se = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (se) {
@@ -656,11 +620,9 @@ void ScriptEditor::_copy_script_path() {
}
void ScriptEditor::_close_other_tabs() {
-
int child_count = tab_container->get_child_count();
int current_idx = tab_container->get_current_tab();
for (int i = child_count - 1; i >= 0; i--) {
-
if (i == current_idx) {
continue;
}
@@ -669,7 +631,6 @@ void ScriptEditor::_close_other_tabs() {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
-
// Maybe there are unsaved changes
if (se->is_unsaved()) {
_ask_close_current_unsaved_tab(se);
@@ -682,15 +643,12 @@ void ScriptEditor::_close_other_tabs() {
}
void ScriptEditor::_close_all_tabs() {
-
int child_count = tab_container->get_child_count();
for (int i = child_count - 1; i >= 0; i--) {
-
tab_container->set_current_tab(i);
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
-
// Maybe there are unsaved changes
if (se->is_unsaved()) {
_ask_close_current_unsaved_tab(se);
@@ -708,19 +666,19 @@ void ScriptEditor::_ask_close_current_unsaved_tab(ScriptEditorBase *current) {
}
void ScriptEditor::_resave_scripts(const String &p_str) {
-
apply_scripts();
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
RES script = se->get_edited_resource();
- if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1)
+ if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) {
continue; //internal script, who cares
+ }
if (trim_trailing_whitespace_on_save) {
se->trim_trailing_whitespace();
@@ -751,19 +709,15 @@ void ScriptEditor::_resave_scripts(const String &p_str) {
}
void ScriptEditor::_reload_scripts() {
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
-
continue;
}
RES edited_res = se->get_edited_resource();
if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1) {
-
continue; //internal script, who cares
}
@@ -799,12 +753,9 @@ void ScriptEditor::_reload_scripts() {
}
void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
-
continue;
}
@@ -815,7 +766,6 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {
}
if (script == p_res) {
-
se->tag_saved_version();
}
}
@@ -834,7 +784,6 @@ void ScriptEditor::_live_auto_reload_running_scripts() {
}
bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
-
disk_changed_list->clear();
TreeItem *r = disk_changed_list->create_item();
disk_changed_list->set_hide_root(true);
@@ -844,22 +793,21 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
bool use_autoreload = bool(EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change", false));
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
-
RES edited_res = se->get_edited_resource();
- if (p_for_script.is_valid() && edited_res.is_valid() && p_for_script != edited_res)
+ if (p_for_script.is_valid() && edited_res.is_valid() && p_for_script != edited_res) {
continue;
+ }
- if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1)
+ if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1) {
continue; //internal script, who cares
+ }
uint64_t last_date = edited_res->get_last_modified_time();
uint64_t date = FileAccess::get_modified_time(edited_res->get_path());
if (last_date != date) {
-
TreeItem *ti = disk_changed_list->create_item(r);
ti->set_text(0, edited_res->get_path().get_file());
@@ -884,13 +832,11 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
}
void ScriptEditor::_file_dialog_action(String p_file) {
-
switch (file_dialog_option) {
case FILE_NEW_TEXTFILE: {
Error err;
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
if (err) {
- memdelete(file);
editor->show_warning(TTR("Error writing TextFile:") + "\n" + p_file, TTR("Error!"));
break;
}
@@ -899,7 +845,6 @@ void ScriptEditor::_file_dialog_action(String p_file) {
[[fallthrough]];
}
case FILE_OPEN: {
-
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("Script", &extensions);
if (extensions.find(p_file.get_extension())) {
@@ -956,7 +901,6 @@ void ScriptEditor::_file_dialog_action(String p_file) {
}
Ref<Script> ScriptEditor::_get_current_script() {
-
ScriptEditorBase *current = _get_current_editor();
if (current) {
@@ -968,7 +912,6 @@ Ref<Script> ScriptEditor::_get_current_script() {
}
Array ScriptEditor::_get_open_scripts() const {
-
Array ret;
Vector<Ref<Script>> scripts = get_open_scripts();
int scrits_amount = scripts.size();
@@ -988,7 +931,6 @@ bool ScriptEditor::is_scripts_panel_toggled() {
}
void ScriptEditor::_menu_option(int p_option) {
-
ScriptEditorBase *current = _get_current_editor();
switch (p_option) {
case FILE_NEW: {
@@ -1021,9 +963,9 @@ void ScriptEditor::_menu_option(int p_option) {
return;
} break;
case FILE_REOPEN_CLOSED: {
-
- if (previous_scripts.empty())
+ if (previous_scripts.empty()) {
return;
+ }
String path = previous_scripts.back()->get();
previous_scripts.pop_back();
@@ -1060,8 +1002,9 @@ void ScriptEditor::_menu_option(int p_option) {
} else {
Error error;
Ref<TextFile> text_file = _load_text_file(path, &error);
- if (error != OK)
+ if (error != OK) {
editor->show_warning(TTR("Could not load file at:") + "\n\n" + path, TTR("Error!"));
+ }
if (text_file.is_valid()) {
edit(text_file);
@@ -1071,34 +1014,28 @@ void ScriptEditor::_menu_option(int p_option) {
}
} break;
case FILE_SAVE_ALL: {
-
- if (_test_script_times_on_disk())
+ if (_test_script_times_on_disk()) {
return;
+ }
save_all_scripts();
} break;
case SEARCH_IN_FILES: {
-
_on_find_in_files_requested("");
} break;
case REPLACE_IN_FILES: {
-
_on_replace_in_files_requested("");
} break;
case SEARCH_HELP: {
-
help_search_dialog->popup_dialog();
} break;
case SEARCH_WEBSITE: {
-
OS::get_singleton()->shell_open("https://docs.godotengine.org/");
} break;
case WINDOW_NEXT: {
-
_history_forward();
} break;
case WINDOW_PREV: {
-
_history_back();
} break;
case WINDOW_SORT: {
@@ -1119,15 +1056,15 @@ void ScriptEditor::_menu_option(int p_option) {
}
if (current) {
-
switch (p_option) {
case FILE_SAVE: {
-
- if (_test_script_times_on_disk())
+ if (_test_script_times_on_disk()) {
return;
+ }
- if (trim_trailing_whitespace_on_save)
+ if (trim_trailing_whitespace_on_save) {
current->trim_trailing_whitespace();
+ }
current->insert_final_newline();
@@ -1149,9 +1086,9 @@ void ScriptEditor::_menu_option(int p_option) {
} break;
case FILE_SAVE_AS: {
-
- if (trim_trailing_whitespace_on_save)
+ if (trim_trailing_whitespace_on_save) {
current->trim_trailing_whitespace();
+ }
current->insert_final_newline();
@@ -1186,12 +1123,10 @@ void ScriptEditor::_menu_option(int p_option) {
case FILE_TOOL_RELOAD:
case FILE_TOOL_RELOAD_SOFT: {
-
current->reload(p_option == FILE_TOOL_RELOAD_SOFT);
} break;
case FILE_RUN: {
-
Ref<Script> scr = current->get_edited_resource();
if (scr == nullptr || scr.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Can't obtain the script for running."));
@@ -1206,13 +1141,11 @@ void ScriptEditor::_menu_option(int p_option) {
return;
}
if (!scr->is_tool()) {
-
EditorNode::get_singleton()->show_warning(TTR("Script is not in tool mode, will not be able to run."));
return;
}
if (!ClassDB::is_parent_class(scr->get_instance_base_type(), "EditorScript")) {
-
EditorNode::get_singleton()->show_warning(TTR("To run this script, it must inherit EditorScript and be set to tool mode."));
return;
}
@@ -1256,7 +1189,6 @@ void ScriptEditor::_menu_option(int p_option) {
_close_all_tabs();
} break;
case WINDOW_MOVE_UP: {
-
if (tab_container->get_current_tab() > 0) {
tab_container->move_child(current, tab_container->get_current_tab() - 1);
tab_container->set_current_tab(tab_container->get_current_tab() - 1);
@@ -1264,7 +1196,6 @@ void ScriptEditor::_menu_option(int p_option) {
}
} break;
case WINDOW_MOVE_DOWN: {
-
if (tab_container->get_current_tab() < tab_container->get_child_count() - 1) {
tab_container->move_child(current, tab_container->get_current_tab() + 1);
tab_container->set_current_tab(tab_container->get_current_tab() + 1);
@@ -1272,19 +1203,15 @@ void ScriptEditor::_menu_option(int p_option) {
}
} break;
default: {
-
if (p_option >= WINDOW_SELECT_BASE) {
-
tab_container->set_current_tab(p_option - WINDOW_SELECT_BASE);
_update_script_names();
}
}
}
} else {
-
EditorHelp *help = Object::cast_to<EditorHelp>(tab_container->get_current_tab_control());
if (help) {
-
switch (p_option) {
case HELP_SEARCH_FIND: {
help->popup_search();
@@ -1308,7 +1235,6 @@ void ScriptEditor::_menu_option(int p_option) {
_close_all_tabs();
} break;
case WINDOW_MOVE_UP: {
-
if (tab_container->get_current_tab() > 0) {
tab_container->move_child(help, tab_container->get_current_tab() - 1);
tab_container->set_current_tab(tab_container->get_current_tab() - 1);
@@ -1316,7 +1242,6 @@ void ScriptEditor::_menu_option(int p_option) {
}
} break;
case WINDOW_MOVE_DOWN: {
-
if (tab_container->get_current_tab() < tab_container->get_child_count() - 1) {
tab_container->move_child(help, tab_container->get_current_tab() + 1);
tab_container->set_current_tab(tab_container->get_current_tab() + 1);
@@ -1367,16 +1292,12 @@ void ScriptEditor::_show_save_theme_as_dialog() {
}
void ScriptEditor::_tab_changed(int p_which) {
-
ensure_select_current();
}
void ScriptEditor::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_ENTER_TREE: {
-
editor->connect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop));
editor->connect("script_add_function_request", callable_mp(this, &ScriptEditor::_add_callback));
editor->connect("resource_saved", callable_mp(this, &ScriptEditor::_res_saved_callback));
@@ -1390,7 +1311,6 @@ void ScriptEditor::_notification(int p_what) {
[[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
-
help_search->set_icon(get_theme_icon("HelpSearch", "EditorIcons"));
site_search->set_icon(get_theme_icon("Instance", "EditorIcons"));
@@ -1408,25 +1328,21 @@ void ScriptEditor::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
-
get_tree()->connect("tree_changed", callable_mp(this, &ScriptEditor::_tree_changed));
editor->get_inspector_dock()->connect("request_help", callable_mp(this, &ScriptEditor::_help_class_open));
editor->connect("request_help_search", callable_mp(this, &ScriptEditor::_help_search));
} break;
case NOTIFICATION_EXIT_TREE: {
-
editor->disconnect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop));
} break;
case NOTIFICATION_WM_FOCUS_IN: {
-
_test_script_times_on_disk();
_update_modified_scripts_for_external_editor();
} break;
case CanvasItem::NOTIFICATION_VISIBILITY_CHANGED: {
-
if (is_visible()) {
find_in_files_button->show();
} else {
@@ -1444,25 +1360,23 @@ void ScriptEditor::_notification(int p_what) {
}
bool ScriptEditor::can_take_away_focus() const {
-
ScriptEditorBase *current = _get_current_editor();
- if (current)
+ if (current) {
return current->can_lose_focus_on_node_selection();
- else
+ } else {
return true;
+ }
}
void ScriptEditor::close_builtin_scripts_from_scene(const String &p_scene) {
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
-
Ref<Script> script = se->get_edited_resource();
- if (script == nullptr || !script.is_valid())
+ if (script == nullptr || !script.is_valid()) {
continue;
+ }
if (script->get_path().find("::") != -1 && script->get_path().begins_with(p_scene)) { //is an internal script and belongs to scene being closed
_close_tab(i);
@@ -1473,7 +1387,6 @@ void ScriptEditor::close_builtin_scripts_from_scene(const String &p_scene) {
}
void ScriptEditor::edited_scene_changed() {
-
_update_modified_scripts_for_external_editor();
}
@@ -1486,12 +1399,11 @@ void ScriptEditor::notify_script_changed(const Ref<Script> &p_script) {
}
void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
Ref<Script> script = se->get_edited_resource();
if (script == nullptr) {
@@ -1504,20 +1416,20 @@ void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
ERR_CONTINUE(base.begins_with("local://") || base == "");
for (List<int>::Element *E = bpoints.front(); E; E = E->next()) {
-
p_breakpoints->push_back(base + ":" + itos(E->get() + 1));
}
}
}
void ScriptEditor::ensure_focus_current() {
-
- if (!is_inside_tree())
+ if (!is_inside_tree()) {
return;
+ }
ScriptEditorBase *current = _get_current_editor();
- if (current)
+ if (current) {
current->ensure_focus();
+ }
}
void ScriptEditor::_members_overview_selected(int p_idx) {
@@ -1544,7 +1456,6 @@ void ScriptEditor::_help_overview_selected(int p_idx) {
}
void ScriptEditor::_script_selected(int p_idx) {
-
grab_focus_block = !Input::get_singleton()->is_mouse_button_pressed(1); //amazing hack, simply amazing
_go_to_tab(script_list->get_item_metadata(p_idx));
@@ -1552,14 +1463,12 @@ void ScriptEditor::_script_selected(int p_idx) {
}
void ScriptEditor::ensure_select_current() {
-
if (tab_container->get_child_count() && tab_container->get_current_tab() >= 0) {
-
ScriptEditorBase *se = _get_current_editor();
if (se) {
-
- if (!grab_focus_block && is_visible_in_tree())
+ if (!grab_focus_block && is_visible_in_tree()) {
se->ensure_focus();
+ }
}
}
@@ -1567,13 +1476,15 @@ void ScriptEditor::ensure_select_current() {
}
void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>> &used) {
- if (p_current != p_base && p_current->get_owner() != p_base)
+ if (p_current != p_base && p_current->get_owner() != p_base) {
return;
+ }
if (p_current->get_script_instance()) {
Ref<Script> scr = p_current->get_script();
- if (scr.is_valid())
+ if (scr.is_valid()) {
used.insert(scr);
+ }
}
for (int i = 0; i < p_current->get_child_count(); i++) {
@@ -1582,7 +1493,6 @@ void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>>
}
struct _ScriptEditorItemData {
-
String name;
String sort_key;
Ref<Texture2D> icon;
@@ -1593,7 +1503,6 @@ struct _ScriptEditorItemData {
Node *ref;
bool operator<(const _ScriptEditorItemData &id) const {
-
if (category == id.category) {
if (sort_key == id.sort_key) {
return index < id.index;
@@ -1607,7 +1516,6 @@ struct _ScriptEditorItemData {
};
void ScriptEditor::_update_members_overview_visibility() {
-
ScriptEditorBase *se = _get_current_editor();
if (!se) {
members_overview_alphabeta_sort_button->set_visible(false);
@@ -1661,7 +1569,6 @@ void ScriptEditor::_update_members_overview() {
}
void ScriptEditor::_update_help_overview_visibility() {
-
int selected = tab_container->get_current_tab();
if (selected < 0 || selected >= tab_container->get_child_count()) {
help_overview->set_visible(false);
@@ -1690,8 +1597,9 @@ void ScriptEditor::_update_help_overview() {
help_overview->clear();
int selected = tab_container->get_current_tab();
- if (selected < 0 || selected >= tab_container->get_child_count())
+ if (selected < 0 || selected >= tab_container->get_child_count()) {
return;
+ }
Node *current = tab_container->get_child(tab_container->get_current_tab());
EditorHelp *se = Object::cast_to<EditorHelp>(current);
@@ -1707,7 +1615,6 @@ void ScriptEditor::_update_help_overview() {
}
void ScriptEditor::_update_script_colors() {
-
bool script_temperature_enabled = EditorSettings::get_singleton()->get("text_editor/script_list/script_temperature_enabled");
bool highlight_current = EditorSettings::get_singleton()->get("text_editor/script_list/highlight_current_script");
@@ -1716,11 +1623,11 @@ void ScriptEditor::_update_script_colors() {
Color cold_color = get_theme_color("font_color", "Editor");
for (int i = 0; i < script_list->get_item_count(); i++) {
-
int c = script_list->get_item_metadata(i);
Node *n = tab_container->get_child(c);
- if (!n)
+ if (!n) {
continue;
+ }
script_list->set_item_custom_bg_color(i, Color(0, 0, 0, 0));
@@ -1729,7 +1636,6 @@ void ScriptEditor::_update_script_colors() {
script_list->set_item_custom_bg_color(i, EditorSettings::get_singleton()->get("text_editor/script_list/current_script_background_color"));
} else if (script_temperature_enabled) {
-
if (!n->has_meta("__editor_pass")) {
continue;
}
@@ -1748,9 +1654,9 @@ void ScriptEditor::_update_script_colors() {
}
void ScriptEditor::_update_script_names() {
-
- if (restoring_layout)
+ if (restoring_layout) {
return;
+ }
Set<Ref<Script>> used;
Node *edited = EditorNode::get_singleton()->get_edited_scene();
@@ -1766,17 +1672,14 @@ void ScriptEditor::_update_script_names() {
Vector<_ScriptEditorItemData> sedata;
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
-
Ref<Texture2D> icon = se->get_theme_icon();
String path = se->get_edited_resource()->get_path();
bool built_in = !path.is_resource_file();
String name;
if (built_in) {
-
name = path.get_file();
const String &resource_name = se->get_edited_resource()->get_name();
if (resource_name != "") {
@@ -1785,7 +1688,6 @@ void ScriptEditor::_update_script_names() {
name = vformat("%s (%s)", resource_name, name.substr(0, name.find("::", 0)));
}
} else {
-
name = se->get_name();
}
@@ -1831,7 +1733,6 @@ void ScriptEditor::_update_script_names() {
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh) {
-
String name = eh->get_class();
Ref<Texture2D> icon = get_theme_icon("Help", "EditorIcons");
String tooltip = vformat(TTR("%s Class Reference"), name);
@@ -1978,9 +1879,9 @@ Error ScriptEditor::_save_text_file(Ref<TextFile> p_text_file, const String &p_p
}
bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_grab_focus) {
-
- if (p_resource.is_null())
+ if (p_resource.is_null()) {
return false;
+ }
Ref<Script> script = p_resource;
@@ -1995,8 +1896,9 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
if (script != nullptr && script->get_language()->overrides_external_editor()) {
if (should_open) {
Error err = script->get_language()->open_in_external_editor(script, p_line >= 0 ? p_line : 0, p_col);
- if (err != OK)
+ if (err != OK) {
ERR_PRINT("Couldn't open script in the overridden external text editor");
+ }
}
return false;
}
@@ -2005,7 +1907,6 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
p_resource->get_path().is_resource_file() &&
p_resource->get_class_name() != StringName("VisualScript") &&
bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
-
String path = EditorSettings::get_singleton()->get("text_editor/external/exec_path");
String flags = EditorSettings::get_singleton()->get("text_editor/external/exec_flags");
@@ -2025,16 +1926,13 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
bool inside_quotes = false;
for (int i = 0; i < flags.size(); i++) {
-
if (flags[i] == '"' && (!i || flags[i - 1] != '\\')) {
-
if (!inside_quotes) {
from++;
}
inside_quotes = !inside_quotes;
} else if (flags[i] == '\0' || (!inside_quotes && flags[i] == ' ')) {
-
String arg = flags.substr(from, num_chars);
if (arg.find("{file}") != -1) {
has_file_flag = true;
@@ -2059,26 +1957,27 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
}
Error err = OS::get_singleton()->execute(path, args, false);
- if (err == OK)
+ if (err == OK) {
return false;
+ }
WARN_PRINT("Couldn't open external text editor, using internal");
}
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
if ((script != nullptr && se->get_edited_resource() == p_resource) || se->get_edited_resource()->get_path() == p_resource->get_path()) {
-
if (should_open) {
if (tab_container->get_current_tab() != i) {
_go_to_tab(i);
_update_script_names();
}
- if (is_visible_in_tree())
+ if (is_visible_in_tree()) {
se->ensure_focus();
+ }
if (p_line > 0) {
se->goto_line(p_line - 1);
@@ -2096,8 +1995,9 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
for (int i = script_editor_func_count - 1; i >= 0; i--) {
se = script_editor_funcs[i](p_resource);
- if (se)
+ if (se) {
break;
+ }
}
ERR_FAIL_COND_V(!se, false);
@@ -2157,12 +2057,11 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
}
void ScriptEditor::save_all_scripts() {
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
if (convert_indent_on_save) {
if (use_space_indentation) {
@@ -2178,8 +2077,9 @@ void ScriptEditor::save_all_scripts() {
se->insert_final_newline();
- if (!se->is_unsaved())
+ if (!se->is_unsaved()) {
continue;
+ }
RES edited_res = se->get_edited_resource();
if (edited_res.is_valid()) {
@@ -2201,12 +2101,11 @@ void ScriptEditor::save_all_scripts() {
}
void ScriptEditor::apply_scripts() const {
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
se->apply_code();
}
}
@@ -2218,10 +2117,8 @@ void ScriptEditor::open_script_create_dialog(const String &p_base_name, const St
void ScriptEditor::_editor_stop() {
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
-
continue;
}
@@ -2230,7 +2127,6 @@ void ScriptEditor::_editor_stop() {
}
void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args) {
-
ERR_FAIL_COND(!p_obj);
Ref<Script> script = p_obj->get_script();
ERR_FAIL_COND(!script.is_valid());
@@ -2238,12 +2134,13 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const
editor->push_item(script.ptr());
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
- if (se->get_edited_resource() != script)
+ }
+ if (se->get_edited_resource() != script) {
continue;
+ }
se->add_callback(p_function, p_args);
@@ -2256,7 +2153,6 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const
}
void ScriptEditor::_save_layout() {
-
if (restoring_layout) {
return;
}
@@ -2265,7 +2161,6 @@ void ScriptEditor::_save_layout() {
}
void ScriptEditor::_editor_settings_changed() {
-
trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/files/trim_trailing_whitespace_on_save");
convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/indent/convert_indent_on_save");
use_space_indentation = EditorSettings::get_singleton()->get("text_editor/indent/type");
@@ -2285,10 +2180,10 @@ void ScriptEditor::_editor_settings_changed() {
}
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
se->update_settings();
}
@@ -2299,12 +2194,10 @@ void ScriptEditor::_editor_settings_changed() {
}
void ScriptEditor::_autosave_scripts() {
-
save_all_scripts();
}
void ScriptEditor::_update_autosave_timer() {
-
if (!autosave_timer->is_inside_tree()) {
return;
}
@@ -2319,9 +2212,9 @@ void ScriptEditor::_update_autosave_timer() {
}
void ScriptEditor::_tree_changed() {
-
- if (waiting_update_names)
+ if (waiting_update_names) {
return;
+ }
waiting_update_names = true;
call_deferred("_update_script_names");
@@ -2329,14 +2222,13 @@ void ScriptEditor::_tree_changed() {
}
void ScriptEditor::_script_split_dragged(float) {
-
_save_layout();
}
Variant ScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
- if (tab_container->get_child_count() == 0)
+ if (tab_container->get_child_count() == 0) {
return Variant();
+ }
Node *cur_node = tab_container->get_child(tab_container->get_current_tab());
@@ -2372,13 +2264,12 @@ Variant ScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
}
bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return false;
+ }
if (String(d["type"]) == "script_list_element") {
-
Node *node = d["script_list_element"];
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node);
@@ -2392,10 +2283,10 @@ bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (String(d["type"]) == "nodes") {
-
Array nodes = d["nodes"];
- if (nodes.size() == 0)
+ if (nodes.size() == 0) {
return false;
+ }
Node *node = get_node((nodes[0]));
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node);
@@ -2409,16 +2300,17 @@ bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
- if (files.size() == 0)
+ if (files.size() == 0) {
return false; //weird
+ }
for (int i = 0; i < files.size(); i++) {
String file = files[i];
- if (file == "" || !FileAccess::exists(file))
+ if (file == "" || !FileAccess::exists(file)) {
continue;
+ }
Ref<Script> scr = ResourceLoader::load(file);
if (scr.is_valid()) {
return true;
@@ -2431,16 +2323,16 @@ bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data
}
void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
- if (!can_drop_data_fw(p_point, p_data, p_from))
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return;
+ }
if (String(d["type"]) == "script_list_element") {
-
Node *node = d["script_list_element"];
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node);
@@ -2457,10 +2349,10 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
}
if (String(d["type"]) == "nodes") {
-
Array nodes = d["nodes"];
- if (nodes.size() == 0)
+ if (nodes.size() == 0) {
return;
+ }
Node *node = get_node(nodes[0]);
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node);
@@ -2477,7 +2369,6 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
int new_index = 0;
@@ -2487,8 +2378,9 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
int num_tabs_before = tab_container->get_child_count();
for (int i = 0; i < files.size(); i++) {
String file = files[i];
- if (file == "" || !FileAccess::exists(file))
+ if (file == "" || !FileAccess::exists(file)) {
continue;
+ }
Ref<Script> scr = ResourceLoader::load(file);
if (scr.is_valid()) {
edit(scr);
@@ -2506,8 +2398,9 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
}
void ScriptEditor::_unhandled_input(const Ref<InputEvent> &p_event) {
- if (!is_visible_in_tree() || !p_event->is_pressed() || p_event->is_echo())
+ if (!is_visible_in_tree() || !p_event->is_pressed() || p_event->is_echo()) {
return;
+ }
if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) {
if (script_list->get_item_count() > 1) {
int next_tab = script_list->get_current() + 1;
@@ -2533,11 +2426,9 @@ void ScriptEditor::_unhandled_input(const Ref<InputEvent> &p_event) {
}
void ScriptEditor::_script_list_gui_input(const Ref<InputEvent> &ev) {
-
Ref<InputEventMouseButton> mb = ev;
if (mb.is_valid() && mb->is_pressed()) {
switch (mb->get_button_index()) {
-
case BUTTON_MIDDLE: {
// Right-click selects automatically; middle-click does not.
int idx = script_list->get_item_at_position(mb->get_position(), true);
@@ -2556,12 +2447,12 @@ void ScriptEditor::_script_list_gui_input(const Ref<InputEvent> &ev) {
}
void ScriptEditor::_make_script_list_context_menu() {
-
context_menu->clear();
int selected = tab_container->get_current_tab();
- if (selected < 0 || selected >= tab_container->get_child_count())
+ if (selected < 0 || selected >= tab_container->get_child_count()) {
return;
+ }
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (se) {
@@ -2597,18 +2488,19 @@ void ScriptEditor::_make_script_list_context_menu() {
}
void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
-
if (!bool(EDITOR_DEF("text_editor/files/restore_scripts_on_load", true))) {
return;
}
- if (!p_layout->has_section_key("ScriptEditor", "open_scripts") && !p_layout->has_section_key("ScriptEditor", "open_help"))
+ if (!p_layout->has_section_key("ScriptEditor", "open_scripts") && !p_layout->has_section_key("ScriptEditor", "open_help")) {
return;
+ }
Array scripts = p_layout->get_value("ScriptEditor", "open_scripts");
Array helps;
- if (p_layout->has_section_key("ScriptEditor", "open_help"))
+ if (p_layout->has_section_key("ScriptEditor", "open_help")) {
helps = p_layout->get_value("ScriptEditor", "open_help");
+ }
restoring_layout = true;
@@ -2616,7 +2508,6 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
ResourceLoader::get_recognized_extensions_for_type("Script", &extensions);
for (int i = 0; i < scripts.size(); i++) {
-
String path = scripts[i];
Dictionary script_info = scripts[i];
@@ -2624,8 +2515,9 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
path = script_info["path"];
}
- if (!FileAccess::exists(path))
+ if (!FileAccess::exists(path)) {
continue;
+ }
if (extensions.find(path.get_extension())) {
Ref<Script> scr = ResourceLoader::load(path);
@@ -2655,7 +2547,6 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
}
for (int i = 0; i < helps.size(); i++) {
-
String path = helps[i];
if (path == "") { // invalid, skip
continue;
@@ -2677,18 +2568,16 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
}
void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
-
Array scripts;
Array helps;
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
-
String path = se->get_edited_resource()->get_path();
- if (!path.is_resource_file())
+ if (!path.is_resource_file()) {
continue;
+ }
Dictionary script_info;
script_info["path"] = path;
@@ -2700,7 +2589,6 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh) {
-
helps.push_back(eh->get_class());
}
}
@@ -2711,16 +2599,14 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
}
void ScriptEditor::_help_class_open(const String &p_class) {
-
- if (p_class == "")
+ if (p_class == "") {
return;
+ }
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh && eh->get_class() == p_class) {
-
_go_to_tab(i);
_update_script_names();
return;
@@ -2741,15 +2627,12 @@ void ScriptEditor::_help_class_open(const String &p_class) {
}
void ScriptEditor::_help_class_goto(const String &p_desc) {
-
String cname = p_desc.get_slice(":", 1);
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh && eh->get_class() == cname) {
-
_go_to_tab(i);
eh->go_to_help(p_desc);
_update_script_names();
@@ -2771,25 +2654,22 @@ void ScriptEditor::_help_class_goto(const String &p_desc) {
}
void ScriptEditor::_update_selected_editor_menu() {
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
-
bool current = tab_container->get_current_tab() == i;
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se && se->get_edit_menu()) {
-
- if (current)
+ if (current) {
se->get_edit_menu()->show();
- else
+ } else {
se->get_edit_menu()->hide();
+ }
}
}
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_current_tab_control());
script_search_menu->get_popup()->clear();
if (eh) {
-
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F), HELP_SEARCH_FIND);
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), HELP_SEARCH_FIND_NEXT);
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT | KEY_F3), HELP_SEARCH_FIND_PREVIOUS);
@@ -2797,7 +2677,6 @@ void ScriptEditor::_update_selected_editor_menu() {
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F), SEARCH_IN_FILES);
script_search_menu->show();
} else {
-
if (tab_container->get_child_count() == 0) {
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F), SEARCH_IN_FILES);
script_search_menu->show();
@@ -2808,15 +2687,12 @@ void ScriptEditor::_update_selected_editor_menu() {
}
void ScriptEditor::_update_history_pos(int p_new_pos) {
-
Node *n = tab_container->get_current_tab_control();
if (Object::cast_to<ScriptEditorBase>(n)) {
-
history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
}
if (Object::cast_to<EditorHelp>(n)) {
-
history.write[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
}
@@ -2826,7 +2702,6 @@ void ScriptEditor::_update_history_pos(int p_new_pos) {
n = history[history_pos].control;
if (Object::cast_to<ScriptEditorBase>(n)) {
-
Object::cast_to<ScriptEditorBase>(n)->set_edit_state(history[history_pos].state);
Object::cast_to<ScriptEditorBase>(n)->ensure_focus();
@@ -2837,7 +2712,6 @@ void ScriptEditor::_update_history_pos(int p_new_pos) {
}
if (Object::cast_to<EditorHelp>(n)) {
-
Object::cast_to<EditorHelp>(n)->set_scroll(history[history_pos].state);
Object::cast_to<EditorHelp>(n)->set_focused();
}
@@ -2849,27 +2723,25 @@ void ScriptEditor::_update_history_pos(int p_new_pos) {
}
void ScriptEditor::_history_forward() {
-
if (history_pos < history.size() - 1) {
_update_history_pos(history_pos + 1);
}
}
void ScriptEditor::_history_back() {
-
if (history_pos > 0) {
_update_history_pos(history_pos - 1);
}
}
Vector<Ref<Script>> ScriptEditor::get_open_scripts() const {
-
Vector<Ref<Script>> out_scripts = Vector<Ref<Script>>();
for (int i = 0; i < tab_container->get_child_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
- if (!se)
+ if (!se) {
continue;
+ }
Ref<Script> script = se->get_edited_resource();
if (script != nullptr) {
@@ -2881,11 +2753,11 @@ Vector<Ref<Script>> ScriptEditor::get_open_scripts() const {
}
void ScriptEditor::set_scene_root_script(Ref<Script> p_script) {
-
bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
- if (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")))
+ if (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
return;
+ }
if (open_dominant && p_script.is_valid()) {
edit(p_script);
@@ -2893,17 +2765,16 @@ void ScriptEditor::set_scene_root_script(Ref<Script> p_script) {
}
bool ScriptEditor::script_goto_method(Ref<Script> p_script, const String &p_method) {
-
int line = p_script->get_member_line(p_method);
- if (line == -1)
+ if (line == -1) {
return false;
+ }
return edit(p_script, line, 0);
}
void ScriptEditor::set_live_auto_reload_running_scripts(bool p_enabled) {
-
auto_reload_running_scripts = p_enabled;
}
@@ -2912,7 +2783,6 @@ void ScriptEditor::_help_search(String p_text) {
}
void ScriptEditor::_open_script_request(const String &p_path) {
-
Ref<Script> script = ResourceLoader::load(p_path);
if (script.is_valid()) {
script_editor->edit(script, false);
@@ -2939,25 +2809,21 @@ int ScriptEditor::script_editor_func_count = 0;
CreateScriptEditorFunc ScriptEditor::script_editor_funcs[ScriptEditor::SCRIPT_EDITOR_FUNC_MAX];
void ScriptEditor::register_create_script_editor_function(CreateScriptEditorFunc p_func) {
-
ERR_FAIL_COND(script_editor_func_count == SCRIPT_EDITOR_FUNC_MAX);
script_editor_funcs[script_editor_func_count++] = p_func;
}
void ScriptEditor::_script_changed() {
-
NodeDock::singleton->update_lists();
}
void ScriptEditor::_on_find_in_files_requested(String text) {
-
find_in_files_dialog->set_find_in_files_mode(FindInFilesDialog::SEARCH_MODE);
find_in_files_dialog->set_search_text(text);
find_in_files_dialog->popup_centered();
}
void ScriptEditor::_on_replace_in_files_requested(String text) {
-
find_in_files_dialog->set_find_in_files_mode(FindInFilesDialog::REPLACE_MODE);
find_in_files_dialog->set_search_text(text);
find_in_files_dialog->set_replace_text("");
@@ -2965,7 +2831,6 @@ void ScriptEditor::_on_replace_in_files_requested(String text) {
}
void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_number, int begin, int end) {
-
if (ResourceLoader::exists(fpath)) {
RES res = ResourceLoader::load(fpath);
@@ -3003,7 +2868,6 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb
}
void ScriptEditor::_start_find_in_files(bool with_replace) {
-
FindInFiles *f = find_in_files->get_finder();
f->set_search_text(find_in_files_dialog->get_search_text());
@@ -3020,7 +2884,6 @@ void ScriptEditor::_start_find_in_files(bool with_replace) {
}
void ScriptEditor::_on_find_in_files_modified_files(PackedStringArray paths) {
-
_test_script_times_on_disk();
_update_modified_scripts_for_external_editor();
}
@@ -3034,7 +2897,6 @@ void ScriptEditor::_filter_methods_text_changed(const String &p_newtext) {
}
void ScriptEditor::_bind_methods() {
-
ClassDB::bind_method("_close_docs_tab", &ScriptEditor::_close_docs_tab);
ClassDB::bind_method("_close_all_tabs", &ScriptEditor::_close_all_tabs);
ClassDB::bind_method("_close_other_tabs", &ScriptEditor::_close_other_tabs);
@@ -3063,7 +2925,6 @@ void ScriptEditor::_bind_methods() {
}
ScriptEditor::ScriptEditor(EditorNode *p_editor) {
-
current_theme = "";
completion_cache = memnew(EditorScriptCodeCompletionCache);
@@ -3364,14 +3225,11 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
}
ScriptEditor::~ScriptEditor() {
-
memdelete(completion_cache);
}
void ScriptEditorPlugin::edit(Object *p_object) {
-
if (Object::cast_to<Script>(p_object)) {
-
Script *p_script = Object::cast_to<Script>(p_object);
String res_path = p_script->get_path().get_slice("::", 0);
@@ -3391,7 +3249,6 @@ void ScriptEditorPlugin::edit(Object *p_object) {
}
bool ScriptEditorPlugin::handles(Object *p_object) const {
-
if (Object::cast_to<TextFile>(p_object)) {
return true;
}
@@ -3404,30 +3261,25 @@ bool ScriptEditorPlugin::handles(Object *p_object) const {
}
void ScriptEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
script_editor->show();
script_editor->set_process(true);
script_editor->ensure_select_current();
} else {
-
script_editor->hide();
script_editor->set_process(false);
}
}
void ScriptEditorPlugin::selected_notify() {
-
script_editor->ensure_select_current();
}
void ScriptEditorPlugin::save_external_data() {
-
script_editor->save_all_scripts();
}
void ScriptEditorPlugin::apply_changes() {
-
script_editor->apply_scripts();
}
@@ -3438,27 +3290,22 @@ void ScriptEditorPlugin::save_global_state() {
}
void ScriptEditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
-
script_editor->set_window_layout(p_layout);
}
void ScriptEditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {
-
script_editor->get_window_layout(p_layout);
}
void ScriptEditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
-
script_editor->get_breakpoints(p_breakpoints);
}
void ScriptEditorPlugin::edited_scene_changed() {
-
script_editor->edited_scene_changed();
}
ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
script_editor = memnew(ScriptEditor(p_node));
editor->get_viewport()->add_child(script_editor);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index e895867268..f7352be7e8 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -49,7 +49,6 @@
#include "scene/resources/text_file.h"
class ScriptEditorQuickOpen : public ConfirmationDialog {
-
GDCLASS(ScriptEditorQuickOpen, ConfirmationDialog);
LineEdit *search_box;
@@ -76,7 +75,6 @@ public:
class EditorDebuggerNode;
class ScriptEditorBase : public VBoxContainer {
-
GDCLASS(ScriptEditorBase, VBoxContainer);
protected:
@@ -131,7 +129,6 @@ class FindInFilesDialog;
class FindInFilesPanel;
class ScriptEditor : public PanelContainer {
-
GDCLASS(ScriptEditor, PanelContainer);
EditorNode *editor;
@@ -250,7 +247,6 @@ class ScriptEditor : public PanelContainer {
static CreateSyntaxHighlighterFunc syntax_highlighters_funcs[SYNTAX_HIGHLIGHTER_FUNC_MAX];
struct ScriptHistory {
-
Control *control;
Variant state;
};
@@ -454,7 +450,6 @@ public:
};
class ScriptEditorPlugin : public EditorPlugin {
-
GDCLASS(ScriptEditorPlugin, EditorPlugin);
ScriptEditor *script_editor;
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 109d83d838..4b79d8c344 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -109,7 +109,6 @@ ConnectionInfoDialog::ConnectionInfoDialog() {
////////////////////////////////////////////////////////////////////////////////
Vector<String> ScriptTextEditor::get_functions() {
-
String errortxt;
int line = -1, col;
TextEdit *te = code_editor->get_text_edit();
@@ -117,11 +116,9 @@ Vector<String> ScriptTextEditor::get_functions() {
List<String> fnc;
if (script->get_language()->validate(text, line, col, errortxt, script->get_path(), &fnc)) {
-
//if valid rewrite functions to latest
functions.clear();
for (List<String>::Element *E = fnc.front(); E; E = E->next()) {
-
functions.push_back(E->get());
}
}
@@ -130,9 +127,9 @@ Vector<String> ScriptTextEditor::get_functions() {
}
void ScriptTextEditor::apply_code() {
-
- if (script.is_null())
+ if (script.is_null()) {
return;
+ }
script->set_source_code(code_editor->get_text_edit()->get_text());
script->update_exports();
_update_member_keywords();
@@ -165,17 +162,20 @@ void ScriptTextEditor::_update_member_keywords() {
StringName instance_base = script->get_instance_base_type();
- if (instance_base == StringName())
+ if (instance_base == StringName()) {
return;
+ }
List<PropertyInfo> plist;
ClassDB::get_property_list(instance_base, &plist);
for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) {
String name = E->get().name;
- if (E->get().usage & PROPERTY_USAGE_CATEGORY || E->get().usage & PROPERTY_USAGE_GROUP || E->get().usage & PROPERTY_USAGE_SUBGROUP)
+ if (E->get().usage & PROPERTY_USAGE_CATEGORY || E->get().usage & PROPERTY_USAGE_GROUP || E->get().usage & PROPERTY_USAGE_SUBGROUP) {
continue;
- if (name.find("/") != -1)
+ }
+ if (name.find("/") != -1) {
continue;
+ }
code_editor->get_text_edit()->add_member_keyword(name, member_variable_color);
}
@@ -184,13 +184,11 @@ void ScriptTextEditor::_update_member_keywords() {
ClassDB::get_integer_constant_list(instance_base, &clist);
for (List<String>::Element *E = clist.front(); E; E = E->next()) {
-
code_editor->get_text_edit()->add_member_keyword(E->get(), member_variable_color);
}
}
void ScriptTextEditor::_load_theme_settings() {
-
TextEdit *text_edit = code_editor->get_text_edit();
text_edit->clear_colors();
@@ -270,14 +268,15 @@ void ScriptTextEditor::_load_theme_settings() {
colors_cache.string_color = string_color;
theme_loaded = true;
- if (!script.is_null())
+ if (!script.is_null()) {
_set_theme_for_script();
+ }
}
void ScriptTextEditor::_set_theme_for_script() {
-
- if (!theme_loaded)
+ if (!theme_loaded) {
return;
+ }
TextEdit *text_edit = code_editor->get_text_edit();
@@ -285,7 +284,6 @@ void ScriptTextEditor::_set_theme_for_script() {
script->get_language()->get_reserved_words(&keywords);
for (List<String>::Element *E = keywords.front(); E; E = E->next()) {
-
text_edit->add_keyword_color(E->get(), colors_cache.keyword_color);
}
@@ -327,10 +325,10 @@ void ScriptTextEditor::_set_theme_for_script() {
ClassDB::get_class_list(&types);
for (List<StringName>::Element *E = types.front(); E; E = E->next()) {
-
String n = E->get();
- if (n.begins_with("_"))
+ if (n.begins_with("_")) {
n = n.substr(1, n.length());
+ }
text_edit->add_keyword_color(n, colors_cache.type_color);
}
@@ -341,7 +339,6 @@ void ScriptTextEditor::_set_theme_for_script() {
ScriptServer::get_global_class_list(&global_classes);
for (List<StringName>::Element *E = global_classes.front(); E; E = E->next()) {
-
text_edit->add_keyword_color(E->get(), colors_cache.usertype_color);
}
@@ -364,7 +361,6 @@ void ScriptTextEditor::_set_theme_for_script() {
script->get_language()->get_comment_delimiters(&comments);
for (List<String>::Element *E = comments.front(); E; E = E->next()) {
-
String comment = E->get();
String beg = comment.get_slice(" ", 0);
String end = comment.get_slice_count(" ") > 1 ? comment.get_slice(" ", 1) : String();
@@ -376,7 +372,6 @@ void ScriptTextEditor::_set_theme_for_script() {
List<String> strings;
script->get_language()->get_string_delimiters(&strings);
for (List<String>::Element *E = strings.front(); E; E = E->next()) {
-
String string = E->get();
String beg = string.get_slice(" ", 0);
String end = string.get_slice_count(" ") > 1 ? string.get_slice(" ", 1) : String();
@@ -403,7 +398,6 @@ void ScriptTextEditor::_warning_clicked(Variant p_line) {
}
void ScriptTextEditor::reload_text() {
-
ERR_FAIL_COND(script.is_null());
TextEdit *te = code_editor->get_text_edit();
@@ -424,7 +418,6 @@ void ScriptTextEditor::reload_text() {
}
void ScriptTextEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_READY:
_load_theme_settings();
@@ -433,7 +426,6 @@ void ScriptTextEditor::_notification(int p_what) {
}
void ScriptTextEditor::add_callback(const String &p_function, PackedStringArray p_args) {
-
String code = code_editor->get_text_edit()->get_text();
int pos = script->get_language()->find_function(p_function, code);
if (pos == -1) {
@@ -455,22 +447,18 @@ bool ScriptTextEditor::show_members_overview() {
}
void ScriptTextEditor::update_settings() {
-
code_editor->update_editor_settings();
}
bool ScriptTextEditor::is_unsaved() {
-
return code_editor->get_text_edit()->get_version() != code_editor->get_text_edit()->get_saved_version();
}
Variant ScriptTextEditor::get_edit_state() {
-
return code_editor->get_edit_state();
}
void ScriptTextEditor::set_edit_state(const Variant &p_state) {
-
code_editor->set_edit_state(p_state);
Dictionary state = p_state;
@@ -483,47 +471,38 @@ void ScriptTextEditor::set_edit_state(const Variant &p_state) {
}
void ScriptTextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) {
-
code_editor->convert_case(p_case);
}
void ScriptTextEditor::trim_trailing_whitespace() {
-
code_editor->trim_trailing_whitespace();
}
void ScriptTextEditor::insert_final_newline() {
-
code_editor->insert_final_newline();
}
void ScriptTextEditor::convert_indent_to_spaces() {
-
code_editor->convert_indent_to_spaces();
}
void ScriptTextEditor::convert_indent_to_tabs() {
-
code_editor->convert_indent_to_tabs();
}
void ScriptTextEditor::tag_saved_version() {
-
code_editor->get_text_edit()->tag_saved_version();
}
void ScriptTextEditor::goto_line(int p_line, bool p_with_error) {
-
code_editor->goto_line(p_line);
}
void ScriptTextEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
-
code_editor->goto_line_selection(p_line, p_begin, p_end);
}
void ScriptTextEditor::goto_line_centered(int p_line) {
-
code_editor->goto_line_centered(p_line);
}
@@ -536,7 +515,6 @@ void ScriptTextEditor::clear_executing_line() {
}
void ScriptTextEditor::ensure_focus() {
-
code_editor->get_text_edit()->grab_focus();
}
@@ -548,16 +526,16 @@ String ScriptTextEditor::get_name() {
if (is_unsaved()) {
name += "(*)";
}
- } else if (script->get_name() != "")
+ } else if (script->get_name() != "") {
name = script->get_name();
- else
+ } else {
name = script->get_class() + "(" + itos(script->get_instance_id()) + ")";
+ }
return name;
}
Ref<Texture2D> ScriptTextEditor::get_theme_icon() {
-
if (get_parent_control() && get_parent_control()->has_theme_icon(script->get_class(), "EditorIcons")) {
return get_parent_control()->get_theme_icon(script->get_class(), "EditorIcons");
}
@@ -566,7 +544,6 @@ Ref<Texture2D> ScriptTextEditor::get_theme_icon() {
}
void ScriptTextEditor::_validate_script() {
-
String errortxt;
int line = -1, col;
TextEdit *te = code_editor->get_text_edit();
@@ -592,7 +569,6 @@ void ScriptTextEditor::_validate_script() {
functions.clear();
for (List<String>::Element *E = fnc.front(); E; E = E->next()) {
-
functions.push_back(E->get());
}
script_is_valid = true;
@@ -633,6 +609,18 @@ void ScriptTextEditor::_validate_script() {
for (List<ScriptLanguage::Warning>::Element *E = warnings.front(); E; E = E->next()) {
ScriptLanguage::Warning w = E->get();
+ Dictionary ignore_meta;
+ ignore_meta["line"] = w.line;
+ ignore_meta["code"] = w.string_code.to_lower();
+ warnings_panel->push_cell();
+ warnings_panel->push_meta(ignore_meta);
+ warnings_panel->push_color(
+ warnings_panel->get_theme_color("accent_color", "Editor").lerp(warnings_panel->get_theme_color("mono_color", "Editor"), 0.5));
+ warnings_panel->add_text(TTR("[Ignore]"));
+ warnings_panel->pop(); // Color.
+ warnings_panel->pop(); // Meta ignore.
+ warnings_panel->pop(); // Cell.
+
warnings_panel->push_cell();
warnings_panel->push_meta(w.line - 1);
warnings_panel->push_color(warnings_panel->get_theme_color("warning_color", "Editor"));
@@ -645,15 +633,6 @@ void ScriptTextEditor::_validate_script() {
warnings_panel->push_cell();
warnings_panel->add_text(w.message);
warnings_panel->pop(); // Cell.
-
- Dictionary ignore_meta;
- ignore_meta["line"] = w.line;
- ignore_meta["code"] = w.string_code.to_lower();
- warnings_panel->push_cell();
- warnings_panel->push_meta(ignore_meta);
- warnings_panel->add_text(TTR("(ignore)"));
- warnings_panel->pop(); // Meta ignore.
- warnings_panel->pop(); // Cell.
}
warnings_panel->pop(); // Table.
@@ -682,7 +661,6 @@ void ScriptTextEditor::_validate_script() {
}
void ScriptTextEditor::_update_bookmark_list() {
-
bookmarks_menu->clear();
bookmarks_menu->set_size(Size2(1, 1));
@@ -714,7 +692,6 @@ void ScriptTextEditor::_update_bookmark_list() {
}
void ScriptTextEditor::_bookmark_item_pressed(int p_idx) {
-
if (p_idx < 4) { // Any item before the separator.
_edit_option(bookmarks_menu->get_item_id(p_idx));
} else {
@@ -724,7 +701,6 @@ void ScriptTextEditor::_bookmark_item_pressed(int p_idx) {
}
static Vector<Node *> _find_all_node_for_script(Node *p_base, Node *p_current, const Ref<Script> &p_script) {
-
Vector<Node *> nodes;
if (p_current->get_owner() != p_base && p_base != p_current) {
@@ -745,29 +721,32 @@ static Vector<Node *> _find_all_node_for_script(Node *p_base, Node *p_current, c
}
static Node *_find_node_for_script(Node *p_base, Node *p_current, const Ref<Script> &p_script) {
-
- if (p_current->get_owner() != p_base && p_base != p_current)
+ if (p_current->get_owner() != p_base && p_base != p_current) {
return nullptr;
+ }
Ref<Script> c = p_current->get_script();
- if (c == p_script)
+ if (c == p_script) {
return p_current;
+ }
for (int i = 0; i < p_current->get_child_count(); i++) {
Node *found = _find_node_for_script(p_base, p_current->get_child(i), p_script);
- if (found)
+ if (found) {
return found;
+ }
}
return nullptr;
}
static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, Set<Ref<Script>> &r_scripts) {
-
- if (p_current->get_owner() != p_base && p_base != p_current)
+ if (p_current->get_owner() != p_base && p_base != p_current) {
return;
+ }
Ref<Script> c = p_current->get_script();
- if (c.is_valid())
+ if (c.is_valid()) {
r_scripts.insert(c);
+ }
for (int i = 0; i < p_current->get_child_count(); i++) {
_find_changed_scripts_for_external_editor(p_base, p_current->get_child(i), r_scripts);
@@ -775,9 +754,9 @@ static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_curr
}
void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_for_script) {
-
- if (!bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")))
+ if (!bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
return;
+ }
ERR_FAIL_COND(!get_tree());
@@ -789,14 +768,13 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
}
for (Set<Ref<Script>>::Element *E = scripts.front(); E; E = E->next()) {
-
Ref<Script> script = E->get();
- if (p_for_script.is_valid() && p_for_script != script)
+ if (p_for_script.is_valid() && p_for_script != script) {
continue;
+ }
if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) {
-
continue; //internal script, who cares, though weird
}
@@ -804,7 +782,6 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
uint64_t date = FileAccess::get_modified_time(script->get_path());
if (last_date != date) {
-
Ref<Script> rel_script = ResourceLoader::load(script->get_path(), script->get_class(), true);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code(rel_script->get_source_code());
@@ -815,15 +792,14 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
}
void ScriptTextEditor::_code_complete_scripts(void *p_ud, const String &p_code, List<ScriptCodeCompletionOption> *r_options, bool &r_force) {
-
ScriptTextEditor *ste = (ScriptTextEditor *)p_ud;
ste->_code_complete_script(p_code, r_options, r_force);
}
void ScriptTextEditor::_code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options, bool &r_force) {
-
- if (color_panel->is_visible())
+ if (color_panel->is_visible()) {
return;
+ }
Node *base = get_tree()->get_edited_scene_root();
if (base) {
base = _find_node_for_script(base, base, script);
@@ -836,7 +812,6 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<ScriptCo
}
void ScriptTextEditor::_update_breakpoint_list() {
-
breakpoints_menu->clear();
breakpoints_menu->set_size(Size2(1, 1));
@@ -868,7 +843,6 @@ void ScriptTextEditor::_update_breakpoint_list() {
}
void ScriptTextEditor::_breakpoint_item_pressed(int p_idx) {
-
if (p_idx < 4) { // Any item before the separator.
_edit_option(breakpoints_menu->get_item_id(p_idx));
} else {
@@ -878,12 +852,10 @@ void ScriptTextEditor::_breakpoint_item_pressed(int p_idx) {
}
void ScriptTextEditor::_breakpoint_toggled(int p_row) {
-
EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), p_row + 1, code_editor->get_text_edit()->is_line_set_as_breakpoint(p_row));
}
void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_column) {
-
Node *base = get_tree()->get_edited_scene_root();
if (base) {
base = _find_node_for_script(base, base, script);
@@ -903,14 +875,12 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
}
} else if (script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), p_symbol, script->get_path(), base, result) == OK) {
-
_goto_line(p_row);
result.class_name = result.class_name.trim_prefix("_");
switch (result.type) {
case ScriptLanguage::LookupResult::RESULT_SCRIPT_LOCATION: {
-
if (result.script.is_valid()) {
emit_signal("request_open_script_at_line", result.script, result.location - 1);
} else {
@@ -922,7 +892,6 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
emit_signal("go_to_help", "class_name:" + result.class_name);
} break;
case ScriptLanguage::LookupResult::RESULT_CLASS_CONSTANT: {
-
StringName cname = result.class_name;
bool success;
while (true) {
@@ -943,7 +912,6 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
} break;
case ScriptLanguage::LookupResult::RESULT_CLASS_METHOD: {
-
StringName cname = result.class_name;
while (true) {
@@ -959,7 +927,6 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
} break;
case ScriptLanguage::LookupResult::RESULT_CLASS_ENUM: {
-
StringName cname = result.class_name;
StringName success;
while (true) {
@@ -1003,7 +970,6 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
}
void ScriptTextEditor::_validate_symbol(const String &p_symbol) {
-
TextEdit *text_edit = code_editor->get_text_edit();
Node *base = get_tree()->get_edited_scene_root();
@@ -1015,7 +981,6 @@ void ScriptTextEditor::_validate_symbol(const String &p_symbol) {
if (ScriptServer::is_global_class(p_symbol) || p_symbol.is_resource_file() || script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), p_symbol, script->get_path(), base, result) == OK || ProjectSettings::get_singleton()->has_setting("autoload/" + p_symbol)) {
text_edit->set_highlighted_word(p_symbol);
} else if (p_symbol.is_rel_path()) {
-
String path = _get_absolute_path(p_symbol);
if (FileAccess::exists(path)) {
text_edit->set_highlighted_word(p_symbol);
@@ -1124,101 +1089,85 @@ void ScriptTextEditor::_lookup_connections(int p_row, String p_method) {
}
void ScriptTextEditor::_edit_option(int p_op) {
-
TextEdit *tx = code_editor->get_text_edit();
switch (p_op) {
case EDIT_UNDO: {
-
tx->undo();
tx->call_deferred("grab_focus");
} break;
case EDIT_REDO: {
-
tx->redo();
tx->call_deferred("grab_focus");
} break;
case EDIT_CUT: {
-
tx->cut();
tx->call_deferred("grab_focus");
} break;
case EDIT_COPY: {
-
tx->copy();
tx->call_deferred("grab_focus");
} break;
case EDIT_PASTE: {
-
tx->paste();
tx->call_deferred("grab_focus");
} break;
case EDIT_SELECT_ALL: {
-
tx->select_all();
tx->call_deferred("grab_focus");
} break;
case EDIT_MOVE_LINE_UP: {
-
code_editor->move_lines_up();
} break;
case EDIT_MOVE_LINE_DOWN: {
-
code_editor->move_lines_down();
} break;
case EDIT_INDENT_LEFT: {
-
Ref<Script> scr = script;
- if (scr.is_null())
+ if (scr.is_null()) {
return;
+ }
tx->indent_left();
} break;
case EDIT_INDENT_RIGHT: {
-
Ref<Script> scr = script;
- if (scr.is_null())
+ if (scr.is_null()) {
return;
+ }
tx->indent_right();
} break;
case EDIT_DELETE_LINE: {
-
code_editor->delete_lines();
} break;
case EDIT_CLONE_DOWN: {
-
code_editor->clone_lines_down();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
-
tx->toggle_fold_line(tx->cursor_get_line());
tx->update();
} break;
case EDIT_FOLD_ALL_LINES: {
-
tx->fold_all_lines();
tx->update();
} break;
case EDIT_UNFOLD_ALL_LINES: {
-
tx->unhide_all_lines();
tx->update();
} break;
case EDIT_TOGGLE_COMMENT: {
-
_edit_option_toggle_inline_comment();
} break;
case EDIT_COMPLETE: {
-
tx->query_code_comple();
} break;
case EDIT_AUTO_INDENT: {
-
String text = tx->get_text();
Ref<Script> scr = script;
- if (scr.is_null())
+ if (scr.is_null()) {
return;
+ }
tx->begin_complex_operation();
int begin, end;
@@ -1242,35 +1191,27 @@ void ScriptTextEditor::_edit_option(int p_op) {
tx->end_complex_operation();
} break;
case EDIT_TRIM_TRAILING_WHITESAPCE: {
-
trim_trailing_whitespace();
} break;
case EDIT_CONVERT_INDENT_TO_SPACES: {
-
convert_indent_to_spaces();
} break;
case EDIT_CONVERT_INDENT_TO_TABS: {
-
convert_indent_to_tabs();
} break;
case EDIT_PICK_COLOR: {
-
color_panel->popup();
} break;
case EDIT_TO_UPPERCASE: {
-
_convert_case(CodeTextEditor::UPPER);
} break;
case EDIT_TO_LOWERCASE: {
-
_convert_case(CodeTextEditor::LOWER);
} break;
case EDIT_CAPITALIZE: {
-
_convert_case(CodeTextEditor::CAPITALIZE);
} break;
case EDIT_EVALUATE: {
-
Expression expression;
Vector<String> lines = code_editor->get_text_edit()->get_selection_text().split("\n");
PackedStringArray results;
@@ -1296,23 +1237,18 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->get_text_edit()->end_complex_operation();
} break;
case SEARCH_FIND: {
-
code_editor->get_find_replace_bar()->popup_search();
} break;
case SEARCH_FIND_NEXT: {
-
code_editor->get_find_replace_bar()->search_next();
} break;
case SEARCH_FIND_PREV: {
-
code_editor->get_find_replace_bar()->search_prev();
} break;
case SEARCH_REPLACE: {
-
code_editor->get_find_replace_bar()->popup_replace();
} break;
case SEARCH_IN_FILES: {
-
String selected_text = code_editor->get_text_edit()->get_selection_text();
// Yep, because it doesn't make sense to instance this dialog for every single script open...
@@ -1320,45 +1256,36 @@ void ScriptTextEditor::_edit_option(int p_op) {
emit_signal("search_in_files_requested", selected_text);
} break;
case REPLACE_IN_FILES: {
-
String selected_text = code_editor->get_text_edit()->get_selection_text();
emit_signal("replace_in_files_requested", selected_text);
} break;
case SEARCH_LOCATE_FUNCTION: {
-
quick_open->popup_dialog(get_functions());
quick_open->set_title(TTR("Go to Function"));
} break;
case SEARCH_GOTO_LINE: {
-
goto_line_dialog->popup_find_line(tx);
} break;
case BOOKMARK_TOGGLE: {
-
code_editor->toggle_bookmark();
} break;
case BOOKMARK_GOTO_NEXT: {
-
code_editor->goto_next_bookmark();
} break;
case BOOKMARK_GOTO_PREV: {
-
code_editor->goto_prev_bookmark();
} break;
case BOOKMARK_REMOVE_ALL: {
-
code_editor->remove_all_bookmarks();
} break;
case DEBUG_TOGGLE_BREAKPOINT: {
-
int line = tx->cursor_get_line();
bool dobreak = !tx->is_line_set_as_breakpoint(line);
tx->set_line_as_breakpoint(line, dobreak);
EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak);
} break;
case DEBUG_REMOVE_ALL_BREAKPOINTS: {
-
List<int> bpoints;
tx->get_breakpoints(&bpoints);
@@ -1370,7 +1297,6 @@ void ScriptTextEditor::_edit_option(int p_op) {
}
} break;
case DEBUG_GOTO_NEXT_BREAKPOINT: {
-
List<int> bpoints;
tx->get_breakpoints(&bpoints);
if (bpoints.size() <= 0) {
@@ -1398,7 +1324,6 @@ void ScriptTextEditor::_edit_option(int p_op) {
} break;
case DEBUG_GOTO_PREV_BREAKPOINT: {
-
List<int> bpoints;
tx->get_breakpoints(&bpoints);
if (bpoints.size() <= 0) {
@@ -1425,19 +1350,19 @@ void ScriptTextEditor::_edit_option(int p_op) {
} break;
case HELP_CONTEXTUAL: {
-
String text = tx->get_selection_text();
- if (text == "")
+ if (text == "") {
text = tx->get_word_under_cursor();
+ }
if (text != "") {
emit_signal("request_help", text);
}
} break;
case LOOKUP_SYMBOL: {
-
String text = tx->get_word_under_cursor();
- if (text == "")
+ if (text == "") {
text = tx->get_selection_text();
+ }
if (text != "") {
_lookup_symbol(text, tx->cursor_get_line(), tx->cursor_get_column());
}
@@ -1446,8 +1371,9 @@ void ScriptTextEditor::_edit_option(int p_op) {
}
void ScriptTextEditor::_edit_option_toggle_inline_comment() {
- if (script.is_null())
+ if (script.is_null()) {
return;
+ }
String delimiter = "#";
List<String> comment_delimiters;
@@ -1472,10 +1398,11 @@ void ScriptTextEditor::add_syntax_highlighter(SyntaxHighlighter *p_highlighter)
void ScriptTextEditor::set_syntax_highlighter(SyntaxHighlighter *p_highlighter) {
TextEdit *te = code_editor->get_text_edit();
te->_set_syntax_highlighting(p_highlighter);
- if (p_highlighter != nullptr)
+ if (p_highlighter != nullptr) {
highlighter_menu->set_item_checked(highlighter_menu->get_item_idx_from_text(p_highlighter->get_name()), true);
- else
+ } else {
highlighter_menu->set_item_checked(highlighter_menu->get_item_idx_from_text(TTR("Standard")), true);
+ }
}
void ScriptTextEditor::_change_syntax_highlighter(int p_idx) {
@@ -1489,7 +1416,6 @@ void ScriptTextEditor::_change_syntax_highlighter(int p_idx) {
}
void ScriptTextEditor::_bind_methods() {
-
ClassDB::bind_method("_update_connected_methods", &ScriptTextEditor::_update_connected_methods);
ClassDB::bind_method("get_drag_data_fw", &ScriptTextEditor::get_drag_data_fw);
@@ -1498,7 +1424,6 @@ void ScriptTextEditor::_bind_methods() {
}
Control *ScriptTextEditor::get_edit_menu() {
-
return edit_hb;
}
@@ -1507,11 +1432,11 @@ void ScriptTextEditor::clear_edit_menu() {
}
void ScriptTextEditor::reload(bool p_soft) {
-
TextEdit *te = code_editor->get_text_edit();
Ref<Script> scr = script;
- if (scr.is_null())
+ if (scr.is_null()) {
return;
+ }
scr->set_source_code(te->get_text());
bool soft = p_soft || scr->get_instance_base_type() == "EditorPlugin"; //always soft-reload editor plugins
@@ -1519,12 +1444,10 @@ void ScriptTextEditor::reload(bool p_soft) {
}
void ScriptTextEditor::get_breakpoints(List<int> *p_breakpoints) {
-
code_editor->get_text_edit()->get_breakpoints(p_breakpoints);
}
void ScriptTextEditor::set_tooltip_request_func(String p_method, Object *p_obj) {
-
code_editor->get_text_edit()->set_tooltip_request_func(p_obj, p_method, this);
}
@@ -1532,18 +1455,15 @@ void ScriptTextEditor::set_debugger_active(bool p_active) {
}
Variant ScriptTextEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
return Variant();
}
bool ScriptTextEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
if (d.has("type") && (String(d["type"]) == "resource" ||
String(d["type"]) == "files" ||
String(d["type"]) == "nodes" ||
String(d["type"]) == "files_and_dirs")) {
-
return true;
}
@@ -1551,26 +1471,27 @@ bool ScriptTextEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_
}
static Node *_find_script_node(Node *p_edited_scene, Node *p_current_node, const Ref<Script> &script) {
-
- if (p_edited_scene != p_current_node && p_current_node->get_owner() != p_edited_scene)
+ if (p_edited_scene != p_current_node && p_current_node->get_owner() != p_edited_scene) {
return nullptr;
+ }
Ref<Script> scr = p_current_node->get_script();
- if (scr.is_valid() && scr == script)
+ if (scr.is_valid() && scr == script) {
return p_current_node;
+ }
for (int i = 0; i < p_current_node->get_child_count(); i++) {
Node *n = _find_script_node(p_edited_scene, p_current_node->get_child(i), script);
- if (n)
+ if (n) {
return n;
+ }
}
return nullptr;
}
void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
Dictionary d = p_data;
TextEdit *te = code_editor->get_text_edit();
@@ -1578,7 +1499,6 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
te->_get_mouse_pos(p_point, row, col);
if (d.has("type") && String(d["type"]) == "resource") {
-
Ref<Resource> res = d["resource"];
if (!res.is_valid()) {
return;
@@ -1595,14 +1515,13 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (d.has("type") && (String(d["type"]) == "files" || String(d["type"]) == "files_and_dirs")) {
-
Array files = d["files"];
String text_to_drop;
for (int i = 0; i < files.size(); i++) {
-
- if (i > 0)
+ if (i > 0) {
text_to_drop += ",";
+ }
text_to_drop += "\"" + String(files[i]).c_escape() + "\"";
}
@@ -1612,7 +1531,6 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (d.has("type") && String(d["type"]) == "nodes") {
-
Node *sn = _find_script_node(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root(), script);
if (!sn) {
@@ -1623,9 +1541,9 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
Array nodes = d["nodes"];
String text_to_drop;
for (int i = 0; i < nodes.size(); i++) {
-
- if (i > 0)
+ if (i > 0) {
text_to_drop += ",";
+ }
NodePath np = nodes[i];
Node *node = get_node(np);
@@ -1644,7 +1562,6 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
-
Ref<InputEventMouseButton> mb = ev;
Ref<InputEventKey> k = ev;
Point2 local_pos;
@@ -1683,10 +1600,12 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
}
String word_at_pos = tx->get_word_at_pos(local_pos);
- if (word_at_pos == "")
+ if (word_at_pos == "") {
word_at_pos = tx->get_word_under_cursor();
- if (word_at_pos == "")
+ }
+ if (word_at_pos == "") {
word_at_pos = tx->get_selection_text();
+ }
bool has_color = (word_at_pos == "Color");
bool foldable = tx->can_fold(row) || tx->is_folded(row);
@@ -1763,7 +1682,6 @@ void ScriptTextEditor::_color_changed(const Color &p_color) {
}
void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p_foldable, bool p_open_docs, bool p_goto_definition, Vector2 p_pos) {
-
context_menu->clear();
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
@@ -1788,15 +1706,18 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/evaluate_selection"), EDIT_EVALUATE);
}
- if (p_foldable)
+ if (p_foldable) {
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE);
+ }
if (p_color || p_open_docs || p_goto_definition) {
context_menu->add_separator();
- if (p_open_docs)
+ if (p_open_docs) {
context_menu->add_item(TTR("Lookup Symbol"), LOOKUP_SYMBOL);
- if (p_color)
+ }
+ if (p_color) {
context_menu->add_item(TTR("Pick Color"), EDIT_PICK_COLOR);
+ }
}
context_menu->set_position(get_global_transform().xform(p_pos));
@@ -1805,7 +1726,6 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p
}
ScriptTextEditor::ScriptTextEditor() {
-
theme_loaded = false;
script_is_valid = false;
@@ -1830,6 +1750,8 @@ ScriptTextEditor::ScriptTextEditor() {
warnings_panel = memnew(RichTextLabel);
editor_box->add_child(warnings_panel);
+ warnings_panel->add_theme_font_override(
+ "normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font("main", "EditorFonts"));
warnings_panel->set_custom_minimum_size(Size2(0, 100 * EDSCALE));
warnings_panel->set_h_size_flags(SIZE_EXPAND_FILL);
warnings_panel->set_meta_underline(true);
@@ -1864,10 +1786,11 @@ ScriptTextEditor::ScriptTextEditor() {
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
- if (default_color_mode == 1)
+ if (default_color_mode == 1) {
color_picker->set_hsv_mode(true);
- else if (default_color_mode == 2)
+ } else if (default_color_mode == 2) {
color_picker->set_raw_mode(true);
+ }
edit_hb = memnew(HBoxContainer);
@@ -1988,7 +1911,6 @@ ScriptTextEditor::~ScriptTextEditor() {
}
static ScriptEditorBase *create_editor(const RES &p_resource) {
-
if (Object::cast_to<Script>(*p_resource)) {
return memnew(ScriptTextEditor);
}
@@ -1996,7 +1918,6 @@ static ScriptEditorBase *create_editor(const RES &p_resource) {
}
void ScriptTextEditor::register_editor() {
-
ED_SHORTCUT("script_text_editor/undo", TTR("Undo"), KEY_MASK_CMD | KEY_Z);
ED_SHORTCUT("script_text_editor/redo", TTR("Redo"), KEY_MASK_CMD | KEY_Y);
ED_SHORTCUT("script_text_editor/cut", TTR("Cut"), KEY_MASK_CMD | KEY_X);
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index a0dfba6cc8..adcd0218bc 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -37,7 +37,6 @@
#include "script_editor_plugin.h"
class ConnectionInfoDialog : public AcceptDialog {
-
GDCLASS(ConnectionInfoDialog, AcceptDialog);
Label *method;
@@ -52,7 +51,6 @@ public:
};
class ScriptTextEditor : public ScriptEditorBase {
-
GDCLASS(ScriptTextEditor, ScriptEditorBase);
CodeTextEditor *code_editor;
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 9ef8148241..0c3a44e4cd 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -44,11 +44,10 @@
/*** SHADER SCRIPT EDITOR ****/
Ref<Shader> ShaderTextEditor::get_edited_shader() const {
-
return shader;
}
-void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
+void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
if (shader == p_shader) {
return;
}
@@ -84,7 +83,6 @@ void ShaderTextEditor::reload_text() {
}
void ShaderTextEditor::_load_theme_settings() {
-
get_text_edit()->clear_colors();
Color background_color = EDITOR_GET("text_editor/highlighting/background_color");
@@ -149,22 +147,18 @@ void ShaderTextEditor::_load_theme_settings() {
ShaderLanguage::get_keyword_list(&keywords);
if (shader.is_valid()) {
-
for (const Map<StringName, ShaderLanguage::FunctionInfo>::Element *E = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode())).front(); E; E = E->next()) {
-
for (const Map<StringName, ShaderLanguage::BuiltInInfo>::Element *F = E->get().built_ins.front(); F; F = F->next()) {
keywords.push_back(F->key());
}
}
for (int i = 0; i < ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode())).size(); i++) {
-
keywords.push_back(ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode()))[i]);
}
}
for (List<String>::Element *E = keywords.front(); E; E = E->next()) {
-
get_text_edit()->add_keyword_color(E->get(), keyword_color);
}
@@ -174,7 +168,6 @@ void ShaderTextEditor::_load_theme_settings() {
}
void ShaderTextEditor::_check_shader_mode() {
-
String type = ShaderLanguage::get_shader_type(get_text_edit()->get_text());
Shader::Mode mode;
@@ -194,13 +187,11 @@ void ShaderTextEditor::_check_shader_mode() {
}
static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_variable) {
-
RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_variable);
return RS::global_variable_type_get_shader_datatype(gvt);
}
void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options) {
-
_check_shader_mode();
ShaderLanguage sl;
@@ -212,7 +203,6 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCo
}
void ShaderTextEditor::_validate_script() {
-
_check_shader_mode();
String code = get_text_edit()->get_text();
@@ -227,13 +217,15 @@ void ShaderTextEditor::_validate_script() {
String error_text = "error(" + itos(sl.get_error_line()) + "): " + sl.get_error_text();
set_error(error_text);
set_error_pos(sl.get_error_line() - 1, 0);
- for (int i = 0; i < get_text_edit()->get_line_count(); i++)
+ for (int i = 0; i < get_text_edit()->get_line_count(); i++) {
get_text_edit()->set_line_as_marked(i, false);
+ }
get_text_edit()->set_line_as_marked(sl.get_error_line() - 1, true);
} else {
- for (int i = 0; i < get_text_edit()->get_line_count(); i++)
+ for (int i = 0; i < get_text_edit()->get_line_count(); i++) {
get_text_edit()->set_line_as_marked(i, false);
+ }
set_error("");
}
@@ -249,7 +241,6 @@ ShaderTextEditor::ShaderTextEditor() {
/*** SCRIPT EDITOR ******/
void ShaderEditor::_menu_option(int p_option) {
-
switch (p_option) {
case EDIT_UNDO: {
shader_editor->get_text_edit()->undo();
@@ -276,18 +267,18 @@ void ShaderEditor::_menu_option(int p_option) {
shader_editor->move_lines_down();
} break;
case EDIT_INDENT_LEFT: {
-
- if (shader.is_null())
+ if (shader.is_null()) {
return;
+ }
TextEdit *tx = shader_editor->get_text_edit();
tx->indent_left();
} break;
case EDIT_INDENT_RIGHT: {
-
- if (shader.is_null())
+ if (shader.is_null()) {
return;
+ }
TextEdit *tx = shader_editor->get_text_edit();
tx->indent_right();
@@ -300,51 +291,41 @@ void ShaderEditor::_menu_option(int p_option) {
shader_editor->clone_lines_down();
} break;
case EDIT_TOGGLE_COMMENT: {
-
- if (shader.is_null())
+ if (shader.is_null()) {
return;
+ }
shader_editor->toggle_inline_comment("//");
} break;
case EDIT_COMPLETE: {
-
shader_editor->get_text_edit()->query_code_comple();
} break;
case SEARCH_FIND: {
-
shader_editor->get_find_replace_bar()->popup_search();
} break;
case SEARCH_FIND_NEXT: {
-
shader_editor->get_find_replace_bar()->search_next();
} break;
case SEARCH_FIND_PREV: {
-
shader_editor->get_find_replace_bar()->search_prev();
} break;
case SEARCH_REPLACE: {
-
shader_editor->get_find_replace_bar()->popup_replace();
} break;
case SEARCH_GOTO_LINE: {
-
goto_line_dialog->popup_find_line(shader_editor->get_text_edit());
} break;
case BOOKMARK_TOGGLE: {
-
shader_editor->toggle_bookmark();
} break;
case BOOKMARK_GOTO_NEXT: {
-
shader_editor->goto_next_bookmark();
} break;
case BOOKMARK_GOTO_PREV: {
-
shader_editor->goto_prev_bookmark();
} break;
case BOOKMARK_REMOVE_ALL: {
-
shader_editor->remove_all_bookmarks();
} break;
case HELP_DOCS: {
@@ -357,19 +338,16 @@ void ShaderEditor::_menu_option(int p_option) {
}
void ShaderEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_WM_FOCUS_IN) {
_check_for_external_edit();
}
}
void ShaderEditor::_params_changed() {
-
shader_editor->_validate_script();
}
void ShaderEditor::_editor_settings_changed() {
-
shader_editor->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete"));
shader_editor->get_text_edit()->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
shader_editor->get_text_edit()->set_indent_size(EditorSettings::get_singleton()->get("text_editor/indent/size"));
@@ -396,12 +374,10 @@ void ShaderEditor::_editor_settings_changed() {
}
void ShaderEditor::_bind_methods() {
-
ClassDB::bind_method("_params_changed", &ShaderEditor::_params_changed);
}
void ShaderEditor::ensure_select_current() {
-
/*
if (tab_container->get_child_count() && tab_container->get_current_tab()>=0) {
@@ -414,12 +390,10 @@ void ShaderEditor::ensure_select_current() {
}
void ShaderEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
-
shader_editor->goto_line_selection(p_line, p_begin, p_end);
}
void ShaderEditor::_check_for_external_edit() {
-
if (shader.is_null() || !shader.is_valid()) {
return;
}
@@ -440,7 +414,6 @@ void ShaderEditor::_check_for_external_edit() {
}
void ShaderEditor::_reload_shader_from_disk() {
-
Ref<Shader> rel_shader = ResourceLoader::load(shader->get_path(), shader->get_class(), true);
ERR_FAIL_COND(!rel_shader.is_valid());
@@ -450,12 +423,13 @@ void ShaderEditor::_reload_shader_from_disk() {
}
void ShaderEditor::edit(const Ref<Shader> &p_shader) {
-
- if (p_shader.is_null() || !p_shader->is_text_shader())
+ if (p_shader.is_null() || !p_shader->is_text_shader()) {
return;
+ }
- if (shader == p_shader)
+ if (shader == p_shader) {
return;
+ }
shader = p_shader;
@@ -466,7 +440,6 @@ void ShaderEditor::edit(const Ref<Shader> &p_shader) {
}
void ShaderEditor::save_external_data(const String &p_str) {
-
if (shader.is_null()) {
disk_changed->hide();
return;
@@ -482,7 +455,6 @@ void ShaderEditor::save_external_data(const String &p_str) {
}
void ShaderEditor::apply_shaders() {
-
if (shader.is_valid()) {
String shader_code = shader->get_code();
String editor_code = shader_editor->get_text_edit()->get_text();
@@ -494,13 +466,10 @@ void ShaderEditor::apply_shaders() {
}
void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
-
Ref<InputEventMouseButton> mb = ev;
if (mb.is_valid()) {
-
if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
-
int col, row;
TextEdit *tx = shader_editor->get_text_edit();
tx->_get_mouse_pos(mb->get_global_position() - tx->get_global_position(), row, col);
@@ -508,7 +477,6 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (tx->is_right_click_moving_caret()) {
if (tx->is_selection_active()) {
-
int from_line = tx->get_selection_from_line();
int to_line = tx->get_selection_to_line();
int from_column = tx->get_selection_from_column();
@@ -537,7 +505,6 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
}
void ShaderEditor::_update_bookmark_list() {
-
bookmarks_menu->clear();
bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
@@ -565,7 +532,6 @@ void ShaderEditor::_update_bookmark_list() {
}
void ShaderEditor::_bookmark_item_pressed(int p_idx) {
-
if (p_idx < 4) { // Any item before the separator.
_menu_option(bookmarks_menu->get_item_id(p_idx));
} else {
@@ -574,7 +540,6 @@ void ShaderEditor::_bookmark_item_pressed(int p_idx) {
}
void ShaderEditor::_make_context_menu(bool p_selection, Vector2 p_position) {
-
context_menu->clear();
if (p_selection) {
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
@@ -599,7 +564,6 @@ void ShaderEditor::_make_context_menu(bool p_selection, Vector2 p_position) {
}
ShaderEditor::ShaderEditor(EditorNode *p_node) {
-
shader_editor = memnew(ShaderTextEditor);
shader_editor->set_v_size_flags(SIZE_EXPAND_FILL);
shader_editor->add_theme_constant_override("separation", 0);
@@ -714,49 +678,42 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
}
void ShaderEditorPlugin::edit(Object *p_object) {
-
Shader *s = Object::cast_to<Shader>(p_object);
shader_editor->edit(s);
}
bool ShaderEditorPlugin::handles(Object *p_object) const {
-
Shader *shader = Object::cast_to<Shader>(p_object);
return shader != nullptr && shader->is_text_shader();
}
void ShaderEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
button->show();
editor->make_bottom_panel_item_visible(shader_editor);
} else {
-
button->hide();
- if (shader_editor->is_visible_in_tree())
+ if (shader_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
+ }
shader_editor->apply_shaders();
}
}
void ShaderEditorPlugin::selected_notify() {
-
shader_editor->ensure_select_current();
}
void ShaderEditorPlugin::save_external_data() {
-
shader_editor->save_external_data();
}
void ShaderEditorPlugin::apply_changes() {
-
shader_editor->apply_shaders();
}
ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
shader_editor = memnew(ShaderEditor(p_node));
diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h
index f02ed590fc..0208b43e13 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -42,7 +42,6 @@
#include "servers/rendering/shader_language.h"
class ShaderTextEditor : public CodeTextEditor {
-
GDCLASS(ShaderTextEditor, CodeTextEditor);
Ref<Shader> shader;
@@ -66,7 +65,6 @@ public:
};
class ShaderEditor : public PanelContainer {
-
GDCLASS(ShaderEditor, PanelContainer);
enum {
@@ -143,7 +141,6 @@ public:
};
class ShaderEditorPlugin : public EditorPlugin {
-
GDCLASS(ShaderEditorPlugin, EditorPlugin);
bool _2d;
diff --git a/editor/plugins/shader_file_editor_plugin.cpp b/editor/plugins/shader_file_editor_plugin.cpp
index 9d5ffd6516..0ac29f68f6 100644
--- a/editor/plugins/shader_file_editor_plugin.cpp
+++ b/editor/plugins/shader_file_editor_plugin.cpp
@@ -49,7 +49,6 @@ void ShaderFileEditor::_update_version(const StringName &p_version_txt, const RD
}
void ShaderFileEditor::_version_selected(int p_option) {
-
int c = versions->get_current();
StringName version_txt = versions->get_item_metadata(c);
@@ -106,7 +105,6 @@ void ShaderFileEditor::_version_selected(int p_option) {
}
void ShaderFileEditor::_update_options() {
-
ERR_FAIL_COND(shader_file.is_null());
if (shader_file->get_base_error() != String()) {
@@ -202,7 +200,6 @@ void ShaderFileEditor::_update_options() {
}
void ShaderFileEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_WM_FOCUS_IN) {
if (is_visible_in_tree() && shader_file.is_valid()) {
_update_options();
@@ -211,7 +208,6 @@ void ShaderFileEditor::_notification(int p_what) {
}
void ShaderFileEditor::_editor_settings_changed() {
-
if (is_visible_in_tree() && shader_file.is_valid()) {
_update_options();
}
@@ -221,7 +217,6 @@ void ShaderFileEditor::_bind_methods() {
}
void ShaderFileEditor::edit(const Ref<RDShaderFile> &p_shader) {
-
if (p_shader.is_null()) {
if (shader_file.is_valid()) {
shader_file->disconnect("changed", callable_mp(this, &ShaderFileEditor::_shader_changed));
@@ -229,8 +224,9 @@ void ShaderFileEditor::edit(const Ref<RDShaderFile> &p_shader) {
return;
}
- if (shader_file == p_shader)
+ if (shader_file == p_shader) {
return;
+ }
shader_file = p_shader;
@@ -242,7 +238,6 @@ void ShaderFileEditor::edit(const Ref<RDShaderFile> &p_shader) {
}
void ShaderFileEditor::_shader_changed() {
-
if (is_visible_in_tree()) {
_update_options();
}
@@ -294,33 +289,29 @@ ShaderFileEditor::ShaderFileEditor(EditorNode *p_node) {
}
void ShaderFileEditorPlugin::edit(Object *p_object) {
-
RDShaderFile *s = Object::cast_to<RDShaderFile>(p_object);
shader_editor->edit(s);
}
bool ShaderFileEditorPlugin::handles(Object *p_object) const {
-
RDShaderFile *shader = Object::cast_to<RDShaderFile>(p_object);
return shader != nullptr;
}
void ShaderFileEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
button->show();
editor->make_bottom_panel_item_visible(shader_editor);
} else {
-
button->hide();
- if (shader_editor->is_visible_in_tree())
+ if (shader_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
+ }
}
}
ShaderFileEditorPlugin::ShaderFileEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
shader_editor = memnew(ShaderFileEditor(p_node));
diff --git a/editor/plugins/shader_file_editor_plugin.h b/editor/plugins/shader_file_editor_plugin.h
index 7df177a0d5..19617366b2 100644
--- a/editor/plugins/shader_file_editor_plugin.h
+++ b/editor/plugins/shader_file_editor_plugin.h
@@ -42,7 +42,6 @@
#include "servers/rendering/rendering_device_binds.h"
class ShaderFileEditor : public PanelContainer {
-
GDCLASS(ShaderFileEditor, PanelContainer);
Ref<RDShaderFile> shader_file;
@@ -71,7 +70,6 @@ public:
};
class ShaderFileEditorPlugin : public EditorPlugin {
-
GDCLASS(ShaderFileEditorPlugin, EditorPlugin);
ShaderFileEditor *shader_editor;
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index c81d3f787e..a198e4ff8f 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -36,7 +36,6 @@
#include "thirdparty/misc/clipper.hpp"
void Skeleton2DEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
options->hide();
@@ -44,19 +43,16 @@ void Skeleton2DEditor::_node_removed(Node *p_node) {
}
void Skeleton2DEditor::edit(Skeleton2D *p_sprite) {
-
node = p_sprite;
}
void Skeleton2DEditor::_menu_option(int p_option) {
-
if (!node) {
return;
}
switch (p_option) {
case MENU_OPTION_MAKE_REST: {
-
if (node->get_bone_count() == 0) {
err_dialog->set_text(TTR("This skeleton has no bones, create some children Bone2D nodes."));
err_dialog->popup_centered();
@@ -95,7 +91,6 @@ void Skeleton2DEditor::_bind_methods() {
}
Skeleton2DEditor::Skeleton2DEditor() {
-
options = memnew(MenuButton);
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
@@ -115,28 +110,23 @@ Skeleton2DEditor::Skeleton2DEditor() {
}
void Skeleton2DEditorPlugin::edit(Object *p_object) {
-
sprite_editor->edit(Object::cast_to<Skeleton2D>(p_object));
}
bool Skeleton2DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("Skeleton2D");
}
void Skeleton2DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
sprite_editor->options->show();
} else {
-
sprite_editor->options->hide();
sprite_editor->edit(nullptr);
}
}
Skeleton2DEditorPlugin::Skeleton2DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
sprite_editor = memnew(Skeleton2DEditor);
editor->get_viewport()->add_child(sprite_editor);
diff --git a/editor/plugins/skeleton_2d_editor_plugin.h b/editor/plugins/skeleton_2d_editor_plugin.h
index ebc6746b81..f1ba1a3612 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.h
+++ b/editor/plugins/skeleton_2d_editor_plugin.h
@@ -37,7 +37,6 @@
#include "scene/gui/spin_box.h"
class Skeleton2DEditor : public Control {
-
GDCLASS(Skeleton2DEditor, Control);
enum Menu {
@@ -65,7 +64,6 @@ public:
};
class Skeleton2DEditorPlugin : public EditorPlugin {
-
GDCLASS(Skeleton2DEditorPlugin, EditorPlugin);
Skeleton2DEditor *sprite_editor;
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index fac4cb19d8..52da8dea19 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -30,13 +30,289 @@
#include "skeleton_3d_editor_plugin.h"
+#include "core/io/resource_saver.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_properties.h"
+#include "editor/editor_scale.h"
+#include "editor/plugins/animation_player_editor_plugin.h"
#include "node_3d_editor_plugin.h"
#include "scene/3d/collision_shape_3d.h"
+#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/physics_body_3d.h"
#include "scene/3d/physics_joint_3d.h"
#include "scene/resources/capsule_shape_3d.h"
#include "scene/resources/sphere_shape_3d.h"
+void BoneTransformEditor::create_editors() {
+ const Color section_color = get_theme_color("prop_subsection", "Editor");
+
+ section = memnew(EditorInspectorSection);
+ section->setup("trf_properties", label, this, section_color, true);
+ add_child(section);
+
+ key_button = memnew(Button);
+ key_button->set_text(TTR("Key Transform"));
+ key_button->set_visible(keyable);
+ key_button->set_icon(get_theme_icon("Key", "EditorIcons"));
+ key_button->set_flat(true);
+ section->get_vbox()->add_child(key_button);
+
+ enabled_checkbox = memnew(CheckBox(TTR("Pose Enabled")));
+ enabled_checkbox->set_flat(true);
+ enabled_checkbox->set_visible(toggle_enabled);
+ section->get_vbox()->add_child(enabled_checkbox);
+
+ // Translation property
+ translation_property = memnew(EditorPropertyVector3());
+ translation_property->setup(-10000, 10000, 0.001f, true);
+ translation_property->set_label("Translation");
+ translation_property->set_use_folding(true);
+ translation_property->set_read_only(false);
+ translation_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3));
+ section->get_vbox()->add_child(translation_property);
+
+ // Rotation property
+ rotation_property = memnew(EditorPropertyVector3());
+ rotation_property->setup(-10000, 10000, 0.001f, true);
+ rotation_property->set_label("Rotation Degrees");
+ rotation_property->set_use_folding(true);
+ rotation_property->set_read_only(false);
+ rotation_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3));
+ section->get_vbox()->add_child(rotation_property);
+
+ // Scale property
+ scale_property = memnew(EditorPropertyVector3());
+ scale_property->setup(-10000, 10000, 0.001f, true);
+ scale_property->set_label("Scale");
+ scale_property->set_use_folding(true);
+ scale_property->set_read_only(false);
+ scale_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3));
+ section->get_vbox()->add_child(scale_property);
+
+ // Transform/Matrix section
+ transform_section = memnew(EditorInspectorSection);
+ transform_section->setup("trf_properties_transform", "Matrix", this, section_color, true);
+ section->get_vbox()->add_child(transform_section);
+
+ // Transform/Matrix property
+ transform_property = memnew(EditorPropertyTransform());
+ transform_property->setup(-10000, 10000, 0.001f, true);
+ transform_property->set_label("Transform");
+ transform_property->set_use_folding(true);
+ transform_property->set_read_only(false);
+ transform_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_transform));
+ transform_section->get_vbox()->add_child(transform_property);
+}
+
+void BoneTransformEditor::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ create_editors();
+ key_button->connect("pressed", callable_mp(this, &BoneTransformEditor::_key_button_pressed));
+ enabled_checkbox->connect("toggled", callable_mp(this, &BoneTransformEditor::_checkbox_toggled));
+ [[fallthrough]];
+ }
+ case NOTIFICATION_SORT_CHILDREN: {
+ const Ref<Font> font = get_theme_font("font", "Tree");
+
+ Point2 buffer;
+ buffer.x += get_theme_constant("inspector_margin", "Editor");
+ buffer.y += font->get_height();
+ buffer.y += get_theme_constant("vseparation", "Tree");
+
+ const float vector_height = translation_property->get_size().y;
+ const float transform_height = transform_property->get_size().y;
+ const float button_height = key_button->get_size().y;
+
+ const float width = get_size().x - get_theme_constant("inspector_margin", "Editor");
+ Vector<Rect2> input_rects;
+ if (keyable && section->get_vbox()->is_visible()) {
+ input_rects.push_back(Rect2(key_button->get_position() + buffer, Size2(width, button_height)));
+ } else {
+ input_rects.push_back(Rect2(0, 0, 0, 0));
+ }
+
+ if (section->get_vbox()->is_visible()) {
+ input_rects.push_back(Rect2(translation_property->get_position() + buffer, Size2(width, vector_height)));
+ input_rects.push_back(Rect2(rotation_property->get_position() + buffer, Size2(width, vector_height)));
+ input_rects.push_back(Rect2(scale_property->get_position() + buffer, Size2(width, vector_height)));
+ input_rects.push_back(Rect2(transform_property->get_position() + buffer, Size2(width, transform_height)));
+ } else {
+ const int32_t start = input_rects.size();
+ const int32_t empty_input_rect_elements = 4;
+ const int32_t end = start + empty_input_rect_elements;
+ for (int i = start; i < end; ++i) {
+ input_rects.push_back(Rect2(0, 0, 0, 0));
+ }
+ }
+
+ for (int32_t i = 0; i < input_rects.size(); i++) {
+ background_rects[i] = input_rects[i];
+ }
+
+ update();
+ break;
+ }
+ case NOTIFICATION_DRAW: {
+ const Color dark_color = get_theme_color("dark_color_2", "Editor");
+
+ for (int i = 0; i < 5; ++i) {
+ draw_rect(background_rects[i], dark_color);
+ }
+
+ break;
+ }
+ }
+}
+
+void BoneTransformEditor::_value_changed(const double p_value) {
+ if (updating)
+ return;
+
+ Transform tform = compute_transform_from_vector3s();
+ _change_transform(tform);
+}
+
+void BoneTransformEditor::_value_changed_vector3(const String p_property_name, const Vector3 p_vector, const StringName p_edited_property_name, const bool p_boolean) {
+ if (updating)
+ return;
+ Transform tform = compute_transform_from_vector3s();
+ _change_transform(tform);
+}
+
+Transform BoneTransformEditor::compute_transform_from_vector3s() const {
+ // Convert rotation from degrees to radians.
+ Vector3 prop_rotation = rotation_property->get_vector();
+ prop_rotation.x = Math::deg2rad(prop_rotation.x);
+ prop_rotation.y = Math::deg2rad(prop_rotation.y);
+ prop_rotation.z = Math::deg2rad(prop_rotation.z);
+
+ return Transform(
+ Basis(prop_rotation, scale_property->get_vector()),
+ translation_property->get_vector());
+}
+
+void BoneTransformEditor::_value_changed_transform(const String p_property_name, const Transform p_transform, const StringName p_edited_property_name, const bool p_boolean) {
+ if (updating)
+ return;
+ _change_transform(p_transform);
+}
+
+void BoneTransformEditor::_change_transform(Transform p_new_transform) {
+ if (property.get_slicec('/', 0) == "bones" && property.get_slicec('/', 2) == "custom_pose") {
+ undo_redo->create_action(TTR("Set Custom Bone Pose Transform"), UndoRedo::MERGE_ENDS);
+ undo_redo->add_undo_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), skeleton->get_bone_custom_pose(property.get_slicec('/', 1).to_int()));
+ undo_redo->add_do_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), p_new_transform);
+ undo_redo->commit_action();
+ } else if (property.get_slicec('/', 0) == "bones") {
+ undo_redo->create_action(TTR("Set Bone Transform"), UndoRedo::MERGE_ENDS);
+ undo_redo->add_undo_property(skeleton, property, skeleton->get(property));
+ undo_redo->add_do_property(skeleton, property, p_new_transform);
+ undo_redo->commit_action();
+ }
+}
+
+void BoneTransformEditor::update_enabled_checkbox() {
+ if (enabled_checkbox) {
+ const String path = "bones/" + property.get_slicec('/', 1) + "/enabled";
+ const bool is_enabled = skeleton->get(path);
+ enabled_checkbox->set_pressed(is_enabled);
+ }
+}
+
+void BoneTransformEditor::_update_properties() {
+ if (updating)
+ return;
+
+ if (skeleton == nullptr)
+ return;
+
+ updating = true;
+
+ Transform tform = skeleton->get(property);
+ _update_transform_properties(tform);
+}
+
+void BoneTransformEditor::_update_custom_pose_properties() {
+ if (updating)
+ return;
+
+ if (skeleton == nullptr)
+ return;
+
+ updating = true;
+
+ Transform tform = skeleton->get_bone_custom_pose(property.to_int());
+ _update_transform_properties(tform);
+}
+
+void BoneTransformEditor::_update_transform_properties(Transform tform) {
+ Basis rotation_basis = tform.get_basis();
+ Vector3 rotation_radians = rotation_basis.get_rotation_euler();
+ Vector3 rotation_degrees = Vector3(Math::rad2deg(rotation_radians.x), Math::rad2deg(rotation_radians.y), Math::rad2deg(rotation_radians.z));
+ Vector3 translation = tform.get_origin();
+ Vector3 scale = tform.basis.get_scale();
+
+ translation_property->update_using_vector(translation);
+ rotation_property->update_using_vector(rotation_degrees);
+ scale_property->update_using_vector(scale);
+ transform_property->update_using_transform(tform);
+
+ update_enabled_checkbox();
+ updating = false;
+}
+
+BoneTransformEditor::BoneTransformEditor(Skeleton3D *p_skeleton) :
+ skeleton(p_skeleton),
+ key_button(nullptr),
+ enabled_checkbox(nullptr),
+ keyable(false),
+ toggle_enabled(false),
+ updating(false) {
+ undo_redo = EditorNode::get_undo_redo();
+}
+
+void BoneTransformEditor::set_target(const String &p_prop) {
+ property = p_prop;
+}
+
+void BoneTransformEditor::set_keyable(const bool p_keyable) {
+ keyable = p_keyable;
+ if (key_button) {
+ key_button->set_visible(p_keyable);
+ }
+}
+
+void BoneTransformEditor::set_toggle_enabled(const bool p_enabled) {
+ toggle_enabled = p_enabled;
+ if (enabled_checkbox) {
+ enabled_checkbox->set_visible(p_enabled);
+ }
+}
+
+void BoneTransformEditor::_key_button_pressed() {
+ if (skeleton == nullptr)
+ return;
+
+ const BoneId bone_id = property.get_slicec('/', 1).to_int();
+ const String name = skeleton->get_bone_name(bone_id);
+
+ if (name.empty())
+ return;
+
+ // Need to normalize the basis before you key it
+ Transform tform = compute_transform_from_vector3s();
+ tform.orthonormalize();
+ AnimationPlayerEditor::singleton->get_track_editor()->insert_transform_key(skeleton, name, tform);
+}
+
+void BoneTransformEditor::_checkbox_toggled(const bool p_toggled) {
+ if (enabled_checkbox) {
+ const String path = "bones/" + property.get_slicec('/', 1) + "/enabled";
+ skeleton->set(path, p_toggled);
+ }
+}
+
void Skeleton3DEditor::_on_click_option(int p_option) {
if (!skeleton) {
return;
@@ -45,12 +321,14 @@ void Skeleton3DEditor::_on_click_option(int p_option) {
switch (p_option) {
case MENU_OPTION_CREATE_PHYSICAL_SKELETON: {
create_physical_skeleton();
- } break;
+ break;
+ }
}
}
void Skeleton3DEditor::create_physical_skeleton() {
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
+ ERR_FAIL_COND(!get_tree());
Node *owner = skeleton == get_tree()->get_edited_scene_root() ? skeleton : skeleton->get_owner();
const int bc = skeleton->get_bone_count();
@@ -63,22 +341,18 @@ void Skeleton3DEditor::create_physical_skeleton() {
bones_infos.resize(bc);
for (int bone_id = 0; bc > bone_id; ++bone_id) {
-
const int parent = skeleton->get_bone_parent(bone_id);
if (parent < 0) {
-
bones_infos.write[bone_id].relative_rest = skeleton->get_bone_rest(bone_id);
} else {
-
const int parent_parent = skeleton->get_bone_parent(parent);
bones_infos.write[bone_id].relative_rest = bones_infos[parent].relative_rest * skeleton->get_bone_rest(bone_id);
/// create physical bone on parent
if (!bones_infos[parent].physical_bone) {
-
bones_infos.write[parent].physical_bone = create_physical_bone(parent, bone_id, bones_infos);
ur->create_action(TTR("Create physical bones"));
@@ -93,7 +367,6 @@ void Skeleton3DEditor::create_physical_skeleton() {
/// Create joint between parent of parent
if (-1 != parent_parent) {
-
bones_infos[parent].physical_bone->set_joint_type(PhysicalBone3D::JOINT_TYPE_PIN);
}
}
@@ -102,7 +375,6 @@ void Skeleton3DEditor::create_physical_skeleton() {
}
PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_child_id, const Vector<BoneInfo> &bones_infos) {
-
const Transform child_rest = skeleton->get_bone_rest(bone_child_id);
const real_t half_height(child_rest.origin.length() * 0.5);
@@ -130,30 +402,163 @@ PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_chi
return physical_bone;
}
-void Skeleton3DEditor::edit(Skeleton3D *p_node) {
+Variant Skeleton3DEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
+ TreeItem *selected = joint_tree->get_selected();
+
+ if (!selected)
+ return Variant();
+
+ Ref<Texture> icon = selected->get_icon(0);
- skeleton = p_node;
+ VBoxContainer *vb = memnew(VBoxContainer);
+ HBoxContainer *hb = memnew(HBoxContainer);
+ TextureRect *tf = memnew(TextureRect);
+ tf->set_texture(icon);
+ tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
+ hb->add_child(tf);
+ Label *label = memnew(Label(selected->get_text(0)));
+ hb->add_child(label);
+ vb->add_child(hb);
+ hb->set_modulate(Color(1, 1, 1, 1));
+
+ set_drag_preview(vb);
+ Dictionary drag_data;
+ drag_data["type"] = "nodes";
+ drag_data["node"] = selected;
+
+ return drag_data;
}
-void Skeleton3DEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE) {
- get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed));
+bool Skeleton3DEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
+ TreeItem *target = joint_tree->get_item_at_position(p_point);
+ if (!target)
+ return false;
+
+ const String path = target->get_metadata(0);
+ if (!path.begins_with("bones/"))
+ return false;
+
+ TreeItem *selected = Object::cast_to<TreeItem>(Dictionary(p_data)["node"]);
+ if (target == selected)
+ return false;
+
+ const String path2 = target->get_metadata(0);
+ if (!path2.begins_with("bones/"))
+ return false;
+
+ return true;
+}
+
+void Skeleton3DEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
+ if (!can_drop_data_fw(p_point, p_data, p_from))
+ return;
+
+ TreeItem *target = joint_tree->get_item_at_position(p_point);
+ TreeItem *selected = Object::cast_to<TreeItem>(Dictionary(p_data)["node"]);
+
+ const BoneId target_boneidx = String(target->get_metadata(0)).get_slicec('/', 1).to_int();
+ const BoneId selected_boneidx = String(selected->get_metadata(0)).get_slicec('/', 1).to_int();
+
+ move_skeleton_bone(skeleton->get_path(), selected_boneidx, target_boneidx);
+}
+
+void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_selected_boneidx, int32_t p_target_boneidx) {
+ Node *node = get_node_or_null(p_skeleton_path);
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
+ ERR_FAIL_NULL(skeleton);
+ UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
+ ur->create_action(TTR("Set Bone Parentage"));
+ // If the target is a child of ourselves, we move only *us* and not our children
+ if (skeleton->is_bone_parent_of(p_target_boneidx, p_selected_boneidx)) {
+ const BoneId parent_idx = skeleton->get_bone_parent(p_selected_boneidx);
+ const int bone_count = skeleton->get_bone_count();
+ for (BoneId i = 0; i < bone_count; ++i) {
+ if (skeleton->get_bone_parent(i) == p_selected_boneidx) {
+ ur->add_undo_method(skeleton, "set_bone_parent", i, skeleton->get_bone_parent(i));
+ ur->add_do_method(skeleton, "set_bone_parent", i, parent_idx);
+ skeleton->set_bone_parent(i, parent_idx);
+ }
+ }
}
+ ur->add_undo_method(skeleton, "set_bone_parent", p_selected_boneidx, skeleton->get_bone_parent(p_selected_boneidx));
+ ur->add_do_method(skeleton, "set_bone_parent", p_selected_boneidx, p_target_boneidx);
+ skeleton->set_bone_parent(p_selected_boneidx, p_target_boneidx);
+
+ update_joint_tree();
+ ur->commit_action();
}
-void Skeleton3DEditor::_node_removed(Node *p_node) {
+void Skeleton3DEditor::_joint_tree_selection_changed() {
+ TreeItem *selected = joint_tree->get_selected();
+ const String path = selected->get_metadata(0);
- if (p_node == skeleton) {
- skeleton = nullptr;
- options->hide();
+ if (path.begins_with("bones/")) {
+ const int b_idx = path.get_slicec('/', 1).to_int();
+ const String bone_path = "bones/" + itos(b_idx) + "/";
+
+ pose_editor->set_target(bone_path + "pose");
+ rest_editor->set_target(bone_path + "rest");
+ custom_pose_editor->set_target(bone_path + "custom_pose");
+
+ pose_editor->set_visible(true);
+ rest_editor->set_visible(true);
+ custom_pose_editor->set_visible(true);
}
}
-void Skeleton3DEditor::_bind_methods() {
+void Skeleton3DEditor::_joint_tree_rmb_select(const Vector2 &p_pos) {
+}
+
+void Skeleton3DEditor::_update_properties() {
+ if (rest_editor)
+ rest_editor->_update_properties();
+ if (pose_editor)
+ pose_editor->_update_properties();
+ if (custom_pose_editor)
+ custom_pose_editor->_update_custom_pose_properties();
}
-Skeleton3DEditor::Skeleton3DEditor() {
- skeleton = nullptr;
+void Skeleton3DEditor::update_joint_tree() {
+ joint_tree->clear();
+
+ if (skeleton == nullptr)
+ return;
+
+ TreeItem *root = joint_tree->create_item();
+
+ Map<int, TreeItem *> items;
+
+ items.insert(-1, root);
+
+ const Vector<int> &joint_porder = skeleton->get_bone_process_orders();
+ Ref<Texture> bone_icon = get_theme_icon("BoneAttachment3D", "EditorIcons");
+
+ for (int i = 0; i < joint_porder.size(); ++i) {
+ const int b_idx = joint_porder[i];
+
+ const int p_idx = skeleton->get_bone_parent(b_idx);
+ TreeItem *p_item = items.find(p_idx)->get();
+
+ TreeItem *joint_item = joint_tree->create_item(p_item);
+ items.insert(b_idx, joint_item);
+
+ joint_item->set_text(0, skeleton->get_bone_name(b_idx));
+ joint_item->set_icon(0, bone_icon);
+ joint_item->set_selectable(0, true);
+ joint_item->set_metadata(0, "bones/" + itos(b_idx));
+ }
+}
+
+void Skeleton3DEditor::update_editors() {
+}
+
+void Skeleton3DEditor::create_editors() {
+ set_h_size_flags(SIZE_EXPAND_FILL);
+ add_theme_constant_override("separation", 0);
+
+ set_focus_mode(FOCUS_ALL);
+
+ // Create Top Menu Bar
options = memnew(MenuButton);
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
@@ -163,33 +568,119 @@ Skeleton3DEditor::Skeleton3DEditor() {
options->get_popup()->add_item(TTR("Create physical skeleton"), MENU_OPTION_CREATE_PHYSICAL_SKELETON);
options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton3DEditor::_on_click_option));
- options->hide();
+
+ const Color section_color = get_theme_color("prop_subsection", "Editor");
+
+ EditorInspectorSection *bones_section = memnew(EditorInspectorSection);
+ bones_section->setup("bones", "Bones", skeleton, section_color, true);
+ add_child(bones_section);
+ bones_section->unfold();
+
+ ScrollContainer *s_con = memnew(ScrollContainer);
+ s_con->set_h_size_flags(SIZE_EXPAND_FILL);
+ s_con->set_custom_minimum_size(Size2(1, 350) * EDSCALE);
+ bones_section->get_vbox()->add_child(s_con);
+
+ joint_tree = memnew(Tree);
+ joint_tree->set_columns(1);
+ joint_tree->set_focus_mode(Control::FocusMode::FOCUS_NONE);
+ joint_tree->set_select_mode(Tree::SELECT_SINGLE);
+ joint_tree->set_hide_root(true);
+ joint_tree->set_v_size_flags(SIZE_EXPAND_FILL);
+ joint_tree->set_h_size_flags(SIZE_EXPAND_FILL);
+ joint_tree->set_allow_rmb_select(true);
+ joint_tree->set_drag_forwarding(this);
+ s_con->add_child(joint_tree);
+
+ pose_editor = memnew(BoneTransformEditor(skeleton));
+ pose_editor->set_label(TTR("Bone Pose"));
+ pose_editor->set_keyable(AnimationPlayerEditor::singleton->get_track_editor()->has_keying());
+ pose_editor->set_toggle_enabled(true);
+ pose_editor->set_visible(false);
+ add_child(pose_editor);
+
+ rest_editor = memnew(BoneTransformEditor(skeleton));
+ rest_editor->set_label(TTR("Bone Rest"));
+ rest_editor->set_visible(false);
+ add_child(rest_editor);
+
+ custom_pose_editor = memnew(BoneTransformEditor(skeleton));
+ custom_pose_editor->set_label(TTR("Bone Custom Pose"));
+ custom_pose_editor->set_visible(false);
+ add_child(custom_pose_editor);
}
-Skeleton3DEditor::~Skeleton3DEditor() {}
+void Skeleton3DEditor::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ create_editors();
+ update_joint_tree();
+ update_editors();
+
+ get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Vector<Variant>(), Object::CONNECT_ONESHOT);
+ joint_tree->connect("item_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_selection_changed));
+ joint_tree->connect("item_rmb_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_rmb_select));
+#ifdef TOOLS_ENABLED
+ skeleton->connect("pose_updated", callable_mp(this, &Skeleton3DEditor::_update_properties));
+#endif // TOOLS_ENABLED
+
+ break;
+ }
+ }
+}
-void Skeleton3DEditorPlugin::edit(Object *p_object) {
- skeleton_editor->edit(Object::cast_to<Skeleton3D>(p_object));
+void Skeleton3DEditor::_node_removed(Node *p_node) {
+ if (skeleton && p_node == skeleton) {
+ skeleton = nullptr;
+ options->hide();
+ }
+
+ _update_properties();
}
-bool Skeleton3DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_class("Skeleton3D");
+void Skeleton3DEditor::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_node_removed"), &Skeleton3DEditor::_node_removed);
+ ClassDB::bind_method(D_METHOD("_joint_tree_selection_changed"), &Skeleton3DEditor::_joint_tree_selection_changed);
+ ClassDB::bind_method(D_METHOD("_joint_tree_rmb_select"), &Skeleton3DEditor::_joint_tree_rmb_select);
+ ClassDB::bind_method(D_METHOD("_update_properties"), &Skeleton3DEditor::_update_properties);
+ ClassDB::bind_method(D_METHOD("_on_click_option"), &Skeleton3DEditor::_on_click_option);
+
+ ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &Skeleton3DEditor::get_drag_data_fw);
+ ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &Skeleton3DEditor::can_drop_data_fw);
+ ClassDB::bind_method(D_METHOD("drop_data_fw"), &Skeleton3DEditor::drop_data_fw);
+ ClassDB::bind_method(D_METHOD("move_skeleton_bone"), &Skeleton3DEditor::move_skeleton_bone);
}
-void Skeleton3DEditorPlugin::make_visible(bool p_visible) {
- if (p_visible) {
- skeleton_editor->options->show();
- } else {
+Skeleton3DEditor::Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, EditorNode *p_editor, Skeleton3D *p_skeleton) :
+ editor(p_editor),
+ editor_plugin(e_plugin),
+ skeleton(p_skeleton) {
+}
- skeleton_editor->options->hide();
- skeleton_editor->edit(nullptr);
+Skeleton3DEditor::~Skeleton3DEditor() {
+ if (options) {
+ Node3DEditor::get_singleton()->remove_control_from_menu_panel(options);
}
}
+bool EditorInspectorPluginSkeleton::can_handle(Object *p_object) {
+ return Object::cast_to<Skeleton3D>(p_object) != nullptr;
+}
+
+void EditorInspectorPluginSkeleton::parse_begin(Object *p_object) {
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_object);
+ ERR_FAIL_COND(!skeleton);
+
+ Skeleton3DEditor *skel_editor = memnew(Skeleton3DEditor(this, editor, skeleton));
+ add_custom_control(skel_editor);
+}
+
Skeleton3DEditorPlugin::Skeleton3DEditorPlugin(EditorNode *p_node) {
editor = p_node;
- skeleton_editor = memnew(Skeleton3DEditor);
- editor->get_viewport()->add_child(skeleton_editor);
-}
-Skeleton3DEditorPlugin::~Skeleton3DEditorPlugin() {}
+ Ref<EditorInspectorPluginSkeleton> skeleton_plugin;
+ skeleton_plugin.instance();
+ skeleton_plugin->editor = editor;
+
+ EditorInspector::add_inspector_plugin(skeleton_plugin);
+}
diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h
index 2ba5a817bc..a5b8ce80a9 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.h
+++ b/editor/plugins/skeleton_3d_editor_plugin.h
@@ -35,62 +35,174 @@
#include "editor/editor_plugin.h"
#include "scene/3d/skeleton_3d.h"
+class EditorInspectorPluginSkeleton;
+class Joint;
class PhysicalBone3D;
-class Joint3D;
+class Skeleton3DEditorPlugin;
+class Button;
+class CheckBox;
+class EditorPropertyTransform;
+class EditorPropertyVector3;
-class Skeleton3DEditor : public Node {
- GDCLASS(Skeleton3DEditor, Node);
+class BoneTransformEditor : public VBoxContainer {
+ GDCLASS(BoneTransformEditor, VBoxContainer);
+
+ EditorInspectorSection *section;
+
+ EditorPropertyVector3 *translation_property;
+ EditorPropertyVector3 *rotation_property;
+ EditorPropertyVector3 *scale_property;
+ EditorInspectorSection *transform_section;
+ EditorPropertyTransform *transform_property;
+
+ Rect2 background_rects[5];
+
+ Skeleton3D *skeleton;
+ String property;
+
+ UndoRedo *undo_redo;
+
+ Button *key_button;
+ CheckBox *enabled_checkbox;
+
+ bool keyable;
+ bool toggle_enabled;
+ bool updating;
+
+ String label;
+
+ void create_editors();
+
+ // Called when one of the EditorSpinSliders are changed.
+ void _value_changed(const double p_value);
+ // Called when the one of the EditorPropertyVector3 are updated.
+ void _value_changed_vector3(const String p_property_name, const Vector3 p_vector, const StringName p_edited_property_name, const bool p_boolean);
+ // Called when the transform_property is updated.
+ void _value_changed_transform(const String p_property_name, const Transform p_transform, const StringName p_edited_property_name, const bool p_boolean);
+ // Changes the transform to the given transform and updates the UI accordingly.
+ void _change_transform(Transform p_new_transform);
+ // Creates a Transform using the EditorPropertyVector3 properties.
+ Transform compute_transform_from_vector3s() const;
+
+ void update_enabled_checkbox();
+
+protected:
+ void _notification(int p_what);
+
+public:
+ BoneTransformEditor(Skeleton3D *p_skeleton);
+
+ // Which transform target to modify
+ void set_target(const String &p_prop);
+ void set_label(const String &p_label) { label = p_label; }
+
+ void _update_properties();
+ void _update_custom_pose_properties();
+ void _update_transform_properties(Transform p_transform);
+
+ // Can/cannot modify the spinner values for the Transform
+ void set_read_only(const bool p_read_only);
+
+ // Transform can be keyed, whether or not to show the button
+ void set_keyable(const bool p_keyable);
+
+ // Bone can be toggled enabled or disabled, whether or not to show the checkbox
+ void set_toggle_enabled(const bool p_enabled);
+
+ // Key Transform Button pressed
+ void _key_button_pressed();
+
+ // Bone Enabled Checkbox toggled
+ void _checkbox_toggled(const bool p_toggled);
+};
+
+class Skeleton3DEditor : public VBoxContainer {
+ GDCLASS(Skeleton3DEditor, VBoxContainer);
+
+ friend class Skeleton3DEditorPlugin;
enum Menu {
MENU_OPTION_CREATE_PHYSICAL_SKELETON
};
struct BoneInfo {
- PhysicalBone3D *physical_bone;
+ PhysicalBone3D *physical_bone = nullptr;
Transform relative_rest; // Relative to skeleton node
- BoneInfo() :
- physical_bone(nullptr) {}
+ BoneInfo() {}
};
+ EditorNode *editor;
+ EditorInspectorPluginSkeleton *editor_plugin;
+
Skeleton3D *skeleton;
+ Tree *joint_tree;
+ BoneTransformEditor *rest_editor;
+ BoneTransformEditor *pose_editor;
+ BoneTransformEditor *custom_pose_editor;
+
MenuButton *options;
+ EditorFileDialog *file_dialog;
+
+ UndoRedo *undo_redo;
void _on_click_option(int p_option);
+ void _file_selected(const String &p_file);
- friend class Skeleton3DEditorPlugin;
+ EditorFileDialog *file_export_lib;
+
+ void update_joint_tree();
+ void update_editors();
+
+ void create_editors();
+
+ void create_physical_skeleton();
+ PhysicalBone3D *create_physical_bone(int bone_id, int bone_child_id, const Vector<BoneInfo> &bones_infos);
+
+ Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
+ bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
+ void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
protected:
void _notification(int p_what);
void _node_removed(Node *p_node);
static void _bind_methods();
- void create_physical_skeleton();
- PhysicalBone3D *create_physical_bone(int bone_id, int bone_child_id, const Vector<BoneInfo> &bones_infos);
-
public:
- void edit(Skeleton3D *p_node);
+ void move_skeleton_bone(NodePath p_skeleton_path, int32_t p_selected_boneidx, int32_t p_target_boneidx);
+
+ Skeleton3D *get_skeleton() const { return skeleton; };
+
+ void _joint_tree_selection_changed();
+ void _joint_tree_rmb_select(const Vector2 &p_pos);
- Skeleton3DEditor();
+ void _update_properties();
+
+ Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, EditorNode *p_editor, Skeleton3D *skeleton);
~Skeleton3DEditor();
};
-class Skeleton3DEditorPlugin : public EditorPlugin {
+class EditorInspectorPluginSkeleton : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginSkeleton, EditorInspectorPlugin);
- GDCLASS(Skeleton3DEditorPlugin, EditorPlugin);
+ friend class Skeleton3DEditorPlugin;
EditorNode *editor;
- Skeleton3DEditor *skeleton_editor;
public:
- virtual String get_name() const { return "Skeleton3D"; }
- virtual bool has_main_screen() const { return false; }
- virtual void edit(Object *p_object);
- virtual bool handles(Object *p_object) const;
- virtual void make_visible(bool p_visible);
+ virtual bool can_handle(Object *p_object);
+ virtual void parse_begin(Object *p_object);
+};
+
+class Skeleton3DEditorPlugin : public EditorPlugin {
+ GDCLASS(Skeleton3DEditorPlugin, EditorPlugin);
+
+ EditorNode *editor;
+public:
Skeleton3DEditorPlugin(EditorNode *p_node);
- ~Skeleton3DEditorPlugin();
+
+ virtual String get_name() const { return "Skeleton3D"; }
};
#endif // SKELETON_3D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
index a22534eac0..8fc789b94a 100644
--- a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
@@ -33,12 +33,13 @@
#include "scene/3d/skeleton_ik_3d.h"
void SkeletonIK3DEditorPlugin::_play() {
-
- if (!skeleton_ik)
+ if (!skeleton_ik) {
return;
+ }
- if (!skeleton_ik->get_parent_skeleton())
+ if (!skeleton_ik->get_parent_skeleton()) {
return;
+ }
if (play_btn->is_pressed()) {
skeleton_ik->start();
@@ -49,7 +50,6 @@ void SkeletonIK3DEditorPlugin::_play() {
}
void SkeletonIK3DEditorPlugin::edit(Object *p_object) {
-
if (p_object != skeleton_ik) {
if (skeleton_ik) {
play_btn->set_pressed(false);
@@ -58,30 +58,29 @@ void SkeletonIK3DEditorPlugin::edit(Object *p_object) {
}
SkeletonIK3D *s = Object::cast_to<SkeletonIK3D>(p_object);
- if (!s)
+ if (!s) {
return;
+ }
skeleton_ik = s;
}
bool SkeletonIK3DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("SkeletonIK3D");
}
void SkeletonIK3DEditorPlugin::make_visible(bool p_visible) {
-
- if (p_visible)
+ if (p_visible) {
play_btn->show();
- else
+ } else {
play_btn->hide();
+ }
}
void SkeletonIK3DEditorPlugin::_bind_methods() {
}
SkeletonIK3DEditorPlugin::SkeletonIK3DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
play_btn = memnew(Button);
play_btn->set_icon(editor->get_gui_base()->get_theme_icon("Play", "EditorIcons"));
diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.h b/editor/plugins/skeleton_ik_3d_editor_plugin.h
index 88472a2963..bd4c5ba93e 100644
--- a/editor/plugins/skeleton_ik_3d_editor_plugin.h
+++ b/editor/plugins/skeleton_ik_3d_editor_plugin.h
@@ -37,7 +37,6 @@
class SkeletonIK3D;
class SkeletonIK3DEditorPlugin : public EditorPlugin {
-
GDCLASS(SkeletonIK3DEditorPlugin, EditorPlugin);
SkeletonIK3D *skeleton_ik;
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index ab0f15d3d0..f5fafb68a5 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -31,6 +31,7 @@
#include "sprite_2d_editor_plugin.h"
#include "canvas_item_editor_plugin.h"
+#include "core/math/geometry_2d.h"
#include "editor/editor_scale.h"
#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/light_occluder_2d.h"
@@ -40,7 +41,6 @@
#include "thirdparty/misc/clipper.hpp"
void Sprite2DEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
options->hide();
@@ -48,7 +48,6 @@ void Sprite2DEditor::_node_removed(Node *p_node) {
}
void Sprite2DEditor::edit(Sprite2D *p_sprite) {
-
node = p_sprite;
}
@@ -63,7 +62,6 @@ Vector<Vector2> expand(const Vector<Vector2> &points, const Rect2i &rect, float
ClipperLib::PolyTree out;
for (int i = 0; i < points.size(); i++) {
-
subj << ClipperLib::IntPoint(points[i].x * PRECISION, points[i].y * PRECISION);
}
ClipperLib::ClipperOffset co;
@@ -104,7 +102,6 @@ Vector<Vector2> expand(const Vector<Vector2> &points, const Rect2i &rect, float
int lasti = p2->Contour.size() - 1;
Vector2 prev = Vector2(p2->Contour[lasti].X / PRECISION, p2->Contour[lasti].Y / PRECISION);
for (uint64_t i = 0; i < p2->Contour.size(); i++) {
-
Vector2 cur = Vector2(p2->Contour[i].X / PRECISION, p2->Contour[i].Y / PRECISION);
if (cur.distance_to(prev) > 0.5) {
outPoints.push_back(cur);
@@ -115,7 +112,6 @@ Vector<Vector2> expand(const Vector<Vector2> &points, const Rect2i &rect, float
}
void Sprite2DEditor::_menu_option(int p_option) {
-
if (!node) {
return;
}
@@ -124,7 +120,6 @@ void Sprite2DEditor::_menu_option(int p_option) {
switch (p_option) {
case MENU_OPTION_CONVERT_TO_MESH_2D: {
-
debug_uv_dialog->get_ok()->set_text(TTR("Create Mesh2D"));
debug_uv_dialog->set_title(TTR("Mesh2D Preview"));
@@ -134,7 +129,6 @@ void Sprite2DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CONVERT_TO_POLYGON_2D: {
-
debug_uv_dialog->get_ok()->set_text(TTR("Create Polygon2D"));
debug_uv_dialog->set_title(TTR("Polygon2D Preview"));
@@ -143,7 +137,6 @@ void Sprite2DEditor::_menu_option(int p_option) {
debug_uv->update();
} break;
case MENU_OPTION_CREATE_COLLISION_POLY_2D: {
-
debug_uv_dialog->get_ok()->set_text(TTR("Create CollisionPolygon2D"));
debug_uv_dialog->set_title(TTR("CollisionPolygon2D Preview"));
@@ -153,7 +146,6 @@ void Sprite2DEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D: {
-
debug_uv_dialog->get_ok()->set_text(TTR("Create LightOccluder2D"));
debug_uv_dialog->set_title(TTR("LightOccluder2D Preview"));
@@ -166,7 +158,6 @@ void Sprite2DEditor::_menu_option(int p_option) {
}
void Sprite2DEditor::_update_mesh_data() {
-
Ref<Texture2D> texture = node->get_texture();
if (texture.is_null()) {
err_dialog->set_text(TTR("Sprite2D is empty!"));
@@ -183,10 +174,11 @@ void Sprite2DEditor::_update_mesh_data() {
Ref<Image> image = texture->get_data();
ERR_FAIL_COND(image.is_null());
Rect2 rect;
- if (node->is_region())
+ if (node->is_region()) {
rect = node->get_region_rect();
- else
+ } else {
rect.size = Size2(image->get_width(), image->get_height());
+ }
Ref<BitMap> bm;
bm.instance();
@@ -218,7 +210,6 @@ void Sprite2DEditor::_update_mesh_data() {
}
if (selected_menu_item == MENU_OPTION_CONVERT_TO_MESH_2D) {
-
for (int j = 0; j < lines.size(); j++) {
int index_ofs = computed_vertices.size();
@@ -229,18 +220,21 @@ void Sprite2DEditor::_update_mesh_data() {
vtx -= rect.position; //offset by rect position
//flip if flipped
- if (node->is_flipped_h())
+ if (node->is_flipped_h()) {
vtx.x = rect.size.x - vtx.x - 1.0;
- if (node->is_flipped_v())
+ }
+ if (node->is_flipped_v()) {
vtx.y = rect.size.y - vtx.y - 1.0;
+ }
- if (node->is_centered())
+ if (node->is_centered()) {
vtx -= rect.size / 2.0;
+ }
computed_vertices.push_back(vtx);
}
- Vector<int> poly = Geometry::triangulate_polygon(lines[j]);
+ Vector<int> poly = Geometry2D::triangulate_polygon(lines[j]);
for (int i = 0; i < poly.size(); i += 3) {
for (int k = 0; k < 3; k++) {
@@ -262,7 +256,6 @@ void Sprite2DEditor::_update_mesh_data() {
outline_lines.resize(lines.size());
computed_outline_lines.resize(lines.size());
for (int pi = 0; pi < lines.size(); pi++) {
-
Vector<Vector2> ol;
Vector<Vector2> col;
@@ -277,13 +270,16 @@ void Sprite2DEditor::_update_mesh_data() {
vtx -= rect.position; //offset by rect position
//flip if flipped
- if (node->is_flipped_h())
+ if (node->is_flipped_h()) {
vtx.x = rect.size.x - vtx.x - 1.0;
- if (node->is_flipped_v())
+ }
+ if (node->is_flipped_v()) {
vtx.y = rect.size.y - vtx.y - 1.0;
+ }
- if (node->is_centered())
+ if (node->is_centered()) {
vtx -= rect.size / 2.0;
+ }
col.write[i] = vtx;
}
@@ -314,7 +310,6 @@ void Sprite2DEditor::_create_node() {
}
void Sprite2DEditor::_convert_to_mesh_2d_node() {
-
if (computed_vertices.size() < 3) {
err_dialog->set_text(TTR("Invalid geometry, can't replace by mesh."));
err_dialog->popup_centered();
@@ -345,7 +340,6 @@ void Sprite2DEditor::_convert_to_mesh_2d_node() {
}
void Sprite2DEditor::_convert_to_polygon_2d_node() {
-
if (computed_outline_lines.empty()) {
err_dialog->set_text(TTR("Invalid geometry, can't create polygon."));
err_dialog->popup_centered();
@@ -355,8 +349,9 @@ void Sprite2DEditor::_convert_to_polygon_2d_node() {
Polygon2D *polygon_2d_instance = memnew(Polygon2D);
int total_point_count = 0;
- for (int i = 0; i < computed_outline_lines.size(); i++)
+ for (int i = 0; i < computed_outline_lines.size(); i++) {
total_point_count += computed_outline_lines[i].size();
+ }
PackedVector2Array polygon;
polygon.resize(total_point_count);
@@ -372,7 +367,6 @@ void Sprite2DEditor::_convert_to_polygon_2d_node() {
polys.resize(computed_outline_lines.size());
for (int i = 0; i < computed_outline_lines.size(); i++) {
-
Vector<Vector2> outline = computed_outline_lines[i];
Vector<Vector2> uv_outline = outline_lines[i];
@@ -404,7 +398,6 @@ void Sprite2DEditor::_convert_to_polygon_2d_node() {
}
void Sprite2DEditor::_create_collision_polygon_2d_node() {
-
if (computed_outline_lines.empty()) {
err_dialog->set_text(TTR("Invalid geometry, can't create collision polygon."));
err_dialog->popup_centered();
@@ -412,7 +405,6 @@ void Sprite2DEditor::_create_collision_polygon_2d_node() {
}
for (int i = 0; i < computed_outline_lines.size(); i++) {
-
Vector<Vector2> outline = computed_outline_lines[i];
CollisionPolygon2D *collision_polygon_2d_instance = memnew(CollisionPolygon2D);
@@ -428,7 +420,6 @@ void Sprite2DEditor::_create_collision_polygon_2d_node() {
}
void Sprite2DEditor::_create_light_occluder_2d_node() {
-
if (computed_outline_lines.empty()) {
err_dialog->set_text(TTR("Invalid geometry, can't create light occluder."));
err_dialog->popup_centered();
@@ -436,7 +427,6 @@ void Sprite2DEditor::_create_light_occluder_2d_node() {
}
for (int i = 0; i < computed_outline_lines.size(); i++) {
-
Vector<Vector2> outline = computed_outline_lines[i];
Ref<OccluderPolygon2D> polygon;
@@ -475,7 +465,6 @@ void Sprite2DEditor::_add_as_sibling_or_child(Node *p_own_node, Node *p_new_node
}
void Sprite2DEditor::_debug_uv_draw() {
-
Ref<Texture2D> tex = node->get_texture();
ERR_FAIL_COND(!tex.is_valid());
@@ -503,12 +492,10 @@ void Sprite2DEditor::_debug_uv_draw() {
}
void Sprite2DEditor::_bind_methods() {
-
ClassDB::bind_method("_add_as_sibling_or_child", &Sprite2DEditor::_add_as_sibling_or_child);
}
Sprite2DEditor::Sprite2DEditor() {
-
options = memnew(MenuButton);
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
@@ -577,28 +564,23 @@ Sprite2DEditor::Sprite2DEditor() {
}
void Sprite2DEditorPlugin::edit(Object *p_object) {
-
sprite_editor->edit(Object::cast_to<Sprite2D>(p_object));
}
bool Sprite2DEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("Sprite2D");
}
void Sprite2DEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
sprite_editor->options->show();
} else {
-
sprite_editor->options->hide();
sprite_editor->edit(nullptr);
}
}
Sprite2DEditorPlugin::Sprite2DEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
sprite_editor = memnew(Sprite2DEditor);
editor->get_viewport()->add_child(sprite_editor);
diff --git a/editor/plugins/sprite_2d_editor_plugin.h b/editor/plugins/sprite_2d_editor_plugin.h
index 0add77843b..c2b942fd82 100644
--- a/editor/plugins/sprite_2d_editor_plugin.h
+++ b/editor/plugins/sprite_2d_editor_plugin.h
@@ -37,7 +37,6 @@
#include "scene/gui/spin_box.h"
class Sprite2DEditor : public Control {
-
GDCLASS(Sprite2DEditor, Control);
enum Menu {
@@ -97,7 +96,6 @@ public:
};
class Sprite2DEditorPlugin : public EditorPlugin {
-
GDCLASS(Sprite2DEditorPlugin, EditorPlugin);
Sprite2DEditor *sprite_editor;
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 34ff34d45b..859fec1628 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -41,7 +41,6 @@ void SpriteFramesEditor::_gui_input(Ref<InputEvent> p_event) {
}
void SpriteFramesEditor::_open_sprite_sheet() {
-
file_split_sheet->clear_filters();
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("Texture2D", &extensions);
@@ -53,7 +52,6 @@ void SpriteFramesEditor::_open_sprite_sheet() {
}
void SpriteFramesEditor::_sheet_preview_draw() {
-
Size2i size = split_sheet_preview->get_size();
int h = split_sheet_h->get_value();
int v = split_sheet_v->get_value();
@@ -61,13 +59,11 @@ void SpriteFramesEditor::_sheet_preview_draw() {
int height = size.height / v;
const float a = 0.3;
for (int i = 1; i < h; i++) {
-
int x = i * width;
split_sheet_preview->draw_line(Point2(x, 0), Point2(x, size.height), Color(1, 1, 1, a));
split_sheet_preview->draw_line(Point2(x + 1, 0), Point2(x + 1, size.height), Color(0, 0, 0, a));
for (int j = 1; j < v; j++) {
-
int y = j * height;
split_sheet_preview->draw_line(Point2(0, y), Point2(size.width, y), Color(1, 1, 1, a));
@@ -102,8 +98,8 @@ void SpriteFramesEditor::_sheet_preview_draw() {
split_sheet_dialog->get_ok()->set_disabled(false);
split_sheet_dialog->get_ok()->set_text(vformat(TTR("Add %d Frame(s)"), frames_selected.size()));
}
-void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
+void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
@@ -145,7 +141,6 @@ void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
}
void SpriteFramesEditor::_sheet_add_frames() {
-
Size2i size = split_sheet_preview->get_size();
int h = split_sheet_h->get_value();
int v = split_sheet_v->get_value();
@@ -158,8 +153,9 @@ void SpriteFramesEditor::_sheet_add_frames() {
Rect2 region_rect = Rect2();
- if (atlas_source && atlas_source->get_atlas().is_valid())
+ if (atlas_source && atlas_source->get_atlas().is_valid()) {
region_rect = atlas_source->get_region();
+ }
for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) {
int idx = E->get();
@@ -185,7 +181,6 @@ void SpriteFramesEditor::_sheet_add_frames() {
}
void SpriteFramesEditor::_sheet_select_clear_all_frames() {
-
bool should_clear = true;
for (int i = 0; i < split_sheet_h->get_value() * split_sheet_v->get_value(); i++) {
if (!frames_selected.has(i)) {
@@ -201,14 +196,12 @@ void SpriteFramesEditor::_sheet_select_clear_all_frames() {
}
void SpriteFramesEditor::_sheet_spin_changed(double) {
-
frames_selected.clear();
last_frame_selected = -1;
split_sheet_preview->update();
}
void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) {
-
Ref<Resource> texture = ResourceLoader::load(p_file);
if (!texture.is_valid()) {
EditorNode::get_singleton()->show_warning(TTR("Unable to load images"));
@@ -227,7 +220,6 @@ void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) {
}
void SpriteFramesEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
load->set_icon(get_theme_icon("Load", "EditorIcons"));
@@ -253,13 +245,11 @@ void SpriteFramesEditor::_notification(int p_what) {
}
void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_at_pos) {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
List<Ref<Texture2D>> resources;
for (int i = 0; i < p_path.size(); i++) {
-
Ref<Texture2D> resource;
resource = ResourceLoader::load(p_path[i]);
@@ -286,7 +276,6 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_
int count = 0;
for (List<Ref<Texture2D>>::Element *E = resources.front(); E; E = E->next()) {
-
undo_redo->add_do_method(frames, "add_frame", edited_anim, E->get(), p_at_pos == -1 ? -1 : p_at_pos + count);
undo_redo->add_undo_method(frames, "remove_frame", edited_anim, p_at_pos == -1 ? fc : p_at_pos);
count++;
@@ -298,15 +287,15 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_
}
void SpriteFramesEditor::_load_pressed() {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
loading_scene = false;
file->clear_filters();
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("Texture2D", &extensions);
- for (int i = 0; i < extensions.size(); i++)
+ for (int i = 0; i < extensions.size(); i++) {
file->add_filter("*." + extensions[i]);
+ }
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
@@ -314,7 +303,6 @@ void SpriteFramesEditor::_load_pressed() {
}
void SpriteFramesEditor::_paste_pressed() {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
Ref<Texture2D> r = EditorSettings::get_singleton()->get_resource_clipboard();
@@ -338,8 +326,9 @@ void SpriteFramesEditor::_paste_pressed() {
void SpriteFramesEditor::_copy_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0)
+ if (tree->get_current() < 0) {
return;
+ }
Ref<Texture2D> r = frames->get_frame(edited_anim, tree->get_current());
if (!r.is_valid()) {
return;
@@ -349,13 +338,11 @@ void SpriteFramesEditor::_copy_pressed() {
}
void SpriteFramesEditor::_empty_pressed() {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
int from = -1;
if (tree->get_current() >= 0) {
-
from = tree->get_current();
sel = from;
@@ -374,13 +361,11 @@ void SpriteFramesEditor::_empty_pressed() {
}
void SpriteFramesEditor::_empty2_pressed() {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
int from = -1;
if (tree->get_current() >= 0) {
-
from = tree->get_current();
sel = from;
@@ -399,15 +384,16 @@ void SpriteFramesEditor::_empty2_pressed() {
}
void SpriteFramesEditor::_up_pressed() {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0)
+ if (tree->get_current() < 0) {
return;
+ }
int to_move = tree->get_current();
- if (to_move < 1)
+ if (to_move < 1) {
return;
+ }
sel = to_move;
sel -= 1;
@@ -423,15 +409,16 @@ void SpriteFramesEditor::_up_pressed() {
}
void SpriteFramesEditor::_down_pressed() {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0)
+ if (tree->get_current() < 0) {
return;
+ }
int to_move = tree->get_current();
- if (to_move < 0 || to_move >= frames->get_frame_count(edited_anim) - 1)
+ if (to_move < 0 || to_move >= frames->get_frame_count(edited_anim) - 1) {
return;
+ }
sel = to_move;
sel += 1;
@@ -447,11 +434,11 @@ void SpriteFramesEditor::_down_pressed() {
}
void SpriteFramesEditor::_delete_pressed() {
-
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0)
+ if (tree->get_current() < 0) {
return;
+ }
int to_delete = tree->get_current();
if (to_delete < 0 || to_delete >= frames->get_frame_count(edited_anim)) {
@@ -467,14 +454,15 @@ void SpriteFramesEditor::_delete_pressed() {
}
void SpriteFramesEditor::_animation_select() {
-
- if (updating)
+ if (updating) {
return;
+ }
if (frames->has_animation(edited_anim)) {
double value = anim_speed->get_line_edit()->get_text().to_double();
- if (!Math::is_equal_approx(value, frames->get_animation_speed(edited_anim)))
+ if (!Math::is_equal_approx(value, frames->get_animation_speed(edited_anim))) {
_animation_fps_changed(value);
+ }
}
TreeItem *selected = animations->get_selected();
@@ -484,12 +472,13 @@ void SpriteFramesEditor::_animation_select() {
}
static void _find_anim_sprites(Node *p_node, List<Node *> *r_nodes, Ref<SpriteFrames> p_sfames) {
-
Node *edited = EditorNode::get_singleton()->get_edited_scene();
- if (!edited)
+ if (!edited) {
return;
- if (p_node != edited && p_node->get_owner() != edited)
+ }
+ if (p_node != edited && p_node->get_owner() != edited) {
return;
+ }
{
AnimatedSprite2D *as = Object::cast_to<AnimatedSprite2D>(p_node);
@@ -511,21 +500,24 @@ static void _find_anim_sprites(Node *p_node, List<Node *> *r_nodes, Ref<SpriteFr
}
void SpriteFramesEditor::_animation_name_edited() {
-
- if (updating)
+ if (updating) {
return;
+ }
- if (!frames->has_animation(edited_anim))
+ if (!frames->has_animation(edited_anim)) {
return;
+ }
TreeItem *edited = animations->get_edited();
- if (!edited)
+ if (!edited) {
return;
+ }
String new_name = edited->get_text(0);
- if (new_name == String(edited_anim))
+ if (new_name == String(edited_anim)) {
return;
+ }
new_name = new_name.replace("/", "_").replace(",", " ");
@@ -544,7 +536,6 @@ void SpriteFramesEditor::_animation_name_edited() {
undo_redo->add_undo_method(frames, "rename_animation", name, edited_anim);
for (List<Node *>::Element *E = nodes.front(); E; E = E->next()) {
-
String current = E->get()->call("get_animation");
undo_redo->add_do_method(E->get(), "set_animation", name);
undo_redo->add_undo_method(E->get(), "set_animation", edited_anim);
@@ -559,7 +550,6 @@ void SpriteFramesEditor::_animation_name_edited() {
}
void SpriteFramesEditor::_animation_add() {
-
String name = "New Anim";
int counter = 0;
while (frames->has_animation(name)) {
@@ -577,7 +567,6 @@ void SpriteFramesEditor::_animation_add() {
undo_redo->add_undo_method(this, "_update_library");
for (List<Node *>::Element *E = nodes.front(); E; E = E->next()) {
-
String current = E->get()->call("get_animation");
undo_redo->add_do_method(E->get(), "set_animation", name);
undo_redo->add_undo_method(E->get(), "set_animation", current);
@@ -590,19 +579,19 @@ void SpriteFramesEditor::_animation_add() {
}
void SpriteFramesEditor::_animation_remove() {
-
- if (updating)
+ if (updating) {
return;
+ }
- if (!frames->has_animation(edited_anim))
+ if (!frames->has_animation(edited_anim)) {
return;
+ }
delete_dialog->set_text(TTR("Delete Animation?"));
delete_dialog->popup_centered();
}
void SpriteFramesEditor::_animation_remove_confirmed() {
-
undo_redo->create_action(TTR("Remove Animation"));
undo_redo->add_do_method(frames, "remove_animation", edited_anim);
undo_redo->add_undo_method(frames, "add_animation", edited_anim);
@@ -622,9 +611,9 @@ void SpriteFramesEditor::_animation_remove_confirmed() {
}
void SpriteFramesEditor::_animation_loop_changed() {
-
- if (updating)
+ if (updating) {
return;
+ }
undo_redo->create_action(TTR("Change Animation Loop"));
undo_redo->add_do_method(frames, "set_animation_loop", edited_anim, anim_loop->is_pressed());
@@ -635,9 +624,9 @@ void SpriteFramesEditor::_animation_loop_changed() {
}
void SpriteFramesEditor::_animation_fps_changed(double p_value) {
-
- if (updating)
+ if (updating) {
return;
+ }
undo_redo->create_action(TTR("Change Animation FPS"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(frames, "set_animation_speed", edited_anim, p_value);
@@ -649,7 +638,6 @@ void SpriteFramesEditor::_animation_fps_changed(double p_value) {
}
void SpriteFramesEditor::_update_library(bool p_skip_selector) {
-
updating = true;
if (!p_skip_selector) {
@@ -664,7 +652,6 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
anim_names.sort_custom<StringName::AlphCompare>();
for (List<StringName>::Element *E = anim_names.front(); E; E = E->next()) {
-
String name = E->get();
TreeItem *it = animations->create_item(anim_root);
@@ -687,18 +674,17 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
return;
}
- if (sel >= frames->get_frame_count(edited_anim))
+ if (sel >= frames->get_frame_count(edited_anim)) {
sel = frames->get_frame_count(edited_anim) - 1;
- else if (sel < 0 && frames->get_frame_count(edited_anim))
+ } else if (sel < 0 && frames->get_frame_count(edited_anim)) {
sel = 0;
+ }
for (int i = 0; i < frames->get_frame_count(edited_anim); i++) {
-
String name;
Ref<Texture2D> icon;
if (frames->get_frame(edited_anim, i).is_null()) {
-
name = itos(i) + ": " + TTR("(empty)");
} else {
@@ -707,10 +693,12 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
}
tree->add_item(name, icon);
- if (frames->get_frame(edited_anim, i).is_valid())
+ if (frames->get_frame(edited_anim, i).is_valid()) {
tree->set_item_tooltip(tree->get_item_count() - 1, frames->get_frame(edited_anim, i)->get_path());
- if (sel == i)
+ }
+ if (sel == i) {
tree->select(tree->get_item_count() - 1);
+ }
}
anim_speed->set_value(frames->get_animation_speed(edited_anim));
@@ -721,16 +709,14 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
}
void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
-
- if (frames == p_frames)
+ if (frames == p_frames) {
return;
+ }
frames = p_frames;
if (p_frames) {
-
if (!p_frames->has_animation(edited_anim)) {
-
List<StringName> anim_names;
frames->get_animation_list(&anim_names);
anim_names.sort_custom<StringName::AlphCompare>();
@@ -743,25 +729,26 @@ void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
_update_library();
} else {
-
hide();
}
}
Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
- if (!frames->has_animation(edited_anim))
+ if (!frames->has_animation(edited_anim)) {
return false;
+ }
int idx = tree->get_item_at_position(p_point, true);
- if (idx < 0 || idx >= frames->get_frame_count(edited_anim))
+ if (idx < 0 || idx >= frames->get_frame_count(edited_anim)) {
return Variant();
+ }
RES frame = frames->get_frame(edited_anim, idx);
- if (frame.is_null())
+ if (frame.is_null()) {
return Variant();
+ }
Dictionary drag_data = EditorNode::get_singleton()->drag_resource(frame, p_from);
drag_data["frame"] = idx; // store the frame, in case we want to reorder frames inside 'drop_data_fw'
@@ -769,15 +756,16 @@ Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
}
bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return false;
+ }
// reordering frames
- if (d.has("from") && (Object *)(d["from"]) == tree)
+ if (d.has("from") && (Object *)(d["from"]) == tree) {
return true;
+ }
if (String(d["type"]) == "resource" && d.has("resource")) {
RES r = d["resource"];
@@ -785,17 +773,16 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
Ref<Texture2D> texture = r;
if (texture.is_valid()) {
-
return true;
}
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
- if (files.size() == 0)
+ if (files.size() == 0) {
return false;
+ }
for (int i = 0; i < files.size(); i++) {
String file = files[i];
@@ -812,14 +799,15 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
}
void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
- if (!can_drop_data_fw(p_point, p_data, p_from))
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return;
+ }
int at_pos = tree->get_item_at_position(p_point, true);
@@ -830,13 +818,15 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
if (texture.is_valid()) {
bool reorder = false;
- if (d.has("from") && (Object *)(d["from"]) == tree)
+ if (d.has("from") && (Object *)(d["from"]) == tree) {
reorder = true;
+ }
if (reorder) { //drop is from reordering frames
int from_frame = -1;
- if (d.has("frame"))
+ if (d.has("frame")) {
from_frame = d["frame"];
+ }
undo_redo->create_action(TTR("Move Frame"));
undo_redo->add_do_method(frames, "remove_frame", edited_anim, from_frame == -1 ? frames->get_frame_count(edited_anim) : from_frame);
@@ -858,7 +848,6 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
_file_load_request(files, at_pos);
@@ -866,7 +855,6 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
}
void SpriteFramesEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
@@ -874,7 +862,6 @@ void SpriteFramesEditor::_bind_methods() {
}
SpriteFramesEditor::SpriteFramesEditor() {
-
VBoxContainer *vbc_animlist = memnew(VBoxContainer);
add_child(vbc_animlist);
vbc_animlist->set_custom_minimum_size(Size2(150, 0) * EDSCALE);
@@ -1071,7 +1058,6 @@ SpriteFramesEditor::SpriteFramesEditor() {
}
void SpriteFramesEditorPlugin::edit(Object *p_object) {
-
frames_editor->set_undo_redo(&get_undo_redo());
SpriteFrames *s;
@@ -1083,7 +1069,6 @@ void SpriteFramesEditorPlugin::edit(Object *p_object) {
if (animated_sprite_3d) {
s = *animated_sprite_3d->get_sprite_frames();
} else {
-
s = Object::cast_to<SpriteFrames>(p_object);
}
}
@@ -1092,7 +1077,6 @@ void SpriteFramesEditorPlugin::edit(Object *p_object) {
}
bool SpriteFramesEditorPlugin::handles(Object *p_object) const {
-
AnimatedSprite2D *animated_sprite = Object::cast_to<AnimatedSprite2D>(p_object);
AnimatedSprite3D *animated_sprite_3d = Object::cast_to<AnimatedSprite3D>(p_object);
if (animated_sprite && *animated_sprite->get_sprite_frames()) {
@@ -1105,20 +1089,18 @@ bool SpriteFramesEditorPlugin::handles(Object *p_object) const {
}
void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
button->show();
editor->make_bottom_panel_item_visible(frames_editor);
} else {
-
button->hide();
- if (frames_editor->is_visible_in_tree())
+ if (frames_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
+ }
}
}
SpriteFramesEditorPlugin::SpriteFramesEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
frames_editor = memnew(SpriteFramesEditor);
frames_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 89d9bc6fd3..45646eb9e4 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -41,7 +41,6 @@
#include "scene/gui/tree.h"
class SpriteFramesEditor : public HSplitContainer {
-
GDCLASS(SpriteFramesEditor, HSplitContainer);
ToolButton *load;
@@ -134,7 +133,6 @@ public:
};
class SpriteFramesEditorPlugin : public EditorPlugin {
-
GDCLASS(SpriteFramesEditorPlugin, EditorPlugin);
SpriteFramesEditor *frames_editor;
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index eb6e261305..3641052a4e 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -33,28 +33,28 @@
#include "editor/editor_scale.h"
bool EditorInspectorPluginStyleBox::can_handle(Object *p_object) {
-
return Object::cast_to<StyleBox>(p_object) != nullptr;
}
void EditorInspectorPluginStyleBox::parse_begin(Object *p_object) {
-
Ref<StyleBox> sb = Ref<StyleBox>(Object::cast_to<StyleBox>(p_object));
StyleBoxPreview *preview = memnew(StyleBoxPreview);
preview->edit(sb);
add_custom_control(preview);
}
+
bool EditorInspectorPluginStyleBox::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
return false; //do not want
}
+
void EditorInspectorPluginStyleBox::parse_end() {
}
void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) {
-
- if (stylebox.is_valid())
+ if (stylebox.is_valid()) {
stylebox->disconnect("changed", callable_mp(this, &StyleBoxPreview::_sb_changed));
+ }
stylebox = p_stylebox;
if (p_stylebox.is_valid()) {
preview->add_theme_style_override("panel", stylebox);
@@ -64,7 +64,6 @@ void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) {
}
void StyleBoxPreview::_sb_changed() {
-
preview->update();
}
@@ -93,7 +92,6 @@ StyleBoxPreview::StyleBoxPreview() {
}
StyleBoxEditorPlugin::StyleBoxEditorPlugin(EditorNode *p_node) {
-
Ref<EditorInspectorPluginStyleBox> inspector_plugin;
inspector_plugin.instance();
add_inspector_plugin(inspector_plugin);
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index 1eea9260b2..d9958d42e6 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -38,7 +38,6 @@
#include "scene/resources/style_box.h"
class StyleBoxPreview : public VBoxContainer {
-
GDCLASS(StyleBoxPreview, VBoxContainer);
Control *preview;
@@ -67,7 +66,6 @@ public:
};
class StyleBoxEditorPlugin : public EditorPlugin {
-
GDCLASS(StyleBoxEditorPlugin, EditorPlugin);
public:
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 2786a568ea..3ceb9bfd82 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -70,7 +70,6 @@ void TextEditor::_change_syntax_highlighter(int p_idx) {
}
void TextEditor::_load_theme_settings() {
-
TextEdit *text_edit = code_editor->get_text_edit();
text_edit->clear_colors();
@@ -164,7 +163,6 @@ String TextEditor::get_name() {
}
Ref<Texture2D> TextEditor::get_theme_icon() {
-
return EditorNode::get_singleton()->get_object_icon(text_file.operator->(), "");
}
@@ -195,7 +193,6 @@ void TextEditor::get_breakpoints(List<int> *p_breakpoints) {
}
void TextEditor::reload_text() {
-
ERR_FAIL_COND(text_file.is_null());
TextEdit *te = code_editor->get_text_edit();
@@ -221,7 +218,6 @@ void TextEditor::_validate_script() {
}
void TextEditor::_update_bookmark_list() {
-
bookmarks_menu->clear();
bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
@@ -249,7 +245,6 @@ void TextEditor::_update_bookmark_list() {
}
void TextEditor::_bookmark_item_pressed(int p_idx) {
-
if (p_idx < 4) { // Any item before the separator.
_edit_option(bookmarks_menu->get_item_id(p_idx));
} else {
@@ -262,17 +257,14 @@ void TextEditor::apply_code() {
}
bool TextEditor::is_unsaved() {
-
return code_editor->get_text_edit()->get_version() != code_editor->get_text_edit()->get_saved_version();
}
Variant TextEditor::get_edit_state() {
-
return code_editor->get_edit_state();
}
void TextEditor::set_edit_state(const Variant &p_state) {
-
code_editor->set_edit_state(p_state);
Dictionary state = p_state;
@@ -285,42 +277,34 @@ void TextEditor::set_edit_state(const Variant &p_state) {
}
void TextEditor::trim_trailing_whitespace() {
-
code_editor->trim_trailing_whitespace();
}
void TextEditor::insert_final_newline() {
-
code_editor->insert_final_newline();
}
void TextEditor::convert_indent_to_spaces() {
-
code_editor->convert_indent_to_spaces();
}
void TextEditor::convert_indent_to_tabs() {
-
code_editor->convert_indent_to_tabs();
}
void TextEditor::tag_saved_version() {
-
code_editor->get_text_edit()->tag_saved_version();
}
void TextEditor::goto_line(int p_line, bool p_with_error) {
-
code_editor->goto_line(p_line);
}
void TextEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
-
code_editor->goto_line_selection(p_line, p_begin, p_end);
}
void TextEditor::set_executing_line(int p_line) {
-
code_editor->set_executing_line(p_line);
}
@@ -329,12 +313,10 @@ void TextEditor::clear_executing_line() {
}
void TextEditor::ensure_focus() {
-
code_editor->get_text_edit()->grab_focus();
}
Vector<String> TextEditor::get_functions() {
-
return Vector<String>();
}
@@ -343,17 +325,14 @@ bool TextEditor::show_members_overview() {
}
void TextEditor::update_settings() {
-
code_editor->update_editor_settings();
}
void TextEditor::set_tooltip_request_func(String p_method, Object *p_obj) {
-
code_editor->get_text_edit()->set_tooltip_request_func(p_obj, p_method, this);
}
Control *TextEditor::get_edit_menu() {
-
return edit_hb;
}
@@ -362,7 +341,6 @@ void TextEditor::clear_edit_menu() {
}
void TextEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_READY:
_load_theme_settings();
@@ -375,116 +353,90 @@ void TextEditor::_edit_option(int p_op) {
switch (p_op) {
case EDIT_UNDO: {
-
tx->undo();
tx->call_deferred("grab_focus");
} break;
case EDIT_REDO: {
-
tx->redo();
tx->call_deferred("grab_focus");
} break;
case EDIT_CUT: {
-
tx->cut();
tx->call_deferred("grab_focus");
} break;
case EDIT_COPY: {
-
tx->copy();
tx->call_deferred("grab_focus");
} break;
case EDIT_PASTE: {
-
tx->paste();
tx->call_deferred("grab_focus");
} break;
case EDIT_SELECT_ALL: {
-
tx->select_all();
tx->call_deferred("grab_focus");
} break;
case EDIT_MOVE_LINE_UP: {
-
code_editor->move_lines_up();
} break;
case EDIT_MOVE_LINE_DOWN: {
-
code_editor->move_lines_down();
} break;
case EDIT_INDENT_LEFT: {
-
tx->indent_left();
} break;
case EDIT_INDENT_RIGHT: {
-
tx->indent_right();
} break;
case EDIT_DELETE_LINE: {
-
code_editor->delete_lines();
} break;
case EDIT_CLONE_DOWN: {
-
code_editor->clone_lines_down();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
-
tx->toggle_fold_line(tx->cursor_get_line());
tx->update();
} break;
case EDIT_FOLD_ALL_LINES: {
-
tx->fold_all_lines();
tx->update();
} break;
case EDIT_UNFOLD_ALL_LINES: {
-
tx->unhide_all_lines();
tx->update();
} break;
case EDIT_TRIM_TRAILING_WHITESAPCE: {
-
trim_trailing_whitespace();
} break;
case EDIT_CONVERT_INDENT_TO_SPACES: {
-
convert_indent_to_spaces();
} break;
case EDIT_CONVERT_INDENT_TO_TABS: {
-
convert_indent_to_tabs();
} break;
case EDIT_TO_UPPERCASE: {
-
_convert_case(CodeTextEditor::UPPER);
} break;
case EDIT_TO_LOWERCASE: {
-
_convert_case(CodeTextEditor::LOWER);
} break;
case EDIT_CAPITALIZE: {
-
_convert_case(CodeTextEditor::CAPITALIZE);
} break;
case SEARCH_FIND: {
-
code_editor->get_find_replace_bar()->popup_search();
} break;
case SEARCH_FIND_NEXT: {
-
code_editor->get_find_replace_bar()->search_next();
} break;
case SEARCH_FIND_PREV: {
-
code_editor->get_find_replace_bar()->search_prev();
} break;
case SEARCH_REPLACE: {
-
code_editor->get_find_replace_bar()->popup_replace();
} break;
case SEARCH_IN_FILES: {
-
String selected_text = code_editor->get_text_edit()->get_selection_text();
// Yep, because it doesn't make sense to instance this dialog for every single script open...
@@ -492,36 +444,29 @@ void TextEditor::_edit_option(int p_op) {
emit_signal("search_in_files_requested", selected_text);
} break;
case REPLACE_IN_FILES: {
-
String selected_text = code_editor->get_text_edit()->get_selection_text();
emit_signal("replace_in_files_requested", selected_text);
} break;
case SEARCH_GOTO_LINE: {
-
goto_line_dialog->popup_find_line(tx);
} break;
case BOOKMARK_TOGGLE: {
-
code_editor->toggle_bookmark();
} break;
case BOOKMARK_GOTO_NEXT: {
-
code_editor->goto_next_bookmark();
} break;
case BOOKMARK_GOTO_PREV: {
-
code_editor->goto_prev_bookmark();
} break;
case BOOKMARK_REMOVE_ALL: {
-
code_editor->remove_all_bookmarks();
} break;
}
}
void TextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) {
-
code_editor->convert_case(p_case);
}
@@ -529,7 +474,6 @@ void TextEditor::_bind_methods() {
}
static ScriptEditorBase *create_editor(const RES &p_resource) {
-
if (Object::cast_to<TextFile>(*p_resource)) {
return memnew(TextEditor);
}
@@ -537,17 +481,14 @@ static ScriptEditorBase *create_editor(const RES &p_resource) {
}
void TextEditor::register_editor() {
-
ScriptEditor::register_create_script_editor_function(create_editor);
}
void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
-
Ref<InputEventMouseButton> mb = ev;
if (mb.is_valid()) {
if (mb->get_button_index() == BUTTON_RIGHT) {
-
int col, row;
TextEdit *tx = code_editor->get_text_edit();
tx->_get_mouse_pos(mb->get_global_position() - tx->get_global_position(), row, col);
@@ -558,7 +499,6 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (tx->is_right_click_moving_caret()) {
if (tx->is_selection_active()) {
-
int from_line = tx->get_selection_from_line();
int to_line = tx->get_selection_to_line();
int from_column = tx->get_selection_from_column();
@@ -591,7 +531,6 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
}
void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is_folded, Vector2 p_position) {
-
context_menu->clear();
if (p_selection) {
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
@@ -613,8 +552,9 @@ void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
}
- if (p_can_fold || p_is_folded)
+ if (p_can_fold || p_is_folded) {
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE);
+ }
context_menu->set_position(get_global_transform().xform(p_position));
context_menu->set_size(Vector2(1, 1));
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h
index b41e11c3aa..9d9025a2c4 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -34,7 +34,6 @@
#include "script_editor_plugin.h"
class TextEditor : public ScriptEditorBase {
-
GDCLASS(TextEditor, ScriptEditorBase);
private:
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 7a3e571f16..b728a6700c 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -38,14 +38,11 @@ void TextureEditor::_gui_input(Ref<InputEvent> p_event) {
}
void TextureEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_READY) {
-
//get_scene()->connect("node_removed",this,"_node_removed");
}
if (p_what == NOTIFICATION_DRAW) {
-
Ref<Texture2D> checkerboard = get_theme_icon("Checkerboard", "EditorIcons");
Size2 size = get_size();
@@ -60,10 +57,12 @@ void TextureEditor::_notification(int p_what) {
}
// Prevent the texture from being unpreviewable after the rescale, so that we can still see something
- if (tex_height <= 0)
+ if (tex_height <= 0) {
tex_height = 1;
- if (tex_width <= 0)
+ }
+ if (tex_width <= 0) {
tex_width = 1;
+ }
int ofs_x = (size.width - tex_width) / 2;
int ofs_y = (size.height - tex_height) / 2;
@@ -94,8 +93,9 @@ void TextureEditor::_notification(int p_what) {
Size2 rect = font->get_string_size(text);
Vector2 draw_from = size - rect + Size2(-2, font->get_ascent() - 2);
- if (draw_from.x < 0)
+ if (draw_from.x < 0) {
draw_from.x = 0;
+ }
draw_string(font, draw_from + Vector2(2, 2), text, Color(0, 0, 0, 0.5), size.width);
draw_string(font, draw_from - Vector2(2, 2), text, Color(0, 0, 0, 0.5), size.width);
@@ -104,16 +104,16 @@ void TextureEditor::_notification(int p_what) {
}
void TextureEditor::_changed_callback(Object *p_changed, const char *p_prop) {
-
- if (!is_visible())
+ if (!is_visible()) {
return;
+ }
update();
}
void TextureEditor::edit(Ref<Texture2D> p_texture) {
-
- if (!texture.is_null())
+ if (!texture.is_null()) {
texture->remove_change_receptor(this);
+ }
texture = p_texture;
@@ -126,12 +126,10 @@ void TextureEditor::edit(Ref<Texture2D> p_texture) {
}
void TextureEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_gui_input"), &TextureEditor::_gui_input);
}
TextureEditor::TextureEditor() {
-
set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
set_custom_minimum_size(Size2(1, 150));
}
@@ -141,14 +139,13 @@ TextureEditor::~TextureEditor() {
texture->remove_change_receptor(this);
}
}
+
//
bool EditorInspectorPluginTexture::can_handle(Object *p_object) {
-
return Object::cast_to<ImageTexture>(p_object) != nullptr || Object::cast_to<AtlasTexture>(p_object) != nullptr || Object::cast_to<StreamTexture2D>(p_object) != nullptr || Object::cast_to<LargeTexture>(p_object) != nullptr || Object::cast_to<AnimatedTexture>(p_object) != nullptr;
}
void EditorInspectorPluginTexture::parse_begin(Object *p_object) {
-
Texture2D *texture = Object::cast_to<Texture2D>(p_object);
if (!texture) {
return;
@@ -161,7 +158,6 @@ void EditorInspectorPluginTexture::parse_begin(Object *p_object) {
}
TextureEditorPlugin::TextureEditorPlugin(EditorNode *p_node) {
-
Ref<EditorInspectorPluginTexture> plugin;
plugin.instance();
add_inspector_plugin(plugin);
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 29ad0183dc..63eea2b767 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -36,7 +36,6 @@
#include "scene/resources/texture.h"
class TextureEditor : public Control {
-
GDCLASS(TextureEditor, Control);
Ref<Texture2D> texture;
@@ -62,7 +61,6 @@ public:
};
class TextureEditorPlugin : public EditorPlugin {
-
GDCLASS(TextureEditorPlugin, EditorPlugin);
public:
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 6d716951b3..59e87fb273 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* texture_editor_plugin.cpp */
+/* texture_layered_editor_plugin.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -48,9 +48,7 @@ void TextureLayeredEditor::_texture_rect_draw() {
}
void TextureLayeredEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_READY) {
-
//get_scene()->connect("node_removed",this,"_node_removed");
}
if (p_what == NOTIFICATION_RESIZED) {
@@ -58,7 +56,6 @@ void TextureLayeredEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_DRAW) {
-
Ref<Texture2D> checkerboard = get_theme_icon("Checkerboard", "EditorIcons");
Size2 size = get_size();
@@ -67,14 +64,13 @@ void TextureLayeredEditor::_notification(int p_what) {
}
void TextureLayeredEditor::_changed_callback(Object *p_changed, const char *p_prop) {
-
- if (!is_visible())
+ if (!is_visible()) {
return;
+ }
update();
}
void TextureLayeredEditor::_update_material() {
-
materials[0]->set_shader_param("layer", layer->get_value());
materials[2]->set_shader_param("layer", layer->get_value());
materials[texture->get_layered_type()]->set_shader_param("tex", texture->get_rid());
@@ -151,7 +147,6 @@ void TextureLayeredEditor::_make_shaders() {
}
void TextureLayeredEditor::_texture_rect_update_area() {
-
Size2 size = get_size();
int tex_width = texture->get_width() * size.height / texture->get_height();
int tex_height = size.height;
@@ -162,10 +157,12 @@ void TextureLayeredEditor::_texture_rect_update_area() {
}
// Prevent the texture from being unpreviewable after the rescale, so that we can still see something
- if (tex_height <= 0)
+ if (tex_height <= 0) {
tex_height = 1;
- if (tex_width <= 0)
+ }
+ if (tex_width <= 0) {
tex_width = 1;
+ }
int ofs_x = (size.width - tex_width) / 2;
int ofs_y = (size.height - tex_height) / 2;
@@ -175,14 +172,13 @@ void TextureLayeredEditor::_texture_rect_update_area() {
}
void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
-
- if (!texture.is_null())
+ if (!texture.is_null()) {
texture->remove_change_receptor(this);
+ }
texture = p_texture;
if (!texture.is_null()) {
-
if (shaders[0].is_null()) {
_make_shaders();
}
@@ -213,13 +209,11 @@ void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
}
void TextureLayeredEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_gui_input"), &TextureLayeredEditor::_gui_input);
ClassDB::bind_method(D_METHOD("_layer_changed"), &TextureLayeredEditor::_layer_changed);
}
TextureLayeredEditor::TextureLayeredEditor() {
-
set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
set_custom_minimum_size(Size2(1, 150));
texture_rect = memnew(Control);
@@ -259,14 +253,13 @@ TextureLayeredEditor::~TextureLayeredEditor() {
texture->remove_change_receptor(this);
}
}
+
//
bool EditorInspectorPluginLayeredTexture::can_handle(Object *p_object) {
-
return Object::cast_to<TextureLayered>(p_object) != nullptr;
}
void EditorInspectorPluginLayeredTexture::parse_begin(Object *p_object) {
-
TextureLayered *texture = Object::cast_to<TextureLayered>(p_object);
if (!texture) {
return;
@@ -279,7 +272,6 @@ void EditorInspectorPluginLayeredTexture::parse_begin(Object *p_object) {
}
TextureLayeredEditorPlugin::TextureLayeredEditorPlugin(EditorNode *p_node) {
-
Ref<EditorInspectorPluginLayeredTexture> plugin;
plugin.instance();
add_inspector_plugin(plugin);
diff --git a/editor/plugins/texture_layered_editor_plugin.h b/editor/plugins/texture_layered_editor_plugin.h
index e8503e845e..4c5e06a5b8 100644
--- a/editor/plugins/texture_layered_editor_plugin.h
+++ b/editor/plugins/texture_layered_editor_plugin.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* texture_editor_plugin.h */
+/* texture_layered_editor_plugin.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -35,8 +35,8 @@
#include "editor/editor_plugin.h"
#include "scene/resources/shader.h"
#include "scene/resources/texture.h"
-class TextureLayeredEditor : public Control {
+class TextureLayeredEditor : public Control {
GDCLASS(TextureLayeredEditor, Control);
SpinBox *layer;
@@ -55,8 +55,9 @@ class TextureLayeredEditor : public Control {
void _update_material();
bool setting;
void _layer_changed(double) {
- if (!setting)
+ if (!setting) {
_update_material();
+ }
}
void _texture_rect_update_area();
@@ -83,7 +84,6 @@ public:
};
class TextureLayeredEditorPlugin : public EditorPlugin {
-
GDCLASS(TextureLayeredEditorPlugin, EditorPlugin);
public:
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 099c9ceb5d..9b8b111be5 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -50,19 +50,21 @@ void draw_margin_line(Control *edit_draw, Vector2 from, Vector2 to) {
void TextureRegionEditor::_region_draw() {
Ref<Texture2D> base_tex = nullptr;
- if (node_sprite)
+ if (node_sprite) {
base_tex = node_sprite->get_texture();
- else if (node_sprite_3d)
+ } else if (node_sprite_3d) {
base_tex = node_sprite_3d->get_texture();
- else if (node_ninepatch)
+ } else if (node_ninepatch) {
base_tex = node_ninepatch->get_texture();
- else if (obj_styleBox.is_valid())
+ } else if (obj_styleBox.is_valid()) {
base_tex = obj_styleBox->get_texture();
- else if (atlas_tex.is_valid())
+ } else if (atlas_tex.is_valid()) {
base_tex = atlas_tex->get_atlas();
+ }
- if (base_tex.is_null())
+ if (base_tex.is_null()) {
return;
+ }
Transform2D mtx;
mtx.elements[2] = -draw_ofs * draw_zoom;
@@ -78,45 +80,55 @@ void TextureRegionEditor::_region_draw() {
int last_cell = 0;
if (snap_step.x != 0) {
- if (snap_separation.x == 0)
+ if (snap_separation.x == 0) {
for (int i = 0; i < s.width; i++) {
int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(i, 0)).x - snap_offset.x) / snap_step.x));
- if (i == 0)
+ if (i == 0) {
last_cell = cell;
- if (last_cell != cell)
+ }
+ if (last_cell != cell) {
edit_draw->draw_line(Point2(i, 0), Point2(i, s.height), grid_color);
+ }
last_cell = cell;
}
- else
+ } else {
for (int i = 0; i < s.width; i++) {
int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(i, 0)).x - snap_offset.x) / (snap_step.x + snap_separation.x)));
- if (i == 0)
+ if (i == 0) {
last_cell = cell;
- if (last_cell != cell)
+ }
+ if (last_cell != cell) {
edit_draw->draw_rect(Rect2(i - snap_separation.x * draw_zoom, 0, snap_separation.x * draw_zoom, s.height), grid_color);
+ }
last_cell = cell;
}
+ }
}
if (snap_step.y != 0) {
- if (snap_separation.y == 0)
+ if (snap_separation.y == 0) {
for (int i = 0; i < s.height; i++) {
int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(0, i)).y - snap_offset.y) / snap_step.y));
- if (i == 0)
+ if (i == 0) {
last_cell = cell;
- if (last_cell != cell)
+ }
+ if (last_cell != cell) {
edit_draw->draw_line(Point2(0, i), Point2(s.width, i), grid_color);
+ }
last_cell = cell;
}
- else
+ } else {
for (int i = 0; i < s.height; i++) {
int cell = Math::fast_ftoi(Math::floor((mtx.affine_inverse().xform(Vector2(0, i)).y - snap_offset.y) / (snap_step.y + snap_separation.y)));
- if (i == 0)
+ if (i == 0) {
last_cell = cell;
- if (last_cell != cell)
+ }
+ if (last_cell != cell) {
edit_draw->draw_rect(Rect2(0, i - snap_separation.y * draw_zoom, s.width, snap_separation.y * draw_zoom), grid_color);
+ }
last_cell = cell;
}
+ }
}
} else if (snap_mode == SNAP_AUTOSLICE) {
for (List<Rect2>::Element *E = autoslice_cache.front(); E; E = E->next()) {
@@ -152,7 +164,6 @@ void TextureRegionEditor::_region_draw() {
};
Color color = get_theme_color("mono_color", "Editor");
for (int i = 0; i < 4; i++) {
-
int prev = (i + 3) % 4;
int next = (i + 1) % 4;
@@ -161,14 +172,16 @@ void TextureRegionEditor::_region_draw() {
edit_draw->draw_line(endpoints[i] - draw_ofs * draw_zoom, endpoints[next] - draw_ofs * draw_zoom, color, 2);
- if (snap_mode != SNAP_AUTOSLICE)
+ if (snap_mode != SNAP_AUTOSLICE) {
edit_draw->draw_texture(select_handle, (endpoints[i] + ofs - (select_handle->get_size() / 2)).floor() - draw_ofs * draw_zoom);
+ }
ofs = (endpoints[next] - endpoints[i]) / 2;
ofs += (endpoints[next] - endpoints[i]).tangent().normalized() * (select_handle->get_size().width / 2);
- if (snap_mode != SNAP_AUTOSLICE)
+ if (snap_mode != SNAP_AUTOSLICE) {
edit_draw->draw_texture(select_handle, (endpoints[i] + ofs - (select_handle->get_size() / 2)).floor() - draw_ofs * draw_zoom);
+ }
scroll_rect.expand_to(raw_endpoints[i]);
}
@@ -259,9 +272,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid()) {
-
if (mb->get_button_index() == BUTTON_LEFT) {
-
if (mb->is_pressed()) {
if (node_ninepatch || obj_styleBox.is_valid()) {
edited_margin = -1;
@@ -309,16 +320,17 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
rect = E->get();
if (Input::get_singleton()->is_key_pressed(KEY_CONTROL) && !(Input::get_singleton()->is_key_pressed(KEY_SHIFT | KEY_ALT))) {
Rect2 r;
- if (node_sprite)
+ if (node_sprite) {
r = node_sprite->get_region_rect();
- else if (node_sprite_3d)
+ } else if (node_sprite_3d) {
r = node_sprite_3d->get_region_rect();
- else if (node_ninepatch)
+ } else if (node_ninepatch) {
r = node_ninepatch->get_region_rect();
- else if (obj_styleBox.is_valid())
+ } else if (obj_styleBox.is_valid()) {
r = obj_styleBox->get_region_rect();
- else if (atlas_tex.is_valid())
+ } else if (atlas_tex.is_valid()) {
r = atlas_tex->get_region();
+ }
rect.expand_to(r.position);
rect.expand_to(r.position + r.size);
}
@@ -349,21 +361,23 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
}
} else if (edited_margin < 0) {
drag_from = mtx.affine_inverse().xform(Vector2(mb->get_position().x, mb->get_position().y));
- if (snap_mode == SNAP_PIXEL)
+ if (snap_mode == SNAP_PIXEL) {
drag_from = drag_from.snapped(Vector2(1, 1));
- else if (snap_mode == SNAP_GRID)
+ } else if (snap_mode == SNAP_GRID) {
drag_from = snap_point(drag_from);
+ }
drag = true;
- if (node_sprite)
+ if (node_sprite) {
rect_prev = node_sprite->get_region_rect();
- else if (node_sprite_3d)
+ } else if (node_sprite_3d) {
rect_prev = node_sprite_3d->get_region_rect();
- else if (node_ninepatch)
+ } else if (node_ninepatch) {
rect_prev = node_ninepatch->get_region_rect();
- else if (obj_styleBox.is_valid())
+ } else if (obj_styleBox.is_valid()) {
rect_prev = obj_styleBox->get_region_rect();
- else if (atlas_tex.is_valid())
+ } else if (atlas_tex.is_valid()) {
rect_prev = atlas_tex->get_region();
+ }
for (int i = 0; i < 8; i++) {
Vector2 tuv = endpoints[i];
@@ -421,15 +435,16 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
}
} else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
-
if (drag) {
drag = false;
if (edited_margin >= 0) {
static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT };
- if (node_ninepatch)
+ if (node_ninepatch) {
node_ninepatch->set_patch_margin(m[edited_margin], prev_margin);
- if (obj_styleBox.is_valid())
+ }
+ if (obj_styleBox.is_valid()) {
obj_styleBox->set_margin_size(m[edited_margin], prev_margin);
+ }
edited_margin = -1;
} else {
apply_rect(rect_prev);
@@ -448,41 +463,43 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMouseMotion> mm = p_input;
if (mm.is_valid()) {
-
if (mm->get_button_mask() & BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
-
Vector2 dragged(mm->get_relative().x / draw_zoom, mm->get_relative().y / draw_zoom);
hscroll->set_value(hscroll->get_value() - dragged.x);
vscroll->set_value(vscroll->get_value() - dragged.y);
} else if (drag) {
-
if (edited_margin >= 0) {
float new_margin = 0;
- if (edited_margin == 0)
+ if (edited_margin == 0) {
new_margin = prev_margin + (mm->get_position().y - drag_from.y) / draw_zoom;
- else if (edited_margin == 1)
+ } else if (edited_margin == 1) {
new_margin = prev_margin - (mm->get_position().y - drag_from.y) / draw_zoom;
- else if (edited_margin == 2)
+ } else if (edited_margin == 2) {
new_margin = prev_margin + (mm->get_position().x - drag_from.x) / draw_zoom;
- else if (edited_margin == 3)
+ } else if (edited_margin == 3) {
new_margin = prev_margin - (mm->get_position().x - drag_from.x) / draw_zoom;
- else
+ } else {
ERR_PRINT("Unexpected edited_margin");
+ }
- if (new_margin < 0)
+ if (new_margin < 0) {
new_margin = 0;
+ }
static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT };
- if (node_ninepatch)
+ if (node_ninepatch) {
node_ninepatch->set_patch_margin(m[edited_margin], new_margin);
- if (obj_styleBox.is_valid())
+ }
+ if (obj_styleBox.is_valid()) {
obj_styleBox->set_margin_size(m[edited_margin], new_margin);
+ }
} else {
Vector2 new_pos = mtx.affine_inverse().xform(mm->get_position());
- if (snap_mode == SNAP_PIXEL)
+ if (snap_mode == SNAP_PIXEL) {
new_pos = new_pos.snapped(Vector2(1, 1));
- else if (snap_mode == SNAP_GRID)
+ } else if (snap_mode == SNAP_GRID) {
new_pos = snap_point(new_pos);
+ }
if (creating) {
rect = Rect2(drag_from, Size2());
@@ -560,8 +577,9 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
}
void TextureRegionEditor::_scroll_changed(float) {
- if (updating_scroll)
+ if (updating_scroll) {
return;
+ }
draw_ofs.x = hscroll->get_value();
draw_ofs.y = vscroll->get_value();
@@ -571,10 +589,11 @@ void TextureRegionEditor::_scroll_changed(float) {
void TextureRegionEditor::_set_snap_mode(int p_mode) {
snap_mode = p_mode;
- if (snap_mode == SNAP_GRID)
+ if (snap_mode == SNAP_GRID) {
hb_grid->show();
- else
+ } else {
hb_grid->hide();
+ }
if (snap_mode == SNAP_AUTOSLICE && is_visible() && autoslice_is_dirty) {
_update_autoslice();
@@ -614,8 +633,9 @@ void TextureRegionEditor::_set_snap_sep_y(float p_val) {
}
void TextureRegionEditor::_zoom_on_position(float p_zoom, Point2 p_position) {
- if (p_zoom < 0.25 || p_zoom > 8)
+ if (p_zoom < 0.25 || p_zoom > 8) {
return;
+ }
float prev_zoom = draw_zoom;
draw_zoom = p_zoom;
@@ -640,32 +660,34 @@ void TextureRegionEditor::_zoom_out() {
}
void TextureRegionEditor::apply_rect(const Rect2 &p_rect) {
- if (node_sprite)
+ if (node_sprite) {
node_sprite->set_region_rect(p_rect);
- else if (node_sprite_3d)
+ } else if (node_sprite_3d) {
node_sprite_3d->set_region_rect(p_rect);
- else if (node_ninepatch)
+ } else if (node_ninepatch) {
node_ninepatch->set_region_rect(p_rect);
- else if (obj_styleBox.is_valid())
+ } else if (obj_styleBox.is_valid()) {
obj_styleBox->set_region_rect(p_rect);
- else if (atlas_tex.is_valid())
+ } else if (atlas_tex.is_valid()) {
atlas_tex->set_region(p_rect);
+ }
}
void TextureRegionEditor::_update_rect() {
- if (node_sprite)
+ if (node_sprite) {
rect = node_sprite->get_region_rect();
- else if (node_sprite_3d)
+ } else if (node_sprite_3d) {
rect = node_sprite_3d->get_region_rect();
- else if (node_ninepatch) {
+ } else if (node_ninepatch) {
rect = node_ninepatch->get_region_rect();
if (rect == Rect2()) {
rect = Rect2(Vector2(), node_ninepatch->get_texture()->get_size());
}
- } else if (obj_styleBox.is_valid())
+ } else if (obj_styleBox.is_valid()) {
rect = obj_styleBox->get_region_rect();
- else if (atlas_tex.is_valid())
+ } else if (atlas_tex.is_valid()) {
rect = atlas_tex->get_region();
+ }
}
void TextureRegionEditor::_update_autoslice() {
@@ -673,16 +695,17 @@ void TextureRegionEditor::_update_autoslice() {
autoslice_cache.clear();
Ref<Texture2D> texture = nullptr;
- if (node_sprite)
+ if (node_sprite) {
texture = node_sprite->get_texture();
- else if (node_sprite_3d)
+ } else if (node_sprite_3d) {
texture = node_sprite_3d->get_texture();
- else if (node_ninepatch)
+ } else if (node_ninepatch) {
texture = node_ninepatch->get_texture();
- else if (obj_styleBox.is_valid())
+ } else if (obj_styleBox.is_valid()) {
texture = obj_styleBox->get_texture();
- else if (atlas_tex.is_valid())
+ } else if (atlas_tex.is_valid()) {
texture = atlas_tex->get_atlas();
+ }
if (texture.is_null()) {
return;
@@ -707,8 +730,9 @@ void TextureRegionEditor::_update_autoslice() {
autoslice_cache.erase(F->prev());
queue_erase = false;
}
- if (F == E)
+ if (F == E) {
continue;
+ }
if (E->get().grow(1).intersects(F->get())) {
E->get().expand_to(F->get().position);
E->get().expand_to(F->get().position + F->get().size);
@@ -788,7 +812,6 @@ bool TextureRegionEditor::is_stylebox() {
}
bool TextureRegionEditor::is_atlas_texture() {
-
return atlas_tex.is_valid();
}
@@ -805,24 +828,31 @@ Sprite2D *TextureRegionEditor::get_sprite() {
}
void TextureRegionEditor::edit(Object *p_obj) {
- if (node_sprite)
+ if (node_sprite) {
node_sprite->remove_change_receptor(this);
- if (node_sprite_3d)
+ }
+ if (node_sprite_3d) {
node_sprite_3d->remove_change_receptor(this);
- if (node_ninepatch)
+ }
+ if (node_ninepatch) {
node_ninepatch->remove_change_receptor(this);
- if (obj_styleBox.is_valid())
+ }
+ if (obj_styleBox.is_valid()) {
obj_styleBox->remove_change_receptor(this);
- if (atlas_tex.is_valid())
+ }
+ if (atlas_tex.is_valid()) {
atlas_tex->remove_change_receptor(this);
+ }
if (p_obj) {
node_sprite = Object::cast_to<Sprite2D>(p_obj);
node_sprite_3d = Object::cast_to<Sprite3D>(p_obj);
node_ninepatch = Object::cast_to<NinePatchRect>(p_obj);
- if (Object::cast_to<StyleBoxTexture>(p_obj))
+ if (Object::cast_to<StyleBoxTexture>(p_obj)) {
obj_styleBox = Ref<StyleBoxTexture>(Object::cast_to<StyleBoxTexture>(p_obj));
- if (Object::cast_to<AtlasTexture>(p_obj))
+ }
+ if (Object::cast_to<AtlasTexture>(p_obj)) {
atlas_tex = Ref<AtlasTexture>(Object::cast_to<AtlasTexture>(p_obj));
+ }
p_obj->add_change_receptor(this);
_edit_region();
} else {
@@ -842,25 +872,27 @@ void TextureRegionEditor::edit(Object *p_obj) {
}
void TextureRegionEditor::_changed_callback(Object *p_changed, const char *p_prop) {
-
- if (!is_visible())
+ if (!is_visible()) {
return;
- if (p_prop == StringName("atlas") || p_prop == StringName("texture"))
+ }
+ if (p_prop == StringName("atlas") || p_prop == StringName("texture")) {
_edit_region();
+ }
}
void TextureRegionEditor::_edit_region() {
Ref<Texture2D> texture = nullptr;
- if (node_sprite)
+ if (node_sprite) {
texture = node_sprite->get_texture();
- else if (node_sprite_3d)
+ } else if (node_sprite_3d) {
texture = node_sprite_3d->get_texture();
- else if (node_ninepatch)
+ } else if (node_ninepatch) {
texture = node_ninepatch->get_texture();
- else if (obj_styleBox.is_valid())
+ } else if (obj_styleBox.is_valid()) {
texture = obj_styleBox->get_texture();
- else if (atlas_tex.is_valid())
+ } else if (atlas_tex.is_valid()) {
texture = atlas_tex->get_atlas();
+ }
if (texture.is_null()) {
_zoom_reset();
@@ -1063,7 +1095,6 @@ void TextureRegionEditorPlugin::make_visible(bool p_visible) {
}
Dictionary TextureRegionEditorPlugin::get_state() const {
-
Dictionary state;
state["snap_offset"] = region_editor->snap_offset;
state["snap_step"] = region_editor->snap_step;
@@ -1073,7 +1104,6 @@ Dictionary TextureRegionEditorPlugin::get_state() const {
}
void TextureRegionEditorPlugin::set_state(const Dictionary &p_state) {
-
Dictionary state = p_state;
if (state.has("snap_step")) {
Vector2 s = state["snap_step"];
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index c6cd648842..93da23fd50 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -45,7 +45,6 @@
*/
class TextureRegionEditor : public VBoxContainer {
-
GDCLASS(TextureRegionEditor, VBoxContainer);
enum SnapMode {
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index d9be2e32cb..eb028659fd 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -36,44 +36,38 @@
#include "scene/gui/progress_bar.h"
void ThemeEditor::edit(const Ref<Theme> &p_theme) {
-
theme = p_theme;
main_panel->set_theme(p_theme);
main_container->set_theme(p_theme);
}
void ThemeEditor::_propagate_redraw(Control *p_at) {
-
p_at->notification(NOTIFICATION_THEME_CHANGED);
p_at->minimum_size_changed();
p_at->update();
for (int i = 0; i < p_at->get_child_count(); i++) {
Control *a = Object::cast_to<Control>(p_at->get_child(i));
- if (a)
+ if (a) {
_propagate_redraw(a);
+ }
}
}
void ThemeEditor::_refresh_interval() {
-
_propagate_redraw(main_panel);
_propagate_redraw(main_container);
}
void ThemeEditor::_type_menu_cbk(int p_option) {
-
type_edit->set_text(type_menu->get_popup()->get_item_text(p_option));
}
void ThemeEditor::_name_menu_about_to_show() {
-
String fromtype = type_edit->get_text();
List<StringName> names;
if (popup_mode == POPUP_ADD) {
-
switch (type_select->get_selected()) {
-
case 0:
Theme::get_default()->get_icon_list(fromtype, &names);
break;
@@ -91,7 +85,6 @@ void ThemeEditor::_name_menu_about_to_show() {
break;
}
} else if (popup_mode == POPUP_REMOVE) {
-
theme->get_icon_list(fromtype, &names);
theme->get_stylebox_list(fromtype, &names);
theme->get_font_list(fromtype, &names);
@@ -102,21 +95,17 @@ void ThemeEditor::_name_menu_about_to_show() {
name_menu->get_popup()->clear();
name_menu->get_popup()->set_size(Size2());
for (List<StringName>::Element *E = names.front(); E; E = E->next()) {
-
name_menu->get_popup()->add_item(E->get());
}
}
void ThemeEditor::_name_menu_cbk(int p_option) {
-
name_edit->set_text(name_menu->get_popup()->get_item_text(p_option));
}
struct _TECategory {
-
template <class T>
struct RefItem {
-
Ref<T> item;
StringName name;
bool operator<(const RefItem<T> &p) const { return item->get_instance_id() < p.item->get_instance_id(); }
@@ -124,7 +113,6 @@ struct _TECategory {
template <class T>
struct Item {
-
T item;
String name;
bool operator<(const Item<T> &p) const { return name < p.name; }
@@ -139,7 +127,6 @@ struct _TECategory {
};
void ThemeEditor::_save_template_cbk(String fname) {
-
String filename = file_dialog->get_current_path();
Map<String, _TECategory> categories;
@@ -153,7 +140,6 @@ void ThemeEditor::_save_template_cbk(String fname) {
// Fill default theme.
for (Map<String, _TECategory>::Element *E = categories.front(); E; E = E->next()) {
-
_TECategory &tc = E->get();
List<StringName> stylebox_list;
@@ -270,55 +256,55 @@ void ThemeEditor::_save_template_cbk(String fname) {
// Write default theme.
for (Map<String, _TECategory>::Element *E = categories.front(); E; E = E->next()) {
-
_TECategory &tc = E->get();
String underline = "; ";
- for (int i = 0; i < E->key().length(); i++)
+ for (int i = 0; i < E->key().length(); i++) {
underline += "*";
+ }
file->store_line("");
file->store_line(underline);
file->store_line("; " + E->key());
file->store_line(underline);
- if (tc.stylebox_items.size())
+ if (tc.stylebox_items.size()) {
file->store_line("\n; StyleBox Items:\n");
+ }
for (Set<_TECategory::RefItem<StyleBox>>::Element *F = tc.stylebox_items.front(); F; F = F->next()) {
-
file->store_line(E->key() + "." + F->get().name + " = default");
}
- if (tc.font_items.size())
+ if (tc.font_items.size()) {
file->store_line("\n; Font Items:\n");
+ }
for (Set<_TECategory::RefItem<Font>>::Element *F = tc.font_items.front(); F; F = F->next()) {
-
file->store_line(E->key() + "." + F->get().name + " = default");
}
- if (tc.icon_items.size())
+ if (tc.icon_items.size()) {
file->store_line("\n; Icon Items:\n");
+ }
for (Set<_TECategory::RefItem<Texture2D>>::Element *F = tc.icon_items.front(); F; F = F->next()) {
-
file->store_line(E->key() + "." + F->get().name + " = default");
}
- if (tc.color_items.size())
+ if (tc.color_items.size()) {
file->store_line("\n; Color Items:\n");
+ }
for (Set<_TECategory::Item<Color>>::Element *F = tc.color_items.front(); F; F = F->next()) {
-
file->store_line(E->key() + "." + F->get().name + " = default");
}
- if (tc.constant_items.size())
+ if (tc.constant_items.size()) {
file->store_line("\n; Constant Items:\n");
+ }
for (Set<_TECategory::Item<int>>::Element *F = tc.constant_items.front(); F; F = F->next()) {
-
file->store_line(E->key() + "." + F->get().name + " = default");
}
}
@@ -328,12 +314,9 @@ void ThemeEditor::_save_template_cbk(String fname) {
}
void ThemeEditor::_dialog_cbk() {
-
switch (popup_mode) {
case POPUP_ADD: {
-
switch (type_select->get_selected()) {
-
case 0:
theme->set_icon(name_edit->get_text(), type_edit->get_text(), Ref<Texture2D>());
break;
@@ -353,7 +336,6 @@ void ThemeEditor::_dialog_cbk() {
} break;
case POPUP_CLASS_ADD: {
-
StringName fromtype = type_edit->get_text();
List<StringName> names;
@@ -395,7 +377,6 @@ void ThemeEditor::_dialog_cbk() {
} break;
case POPUP_REMOVE: {
switch (type_select->get_selected()) {
-
case 0:
theme->clear_icon(name_edit->get_text(), type_edit->get_text());
break;
@@ -459,9 +440,7 @@ void ThemeEditor::_dialog_cbk() {
}
void ThemeEditor::_theme_menu_cbk(int p_option) {
-
if (p_option == POPUP_CREATE_EMPTY || p_option == POPUP_CREATE_EDITOR_EMPTY || p_option == POPUP_IMPORT_EDITOR_THEME) {
-
bool import = (p_option == POPUP_IMPORT_EDITOR_THEME);
Ref<Theme> base_theme;
@@ -473,7 +452,6 @@ void ThemeEditor::_theme_menu_cbk(int p_option) {
}
{
-
List<StringName> types;
base_theme->get_type_list(&types);
@@ -555,7 +533,6 @@ void ThemeEditor::_theme_menu_cbk(int p_option) {
type_select->hide();
} else if (p_option == POPUP_REMOVE) {
-
add_del_dialog->set_title(TTR("Remove Item"));
add_del_dialog->get_ok()->set_text(TTR("Remove"));
add_del_dialog->popup_centered(Size2(490, 85) * EDSCALE);
@@ -563,7 +540,6 @@ void ThemeEditor::_theme_menu_cbk(int p_option) {
base_theme = theme;
} else if (p_option == POPUP_CLASS_REMOVE) {
-
add_del_dialog->set_title(TTR("Remove All Items"));
add_del_dialog->get_ok()->set_text(TTR("Remove All"));
add_del_dialog->popup_centered(Size2(240, 85) * EDSCALE);
@@ -589,30 +565,27 @@ void ThemeEditor::_theme_menu_cbk(int p_option) {
List<StringName> new_types;
theme->get_type_list(&new_types);
for (List<StringName>::Element *F = new_types.front(); F; F = F->next()) {
-
bool found = false;
for (List<StringName>::Element *E = types.front(); E; E = E->next()) {
-
if (E->get() == F->get()) {
found = true;
break;
}
}
- if (!found)
+ if (!found) {
types.push_back(F->get());
+ }
}
}
types.sort_custom<StringName::AlphCompare>();
for (List<StringName>::Element *E = types.front(); E; E = E->next()) {
-
type_menu->get_popup()->add_item(E->get());
}
}
void ThemeEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_PROCESS: {
time_left -= get_process_delta_time();
@@ -631,7 +604,6 @@ void ThemeEditor::_bind_methods() {
}
ThemeEditor::ThemeEditor() {
-
time_left = 0;
HBoxContainer *top_menu = memnew(HBoxContainer);
@@ -901,7 +873,6 @@ ThemeEditor::ThemeEditor() {
}
void ThemeEditorPlugin::edit(Object *p_node) {
-
if (Object::cast_to<Theme>(p_node)) {
theme_editor->edit(Object::cast_to<Theme>(p_node));
} else {
@@ -910,27 +881,25 @@ void ThemeEditorPlugin::edit(Object *p_node) {
}
bool ThemeEditorPlugin::handles(Object *p_node) const {
-
return p_node->is_class("Theme");
}
void ThemeEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
theme_editor->set_process(true);
button->show();
editor->make_bottom_panel_item_visible(theme_editor);
} else {
theme_editor->set_process(false);
- if (theme_editor->is_visible_in_tree())
+ if (theme_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
+ }
button->hide();
}
}
ThemeEditorPlugin::ThemeEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
theme_editor = memnew(ThemeEditor);
theme_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h
index c51583593d..983bfb6b50 100644
--- a/editor/plugins/theme_editor_plugin.h
+++ b/editor/plugins/theme_editor_plugin.h
@@ -42,7 +42,6 @@
#include "editor/editor_node.h"
class ThemeEditor : public VBoxContainer {
-
GDCLASS(ThemeEditor, VBoxContainer);
Panel *main_panel;
@@ -99,7 +98,6 @@ public:
};
class ThemeEditorPlugin : public EditorPlugin {
-
GDCLASS(ThemeEditorPlugin, EditorPlugin);
ThemeEditor *theme_editor;
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index e22e0cc052..3281a59c1c 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -39,18 +39,14 @@
#include "scene/gui/split_container.h"
void TileMapEditor::_node_removed(Node *p_node) {
-
if (p_node == node) {
node = nullptr;
}
}
void TileMapEditor::_notification(int p_what) {
-
switch (p_what) {
-
case NOTIFICATION_PROCESS: {
-
if (bucket_queue.size()) {
CanvasItemEditor::get_singleton()->update_viewport();
}
@@ -58,13 +54,11 @@ void TileMapEditor::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
-
get_tree()->connect("node_removed", callable_mp(this, &TileMapEditor::_node_removed));
[[fallthrough]];
}
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
if (is_visible_in_tree()) {
_update_palette();
}
@@ -97,7 +91,6 @@ void TileMapEditor::_notification(int p_what) {
}
void TileMapEditor::_update_button_tool() {
-
ToolButton *tb[4] = { paint_button, bucket_fill_button, picker_button, select_button };
// Unpress all buttons
for (int i = 0; i < 4; i++) {
@@ -123,8 +116,9 @@ void TileMapEditor::_update_button_tool() {
break;
}
- if (tool != TOOL_PICKING)
+ if (tool != TOOL_PICKING) {
last_tool = tool;
+ }
}
void TileMapEditor::_button_tool_select(int p_tool) {
@@ -132,7 +126,6 @@ void TileMapEditor::_button_tool_select(int p_tool) {
_update_button_tool();
switch (tool) {
case TOOL_SELECTING: {
-
selection_active = false;
} break;
default:
@@ -142,10 +135,8 @@ void TileMapEditor::_button_tool_select(int p_tool) {
}
void TileMapEditor::_menu_option(int p_option) {
-
switch (p_option) {
case OPTION_COPY: {
-
_update_copydata();
if (selection_active) {
@@ -155,9 +146,9 @@ void TileMapEditor::_menu_option(int p_option) {
}
} break;
case OPTION_ERASE_SELECTION: {
-
- if (!selection_active)
+ if (!selection_active) {
return;
+ }
_start_undo(TTR("Erase Selection"));
_erase_selection();
@@ -169,7 +160,6 @@ void TileMapEditor::_menu_option(int p_option) {
CanvasItemEditor::get_singleton()->update_viewport();
} break;
case OPTION_FIX_INVALID: {
-
undo_redo->create_action(TTR("Fix Invalid Tiles"));
undo_redo->add_undo_method(node, "set", "tile_data", node->get("tile_data"));
node->fix_invalid_tiles();
@@ -178,7 +168,6 @@ void TileMapEditor::_menu_option(int p_option) {
} break;
case OPTION_CUT: {
-
if (selection_active) {
_update_copydata();
@@ -205,20 +194,32 @@ void TileMapEditor::_palette_multi_selected(int index, bool selected) {
_update_palette();
}
-void TileMapEditor::_canvas_mouse_enter() {
+void TileMapEditor::_palette_input(const Ref<InputEvent> &p_event) {
+ const Ref<InputEventMouseButton> mb = p_event;
+
+ // Zoom in/out using Ctrl + mouse wheel.
+ if (mb.is_valid() && mb->is_pressed() && mb->get_command()) {
+ if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_UP) {
+ size_slider->set_value(size_slider->get_value() + 0.2);
+ }
+
+ if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
+ size_slider->set_value(size_slider->get_value() - 0.2);
+ }
+ }
+}
+void TileMapEditor::_canvas_mouse_enter() {
mouse_over = true;
CanvasItemEditor::get_singleton()->update_viewport();
}
void TileMapEditor::_canvas_mouse_exit() {
-
mouse_over = false;
CanvasItemEditor::get_singleton()->update_viewport();
}
Vector<int> TileMapEditor::get_selected_tiles() const {
-
Vector<int> items = palette->get_selected_items();
if (items.size() == 0) {
@@ -233,7 +234,6 @@ Vector<int> TileMapEditor::get_selected_tiles() const {
}
void TileMapEditor::set_selected_tiles(Vector<int> p_tiles) {
-
palette->unselect_all();
for (int i = p_tiles.size() - 1; i >= 0; i--) {
@@ -248,7 +248,6 @@ void TileMapEditor::set_selected_tiles(Vector<int> p_tiles) {
}
Dictionary TileMapEditor::_create_cell_dictionary(int tile, bool flip_x, bool flip_y, bool transpose, Vector2 autotile_coord) {
-
Dictionary cell;
cell["id"] = tile;
@@ -261,7 +260,6 @@ Dictionary TileMapEditor::_create_cell_dictionary(int tile, bool flip_x, bool fl
}
void TileMapEditor::_create_set_cell_undo_redo(const Vector2 &p_vec, const CellOp &p_cell_old, const CellOp &p_cell_new) {
-
Dictionary cell_old = _create_cell_dictionary(p_cell_old.idx, p_cell_old.xf, p_cell_old.yf, p_cell_old.tr, p_cell_old.ac);
Dictionary cell_new = _create_cell_dictionary(p_cell_new.idx, p_cell_new.xf, p_cell_new.yf, p_cell_new.tr, p_cell_new.ac);
@@ -270,13 +268,11 @@ void TileMapEditor::_create_set_cell_undo_redo(const Vector2 &p_vec, const CellO
}
void TileMapEditor::_start_undo(const String &p_action) {
-
undo_data.clear();
undo_redo->create_action(p_action);
}
void TileMapEditor::_finish_undo() {
-
if (undo_data.size()) {
for (Map<Point2i, CellOp>::Element *E = undo_data.front(); E; E = E->next()) {
_create_set_cell_undo_redo(E->key(), E->get(), _get_op_from_cell(E->key()));
@@ -289,11 +285,11 @@ void TileMapEditor::_finish_undo() {
}
void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord) {
-
ERR_FAIL_COND(!node);
- if (p_values.size() == 0)
+ if (p_values.size() == 0) {
return;
+ }
int p_value = p_values[Math::rand() % p_values.size()];
int prev_val = node->get_cell(p_pos.x, p_pos.y);
@@ -319,8 +315,9 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p
position = prev_position;
}
- if (p_value == prev_val && p_flip_h == prev_flip_h && p_flip_v == prev_flip_v && p_transpose == prev_transpose && prev_position == position)
+ if (p_value == prev_val && p_flip_h == prev_flip_h && p_flip_v == prev_flip_v && p_transpose == prev_transpose && prev_position == position) {
return; // Check that it's actually different.
+ }
for (int y = p_pos.y - 1; y <= p_pos.y + 1; y++) {
for (int x = p_pos.x - 1; x <= p_pos.x + 1; x++) {
@@ -333,8 +330,9 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p
node->_set_celld(p_pos, _create_cell_dictionary(p_value, p_flip_h, p_flip_v, p_transpose, p_autotile_coord));
- if (tool == TOOL_PASTING)
+ if (tool == TOOL_PASTING) {
return;
+ }
if (manual_autotile || (p_value != -1 && node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE)) {
if (current != -1) {
@@ -360,7 +358,6 @@ void TileMapEditor::_priority_toggled(bool p_enabled) {
}
void TileMapEditor::_text_entered(const String &p_text) {
-
canvas_item_editor_viewport->grab_focus();
}
@@ -369,14 +366,12 @@ void TileMapEditor::_text_changed(const String &p_text) {
}
void TileMapEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
-
Ref<InputEventKey> k = p_ie;
if (k.is_valid() && (k->get_keycode() == KEY_UP ||
k->get_keycode() == KEY_DOWN ||
k->get_keycode() == KEY_PAGEUP ||
k->get_keycode() == KEY_PAGEDOWN)) {
-
palette->call("_gui_input", k);
search_box->accept_event();
}
@@ -396,9 +391,9 @@ struct _PaletteEntry {
} // namespace
void TileMapEditor::_update_palette() {
-
- if (!node)
+ if (!node) {
return;
+ }
// Update the clear button.
clear_transform_button->set_disabled(!flip_h && !flip_v && !transpose);
@@ -424,8 +419,9 @@ void TileMapEditor::_update_palette() {
List<int> tiles;
tileset->get_tile_list(&tiles);
- if (tiles.empty())
+ if (tiles.empty()) {
return;
+ }
float min_size = EDITOR_DEF("editors/tile_map/preview_size", 64);
min_size *= EDSCALE;
@@ -447,7 +443,6 @@ void TileMapEditor::_update_palette() {
Vector<_PaletteEntry> entries;
for (List<int>::Element *E = tiles.front(); E; E = E->next()) {
-
String name = tileset->tile_get_name(E->get());
if (name != "") {
@@ -462,8 +457,9 @@ void TileMapEditor::_update_palette() {
name = "#" + itos(E->get());
}
- if (filter != "" && !filter.is_subsequence_ofi(name))
+ if (filter != "" && !filter.is_subsequence_ofi(name)) {
continue;
+ }
const _PaletteEntry entry = { E->get(), name };
entries.push_back(entry);
@@ -474,7 +470,6 @@ void TileMapEditor::_update_palette() {
}
for (int i = 0; i < entries.size(); i++) {
-
if (show_tile_names) {
palette->add_item(entries[i].name);
} else {
@@ -502,8 +497,9 @@ void TileMapEditor::_update_palette() {
}
// Set region.
- if (region.size != Size2())
+ if (region.size != Size2()) {
palette->set_item_icon_region(palette->get_item_count() - 1, region);
+ }
// Set icon.
palette->set_item_icon(palette->get_item_count() - 1, tex);
@@ -526,7 +522,6 @@ void TileMapEditor::_update_palette() {
}
if (sel_tile != TileMap::INVALID_CELL && ((manual_autotile && tileset->tile_get_tile_mode(sel_tile) == TileSet::AUTO_TILE) || (!priority_atlastile && tileset->tile_get_tile_mode(sel_tile) == TileSet::ATLAS_TILE))) {
-
const Map<Vector2, uint32_t> &tiles2 = tileset->autotile_get_bitmask_map(sel_tile);
Vector<Vector2> entries2;
@@ -544,18 +539,17 @@ void TileMapEditor::_update_palette() {
Ref<Texture2D> tex = tileset->tile_get_texture(sel_tile);
for (int i = 0; i < entries2.size(); i++) {
-
manual_palette->add_item(String());
if (tex.is_valid()) {
-
Rect2 region = tileset->tile_get_region(sel_tile);
int spacing = tileset->autotile_get_spacing(sel_tile);
region.size = tileset->autotile_get_size(sel_tile); // !!
region.position += (region.size + Vector2(spacing, spacing)) * entries2[i];
- if (!region.has_no_area())
+ if (!region.has_no_area()) {
manual_palette->set_item_icon_region(manual_palette->get_item_count() - 1, region);
+ }
manual_palette->set_item_icon(manual_palette->get_item_count() - 1, tex);
}
@@ -566,10 +560,12 @@ void TileMapEditor::_update_palette() {
if (manual_palette->get_item_count() > 0) {
// Only show the manual palette if at least tile exists in it.
- if (selected_manual == -1 || selected_single != palette->get_current())
+ if (selected_manual == -1 || selected_single != palette->get_current()) {
selected_manual = 0;
- if (selected_manual < manual_palette->get_item_count())
+ }
+ if (selected_manual < manual_palette->get_item_count()) {
manual_palette->set_current(selected_manual);
+ }
manual_palette->show();
}
@@ -583,11 +579,11 @@ void TileMapEditor::_update_palette() {
}
void TileMapEditor::_pick_tile(const Point2 &p_pos) {
-
int id = node->get_cell(p_pos.x, p_pos.y);
- if (id == TileMap::INVALID_CELL)
+ if (id == TileMap::INVALID_CELL) {
return;
+ }
if (search_box->get_text() != "") {
search_box->set_text("");
@@ -612,15 +608,15 @@ void TileMapEditor::_pick_tile(const Point2 &p_pos) {
}
Vector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase, bool preview) {
-
int prev_id = node->get_cell(p_start.x, p_start.y);
Vector<int> ids;
ids.push_back(TileMap::INVALID_CELL);
if (!erase) {
ids = get_selected_tiles();
- if (ids.size() == 0 || ids[0] == TileMap::INVALID_CELL)
+ if (ids.size() == 0 || ids[0] == TileMap::INVALID_CELL) {
return Vector<Vector2>();
+ }
} else if (prev_id == TileMap::INVALID_CELL) {
return Vector<Vector2>();
}
@@ -637,8 +633,9 @@ Vector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase,
// Test if we can re-use the result from preview bucket fill
bool invalidate_cache = false;
// Area changed
- if (r != bucket_cache_rect)
+ if (r != bucket_cache_rect) {
_clear_bucket_cache();
+ }
// Cache grid is not initialized
if (bucket_cache_visited == nullptr) {
bucket_cache_visited = new bool[area];
@@ -651,8 +648,9 @@ Vector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase,
invalidate_cache = true;
}
if (invalidate_cache) {
- for (int i = 0; i < area; ++i)
+ for (int i = 0; i < area; ++i) {
bucket_cache_visited[i] = false;
+ }
bucket_cache = Vector<Vector2>();
bucket_cache_tile = prev_id;
bucket_cache_rect = r;
@@ -674,24 +672,25 @@ Vector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase,
bucket_queue.push_back(p_start);
while (bucket_queue.size()) {
-
Point2i n = bucket_queue.front()->get();
bucket_queue.pop_front();
- if (!r.has_point(n))
+ if (!r.has_point(n)) {
continue;
+ }
if (node->get_cell(n.x, n.y) == prev_id) {
-
if (preview) {
int loc = (n.x - r.position.x) + (n.y - r.position.y) * r.get_size().x;
- if (bucket_cache_visited[loc])
+ if (bucket_cache_visited[loc]) {
continue;
+ }
bucket_cache_visited[loc] = true;
bucket_cache.push_back(n);
} else {
- if (non_preview_cache.find(n) >= 0)
+ if (non_preview_cache.find(n) >= 0) {
continue;
+ }
points.push_back(n);
non_preview_cache.push_back(n);
}
@@ -712,7 +711,6 @@ Vector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase,
}
void TileMapEditor::_fill_points(const Vector<Vector2> &p_points, const Dictionary &p_op) {
-
int len = p_points.size();
const Vector2 *pr = p_points.ptr();
@@ -725,32 +723,28 @@ void TileMapEditor::_fill_points(const Vector<Vector2> &p_points, const Dictiona
_set_cell(pr[i], ids, xf, yf, tr);
node->make_bitmask_area_dirty(pr[i]);
}
- if (!manual_autotile)
+ if (!manual_autotile) {
node->update_dirty_bitmask();
+ }
}
void TileMapEditor::_erase_points(const Vector<Vector2> &p_points) {
-
int len = p_points.size();
const Vector2 *pr = p_points.ptr();
for (int i = 0; i < len; i++) {
-
_set_cell(pr[i], invalid_cell);
}
}
void TileMapEditor::_select(const Point2i &p_from, const Point2i &p_to) {
-
Point2i begin = p_from;
Point2i end = p_to;
if (begin.x > end.x) {
-
SWAP(begin.x, end.x);
}
if (begin.y > end.y) {
-
SWAP(begin.y, end.y);
}
@@ -761,23 +755,23 @@ void TileMapEditor::_select(const Point2i &p_from, const Point2i &p_to) {
}
void TileMapEditor::_erase_selection() {
- if (!selection_active)
+ if (!selection_active) {
return;
+ }
for (int i = rectangle.position.y; i <= rectangle.position.y + rectangle.size.y; i++) {
for (int j = rectangle.position.x; j <= rectangle.position.x + rectangle.size.x; j++) {
-
_set_cell(Point2i(j, i), invalid_cell, false, false, false);
}
}
}
void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform) {
-
Ref<Texture2D> t = node->get_tileset()->tile_get_texture(p_cell);
- if (t.is_null())
+ if (t.is_null()) {
return;
+ }
Vector2 tile_ofs = node->get_tileset()->tile_get_texture_offset(p_cell);
@@ -814,11 +808,13 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p
if (compatibility_mode_enabled && !centered_texture) {
if (rect.size.y > rect.size.x) {
- if ((p_flip_h && (p_flip_v || p_transpose)) || (p_flip_v && !p_transpose))
+ if ((p_flip_h && (p_flip_v || p_transpose)) || (p_flip_v && !p_transpose)) {
tile_ofs.y += rect.size.y - rect.size.x;
+ }
} else if (rect.size.y < rect.size.x) {
- if ((p_flip_v && (p_flip_h || p_transpose)) || (p_flip_h && !p_transpose))
+ if ((p_flip_v && (p_flip_h || p_transpose)) || (p_flip_h && !p_transpose)) {
tile_ofs.x += rect.size.x - rect.size.y;
+ }
}
}
@@ -844,37 +840,38 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p
if (compatibility_mode_enabled && !centered_texture) {
if (node->get_tile_origin() == TileMap::TILE_ORIGIN_TOP_LEFT) {
-
rect.position += tile_ofs;
} else if (node->get_tile_origin() == TileMap::TILE_ORIGIN_BOTTOM_LEFT) {
-
rect.position += tile_ofs;
if (p_transpose) {
- if (p_flip_h)
+ if (p_flip_h) {
rect.position.x -= cell_size.x;
- else
+ } else {
rect.position.x += cell_size.x;
+ }
} else {
- if (p_flip_v)
+ if (p_flip_v) {
rect.position.y -= cell_size.y;
- else
+ } else {
rect.position.y += cell_size.y;
+ }
}
} else if (node->get_tile_origin() == TileMap::TILE_ORIGIN_CENTER) {
-
rect.position += tile_ofs;
- if (p_flip_h)
+ if (p_flip_h) {
rect.position.x -= cell_size.x / 2;
- else
+ } else {
rect.position.x += cell_size.x / 2;
+ }
- if (p_flip_v)
+ if (p_flip_v) {
rect.position.y -= cell_size.y / 2;
- else
+ } else {
rect.position.y += cell_size.y / 2;
+ }
}
} else {
rect.position += tile_ofs;
@@ -894,7 +891,6 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p
}
void TileMapEditor::_draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform) {
-
Vector<Vector2> points = _bucket_fill(p_point, false, true);
const Vector2 *pr = points.ptr();
int len = points.size();
@@ -912,16 +908,14 @@ void TileMapEditor::_clear_bucket_cache() {
}
void TileMapEditor::_update_copydata() {
-
copydata.clear();
- if (!selection_active)
+ if (!selection_active) {
return;
+ }
for (int i = rectangle.position.y; i <= rectangle.position.y + rectangle.size.y; i++) {
-
for (int j = rectangle.position.x; j <= rectangle.position.x + rectangle.size.x; j++) {
-
TileData tcd;
tcd.cell = node->get_cell(j, i);
@@ -939,7 +933,6 @@ void TileMapEditor::_update_copydata() {
}
static inline Vector<Point2i> line(int x0, int x1, int y0, int y1) {
-
Vector<Point2i> points;
float dx = ABS(x1 - x0);
@@ -983,9 +976,9 @@ static inline Vector<Point2i> line(int x0, int x1, int y0, int y1) {
}
bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
-
- if (!node || !node->get_tileset().is_valid() || !node->is_visible_in_tree() || CanvasItemEditor::get_singleton()->get_current_tool() != CanvasItemEditor::TOOL_SELECT)
+ if (!node || !node->get_tileset().is_valid() || !node->is_visible_in_tree() || CanvasItemEditor::get_singleton()->get_current_tool() != CanvasItemEditor::TOOL_SELECT) {
return false;
+ }
Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform();
Transform2D xform_inv = xform.affine_inverse();
@@ -994,20 +987,18 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (mb.is_valid()) {
if (mb->get_button_index() == BUTTON_LEFT) {
-
if (mb->is_pressed()) {
-
- if (Input::get_singleton()->is_key_pressed(KEY_SPACE))
+ if (Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
return false; // Drag.
+ }
if (tool == TOOL_NONE) {
-
if (mb->get_shift()) {
-
- if (mb->get_command())
+ if (mb->get_command()) {
tool = TOOL_RECTANGLE_PAINT;
- else
+ } else {
tool = TOOL_LINE_PAINT;
+ }
selection_active = false;
rectangle_begin = over_tile;
@@ -1029,20 +1020,16 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
if (tool == TOOL_PAINTING) {
-
Vector<int> ids = get_selected_tiles();
if (ids.size() > 0 && ids[0] != TileMap::INVALID_CELL) {
-
tool = TOOL_PAINTING;
_start_undo(TTR("Paint TileMap"));
}
} else if (tool == TOOL_PICKING) {
-
_pick_tile(over_tile);
} else if (tool == TOOL_SELECTING) {
-
selection_active = true;
rectangle_begin = over_tile;
}
@@ -1053,27 +1040,21 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} else {
// Mousebutton was released.
if (tool != TOOL_NONE) {
-
if (tool == TOOL_PAINTING) {
-
Vector<int> ids = get_selected_tiles();
if (ids.size() > 0 && ids[0] != TileMap::INVALID_CELL) {
-
_set_cell(over_tile, ids, flip_h, flip_v, transpose);
_finish_undo();
paint_undo.clear();
}
} else if (tool == TOOL_LINE_PAINT) {
-
Vector<int> ids = get_selected_tiles();
if (ids.size() > 0 && ids[0] != TileMap::INVALID_CELL) {
-
_start_undo(TTR("Line Draw"));
for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
-
_set_cell(E->key(), ids, flip_h, flip_v, transpose);
}
_finish_undo();
@@ -1083,15 +1064,12 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
CanvasItemEditor::get_singleton()->update_viewport();
}
} else if (tool == TOOL_RECTANGLE_PAINT) {
-
Vector<int> ids = get_selected_tiles();
if (ids.size() > 0 && ids[0] != TileMap::INVALID_CELL) {
-
_start_undo(TTR("Rectangle Paint"));
for (int i = rectangle.position.y; i <= rectangle.position.y + rectangle.size.y; i++) {
for (int j = rectangle.position.x; j <= rectangle.position.x + rectangle.size.x; j++) {
-
_set_cell(Point2i(j, i), ids, flip_h, flip_v, transpose);
}
}
@@ -1100,14 +1078,12 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
CanvasItemEditor::get_singleton()->update_viewport();
}
} else if (tool == TOOL_PASTING) {
-
Point2 ofs = over_tile - rectangle.position;
Vector<int> ids;
_start_undo(TTR("Paste"));
ids.push_back(0);
for (List<TileData>::Element *E = copydata.front(); E; E = E->next()) {
-
ids.write[0] = E->get().cell;
_set_cell(E->get().pos + ofs, ids, E->get().flip_h, E->get().flip_v, E->get().transpose, E->get().autotile_coord);
}
@@ -1117,15 +1093,14 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true; // We want to keep the Pasting tool.
} else if (tool == TOOL_SELECTING) {
-
CanvasItemEditor::get_singleton()->update_viewport();
} else if (tool == TOOL_BUCKET) {
-
Vector<Vector2> points = _bucket_fill(over_tile);
- if (points.size() == 0)
+ if (points.size() == 0) {
return false;
+ }
_start_undo(TTR("Bucket Fill"));
@@ -1153,11 +1128,8 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
}
} else if (mb->get_button_index() == BUTTON_RIGHT) {
-
if (mb->is_pressed()) {
-
if (tool == TOOL_SELECTING || selection_active) {
-
tool = TOOL_NONE;
selection_active = false;
@@ -1168,7 +1140,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
if (tool == TOOL_PASTING) {
-
tool = TOOL_NONE;
copydata.clear();
@@ -1179,7 +1150,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
if (tool == TOOL_NONE) {
-
paint_undo.clear();
Point2 local = node->world_to_map(xform_inv.xform(mb->get_position()));
@@ -1187,15 +1157,15 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
_start_undo(TTR("Erase TileMap"));
if (mb->get_shift()) {
- if (mb->get_command())
+ if (mb->get_command()) {
tool = TOOL_RECTANGLE_ERASE;
- else
+ } else {
tool = TOOL_LINE_ERASE;
+ }
selection_active = false;
rectangle_begin = local;
} else {
-
tool = TOOL_ERASING;
_set_cell(local, invalid_cell);
@@ -1207,7 +1177,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} else {
if (tool == TOOL_ERASING || tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
-
_finish_undo();
if (tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
@@ -1220,7 +1189,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
} else if (tool == TOOL_BUCKET) {
-
Vector<int> ids;
ids.push_back(node->get_cell(over_tile.x, over_tile.y));
Dictionary pop;
@@ -1231,8 +1199,9 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Vector<Vector2> points = _bucket_fill(over_tile, true);
- if (points.size() == 0)
+ if (points.size() == 0) {
return false;
+ }
undo_redo->create_action(TTR("Bucket Fill"));
@@ -1248,12 +1217,10 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
-
Point2i new_over_tile = node->world_to_map(xform_inv.xform(mm->get_position()));
Point2i old_over_tile = over_tile;
if (new_over_tile != over_tile) {
-
over_tile = new_over_tile;
CanvasItemEditor::get_singleton()->update_viewport();
}
@@ -1261,20 +1228,19 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
int tile_under = node->get_cell(over_tile.x, over_tile.y);
String tile_name = "none";
- if (node->get_tileset()->has_tile(tile_under))
+ if (node->get_tileset()->has_tile(tile_under)) {
tile_name = node->get_tileset()->tile_get_name(tile_under);
+ }
tile_info->show();
tile_info->set_text(String::num(over_tile.x) + ", " + String::num(over_tile.y) + " [" + tile_name + "]");
if (tool == TOOL_PAINTING) {
-
// Paint using bresenham line to prevent holes in painting if the user moves fast.
Vector<Point2i> points = line(old_over_tile.x, over_tile.x, old_over_tile.y, over_tile.y);
Vector<int> ids = get_selected_tiles();
for (int i = 0; i < points.size(); ++i) {
-
Point2i pos = points[i];
if (!paint_undo.has(pos)) {
@@ -1288,13 +1254,11 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
if (tool == TOOL_ERASING) {
-
// Erase using bresenham line to prevent holes in painting if the user moves fast.
Vector<Point2i> points = line(old_over_tile.x, over_tile.x, old_over_tile.y, over_tile.y);
for (int i = 0; i < points.size(); ++i) {
-
Point2i pos = points[i];
_set_cell(pos, invalid_cell);
@@ -1304,23 +1268,19 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
if (tool == TOOL_SELECTING) {
-
_select(rectangle_begin, over_tile);
return true;
}
if (tool == TOOL_LINE_PAINT || tool == TOOL_LINE_ERASE) {
-
Vector<int> ids = get_selected_tiles();
Vector<int> tmp_cell;
bool erasing = (tool == TOOL_LINE_ERASE);
tmp_cell.push_back(0);
if (erasing && paint_undo.size()) {
-
for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
-
tmp_cell.write[0] = E->get().idx;
_set_cell(E->key(), tmp_cell, E->get().xf, E->get().yf, E->get().tr);
}
@@ -1329,15 +1289,14 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
paint_undo.clear();
if (ids.size() > 0 && ids[0] != TileMap::INVALID_CELL) {
-
Vector<Point2i> points = line(rectangle_begin.x, over_tile.x, rectangle_begin.y, over_tile.y);
for (int i = 0; i < points.size(); i++) {
-
paint_undo[points[i]] = _get_op_from_cell(points[i]);
- if (erasing)
+ if (erasing) {
_set_cell(points[i], invalid_cell);
+ }
}
CanvasItemEditor::get_singleton()->update_viewport();
@@ -1346,18 +1305,14 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
}
if (tool == TOOL_RECTANGLE_PAINT || tool == TOOL_RECTANGLE_ERASE) {
-
Vector<int> tmp_cell;
tmp_cell.push_back(0);
_select(rectangle_begin, over_tile);
if (tool == TOOL_RECTANGLE_ERASE) {
-
if (paint_undo.size()) {
-
for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
-
tmp_cell.write[0] = E->get().idx;
_set_cell(E->key(), tmp_cell, E->get().xf, E->get().yf, E->get().tr);
}
@@ -1367,7 +1322,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
for (int i = rectangle.position.y; i <= rectangle.position.y + rectangle.size.y; i++) {
for (int j = rectangle.position.x; j <= rectangle.position.x + rectangle.size.x; j++) {
-
Point2i tile = Point2i(j, i);
paint_undo[tile] = _get_op_from_cell(tile);
@@ -1379,7 +1333,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
}
if (tool == TOOL_PICKING && Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT)) {
-
_pick_tile(over_tile);
return true;
@@ -1389,7 +1342,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed()) {
-
if (last_tool == TOOL_NONE && tool == TOOL_PICKING && k->get_keycode() == KEY_SHIFT && k->get_command()) {
// trying to draw a rectangle with the painting tool, so change to the correct tool
tool = last_tool;
@@ -1399,11 +1351,11 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
if (k->get_keycode() == KEY_ESCAPE) {
-
- if (tool == TOOL_PASTING)
+ if (tool == TOOL_PASTING) {
copydata.clear();
- else if (tool == TOOL_SELECTING || selection_active)
+ } else if (tool == TOOL_SELECTING || selection_active) {
selection_active = false;
+ }
tool = TOOL_NONE;
@@ -1518,14 +1470,11 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} else if (k.is_valid()) { // Release event.
if (tool == TOOL_NONE) {
-
if (k->get_keycode() == KEY_SHIFT && k->get_command()) {
-
tool = TOOL_PICKING;
_update_button_tool();
}
} else if (tool == TOOL_PICKING) {
-
#ifdef APPLE_STYLE_KEYS
if (k->get_keycode() == KEY_META) {
#else
@@ -1543,9 +1492,9 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
-
- if (!node || CanvasItemEditor::get_singleton()->get_current_tool() != CanvasItemEditor::TOOL_SELECT)
+ if (!node || CanvasItemEditor::get_singleton()->get_current_tool() != CanvasItemEditor::TOOL_SELECT) {
return;
+ }
Transform2D cell_xf = node->get_cell_transform();
Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform();
@@ -1561,27 +1510,23 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
Rect2i si = aabb.grow(1.0);
if (node->get_half_offset() != TileMap::HALF_OFFSET_X && node->get_half_offset() != TileMap::HALF_OFFSET_NEGATIVE_X) {
-
int max_lines = 2000; //avoid crash if size too small
for (int i = (si.position.x) - 1; i <= (si.position.x + si.size.x); i++) {
-
Vector2 from = xform.xform(node->map_to_world(Vector2(i, si.position.y)));
Vector2 to = xform.xform(node->map_to_world(Vector2(i, si.position.y + si.size.y + 1)));
Color col = i == 0 ? Color(1, 0.8, 0.2, 0.5) : Color(1, 0.3, 0.1, 0.2);
p_overlay->draw_line(from, to, col, 1);
- if (max_lines-- == 0)
+ if (max_lines-- == 0) {
break;
+ }
}
} else {
-
int max_lines = 10000; //avoid crash if size too small
for (int i = (si.position.x) - 1; i <= (si.position.x + si.size.x); i++) {
-
for (int j = (si.position.y) - 1; j <= (si.position.y + si.size.y); j++) {
-
Vector2 ofs;
if (ABS(j) & 1) {
ofs = cell_xf[0] * (node->get_half_offset() == TileMap::HALF_OFFSET_X ? 0.5 : -0.5);
@@ -1593,35 +1538,33 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
Color col = i == 0 ? Color(1, 0.8, 0.2, 0.5) : Color(1, 0.3, 0.1, 0.2);
p_overlay->draw_line(from, to, col, 1);
- if (--max_lines == 0)
+ if (--max_lines == 0) {
break;
+ }
}
- if (max_lines == 0)
+ if (max_lines == 0) {
break;
+ }
}
}
int max_lines = 10000; //avoid crash if size too small
if (node->get_half_offset() != TileMap::HALF_OFFSET_Y && node->get_half_offset() != TileMap::HALF_OFFSET_NEGATIVE_Y) {
-
for (int i = (si.position.y) - 1; i <= (si.position.y + si.size.y); i++) {
-
Vector2 from = xform.xform(node->map_to_world(Vector2(si.position.x, i)));
Vector2 to = xform.xform(node->map_to_world(Vector2(si.position.x + si.size.x + 1, i)));
Color col = i == 0 ? Color(1, 0.8, 0.2, 0.5) : Color(1, 0.3, 0.1, 0.2);
p_overlay->draw_line(from, to, col, 1);
- if (max_lines-- == 0)
+ if (max_lines-- == 0) {
break;
+ }
}
} else {
-
for (int i = (si.position.y) - 1; i <= (si.position.y + si.size.y); i++) {
-
for (int j = (si.position.x) - 1; j <= (si.position.x + si.size.x); j++) {
-
Vector2 ofs;
if (ABS(j) & 1) {
ofs = cell_xf[1] * (node->get_half_offset() == TileMap::HALF_OFFSET_Y ? 0.5 : -0.5);
@@ -1633,17 +1576,18 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
Color col = i == 0 ? Color(1, 0.8, 0.2, 0.5) : Color(1, 0.3, 0.1, 0.2);
p_overlay->draw_line(from, to, col, 1);
- if (--max_lines == 0)
+ if (--max_lines == 0) {
break;
+ }
}
- if (max_lines == 0)
+ if (max_lines == 0) {
break;
+ }
}
}
}
if (selection_active) {
-
Vector<Vector2> points;
points.push_back(xform.xform(node->map_to_world((rectangle.position))));
points.push_back(xform.xform(node->map_to_world((rectangle.position + Point2(rectangle.size.x + 1, 0)))));
@@ -1654,7 +1598,6 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
}
if (mouse_over && node->get_tileset().is_valid()) {
-
Vector2 endpoints[4] = {
node->map_to_world(over_tile, true),
node->map_to_world((over_tile + Point2(1, 0)), true),
@@ -1663,24 +1606,30 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
};
for (int i = 0; i < 4; i++) {
- if (node->get_half_offset() == TileMap::HALF_OFFSET_X && ABS(over_tile.y) & 1)
+ if (node->get_half_offset() == TileMap::HALF_OFFSET_X && ABS(over_tile.y) & 1) {
endpoints[i] += cell_xf[0] * 0.5;
- if (node->get_half_offset() == TileMap::HALF_OFFSET_NEGATIVE_X && ABS(over_tile.y) & 1)
+ }
+ if (node->get_half_offset() == TileMap::HALF_OFFSET_NEGATIVE_X && ABS(over_tile.y) & 1) {
endpoints[i] += cell_xf[0] * -0.5;
- if (node->get_half_offset() == TileMap::HALF_OFFSET_Y && ABS(over_tile.x) & 1)
+ }
+ if (node->get_half_offset() == TileMap::HALF_OFFSET_Y && ABS(over_tile.x) & 1) {
endpoints[i] += cell_xf[1] * 0.5;
- if (node->get_half_offset() == TileMap::HALF_OFFSET_NEGATIVE_Y && ABS(over_tile.x) & 1)
+ }
+ if (node->get_half_offset() == TileMap::HALF_OFFSET_NEGATIVE_Y && ABS(over_tile.x) & 1) {
endpoints[i] += cell_xf[1] * -0.5;
+ }
endpoints[i] = xform.xform(endpoints[i]);
}
Color col;
- if (node->get_cell(over_tile.x, over_tile.y) != TileMap::INVALID_CELL)
+ if (node->get_cell(over_tile.x, over_tile.y) != TileMap::INVALID_CELL) {
col = Color(0.2, 0.8, 1.0, 0.8);
- else
+ } else {
col = Color(1.0, 0.4, 0.2, 0.8);
+ }
- for (int i = 0; i < 4; i++)
+ for (int i = 0; i < 4; i++) {
p_overlay->draw_line(endpoints[i], endpoints[(i + 1) % 4], col, 2);
+ }
bool bucket_preview = EditorSettings::get_singleton()->get("editors/tile_map/bucket_fill_preview");
if (tool == TOOL_SELECTING || tool == TOOL_PICKING || !bucket_preview) {
@@ -1688,49 +1637,49 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
}
if (tool == TOOL_LINE_PAINT) {
-
- if (paint_undo.empty())
+ if (paint_undo.empty()) {
return;
+ }
Vector<int> ids = get_selected_tiles();
- if (ids.size() == 1 && ids[0] == TileMap::INVALID_CELL)
+ if (ids.size() == 1 && ids[0] == TileMap::INVALID_CELL) {
return;
+ }
for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
-
_draw_cell(p_overlay, ids[0], E->key(), flip_h, flip_v, transpose, autotile_coord, xform);
}
} else if (tool == TOOL_RECTANGLE_PAINT) {
-
Vector<int> ids = get_selected_tiles();
- if (ids.size() == 1 && ids[0] == TileMap::INVALID_CELL)
+ if (ids.size() == 1 && ids[0] == TileMap::INVALID_CELL) {
return;
+ }
for (int i = rectangle.position.y; i <= rectangle.position.y + rectangle.size.y; i++) {
for (int j = rectangle.position.x; j <= rectangle.position.x + rectangle.size.x; j++) {
-
_draw_cell(p_overlay, ids[0], Point2i(j, i), flip_h, flip_v, transpose, autotile_coord, xform);
}
}
} else if (tool == TOOL_PASTING) {
-
- if (copydata.empty())
+ if (copydata.empty()) {
return;
+ }
Ref<TileSet> ts = node->get_tileset();
- if (ts.is_null())
+ if (ts.is_null()) {
return;
+ }
Point2 ofs = over_tile - rectangle.position;
for (List<TileData>::Element *E = copydata.front(); E; E = E->next()) {
-
- if (!ts->has_tile(E->get().cell))
+ if (!ts->has_tile(E->get().cell)) {
continue;
+ }
TileData tcd = E->get();
@@ -1749,16 +1698,15 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
p_overlay->draw_colored_polygon(points, Color(0.2, 1.0, 0.8, 0.2));
} else if (tool == TOOL_BUCKET) {
-
Vector<int> tiles = get_selected_tiles();
_draw_fill_preview(p_overlay, tiles[0], over_tile, flip_h, flip_v, transpose, autotile_coord, xform);
} else {
-
Vector<int> st = get_selected_tiles();
- if (st.size() == 1 && st[0] == TileMap::INVALID_CELL)
+ if (st.size() == 1 && st[0] == TileMap::INVALID_CELL) {
return;
+ }
_draw_cell(p_overlay, st[0], over_tile, flip_h, flip_v, transpose, autotile_coord, xform);
}
@@ -1766,44 +1714,47 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
}
void TileMapEditor::edit(Node *p_tile_map) {
-
search_box->set_text("");
if (!canvas_item_editor_viewport) {
canvas_item_editor_viewport = CanvasItemEditor::get_singleton()->get_viewport_control();
}
- if (node)
+ if (node) {
node->disconnect("settings_changed", callable_mp(this, &TileMapEditor::_tileset_settings_changed));
+ }
if (p_tile_map) {
-
node = Object::cast_to<TileMap>(p_tile_map);
- if (!canvas_item_editor_viewport->is_connected("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter)))
+ if (!canvas_item_editor_viewport->is_connected("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter))) {
canvas_item_editor_viewport->connect("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter));
- if (!canvas_item_editor_viewport->is_connected("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit)))
+ }
+ if (!canvas_item_editor_viewport->is_connected("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit))) {
canvas_item_editor_viewport->connect("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit));
+ }
_update_palette();
} else {
node = nullptr;
- if (canvas_item_editor_viewport->is_connected("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter)))
+ if (canvas_item_editor_viewport->is_connected("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter))) {
canvas_item_editor_viewport->disconnect("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter));
- if (canvas_item_editor_viewport->is_connected("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit)))
+ }
+ if (canvas_item_editor_viewport->is_connected("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit))) {
canvas_item_editor_viewport->disconnect("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit));
+ }
_update_palette();
}
- if (node)
+ if (node) {
node->connect("settings_changed", callable_mp(this, &TileMapEditor::_tileset_settings_changed));
+ }
_clear_bucket_cache();
}
void TileMapEditor::_tileset_settings_changed() {
-
_update_palette();
CanvasItemEditor::get_singleton()->update_viewport();
}
@@ -1817,7 +1768,6 @@ void TileMapEditor::_icon_size_changed(float p_value) {
}
void TileMapEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_fill_points"), &TileMapEditor::_fill_points);
ClassDB::bind_method(D_METHOD("_erase_points"), &TileMapEditor::_erase_points);
}
@@ -1826,12 +1776,15 @@ TileMapEditor::CellOp TileMapEditor::_get_op_from_cell(const Point2i &p_pos) {
CellOp op;
op.idx = node->get_cell(p_pos.x, p_pos.y);
if (op.idx != TileMap::INVALID_CELL) {
- if (node->is_cell_x_flipped(p_pos.x, p_pos.y))
+ if (node->is_cell_x_flipped(p_pos.x, p_pos.y)) {
op.xf = true;
- if (node->is_cell_y_flipped(p_pos.x, p_pos.y))
+ }
+ if (node->is_cell_y_flipped(p_pos.x, p_pos.y)) {
op.yf = true;
- if (node->is_cell_transposed(p_pos.x, p_pos.y))
+ }
+ if (node->is_cell_transposed(p_pos.x, p_pos.y)) {
op.tr = true;
+ }
op.ac = node->get_cell_autotile_coord(p_pos.x, p_pos.y);
}
return op;
@@ -1901,7 +1854,6 @@ void TileMapEditor::_clear_transform() {
}
TileMapEditor::TileMapEditor(EditorNode *p_editor) {
-
node = nullptr;
manual_autotile = false;
priority_atlastile = false;
@@ -1976,6 +1928,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
palette->add_theme_constant_override("vseparation", 8 * EDSCALE);
palette->connect("item_selected", callable_mp(this, &TileMapEditor::_palette_selected));
palette->connect("multi_selected", callable_mp(this, &TileMapEditor::_palette_multi_selected));
+ palette->connect("gui_input", callable_mp(this, &TileMapEditor::_palette_input));
palette_container->add_child(palette);
// Add message for when no texture is selected.
@@ -2014,7 +1967,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
toolbar->add_child(paint_button);
bucket_fill_button = memnew(ToolButton);
- bucket_fill_button->set_shortcut(ED_SHORTCUT("tile_map_editor/bucket_fill", TTR("Bucket Fill"), KEY_G));
+ bucket_fill_button->set_shortcut(ED_SHORTCUT("tile_map_editor/bucket_fill", TTR("Bucket Fill"), KEY_B));
bucket_fill_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_BUCKET));
bucket_fill_button->set_toggle_mode(true);
toolbar->add_child(bucket_fill_button);
@@ -2112,9 +2065,7 @@ TileMapEditor::~TileMapEditor() {
///////////////////////////////////////////////////////////////
void TileMapEditorPlugin::_notification(int p_what) {
-
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
-
switch ((int)EditorSettings::get_singleton()->get("editors/tile_map/editor_side")) {
case 0: { // Left.
CanvasItemEditor::get_singleton()->get_palette_split()->move_child(tile_map_editor, 0);
@@ -2127,19 +2078,15 @@ void TileMapEditorPlugin::_notification(int p_what) {
}
void TileMapEditorPlugin::edit(Object *p_object) {
-
tile_map_editor->edit(Object::cast_to<Node>(p_object));
}
bool TileMapEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("TileMap");
}
void TileMapEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
-
tile_map_editor->show();
tile_map_editor->get_toolbar()->show();
tile_map_editor->get_toolbar_right()->show();
@@ -2150,7 +2097,6 @@ void TileMapEditorPlugin::make_visible(bool p_visible) {
// Change to TOOL_SELECT when TileMap node is selected, to prevent accidental movement.
CanvasItemEditor::get_singleton()->set_current_tool(CanvasItemEditor::TOOL_SELECT);
} else {
-
tile_map_editor->hide();
tile_map_editor->get_toolbar()->hide();
tile_map_editor->get_toolbar_right()->hide();
@@ -2160,7 +2106,6 @@ void TileMapEditorPlugin::make_visible(bool p_visible) {
}
TileMapEditorPlugin::TileMapEditorPlugin(EditorNode *p_node) {
-
EDITOR_DEF("editors/tile_map/preview_size", 64);
EDITOR_DEF("editors/tile_map/palette_item_hseparation", 8);
EDITOR_DEF("editors/tile_map/show_tile_names", true);
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h
index f43e5bb5cb..e25e2d2add 100644
--- a/editor/plugins/tile_map_editor_plugin.h
+++ b/editor/plugins/tile_map_editor_plugin.h
@@ -33,7 +33,6 @@
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
-
#include "scene/2d/tile_map.h"
#include "scene/gui/check_box.h"
#include "scene/gui/label.h"
@@ -42,7 +41,6 @@
#include "scene/gui/tool_button.h"
class TileMapEditor : public VBoxContainer {
-
GDCLASS(TileMapEditor, VBoxContainer);
enum Tool {
@@ -127,34 +125,26 @@ class TileMapEditor : public VBoxContainer {
List<Point2i> bucket_queue;
struct CellOp {
- int idx;
- bool xf;
- bool yf;
- bool tr;
+ int idx = TileMap::INVALID_CELL;
+ bool xf = false;
+ bool yf = false;
+ bool tr = false;
Vector2 ac;
- CellOp() :
- idx(TileMap::INVALID_CELL),
- xf(false),
- yf(false),
- tr(false) {}
+ CellOp() {}
};
Map<Point2i, CellOp> paint_undo;
struct TileData {
Point2i pos;
- int cell;
- bool flip_h;
- bool flip_v;
- bool transpose;
+ int cell = TileMap::INVALID_CELL;
+ bool flip_h = false;
+ bool flip_v = false;
+ bool transpose = false;
Point2i autotile_coord;
- TileData() :
- cell(TileMap::INVALID_CELL),
- flip_h(false),
- flip_v(false),
- transpose(false) {}
+ TileData() {}
};
List<TileData> copydata;
@@ -192,6 +182,7 @@ class TileMapEditor : public VBoxContainer {
void _menu_option(int p_option);
void _palette_selected(int index);
void _palette_multi_selected(int index, bool selected);
+ void _palette_input(const Ref<InputEvent> &p_event);
Dictionary _create_cell_dictionary(int tile, bool flip_x, bool flip_y, bool transpose, Vector2 autotile_coord);
void _start_undo(const String &p_action);
@@ -230,7 +221,6 @@ public:
};
class TileMapEditorPlugin : public EditorPlugin {
-
GDCLASS(TileMapEditorPlugin, EditorPlugin);
TileMapEditor *tile_map_editor;
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index b0d325efc1..b3d4b391d3 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -38,7 +38,6 @@
#include "scene/2d/sprite_2d.h"
void TileSetEditor::edit(const Ref<TileSet> &p_tileset) {
-
tileset = p_tileset;
tileset->add_change_receptor(this);
@@ -48,9 +47,7 @@ void TileSetEditor::edit(const Ref<TileSet> &p_tileset) {
}
void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
-
for (int i = 0; i < p_node->get_child_count(); i++) {
-
Node *child = p_node->get_child(i);
if (!Object::cast_to<Sprite2D>(child)) {
@@ -66,12 +63,12 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
Ref<Texture2D> normal_map = mi->get_normal_map();
Ref<ShaderMaterial> material = mi->get_material();
- if (texture.is_null())
+ if (texture.is_null()) {
continue;
+ }
int id = p_library->find_tile_by_name(mi->get_name());
if (id < 0) {
-
id = p_library->get_last_unused_tile_id();
p_library->create_tile(id);
p_library->tile_set_name(id, mi->get_name());
@@ -106,17 +103,19 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
bool found_collisions = false;
for (int j = 0; j < mi->get_child_count(); j++) {
-
Node *child2 = mi->get_child(j);
- if (Object::cast_to<NavigationRegion2D>(child2))
+ if (Object::cast_to<NavigationRegion2D>(child2)) {
nav_poly = Object::cast_to<NavigationRegion2D>(child2)->get_navigation_polygon();
+ }
- if (Object::cast_to<LightOccluder2D>(child2))
+ if (Object::cast_to<LightOccluder2D>(child2)) {
occluder = Object::cast_to<LightOccluder2D>(child2)->get_occluder_polygon();
+ }
- if (!Object::cast_to<StaticBody2D>(child2))
+ if (!Object::cast_to<StaticBody2D>(child2)) {
continue;
+ }
found_collisions = true;
@@ -126,8 +125,9 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
sb->get_shape_owners(&shapes);
for (List<uint32_t>::Element *E = shapes.front(); E; E = E->next()) {
- if (sb->is_shape_owner_disabled(E->get()))
+ if (sb->is_shape_owner_disabled(E->get())) {
continue;
+ }
Transform2D shape_transform = sb->get_transform() * sb->shape_owner_get_transform(E->get());
bool one_way = sb->is_shape_owner_one_way_collision_enabled(E->get());
@@ -135,7 +135,6 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
shape_transform[2] -= phys_offset;
for (int k = 0; k < sb->shape_owner_get_shape_count(E->get()); k++) {
-
Ref<Shape2D> shape = sb->shape_owner_get_shape(E->get(), k);
TileSet::ShapeData shape_data;
shape_data.shape = shape;
@@ -160,38 +159,36 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
}
void TileSetEditor::_import_scene(Node *p_scene, Ref<TileSet> p_library, bool p_merge) {
-
- if (!p_merge)
+ if (!p_merge) {
p_library->clear();
+ }
_import_node(p_scene, p_library);
}
void TileSetEditor::_undo_redo_import_scene(Node *p_scene, bool p_merge) {
-
_import_scene(p_scene, tileset, p_merge);
}
Error TileSetEditor::update_library_file(Node *p_base_scene, Ref<TileSet> ml, bool p_merge) {
-
_import_scene(p_base_scene, ml, p_merge);
return OK;
}
Variant TileSetEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
return false;
}
bool TileSetEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return false;
+ }
- if (d.has("from") && (Object *)(d["from"]) == texture_list)
+ if (d.has("from") && (Object *)(d["from"]) == texture_list) {
return false;
+ }
if (String(d["type"]) == "resource" && d.has("resource")) {
RES r = d["resource"];
@@ -199,17 +196,16 @@ bool TileSetEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_dat
Ref<Texture2D> texture = r;
if (texture.is_valid()) {
-
return true;
}
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
- if (files.size() == 0)
+ if (files.size() == 0) {
return false;
+ }
for (int i = 0; i < files.size(); i++) {
String file = files[i];
@@ -226,22 +222,24 @@ bool TileSetEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_dat
}
void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
- if (!can_drop_data_fw(p_point, p_data, p_from))
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return;
+ }
if (String(d["type"]) == "resource" && d.has("resource")) {
RES r = d["resource"];
Ref<Texture2D> texture = r;
- if (texture.is_valid())
+ if (texture.is_valid()) {
add_texture(texture);
+ }
if (texture_list->get_item_count() > 0) {
update_texture_list_icon();
@@ -251,7 +249,6 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
_on_textures_added(files);
@@ -259,7 +256,6 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C
}
void TileSetEditor::_bind_methods() {
-
ClassDB::bind_method("_undo_redo_import_scene", &TileSetEditor::_undo_redo_import_scene);
ClassDB::bind_method("_on_workspace_process", &TileSetEditor::_on_workspace_process); // Still used by some connect_compat.
ClassDB::bind_method("_set_snap_step", &TileSetEditor::_set_snap_step);
@@ -281,15 +277,12 @@ void TileSetEditor::_bind_methods() {
}
void TileSetEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_READY: {
-
add_theme_constant_override("autohide", 1); // Fixes the dragger always showing up.
} break;
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
-
tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->set_icon(get_theme_icon("ToolAddNode", "EditorIcons"));
tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->set_icon(get_theme_icon("Remove", "EditorIcons"));
tileset_toolbar_tools->set_icon(get_theme_icon("Tools", "EditorIcons"));
@@ -331,7 +324,6 @@ void TileSetEditor::_notification(int p_what) {
}
TileSetEditor::TileSetEditor(EditorNode *p_editor) {
-
editor = p_editor;
undo_redo = EditorNode::get_undo_redo();
current_tile = -1;
@@ -577,6 +569,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
scroll = memnew(ScrollContainer);
main_vb->add_child(scroll);
scroll->set_v_size_flags(SIZE_EXPAND_FILL);
+ scroll->connect("gui_input", callable_mp(this, &TileSetEditor::_on_scroll_container_input));
scroll->set_clip_contents(true);
empty_message = memnew(Label);
@@ -626,7 +619,6 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
ResourceLoader::get_recognized_extensions_for_type("Texture2D", &extensions);
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
-
texture_dialog->add_filter("*." + E->get() + " ; " + E->get().to_upper());
}
add_child(texture_dialog);
@@ -643,8 +635,9 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
}
TileSetEditor::~TileSetEditor() {
- if (helper)
+ if (helper) {
memdelete(helper);
+ }
}
void TileSetEditor::_on_tileset_toolbar_button_pressed(int p_index) {
@@ -663,12 +656,10 @@ void TileSetEditor::_on_tileset_toolbar_button_pressed(int p_index) {
}
} break;
case TOOL_TILESET_CREATE_SCENE: {
-
cd->set_text(TTR("Create from scene? This will overwrite all current tiles."));
cd->popup_centered(Size2(300, 60));
} break;
case TOOL_TILESET_MERGE_SCENE: {
-
cd->set_text(TTR("Merge from scene?"));
cd->popup_centered(Size2(300, 60));
} break;
@@ -696,11 +687,11 @@ void TileSetEditor::_on_tileset_toolbar_confirm() {
} break;
case TOOL_TILESET_MERGE_SCENE:
case TOOL_TILESET_CREATE_SCENE: {
-
EditorNode *en = editor;
Node *scene = en->get_edited_scene();
- if (!scene)
+ if (!scene) {
break;
+ }
List<int> ids;
tileset->get_tile_list(&ids);
@@ -895,9 +886,9 @@ void TileSetEditor::_on_workspace_mode_changed(int p_workspace_mode) {
}
void TileSetEditor::_on_workspace_draw() {
-
- if (tileset.is_null() || !get_current_texture().is_valid())
+ if (tileset.is_null() || !get_current_texture().is_valid()) {
return;
+ }
const Color COLOR_AUTOTILE = Color(0.3, 0.6, 1);
const Color COLOR_SINGLE = Color(1, 1, 0.3);
@@ -1056,12 +1047,13 @@ void TileSetEditor::_on_workspace_draw() {
Rect2i region = tileset->tile_get_region(t_id);
region.position += WORKSPACE_MARGIN;
Color c;
- if (tileset->tile_get_tile_mode(t_id) == TileSet::SINGLE_TILE)
+ if (tileset->tile_get_tile_mode(t_id) == TileSet::SINGLE_TILE) {
c = COLOR_SINGLE;
- else if (tileset->tile_get_tile_mode(t_id) == TileSet::AUTO_TILE)
+ } else if (tileset->tile_get_tile_mode(t_id) == TileSet::AUTO_TILE) {
c = COLOR_AUTOTILE;
- else if (tileset->tile_get_tile_mode(t_id) == TileSet::ATLAS_TILE)
+ } else if (tileset->tile_get_tile_mode(t_id) == TileSet::ATLAS_TILE) {
c = COLOR_ATLAS;
+ }
draw_tile_subdivision(t_id, COLOR_SUBDIVISION);
workspace->draw_rect(region, c, false);
}
@@ -1072,39 +1064,43 @@ void TileSetEditor::_on_workspace_draw() {
if (workspace_mode != WORKSPACE_EDIT) {
Rect2i region = edited_region;
Color c;
- if (workspace_mode == WORKSPACE_CREATE_SINGLE)
+ if (workspace_mode == WORKSPACE_CREATE_SINGLE) {
c = COLOR_SINGLE;
- else if (workspace_mode == WORKSPACE_CREATE_AUTOTILE)
+ } else if (workspace_mode == WORKSPACE_CREATE_AUTOTILE) {
c = COLOR_AUTOTILE;
- else if (workspace_mode == WORKSPACE_CREATE_ATLAS)
+ } else if (workspace_mode == WORKSPACE_CREATE_ATLAS) {
c = COLOR_ATLAS;
+ }
workspace->draw_rect(region, c, false);
draw_edited_region_subdivision();
} else {
int t_id = get_current_tile();
- if (t_id < 0)
+ if (t_id < 0) {
return;
+ }
Rect2i region;
- if (draw_edited_region)
+ if (draw_edited_region) {
region = edited_region;
- else {
+ } else {
region = tileset->tile_get_region(t_id);
region.position += WORKSPACE_MARGIN;
}
- if (draw_edited_region)
+ if (draw_edited_region) {
draw_edited_region_subdivision();
- else
+ } else {
draw_tile_subdivision(t_id, COLOR_SUBDIVISION);
+ }
Color c;
- if (tileset->tile_get_tile_mode(t_id) == TileSet::SINGLE_TILE)
+ if (tileset->tile_get_tile_mode(t_id) == TileSet::SINGLE_TILE) {
c = COLOR_SINGLE;
- else if (tileset->tile_get_tile_mode(t_id) == TileSet::AUTO_TILE)
+ } else if (tileset->tile_get_tile_mode(t_id) == TileSet::AUTO_TILE) {
c = COLOR_AUTOTILE;
- else if (tileset->tile_get_tile_mode(t_id) == TileSet::ATLAS_TILE)
+ } else if (tileset->tile_get_tile_mode(t_id) == TileSet::ATLAS_TILE) {
c = COLOR_ATLAS;
+ }
workspace->draw_rect(region, c, false);
}
}
@@ -1113,7 +1109,6 @@ void TileSetEditor::_on_workspace_draw() {
}
void TileSetEditor::_on_workspace_process() {
-
if (Input::get_singleton()->is_key_pressed(KEY_ALT) || tools[VISIBLE_INFO]->is_pressed()) {
if (!tile_names_visible) {
tile_names_visible = true;
@@ -1126,9 +1121,9 @@ void TileSetEditor::_on_workspace_process() {
}
void TileSetEditor::_on_workspace_overlay_draw() {
-
- if (!tileset.is_valid() || !get_current_texture().is_valid())
+ if (!tileset.is_valid() || !get_current_texture().is_valid()) {
return;
+ }
const Color COLOR_AUTOTILE = Color(0.266373, 0.565288, 0.988281);
const Color COLOR_SINGLE = Color(0.988281, 0.909323, 0.266373);
@@ -1140,19 +1135,21 @@ void TileSetEditor::_on_workspace_overlay_draw() {
tileset->get_tile_list(tiles);
for (List<int>::Element *E = tiles->front(); E; E = E->next()) {
int t_id = E->get();
- if (tileset->tile_get_texture(t_id)->get_rid() != current_texture_rid)
+ if (tileset->tile_get_texture(t_id)->get_rid() != current_texture_rid) {
continue;
+ }
Rect2 region = tileset->tile_get_region(t_id);
region.position += WORKSPACE_MARGIN;
region.position *= workspace->get_scale().x;
Color c;
- if (tileset->tile_get_tile_mode(t_id) == TileSet::SINGLE_TILE)
+ if (tileset->tile_get_tile_mode(t_id) == TileSet::SINGLE_TILE) {
c = COLOR_SINGLE;
- else if (tileset->tile_get_tile_mode(t_id) == TileSet::AUTO_TILE)
+ } else if (tileset->tile_get_tile_mode(t_id) == TileSet::AUTO_TILE) {
c = COLOR_AUTOTILE;
- else if (tileset->tile_get_tile_mode(t_id) == TileSet::ATLAS_TILE)
+ } else if (tileset->tile_get_tile_mode(t_id) == TileSet::ATLAS_TILE) {
c = COLOR_ATLAS;
+ }
String tile_id_name = String::num(t_id, 0) + ": " + tileset->tile_get_name(t_id);
Ref<Font> font = get_theme_font("font", "Label");
region.set_size(font->get_string_size(tile_id_name));
@@ -1165,8 +1162,9 @@ void TileSetEditor::_on_workspace_overlay_draw() {
}
int t_id = get_current_tile();
- if (t_id < 0)
+ if (t_id < 0) {
return;
+ }
Ref<Texture2D> handle = get_theme_icon("EditorHandle", "EditorIcons");
if (draw_handles) {
@@ -1201,10 +1199,31 @@ bool TileSetEditor::is_within_grabbing_distance_of_first_point(const Vector2 &p_
return distance < p_grab_threshold;
}
-void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
+void TileSetEditor::_on_scroll_container_input(const Ref<InputEvent> &p_event) {
+ const Ref<InputEventMouseButton> mb = p_event;
- if (tileset.is_null() || !get_current_texture().is_valid())
+ if (mb.is_valid()) {
+ // Zoom in/out using Ctrl + mouse wheel. This is done on the ScrollContainer
+ // to allow performing this action anywhere, even if the cursor isn't
+ // hovering the texture in the workspace.
+ if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed() && mb->get_control()) {
+ print_line("zooming in");
+ _zoom_in();
+ // Don't scroll up after zooming in.
+ accept_event();
+ } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->get_control()) {
+ print_line("zooming out");
+ _zoom_out();
+ // Don't scroll down after zooming out.
+ accept_event();
+ }
+ }
+}
+
+void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
+ if (tileset.is_null() || !get_current_texture().is_valid()) {
return;
+ }
static bool dragging;
static bool erasing;
@@ -1217,8 +1236,8 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
}
current_tile_region.position += WORKSPACE_MARGIN;
- Ref<InputEventMouseButton> mb = p_ie;
- Ref<InputEventMouseMotion> mm = p_ie;
+ const Ref<InputEventMouseButton> mb = p_ie;
+ const Ref<InputEventMouseMotion> mm = p_ie;
if (mb.is_valid()) {
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && !creating_shape) {
@@ -1242,13 +1261,6 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
delete tiles;
}
}
-
- // Mouse Wheel Event
- if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed() && mb->get_control()) {
- _zoom_in();
- } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->get_control()) {
- _zoom_out();
- }
}
// Drag Middle Mouse
if (mm.is_valid()) {
@@ -1658,7 +1670,6 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
pos = snap_point(pos);
if (creating_shape) {
if (current_shape.size() > 2) {
-
if (is_within_grabbing_distance_of_first_point(mb->get_position(), grab_threshold)) {
close_shape(shape_anchor);
workspace->update();
@@ -1708,7 +1719,6 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
}
} else if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
if (creating_shape) {
-
// if the first two corners are within grabbing distance of one another, expand the rect to fill the tile
if (is_within_grabbing_distance_of_first_point(current_shape[1], grab_threshold)) {
current_shape.set(0, snap_point(shape_anchor));
@@ -1909,8 +1919,9 @@ void TileSetEditor::_on_tool_clicked(int p_tool) {
}
void TileSetEditor::_on_priority_changed(float val) {
- if ((int)val == tileset->autotile_get_subtile_priority(get_current_tile(), edited_shape_coord))
+ if ((int)val == tileset->autotile_get_subtile_priority(get_current_tile(), edited_shape_coord)) {
return;
+ }
undo_redo->create_action(TTR("Edit Tile Priority"));
undo_redo->add_do_method(tileset.ptr(), "autotile_set_subtile_priority", get_current_tile(), edited_shape_coord, (int)val);
@@ -1921,8 +1932,9 @@ void TileSetEditor::_on_priority_changed(float val) {
}
void TileSetEditor::_on_z_index_changed(float val) {
- if ((int)val == tileset->autotile_get_z_index(get_current_tile(), edited_shape_coord))
+ if ((int)val == tileset->autotile_get_z_index(get_current_tile(), edited_shape_coord)) {
return;
+ }
undo_redo->create_action(TTR("Edit Tile Z Index"));
undo_redo->add_do_method(tileset.ptr(), "autotile_set_z_index", get_current_tile(), edited_shape_coord, (int)val);
@@ -1978,8 +1990,9 @@ void TileSetEditor::_set_edited_shape_points(const Vector<Vector2> &points) {
void TileSetEditor::_update_tile_data() {
current_tile_data.clear();
- if (get_current_tile() < 0)
+ if (get_current_tile() < 0) {
return;
+ }
Vector<TileSet::ShapeData> sd = tileset->tile_get_shapes(get_current_tile());
if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
@@ -2323,8 +2336,9 @@ void TileSetEditor::_set_snap_sep(Vector2 p_val) {
}
void TileSetEditor::_validate_current_tile_id() {
- if (get_current_tile() >= 0 && !tileset->has_tile(get_current_tile()))
+ if (get_current_tile() >= 0 && !tileset->has_tile(get_current_tile())) {
set_current_tile(-1);
+ }
}
void TileSetEditor::_select_edited_shape_coord() {
@@ -2388,6 +2402,7 @@ void TileSetEditor::_zoom_in() {
workspace_overlay->set_custom_minimum_size(workspace->get_rect().size * scale);
}
}
+
void TileSetEditor::_zoom_out() {
float scale = workspace->get_scale().x;
if (scale > min_scale) {
@@ -2397,6 +2412,7 @@ void TileSetEditor::_zoom_out() {
workspace_overlay->set_custom_minimum_size(workspace->get_rect().size * scale);
}
}
+
void TileSetEditor::_zoom_reset() {
workspace->set_scale(Vector2(1, 1));
workspace_container->set_custom_minimum_size(workspace->get_rect().size);
@@ -2404,7 +2420,6 @@ void TileSetEditor::_zoom_reset() {
}
void TileSetEditor::draw_highlight_current_tile() {
-
Color shadow_color = Color(0.3, 0.3, 0.3, 0.3);
if ((workspace_mode == WORKSPACE_EDIT && get_current_tile() >= 0) || !edited_region.has_no_area()) {
Rect2 region;
@@ -2415,21 +2430,24 @@ void TileSetEditor::draw_highlight_current_tile() {
region = edited_region;
}
- if (region.position.y >= 0)
+ if (region.position.y >= 0) {
workspace->draw_rect(Rect2(0, 0, workspace->get_rect().size.x, region.position.y), shadow_color);
- if (region.position.x >= 0)
+ }
+ if (region.position.x >= 0) {
workspace->draw_rect(Rect2(0, MAX(0, region.position.y), region.position.x, MIN(workspace->get_rect().size.y - region.position.y, MIN(region.size.y, region.position.y + region.size.y))), shadow_color);
- if (region.position.x + region.size.x <= workspace->get_rect().size.x)
+ }
+ if (region.position.x + region.size.x <= workspace->get_rect().size.x) {
workspace->draw_rect(Rect2(region.position.x + region.size.x, MAX(0, region.position.y), workspace->get_rect().size.x - region.position.x - region.size.x, MIN(workspace->get_rect().size.y - region.position.y, MIN(region.size.y, region.position.y + region.size.y))), shadow_color);
- if (region.position.y + region.size.y <= workspace->get_rect().size.y)
+ }
+ if (region.position.y + region.size.y <= workspace->get_rect().size.y) {
workspace->draw_rect(Rect2(0, region.position.y + region.size.y, workspace->get_rect().size.x, workspace->get_rect().size.y - region.size.y - region.position.y), shadow_color);
+ }
} else {
workspace->draw_rect(Rect2(Point2(0, 0), workspace->get_rect().size), shadow_color);
}
}
void TileSetEditor::draw_highlight_subtile(Vector2 coord, const Vector<Vector2> &other_highlighted) {
-
Color shadow_color = Color(0.3, 0.3, 0.3, 0.3);
Vector2 size = tileset->autotile_get_size(get_current_tile());
int spacing = tileset->autotile_get_spacing(get_current_tile());
@@ -2439,14 +2457,18 @@ void TileSetEditor::draw_highlight_subtile(Vector2 coord, const Vector<Vector2>
coord += region.position;
coord += WORKSPACE_MARGIN;
- if (coord.y >= 0)
+ if (coord.y >= 0) {
workspace->draw_rect(Rect2(0, 0, workspace->get_rect().size.x, coord.y), shadow_color);
- if (coord.x >= 0)
+ }
+ if (coord.x >= 0) {
workspace->draw_rect(Rect2(0, MAX(0, coord.y), coord.x, MIN(workspace->get_rect().size.y - coord.y, MIN(size.y, coord.y + size.y))), shadow_color);
- if (coord.x + size.x <= workspace->get_rect().size.x)
+ }
+ if (coord.x + size.x <= workspace->get_rect().size.x) {
workspace->draw_rect(Rect2(coord.x + size.x, MAX(0, coord.y), workspace->get_rect().size.x - coord.x - size.x, MIN(workspace->get_rect().size.y - coord.y, MIN(size.y, coord.y + size.y))), shadow_color);
- if (coord.y + size.y <= workspace->get_rect().size.y)
+ }
+ if (coord.y + size.y <= workspace->get_rect().size.y) {
workspace->draw_rect(Rect2(0, coord.y + size.y, workspace->get_rect().size.x, workspace->get_rect().size.y - size.y - coord.y), shadow_color);
+ }
coord += Vector2(1, 1) / workspace->get_scale().x;
workspace->draw_rect(Rect2(coord, size - Vector2(2, 2) / workspace->get_scale().x), Color(1, 0, 0), false);
@@ -2579,10 +2601,10 @@ void TileSetEditor::draw_grid_snap() {
}
void TileSetEditor::draw_polygon_shapes() {
-
int t_id = get_current_tile();
- if (t_id < 0)
+ if (t_id < 0) {
return;
+ }
switch (edit_mode) {
case EDITMODE_COLLISION: {
@@ -2638,8 +2660,9 @@ void TileSetEditor::draw_polygon_shapes() {
}
}
- if (polygon.size() < 3)
+ if (polygon.size() < 3) {
continue;
+ }
workspace->draw_polygon(polygon, colors);
@@ -2848,7 +2871,6 @@ void TileSetEditor::draw_polygon_shapes() {
}
void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
-
creating_shape = false;
if (edit_mode == EDITMODE_COLLISION) {
@@ -2861,14 +2883,16 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
for (int i = 0; i < current_shape.size(); i++) {
points.push_back(current_shape[i] - shape_anchor);
- if (i != current_shape.size() - 1)
+ if (i != current_shape.size() - 1) {
p_total += ((current_shape[i + 1].x - current_shape[i].x) * (-current_shape[i + 1].y + (-current_shape[i].y)));
- else
+ } else {
p_total += ((current_shape[0].x - current_shape[i].x) * (-current_shape[0].y + (-current_shape[i].y)));
+ }
}
- if (p_total < 0)
+ if (p_total < 0) {
points.invert();
+ }
shape->set_points(points);
@@ -2883,10 +2907,11 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
}
}
undo_redo->add_do_method(tileset.ptr(), "tile_set_shapes", get_current_tile(), sd);
- if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::AUTO_TILE || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::ATLAS_TILE)
+ if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::AUTO_TILE || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::ATLAS_TILE) {
undo_redo->add_do_method(tileset.ptr(), "tile_add_shape", get_current_tile(), shape, Transform2D(), false, edited_shape_coord);
- else
+ } else {
undo_redo->add_do_method(tileset.ptr(), "tile_add_shape", get_current_tile(), shape, Transform2D());
+ }
tools[TOOL_SELECT]->set_pressed(true);
undo_redo->add_do_method(this, "_select_edited_shape_coord");
undo_redo->add_undo_method(this, "_select_edited_shape_coord");
@@ -2955,17 +2980,21 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
void TileSetEditor::select_coord(const Vector2 &coord) {
_update_tile_data();
current_shape = PackedVector2Array();
- if (get_current_tile() == -1)
+ if (get_current_tile() == -1) {
return;
+ }
Rect2 current_tile_region = tileset->tile_get_region(get_current_tile());
current_tile_region.position += WORKSPACE_MARGIN;
if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
- if (edited_collision_shape != tileset->tile_get_shape(get_current_tile(), 0))
+ if (edited_collision_shape != tileset->tile_get_shape(get_current_tile(), 0)) {
_set_edited_collision_shape(tileset->tile_get_shape(get_current_tile(), 0));
- if (edited_occlusion_shape != tileset->tile_get_light_occluder(get_current_tile()))
+ }
+ if (edited_occlusion_shape != tileset->tile_get_light_occluder(get_current_tile())) {
edited_occlusion_shape = tileset->tile_get_light_occluder(get_current_tile());
- if (edited_navigation_shape != tileset->tile_get_navigation_polygon(get_current_tile()))
+ }
+ if (edited_navigation_shape != tileset->tile_get_navigation_polygon(get_current_tile())) {
edited_navigation_shape = tileset->tile_get_navigation_polygon(get_current_tile());
+ }
if (edit_mode == EDITMODE_COLLISION) {
current_shape.resize(0);
@@ -2997,18 +3026,22 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
bool found_collision_shape = false;
for (int i = 0; i < sd.size(); i++) {
if (sd[i].autotile_coord == coord) {
- if (edited_collision_shape != sd[i].shape)
+ if (edited_collision_shape != sd[i].shape) {
_set_edited_collision_shape(sd[i].shape);
+ }
found_collision_shape = true;
break;
}
}
- if (!found_collision_shape)
+ if (!found_collision_shape) {
_set_edited_collision_shape(Ref<ConvexPolygonShape2D>(nullptr));
- if (edited_occlusion_shape != tileset->autotile_get_light_occluder(get_current_tile(), coord))
+ }
+ if (edited_occlusion_shape != tileset->autotile_get_light_occluder(get_current_tile(), coord)) {
edited_occlusion_shape = tileset->autotile_get_light_occluder(get_current_tile(), coord);
- if (edited_navigation_shape != tileset->autotile_get_navigation_polygon(get_current_tile(), coord))
+ }
+ if (edited_navigation_shape != tileset->autotile_get_navigation_polygon(get_current_tile(), coord)) {
edited_navigation_shape = tileset->autotile_get_navigation_polygon(get_current_tile(), coord);
+ }
int spacing = tileset->autotile_get_spacing(get_current_tile());
Vector2 size = tileset->autotile_get_size(get_current_tile());
@@ -3068,14 +3101,18 @@ Vector2 TileSetEditor::snap_point(const Vector2 &point) {
p.y = Math::snap_scalar_separation(snap_offset.y, snap_step.y, p.y, snap_separation.y);
}
if (tools[SHAPE_KEEP_INSIDE_TILE]->is_pressed()) {
- if (p.x < region.position.x)
+ if (p.x < region.position.x) {
p.x = region.position.x;
- if (p.y < region.position.y)
+ }
+ if (p.y < region.position.y) {
p.y = region.position.y;
- if (p.x > region.position.x + region.size.x)
+ }
+ if (p.x > region.position.x + region.size.x) {
p.x = region.position.x + region.size.x;
- if (p.y > region.position.y + region.size.y)
+ }
+ if (p.y > region.position.y + region.size.y) {
p.y = region.position.y + region.size.y;
+ }
}
return p;
}
@@ -3123,8 +3160,9 @@ void TileSetEditor::update_texture_list() {
if (texture_list->get_item_count() > 0 && selected_texture.is_valid()) {
texture_list->select(texture_list->find_metadata(selected_texture->get_rid()));
- if (texture_list->get_selected_items().size() > 0)
+ if (texture_list->get_selected_items().size() > 0) {
_on_texture_list_selected(texture_list->get_selected_items()[0]);
+ }
} else if (get_current_texture().is_valid()) {
_on_texture_list_selected(texture_list->find_metadata(get_current_texture()->get_rid()));
} else {
@@ -3137,7 +3175,6 @@ void TileSetEditor::update_texture_list() {
}
void TileSetEditor::update_texture_list_icon() {
-
for (int current_idx = 0; current_idx < texture_list->get_item_count(); current_idx++) {
RID rid = texture_list->get_item_metadata(current_idx);
texture_list->set_item_icon(current_idx, texture_map[rid]);
@@ -3148,7 +3185,6 @@ void TileSetEditor::update_texture_list_icon() {
}
void TileSetEditor::update_workspace_tile_mode() {
-
if (!get_current_texture().is_valid()) {
tool_workspacemode[WORKSPACE_EDIT]->set_pressed(true);
workspace_mode = WORKSPACE_EDIT;
@@ -3224,19 +3260,21 @@ void TileSetEditor::update_workspace_tile_mode() {
tool_editmode[EDITMODE_PRIORITY]->hide();
tool_editmode[EDITMODE_Z_INDEX]->hide();
} else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::AUTO_TILE) {
- if (edit_mode == EDITMODE_ICON)
+ if (edit_mode == EDITMODE_ICON) {
select_coord(tileset->autotile_get_icon_coordinate(get_current_tile()));
- else
+ } else {
_select_edited_shape_coord();
+ }
} else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::ATLAS_TILE) {
if (tool_editmode[EDITMODE_PRIORITY]->is_pressed() || tool_editmode[EDITMODE_BITMASK]->is_pressed()) {
tool_editmode[EDITMODE_COLLISION]->set_pressed(true);
edit_mode = EDITMODE_COLLISION;
}
- if (edit_mode == EDITMODE_ICON)
+ if (edit_mode == EDITMODE_ICON) {
select_coord(tileset->autotile_get_icon_coordinate(get_current_tile()));
- else
+ } else {
_select_edited_shape_coord();
+ }
tool_editmode[EDITMODE_BITMASK]->hide();
}
@@ -3309,14 +3347,14 @@ void TileSetEditor::set_current_tile(int p_id) {
}
Ref<Texture2D> TileSetEditor::get_current_texture() {
- if (texture_list->get_selected_items().size() == 0)
+ if (texture_list->get_selected_items().size() == 0) {
return Ref<Texture2D>();
- else
+ } else {
return texture_map[texture_list->get_item_metadata(texture_list->get_selected_items()[0])];
+ }
}
void TilesetEditorContext::set_tileset(const Ref<TileSet> &p_tileset) {
-
tileset = p_tileset;
}
@@ -3326,7 +3364,6 @@ void TilesetEditorContext::set_snap_options_visible(bool p_visible) {
}
bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value) {
-
String name = p_name.operator String();
if (name == "options_offset") {
@@ -3345,8 +3382,9 @@ bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value
String name2 = p_name.operator String().right(5);
bool v = false;
- if (tileset_editor->get_current_tile() < 0 || tileset.is_null())
+ if (tileset_editor->get_current_tile() < 0 || tileset.is_null()) {
return false;
+ }
if (name2 == "autotile_bitmask_mode") {
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/bitmask_mode", p_value, &v);
@@ -3392,7 +3430,6 @@ bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value
}
bool TilesetEditorContext::_get(const StringName &p_name, Variant &r_ret) const {
-
String name = p_name.operator String();
bool v = false;
@@ -3408,10 +3445,12 @@ bool TilesetEditorContext::_get(const StringName &p_name, Variant &r_ret) const
} else if (name.left(5) == "tile_") {
name = name.right(5);
- if (tileset_editor->get_current_tile() < 0 || tileset.is_null())
+ if (tileset_editor->get_current_tile() < 0 || tileset.is_null()) {
return false;
- if (!tileset->has_tile(tileset_editor->get_current_tile()))
+ }
+ if (!tileset->has_tile(tileset_editor->get_current_tile())) {
return false;
+ }
if (name == "autotile_bitmask_mode") {
r_ret = tileset->get(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/bitmask_mode", &v);
@@ -3458,7 +3497,6 @@ bool TilesetEditorContext::_get(const StringName &p_name, Variant &r_ret) const
}
void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const {
-
if (snap_options_visible) {
p_list->push_back(PropertyInfo(Variant::NIL, "Snap Options", PROPERTY_HINT_NONE, "options_", PROPERTY_USAGE_GROUP));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "options_offset"));
@@ -3507,25 +3545,21 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const
}
void TilesetEditorContext::_bind_methods() {
-
ClassDB::bind_method("_hide_script_from_inspector", &TilesetEditorContext::_hide_script_from_inspector);
}
TilesetEditorContext::TilesetEditorContext(TileSetEditor *p_tileset_editor) {
-
tileset_editor = p_tileset_editor;
snap_options_visible = false;
}
void TileSetEditorPlugin::edit(Object *p_node) {
-
if (Object::cast_to<TileSet>(p_node)) {
tileset_editor->edit(Object::cast_to<TileSet>(p_node));
}
}
bool TileSetEditorPlugin::handles(Object *p_node) const {
-
return p_node->is_class("TileSet") || p_node->is_class("TilesetEditorContext");
}
@@ -3542,7 +3576,6 @@ void TileSetEditorPlugin::make_visible(bool p_visible) {
}
Dictionary TileSetEditorPlugin::get_state() const {
-
Dictionary state;
state["snap_offset"] = tileset_editor->snap_offset;
state["snap_step"] = tileset_editor->snap_step;
@@ -3554,7 +3587,6 @@ Dictionary TileSetEditorPlugin::get_state() const {
}
void TileSetEditorPlugin::set_state(const Dictionary &p_state) {
-
Dictionary state = p_state;
if (state.has("snap_step")) {
tileset_editor->_set_snap_step(state["snap_step"]);
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index 53f8e8c4d6..2955dda244 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -41,7 +41,6 @@
class TilesetEditorContext;
class TileSetEditor : public HSplitContainer {
-
friend class TileSetEditorPlugin;
friend class TilesetEditorContext;
@@ -201,6 +200,7 @@ private:
void _on_workspace_overlay_draw();
void _on_workspace_draw();
void _on_workspace_process();
+ void _on_scroll_container_input(const Ref<InputEvent> &p_event);
void _on_workspace_input(const Ref<InputEvent> &p_ie);
void _on_tool_clicked(int p_tool);
void _on_priority_changed(float val);
@@ -252,7 +252,6 @@ private:
};
class TilesetEditorContext : public Object {
-
friend class TileSetEditor;
GDCLASS(TilesetEditorContext, Object);
@@ -278,7 +277,6 @@ public:
};
class TileSetEditorPlugin : public EditorPlugin {
-
GDCLASS(TileSetEditorPlugin, EditorPlugin);
TileSetEditor *tileset_editor;
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index fe8392593b..a1436e123d 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -38,7 +38,6 @@
VersionControlEditorPlugin *VersionControlEditorPlugin::singleton = nullptr;
void VersionControlEditorPlugin::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("popup_vcs_set_up_dialog"), &VersionControlEditorPlugin::popup_vcs_set_up_dialog);
// Used to track the status of files in the staging area
@@ -50,20 +49,16 @@ void VersionControlEditorPlugin::_bind_methods() {
}
void VersionControlEditorPlugin::_selected_a_vcs(int p_id) {
-
List<StringName> available_addons = get_available_vcs_names();
const StringName selected_vcs = set_up_choice->get_item_text(p_id);
}
void VersionControlEditorPlugin::_populate_available_vcs_names() {
-
static bool called = false;
if (!called) {
-
List<StringName> available_addons = get_available_vcs_names();
for (int i = 0; i < available_addons.size(); i++) {
-
set_up_choice->add_item(available_addons[i]);
}
@@ -72,16 +67,13 @@ void VersionControlEditorPlugin::_populate_available_vcs_names() {
}
VersionControlEditorPlugin *VersionControlEditorPlugin::get_singleton() {
-
return singleton ? singleton : memnew(VersionControlEditorPlugin);
}
void VersionControlEditorPlugin::popup_vcs_set_up_dialog(const Control *p_gui_base) {
-
fetch_available_vcs_addon_names();
List<StringName> available_addons = get_available_vcs_names();
if (available_addons.size() >= 1) {
-
Size2 popup_size = Size2(400, 100);
Size2 window_size = p_gui_base->get_viewport_rect().size;
popup_size.x = MIN(window_size.x * 0.5, popup_size.x);
@@ -91,13 +83,11 @@ void VersionControlEditorPlugin::popup_vcs_set_up_dialog(const Control *p_gui_ba
set_up_dialog->popup_centered_clamped(popup_size * EDSCALE);
} else {
-
EditorNode::get_singleton()->show_warning(TTR("No VCS addons are available."), TTR("Error"));
}
}
void VersionControlEditorPlugin::_initialize_vcs() {
-
register_editor();
ERR_FAIL_COND_MSG(EditorVCSInterface::get_singleton(), EditorVCSInterface::get_singleton()->get_vcs_name() + " is already active");
@@ -129,18 +119,14 @@ void VersionControlEditorPlugin::_initialize_vcs() {
}
void VersionControlEditorPlugin::_send_commit_msg() {
-
String msg = commit_message->get_text();
if (msg == "") {
-
commit_status->set_text(TTR("No commit message was provided"));
return;
}
if (EditorVCSInterface::get_singleton()) {
-
if (staged_files_count == 0) {
-
commit_status->set_text(TTR("No files added to stage"));
return;
}
@@ -150,7 +136,6 @@ void VersionControlEditorPlugin::_send_commit_msg() {
commit_message->set_text("");
version_control_dock_button->set_pressed(false);
} else {
-
WARN_PRINT("No VCS addon is initialized. Select a Version Control Addon from Project menu");
}
@@ -160,20 +145,16 @@ void VersionControlEditorPlugin::_send_commit_msg() {
}
void VersionControlEditorPlugin::_refresh_stage_area() {
-
if (EditorVCSInterface::get_singleton()) {
-
staged_files_count = 0;
clear_stage_area();
Dictionary modified_file_paths = EditorVCSInterface::get_singleton()->get_modified_files_data();
String file_path;
for (int i = 0; i < modified_file_paths.size(); i++) {
-
file_path = modified_file_paths.get_key_at_index(i);
TreeItem *found = stage_files->search_item_text(file_path, nullptr, true);
if (!found) {
-
ChangeType change_index = (ChangeType)(int)modified_file_paths.get_value_at_index(i);
String change_text = file_path + " (" + change_type_to_strings[change_index] + ")";
Color &change_color = change_type_to_color[change_index];
@@ -185,24 +166,19 @@ void VersionControlEditorPlugin::_refresh_stage_area() {
new_item->set_checked(0, true);
new_item->set_editable(0, true);
} else {
-
if (found->get_metadata(0) == diff_file_name->get_text()) {
-
_refresh_file_diff();
}
}
commit_status->set_text("New changes detected");
}
} else {
-
WARN_PRINT("No VCS addon is initialized. Select a Version Control Addon from Project menu.");
}
}
void VersionControlEditorPlugin::_stage_selected() {
-
if (!EditorVCSInterface::get_singleton()) {
-
WARN_PRINT("No VCS addon is initialized. Select a Version Control Addon from Project menu");
return;
}
@@ -210,17 +186,13 @@ void VersionControlEditorPlugin::_stage_selected() {
staged_files_count = 0;
TreeItem *root = stage_files->get_root();
if (root) {
-
TreeItem *file_entry = root->get_children();
while (file_entry) {
-
if (file_entry->is_checked(0)) {
-
EditorVCSInterface::get_singleton()->stage_file(file_entry->get_metadata(0));
file_entry->set_icon_modulate(0, EditorNode::get_singleton()->get_gui_base()->get_theme_color("success_color", "Editor"));
staged_files_count++;
} else {
-
EditorVCSInterface::get_singleton()->unstage_file(file_entry->get_metadata(0));
file_entry->set_icon_modulate(0, EditorNode::get_singleton()->get_gui_base()->get_theme_color("error_color", "Editor"));
}
@@ -233,9 +205,7 @@ void VersionControlEditorPlugin::_stage_selected() {
}
void VersionControlEditorPlugin::_stage_all() {
-
if (!EditorVCSInterface::get_singleton()) {
-
WARN_PRINT("No VCS addon is initialized. Select a Version Control Addon from Project menu");
return;
}
@@ -243,10 +213,8 @@ void VersionControlEditorPlugin::_stage_all() {
staged_files_count = 0;
TreeItem *root = stage_files->get_root();
if (root) {
-
TreeItem *file_entry = root->get_children();
while (file_entry) {
-
EditorVCSInterface::get_singleton()->stage_file(file_entry->get_metadata(0));
file_entry->set_icon_modulate(0, EditorNode::get_singleton()->get_gui_base()->get_theme_color("success_color", "Editor"));
file_entry->set_checked(0, true);
@@ -260,7 +228,6 @@ void VersionControlEditorPlugin::_stage_all() {
}
void VersionControlEditorPlugin::_view_file_diff() {
-
version_control_dock_button->set_pressed(true);
String file_path = stage_files->get_selected()->get_metadata(0);
@@ -269,7 +236,6 @@ void VersionControlEditorPlugin::_view_file_diff() {
}
void VersionControlEditorPlugin::_display_file_diff(String p_file_path) {
-
Array diff_content = EditorVCSInterface::get_singleton()->get_file_diff(p_file_path);
diff_file_name->set_text(p_file_path);
@@ -277,17 +243,13 @@ void VersionControlEditorPlugin::_display_file_diff(String p_file_path) {
diff->clear();
diff->push_font(EditorNode::get_singleton()->get_gui_base()->get_theme_font("source", "EditorFonts"));
for (int i = 0; i < diff_content.size(); i++) {
-
Dictionary line_result = diff_content[i];
if (line_result["status"] == "+") {
-
diff->push_color(EditorNode::get_singleton()->get_gui_base()->get_theme_color("success_color", "Editor"));
} else if (line_result["status"] == "-") {
-
diff->push_color(EditorNode::get_singleton()->get_gui_base()->get_theme_color("error_color", "Editor"));
} else {
-
diff->push_color(EditorNode::get_singleton()->get_gui_base()->get_theme_color("font_color", "Label"));
}
@@ -299,42 +261,33 @@ void VersionControlEditorPlugin::_display_file_diff(String p_file_path) {
}
void VersionControlEditorPlugin::_refresh_file_diff() {
-
String open_file = diff_file_name->get_text();
if (open_file != "") {
-
_display_file_diff(diff_file_name->get_text());
}
}
void VersionControlEditorPlugin::_clear_file_diff() {
-
diff->clear();
diff_file_name->set_text("");
version_control_dock_button->set_pressed(false);
}
void VersionControlEditorPlugin::_update_stage_status() {
-
String status;
if (staged_files_count == 1) {
-
status = "Stage contains 1 file";
} else {
-
status = "Stage contains " + String::num_int64(staged_files_count) + " files";
}
commit_status->set_text(status);
}
void VersionControlEditorPlugin::_update_commit_status() {
-
String status;
if (staged_files_count == 1) {
-
status = "Committed 1 file";
} else {
-
status = "Committed " + String::num_int64(staged_files_count) + " files ";
}
commit_status->set_text(status);
@@ -342,9 +295,7 @@ void VersionControlEditorPlugin::_update_commit_status() {
}
void VersionControlEditorPlugin::register_editor() {
-
if (!EditorVCSInterface::get_singleton()) {
-
EditorNode::get_singleton()->add_control_to_dock(EditorNode::DOCK_SLOT_RIGHT_UL, version_commit_dock);
TabContainer *dock_vbc = (TabContainer *)version_commit_dock->get_parent_control();
dock_vbc->set_tab_title(version_commit_dock->get_index(), TTR("Commit"));
@@ -355,30 +306,25 @@ void VersionControlEditorPlugin::register_editor() {
}
void VersionControlEditorPlugin::fetch_available_vcs_addon_names() {
-
List<StringName> global_classes;
ScriptServer::get_global_class_list(&global_classes);
for (int i = 0; i != global_classes.size(); i++) {
-
String path = ScriptServer::get_global_class_path(global_classes[i]);
Ref<Script> script = ResourceLoader::load(path);
ERR_FAIL_COND(script.is_null());
if (script->get_instance_base_type() == "EditorVCSInterface") {
-
available_addons.push_back(global_classes[i]);
}
}
}
void VersionControlEditorPlugin::clear_stage_area() {
-
stage_files->get_root()->clear_children();
}
void VersionControlEditorPlugin::shut_down() {
-
if (EditorVCSInterface::get_singleton()) {
if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area))) {
EditorFileSystem::get_singleton()->disconnect("filesystem_changed", callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
@@ -393,17 +339,14 @@ void VersionControlEditorPlugin::shut_down() {
}
bool VersionControlEditorPlugin::is_vcs_initialized() const {
-
return EditorVCSInterface::get_singleton() ? EditorVCSInterface::get_singleton()->is_vcs_initialized() : false;
}
const String VersionControlEditorPlugin::get_vcs_name() const {
-
return EditorVCSInterface::get_singleton() ? EditorVCSInterface::get_singleton()->get_vcs_name() : "";
}
VersionControlEditorPlugin::VersionControlEditorPlugin() {
-
singleton = this;
staged_files_count = 0;
@@ -570,7 +513,6 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
}
VersionControlEditorPlugin::~VersionControlEditorPlugin() {
-
shut_down();
memdelete(version_control_dock);
memdelete(version_commit_dock);
diff --git a/editor/plugins/version_control_editor_plugin.h b/editor/plugins/version_control_editor_plugin.h
index 4a98c8580e..664e38d65f 100644
--- a/editor/plugins/version_control_editor_plugin.h
+++ b/editor/plugins/version_control_editor_plugin.h
@@ -39,7 +39,6 @@
#include "scene/gui/tree.h"
class VersionControlEditorPlugin : public EditorPlugin {
-
GDCLASS(VersionControlEditorPlugin, EditorPlugin)
public:
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 07251ad7ad..92bdba93e7 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -48,7 +48,6 @@
#include "servers/rendering/shader_types.h"
Control *VisualShaderNodePlugin::create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) {
-
if (get_script_instance()) {
return get_script_instance()->call("create_editor", p_parent_resource, p_node);
}
@@ -56,14 +55,12 @@ Control *VisualShaderNodePlugin::create_editor(const Ref<Resource> &p_parent_res
}
void VisualShaderNodePlugin::_bind_methods() {
-
BIND_VMETHOD(MethodInfo(Variant::OBJECT, "create_editor", PropertyInfo(Variant::OBJECT, "parent_resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::OBJECT, "for_node", PROPERTY_HINT_RESOURCE_TYPE, "VisualShaderNode")));
}
///////////////////
void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
-
bool changed = false;
if (p_visual_shader) {
if (visual_shader.is_null()) {
@@ -106,8 +103,9 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
}
void VisualShaderEditor::add_plugin(const Ref<VisualShaderNodePlugin> &p_plugin) {
- if (plugins.find(p_plugin) != -1)
+ if (plugins.find(p_plugin) != -1) {
return;
+ }
plugins.push_back(p_plugin);
}
@@ -125,14 +123,14 @@ void VisualShaderEditor::clear_custom_types() {
}
void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend) {
-
ERR_FAIL_COND(!p_name.is_valid_identifier());
ERR_FAIL_COND(!p_script.is_valid());
for (int i = 0; i < add_options.size(); i++) {
if (add_options[i].is_custom) {
- if (add_options[i].script == p_script)
+ if (add_options[i].script == p_script) {
return;
+ }
}
}
@@ -166,11 +164,9 @@ void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script>
}
bool VisualShaderEditor::_is_available(int p_mode) {
-
int current_mode = edit_type->get_selected();
if (p_mode != -1) {
-
switch (current_mode) {
case VisualShader::TYPE_VERTEX:
current_mode = 1;
@@ -215,7 +211,6 @@ void VisualShaderEditor::update_custom_nodes() {
Dictionary added;
for (int i = 0; i < class_list.size(); i++) {
if (ScriptServer::get_global_class_native_base(class_list[i]) == "VisualShaderNodeCustom") {
-
String script_path = ScriptServer::get_global_class_path(class_list[i]);
Ref<Resource> res = ResourceLoader::load(script_path);
ERR_FAIL_COND(res.is_null());
@@ -285,7 +280,6 @@ void VisualShaderEditor::update_custom_nodes() {
keys.sort();
for (int i = 0; i < keys.size(); i++) {
-
const Variant &key = keys.get(i);
const Dictionary &value = (Dictionary)added[key];
@@ -301,7 +295,6 @@ String VisualShaderEditor::_get_description(int p_idx) {
}
void VisualShaderEditor::_update_options_menu() {
-
node_desc->set_text("");
members_dialog->get_ok()->set_disabled(true);
@@ -374,10 +367,11 @@ void VisualShaderEditor::_update_options_menu() {
}
TreeItem *item = members->create_item(category);
- if (options[i].highend && low_driver)
+ if (options[i].highend && low_driver) {
item->set_custom_color(0, unsupported_color);
- else if (options[i].highend)
+ } else if (options[i].highend) {
item->set_custom_color(0, supported_color);
+ }
item->set_text(0, options[i].name);
if (is_first_item && use_filter) {
item->select(0);
@@ -411,15 +405,14 @@ void VisualShaderEditor::_update_options_menu() {
}
Size2 VisualShaderEditor::get_minimum_size() const {
-
return Size2(10, 200);
}
void VisualShaderEditor::_draw_color_over_button(Object *obj, Color p_color) {
-
Button *button = Object::cast_to<Button>(obj);
- if (!button)
+ if (!button) {
return;
+ }
Ref<StyleBox> normal = get_theme_stylebox("normal", "Button");
button->draw_rect(Rect2(normal->get_offset(), button->get_size() - normal->get_minimum_size()), p_color);
@@ -435,7 +428,6 @@ static Ref<StyleBoxEmpty> make_empty_stylebox(float p_margin_left = -1, float p_
}
void VisualShaderEditor::_update_created_node(GraphNode *node) {
-
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
Ref<StyleBoxFlat> sb = node->get_theme_stylebox("frame", "GraphNode");
Color c = sb->get_border_color();
@@ -459,12 +451,13 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) {
}
void VisualShaderEditor::_update_graph() {
-
- if (updating)
+ if (updating) {
return;
+ }
- if (visual_shader.is_null())
+ if (visual_shader.is_null()) {
return;
+ }
graph->set_scroll_ofs(visual_shader->get_graph_offset() * EDSCALE);
@@ -472,7 +465,6 @@ void VisualShaderEditor::_update_graph() {
graph->clear_connections();
//erase all nodes
for (int i = 0; i < graph->get_child_count(); i++) {
-
if (Object::cast_to<GraphNode>(graph->get_child(i))) {
Node *node = graph->get_child(i);
graph->remove_child(node);
@@ -500,7 +492,6 @@ void VisualShaderEditor::_update_graph() {
Control *offset;
for (int n_i = 0; n_i < nodes.size(); n_i++) {
-
Vector2 position = visual_shader->get_node_position(type, nodes[n_i]);
Ref<VisualShaderNode> vsnode = visual_shader->get_node(type, nodes[n_i]);
@@ -592,7 +583,6 @@ void VisualShaderEditor::_update_graph() {
if (custom_editor && !float_uniform.is_valid() && !int_uniform.is_valid() && !vec3_uniform.is_valid() && !bool_uniform.is_valid() && !transform_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) {
//will be embedded in first port
} else if (custom_editor) {
-
port_offset++;
node->add_child(custom_editor);
if (color_uniform.is_valid()) {
@@ -606,7 +596,6 @@ void VisualShaderEditor::_update_graph() {
}
if (is_group) {
-
offset = memnew(Control);
offset->set_custom_minimum_size(Size2(0, 6 * EDSCALE));
node->add_child(offset);
@@ -631,7 +620,6 @@ void VisualShaderEditor::_update_graph() {
}
for (int i = 0; i < MAX(vsnode->get_input_port_count(), vsnode->get_output_port_count()); i++) {
-
if (vsnode->is_port_separator(i)) {
node->add_child(memnew(HSeparator));
port_offset++;
@@ -674,7 +662,6 @@ void VisualShaderEditor::_update_graph() {
button->connect("pressed", callable_mp(this, &VisualShaderEditor::_edit_port_default_input), varray(button, nodes[n_i], i));
switch (default_value.get_type()) {
-
case Variant::COLOR: {
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
button->connect("draw", callable_mp(this, &VisualShaderEditor::_draw_color_over_button), varray(button, default_value));
@@ -699,9 +686,7 @@ void VisualShaderEditor::_update_graph() {
hb->add_child(custom_editor);
custom_editor->set_h_size_flags(SIZE_EXPAND_FILL);
} else {
-
if (valid_left) {
-
if (is_group) {
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
@@ -729,14 +714,12 @@ void VisualShaderEditor::_update_graph() {
remove_btn->connect("pressed", callable_mp(this, &VisualShaderEditor::_remove_input_port), varray(nodes[n_i], i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
} else {
-
Label *label = memnew(Label);
label->set_text(name_left);
label->add_theme_style_override("normal", label_style); //more compact
hb->add_child(label);
if (vsnode->get_input_port_default_hint(i) != "" && !port_left_used) {
-
Label *hint_label = memnew(Label);
hint_label->set_text("[" + vsnode->get_input_port_default_hint(i) + "]");
hint_label->add_theme_color_override("font_color", get_theme_color("font_color_readonly", "TextEdit"));
@@ -840,7 +823,6 @@ void VisualShaderEditor::_update_graph() {
}
if (is_expression) {
-
TextEdit *expression_box = memnew(TextEdit);
expression_node->set_control(expression_box, 0);
node->add_child(expression_box);
@@ -855,7 +837,6 @@ void VisualShaderEditor::_update_graph() {
expression_box->add_theme_color_override("background_color", background_color);
for (List<String>::Element *E = keyword_list.front(); E; E = E->next()) {
-
expression_box->add_keyword_color(E->get(), keyword_color);
}
@@ -875,13 +856,13 @@ void VisualShaderEditor::_update_graph() {
if (!uniform.is_valid()) {
graph->add_child(node);
_update_created_node(node);
- if (is_group)
+ if (is_group) {
call_deferred("_set_node_size", (int)type, nodes[n_i], size);
+ }
}
}
for (List<VisualShader::Connection>::Element *E = connections.front(); E; E = E->next()) {
-
int from = E->get().from_node;
int from_idx = E->get().from_port;
int to = E->get().to_node;
@@ -892,7 +873,6 @@ void VisualShaderEditor::_update_graph() {
}
void VisualShaderEditor::_add_input_port(int p_node, int p_port, int p_port_type, const String &p_name) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeExpression> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -910,7 +890,6 @@ void VisualShaderEditor::_add_input_port(int p_node, int p_port, int p_port_type
}
void VisualShaderEditor::_add_output_port(int p_node, int p_port, int p_port_type, const String &p_name) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -928,7 +907,6 @@ void VisualShaderEditor::_add_output_port(int p_node, int p_port, int p_port_typ
}
void VisualShaderEditor::_change_input_port_type(int p_type, int p_node, int p_port) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -946,7 +924,6 @@ void VisualShaderEditor::_change_input_port_type(int p_type, int p_node, int p_p
}
void VisualShaderEditor::_change_output_port_type(int p_type, int p_node, int p_port) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -964,7 +941,6 @@ void VisualShaderEditor::_change_output_port_type(int p_type, int p_node, int p_
}
void VisualShaderEditor::_change_input_port_name(const String &p_text, Object *line_edit, int p_node_id, int p_port_id) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node_id);
@@ -979,7 +955,6 @@ void VisualShaderEditor::_change_input_port_name(const String &p_text, Object *l
}
void VisualShaderEditor::_change_output_port_name(const String &p_text, Object *line_edit, int p_node_id, int p_port_id) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node_id);
@@ -994,7 +969,6 @@ void VisualShaderEditor::_change_output_port_name(const String &p_text, Object *
}
void VisualShaderEditor::_remove_input_port(int p_node, int p_port) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -1006,7 +980,6 @@ void VisualShaderEditor::_remove_input_port(int p_node, int p_port) {
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
for (List<VisualShader::Connection>::Element *E = conns.front(); E; E = E->next()) {
-
int from_node = E->get().from_node;
int from_port = E->get().from_port;
int to_node = E->get().to_node;
@@ -1039,7 +1012,6 @@ void VisualShaderEditor::_remove_input_port(int p_node, int p_port) {
}
void VisualShaderEditor::_remove_output_port(int p_node, int p_port) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -1051,7 +1023,6 @@ void VisualShaderEditor::_remove_output_port(int p_node, int p_port) {
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
for (List<VisualShader::Connection>::Element *E = conns.front(); E; E = E->next()) {
-
int from_node = E->get().from_node;
int from_port = E->get().from_port;
int to_node = E->get().to_node;
@@ -1084,7 +1055,6 @@ void VisualShaderEditor::_remove_output_port(int p_node, int p_port) {
}
void VisualShaderEditor::_expression_focus_out(Object *text_edit, int p_node) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeExpression> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -1093,8 +1063,9 @@ void VisualShaderEditor::_expression_focus_out(Object *text_edit, int p_node) {
TextEdit *expression_box = Object::cast_to<TextEdit>(text_edit);
- if (node->get_expression() == expression_box->get_text())
+ if (node->get_expression() == expression_box->get_text()) {
return;
+ }
undo_redo->create_action(TTR("Set expression"));
undo_redo->add_do_method(node.ptr(), "set_expression", expression_box->get_text());
@@ -1112,7 +1083,6 @@ void VisualShaderEditor::_rebuild() {
}
void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p_size) {
-
VisualShader::Type type = VisualShader::Type(p_type);
Ref<VisualShaderNode> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -1133,8 +1103,9 @@ void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p
if (edit_type->get_selected() == p_type) { // check - otherwise the error will be emitted
Node *node2 = graph->get_node(itos(p_node));
gn = Object::cast_to<GraphNode>(node2);
- if (!gn)
+ if (!gn) {
return;
+ }
gn->set_custom_minimum_size(size);
gn->set_size(Size2(1, 1));
@@ -1159,7 +1130,6 @@ void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p
}
void VisualShaderEditor::_node_resized(const Vector2 &p_new_size, int p_type, int p_node) {
-
VisualShader::Type type = VisualShader::Type(p_type);
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -1173,7 +1143,6 @@ void VisualShaderEditor::_node_resized(const Vector2 &p_new_size, int p_type, in
}
void VisualShaderEditor::_preview_select_port(int p_node, int p_port) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNode> node = visual_shader->get_node(type, p_node);
if (node.is_null()) {
@@ -1192,7 +1161,6 @@ void VisualShaderEditor::_preview_select_port(int p_node, int p_port) {
}
void VisualShaderEditor::_line_edit_changed(const String &p_text, Object *line_edit, int p_node_id) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeUniform> node = visual_shader->get_node(type, p_node_id);
@@ -1213,13 +1181,11 @@ void VisualShaderEditor::_line_edit_changed(const String &p_text, Object *line_e
}
void VisualShaderEditor::_line_edit_focus_out(Object *line_edit, int p_node_id) {
-
String text = Object::cast_to<LineEdit>(line_edit)->get_text();
_line_edit_changed(text, line_edit, p_node_id);
}
void VisualShaderEditor::_port_name_focus_out(Object *line_edit, int p_node_id, int p_port_id, bool p_output) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNodeGroupBase> node = visual_shader->get_node(type, p_node_id);
@@ -1228,24 +1194,28 @@ void VisualShaderEditor::_port_name_focus_out(Object *line_edit, int p_node_id,
String text = Object::cast_to<LineEdit>(line_edit)->get_text();
if (!p_output) {
- if (node->get_input_port_name(p_port_id) == text)
+ if (node->get_input_port_name(p_port_id) == text) {
return;
+ }
} else {
- if (node->get_output_port_name(p_port_id) == text)
+ if (node->get_output_port_name(p_port_id) == text) {
return;
+ }
}
List<String> input_names;
List<String> output_names;
for (int i = 0; i < node->get_input_port_count(); i++) {
- if (!p_output && i == p_port_id)
+ if (!p_output && i == p_port_id) {
continue;
+ }
input_names.push_back(node->get_input_port_name(i));
}
for (int i = 0; i < node->get_output_port_count(); i++) {
- if (p_output && i == p_port_id)
+ if (p_output && i == p_port_id) {
continue;
+ }
output_names.push_back(node->get_output_port_name(i));
}
@@ -1267,7 +1237,6 @@ void VisualShaderEditor::_port_name_focus_out(Object *line_edit, int p_node_id,
}
void VisualShaderEditor::_port_edited() {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Variant value = property_editor->get_variant();
@@ -1285,7 +1254,6 @@ void VisualShaderEditor::_port_edited() {
}
void VisualShaderEditor::_edit_port_default_input(Object *p_button, int p_node, int p_port) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNode> vsn = visual_shader->get_node(type, p_node);
@@ -1301,7 +1269,6 @@ void VisualShaderEditor::_edit_port_default_input(Object *p_button, int p_node,
}
void VisualShaderEditor::_add_custom_node(const String &p_path) {
-
int idx = -1;
for (int i = custom_node_option_idx; i < add_options.size(); i++) {
@@ -1323,7 +1290,6 @@ void VisualShaderEditor::_add_texture_node(const String &p_path) {
}
VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
-
ERR_FAIL_INDEX_V(p_idx, add_options.size(), nullptr);
Ref<VisualShaderNode> vsnode;
@@ -1337,12 +1303,12 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
VisualShaderNodeFloatConstant *constant = Object::cast_to<VisualShaderNodeFloatConstant>(vsn);
if (constant) {
- if ((int)add_options[p_idx].value != -1)
+ if ((int)add_options[p_idx].value != -1) {
constant->set_constant(add_options[p_idx].value);
+ }
}
if (p_op_idx != -1) {
-
VisualShaderNodeInput *input = Object::cast_to<VisualShaderNodeInput>(vsn);
if (input) {
@@ -1463,7 +1429,6 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
if (to_node != -1 && to_slot != -1) {
if (vsnode->get_output_port_count() > 0) {
-
int _from_node = id_to_use;
int _from_slot = 0;
@@ -1474,7 +1439,6 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
}
} else if (from_node != -1 && from_slot != -1) {
if (vsnode->get_input_port_count() > 0) {
-
int _to_node = id_to_use;
int _to_slot = 0;
@@ -1492,7 +1456,6 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
}
void VisualShaderEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_to, int p_node) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
updating = true;
@@ -1506,7 +1469,6 @@ void VisualShaderEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_t
}
void VisualShaderEditor::_connection_request(const String &p_from, int p_from_index, const String &p_to, int p_to_index) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
int from = p_from.to_int();
@@ -1536,7 +1498,6 @@ void VisualShaderEditor::_connection_request(const String &p_from, int p_from_in
}
void VisualShaderEditor::_disconnection_request(const String &p_from, int p_from_index, const String &p_to, int p_to_index) {
-
graph->disconnect_node(p_from, p_from_index, p_to, p_to_index);
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
@@ -1567,7 +1528,6 @@ void VisualShaderEditor::_connection_from_empty(const String &p_to, int p_to_slo
}
void VisualShaderEditor::_delete_request(int which) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
Ref<VisualShaderNode> node = Ref<VisualShaderNode>(visual_shader->get_node(type, which));
@@ -1607,7 +1567,6 @@ void VisualShaderEditor::_delete_request(int which) {
}
void VisualShaderEditor::_node_selected(Object *p_node) {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
GraphNode *gn = Object::cast_to<GraphNode>(p_node);
@@ -1623,7 +1582,6 @@ void VisualShaderEditor::_node_selected(Object *p_node) {
}
void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) {
-
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) {
@@ -1652,7 +1610,6 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) {
}
void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos) {
-
if (at_mouse_pos) {
saved_node_pos_dirty = true;
saved_node_pos = graph->get_local_mouse_position();
@@ -1688,7 +1645,6 @@ void VisualShaderEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
ie->get_keycode() == KEY_DOWN ||
ie->get_keycode() == KEY_ENTER ||
ie->get_keycode() == KEY_KP_ENTER)) {
-
members->call("_gui_input", ie);
node_filter->accept_event();
}
@@ -1696,7 +1652,6 @@ void VisualShaderEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
void VisualShaderEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
-
node_filter->set_clear_button_enabled(true);
// collapse tree by default
@@ -1723,7 +1678,6 @@ void VisualShaderEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
-
highend_label->set_modulate(get_theme_color("vulkan_color", "Editor"));
error_panel->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree"));
@@ -1743,7 +1697,6 @@ void VisualShaderEditor::_notification(int p_what) {
preview_text->add_theme_color_override("background_color", background_color);
for (List<String>::Element *E = keyword_list.front(); E; E = E->next()) {
-
preview_text->add_keyword_color(E->get(), keyword_color);
}
@@ -1759,22 +1712,25 @@ void VisualShaderEditor::_notification(int p_what) {
tools->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("Tools", "EditorIcons"));
- if (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree())
+ if (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree()) {
_update_graph();
+ }
}
}
void VisualShaderEditor::_scroll_changed(const Vector2 &p_scroll) {
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
visual_shader->set_graph_offset(p_scroll / EDSCALE);
updating = false;
}
void VisualShaderEditor::_node_changed(int p_id) {
- if (updating)
+ if (updating) {
return;
+ }
if (is_visible_in_tree()) {
_update_graph();
@@ -1786,7 +1742,6 @@ void VisualShaderEditor::_dup_update_excluded(int p_type, Set<int> &r_excluded)
VisualShader::Type type = (VisualShader::Type)p_type;
for (int i = 0; i < graph->get_child_count(); i++) {
-
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
int id = String(gn->get_name()).to_int();
@@ -1802,14 +1757,12 @@ void VisualShaderEditor::_dup_update_excluded(int p_type, Set<int> &r_excluded)
}
void VisualShaderEditor::_dup_copy_nodes(int p_type, List<int> &r_nodes, Set<int> &r_excluded) {
-
VisualShader::Type type = (VisualShader::Type)p_type;
selection_center.x = 0.0f;
selection_center.y = 0.0f;
for (int i = 0; i < graph->get_child_count(); i++) {
-
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
int id = String(gn->get_name()).to_int();
@@ -1832,7 +1785,6 @@ void VisualShaderEditor::_dup_copy_nodes(int p_type, List<int> &r_nodes, Set<int
}
void VisualShaderEditor::_dup_paste_nodes(int p_type, int p_pasted_type, List<int> &r_nodes, Set<int> &r_excluded, const Vector2 &p_offset, bool p_select) {
-
VisualShader::Type type = (VisualShader::Type)p_type;
VisualShader::Type pasted_type = (VisualShader::Type)p_pasted_type;
@@ -1842,7 +1794,6 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, int p_pasted_type, List<in
Set<int> unsupported_set;
for (List<int>::Element *E = r_nodes.front(); E; E = E->next()) {
-
connection_remap[E->get()] = id_from;
Ref<VisualShaderNode> node = visual_shader->get_node(pasted_type, E->get());
@@ -1900,7 +1851,6 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, int p_pasted_type, List<in
if (p_select) {
// reselect duplicated nodes by excluding the other ones
for (int i = 0; i < graph->get_child_count(); i++) {
-
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
int id = String(gn->get_name()).to_int();
@@ -1915,13 +1865,11 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, int p_pasted_type, List<in
}
void VisualShaderEditor::_clear_buffer() {
-
copy_nodes_buffer.clear();
copy_nodes_excluded_buffer.clear();
}
void VisualShaderEditor::_duplicate_nodes() {
-
int type = edit_type->get_selected();
List<int> nodes;
@@ -1929,8 +1877,9 @@ void VisualShaderEditor::_duplicate_nodes() {
_dup_copy_nodes(type, nodes, excluded);
- if (nodes.empty())
+ if (nodes.empty()) {
return;
+ }
undo_redo->create_action(TTR("Duplicate Nodes"));
@@ -1938,7 +1887,6 @@ void VisualShaderEditor::_duplicate_nodes() {
}
void VisualShaderEditor::_copy_nodes() {
-
copy_type = edit_type->get_selected();
_clear_buffer();
@@ -1947,9 +1895,9 @@ void VisualShaderEditor::_copy_nodes() {
}
void VisualShaderEditor::_paste_nodes(bool p_use_custom_position, const Vector2 &p_custom_position) {
-
- if (copy_nodes_buffer.empty())
+ if (copy_nodes_buffer.empty()) {
return;
+ }
int type = edit_type->get_selected();
@@ -1970,7 +1918,6 @@ void VisualShaderEditor::_paste_nodes(bool p_use_custom_position, const Vector2
}
void VisualShaderEditor::_delete_nodes() {
-
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
List<int> to_erase;
@@ -1983,13 +1930,13 @@ void VisualShaderEditor::_delete_nodes() {
}
}
- if (to_erase.empty())
+ if (to_erase.empty()) {
return;
+ }
undo_redo->create_action(TTR("Delete Nodes"));
for (List<int>::Element *F = to_erase.front(); F; F = F->next()) {
-
Ref<VisualShaderNode> node = visual_shader->get_node(type, F->get());
undo_redo->add_do_method(visual_shader.ptr(), "remove_node", type, F->get());
@@ -2020,7 +1967,6 @@ void VisualShaderEditor::_delete_nodes() {
for (List<int>::Element *F = to_erase.front(); F; F = F->next()) {
for (List<VisualShader::Connection>::Element *E = conns.front(); E; E = E->next()) {
if (E->get().from_node == F->get() || E->get().to_node == F->get()) {
-
bool cancel = false;
for (List<VisualShader::Connection>::Element *R = used_conns.front(); R; R = R->next()) {
if (R->get().from_node == E->get().from_node && R->get().from_port == E->get().from_port && R->get().to_node == E->get().to_node && R->get().to_port == E->get().to_port) {
@@ -2042,17 +1988,16 @@ void VisualShaderEditor::_delete_nodes() {
}
void VisualShaderEditor::_mode_selected(int p_id) {
-
_update_options_menu();
_update_graph();
}
void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> input, String name) {
-
String prev_name = input->get_input_name();
- if (name == prev_name)
+ if (name == prev_name) {
return;
+ }
bool type_changed = input->get_input_type_by_name(name) != input->get_input_type_by_name(prev_name);
@@ -2119,7 +2064,6 @@ void VisualShaderEditor::_member_cancel() {
}
void VisualShaderEditor::_tools_menu_option(int p_idx) {
-
TreeItem *category = members->get_root()->get_children();
switch (p_idx) {
@@ -2176,13 +2120,14 @@ void VisualShaderEditor::_node_menu_id_pressed(int p_idx) {
}
Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
if (p_from == members) {
TreeItem *it = members->get_item_at_position(p_point);
- if (!it)
+ if (!it) {
return Variant();
- if (!it->has_meta("id"))
+ }
+ if (!it->has_meta("id")) {
return Variant();
+ }
int id = it->get_meta("id");
AddOption op = add_options[id];
@@ -2204,9 +2149,7 @@ Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
}
bool VisualShaderEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
if (p_from == graph) {
-
Dictionary d = p_data;
if (d.has("id")) {
@@ -2221,9 +2164,7 @@ bool VisualShaderEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
}
void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
if (p_from == graph) {
-
Dictionary d = p_data;
if (d.has("id")) {
@@ -2233,11 +2174,9 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
_add_node(idx, add_options[idx].sub_func);
} else if (d.has("files")) {
if (d["files"].get_type() == Variant::PACKED_STRING_ARRAY) {
-
int j = 0;
PackedStringArray arr = d["files"];
for (int i = 0; i < arr.size(); i++) {
-
String type = ResourceLoader::get_resource_type(arr[i]);
if (type == "GDScript") {
Ref<Script> script = ResourceLoader::load(arr[i]);
@@ -2271,13 +2210,11 @@ void VisualShaderEditor::_show_preview_text() {
}
static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_variable) {
-
RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_variable);
return RS::global_variable_type_get_shader_datatype(gvt);
}
void VisualShaderEditor::_update_preview() {
-
if (!preview_showed) {
pending_update_preview = true;
return;
@@ -2327,7 +2264,6 @@ void VisualShaderEditor::_bind_methods() {
VisualShaderEditor *VisualShaderEditor::singleton = nullptr;
VisualShaderEditor::VisualShaderEditor() {
-
singleton = this;
updating = false;
saved_node_pos_dirty = false;
@@ -2945,17 +2881,14 @@ VisualShaderEditor::VisualShaderEditor() {
}
void VisualShaderEditorPlugin::edit(Object *p_object) {
-
visual_shader_editor->edit(Object::cast_to<VisualShader>(p_object));
}
bool VisualShaderEditorPlugin::handles(Object *p_object) const {
-
return p_object->is_class("VisualShader");
}
void VisualShaderEditorPlugin::make_visible(bool p_visible) {
-
if (p_visible) {
//editor->hide_animation_player_editors();
//editor->animation_panel_make_visible(true);
@@ -2965,9 +2898,9 @@ void VisualShaderEditorPlugin::make_visible(bool p_visible) {
visual_shader_editor->set_process_input(true);
//visual_shader_editor->set_process(true);
} else {
-
- if (visual_shader_editor->is_visible_in_tree())
+ if (visual_shader_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
+ }
button->hide();
visual_shader_editor->set_process_input(false);
//visual_shader_editor->set_process(false);
@@ -2975,7 +2908,6 @@ void VisualShaderEditorPlugin::make_visible(bool p_visible) {
}
VisualShaderEditorPlugin::VisualShaderEditorPlugin(EditorNode *p_node) {
-
editor = p_node;
visual_shader_editor = memnew(VisualShaderEditor);
visual_shader_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
@@ -3037,9 +2969,9 @@ class VisualShaderNodePluginDefaultEditor : public VBoxContainer {
public:
void _property_changed(const String &p_property, const Variant &p_value, const String &p_field = "", bool p_changing = false) {
-
- if (p_changing)
+ if (p_changing) {
return;
+ }
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
@@ -3049,7 +2981,6 @@ public:
undo_redo->add_undo_property(node.ptr(), p_property, node->get(p_property));
if (p_value.get_type() == Variant::OBJECT) {
-
RES prev_res = node->get(p_property);
RES curr_res = p_value;
@@ -3072,8 +3003,9 @@ public:
}
void _node_changed() {
- if (updating)
+ if (updating) {
return;
+ }
for (int i = 0; i < properties.size(); i++) {
properties[i]->update_property();
}
@@ -3109,7 +3041,6 @@ public:
properties = p_properties;
for (int i = 0; i < p_properties.size(); i++) {
-
HBoxContainer *hbox = memnew(HBoxContainer);
hbox->set_h_size_flags(SIZE_EXPAND_FILL);
add_child(hbox);
@@ -3147,7 +3078,6 @@ public:
};
Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) {
-
if (p_node->is_class("VisualShaderNodeInput")) {
//create input
VisualShaderNodePluginInputEditor *input_editor = memnew(VisualShaderNodePluginInputEditor);
@@ -3166,7 +3096,6 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par
Vector<PropertyInfo> pinfo;
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
-
for (int i = 0; i < properties.size(); i++) {
if (E->get().name == String(properties[i])) {
pinfo.push_back(E->get());
@@ -3174,8 +3103,9 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par
}
}
- if (pinfo.size() == 0)
+ if (pinfo.size() == 0) {
return nullptr;
+ }
properties.clear();
@@ -3183,10 +3113,10 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par
Vector<EditorProperty *> editors;
for (int i = 0; i < pinfo.size(); i++) {
-
EditorProperty *prop = EditorInspector::instantiate_property_editor(node.ptr(), pinfo[i].type, pinfo[i].name, pinfo[i].hint, pinfo[i].hint_string, pinfo[i].usage);
- if (!prop)
+ if (!prop) {
return nullptr;
+ }
if (Object::cast_to<EditorPropertyResource>(prop)) {
Object::cast_to<EditorPropertyResource>(prop)->set_use_sub_inspector(false);
@@ -3209,14 +3139,14 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par
}
void EditorPropertyShaderMode::_option_selected(int p_which) {
-
//will not use this, instead will do all the logic setting manually
//emit_signal("property_changed", get_edited_property(), p_which);
Ref<VisualShader> visual_shader(Object::cast_to<VisualShader>(get_edited_object()));
- if (visual_shader->get_mode() == p_which)
+ if (visual_shader->get_mode() == p_which) {
return;
+ }
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
undo_redo->create_action(TTR("Visual Shader Mode Changed"));
@@ -3227,7 +3157,6 @@ void EditorPropertyShaderMode::_option_selected(int p_which) {
//1. restore connections to output
for (int i = 0; i < VisualShader::TYPE_MAX; i++) {
-
VisualShader::Type type = VisualShader::Type(i);
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
@@ -3239,7 +3168,6 @@ void EditorPropertyShaderMode::_option_selected(int p_which) {
}
//2. restore input indices
for (int i = 0; i < VisualShader::TYPE_MAX; i++) {
-
VisualShader::Type type = VisualShader::Type(i);
Vector<int> nodes = visual_shader->get_node_list(type);
for (int j = 0; j < nodes.size(); j++) {
@@ -3257,7 +3185,6 @@ void EditorPropertyShaderMode::_option_selected(int p_which) {
visual_shader->get_property_list(&props);
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
-
if (E->get().name.begins_with("flags/") || E->get().name.begins_with("modes/")) {
undo_redo->add_undo_property(visual_shader.ptr(), E->get().name, visual_shader->get(E->get().name));
}
@@ -3274,7 +3201,6 @@ void EditorPropertyShaderMode::_option_selected(int p_which) {
}
void EditorPropertyShaderMode::update_property() {
-
int which = get_edited_object()->get(get_edited_property());
options->select(which);
}
@@ -3309,9 +3235,7 @@ void EditorInspectorShaderModePlugin::parse_begin(Object *p_object) {
}
bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
-
if (p_path == "mode" && p_object->is_class("VisualShader") && p_type == Variant::INT) {
-
EditorPropertyShaderMode *editor = memnew(EditorPropertyShaderMode);
Vector<String> options = p_hint_text.split(",");
editor->setup(options);
@@ -3326,6 +3250,7 @@ bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, Variant::
void EditorInspectorShaderModePlugin::parse_end() {
//do none
}
+
//////////////////////////////////
void VisualShaderNodePortPreview::_shader_changed() {
@@ -3351,11 +3276,11 @@ void VisualShaderNodePortPreview::_shader_changed() {
for (int i = EditorNode::get_singleton()->get_editor_history()->get_path_size() - 1; i >= 0; i--) {
Object *object = ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_history()->get_path_object(i));
- if (!object)
+ if (!object) {
continue;
+ }
ShaderMaterial *src_mat = Object::cast_to<ShaderMaterial>(object);
if (src_mat && src_mat->get_shader().is_valid()) {
-
List<PropertyInfo> params;
src_mat->get_shader()->get_param_list(&params);
for (List<PropertyInfo>::Element *E = params.front(); E; E = E->next()) {
@@ -3368,7 +3293,6 @@ void VisualShaderNodePortPreview::_shader_changed() {
}
void VisualShaderNodePortPreview::setup(const Ref<VisualShader> &p_shader, VisualShader::Type p_type, int p_node, int p_port) {
-
shader = p_shader;
shader->connect("changed", callable_mp(this, &VisualShaderNodePortPreview::_shader_changed));
type = p_type;
@@ -3413,18 +3337,15 @@ VisualShaderNodePortPreview::VisualShaderNodePortPreview() {
//////////////////////////////////
String VisualShaderConversionPlugin::converts_to() const {
-
return "Shader";
}
bool VisualShaderConversionPlugin::handles(const Ref<Resource> &p_resource) const {
-
Ref<VisualShader> vshader = p_resource;
return vshader.is_valid();
}
Ref<Resource> VisualShaderConversionPlugin::convert(const Ref<Resource> &p_resource) const {
-
Ref<VisualShader> vshader = p_resource;
ERR_FAIL_COND_V(!vshader.is_valid(), Ref<Resource>());
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index a495b09b5c..d2f10d9407 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -41,7 +41,6 @@
#include "scene/resources/visual_shader.h"
class VisualShaderNodePlugin : public Reference {
-
GDCLASS(VisualShaderNodePlugin, Reference);
protected:
@@ -52,7 +51,6 @@ public:
};
class VisualShaderEditor : public VBoxContainer {
-
GDCLASS(VisualShaderEditor, VBoxContainer);
CustomPropertyEditor *property_editor;
@@ -157,7 +155,6 @@ class VisualShaderEditor : public VBoxContainer {
}
};
struct _OptionComparator {
-
_FORCE_INLINE_ bool operator()(const AddOption &a, const AddOption &b) const {
return a.category.count("/") > b.category.count("/") || (a.category + "/" + a.name).naturalnocasecmp_to(b.category + "/" + b.name) < 0;
}
@@ -290,7 +287,6 @@ public:
};
class VisualShaderEditorPlugin : public EditorPlugin {
-
GDCLASS(VisualShaderEditorPlugin, EditorPlugin);
VisualShaderEditor *visual_shader_editor;
@@ -309,7 +305,6 @@ public:
};
class VisualShaderNodePluginDefault : public VisualShaderNodePlugin {
-
GDCLASS(VisualShaderNodePluginDefault, VisualShaderNodePlugin);
public:
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 86df069b8b..541cba836b 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -37,7 +37,6 @@
#include "servers/display_server.h"
void BackgroundProgress::_add_task(const String &p_task, const String &p_label, int p_steps) {
-
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_MSG(tasks.has(p_task), "Task '" + p_task + "' already exists.");
BackgroundProgress::Task t;
@@ -62,11 +61,9 @@ void BackgroundProgress::_add_task(const String &p_task, const String &p_label,
}
void BackgroundProgress::_update() {
-
_THREAD_SAFE_METHOD_
for (Map<String, int>::Element *E = updates.front(); E; E = E->next()) {
-
if (tasks.has(E->key())) {
_task_step(E->key(), E->get());
}
@@ -76,19 +73,19 @@ void BackgroundProgress::_update() {
}
void BackgroundProgress::_task_step(const String &p_task, int p_step) {
-
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!tasks.has(p_task));
Task &t = tasks[p_task];
- if (p_step < 0)
+ if (p_step < 0) {
t.progress->set_value(t.progress->get_value() + 1);
- else
+ } else {
t.progress->set_value(p_step);
+ }
}
-void BackgroundProgress::_end_task(const String &p_task) {
+void BackgroundProgress::_end_task(const String &p_task) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!tasks.has(p_task));
@@ -99,7 +96,6 @@ void BackgroundProgress::_end_task(const String &p_task) {
}
void BackgroundProgress::_bind_methods() {
-
ClassDB::bind_method("_add_task", &BackgroundProgress::_add_task);
ClassDB::bind_method("_task_step", &BackgroundProgress::_task_step);
ClassDB::bind_method("_end_task", &BackgroundProgress::_end_task);
@@ -107,11 +103,10 @@ void BackgroundProgress::_bind_methods() {
}
void BackgroundProgress::add_task(const String &p_task, const String &p_label, int p_steps) {
-
MessageQueue::get_singleton()->push_call(this, "_add_task", p_task, p_label, p_steps);
}
-void BackgroundProgress::task_step(const String &p_task, int p_step) {
+void BackgroundProgress::task_step(const String &p_task, int p_step) {
//this code is weird, but it prevents deadlock.
bool no_updates = true;
{
@@ -119,8 +114,9 @@ void BackgroundProgress::task_step(const String &p_task, int p_step) {
no_updates = updates.empty();
}
- if (no_updates)
+ if (no_updates) {
MessageQueue::get_singleton()->push_call(this, "_update");
+ }
{
_THREAD_SAFE_METHOD_
@@ -129,7 +125,6 @@ void BackgroundProgress::task_step(const String &p_task, int p_step) {
}
void BackgroundProgress::end_task(const String &p_task) {
-
MessageQueue::get_singleton()->push_call(this, "_end_task", p_task);
}
@@ -141,7 +136,6 @@ void ProgressDialog::_notification(int p_what) {
}
void ProgressDialog::_popup() {
-
Size2 ms = main->get_combined_minimum_size();
ms.width = MAX(500 * EDSCALE, ms.width);
@@ -157,7 +151,6 @@ void ProgressDialog::_popup() {
}
void ProgressDialog::add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) {
-
if (MessageQueue::get_singleton()->is_flushing()) {
ERR_PRINT("Do not use progress dialog (task) while flushing the message queue or using call_deferred()!");
return;
@@ -192,20 +185,21 @@ void ProgressDialog::add_task(const String &p_task, const String &p_label, int p
}
bool ProgressDialog::task_step(const String &p_task, const String &p_state, int p_step, bool p_force_redraw) {
-
ERR_FAIL_COND_V(!tasks.has(p_task), cancelled);
if (!p_force_redraw) {
uint64_t tus = OS::get_singleton()->get_ticks_usec();
- if (tus - last_progress_tick < 200000) //200ms
+ if (tus - last_progress_tick < 200000) { //200ms
return cancelled;
+ }
}
Task &t = tasks[p_task];
- if (p_step < 0)
+ if (p_step < 0) {
t.progress->set_value(t.progress->get_value() + 1);
- else
+ } else {
t.progress->set_value(p_step);
+ }
t.state->set_text(p_state);
last_progress_tick = OS::get_singleton()->get_ticks_usec();
@@ -218,17 +212,17 @@ bool ProgressDialog::task_step(const String &p_task, const String &p_state, int
}
void ProgressDialog::end_task(const String &p_task) {
-
ERR_FAIL_COND(!tasks.has(p_task));
Task &t = tasks[p_task];
memdelete(t.vb);
tasks.erase(p_task);
- if (tasks.empty())
+ if (tasks.empty()) {
hide();
- else
+ } else {
_popup();
+ }
}
void ProgressDialog::_cancel_pressed() {
@@ -239,7 +233,6 @@ void ProgressDialog::_bind_methods() {
}
ProgressDialog::ProgressDialog() {
-
main = memnew(VBoxContainer);
add_child(main);
main->set_anchors_and_margins_preset(Control::PRESET_WIDE);
diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h
index 82f479ae9d..753b6ac955 100644
--- a/editor/progress_dialog.h
+++ b/editor/progress_dialog.h
@@ -38,13 +38,11 @@
#include "scene/gui/progress_bar.h"
class BackgroundProgress : public HBoxContainer {
-
GDCLASS(BackgroundProgress, HBoxContainer);
_THREAD_SAFE_CLASS_
struct Task {
-
HBoxContainer *hb;
ProgressBar *progress;
};
@@ -69,10 +67,8 @@ public:
};
class ProgressDialog : public PopupPanel {
-
GDCLASS(ProgressDialog, PopupPanel);
struct Task {
-
String task;
VBoxContainer *vb;
ProgressBar *progress;
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 04ec5ae043..c53a59604a 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -52,11 +52,12 @@ void ProjectExportDialog::_theme_changed() {
duplicate_preset->set_icon(presets->get_theme_icon("Duplicate", "EditorIcons"));
delete_preset->set_icon(presets->get_theme_icon("Remove", "EditorIcons"));
Control *panel = custom_feature_display->get_parent_control();
- if (panel)
+ if (panel) {
panel->add_theme_style_override("panel", patches->get_theme_stylebox("bg", "Tree"));
+ }
}
-void ProjectExportDialog::_notification(int p_what) {
+void ProjectExportDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible()) {
@@ -73,10 +74,8 @@ void ProjectExportDialog::_notification(int p_what) {
}
void ProjectExportDialog::popup_export() {
-
add_preset->get_popup()->clear();
for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
-
Ref<EditorExportPlatform> plat = EditorExport::get_singleton()->get_export_platform(i);
add_preset->get_popup()->add_icon_item(plat->get_logo(), plat->get_name());
@@ -97,7 +96,6 @@ void ProjectExportDialog::popup_export() {
}
void ProjectExportDialog::_add_preset(int p_platform) {
-
Ref<EditorExportPreset> preset = EditorExport::get_singleton()->get_export_platform(p_platform)->create_preset();
ERR_FAIL_COND(!preset.is_valid());
@@ -105,7 +103,6 @@ void ProjectExportDialog::_add_preset(int p_platform) {
bool make_runnable = true;
int attempt = 1;
while (true) {
-
bool valid = true;
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
@@ -119,33 +116,40 @@ void ProjectExportDialog::_add_preset(int p_platform) {
}
}
- if (valid)
+ if (valid) {
break;
+ }
attempt++;
name = EditorExport::get_singleton()->get_export_platform(p_platform)->get_name() + " " + itos(attempt);
}
preset->set_name(name);
- if (make_runnable)
+ if (make_runnable) {
preset->set_runnable(make_runnable);
+ }
EditorExport::get_singleton()->add_export_preset(preset);
_update_presets();
_edit_preset(EditorExport::get_singleton()->get_export_preset_count() - 1);
}
-void ProjectExportDialog::_update_current_preset() {
+void ProjectExportDialog::_force_update_current_preset_parameters() {
+ // Force the parameters section to refresh its UI.
+ parameters->edit(nullptr);
+ _update_current_preset();
+}
+void ProjectExportDialog::_update_current_preset() {
_edit_preset(presets->get_current());
}
void ProjectExportDialog::_update_presets() {
-
updating = true;
Ref<EditorExportPreset> current;
- if (presets->get_current() >= 0 && presets->get_current() < presets->get_item_count())
+ if (presets->get_current() >= 0 && presets->get_current() < presets->get_item_count()) {
current = get_current_preset();
+ }
int current_idx = -1;
presets->clear();
@@ -156,8 +160,10 @@ void ProjectExportDialog::_update_presets() {
}
String name = preset->get_name();
- if (preset->is_runnable())
+ if (preset->is_runnable()) {
name += " (" + TTR("Runnable") + ")";
+ }
+ preset->update_files_to_export();
presets->add_item(name, preset->get_platform()->get_logo());
}
@@ -169,7 +175,6 @@ void ProjectExportDialog::_update_presets() {
}
void ProjectExportDialog::_update_export_all() {
-
bool can_export = EditorExport::get_singleton()->get_export_preset_count() > 0;
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
@@ -190,7 +195,6 @@ void ProjectExportDialog::_update_export_all() {
}
void ProjectExportDialog::_edit_preset(int p_index) {
-
if (p_index < 0 || p_index >= presets->get_item_count()) {
name->set_text("");
name->set_editable(false);
@@ -246,8 +250,9 @@ void ProjectExportDialog::_edit_preset(int p_index) {
String file = patchlist[i].get_file();
patch->set_editable(0, true);
patch->set_text(0, file.get_file().replace("*", ""));
- if (file.ends_with("*"))
+ if (file.ends_with("*")) {
patch->set_checked(0, true);
+ }
patch->set_tooltip(0, patchlist[i]);
patch->set_metadata(0, i);
patch->add_button(0, presets->get_theme_icon("Remove", "EditorIcons"), 0);
@@ -256,10 +261,11 @@ void ProjectExportDialog::_edit_preset(int p_index) {
TreeItem *patch_add = patches->create_item(patch_root);
patch_add->set_metadata(0, patchlist.size());
- if (patchlist.size() == 0)
+ if (patchlist.size() == 0) {
patch_add->set_text(0, TTR("Add initial export..."));
- else
+ } else {
patch_add->set_text(0, TTR("Add previous patches..."));
+ }
patch_add->add_button(0, presets->get_theme_icon("folder", "FileDialog"), 1);
@@ -268,14 +274,13 @@ void ProjectExportDialog::_edit_preset(int p_index) {
bool needs_templates;
String error;
if (!current->get_platform()->can_export(current, error, needs_templates)) {
-
if (error != String()) {
-
Vector<String> items = error.split("\n", false);
error = "";
for (int i = 0; i < items.size(); i++) {
- if (i > 0)
+ if (i > 0) {
error += "\n";
+ }
error += " - " + items[i];
}
@@ -284,10 +289,11 @@ void ProjectExportDialog::_edit_preset(int p_index) {
} else {
export_error->hide();
}
- if (needs_templates)
+ if (needs_templates) {
export_templates_error->show();
- else
+ } else {
export_templates_error->hide();
+ }
export_button->set_disabled(true);
get_ok()->set_disabled(true);
@@ -329,7 +335,6 @@ void ProjectExportDialog::_edit_preset(int p_index) {
}
void ProjectExportDialog::_update_feature_list() {
-
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
@@ -363,9 +368,9 @@ void ProjectExportDialog::_update_feature_list() {
}
void ProjectExportDialog::_custom_features_changed(const String &p_text) {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
@@ -379,7 +384,6 @@ void ProjectExportDialog::_tab_changed(int) {
}
void ProjectExportDialog::_patch_button_pressed(Object *p_item, int p_column, int p_id) {
-
TreeItem *ti = (TreeItem *)p_item;
patch_index = ti->get_metadata(0);
@@ -398,10 +402,10 @@ void ProjectExportDialog::_patch_button_pressed(Object *p_item, int p_column, in
}
void ProjectExportDialog::_patch_edited() {
-
TreeItem *item = patches->get_edited();
- if (!item)
+ if (!item) {
return;
+ }
int index = item->get_metadata(0);
Ref<EditorExportPreset> current = get_current_preset();
@@ -421,14 +425,12 @@ void ProjectExportDialog::_patch_edited() {
}
void ProjectExportDialog::_patch_selected(const String &p_path) {
-
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
Vector<String> patches = current->get_patches();
if (patch_index >= patches.size()) {
-
current->add_patch(ProjectSettings::get_singleton()->get_resource_path().path_to(p_path) + "*");
} else {
String enabled = patches[patch_index].ends_with("*") ? String("*") : String();
@@ -439,33 +441,29 @@ void ProjectExportDialog::_patch_selected(const String &p_path) {
}
void ProjectExportDialog::_patch_deleted() {
-
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
Vector<String> patches = current->get_patches();
if (patch_index < patches.size()) {
-
current->remove_patch(patch_index);
_update_current_preset();
}
}
void ProjectExportDialog::_update_parameters(const String &p_edited_property) {
-
_update_current_preset();
}
void ProjectExportDialog::_runnable_pressed() {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
if (runnable->is_pressed()) {
-
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
Ref<EditorExportPreset> p = EditorExport::get_singleton()->get_export_preset(i);
if (p->get_platform() == current->get_platform()) {
@@ -473,7 +471,6 @@ void ProjectExportDialog::_runnable_pressed() {
}
}
} else {
-
current->set_runnable(false);
}
@@ -481,9 +478,9 @@ void ProjectExportDialog::_runnable_pressed() {
}
void ProjectExportDialog::_name_changed(const String &p_string) {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
@@ -507,14 +504,13 @@ String ProjectExportDialog::get_export_path() {
}
Ref<EditorExportPreset> ProjectExportDialog::get_current_preset() const {
-
return EditorExport::get_singleton()->get_export_preset(presets->get_current());
}
void ProjectExportDialog::_export_path_changed(const StringName &p_property, const Variant &p_value, const String &p_field, bool p_changing) {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
@@ -524,9 +520,9 @@ void ProjectExportDialog::_export_path_changed(const StringName &p_property, con
}
void ProjectExportDialog::_script_export_mode_changed(int p_mode) {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
@@ -537,9 +533,9 @@ void ProjectExportDialog::_script_export_mode_changed(int p_mode) {
}
void ProjectExportDialog::_script_encryption_key_changed(const String &p_key) {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
@@ -552,7 +548,6 @@ void ProjectExportDialog::_script_encryption_key_changed(const String &p_key) {
}
bool ProjectExportDialog::_validate_script_encryption_key(const String &p_key) {
-
bool is_valid = false;
if (!p_key.empty() && p_key.is_valid_hex_number(false) && p_key.length() == 64) {
@@ -562,10 +557,10 @@ bool ProjectExportDialog::_validate_script_encryption_key(const String &p_key) {
}
void ProjectExportDialog::_duplicate_preset() {
-
Ref<EditorExportPreset> current = get_current_preset();
- if (current.is_null())
+ if (current.is_null()) {
return;
+ }
Ref<EditorExportPreset> preset = current->get_platform()->create_preset();
ERR_FAIL_COND(!preset.is_valid());
@@ -573,7 +568,6 @@ void ProjectExportDialog::_duplicate_preset() {
String name = current->get_name() + " (copy)";
bool make_runnable = true;
while (true) {
-
bool valid = true;
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
@@ -587,15 +581,17 @@ void ProjectExportDialog::_duplicate_preset() {
}
}
- if (valid)
+ if (valid) {
break;
+ }
name += " (copy)";
}
preset->set_name(name);
- if (make_runnable)
+ if (make_runnable) {
preset->set_runnable(make_runnable);
+ }
preset->set_export_filter(current->get_export_filter());
preset->set_include_filter(current->get_include_filter());
preset->set_exclude_filter(current->get_exclude_filter());
@@ -615,17 +611,16 @@ void ProjectExportDialog::_duplicate_preset() {
}
void ProjectExportDialog::_delete_preset() {
-
Ref<EditorExportPreset> current = get_current_preset();
- if (current.is_null())
+ if (current.is_null()) {
return;
+ }
delete_confirm->set_text(vformat(TTR("Delete preset '%s'?"), current->get_name()));
delete_confirm->popup_centered();
}
void ProjectExportDialog::_delete_preset_confirm() {
-
int idx = presets->get_current();
_edit_preset(-1);
export_button->set_disabled(true);
@@ -635,7 +630,6 @@ void ProjectExportDialog::_delete_preset_confirm() {
}
Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
if (p_from == presets) {
int pos = presets->get_item_at_position(p_point, true);
@@ -657,11 +651,9 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
return d;
}
} else if (p_from == patches) {
-
TreeItem *item = patches->get_item_at_position(p_point);
if (item && item->get_cell_mode(0) == TreeItem::CELL_MODE_CHECK) {
-
int metadata = item->get_metadata(0);
Dictionary d;
d["type"] = "export_patch";
@@ -679,26 +671,26 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
}
bool ProjectExportDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
if (p_from == presets) {
Dictionary d = p_data;
- if (!d.has("type") || String(d["type"]) != "export_preset")
+ if (!d.has("type") || String(d["type"]) != "export_preset") {
return false;
+ }
- if (presets->get_item_at_position(p_point, true) < 0 && !presets->is_pos_at_end_of_items(p_point))
+ if (presets->get_item_at_position(p_point, true) < 0 && !presets->is_pos_at_end_of_items(p_point)) {
return false;
+ }
} else if (p_from == patches) {
-
Dictionary d = p_data;
- if (!d.has("type") || String(d["type"]) != "export_patch")
+ if (!d.has("type") || String(d["type"]) != "export_patch") {
return false;
+ }
patches->set_drop_mode_flags(Tree::DROP_MODE_ON_ITEM);
TreeItem *item = patches->get_item_at_position(p_point);
if (!item) {
-
return false;
}
}
@@ -707,7 +699,6 @@ bool ProjectExportDialog::can_drop_data_fw(const Point2 &p_point, const Variant
}
void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
if (p_from == presets) {
Dictionary d = p_data;
int from_pos = d["preset"];
@@ -718,12 +709,13 @@ void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_d
to_pos = presets->get_item_at_position(p_point, true);
}
- if (to_pos == -1 && !presets->is_pos_at_end_of_items(p_point))
+ if (to_pos == -1 && !presets->is_pos_at_end_of_items(p_point)) {
return;
+ }
- if (to_pos == from_pos)
+ if (to_pos == from_pos) {
return;
- else if (to_pos > from_pos) {
+ } else if (to_pos > from_pos) {
to_pos--;
}
@@ -732,27 +724,29 @@ void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_d
EditorExport::get_singleton()->add_export_preset(preset, to_pos);
_update_presets();
- if (to_pos >= 0)
+ if (to_pos >= 0) {
_edit_preset(to_pos);
- else
+ } else {
_edit_preset(presets->get_item_count() - 1);
+ }
} else if (p_from == patches) {
-
Dictionary d = p_data;
- if (!d.has("type") || String(d["type"]) != "export_patch")
+ if (!d.has("type") || String(d["type"]) != "export_patch") {
return;
+ }
int from_pos = d["patch"];
TreeItem *item = patches->get_item_at_position(p_point);
- if (!item)
+ if (!item) {
return;
+ }
int to_pos = item->get_cell_mode(0) == TreeItem::CELL_MODE_CHECK ? int(item->get_metadata(0)) : -1;
- if (to_pos == from_pos)
+ if (to_pos == from_pos) {
return;
- else if (to_pos > from_pos) {
+ } else if (to_pos > from_pos) {
to_pos--;
}
@@ -766,13 +760,14 @@ void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_d
}
void ProjectExportDialog::_export_type_changed(int p_which) {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
- if (current.is_null())
+ if (current.is_null()) {
return;
+ }
current->set_export_filter(EditorExportPreset::ExportFilter(p_which));
updating = true;
@@ -781,27 +776,28 @@ void ProjectExportDialog::_export_type_changed(int p_which) {
}
void ProjectExportDialog::_filter_changed(const String &p_filter) {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
- if (current.is_null())
+ if (current.is_null()) {
return;
+ }
current->set_include_filter(include_filters->get_text());
current->set_exclude_filter(exclude_filters->get_text());
}
void ProjectExportDialog::_fill_resource_tree() {
-
include_files->clear();
include_label->hide();
include_margin->hide();
Ref<EditorExportPreset> current = get_current_preset();
- if (current.is_null())
+ if (current.is_null()) {
return;
+ }
EditorExportPreset::ExportFilter f = current->get_export_filter();
@@ -818,13 +814,11 @@ void ProjectExportDialog::_fill_resource_tree() {
}
bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem *p_item, Ref<EditorExportPreset> &current, bool p_only_scenes) {
-
p_item->set_icon(0, presets->get_theme_icon("folder", "FileDialog"));
p_item->set_text(0, p_dir->get_name() + "/");
bool used = false;
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
-
TreeItem *subdir = include_files->create_item(p_item);
if (_fill_tree(p_dir->get_subdir(i), subdir, current, p_only_scenes)) {
used = true;
@@ -834,10 +828,10 @@ bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem
}
for (int i = 0; i < p_dir->get_file_count(); i++) {
-
String type = p_dir->get_file_type(i);
- if (p_only_scenes && type != "PackedScene")
+ if (p_only_scenes && type != "PackedScene") {
continue;
+ }
TreeItem *file = include_files->create_item(p_item);
file->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
@@ -857,17 +851,19 @@ bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem
}
void ProjectExportDialog::_tree_changed() {
-
- if (updating)
+ if (updating) {
return;
+ }
Ref<EditorExportPreset> current = get_current_preset();
- if (current.is_null())
+ if (current.is_null()) {
return;
+ }
TreeItem *item = include_files->get_edited();
- if (!item)
+ if (!item) {
return;
+ }
String path = item->get_metadata(0);
bool added = item->is_checked(0);
@@ -880,12 +876,10 @@ void ProjectExportDialog::_tree_changed() {
}
void ProjectExportDialog::_export_pck_zip() {
-
export_pck_zip->popup_centered_ratio();
}
void ProjectExportDialog::_export_pck_zip_selected(const String &p_path) {
-
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
Ref<EditorExportPlatform> platform = current->get_platform();
@@ -899,7 +893,6 @@ void ProjectExportDialog::_export_pck_zip_selected(const String &p_path) {
}
void ProjectExportDialog::_open_export_template_manager() {
-
EditorNode::get_singleton()->open_export_template_manager();
hide();
}
@@ -909,10 +902,12 @@ void ProjectExportDialog::_validate_export_path(const String &p_path) {
bool invalid_path = (p_path.get_file().get_basename() == "");
// Check if state change before needlessly messing with signals
- if (invalid_path && export_project->get_ok()->is_disabled())
+ if (invalid_path && export_project->get_ok()->is_disabled()) {
return;
- if (!invalid_path && !export_project->get_ok()->is_disabled())
+ }
+ if (!invalid_path && !export_project->get_ok()->is_disabled()) {
return;
+ }
if (invalid_path) {
export_project->get_ok()->set_disabled(true);
@@ -924,7 +919,6 @@ void ProjectExportDialog::_validate_export_path(const String &p_path) {
}
void ProjectExportDialog::_export_project() {
-
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
Ref<EditorExportPlatform> platform = current->get_platform();
@@ -987,20 +981,17 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
}
void ProjectExportDialog::_export_all_dialog() {
-
export_all_dialog->show();
export_all_dialog->popup_centered(Size2(300, 80));
}
void ProjectExportDialog::_export_all_dialog_action(const String &p_str) {
-
export_all_dialog->hide();
_export_all(p_str != "release");
}
void ProjectExportDialog::_export_all(bool p_debug) {
-
String mode = p_debug ? TTR("Debug") : TTR("Release");
EditorProgress ep("exportall", TTR("Exporting All") + " " + mode, EditorExport::get_singleton()->get_export_preset_count(), true);
@@ -1027,7 +1018,6 @@ void ProjectExportDialog::_export_all(bool p_debug) {
}
void ProjectExportDialog::_bind_methods() {
-
ClassDB::bind_method("get_drag_data_fw", &ProjectExportDialog::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &ProjectExportDialog::can_drop_data_fw);
ClassDB::bind_method("drop_data_fw", &ProjectExportDialog::drop_data_fw);
@@ -1040,7 +1030,6 @@ void ProjectExportDialog::_bind_methods() {
}
ProjectExportDialog::ProjectExportDialog() {
-
set_title(TTR("Export"));
VBoxContainer *main_vb = memnew(VBoxContainer);
@@ -1119,6 +1108,7 @@ ProjectExportDialog::ProjectExportDialog() {
parameters->set_name(TTR("Options"));
parameters->set_v_size_flags(Control::SIZE_EXPAND_FILL);
parameters->connect("property_edited", callable_mp(this, &ProjectExportDialog::_update_parameters));
+ EditorExport::get_singleton()->connect("export_presets_updated", callable_mp(this, &ProjectExportDialog::_force_update_current_preset_parameters));
// Resources export parameters.
diff --git a/editor/project_export.h b/editor/project_export.h
index 2e311eb3b3..cfa00773d8 100644
--- a/editor/project_export.h
+++ b/editor/project_export.h
@@ -123,6 +123,7 @@ private:
void _delete_preset_confirm();
void _update_export_all();
+ void _force_update_current_preset_parameters();
void _update_current_preset();
void _update_presets();
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 2d1eb54e9a..cbba4b4834 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -59,7 +59,6 @@ static inline String get_project_key_from_path(const String &dir) {
}
class ProjectDialog : public ConfirmationDialog {
-
GDCLASS(ProjectDialog, ConfirmationDialog);
public:
@@ -107,30 +106,25 @@ private:
String created_folder_path;
void set_message(const String &p_msg, MessageType p_type = MESSAGE_SUCCESS, InputType input_type = PROJECT_PATH) {
-
msg->set_text(p_msg);
Ref<Texture2D> current_path_icon = status_rect->get_texture();
Ref<Texture2D> current_install_icon = install_status_rect->get_texture();
Ref<Texture2D> new_icon;
switch (p_type) {
-
case MESSAGE_ERROR: {
-
msg->add_theme_color_override("font_color", msg->get_theme_color("error_color", "Editor"));
msg->set_modulate(Color(1, 1, 1, 1));
new_icon = msg->get_theme_icon("StatusError", "EditorIcons");
} break;
case MESSAGE_WARNING: {
-
msg->add_theme_color_override("font_color", msg->get_theme_color("warning_color", "Editor"));
msg->set_modulate(Color(1, 1, 1, 1));
new_icon = msg->get_theme_icon("StatusWarning", "EditorIcons");
} break;
case MESSAGE_SUCCESS: {
-
msg->set_modulate(Color(1, 1, 1, 0));
new_icon = msg->get_theme_icon("StatusSuccess", "EditorIcons");
@@ -147,7 +141,6 @@ private:
}
String _test_path() {
-
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
String valid_path, valid_install_path;
if (d->change_dir(project_path->get_text()) == OK) {
@@ -187,16 +180,13 @@ private:
}
if (mode == MODE_IMPORT || mode == MODE_RENAME) {
-
if (valid_path != "" && !d->file_exists("project.godot")) {
-
if (valid_path.ends_with(".zip")) {
FileAccess *src_f = nullptr;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
unzFile pkg = unzOpen2(valid_path.utf8().get_data(), &io);
if (!pkg) {
-
set_message(TTR("Error opening package file (it's not in ZIP format)."), MESSAGE_ERROR);
memdelete(d);
get_ok()->set_disabled(true);
@@ -245,7 +235,6 @@ private:
d->list_dir_end();
if (!is_empty) {
-
set_message(TTR("Please choose an empty folder."), MESSAGE_WARNING, INSTALL_PATH);
memdelete(d);
get_ok()->set_disabled(true);
@@ -261,7 +250,6 @@ private:
}
} else if (valid_path.ends_with("zip")) {
-
set_message(TTR("This directory already contains a Godot project."), MESSAGE_ERROR, INSTALL_PATH);
memdelete(d);
get_ok()->set_disabled(true);
@@ -269,7 +257,6 @@ private:
}
} else {
-
// check if the specified folder is empty, even though this is not an error, it is good to check here
d->list_dir_begin();
bool is_empty = true;
@@ -288,7 +275,6 @@ private:
d->list_dir_end();
if (!is_empty) {
-
set_message(TTR("Please choose an empty folder."), MESSAGE_ERROR);
memdelete(d);
get_ok()->set_disabled(true);
@@ -304,10 +290,8 @@ private:
}
void _path_text_changed(const String &p_path) {
-
String sp = _test_path();
if (sp != "") {
-
// If the project name is empty or default, infer the project name from the selected folder name
if (project_name->get_text() == "" || project_name->get_text() == TTR("New Game Project")) {
sp = sp.replace("\\", "/");
@@ -316,8 +300,9 @@ private:
if (lidx != -1) {
sp = sp.substr(lidx + 1, sp.length()).capitalize();
}
- if (sp == "" && mode == MODE_IMPORT)
+ if (sp == "" && mode == MODE_IMPORT) {
sp = TTR("Imported Project");
+ }
project_name->set_text(sp);
_text_changed(sp);
@@ -330,7 +315,6 @@ private:
}
void _file_selected(const String &p_path) {
-
String p = p_path;
if (mode == MODE_IMPORT) {
if (p.ends_with("project.godot")) {
@@ -358,7 +342,6 @@ private:
}
void _path_selected(const String &p_path) {
-
String sp = p_path.simplify_path();
project_path->set_text(sp);
_path_text_changed(sp);
@@ -366,7 +349,6 @@ private:
}
void _install_path_selected(const String &p_path) {
-
String sp = p_path.simplify_path();
install_path->set_text(sp);
_path_text_changed(sp);
@@ -374,11 +356,9 @@ private:
}
void _browse_path() {
-
fdialog->set_current_dir(project_path->get_text());
if (mode == MODE_IMPORT) {
-
fdialog->set_file_mode(FileDialog::FILE_MODE_OPEN_FILE);
fdialog->clear_filters();
fdialog->add_filter(vformat("project.godot ; %s %s", VERSION_NAME, TTR("Project")));
@@ -396,7 +376,6 @@ private:
}
void _create_folder() {
-
if (project_name->get_text() == "" || created_folder_path != "" || project_name->get_text().ends_with(".") || project_name->get_text().ends_with(" ")) {
set_message(TTR("Invalid Project Name."), MESSAGE_WARNING);
return;
@@ -404,11 +383,8 @@ private:
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (d->change_dir(project_path->get_text()) == OK) {
-
if (!d->dir_exists(project_name->get_text())) {
-
if (d->make_dir(project_name->get_text()) == OK) {
-
d->change_dir(project_name->get_text());
String dir_str = d->get_current_dir();
project_path->set_text(dir_str);
@@ -416,12 +392,10 @@ private:
created_folder_path = d->get_current_dir();
create_dir->set_disabled(true);
} else {
-
dialog_error->set_text(TTR("Couldn't create folder."));
dialog_error->popup_centered();
}
} else {
-
dialog_error->set_text(TTR("There is already a folder in this path with the specified name."));
dialog_error->popup_centered();
}
@@ -431,22 +405,21 @@ private:
}
void _text_changed(const String &p_text) {
-
- if (mode != MODE_NEW)
+ if (mode != MODE_NEW) {
return;
+ }
_test_path();
- if (p_text == "")
+ if (p_text == "") {
set_message(TTR("It would be a good idea to name your project."), MESSAGE_WARNING);
+ }
}
void ok_pressed() {
-
String dir = project_path->get_text();
if (mode == MODE_RENAME) {
-
String dir2 = _test_path();
if (dir2 == "") {
set_message(TTR("Invalid project path (changed anything?)."), MESSAGE_ERROR);
@@ -471,11 +444,8 @@ private:
emit_signal("projects_updated");
} else {
-
if (mode == MODE_IMPORT) {
-
if (project_path->get_text().ends_with(".zip")) {
-
mode = MODE_INSTALL;
ok_pressed();
@@ -484,7 +454,6 @@ private:
} else {
if (mode == MODE_NEW) {
-
ProjectSettings::CustomMap initial_settings;
if (rasterizer_button_group->get_pressed_button()->get_meta("driver_name") == "Vulkan") {
initial_settings["rendering/quality/driver/driver_name"] = "Vulkan";
@@ -516,7 +485,6 @@ private:
}
} else if (mode == MODE_INSTALL) {
-
if (project_path->get_text().ends_with(".zip")) {
dir = install_path->get_text();
zip_path = project_path->get_text();
@@ -527,7 +495,6 @@ private:
unzFile pkg = unzOpen2(zip_path.utf8().get_data(), &io);
if (!pkg) {
-
dialog_error->set_text(TTR("Error opening package file, not in ZIP format."));
dialog_error->popup_centered();
return;
@@ -539,7 +506,6 @@ private:
int idx = 0;
while (ret == UNZ_OK) {
-
//get filename
unz_file_info info;
char fname[16384];
@@ -570,7 +536,6 @@ private:
memdelete(da);
} else {
-
Vector<uint8_t> data;
data.resize(info.uncompressed_size);
@@ -598,7 +563,6 @@ private:
if (failed_files.size()) {
String msg = TTR("The following files failed extraction from package:") + "\n\n";
for (int i = 0; i < failed_files.size(); i++) {
-
if (i > 15) {
msg += "\nAnd " + itos(failed_files.size() - i) + " more files.";
break;
@@ -617,8 +581,9 @@ private:
}
dir = dir.replace("\\", "/");
- if (dir.ends_with("/"))
+ if (dir.ends_with("/")) {
dir = dir.substr(0, dir.length() - 1);
+ }
String proj = get_project_key_from_path(dir);
EditorSettings::get_singleton()->set("projects/" + proj, dir);
EditorSettings::get_singleton()->save();
@@ -629,7 +594,6 @@ private:
}
void _remove_created_folder() {
-
if (created_folder_path != "") {
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
d->remove(created_folder_path);
@@ -641,7 +605,6 @@ private:
}
void cancel_pressed() {
-
_remove_created_folder();
project_path->clear();
@@ -649,22 +612,23 @@ private:
project_name->clear();
_text_changed("");
- if (status_rect->get_texture() == msg->get_theme_icon("StatusError", "EditorIcons"))
+ if (status_rect->get_texture() == msg->get_theme_icon("StatusError", "EditorIcons")) {
msg->show();
+ }
- if (install_status_rect->get_texture() == msg->get_theme_icon("StatusError", "EditorIcons"))
+ if (install_status_rect->get_texture() == msg->get_theme_icon("StatusError", "EditorIcons")) {
msg->show();
+ }
}
void _notification(int p_what) {
-
- if (p_what == NOTIFICATION_WM_CLOSE_REQUEST)
+ if (p_what == NOTIFICATION_WM_CLOSE_REQUEST) {
_remove_created_folder();
+ }
}
protected:
static void _bind_methods() {
-
ClassDB::bind_method("_browse_path", &ProjectDialog::_browse_path);
ClassDB::bind_method("_create_folder", &ProjectDialog::_create_folder);
ClassDB::bind_method("_text_changed", &ProjectDialog::_text_changed);
@@ -686,7 +650,6 @@ public:
}
void set_mode(Mode p_mode) {
-
mode = p_mode;
}
@@ -695,9 +658,7 @@ public:
}
void show_dialog() {
-
if (mode == MODE_RENAME) {
-
project_path->set_editable(false);
browse->hide();
install_browse->hide();
@@ -731,7 +692,6 @@ public:
create_dir->hide();
} else {
-
fav_dir = EditorSettings::get_singleton()->get("filesystem/directories/default_project_path");
if (fav_dir != "") {
project_path->set_text(fav_dir);
@@ -765,7 +725,6 @@ public:
project_path->grab_focus();
} else if (mode == MODE_NEW) {
-
set_title(TTR("Create New Project"));
get_ok()->set_text(TTR("Create & Edit"));
name_container->show();
@@ -775,7 +734,6 @@ public:
project_name->call_deferred("select_all");
} else if (mode == MODE_INSTALL) {
-
set_title(TTR("Install Project:") + " " + zip_title);
get_ok()->set_text(TTR("Install & Edit"));
project_name->set_text(zip_title);
@@ -792,7 +750,6 @@ public:
}
ProjectDialog() {
-
VBoxContainer *vb = memnew(VBoxContainer);
add_child(vb);
@@ -959,6 +916,8 @@ public:
icon = nullptr;
icon_needs_reload = true;
hover = false;
+
+ set_focus_mode(FocusMode::FOCUS_ALL);
}
void set_is_favorite(bool fav) {
@@ -1024,7 +983,6 @@ public:
bool p_grayed,
bool p_missing,
int p_version) {
-
project_key = p_project;
project_name = p_name;
description = p_description;
@@ -1137,7 +1095,6 @@ void ProjectList::update_icons_async() {
void ProjectList::_notification(int p_what) {
if (p_what == NOTIFICATION_PROCESS) {
-
// Load icons as a coroutine to speed up launch when you have hundreds of projects
if (_icon_load_index < _projects.size()) {
Item &item = _projects.write[_icon_load_index];
@@ -1162,7 +1119,6 @@ void ProjectList::load_project_icon(int p_index) {
img.instance();
Error err = img->load(item.icon.replace_first("res://", item.path + "/"));
if (err == OK) {
-
img->resize(default_icon->get_width(), default_icon->get_height(), Image::INTERPOLATE_LANCZOS);
Ref<ImageTexture> it = memnew(ImageTexture);
it->create_from_image(img);
@@ -1178,7 +1134,6 @@ void ProjectList::load_project_icon(int p_index) {
}
void ProjectList::load_project_data(const String &p_property_key, Item &p_item, bool p_favorite) {
-
String path = EditorSettings::get_singleton()->get(p_property_key);
String conf = path.plus_file("project.godot");
bool grayed = false;
@@ -1191,8 +1146,9 @@ void ProjectList::load_project_data(const String &p_property_key, Item &p_item,
String project_name = TTR("Unnamed Project");
if (cf_err == OK) {
String cf_project_name = static_cast<String>(cf->get_value("application", "config/name", ""));
- if (cf_project_name != "")
+ if (cf_project_name != "") {
project_name = cf_project_name.xml_unescape();
+ }
config_version = (int)cf->get_value("", "config_version", 0);
}
@@ -1215,8 +1171,9 @@ void ProjectList::load_project_data(const String &p_property_key, Item &p_item,
String fscache = path.plus_file(".fscache");
if (FileAccess::exists(fscache)) {
uint64_t cache_modified = FileAccess::get_modified_time(fscache);
- if (cache_modified > last_edited)
+ if (cache_modified > last_edited) {
last_edited = cache_modified;
+ }
}
} else {
grayed = true;
@@ -1262,8 +1219,9 @@ void ProjectList::load_projects() {
for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
// This is actually something like "projects/C:::Documents::Godot::Projects::MyGame"
String property_key = E->get().name;
- if (!property_key.begins_with("projects/"))
+ if (!property_key.begins_with("projects/")) {
continue;
+ }
String project_key = property_key.get_slice("/", 1);
bool favorite = favorites.has("favorite_projects/" + project_key);
@@ -1289,7 +1247,6 @@ void ProjectList::load_projects() {
}
void ProjectList::update_dock_menu() {
-
if (!DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU)) {
return;
}
@@ -1341,7 +1298,6 @@ void ProjectList::_global_menu_open_project(const Variant &p_tag) {
}
void ProjectList::create_project_item_control(int p_index) {
-
// Will be added last in the list, so make sure indexes match
ERR_FAIL_COND(p_index != _scroll_children->get_child_count());
@@ -1383,8 +1339,9 @@ void ProjectList::create_project_item_control(int p_index) {
hb->icon = tf;
VBoxContainer *vb = memnew(VBoxContainer);
- if (item.grayed)
+ if (item.grayed) {
vb->set_modulate(Color(1, 1, 1, 0.5));
+ }
vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hb->add_child(vb);
Control *ec = memnew(Control);
@@ -1442,7 +1399,6 @@ void ProjectList::set_order_option(ProjectListFilter::FilterOption p_option) {
}
void ProjectList::sort_projects() {
-
SortArray<Item, ProjectListComparator> sorter;
sorter.compare.order_option = _order_option;
sorter.sort(_projects.ptrw(), _projects.size());
@@ -1452,7 +1408,6 @@ void ProjectList::sort_projects() {
bool visible = true;
if (_search_term != "") {
-
String search_path;
if (_search_term.find("/") != -1) {
// Search path will match the whole path
@@ -1568,7 +1523,6 @@ bool ProjectList::is_any_project_missing() const {
}
void ProjectList::erase_missing_projects() {
-
if (_projects.empty()) {
return;
}
@@ -1669,7 +1623,6 @@ int ProjectList::get_project_count() const {
}
void ProjectList::select_project(int p_index) {
-
Vector<Item> previous_selected_items = get_selected_projects();
_selected_project_keys.clear();
@@ -1724,7 +1677,6 @@ void ProjectList::toggle_select(int p_index) {
}
void ProjectList::erase_selected_projects() {
-
if (_selected_project_keys.size() == 0) {
return;
}
@@ -1732,7 +1684,6 @@ void ProjectList::erase_selected_projects() {
for (int i = 0; i < _projects.size(); ++i) {
Item &item = _projects.write[i];
if (_selected_project_keys.has(item.project_key) && item.control->is_visible()) {
-
EditorSettings::get_singleton()->erase("projects/" + item.project_key);
EditorSettings::get_singleton()->erase("favorite_projects/" + item.project_key);
@@ -1765,15 +1716,12 @@ void ProjectList::_panel_draw(Node *p_hb) {
// Input for each item in the list
void ProjectList::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) {
-
Ref<InputEventMouseButton> mb = p_ev;
int clicked_index = p_hb->get_index();
const Item &clicked_project = _projects[clicked_index];
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
-
if (mb->get_shift() && _selected_project_keys.size() > 0 && _last_clicked != "" && clicked_project.project_key != _last_clicked) {
-
int anchor_index = -1;
for (int i = 0; i < _projects.size(); ++i) {
const Item &p = _projects[i];
@@ -1802,7 +1750,6 @@ void ProjectList::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) {
}
void ProjectList::_favorite_pressed(Node *p_hb) {
-
ProjectListItemControl *control = Object::cast_to<ProjectListItemControl>(p_hb);
int index = control->get_index();
@@ -1836,7 +1783,6 @@ void ProjectList::_favorite_pressed(Node *p_hb) {
}
void ProjectList::_show_project(const String &p_path) {
-
OS::get_singleton()->shell_open(String("file://") + p_path);
}
@@ -1844,28 +1790,24 @@ const char *ProjectList::SIGNAL_SELECTION_CHANGED = "selection_changed";
const char *ProjectList::SIGNAL_PROJECT_ASK_OPEN = "project_ask_open";
void ProjectList::_bind_methods() {
-
ADD_SIGNAL(MethodInfo(SIGNAL_SELECTION_CHANGED));
ADD_SIGNAL(MethodInfo(SIGNAL_PROJECT_ASK_OPEN));
}
void ProjectManager::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
-
Engine::get_singleton()->set_editor_hint(false);
} break;
case NOTIFICATION_RESIZED: {
-
if (open_templates->is_visible()) {
open_templates->popup_centered();
}
} break;
case NOTIFICATION_READY: {
-
- if (_project_list->get_project_count() == 0 && StreamPeerSSL::is_available())
+ if (_project_list->get_project_count() == 0 && StreamPeerSSL::is_available()) {
open_templates->popup_centered();
+ }
if (_project_list->get_project_count() >= 1) {
// Focus on the search box immediately to allow the user
@@ -1874,18 +1816,15 @@ void ProjectManager::_notification(int p_what) {
}
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
-
set_process_unhandled_input(is_visible_in_tree());
} break;
case NOTIFICATION_WM_CLOSE_REQUEST: {
-
_dim_window();
} break;
}
}
void ProjectManager::_dim_window() {
-
// This method must be called before calling `get_tree()->quit()`.
// Otherwise, its effect won't be visible
@@ -1897,7 +1836,6 @@ void ProjectManager::_dim_window() {
}
void ProjectManager::_update_project_buttons() {
-
Vector<ProjectList::Item> selected_projects = _project_list->get_selected_projects();
bool empty_selection = selected_projects.empty();
@@ -1918,11 +1856,9 @@ void ProjectManager::_update_project_buttons() {
}
void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
-
Ref<InputEventKey> k = p_ev;
if (k.is_valid()) {
-
if (!k->is_pressed()) {
return;
}
@@ -1937,23 +1873,20 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
}
#endif
- if (tabs->get_current_tab() != 0)
+ if (tabs->get_current_tab() != 0) {
return;
+ }
bool keycode_handled = true;
switch (k->get_keycode()) {
-
case KEY_ENTER: {
-
_open_selected_projects_ask();
} break;
case KEY_DELETE: {
-
_erase_project();
} break;
case KEY_HOME: {
-
if (_project_list->get_project_count() > 0) {
_project_list->select_project(0);
_update_project_buttons();
@@ -1961,7 +1894,6 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
} break;
case KEY_END: {
-
if (_project_list->get_project_count() > 0) {
_project_list->select_project(_project_list->get_project_count() - 1);
_update_project_buttons();
@@ -1969,9 +1901,9 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
} break;
case KEY_UP: {
-
- if (k->get_shift())
+ if (k->get_shift()) {
break;
+ }
int index = _project_list->get_single_selected_index();
if (index > 0) {
@@ -1983,9 +1915,9 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
break;
}
case KEY_DOWN: {
-
- if (k->get_shift())
+ if (k->get_shift()) {
break;
+ }
int index = _project_list->get_single_selected_index();
if (index + 1 < _project_list->get_project_count()) {
@@ -1996,10 +1928,11 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
} break;
case KEY_F: {
- if (k->get_command())
+ if (k->get_command()) {
this->project_filter->search_box->grab_focus();
- else
+ } else {
keycode_handled = false;
+ }
} break;
default: {
keycode_handled = false;
@@ -2013,7 +1946,6 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
}
void ProjectManager::_load_recent_projects() {
-
_project_list->set_order_option(project_order_filter->get_filter_option());
_project_list->set_search_term(project_filter->get_search_term());
_project_list->load_projects();
@@ -2051,7 +1983,6 @@ void ProjectManager::_confirm_update_settings() {
}
void ProjectManager::_open_selected_projects() {
-
const Set<String> &selected_list = _project_list->get_selected_project_keys();
for (const Set<String>::Element *E = selected_list.front(); E; E = E->next()) {
@@ -2090,7 +2021,6 @@ void ProjectManager::_open_selected_projects() {
}
void ProjectManager::_open_selected_projects_ask() {
-
const Set<String> &selected_list = _project_list->get_selected_project_keys();
if (selected_list.size() < 1) {
@@ -2136,11 +2066,9 @@ void ProjectManager::_open_selected_projects_ask() {
}
void ProjectManager::_run_project_confirm() {
-
Vector<ProjectList::Item> selected_list = _project_list->get_selected_projects();
for (int i = 0; i < selected_list.size(); ++i) {
-
const String &selected_main = selected_list[i].main_scene;
if (selected_main == "") {
run_error_diag->set_text(TTR("Can't run project: no main scene defined.\nPlease edit the project and set the main scene in the Project Settings under the \"Application\" category."));
@@ -2178,7 +2106,6 @@ void ProjectManager::_run_project_confirm() {
// When you press the "Run" button
void ProjectManager::_run_project() {
-
const Set<String> &selected_list = _project_list->get_selected_project_keys();
if (selected_list.size() < 1) {
@@ -2211,7 +2138,6 @@ void ProjectManager::_scan_dir(const String &path, List<String> *r_projects) {
}
void ProjectManager::_scan_begin(const String &p_base) {
-
print_line("Scanning projects at: " + p_base);
List<String> projects;
_scan_dir(p_base, &projects);
@@ -2226,24 +2152,20 @@ void ProjectManager::_scan_begin(const String &p_base) {
}
void ProjectManager::_scan_projects() {
-
scan_dir->popup_centered_ratio();
}
void ProjectManager::_new_project() {
-
npdialog->set_mode(ProjectDialog::MODE_NEW);
npdialog->show_dialog();
}
void ProjectManager::_import_project() {
-
npdialog->set_mode(ProjectDialog::MODE_IMPORT);
npdialog->show_dialog();
}
void ProjectManager::_rename_project() {
-
const Set<String> &selected_list = _project_list->get_selected_project_keys();
if (selected_list.size() == 0) {
@@ -2270,11 +2192,11 @@ void ProjectManager::_erase_missing_projects_confirm() {
}
void ProjectManager::_erase_project() {
-
const Set<String> &selected_list = _project_list->get_selected_project_keys();
- if (selected_list.size() == 0)
+ if (selected_list.size() == 0) {
return;
+ }
String confirm_message;
if (selected_list.size() >= 2) {
@@ -2288,13 +2210,11 @@ void ProjectManager::_erase_project() {
}
void ProjectManager::_erase_missing_projects() {
-
erase_missing_ask->set_text(TTR("Remove all missing projects from the list?\nThe project folders' contents won't be modified."));
erase_missing_ask->popup_centered();
}
void ProjectManager::_language_selected(int p_id) {
-
String lang = language_btn->get_item_metadata(p_id);
EditorSettings::get_singleton()->set("interface/editor/editor_language", lang);
language_btn->set_text(lang);
@@ -2305,7 +2225,6 @@ void ProjectManager::_language_selected(int p_id) {
}
void ProjectManager::_restart_confirm() {
-
List<String> args = OS::get_singleton()->get_cmdline_args();
String exec = OS::get_singleton()->get_executable_path();
OS::ProcessID pid = 0;
@@ -2317,13 +2236,11 @@ void ProjectManager::_restart_confirm() {
}
void ProjectManager::_exit_dialog() {
-
_dim_window();
get_tree()->quit();
}
void ProjectManager::_install_project(const String &p_zip_path, const String &p_title) {
-
npdialog->set_mode(ProjectDialog::MODE_INSTALL);
npdialog->set_zip_path(p_zip_path);
npdialog->set_zip_title(p_title);
@@ -2395,7 +2312,6 @@ void ProjectManager::_on_filter_option_changed() {
}
void ProjectManager::_bind_methods() {
-
ClassDB::bind_method("_exit_dialog", &ProjectManager::_exit_dialog);
ClassDB::bind_method("_unhandled_input", &ProjectManager::_unhandled_input);
ClassDB::bind_method("_update_project_buttons", &ProjectManager::_update_project_buttons);
@@ -2407,10 +2323,10 @@ void ProjectManager::_open_asset_library() {
}
ProjectManager::ProjectManager() {
-
// load settings
- if (!EditorSettings::get_singleton())
+ if (!EditorSettings::get_singleton()) {
EditorSettings::create();
+ }
EditorSettings::get_singleton()->set_optimize_save(false); //just write settings as they came
@@ -2730,16 +2646,16 @@ ProjectManager::ProjectManager() {
}
ProjectManager::~ProjectManager() {
-
- if (EditorSettings::get_singleton())
+ if (EditorSettings::get_singleton()) {
EditorSettings::destroy();
+ }
}
void ProjectListFilter::_setup_filters(Vector<String> options) {
-
filter_option->clear();
- for (int i = 0; i < options.size(); i++)
+ for (int i = 0; i < options.size(); i++) {
filter_option->add_item(options[i]);
+ }
}
void ProjectListFilter::_search_text_changed(const String &p_newtext) {
@@ -2763,13 +2679,13 @@ void ProjectListFilter::_filter_option_selected(int p_idx) {
FilterOption selected = (FilterOption)(filter_option->get_selected());
if (_current_filter != selected) {
_current_filter = selected;
- if (is_inside_tree())
+ if (is_inside_tree()) {
emit_signal("filter_changed");
+ }
}
}
void ProjectListFilter::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE && has_search_box) {
search_box->set_right_icon(get_theme_icon("Search", "EditorIcons"));
search_box->set_clear_button_enabled(true);
@@ -2777,7 +2693,6 @@ void ProjectListFilter::_notification(int p_what) {
}
void ProjectListFilter::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("filter_changed"));
}
@@ -2805,7 +2720,6 @@ void ProjectListFilter::set_filter_size(int h_size) {
}
ProjectListFilter::ProjectListFilter() {
-
_current_filter = FILTER_NAME;
has_search_box = false;
}
diff --git a/editor/project_manager.h b/editor/project_manager.h
index 6385000821..e5471bd392 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -43,7 +43,6 @@ class ProjectList;
class ProjectListFilter;
class ProjectManager : public Control {
-
GDCLASS(ProjectManager, Control);
Button *erase_btn;
@@ -126,7 +125,6 @@ public:
};
class ProjectListFilter : public HBoxContainer {
-
GDCLASS(ProjectListFilter, HBoxContainer);
public:
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index e5dd0c148e..a7c260c0f8 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -85,11 +85,9 @@ static const char *_axis_descriptions[JOY_AXIS_MAX * 2] = {
};
void ProjectSettingsEditor::_unhandled_input(const Ref<InputEvent> &p_event) {
-
const Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed()) {
-
if (k->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) {
if (search_button->is_pressed()) {
search_box->grab_focus();
@@ -105,7 +103,6 @@ void ProjectSettingsEditor::_unhandled_input(const Ref<InputEvent> &p_event) {
}
void ProjectSettingsEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible()) {
@@ -133,14 +130,12 @@ void ProjectSettingsEditor::_notification(int p_what) {
List<String> tfn;
ResourceLoader::get_recognized_extensions_for_type("Translation", &tfn);
for (List<String>::Element *E = tfn.front(); E; E = E->next()) {
-
translation_file_open->add_filter("*." + E->get());
}
List<String> rfn;
ResourceLoader::get_recognized_extensions_for_type("Resource", &rfn);
for (List<String>::Element *E = rfn.front(); E; E = E->next()) {
-
translation_res_file_open->add_filter("*." + E->get());
translation_res_option_file_open->add_filter("*." + E->get());
}
@@ -168,39 +163,40 @@ void ProjectSettingsEditor::_notification(int p_what) {
static bool _validate_action_name(const String &p_name) {
const CharType *cstr = p_name.c_str();
- for (int i = 0; cstr[i]; i++)
+ for (int i = 0; cstr[i]; i++) {
if (cstr[i] == '/' || cstr[i] == ':' || cstr[i] == '"' ||
- cstr[i] == '=' || cstr[i] == '\\' || cstr[i] < 32)
+ cstr[i] == '=' || cstr[i] == '\\' || cstr[i] < 32) {
return false;
+ }
+ }
return true;
}
void ProjectSettingsEditor::_action_selected() {
-
TreeItem *ti = input_editor->get_selected();
- if (!ti || !ti->is_editable(0))
+ if (!ti || !ti->is_editable(0)) {
return;
+ }
add_at = "input/" + ti->get_text(0);
edit_idx = -1;
}
void ProjectSettingsEditor::_action_edited() {
-
TreeItem *ti = input_editor->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
if (input_editor->get_selected_column() == 0) {
-
String new_name = ti->get_text(0);
String old_name = add_at.substr(add_at.find("/") + 1, add_at.length());
- if (new_name == old_name)
+ if (new_name == old_name) {
return;
+ }
if (new_name == "" || !_validate_action_name(new_name)) {
-
ti->set_text(0, old_name);
add_at = "input/" + old_name;
@@ -212,7 +208,6 @@ void ProjectSettingsEditor::_action_edited() {
String action_prop = "input/" + new_name;
if (ProjectSettings::get_singleton()->has_setting(action_prop)) {
-
ti->set_text(0, old_name);
add_at = "input/" + old_name;
@@ -241,7 +236,6 @@ void ProjectSettingsEditor::_action_edited() {
add_at = action_prop;
} else if (input_editor->get_selected_column() == 1) {
-
String name = "input/" + ti->get_text(0);
Dictionary old_action = ProjectSettings::get_singleton()->get(name);
Dictionary new_action = old_action.duplicate();
@@ -257,7 +251,6 @@ void ProjectSettingsEditor::_action_edited() {
}
void ProjectSettingsEditor::_device_input_add() {
-
Ref<InputEvent> ie;
String name = add_at;
int idx = edit_idx;
@@ -266,19 +259,17 @@ void ProjectSettingsEditor::_device_input_add() {
Array events = action["events"];
switch (add_type) {
-
case INPUT_MOUSE_BUTTON: {
-
Ref<InputEventMouseButton> mb;
mb.instance();
mb->set_button_index(device_index->get_selected() + 1);
mb->set_device(_get_current_device());
for (int i = 0; i < events.size(); i++) {
-
Ref<InputEventMouseButton> aie = events[i];
- if (aie.is_null())
+ if (aie.is_null()) {
continue;
+ }
if (aie->get_device() == mb->get_device() && aie->get_button_index() == mb->get_button_index()) {
return;
}
@@ -288,7 +279,6 @@ void ProjectSettingsEditor::_device_input_add() {
} break;
case INPUT_JOY_MOTION: {
-
Ref<InputEventJoypadMotion> jm;
jm.instance();
jm->set_axis(device_index->get_selected() >> 1);
@@ -296,10 +286,10 @@ void ProjectSettingsEditor::_device_input_add() {
jm->set_device(_get_current_device());
for (int i = 0; i < events.size(); i++) {
-
Ref<InputEventJoypadMotion> aie = events[i];
- if (aie.is_null())
+ if (aie.is_null()) {
continue;
+ }
if (aie->get_device() == jm->get_device() && aie->get_axis() == jm->get_axis() && aie->get_axis_value() == jm->get_axis_value()) {
return;
@@ -310,7 +300,6 @@ void ProjectSettingsEditor::_device_input_add() {
} break;
case INPUT_JOY_BUTTON: {
-
Ref<InputEventJoypadButton> jb;
jb.instance();
@@ -318,10 +307,10 @@ void ProjectSettingsEditor::_device_input_add() {
jb->set_device(_get_current_device());
for (int i = 0; i < events.size(); i++) {
-
Ref<InputEventJoypadButton> aie = events[i];
- if (aie.is_null())
+ if (aie.is_null()) {
continue;
+ }
if (aie->get_device() == jb->get_device() && aie->get_button_index() == jb->get_button_index()) {
return;
}
@@ -361,15 +350,16 @@ int ProjectSettingsEditor::_get_current_device() {
}
String ProjectSettingsEditor::_get_device_string(int i_device) {
- if (i_device == InputMap::ALL_DEVICES)
+ if (i_device == InputMap::ALL_DEVICES) {
return TTR("All Devices");
+ }
return TTR("Device") + " " + itos(i_device);
}
void ProjectSettingsEditor::_press_a_key_confirm() {
-
- if (last_wait_for_key.is_null())
+ if (last_wait_for_key.is_null()) {
return;
+ }
Ref<InputEventKey> ie;
ie.instance();
@@ -393,10 +383,10 @@ void ProjectSettingsEditor::_press_a_key_confirm() {
Array events = action["events"];
for (int i = 0; i < events.size(); i++) {
-
Ref<InputEventKey> aie = events[i];
- if (aie.is_null())
+ if (aie.is_null()) {
continue;
+ }
if (!press_a_key_physical) {
if (aie->get_keycode_with_modifiers() == ie->get_keycode_with_modifiers()) {
return;
@@ -432,11 +422,13 @@ void ProjectSettingsEditor::_show_last_added(const Ref<InputEvent> &p_event, con
String name = p_name;
name.erase(0, 6);
- if (!r)
+ if (!r) {
return;
+ }
r = r->get_children();
- if (!r)
+ if (!r) {
return;
+ }
bool found = false;
while (r) {
if (r->get_text(0) != name) {
@@ -454,21 +446,21 @@ void ProjectSettingsEditor::_show_last_added(const Ref<InputEvent> &p_event, con
}
child = child->get_next();
}
- if (found)
+ if (found) {
break;
+ }
r = r->get_next();
}
- if (found)
+ if (found) {
input_editor->ensure_cursor_is_visible();
+ }
}
void ProjectSettingsEditor::_wait_for_key(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed() && k->get_keycode() != 0) {
-
last_wait_for_key = p_event;
const String str = (press_a_key_physical) ? keycode_get_string(k->get_physical_keycode_with_modifiers()) + TTR(" (Physical)") : keycode_get_string(k->get_keycode_with_modifiers());
@@ -479,13 +471,10 @@ void ProjectSettingsEditor::_wait_for_key(const Ref<InputEvent> &p_event) {
}
void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_event) {
-
add_type = InputType(p_item);
switch (add_type) {
-
case INPUT_KEY: {
-
press_a_key_physical = false;
press_a_key_label->set_text(TTR("Press a Key..."));
press_a_key->get_ok()->set_disabled(true);
@@ -495,7 +484,6 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
} break;
case INPUT_KEY_PHYSICAL: {
-
press_a_key_physical = true;
press_a_key_label->set_text(TTR("Press a Key..."));
@@ -505,7 +493,6 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
} break;
case INPUT_MOUSE_BUTTON: {
-
device_index_label->set_text(TTR("Mouse Button Index:"));
device_index->clear();
device_index->add_item(TTR("Left Button"));
@@ -531,7 +518,6 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
} break;
case INPUT_JOY_MOTION: {
-
device_index_label->set_text(TTR("Joypad Axis Index:"));
device_index->clear();
for (int i = 0; i < JOY_AXIS_MAX * 2; i++) {
@@ -553,13 +539,13 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
} break;
case INPUT_JOY_BUTTON: {
-
device_index_label->set_text(TTR("Joypad Button Index:"));
device_index->clear();
for (int i = 0; i < JOY_BUTTON_MAX; i++) {
String desc = TTR("Button") + " " + itos(i);
- if (i < JOY_SDL_BUTTONS)
+ if (i < JOY_SDL_BUTTONS) {
desc += " (" + TTR(_button_descriptions[i]) + ")";
+ }
device_index->add_item(desc);
}
device_input->popup_centered(Size2(350, 95) * EDSCALE);
@@ -581,7 +567,6 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
}
void ProjectSettingsEditor::_edit_item(Ref<InputEvent> p_exiting_event) {
-
InputType ie_type;
if ((Ref<InputEventKey>(p_exiting_event)).is_valid()) {
@@ -606,12 +591,13 @@ void ProjectSettingsEditor::_edit_item(Ref<InputEvent> p_exiting_event) {
_add_item(ie_type, p_exiting_event);
}
-void ProjectSettingsEditor::_action_activated() {
+void ProjectSettingsEditor::_action_activated() {
TreeItem *ti = input_editor->get_selected();
- if (!ti || ti->get_parent() == input_editor->get_root())
+ if (!ti || ti->get_parent() == input_editor->get_root()) {
return;
+ }
String name = "input/" + ti->get_parent()->get_text(0);
int idx = ti->get_metadata(0);
@@ -620,8 +606,9 @@ void ProjectSettingsEditor::_action_activated() {
ERR_FAIL_INDEX(idx, events.size());
Ref<InputEvent> event = events[idx];
- if (event.is_null())
+ if (event.is_null()) {
return;
+ }
add_at = name;
edit_idx = idx;
@@ -629,7 +616,6 @@ void ProjectSettingsEditor::_action_activated() {
}
void ProjectSettingsEditor::_action_button_pressed(Object *p_obj, int p_column, int p_id) {
-
TreeItem *ti = Object::cast_to<TreeItem>(p_obj);
ERR_FAIL_COND(!ti);
@@ -705,8 +691,9 @@ void ProjectSettingsEditor::_action_button_pressed(Object *p_obj, int p_column,
Ref<InputEvent> event = events[idx];
- if (event.is_null())
+ if (event.is_null()) {
return;
+ }
ti->set_as_cursor(0);
add_at = name;
@@ -717,9 +704,9 @@ void ProjectSettingsEditor::_action_button_pressed(Object *p_obj, int p_column,
}
void ProjectSettingsEditor::_update_actions() {
-
- if (setting)
+ if (setting) {
return;
+ }
Map<String, bool> collapsed;
@@ -737,14 +724,15 @@ void ProjectSettingsEditor::_update_actions() {
ProjectSettings::get_singleton()->get_property_list(&props);
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
-
const PropertyInfo &pi = E->get();
- if (!pi.name.begins_with("input/"))
+ if (!pi.name.begins_with("input/")) {
continue;
+ }
String name = pi.name.get_slice("/", 1);
- if (name == "")
+ if (name == "") {
continue;
+ }
Dictionary action = ProjectSettings::get_singleton()->get(pi.name);
Array events = action["events"];
@@ -752,8 +740,9 @@ void ProjectSettingsEditor::_update_actions() {
TreeItem *item = input_editor->create_item(root);
item->set_text(0, name);
item->set_custom_bg_color(0, input_editor->get_theme_color("prop_subsection", "Editor"));
- if (collapsed.has(name))
+ if (collapsed.has(name)) {
item->set_collapsed(collapsed[name]);
+ }
item->set_editable(1, true);
item->set_cell_mode(1, TreeItem::CELL_MODE_RANGE);
@@ -777,16 +766,15 @@ void ProjectSettingsEditor::_update_actions() {
}
for (int i = 0; i < events.size(); i++) {
-
Ref<InputEvent> event = events[i];
- if (event.is_null())
+ if (event.is_null()) {
continue;
+ }
TreeItem *action2 = input_editor->create_item(item);
Ref<InputEventKey> k = event;
if (k.is_valid()) {
-
const String str = (k->get_keycode() == 0) ? keycode_get_string(k->get_physical_keycode_with_modifiers()) + TTR(" (Physical)") : keycode_get_string(k->get_keycode_with_modifiers());
action2->set_text(0, str);
@@ -800,7 +788,6 @@ void ProjectSettingsEditor::_update_actions() {
Ref<InputEventJoypadButton> jb = event;
if (jb.is_valid()) {
-
String str = _get_device_string(jb->get_device()) + ", " +
TTR("Button") + " " + itos(jb->get_button_index());
if (jb->get_button_index() >= 0 && jb->get_button_index() < JOY_SDL_BUTTONS) {
@@ -842,7 +829,6 @@ void ProjectSettingsEditor::_update_actions() {
Ref<InputEventJoypadMotion> jm = event;
if (jm.is_valid()) {
-
int ax = jm->get_axis();
int n = 2 * ax + (jm->get_axis_value() < 0 ? 0 : 1);
String str = _get_device_string(jm->get_device()) + ", " +
@@ -867,7 +853,6 @@ void ProjectSettingsEditor::_update_actions() {
}
void ProjectSettingsEditor::popup_project_settings() {
-
// Restore valid window bounds or pop up at default size.
Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "project_settings", Rect2());
if (saved_size != Rect2()) {
@@ -888,22 +873,20 @@ void ProjectSettingsEditor::update_plugins() {
}
void ProjectSettingsEditor::_item_selected(const String &p_path) {
-
const String &selected_path = p_path;
- if (selected_path == String())
+ if (selected_path == String()) {
return;
+ }
category->set_text(globals_editor->get_current_section());
property->set_text(selected_path);
popup_copy_to_feature->set_disabled(false);
}
void ProjectSettingsEditor::_item_adds(String) {
-
_item_add();
}
void ProjectSettingsEditor::_item_add() {
-
// Initialize the property with the default value for the given type.
// The type list starts at 1 (as we exclude Nil), so add 1 to the selected value.
Callable::CallError ce;
@@ -946,7 +929,6 @@ void ProjectSettingsEditor::_item_add() {
}
void ProjectSettingsEditor::_item_del() {
-
String path = globals_editor->get_inspector()->get_selected_path();
if (path == String()) {
EditorNode::get_singleton()->show_warning(TTR("Select a setting item first!"));
@@ -984,21 +966,16 @@ void ProjectSettingsEditor::_item_del() {
}
void ProjectSettingsEditor::_action_check(String p_action) {
-
if (p_action == "") {
-
action_add->set_disabled(true);
} else {
-
if (!_validate_action_name(p_action)) {
-
action_add_error->set_text(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'."));
action_add_error->show();
action_add->set_disabled(true);
return;
}
if (ProjectSettings::get_singleton()->has_setting("input/" + p_action)) {
-
action_add_error->set_text(vformat(TTR("An action with the name '%s' already exists."), p_action));
action_add_error->show();
action_add->set_disabled(true);
@@ -1012,14 +989,12 @@ void ProjectSettingsEditor::_action_check(String p_action) {
}
void ProjectSettingsEditor::_action_adds(String) {
-
if (!action_add->is_disabled()) {
_action_add();
}
}
void ProjectSettingsEditor::_action_add() {
-
Dictionary action;
action["events"] = Array();
action["deadzone"] = 0.5f;
@@ -1035,13 +1010,16 @@ void ProjectSettingsEditor::_action_add() {
TreeItem *r = input_editor->get_root();
- if (!r)
+ if (!r) {
return;
+ }
r = r->get_children();
- if (!r)
+ if (!r) {
return;
- while (r->get_next())
+ }
+ while (r->get_next()) {
r = r->get_next();
+ }
r->select(0);
input_editor->ensure_cursor_is_visible();
@@ -1053,20 +1031,17 @@ void ProjectSettingsEditor::_item_checked(const String &p_item, bool p_check) {
}
void ProjectSettingsEditor::_save() {
-
Error err = ProjectSettings::get_singleton()->save();
message->set_text(err != OK ? TTR("Error saving settings.") : TTR("Settings saved OK."));
message->popup_centered(Size2(300, 100) * EDSCALE);
}
void ProjectSettingsEditor::_settings_prop_edited(const String &p_name) {
-
// Method needed to discard the mandatory argument of the property_edited signal
_settings_changed();
}
void ProjectSettingsEditor::_settings_changed() {
-
timer->start();
}
@@ -1075,7 +1050,6 @@ void ProjectSettingsEditor::queue_save() {
}
void ProjectSettingsEditor::_copy_to_platform_about_to_show() {
-
Set<String> presets;
presets.insert("bptc");
@@ -1101,7 +1075,6 @@ void ProjectSettingsEditor::_copy_to_platform_about_to_show() {
}
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
-
List<String> p;
EditorExport::get_singleton()->get_export_preset(i)->get_platform()->get_preset_features(EditorExport::get_singleton()->get_export_preset(i), &p);
for (List<String>::Element *E = p.front(); E; E = E->next()) {
@@ -1126,10 +1099,10 @@ void ProjectSettingsEditor::_copy_to_platform_about_to_show() {
}
Variant ProjectSettingsEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
-
TreeItem *selected = input_editor->get_selected();
- if (!selected || selected->get_parent() != input_editor->get_root())
+ if (!selected || selected->get_parent() != input_editor->get_root()) {
return Variant();
+ }
String name = selected->get_text(0);
VBoxContainer *vb = memnew(VBoxContainer);
@@ -1149,28 +1122,30 @@ Variant ProjectSettingsEditor::get_drag_data_fw(const Point2 &p_point, Control *
}
bool ProjectSettingsEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
Dictionary d = p_data;
- if (!d.has("type") || d["type"] != "nodes")
+ if (!d.has("type") || d["type"] != "nodes") {
return false;
+ }
TreeItem *selected = input_editor->get_selected();
TreeItem *item = input_editor->get_item_at_position(p_point);
- if (!selected || !item || item == selected || item->get_parent() == selected)
+ if (!selected || !item || item == selected || item->get_parent() == selected) {
return false;
+ }
return true;
}
void ProjectSettingsEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
-
- if (!can_drop_data_fw(p_point, p_data, p_from))
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
TreeItem *selected = input_editor->get_selected();
TreeItem *item = input_editor->get_item_at_position(p_point);
- if (!item)
+ if (!item) {
return;
+ }
TreeItem *target = item->get_parent() == input_editor->get_root() ? item : item->get_parent();
String selected_name = "input/" + selected->get_text(0);
@@ -1184,7 +1159,6 @@ void ProjectSettingsEditor::drop_data_fw(const Point2 &p_point, const Variant &p
undo_redo->create_action(TTR("Moved Input Action Event"));
while (iterator != target) {
-
String iterator_name = "input/" + iterator->get_text(0);
int iterator_order = ProjectSettings::get_singleton()->get_order(iterator_name);
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set_order", iterator_name, order);
@@ -1206,7 +1180,6 @@ void ProjectSettingsEditor::drop_data_fw(const Point2 &p_point, const Variant &p
}
void ProjectSettingsEditor::_copy_to_platform(int p_which) {
-
String path = globals_editor->get_inspector()->get_selected_path();
if (path == String()) {
EditorNode::get_singleton()->show_warning(TTR("Select a setting item first!"));
@@ -1241,18 +1214,16 @@ void ProjectSettingsEditor::_copy_to_platform(int p_which) {
}
void ProjectSettingsEditor::add_translation(const String &p_translation) {
-
_translation_add(p_translation);
}
void ProjectSettingsEditor::_translation_add(const String &p_path) {
-
PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
for (int i = 0; i < translations.size(); i++) {
-
- if (translations[i] == p_path)
+ if (translations[i] == p_path) {
return; //exists
+ }
}
translations.push_back(p_path);
@@ -1267,12 +1238,10 @@ void ProjectSettingsEditor::_translation_add(const String &p_path) {
}
void ProjectSettingsEditor::_translation_file_open() {
-
translation_file_open->popup_centered_ratio();
}
void ProjectSettingsEditor::_translation_delete(Object *p_item, int p_column, int p_button) {
-
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!ti);
@@ -1295,12 +1264,10 @@ void ProjectSettingsEditor::_translation_delete(Object *p_item, int p_column, in
}
void ProjectSettingsEditor::_translation_res_file_open() {
-
translation_res_file_open->popup_centered_ratio();
}
void ProjectSettingsEditor::_translation_res_add(const String &p_path) {
-
Variant prev;
Dictionary remaps;
@@ -1309,8 +1276,9 @@ void ProjectSettingsEditor::_translation_res_add(const String &p_path) {
prev = remaps;
}
- if (remaps.has(p_path))
+ if (remaps.has(p_path)) {
return; //pointless already has it
+ }
remaps[p_path] = PackedStringArray();
@@ -1325,11 +1293,10 @@ void ProjectSettingsEditor::_translation_res_add(const String &p_path) {
}
void ProjectSettingsEditor::_translation_res_option_file_open() {
-
translation_res_option_file_open->popup_centered_ratio();
}
-void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) {
+void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) {
ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"));
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1355,20 +1322,21 @@ void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) {
}
void ProjectSettingsEditor::_translation_res_select() {
-
- if (updating_translations)
+ if (updating_translations) {
return;
+ }
call_deferred("_update_translations");
}
void ProjectSettingsEditor::_translation_res_option_changed() {
-
- if (updating_translations)
+ if (updating_translations) {
return;
+ }
- if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
return;
+ }
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1409,12 +1377,13 @@ void ProjectSettingsEditor::_translation_res_option_changed() {
}
void ProjectSettingsEditor::_translation_res_delete(Object *p_item, int p_column, int p_button) {
-
- if (updating_translations)
+ if (updating_translations) {
return;
+ }
- if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
return;
+ }
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1436,12 +1405,13 @@ void ProjectSettingsEditor::_translation_res_delete(Object *p_item, int p_column
}
void ProjectSettingsEditor::_translation_res_option_delete(Object *p_item, int p_column, int p_button) {
-
- if (updating_translations)
+ if (updating_translations) {
return;
+ }
- if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
return;
+ }
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -1470,7 +1440,6 @@ void ProjectSettingsEditor::_translation_res_option_delete(Object *p_item, int p
}
void ProjectSettingsEditor::_translation_filter_option_changed() {
-
int sel_id = translation_locale_filter_mode->get_selected_id();
TreeItem *t = translation_filter->get_edited();
String locale = t->get_tooltip(0);
@@ -1519,7 +1488,6 @@ void ProjectSettingsEditor::_translation_filter_option_changed() {
}
void ProjectSettingsEditor::_translation_filter_mode_changed(int p_mode) {
-
int sel_id = translation_locale_filter_mode->get_selected_id();
Variant prev;
@@ -1552,11 +1520,11 @@ void ProjectSettingsEditor::_translation_filter_mode_changed(int p_mode) {
}
void ProjectSettingsEditor::_update_translations() {
-
//update translations
- if (updating_translations)
+ if (updating_translations) {
return;
+ }
updating_translations = true;
@@ -1564,10 +1532,8 @@ void ProjectSettingsEditor::_update_translations() {
TreeItem *root = translation_list->create_item(nullptr);
translation_list->set_hide_root(true);
if (ProjectSettings::get_singleton()->has_setting("locale/translations")) {
-
PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
for (int i = 0; i < translations.size(); i++) {
-
TreeItem *t = translation_list->create_item(root);
t->set_editable(0, false);
t->set_text(0, translations[i].replace_first("res://", ""));
@@ -1585,17 +1551,14 @@ void ProjectSettingsEditor::_update_translations() {
bool is_arr_empty = true;
if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) {
-
l_filter_all = ProjectSettings::get_singleton()->get("locale/locale_filter");
if (l_filter_all.size() == 2) {
-
translation_locale_filter_mode->select(l_filter_all[0]);
is_arr_empty = false;
}
}
if (is_arr_empty) {
-
l_filter_all.append(0);
l_filter_all.append(Array());
translation_locale_filter_mode->select(0);
@@ -1610,7 +1573,6 @@ void ProjectSettingsEditor::_update_translations() {
bool should_recreate_locales_list = is_short_list_when_show_all_selected || is_full_list_when_show_only_selected;
if (!translation_locales_list_created || should_recreate_locales_list) {
-
translation_locales_list_created = true;
translation_filter->clear();
root = translation_filter->create_item(nullptr);
@@ -1620,8 +1582,9 @@ void ProjectSettingsEditor::_update_translations() {
String n = names[i];
String l = langs[i];
bool is_checked = l_filter.has(l);
- if (filter_mode == SHOW_ONLY_SELECTED_LOCALES && !is_checked)
+ if (filter_mode == SHOW_ONLY_SELECTED_LOCALES && !is_checked) {
continue;
+ }
TreeItem *t = translation_filter->create_item(root);
t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
@@ -1660,27 +1623,26 @@ void ProjectSettingsEditor::_update_translations() {
String langnames = "";
int l_idx = 0;
for (int i = 0; i < names.size(); i++) {
-
if (filter_mode == SHOW_ONLY_SELECTED_LOCALES && fl_idx_count != 0) {
if (l_filter.size() > 0) {
-
if (l_filter.find(langs[i]) != -1) {
- if (langnames.length() > 0)
+ if (langnames.length() > 0) {
langnames += ",";
+ }
langnames += names[i];
translation_locales_idxs_remap.write[l_idx] = i;
l_idx++;
}
}
} else {
- if (i > 0)
+ if (i > 0) {
langnames += ",";
+ }
langnames += names[i];
}
}
if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
-
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
List<Variant> rk;
remaps.get_key_list(&rk);
@@ -1691,7 +1653,6 @@ void ProjectSettingsEditor::_update_translations() {
keys.sort();
for (int i = 0; i < keys.size(); i++) {
-
TreeItem *t = translation_remap->create_item(root);
t->set_editable(0, false);
t->set_text(0, keys[i].replace_first("res://", ""));
@@ -1704,7 +1665,6 @@ void ProjectSettingsEditor::_update_translations() {
PackedStringArray selected = remaps[keys[i]];
for (int j = 0; j < selected.size(); j++) {
-
String s2 = selected[j];
int qp = s2.find_last(":");
String path = s2.substr(0, qp);
@@ -1721,15 +1681,14 @@ void ProjectSettingsEditor::_update_translations() {
t2->set_editable(1, true);
t2->set_metadata(1, path);
int idx = langs.find(locale);
- if (idx < 0)
+ if (idx < 0) {
idx = 0;
+ }
int f_idx = translation_locales_idxs_remap.find(idx);
if (f_idx != -1 && fl_idx_count > 0 && filter_mode == SHOW_ONLY_SELECTED_LOCALES) {
-
t2->set_range(1, f_idx);
} else {
-
t2->set_range(1, idx);
}
}
@@ -1741,17 +1700,14 @@ void ProjectSettingsEditor::_update_translations() {
}
void ProjectSettingsEditor::_toggle_search_bar(bool p_pressed) {
-
globals_editor->get_inspector()->set_use_filter(p_pressed);
if (p_pressed) {
-
search_bar->show();
add_prop_bar->hide();
search_box->grab_focus();
search_box->select_all();
} else {
-
search_box->clear();
search_bar->hide();
add_prop_bar->show();
@@ -1759,12 +1715,10 @@ void ProjectSettingsEditor::_toggle_search_bar(bool p_pressed) {
}
void ProjectSettingsEditor::set_plugins_page() {
-
tab_container->set_current_tab(plugin_settings->get_index());
}
TabContainer *ProjectSettingsEditor::get_tabs() {
-
return tab_container;
}
@@ -1782,7 +1736,6 @@ void ProjectSettingsEditor::_editor_restart_close() {
}
void ProjectSettingsEditor::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_unhandled_input"), &ProjectSettingsEditor::_unhandled_input);
ClassDB::bind_method(D_METHOD("_item_checked"), &ProjectSettingsEditor::_item_checked);
ClassDB::bind_method(D_METHOD("_save"), &ProjectSettingsEditor::_save);
@@ -1798,7 +1751,6 @@ void ProjectSettingsEditor::_bind_methods() {
}
ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
-
singleton = this;
set_title(TTR("Project Settings (project.godot)"));
@@ -2021,8 +1973,9 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
vbc_left->add_child(l);
device_id = memnew(OptionButton);
- for (int i = -1; i < 8; i++)
+ for (int i = -1; i < 8; i++) {
device_id->add_item(_get_device_string(i));
+ }
_set_current_device(0);
vbc_left->add_child(device_id);
@@ -2052,7 +2005,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
translation_locales_list_created = false;
{
-
VBoxContainer *tvb = memnew(VBoxContainer);
translations->add_child(tvb);
tvb->set_name(TTR("Translations"));
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 5475bb5508..445ef58351 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -41,7 +41,6 @@
#include "scene/gui/tab_container.h"
class ProjectSettingsEditor : public AcceptDialog {
-
GDCLASS(ProjectSettingsEditor, AcceptDialog);
enum InputType {
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 60329fb7bc..49b9ca167b 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -59,7 +59,6 @@
#include "scene/scene_string_names.h"
void EditorResourceConversionPlugin::_bind_methods() {
-
MethodInfo mi;
mi.name = "_convert";
mi.return_val.type = Variant::OBJECT;
@@ -78,48 +77,42 @@ void EditorResourceConversionPlugin::_bind_methods() {
}
String EditorResourceConversionPlugin::converts_to() const {
-
- if (get_script_instance())
+ if (get_script_instance()) {
return get_script_instance()->call("_converts_to");
+ }
return "";
}
bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const {
-
- if (get_script_instance())
+ if (get_script_instance()) {
return get_script_instance()->call("_handles", p_resource);
+ }
return false;
}
Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) const {
-
- if (get_script_instance())
+ if (get_script_instance()) {
return get_script_instance()->call("_convert", p_resource);
+ }
return Ref<Resource>();
}
void CustomPropertyEditor::_notification(int p_what) {
-
if (p_what == NOTIFICATION_WM_CLOSE_REQUEST) {
hide();
}
}
void CustomPropertyEditor::_menu_option(int p_which) {
-
switch (type) {
-
case Variant::INT: {
-
if (hint == PROPERTY_HINT_FLAGS) {
-
int val = v;
if (val & (1 << p_which)) {
-
val &= ~(1 << p_which);
} else {
val |= (1 << p_which);
@@ -128,30 +121,24 @@ void CustomPropertyEditor::_menu_option(int p_which) {
v = val;
emit_signal("variant_changed");
} else if (hint == PROPERTY_HINT_ENUM) {
-
v = menu->get_item_metadata(p_which);
emit_signal("variant_changed");
}
} break;
case Variant::STRING: {
-
if (hint == PROPERTY_HINT_ENUM) {
-
v = hint_text.get_slice(",", p_which);
emit_signal("variant_changed");
}
} break;
case Variant::OBJECT: {
-
switch (p_which) {
case OBJ_MENU_LOAD: {
-
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
String type = (hint == PROPERTY_HINT_RESOURCE_TYPE) ? hint_text : String();
List<String> extensions;
for (int i = 0; i < type.get_slice_count(","); i++) {
-
ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",", i), &extensions);
}
@@ -162,7 +149,6 @@ void CustomPropertyEditor::_menu_option(int p_which) {
file->clear_filters();
for (Set<String>::Element *E = valid_extensions.front(); E; E = E->next()) {
-
file->add_filter("*." + E->get() + " ; " + E->get().to_upper());
}
@@ -170,38 +156,33 @@ void CustomPropertyEditor::_menu_option(int p_which) {
} break;
case OBJ_MENU_EDIT: {
-
REF r = v;
if (!r.is_null()) {
-
emit_signal("resource_edit_request");
hide();
}
} break;
case OBJ_MENU_CLEAR: {
-
v = Variant();
emit_signal("variant_changed");
hide();
} break;
case OBJ_MENU_MAKE_UNIQUE: {
-
Ref<Resource> res_orig = v;
- if (res_orig.is_null())
+ if (res_orig.is_null()) {
return;
+ }
List<PropertyInfo> property_list;
res_orig->get_property_list(&property_list);
List<Pair<String, Variant>> propvalues;
for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) {
-
Pair<String, Variant> p;
PropertyInfo &pi = E->get();
if (pi.usage & PROPERTY_USAGE_STORAGE) {
-
p.first = pi.name;
p.second = res_orig->get(pi.name);
}
@@ -218,7 +199,6 @@ void CustomPropertyEditor::_menu_option(int p_which) {
ERR_FAIL_COND(res.is_null());
for (List<Pair<String, Variant>>::Element *E = propvalues.front(); E; E = E->next()) {
-
Pair<String, Variant> &p = E->get();
res->set(p.first, p.second);
}
@@ -229,26 +209,24 @@ void CustomPropertyEditor::_menu_option(int p_which) {
} break;
case OBJ_MENU_COPY: {
-
EditorSettings::get_singleton()->set_resource_clipboard(v);
} break;
case OBJ_MENU_PASTE: {
-
v = EditorSettings::get_singleton()->get_resource_clipboard();
emit_signal("variant_changed");
} break;
case OBJ_MENU_NEW_SCRIPT: {
-
- if (Object::cast_to<Node>(owner))
+ if (Object::cast_to<Node>(owner)) {
EditorNode::get_singleton()->get_scene_tree_dock()->open_script_dialog(Object::cast_to<Node>(owner), false);
+ }
} break;
case OBJ_MENU_EXTEND_SCRIPT: {
-
- if (Object::cast_to<Node>(owner))
+ if (Object::cast_to<Node>(owner)) {
EditorNode::get_singleton()->get_scene_tree_dock()->open_script_dialog(Object::cast_to<Node>(owner), true);
+ }
} break;
case OBJ_MENU_SHOW_IN_FILE_SYSTEM: {
@@ -260,9 +238,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
tab_container->set_current_tab(file_system_dock->get_index());
} break;
default: {
-
if (p_which >= CONVERT_BASE_ID) {
-
int to_type = p_which - CONVERT_BASE_ID;
Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v));
@@ -280,7 +256,6 @@ void CustomPropertyEditor::_menu_option(int p_which) {
String intype = inheritors_array[p_which - TYPE_BASE_ID];
if (intype == "ViewportTexture") {
-
scene_tree->set_title(TTR("Pick a Viewport"));
scene_tree->popup_centered_ratio();
picking_viewport = true;
@@ -322,17 +297,14 @@ void CustomPropertyEditor::hide_menu() {
}
Variant CustomPropertyEditor::get_variant() const {
-
return v;
}
String CustomPropertyEditor::get_name() const {
-
return name;
}
bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::Type p_type, const Variant &p_variant, int p_hint, String p_hint_text) {
-
owner = p_owner;
updating = true;
name = p_name;
@@ -341,8 +313,9 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
hint = p_hint;
hint_text = p_hint_text;
type_button->hide();
- if (color_picker)
+ if (color_picker) {
color_picker->hide();
+ }
texture_preview->hide();
inheritors_array.clear();
text_edit->hide();
@@ -353,28 +326,29 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
menu->set_size(Size2(1, 1) * EDSCALE);
for (int i = 0; i < MAX_VALUE_EDITORS; i++) {
-
+ if (i < MAX_VALUE_EDITORS / 4) {
+ value_hboxes[i]->hide();
+ }
value_editor[i]->hide();
value_label[i]->hide();
- if (i < 4)
+ if (i < 4) {
scroll[i]->hide();
+ }
}
for (int i = 0; i < MAX_ACTION_BUTTONS; i++) {
-
action_buttons[i]->hide();
}
checks20gc->hide();
- for (int i = 0; i < 20; i++)
+ for (int i = 0; i < 20; i++) {
checks20[i]->hide();
+ }
type = (p_variant.get_type() != Variant::NIL && p_variant.get_type() != Variant::_RID && p_type != Variant::OBJECT) ? p_variant.get_type() : p_type;
switch (type) {
-
case Variant::BOOL: {
-
checks20gc->show();
CheckBox *c = checks20[0];
@@ -389,26 +363,24 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::INT:
case Variant::FLOAT: {
-
if (hint == PROPERTY_HINT_RANGE) {
-
int c = hint_text.get_slice_count(",");
float min = 0, max = 100, step = type == Variant::FLOAT ? .01 : 1;
if (c >= 1) {
-
- if (!hint_text.get_slice(",", 0).empty())
+ if (!hint_text.get_slice(",", 0).empty()) {
min = hint_text.get_slice(",", 0).to_double();
+ }
}
if (c >= 2) {
-
- if (!hint_text.get_slice(",", 1).empty())
+ if (!hint_text.get_slice(",", 1).empty()) {
max = hint_text.get_slice(",", 1).to_double();
+ }
}
if (c >= 3) {
-
- if (!hint_text.get_slice(",", 2).empty())
+ if (!hint_text.get_slice(",", 2).empty()) {
step = hint_text.get_slice(",", 2).to_double();
+ }
}
if (c >= 4 && hint_text.get_slice(",", 3) == "slider") {
@@ -428,13 +400,13 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
}
} else if (hint == PROPERTY_HINT_ENUM) {
-
Vector<String> options = hint_text.split(",");
int current_val = 0;
for (int i = 0; i < options.size(); i++) {
Vector<String> text_split = options[i].split(":");
- if (text_split.size() != 1)
+ if (text_split.size() != 1) {
current_val = text_split[1].to_int();
+ }
menu->add_item(text_split[0]);
menu->set_item_metadata(i, current_val);
current_val += 1;
@@ -446,7 +418,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return false;
} else if (hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || hint == PROPERTY_HINT_LAYERS_2D_RENDER || hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || hint == PROPERTY_HINT_LAYERS_3D_RENDER) {
-
String basename;
switch (hint) {
case PROPERTY_HINT_LAYERS_2D_RENDER:
@@ -466,11 +437,9 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
checks20gc->show();
uint32_t flgs = v;
for (int i = 0; i < 2; i++) {
-
Point2 ofs(4, 4);
ofs.y += 22 * i;
for (int j = 0; j < 10; j++) {
-
int idx = i * 10 + j;
CheckBox *c = checks20[idx];
c->set_text(ProjectSettings::get_singleton()->get(basename + "/layer_" + itos(idx + 1)));
@@ -487,7 +456,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
set_size(Vector2(4, 4) * EDSCALE + checks20gc->get_position() + checks20gc->get_size());
} else if (hint == PROPERTY_HINT_EXP_EASING) {
-
easing_draw->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, 5 * EDSCALE);
easing_draw->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -5 * EDSCALE);
easing_draw->set_anchor_and_margin(MARGIN_TOP, Control::ANCHOR_BEGIN, 5 * EDSCALE);
@@ -514,12 +482,14 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
Vector<String> flags = hint_text.split(",");
for (int i = 0; i < flags.size(); i++) {
String flag = flags[i];
- if (flag == "")
+ if (flag == "") {
continue;
+ }
menu->add_check_item(flag, i);
int f = v;
- if (f & (1 << i))
+ if (f & (1 << i)) {
menu->set_item_checked(menu->get_item_index(i), true);
+ }
}
menu->set_position(get_position());
menu->popup();
@@ -536,22 +506,18 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::STRING: {
-
if (hint == PROPERTY_HINT_FILE || hint == PROPERTY_HINT_GLOBAL_FILE) {
-
List<String> names;
names.push_back(TTR("File..."));
names.push_back(TTR("Clear"));
config_action_buttons(names);
} else if (hint == PROPERTY_HINT_DIR || hint == PROPERTY_HINT_GLOBAL_DIR) {
-
List<String> names;
names.push_back(TTR("Dir..."));
names.push_back(TTR("Clear"));
config_action_buttons(names);
} else if (hint == PROPERTY_HINT_ENUM) {
-
Vector<String> options = hint_text.split(",");
for (int i = 0; i < options.size(); i++) {
menu->add_item(options[i], i);
@@ -563,7 +529,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return false;
} else if (hint == PROPERTY_HINT_MULTILINE_TEXT) {
-
text_edit->show();
text_edit->set_text(v);
text_edit->deselect();
@@ -581,7 +546,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
action_buttons[0]->show();
} else if (hint == PROPERTY_HINT_TYPE_STRING) {
-
if (!create_dialog) {
create_dialog = memnew(CreateDialog);
create_dialog->connect("create", callable_mp(this, &CustomPropertyEditor::_create_dialog_callback));
@@ -616,8 +580,9 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
type = Variant::Type(i);
}
}
- if (type != Variant::NIL)
+ if (type != Variant::NIL) {
property_select->select_method_from_basic_type(type, v);
+ }
updating = false;
return false;
@@ -630,12 +595,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return false;
} else if (hint == PROPERTY_HINT_METHOD_OF_INSTANCE) {
-
MAKE_PROPSELECT
Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
- if (instance)
+ if (instance) {
property_select->select_method_from_instance(instance, v);
+ }
updating = false;
return false;
@@ -651,26 +616,26 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return false;
} else if (hint == PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE) {
-
MAKE_PROPSELECT
Variant::Type type = Variant::NIL;
String tname = hint_text;
- if (tname.find(".") != -1)
+ if (tname.find(".") != -1) {
tname = tname.get_slice(".", 0);
+ }
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
if (tname == Variant::get_type_name(Variant::Type(i))) {
type = Variant::Type(Variant::Type(i));
}
}
- if (type != Variant::NIL)
+ if (type != Variant::NIL) {
property_select->select_property_from_basic_type(type, v);
+ }
updating = false;
return false;
} else if (hint == PROPERTY_HINT_PROPERTY_OF_BASE_TYPE) {
-
MAKE_PROPSELECT
property_select->select_property_from_base_type(hint_text, v);
@@ -679,12 +644,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return false;
} else if (hint == PROPERTY_HINT_PROPERTY_OF_INSTANCE) {
-
MAKE_PROPSELECT
Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
- if (instance)
+ if (instance) {
property_select->select_property_from_instance(instance, v);
+ }
updating = false;
return false;
@@ -709,7 +674,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::VECTOR2: {
-
field_names.push_back("x");
field_names.push_back("y");
config_value_editors(2, 2, 10, field_names);
@@ -718,7 +682,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_editor[1]->set_text(String::num(vec.y));
} break;
case Variant::RECT2: {
-
field_names.push_back("x");
field_names.push_back("y");
field_names.push_back("w");
@@ -731,7 +694,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_editor[3]->set_text(String::num(r.size.y));
} break;
case Variant::VECTOR3: {
-
field_names.push_back("x");
field_names.push_back("y");
field_names.push_back("z");
@@ -742,7 +704,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_editor[2]->set_text(String::num(vec.z));
} break;
case Variant::PLANE: {
-
field_names.push_back("x");
field_names.push_back("y");
field_names.push_back("z");
@@ -756,7 +717,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::QUAT: {
-
field_names.push_back("x");
field_names.push_back("y");
field_names.push_back("z");
@@ -770,7 +730,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::AABB: {
-
field_names.push_back("px");
field_names.push_back("py");
field_names.push_back("pz");
@@ -789,7 +748,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::TRANSFORM2D: {
-
field_names.push_back("xx");
field_names.push_back("xy");
field_names.push_back("yx");
@@ -800,13 +758,11 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
Transform2D basis = v;
for (int i = 0; i < 6; i++) {
-
value_editor[i]->set_text(String::num(basis.elements[i / 2][i % 2]));
}
} break;
case Variant::BASIS: {
-
field_names.push_back("xx");
field_names.push_back("xy");
field_names.push_back("xz");
@@ -820,13 +776,11 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
Basis basis = v;
for (int i = 0; i < 9; i++) {
-
value_editor[i]->set_text(String::num(basis.elements[i / 3][i % 3]));
}
} break;
case Variant::TRANSFORM: {
-
field_names.push_back("xx");
field_names.push_back("xy");
field_names.push_back("xz");
@@ -843,7 +797,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
Transform tr = v;
for (int i = 0; i < 9; i++) {
-
value_editor[(i / 3) * 4 + i % 3]->set_text(String::num(tr.basis.elements[i / 3][i % 3]));
}
@@ -853,7 +806,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::COLOR: {
-
if (!color_picker) {
//late init for performance
color_picker = memnew(ColorPicker);
@@ -864,10 +816,11 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
- if (default_color_mode == 1)
+ if (default_color_mode == 1) {
color_picker->set_hsv_mode(true);
- else if (default_color_mode == 2)
+ } else if (default_color_mode == 2) {
color_picker->set_raw_mode(true);
+ }
}
color_picker->show();
@@ -878,21 +831,21 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::NODE_PATH: {
-
List<String> names;
names.push_back(TTR("Assign"));
names.push_back(TTR("Clear"));
- if (owner && owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && Object::cast_to<Node>(owner)->has_node(v))
+ if (owner && owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && Object::cast_to<Node>(owner)->has_node(v)) {
names.push_back(TTR("Select Node"));
+ }
config_action_buttons(names);
} break;
case Variant::OBJECT: {
-
- if (hint != PROPERTY_HINT_RESOURCE_TYPE)
+ if (hint != PROPERTY_HINT_RESOURCE_TYPE) {
break;
+ }
if (p_name == "script" && hint_text == "Script" && Object::cast_to<Node>(owner)) {
menu->add_item(TTR("New Script"), OBJ_MENU_NEW_SCRIPT);
@@ -907,7 +860,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
}
for (int i = 0; i < hint_text.get_slice_count(","); i++) {
-
String base = hint_text.get_slice(",", i);
Set<String> valid_inheritors;
@@ -934,15 +886,17 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
for (int k = 0; k < custom_resources.size(); k++) {
if (custom_resources[k].name == t) {
is_custom_resource = true;
- if (custom_resources[k].icon.is_valid())
+ if (custom_resources[k].icon.is_valid()) {
icon = custom_resources[k].icon;
+ }
break;
}
}
}
- if (!is_custom_resource && !ClassDB::can_instance(t))
+ if (!is_custom_resource && !ClassDB::can_instance(t)) {
continue;
+ }
inheritors_array.push_back(t);
@@ -954,14 +908,14 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
}
}
- if (menu->get_item_count())
+ if (menu->get_item_count()) {
menu->add_separator();
+ }
}
menu->add_item(TTR("Load"), OBJ_MENU_LOAD);
if (!RES(v).is_null()) {
-
menu->add_item(TTR("Edit"), OBJ_MENU_EDIT);
menu->add_item(TTR("Clear"), OBJ_MENU_CLEAR);
menu->add_item(TTR("Make Unique"), OBJ_MENU_MAKE_UNIQUE);
@@ -976,32 +930,31 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
RES cb = EditorSettings::get_singleton()->get_resource_clipboard();
bool paste_valid = false;
if (cb.is_valid()) {
- if (hint_text == "")
+ if (hint_text == "") {
paste_valid = true;
- else
- for (int i = 0; i < hint_text.get_slice_count(","); i++)
+ } else {
+ for (int i = 0; i < hint_text.get_slice_count(","); i++) {
if (ClassDB::is_parent_class(cb->get_class(), hint_text.get_slice(",", i))) {
paste_valid = true;
break;
}
+ }
+ }
}
if (!RES(v).is_null() || paste_valid) {
menu->add_separator();
if (!RES(v).is_null()) {
-
menu->add_item(TTR("Copy"), OBJ_MENU_COPY);
}
if (paste_valid) {
-
menu->add_item(TTR("Paste"), OBJ_MENU_PASTE);
}
}
if (!RES(v).is_null()) {
-
Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v));
if (conversions.size()) {
menu->add_separator();
@@ -1017,34 +970,24 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
hide();
updating = false;
return false;
-
} break;
case Variant::DICTIONARY: {
-
} break;
case Variant::PACKED_BYTE_ARRAY: {
-
} break;
case Variant::PACKED_INT32_ARRAY: {
-
} break;
case Variant::PACKED_FLOAT32_ARRAY: {
-
} break;
case Variant::PACKED_INT64_ARRAY: {
-
} break;
case Variant::PACKED_FLOAT64_ARRAY: {
-
} break;
case Variant::PACKED_STRING_ARRAY: {
-
} break;
case Variant::PACKED_VECTOR3_ARRAY: {
-
} break;
case Variant::PACKED_COLOR_ARRAY: {
-
} break;
default: {
}
@@ -1055,20 +998,15 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
}
void CustomPropertyEditor::_file_selected(String p_file) {
-
switch (type) {
-
case Variant::STRING: {
-
if (hint == PROPERTY_HINT_FILE || hint == PROPERTY_HINT_DIR) {
-
v = ProjectSettings::get_singleton()->localize_path(p_file);
emit_signal("variant_changed");
hide();
}
if (hint == PROPERTY_HINT_GLOBAL_FILE || hint == PROPERTY_HINT_GLOBAL_DIR) {
-
v = p_file;
emit_signal("variant_changed");
hide();
@@ -1076,7 +1014,6 @@ void CustomPropertyEditor::_file_selected(String p_file) {
} break;
case Variant::OBJECT: {
-
String type = (hint == PROPERTY_HINT_RESOURCE_TYPE) ? hint_text : String();
RES res = ResourceLoader::load(p_file, type);
@@ -1095,29 +1032,22 @@ void CustomPropertyEditor::_file_selected(String p_file) {
}
void CustomPropertyEditor::_type_create_selected(int p_idx) {
-
if (type == Variant::INT || type == Variant::FLOAT) {
-
float newval = 0;
switch (p_idx) {
-
case EASING_LINEAR: {
-
newval = 1;
} break;
case EASING_EASE_IN: {
-
newval = 2.0;
} break;
case EASING_EASE_OUT: {
newval = 0.5;
} break;
case EASING_ZERO: {
-
newval = 0;
} break;
case EASING_IN_OUT: {
-
newval = -0.5;
} break;
case EASING_OUT_IN: {
@@ -1130,7 +1060,6 @@ void CustomPropertyEditor::_type_create_selected(int p_idx) {
easing_draw->update();
} else if (type == Variant::OBJECT) {
-
ERR_FAIL_INDEX(p_idx, inheritors_array.size());
String intype = inheritors_array[p_idx];
@@ -1157,15 +1086,12 @@ void CustomPropertyEditor::_type_create_selected(int p_idx) {
}
void CustomPropertyEditor::_color_changed(const Color &p_color) {
-
v = p_color;
emit_signal("variant_changed");
}
void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
-
if (picking_viewport) {
-
Node *to_node = get_node(p_path);
if (!Object::cast_to<Viewport>(to_node)) {
EditorNode::get_singleton()->show_warning(TTR("Selected node is not a Viewport!"));
@@ -1182,10 +1108,8 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
}
if (hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && hint_text != String()) {
-
Node *node = get_node(hint_text);
if (node) {
-
Node *tonode = node->get_node(p_path);
if (tonode) {
p_path = node->get_path_to(tonode);
@@ -1193,15 +1117,15 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
}
} else if (owner) {
-
Node *node = nullptr;
- if (owner->is_class("Node"))
+ if (owner->is_class("Node")) {
node = Object::cast_to<Node>(owner);
- else if (owner->is_class("ArrayPropertyEdit"))
+ } else if (owner->is_class("ArrayPropertyEdit")) {
node = Object::cast_to<ArrayPropertyEdit>(owner)->get_node();
- else if (owner->is_class("DictionaryPropertyEdit"))
+ } else if (owner->is_class("DictionaryPropertyEdit")) {
node = Object::cast_to<DictionaryPropertyEdit>(owner)->get_node();
+ }
if (!node) {
v = p_path;
emit_signal("variant_changed");
@@ -1221,9 +1145,9 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
}
void CustomPropertyEditor::_action_pressed(int p_which) {
-
- if (updating)
+ if (updating) {
return;
+ }
switch (type) {
case Variant::BOOL: {
@@ -1231,14 +1155,13 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
emit_signal("variant_changed");
} break;
case Variant::INT: {
-
if (hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || hint == PROPERTY_HINT_LAYERS_2D_RENDER || hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || hint == PROPERTY_HINT_LAYERS_3D_RENDER) {
-
uint32_t f = v;
- if (checks20[p_which]->is_pressed())
+ if (checks20[p_which]->is_pressed()) {
f |= (1 << p_which);
- else
+ } else {
f &= ~(1 << p_which);
+ }
v = f;
emit_signal("variant_changed");
@@ -1246,18 +1169,16 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
} break;
case Variant::STRING: {
-
if (hint == PROPERTY_HINT_MULTILINE_TEXT) {
-
hide();
} else if (hint == PROPERTY_HINT_FILE || hint == PROPERTY_HINT_GLOBAL_FILE) {
if (p_which == 0) {
-
- if (hint == PROPERTY_HINT_FILE)
+ if (hint == PROPERTY_HINT_FILE) {
file->set_access(EditorFileDialog::ACCESS_RESOURCES);
- else
+ } else {
file->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
+ }
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
file->clear_filters();
@@ -1267,37 +1188,34 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
if (hint_text != "") {
Vector<String> extensions = hint_text.split(",");
for (int i = 0; i < extensions.size(); i++) {
-
String filter = extensions[i];
- if (filter.begins_with("."))
+ if (filter.begins_with(".")) {
filter = "*" + extensions[i];
- else if (!filter.begins_with("*"))
+ } else if (!filter.begins_with("*")) {
filter = "*." + extensions[i];
+ }
file->add_filter(filter + " ; " + extensions[i].to_upper());
}
}
file->popup_centered_ratio();
} else {
-
v = "";
emit_signal("variant_changed");
hide();
}
} else if (hint == PROPERTY_HINT_DIR || hint == PROPERTY_HINT_GLOBAL_DIR) {
-
if (p_which == 0) {
-
- if (hint == PROPERTY_HINT_DIR)
+ if (hint == PROPERTY_HINT_DIR) {
file->set_access(EditorFileDialog::ACCESS_RESOURCES);
- else
+ } else {
file->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
+ }
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_DIR);
file->clear_filters();
file->popup_centered_ratio();
} else {
-
v = "";
emit_signal("variant_changed");
hide();
@@ -1306,22 +1224,17 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
} break;
case Variant::NODE_PATH: {
-
if (p_which == 0) {
-
picking_viewport = false;
scene_tree->set_title(TTR("Pick a Node"));
scene_tree->popup_centered_ratio();
} else if (p_which == 1) {
-
v = NodePath();
emit_signal("variant_changed");
hide();
} else if (p_which == 2) {
-
if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && Object::cast_to<Node>(owner)->has_node(v)) {
-
Node *target_node = Object::cast_to<Node>(owner)->get_node(v);
EditorNode::get_singleton()->get_editor_selection()->clear();
EditorNode::get_singleton()->get_scene_tree_dock()->set_selected(target_node);
@@ -1332,15 +1245,12 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
} break;
case Variant::OBJECT: {
-
if (p_which == 0) {
-
ERR_FAIL_COND(inheritors_array.empty());
String intype = inheritors_array[0];
if (hint == PROPERTY_HINT_RESOURCE_TYPE) {
-
Object *obj = ClassDB::instance(intype);
if (!obj) {
@@ -1360,7 +1270,6 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
hide();
}
} else if (p_which == 1) {
-
file->set_access(EditorFileDialog::ACCESS_RESOURCES);
file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
List<String> extensions;
@@ -1369,43 +1278,37 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
ResourceLoader::get_recognized_extensions_for_type(type, &extensions);
file->clear_filters();
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
-
file->add_filter("*." + E->get() + " ; " + E->get().to_upper());
}
file->popup_centered_ratio();
} else if (p_which == 2) {
-
RES r = v;
if (!r.is_null()) {
-
emit_signal("resource_edit_request");
hide();
}
} else if (p_which == 3) {
-
v = Variant();
emit_signal("variant_changed");
hide();
} else if (p_which == 4) {
-
Ref<Resource> res_orig = v;
- if (res_orig.is_null())
+ if (res_orig.is_null()) {
return;
+ }
List<PropertyInfo> property_list;
res_orig->get_property_list(&property_list);
List<Pair<String, Variant>> propvalues;
for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) {
-
Pair<String, Variant> p;
PropertyInfo &pi = E->get();
if (pi.usage & PROPERTY_USAGE_STORAGE) {
-
p.first = pi.name;
p.second = res_orig->get(pi.name);
}
@@ -1418,7 +1321,6 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
ERR_FAIL_COND(res.is_null());
for (List<Pair<String, Variant>>::Element *E = propvalues.front(); E; E = E->next()) {
-
Pair<String, Variant> &p = E->get();
res->set(p.first, p.second);
}
@@ -1436,23 +1338,24 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
}
void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) {
-
Ref<InputEventMouseMotion> mm = p_ev;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
-
float rel = mm->get_relative().x;
- if (rel == 0)
+ if (rel == 0) {
return;
+ }
bool flip = hint_text == "attenuation";
- if (flip)
+ if (flip) {
rel = -rel;
+ }
float val = v;
- if (val == 0)
+ if (val == 0) {
return;
+ }
bool sg = val < 0;
val = Math::absf(val);
@@ -1461,8 +1364,9 @@ void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) {
val += rel * 0.05;
val = Math::pow(2.0f, val);
- if (sg)
+ if (sg) {
val = -val;
+ }
v = val;
easing_draw->update();
@@ -1471,7 +1375,6 @@ void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) {
}
void CustomPropertyEditor::_draw_easing() {
-
RID ci = easing_draw->get_canvas_item();
Size2 s = easing_draw->get_size();
@@ -1489,7 +1392,6 @@ void CustomPropertyEditor::_draw_easing() {
Color color = easing_draw->get_theme_color("font_color", "Label");
for (int i = 1; i <= points; i++) {
-
float ifl = i / float(points);
float iflp = (i - 1) / float(points);
@@ -1508,27 +1410,24 @@ void CustomPropertyEditor::_draw_easing() {
}
void CustomPropertyEditor::_text_edit_changed() {
-
v = text_edit->get_text();
emit_signal("variant_changed");
}
void CustomPropertyEditor::_create_dialog_callback() {
-
v = create_dialog->get_selected_type();
emit_signal("variant_changed");
}
void CustomPropertyEditor::_create_selected_property(const String &p_prop) {
-
v = p_prop;
emit_signal("variant_changed");
}
void CustomPropertyEditor::_modified(String p_string) {
-
- if (updating)
+ if (updating) {
return;
+ }
updating = true;
switch (type) {
@@ -1547,7 +1446,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::FLOAT: {
-
if (hint != PROPERTY_HINT_EXP_EASING) {
String text = value_editor[0]->get_text();
v = _parse_real_expression(text);
@@ -1556,12 +1454,10 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::STRING: {
-
v = value_editor[0]->get_text();
emit_signal("variant_changed");
} break;
case Variant::VECTOR2: {
-
Vector2 vec;
vec.x = _parse_real_expression(value_editor[0]->get_text());
vec.y = _parse_real_expression(value_editor[1]->get_text());
@@ -1570,7 +1466,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::RECT2: {
-
Rect2 r2;
r2.position.x = _parse_real_expression(value_editor[0]->get_text());
@@ -1583,7 +1478,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::VECTOR3: {
-
Vector3 vec;
vec.x = _parse_real_expression(value_editor[0]->get_text());
vec.y = _parse_real_expression(value_editor[1]->get_text());
@@ -1593,7 +1487,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::PLANE: {
-
Plane pl;
pl.normal.x = _parse_real_expression(value_editor[0]->get_text());
pl.normal.y = _parse_real_expression(value_editor[1]->get_text());
@@ -1604,7 +1497,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::QUAT: {
-
Quat q;
q.x = _parse_real_expression(value_editor[0]->get_text());
q.y = _parse_real_expression(value_editor[1]->get_text());
@@ -1615,7 +1507,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::AABB: {
-
Vector3 pos;
Vector3 size;
@@ -1630,7 +1521,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::TRANSFORM2D: {
-
Transform2D m;
for (int i = 0; i < 6; i++) {
m.elements[i / 2][i % 2] = _parse_real_expression(value_editor[i]->get_text());
@@ -1641,7 +1531,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::BASIS: {
-
Basis m;
for (int i = 0; i < 9; i++) {
m.elements[i / 3][i % 3] = _parse_real_expression(value_editor[i]->get_text());
@@ -1652,7 +1541,6 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::TRANSFORM: {
-
Basis basis;
for (int i = 0; i < 9; i++) {
basis.elements[i / 3][i % 3] = _parse_real_expression(value_editor[(i / 3) * 4 + i % 3]->get_text());
@@ -1669,34 +1557,25 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::COLOR: {
-
} break;
case Variant::NODE_PATH: {
-
v = NodePath(value_editor[0]->get_text());
emit_signal("variant_changed");
} break;
case Variant::DICTIONARY: {
-
} break;
case Variant::PACKED_BYTE_ARRAY: {
-
} break;
case Variant::PACKED_INT32_ARRAY: {
-
} break;
case Variant::PACKED_FLOAT32_ARRAY: {
-
} break;
case Variant::PACKED_STRING_ARRAY: {
-
} break;
case Variant::PACKED_VECTOR3_ARRAY: {
-
} break;
case Variant::PACKED_COLOR_ARRAY: {
-
} break;
default: {
}
@@ -1719,7 +1598,6 @@ real_t CustomPropertyEditor::_parse_real_expression(String text) {
}
void CustomPropertyEditor::_emit_changed_whole_or_field() {
-
if (!Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
emit_signal("variant_changed");
} else {
@@ -1781,7 +1659,6 @@ void CustomPropertyEditor::_focus_exit() {
}
void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings) {
-
Ref<StyleBox> sb = action_buttons[0]->get_theme_stylebox("panel");
int margin_top = sb->get_margin(MARGIN_TOP);
int margin_left = sb->get_margin(MARGIN_LEFT);
@@ -1792,15 +1669,14 @@ void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings)
int height = 0;
for (int i = 0; i < MAX_ACTION_BUTTONS; i++) {
-
if (i < p_strings.size()) {
-
action_buttons[i]->show();
action_buttons[i]->set_text(p_strings[i]);
Size2 btn_m_size = action_buttons[i]->get_minimum_size();
- if (btn_m_size.width > max_width)
+ if (btn_m_size.width > max_width) {
max_width = btn_m_size.width;
+ }
} else {
action_buttons[i]->hide();
@@ -1808,7 +1684,6 @@ void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings)
}
for (int i = 0; i < p_strings.size(); i++) {
-
Size2 btn_m_size = action_buttons[i]->get_size();
action_buttons[i]->set_position(Point2(0, height) + Point2(margin_left, margin_top));
action_buttons[i]->set_size(Size2(max_width, btn_m_size.height));
@@ -1819,7 +1694,6 @@ void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings)
}
void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int p_label_w, const List<String> &p_strings) {
-
int cell_width = 95;
int cell_height = 25;
int cell_margin = 5;
@@ -1830,6 +1704,13 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int
set_size(Size2(cell_margin + p_label_w + (cell_width + cell_margin + p_label_w) * p_columns, cell_margin + (cell_height + cell_margin) * rows) * EDSCALE);
for (int i = 0; i < MAX_VALUE_EDITORS; i++) {
+ if (i < MAX_VALUE_EDITORS / 4) {
+ if (i <= p_amount / 4) {
+ value_hboxes[i]->show();
+ } else {
+ value_hboxes[i]->hide();
+ }
+ }
int c = i % p_columns;
int r = i / p_columns;
@@ -1850,25 +1731,32 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int
}
void CustomPropertyEditor::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("variant_changed"));
ADD_SIGNAL(MethodInfo("variant_field_changed", PropertyInfo(Variant::STRING, "field")));
ADD_SIGNAL(MethodInfo("resource_edit_request"));
}
CustomPropertyEditor::CustomPropertyEditor() {
-
read_only = false;
updating = false;
- for (int i = 0; i < MAX_VALUE_EDITORS; i++) {
+ value_vbox = memnew(VBoxContainer);
+ add_child(value_vbox);
- value_editor[i] = memnew(LineEdit);
- add_child(value_editor[i]);
+ for (int i = 0; i < MAX_VALUE_EDITORS; i++) {
+ if (i < MAX_VALUE_EDITORS / 4) {
+ value_hboxes[i] = memnew(HBoxContainer);
+ value_vbox->add_child(value_hboxes[i]);
+ value_hboxes[i]->hide();
+ }
+ int hbox_idx = i / 4;
value_label[i] = memnew(Label);
- add_child(value_label[i]);
- value_editor[i]->hide();
+ value_hboxes[hbox_idx]->add_child(value_label[i]);
value_label[i]->hide();
+ value_editor[i] = memnew(LineEdit);
+ value_hboxes[hbox_idx]->add_child(value_editor[i]);
+ value_editor[i]->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ value_editor[i]->hide();
value_editor[i]->connect("text_entered", callable_mp(this, &CustomPropertyEditor::_modified));
value_editor[i]->connect("focus_entered", callable_mp(this, &CustomPropertyEditor::_focus_enter));
value_editor[i]->connect("focus_exited", callable_mp(this, &CustomPropertyEditor::_focus_exit));
@@ -1876,7 +1764,6 @@ CustomPropertyEditor::CustomPropertyEditor() {
focused_value_editor = -1;
for (int i = 0; i < 4; i++) {
-
scroll[i] = memnew(HScrollBar);
scroll[i]->hide();
scroll[i]->set_min(0);
@@ -1914,7 +1801,6 @@ CustomPropertyEditor::CustomPropertyEditor() {
text_edit->connect("text_changed", callable_mp(this, &CustomPropertyEditor::_text_edit_changed));
for (int i = 0; i < MAX_ACTION_BUTTONS; i++) {
-
action_buttons[i] = memnew(Button);
action_buttons[i]->hide();
add_child(action_buttons[i]);
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 45466eaa42..75c6fd372b 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -51,7 +51,6 @@ class CreateDialog;
class PropertySelector;
class EditorResourceConversionPlugin : public Reference {
-
GDCLASS(EditorResourceConversionPlugin, Reference);
protected:
@@ -64,7 +63,6 @@ public:
};
class CustomPropertyEditor : public PopupPanel {
-
GDCLASS(CustomPropertyEditor, PopupPanel);
enum {
@@ -102,6 +100,8 @@ class CustomPropertyEditor : public PopupPanel {
List<String> field_names;
int hint;
String hint_text;
+ HBoxContainer *value_hboxes[MAX_VALUE_EDITORS / 4];
+ VBoxContainer *value_vbox;
LineEdit *value_editor[MAX_VALUE_EDITORS];
int focused_value_editor;
Label *value_label[MAX_VALUE_EDITORS];
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 1960ecc604..c6c93fae83 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -35,28 +35,25 @@
#include "editor_scale.h"
void PropertySelector::_text_changed(const String &p_newtext) {
-
_update_search();
}
void PropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
-
Ref<InputEventKey> k = p_ie;
if (k.is_valid()) {
-
switch (k->get_keycode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
-
search_options->call("_gui_input", k);
search_box->accept_event();
TreeItem *root = search_options->get_root();
- if (!root->get_children())
+ if (!root->get_children()) {
break;
+ }
TreeItem *current = search_options->get_selected();
@@ -74,13 +71,13 @@ void PropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
}
void PropertySelector::_update_search() {
-
- if (properties)
+ if (properties) {
set_title(TTR("Select Property"));
- else if (virtuals_only)
+ } else if (virtuals_only) {
set_title(TTR("Select Virtual Method"));
- else
+ } else {
set_title(TTR("Select Method"));
+ }
search_options->clear();
help_bit->set_text("");
@@ -88,7 +85,6 @@ void PropertySelector::_update_search() {
TreeItem *root = search_options->create_item();
if (properties) {
-
List<PropertyInfo> props;
if (instance) {
@@ -100,10 +96,8 @@ void PropertySelector::_update_search() {
v.get_property_list(&props);
} else {
-
Object *obj = ObjectDB::get_instance(script);
if (Object::cast_to<Script>(obj)) {
-
props.push_back(PropertyInfo(Variant::NIL, "Script Variables", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_CATEGORY));
Object::cast_to<Script>(obj)->get_script_property_list(&props);
}
@@ -169,14 +163,17 @@ void PropertySelector::_update_search() {
continue;
}
- if (!(E->get().usage & PROPERTY_USAGE_EDITOR) && !(E->get().usage & PROPERTY_USAGE_SCRIPT_VARIABLE))
+ if (!(E->get().usage & PROPERTY_USAGE_EDITOR) && !(E->get().usage & PROPERTY_USAGE_SCRIPT_VARIABLE)) {
continue;
+ }
- if (search_box->get_text() != String() && E->get().name.find(search_box->get_text()) == -1)
+ if (search_box->get_text() != String() && E->get().name.find(search_box->get_text()) == -1) {
continue;
+ }
- if (type_filter.size() && type_filter.find(E->get().type) == -1)
+ if (type_filter.size() && type_filter.find(E->get().type) == -1) {
continue;
+ }
TreeItem *item = search_options->create_item(category ? category : root);
item->set_text(0, E->get().name);
@@ -195,7 +192,6 @@ void PropertySelector::_update_search() {
memdelete(category); //old category was unused
}
} else {
-
List<MethodInfo> methods;
if (type != Variant::NIL) {
@@ -204,10 +200,8 @@ void PropertySelector::_update_search() {
v = Variant::construct(type, nullptr, 0, ce);
v.get_method_list(&methods);
} else {
-
Object *obj = ObjectDB::get_instance(script);
if (Object::cast_to<Script>(obj)) {
-
methods.push_back(MethodInfo("*Script Methods"));
Object::cast_to<Script>(obj)->get_script_method_list(&methods);
}
@@ -249,17 +243,21 @@ void PropertySelector::_update_search() {
}
String name = E->get().name.get_slice(":", 0);
- if (!script_methods && name.begins_with("_") && !(E->get().flags & METHOD_FLAG_VIRTUAL))
+ if (!script_methods && name.begins_with("_") && !(E->get().flags & METHOD_FLAG_VIRTUAL)) {
continue;
+ }
- if (virtuals_only && !(E->get().flags & METHOD_FLAG_VIRTUAL))
+ if (virtuals_only && !(E->get().flags & METHOD_FLAG_VIRTUAL)) {
continue;
+ }
- if (!virtuals_only && (E->get().flags & METHOD_FLAG_VIRTUAL))
+ if (!virtuals_only && (E->get().flags & METHOD_FLAG_VIRTUAL)) {
continue;
+ }
- if (search_box->get_text() != String() && name.find(search_box->get_text()) == -1)
+ if (search_box->get_text() != String() && name.find(search_box->get_text()) == -1) {
continue;
+ }
TreeItem *item = search_options->create_item(category ? category : root);
@@ -269,36 +267,40 @@ void PropertySelector::_update_search() {
if (mi.name.find(":") != -1) {
desc = mi.name.get_slice(":", 1) + " ";
mi.name = mi.name.get_slice(":", 0);
- } else if (mi.return_val.type != Variant::NIL)
+ } else if (mi.return_val.type != Variant::NIL) {
desc = Variant::get_type_name(mi.return_val.type);
- else
+ } else {
desc = "void ";
+ }
desc += " " + mi.name + " ( ";
for (int i = 0; i < mi.arguments.size(); i++) {
-
- if (i > 0)
+ if (i > 0) {
desc += ", ";
+ }
- if (mi.arguments[i].type == Variant::NIL)
+ if (mi.arguments[i].type == Variant::NIL) {
desc += "var ";
- else if (mi.arguments[i].name.find(":") != -1) {
+ } else if (mi.arguments[i].name.find(":") != -1) {
desc += mi.arguments[i].name.get_slice(":", 1) + " ";
mi.arguments[i].name = mi.arguments[i].name.get_slice(":", 0);
- } else
+ } else {
desc += Variant::get_type_name(mi.arguments[i].type) + " ";
+ }
desc += mi.arguments[i].name;
}
desc += " )";
- if (E->get().flags & METHOD_FLAG_CONST)
+ if (E->get().flags & METHOD_FLAG_CONST) {
desc += " const";
+ }
- if (E->get().flags & METHOD_FLAG_VIRTUAL)
+ if (E->get().flags & METHOD_FLAG_VIRTUAL) {
desc += " virtual";
+ }
item->set_text(0, desc);
item->set_metadata(0, name);
@@ -319,21 +321,21 @@ void PropertySelector::_update_search() {
}
void PropertySelector::_confirmed() {
-
TreeItem *ti = search_options->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
emit_signal("selected", ti->get_metadata(0));
hide();
}
void PropertySelector::_item_selected() {
-
help_bit->set_text("");
TreeItem *item = search_options->get_selected();
- if (!item)
+ if (!item) {
return;
+ }
String name = item->get_metadata(0);
String class_type;
@@ -348,16 +350,14 @@ void PropertySelector::_item_selected() {
String text;
if (properties) {
-
String at_class = class_type;
while (at_class != String()) {
-
Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(at_class);
if (E) {
for (int i = 0; i < E->get().properties.size(); i++) {
if (E->get().properties[i].name == name) {
- text = E->get().properties[i].description;
+ text = DTR(E->get().properties[i].description);
}
}
}
@@ -365,16 +365,14 @@ void PropertySelector::_item_selected() {
at_class = ClassDB::get_parent_class(at_class);
}
} else {
-
String at_class = class_type;
while (at_class != String()) {
-
Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(at_class);
if (E) {
for (int i = 0; i < E->get().methods.size(); i++) {
if (E->get().methods[i].name == name) {
- text = E->get().methods[i].description;
+ text = DTR(E->get().methods[i].description);
}
}
}
@@ -383,8 +381,9 @@ void PropertySelector::_item_selected() {
}
}
- if (text == String())
+ if (text == String()) {
return;
+ }
help_bit->set_text(text);
}
@@ -394,9 +393,7 @@ void PropertySelector::_hide_requested() {
}
void PropertySelector::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
connect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
} else if (p_what == NOTIFICATION_EXIT_TREE) {
disconnect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
@@ -404,7 +401,6 @@ void PropertySelector::_notification(int p_what) {
}
void PropertySelector::select_method_from_base_type(const String &p_base, const String &p_current, bool p_virtuals_only) {
-
base_type = p_base;
selected = p_current;
type = Variant::NIL;
@@ -420,7 +416,6 @@ void PropertySelector::select_method_from_base_type(const String &p_base, const
}
void PropertySelector::select_method_from_script(const Ref<Script> &p_script, const String &p_current) {
-
ERR_FAIL_COND(p_script.is_null());
base_type = p_script->get_instance_base_type();
selected = p_current;
@@ -435,8 +430,8 @@ void PropertySelector::select_method_from_script(const Ref<Script> &p_script, co
search_box->grab_focus();
_update_search();
}
-void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const String &p_current) {
+void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const String &p_current) {
ERR_FAIL_COND(p_type == Variant::NIL);
base_type = "";
selected = p_current;
@@ -453,15 +448,15 @@ void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const
}
void PropertySelector::select_method_from_instance(Object *p_instance, const String &p_current) {
-
base_type = p_instance->get_class();
selected = p_current;
type = Variant::NIL;
script = ObjectID();
{
Ref<Script> scr = p_instance->get_script();
- if (scr.is_valid())
+ if (scr.is_valid()) {
script = scr->get_instance_id();
+ }
}
properties = false;
instance = nullptr;
@@ -474,7 +469,6 @@ void PropertySelector::select_method_from_instance(Object *p_instance, const Str
}
void PropertySelector::select_property_from_base_type(const String &p_base, const String &p_current) {
-
base_type = p_base;
selected = p_current;
type = Variant::NIL;
@@ -490,7 +484,6 @@ void PropertySelector::select_property_from_base_type(const String &p_base, cons
}
void PropertySelector::select_property_from_script(const Ref<Script> &p_script, const String &p_current) {
-
ERR_FAIL_COND(p_script.is_null());
base_type = p_script->get_instance_base_type();
@@ -508,7 +501,6 @@ void PropertySelector::select_property_from_script(const Ref<Script> &p_script,
}
void PropertySelector::select_property_from_basic_type(Variant::Type p_type, const String &p_current) {
-
ERR_FAIL_COND(p_type == Variant::NIL);
base_type = "";
selected = p_current;
@@ -525,7 +517,6 @@ void PropertySelector::select_property_from_basic_type(Variant::Type p_type, con
}
void PropertySelector::select_property_from_instance(Object *p_instance, const String &p_current) {
-
base_type = "";
selected = p_current;
type = Variant::NIL;
@@ -545,12 +536,10 @@ void PropertySelector::set_type_filter(const Vector<Variant::Type> &p_type_filte
}
void PropertySelector::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "name")));
}
PropertySelector::PropertySelector() {
-
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
//set_child_rect(vbc);
diff --git a/editor/pvrtc_compress.cpp b/editor/pvrtc_compress.cpp
index 1363fe2942..23bcf9540e 100644
--- a/editor/pvrtc_compress.cpp
+++ b/editor/pvrtc_compress.cpp
@@ -42,21 +42,21 @@ static void (*_base_image_compress_pvrtc2_func)(Image *) = nullptr;
static void (*_base_image_compress_pvrtc4_func)(Image *) = nullptr;
static void _compress_image(Image::CompressMode p_mode, Image *p_image) {
-
String ttpath = EditorSettings::get_singleton()->get("filesystem/import/pvrtc_texture_tool");
if (ttpath.strip_edges() == "" || !FileAccess::exists(ttpath)) {
switch (p_mode) {
-
case Image::COMPRESS_PVRTC2:
- if (_base_image_compress_pvrtc2_func)
+ if (_base_image_compress_pvrtc2_func) {
_base_image_compress_pvrtc2_func(p_image);
- else if (_base_image_compress_pvrtc4_func)
+ } else if (_base_image_compress_pvrtc4_func) {
_base_image_compress_pvrtc4_func(p_image);
+ }
break;
case Image::COMPRESS_PVRTC4:
- if (_base_image_compress_pvrtc4_func)
+ if (_base_image_compress_pvrtc4_func) {
_base_image_compress_pvrtc4_func(p_image);
+ }
break;
default:
ERR_FAIL_MSG("Unsupported Image compress mode used in PVRTC module.");
@@ -125,17 +125,14 @@ static void _compress_image(Image::CompressMode p_mode, Image *p_image) {
}
static void _compress_pvrtc2(Image *p_image) {
-
_compress_image(Image::COMPRESS_PVRTC2, p_image);
}
static void _compress_pvrtc4(Image *p_image) {
-
_compress_image(Image::COMPRESS_PVRTC4, p_image);
}
void _pvrtc_register_compressors() {
-
_base_image_compress_pvrtc2_func = Image::_image_compress_pvrtc2_func;
_base_image_compress_pvrtc4_func = Image::_image_compress_pvrtc4_func;
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index b872bc3dd4..bcef29dfa6 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -33,38 +33,37 @@
#include "core/os/keyboard.h"
void EditorQuickOpen::popup_dialog(const StringName &p_base, bool p_enable_multi, bool p_add_dirs, bool p_dontclear) {
-
add_directories = p_add_dirs;
popup_centered_ratio(0.6);
- if (p_dontclear)
+ if (p_dontclear) {
search_box->select_all();
- else
+ } else {
search_box->clear();
- if (p_enable_multi)
+ }
+ if (p_enable_multi) {
search_options->set_select_mode(Tree::SELECT_MULTI);
- else
+ } else {
search_options->set_select_mode(Tree::SELECT_SINGLE);
+ }
search_box->grab_focus();
base_type = p_base;
_update_search();
}
String EditorQuickOpen::get_selected() const {
-
TreeItem *ti = search_options->get_selected();
- if (!ti)
+ if (!ti) {
return String();
+ }
return "res://" + ti->get_text(0);
}
Vector<String> EditorQuickOpen::get_selected_files() const {
-
Vector<String> files;
TreeItem *item = search_options->get_next_selected(search_options->get_root());
while (item) {
-
files.push_back("res://" + item->get_text(0));
item = search_options->get_next_selected(item);
@@ -74,27 +73,24 @@ Vector<String> EditorQuickOpen::get_selected_files() const {
}
void EditorQuickOpen::_text_changed(const String &p_newtext) {
-
_update_search();
}
void EditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
-
Ref<InputEventKey> k = p_ie;
if (k.is_valid()) {
-
switch (k->get_keycode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
-
search_options->call("_gui_input", k);
search_box->accept_event();
TreeItem *root = search_options->get_root();
- if (!root->get_children())
+ if (!root->get_children()) {
break;
+ }
TreeItem *current = search_options->get_selected();
@@ -112,7 +108,6 @@ void EditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
}
float EditorQuickOpen::_path_cmp(String search, String path) const {
-
// Exact match.
if (search == path) {
return 1.2f;
@@ -129,10 +124,8 @@ float EditorQuickOpen::_path_cmp(String search, String path) const {
}
void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<String, Ref<Texture2D>>> &list) {
-
if (!add_directories) {
for (int i = 0; i < efsd->get_subdir_count(); i++) {
-
_parse_fs(efsd->get_subdir(i), list);
}
}
@@ -141,8 +134,9 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<Str
if (add_directories) {
String path = efsd->get_path();
- if (!path.ends_with("/"))
+ if (!path.ends_with("/")) {
path += "/";
+ }
if (path != "res://") {
path = path.substr(6, path.length());
if (search_text.is_subsequence_ofi(path)) {
@@ -151,7 +145,6 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<Str
pair.second = search_options->get_theme_icon("folder", "FileDialog");
if (search_text != String() && list.size() > 0) {
-
float this_sim = _path_cmp(search_text, path);
float other_sim = _path_cmp(list[0].first, path);
int pos = 1;
@@ -170,7 +163,6 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<Str
}
}
for (int i = 0; i < efsd->get_file_count(); i++) {
-
String file = efsd->get_file_path(i);
file = file.substr(6, file.length());
@@ -184,27 +176,26 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<Str
if (add_directories) {
for (int i = 0; i < efsd->get_subdir_count(); i++) {
-
_parse_fs(efsd->get_subdir(i), list);
}
}
}
Vector<Pair<String, Ref<Texture2D>>> EditorQuickOpen::_sort_fs(Vector<Pair<String, Ref<Texture2D>>> &list) {
-
String search_text = search_box->get_text();
Vector<Pair<String, Ref<Texture2D>>> sorted_list;
- if (search_text == String() || list.size() == 0)
+ if (search_text == String() || list.size() == 0) {
return list;
+ }
Vector<float> scores;
scores.resize(list.size());
- for (int i = 0; i < list.size(); i++)
+ for (int i = 0; i < list.size(); i++) {
scores.write[i] = _path_cmp(search_text, list[i].first);
+ }
while (list.size() > 0) {
-
float best_score = 0.0f;
int best_idx = 0;
@@ -225,7 +216,6 @@ Vector<Pair<String, Ref<Texture2D>>> EditorQuickOpen::_sort_fs(Vector<Pair<Strin
}
void EditorQuickOpen::_update_search() {
-
search_options->clear();
TreeItem *root = search_options->create_item();
EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem();
@@ -251,21 +241,19 @@ void EditorQuickOpen::_update_search() {
}
void EditorQuickOpen::_confirmed() {
-
TreeItem *ti = search_options->get_selected();
- if (!ti)
+ if (!ti) {
return;
+ }
emit_signal("quick_open");
hide();
}
void EditorQuickOpen::_theme_changed() {
-
search_box->set_right_icon(search_options->get_theme_icon("Search", "EditorIcons"));
}
void EditorQuickOpen::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed));
@@ -279,17 +267,14 @@ void EditorQuickOpen::_notification(int p_what) {
}
StringName EditorQuickOpen::get_base_type() const {
-
return base_type;
}
void EditorQuickOpen::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("quick_open"));
}
EditorQuickOpen::EditorQuickOpen() {
-
VBoxContainer *vbc = memnew(VBoxContainer);
vbc->connect("theme_changed", callable_mp(this, &EditorQuickOpen::_theme_changed));
diff --git a/editor/quick_open.h b/editor/quick_open.h
index c0e2cb85d8..e446ed6823 100644
--- a/editor/quick_open.h
+++ b/editor/quick_open.h
@@ -36,7 +36,6 @@
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
class EditorQuickOpen : public ConfirmationDialog {
-
GDCLASS(EditorQuickOpen, ConfirmationDialog);
LineEdit *search_box;
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 8ae8d0991d..6a54894f40 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -42,7 +42,6 @@
#include "scene/gui/tab_container.h"
RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_undo_redo) {
-
scene_tree_editor = p_scene_tree_editor;
undo_redo = p_undo_redo;
preview_node = nullptr;
@@ -341,12 +340,10 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
}
void RenameDialog::_bind_methods() {
-
ClassDB::bind_method("rename", &RenameDialog::rename);
}
void RenameDialog::_update_substitute() {
-
LineEdit *focus_owner_line_edit = Object::cast_to<LineEdit>(scene_tree_editor->get_focus_owner());
bool is_main_field = _is_main_field(focus_owner_line_edit);
@@ -367,7 +364,6 @@ void RenameDialog::_update_substitute() {
}
void RenameDialog::_post_popup() {
-
EditorSelection *editor_selection = EditorNode::get_singleton()->get_editor_selection();
preview_node = nullptr;
@@ -385,9 +381,9 @@ void RenameDialog::_update_preview_int(int new_value) {
}
void RenameDialog::_update_preview(String new_text) {
-
- if (lock_preview_update || preview_node == nullptr)
+ if (lock_preview_update || preview_node == nullptr) {
return;
+ }
has_errors = false;
add_error_handler(&eh);
@@ -395,7 +391,6 @@ void RenameDialog::_update_preview(String new_text) {
String new_name = _apply_rename(preview_node, spn_count_start->get_value());
if (!has_errors) {
-
lbl_preview_title->set_text(TTR("Preview"));
lbl_preview->set_text(new_name);
@@ -413,7 +408,6 @@ void RenameDialog::_update_preview(String new_text) {
}
String RenameDialog::_apply_rename(const Node *node, int count) {
-
String search = lne_search->get_text();
String replace = lne_replace->get_text();
String prefix = lne_prefix->get_text();
@@ -428,7 +422,6 @@ String RenameDialog::_apply_rename(const Node *node, int count) {
}
if (cbut_regex->is_pressed()) {
-
new_name = _regex(search, new_name, replace);
} else {
new_name = new_name.replace(search, replace);
@@ -444,7 +437,6 @@ String RenameDialog::_apply_rename(const Node *node, int count) {
}
String RenameDialog::_substitute(const String &subject, const Node *node, int count) {
-
String result = subject.replace("${COUNTER}", vformat("%0" + itos(spn_count_padding->get_value()) + "d", count));
if (node) {
@@ -474,13 +466,13 @@ String RenameDialog::_substitute(const String &subject, const Node *node, int co
}
void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) {
-
RenameDialog *self = (RenameDialog *)p_self;
String source_file(p_file);
// Only show first error that is related to "regex"
- if (self->has_errors || source_file.find("regex") < 0)
+ if (self->has_errors || source_file.find("regex") < 0) {
return;
+ }
String err_str;
if (p_errorexp && p_errorexp[0]) {
@@ -496,14 +488,12 @@ void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *
}
String RenameDialog::_regex(const String &pattern, const String &subject, const String &replacement) {
-
RegEx regex(pattern);
return regex.sub(subject, replacement, true);
}
String RenameDialog::_postprocess(const String &subject) {
-
int style_id = opt_style->get_selected();
String result = subject;
@@ -550,12 +540,11 @@ String RenameDialog::_postprocess(const String &subject) {
}
void RenameDialog::_iterate_scene(const Node *node, const Array &selection, int *counter) {
-
- if (!node)
+ if (!node) {
return;
+ }
if (selection.has(node)) {
-
String new_name = _apply_rename(node, *counter);
if (node->get_name() != new_name) {
@@ -581,7 +570,6 @@ void RenameDialog::_iterate_scene(const Node *node, const Array &selection, int
}
void RenameDialog::rename() {
-
// Editor selection is not ordered via scene tree. Instead iterate
// over scene tree until all selected nodes are found in order.
@@ -596,12 +584,10 @@ void RenameDialog::rename() {
_iterate_scene(root_node, selected_node_list, &global_count);
if (undo_redo && !to_rename.empty()) {
-
undo_redo->create_action(TTR("Batch Rename"));
// Make sure to iterate reversed so that child nodes will find parents.
for (int i = to_rename.size() - 1; i >= 0; --i) {
-
Node *n = root_node->get_node(to_rename[i].first);
const String &new_name = to_rename[i].second;
@@ -620,7 +606,6 @@ void RenameDialog::rename() {
}
void RenameDialog::reset() {
-
lock_preview_update = true;
lne_prefix->clear();
@@ -651,7 +636,6 @@ bool RenameDialog::_is_main_field(LineEdit *line_edit) {
}
void RenameDialog::_insert_text(String text) {
-
LineEdit *focus_owner = Object::cast_to<LineEdit>(scene_tree_editor->get_focus_owner());
if (_is_main_field(focus_owner)) {
diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h
index 194dd57648..dfdb1bcd76 100644
--- a/editor/rename_dialog.h
+++ b/editor/rename_dialog.h
@@ -44,11 +44,10 @@
*/
class RenameDialog : public ConfirmationDialog {
-
GDCLASS(RenameDialog, ConfirmationDialog);
virtual void ok_pressed() { rename(); };
- void _cancel_pressed(){};
+ void _cancel_pressed() {}
void _features_toggled(bool pressed);
void _insert_text(String text);
void _update_substitute();
@@ -111,7 +110,7 @@ public:
void rename();
RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_undo_redo = nullptr);
- ~RenameDialog(){};
+ ~RenameDialog() {}
};
#endif
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index b71c2bd078..e5ae09f5ff 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -35,46 +35,38 @@
#include "scene/gui/label.h"
void ReparentDialog::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
connect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
}
if (p_what == NOTIFICATION_EXIT_TREE) {
-
disconnect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
}
}
void ReparentDialog::_cancel() {
-
hide();
}
-void ReparentDialog::_reparent() {
+void ReparentDialog::_reparent() {
if (tree->get_selected()) {
-
emit_signal("reparent", tree->get_selected()->get_path(), keep_transform->is_pressed());
hide();
}
}
void ReparentDialog::set_current(const Set<Node *> &p_selection) {
-
tree->set_marked(p_selection, false, false);
//tree->set_selected(p_node->get_parent());
}
void ReparentDialog::_bind_methods() {
-
ClassDB::bind_method("_cancel", &ReparentDialog::_cancel);
ADD_SIGNAL(MethodInfo("reparent", PropertyInfo(Variant::NODE_PATH, "path"), PropertyInfo(Variant::BOOL, "keep_global_xform")));
}
ReparentDialog::ReparentDialog() {
-
set_title(TTR("Reparent Node"));
VBoxContainer *vbc = memnew(VBoxContainer);
diff --git a/editor/reparent_dialog.h b/editor/reparent_dialog.h
index 29db70baa5..4566e3a02a 100644
--- a/editor/reparent_dialog.h
+++ b/editor/reparent_dialog.h
@@ -41,7 +41,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
class ReparentDialog : public ConfirmationDialog {
-
GDCLASS(ReparentDialog, ConfirmationDialog);
SceneTreeEditor *tree;
diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp
index a5ae1fd8a6..b6dda4c5bb 100644
--- a/editor/run_settings_dialog.cpp
+++ b/editor/run_settings_dialog.cpp
@@ -31,45 +31,39 @@
#include "run_settings_dialog.h"
void RunSettingsDialog::popup_run_settings() {
-
popup_centered(Size2(300, 150));
}
void RunSettingsDialog::set_custom_arguments(const String &p_arguments) {
-
arguments->set_text(p_arguments);
}
-String RunSettingsDialog::get_custom_arguments() const {
+String RunSettingsDialog::get_custom_arguments() const {
return arguments->get_text();
}
void RunSettingsDialog::_bind_methods() {
-
//ClassDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file);
}
void RunSettingsDialog::_run_mode_changed(int idx) {
-
- if (idx == 0)
+ if (idx == 0) {
arguments->set_editable(false);
- else
+ } else {
arguments->set_editable(true);
+ }
}
int RunSettingsDialog::get_run_mode() const {
-
return run_mode->get_selected();
}
void RunSettingsDialog::set_run_mode(int p_run_mode) {
-
run_mode->select(p_run_mode);
arguments->set_editable(p_run_mode);
}
RunSettingsDialog::RunSettingsDialog() {
-
/* SNAP DIALOG */
VBoxContainer *vbc = memnew(VBoxContainer);
diff --git a/editor/run_settings_dialog.h b/editor/run_settings_dialog.h
index b812bbfa9e..4d6d842de0 100644
--- a/editor/run_settings_dialog.h
+++ b/editor/run_settings_dialog.h
@@ -37,7 +37,6 @@
#include "scene/gui/line_edit.h"
class RunSettingsDialog : public AcceptDialog {
-
GDCLASS(RunSettingsDialog, AcceptDialog);
public:
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 6e00e3c291..5795d85e66 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -50,7 +50,6 @@
#include "servers/rendering_server.h"
void SceneTreeDock::_nodes_drag_begin() {
-
if (restore_script_editor_on_drag) {
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
restore_script_editor_on_drag = false;
@@ -65,7 +64,6 @@ void SceneTreeDock::_quick_open() {
}
void SceneTreeDock::_input(Ref<InputEvent> p_event) {
-
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
@@ -74,12 +72,13 @@ void SceneTreeDock::_input(Ref<InputEvent> p_event) {
}
void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
-
- if (get_focus_owner() && get_focus_owner()->is_text_field())
+ if (get_focus_owner() && get_focus_owner()->is_text_field()) {
return;
+ }
- if (!p_event->is_pressed() || p_event->is_echo())
+ if (!p_event->is_pressed() || p_event->is_echo()) {
return;
+ }
if (ED_IS_SHORTCUT("scene_tree/batch_rename", p_event)) {
_tool_selected(TOOL_BATCH_RENAME);
@@ -119,7 +118,6 @@ void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
}
void SceneTreeDock::instance(const String &p_file) {
-
Node *parent = scene_tree->get_selected();
if (!parent) {
@@ -127,7 +125,6 @@ void SceneTreeDock::instance(const String &p_file) {
};
if (!edited_scene) {
-
current_option = -1;
accept->set_text(TTR("No parent to instance a child at."));
accept->popup_centered();
@@ -142,7 +139,6 @@ void SceneTreeDock::instance(const String &p_file) {
}
void SceneTreeDock::instance_scenes(const Vector<String> &p_files, Node *p_parent) {
-
Node *parent = p_parent;
if (!parent) {
@@ -150,7 +146,6 @@ void SceneTreeDock::instance_scenes(const Vector<String> &p_files, Node *p_paren
}
if (!parent || !edited_scene) {
-
accept->set_text(TTR("No parent to instance the scenes at."));
accept->popup_centered();
return;
@@ -160,7 +155,6 @@ void SceneTreeDock::instance_scenes(const Vector<String> &p_files, Node *p_paren
}
void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node *parent, int p_pos) {
-
ERR_FAIL_COND(!parent);
Vector<Node *> instances;
@@ -168,7 +162,6 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
bool error = false;
for (int i = 0; i < p_files.size(); i++) {
-
Ref<PackedScene> sdata = ResourceLoader::load(p_files[i]);
if (!sdata.is_valid()) {
current_option = -1;
@@ -188,9 +181,7 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
}
if (edited_scene->get_filename() != "") {
-
if (_cyclical_dependency_exists(edited_scene->get_filename(), instanced_scene)) {
-
accept->set_text(vformat(TTR("Cannot instance the scene '%s' because the current scene exists within one of its nodes."), p_files[i]));
accept->popup_centered();
error = true;
@@ -213,7 +204,6 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
editor_data->get_undo_redo().create_action(TTR("Instance Scene(s)"));
for (int i = 0; i < instances.size(); i++) {
-
Node *instanced_scene = instances[i];
editor_data->get_undo_redo().add_do_method(parent, "add_child", instanced_scene);
@@ -316,13 +306,16 @@ bool SceneTreeDock::_track_inherit(const String &p_target_scene_path, Node *p_de
Ref<PackedScene> data = ResourceLoader::load(path);
if (data.is_valid()) {
p = data->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
- if (!p)
+ if (!p) {
continue;
+ }
instances.push_back(p);
- } else
+ } else {
break;
- } else
+ }
+ } else {
break;
+ }
}
for (int i = 0; i < instances.size(); i++) {
memdelete(instances[i]);
@@ -331,11 +324,9 @@ bool SceneTreeDock::_track_inherit(const String &p_target_scene_path, Node *p_de
}
void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
-
current_option = p_tool;
switch (p_tool) {
-
case TOOL_BATCH_RENAME: {
if (!profile_allow_editing) {
break;
@@ -356,7 +347,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_NEW:
case TOOL_REPARENT_TO_NEW_NODE: {
-
if (!profile_allow_editing) {
break;
}
@@ -364,17 +354,16 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *current_edited_scene_root = EditorNode::get_singleton()->get_edited_scene();
if (current_edited_scene_root) {
-
- if (ClassDB::is_parent_class(current_edited_scene_root->get_class_name(), "Node2D"))
+ if (ClassDB::is_parent_class(current_edited_scene_root->get_class_name(), "Node2D")) {
preferred = "Node2D";
- else if (ClassDB::is_parent_class(current_edited_scene_root->get_class_name(), "Node3D"))
+ } else if (ClassDB::is_parent_class(current_edited_scene_root->get_class_name(), "Node3D")) {
preferred = "Node3D";
+ }
}
create_dialog->set_preferred_search_result_type(preferred);
create_dialog->popup_create(true);
} break;
case TOOL_INSTANCE: {
-
if (!profile_allow_editing) {
break;
}
@@ -390,15 +379,16 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_EXPAND_COLLAPSE: {
-
- if (!scene_tree->get_selected())
+ if (!scene_tree->get_selected()) {
break;
+ }
Tree *tree = scene_tree->get_scene_tree();
TreeItem *selected_item = tree->get_selected();
- if (!selected_item)
+ if (!selected_item) {
selected_item = tree->get_root();
+ }
bool collapsed = _is_collapsed_recursive(selected_item);
_set_collapsed_recursive(selected_item, !collapsed);
@@ -407,17 +397,18 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_REPLACE: {
-
if (!profile_allow_editing) {
break;
}
Node *selected = scene_tree->get_selected();
- if (!selected && !editor_selection->get_selected_node_list().empty())
+ if (!selected && !editor_selection->get_selected_node_list().empty()) {
selected = editor_selection->get_selected_node_list().front()->get();
+ }
- if (selected)
+ if (selected) {
create_dialog->popup_create(false, true, selected->get_class());
+ }
} break;
case TOOL_EXTEND_SCRIPT: {
@@ -427,21 +418,20 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
attach_script_to_selected(false);
} break;
case TOOL_DETACH_SCRIPT: {
-
if (!profile_allow_script_editing) {
break;
}
Array selection = editor_selection->get_selected_nodes();
- if (selection.empty())
+ if (selection.empty()) {
return;
+ }
editor_data->get_undo_redo().create_action(TTR("Detach Script"));
editor_data->get_undo_redo().add_do_method(editor, "push_item", (Script *)nullptr);
for (int i = 0; i < selection.size(); i++) {
-
Node *n = Object::cast_to<Node>(selection[i]);
Ref<Script> existing = n->get_script();
Ref<Script> empty = EditorNode::get_singleton()->get_object_custom_type_base(n);
@@ -458,24 +448,24 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_MOVE_UP:
case TOOL_MOVE_DOWN: {
-
if (!profile_allow_editing) {
break;
}
- if (!scene_tree->get_selected())
+ if (!scene_tree->get_selected()) {
break;
+ }
if (scene_tree->get_selected() == edited_scene) {
-
current_option = -1;
accept->set_text(TTR("This operation can't be done on the tree root."));
accept->popup_centered();
break;
}
- if (!_validate_no_foreign())
+ if (!_validate_no_foreign()) {
break;
+ }
bool MOVING_DOWN = (p_tool == TOOL_MOVE_DOWN);
bool MOVING_UP = !MOVING_DOWN;
@@ -483,30 +473,37 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *common_parent = scene_tree->get_selected()->get_parent();
List<Node *> selection = editor_selection->get_selected_node_list();
selection.sort_custom<Node::Comparator>(); // sort by index
- if (MOVING_DOWN)
+ if (MOVING_DOWN) {
selection.invert();
+ }
int lowest_id = common_parent->get_child_count() - 1;
int highest_id = 0;
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
int index = E->get()->get_index();
- if (index > highest_id)
+ if (index > highest_id) {
highest_id = index;
- if (index < lowest_id)
+ }
+ if (index < lowest_id) {
lowest_id = index;
+ }
- if (E->get()->get_parent() != common_parent)
+ if (E->get()->get_parent() != common_parent) {
common_parent = nullptr;
+ }
}
- if (!common_parent || (MOVING_DOWN && highest_id >= common_parent->get_child_count() - MOVING_DOWN) || (MOVING_UP && lowest_id == 0))
+ if (!common_parent || (MOVING_DOWN && highest_id >= common_parent->get_child_count() - MOVING_DOWN) || (MOVING_UP && lowest_id == 0)) {
break; // one or more nodes can not be moved
+ }
- if (selection.size() == 1)
+ if (selection.size() == 1) {
editor_data->get_undo_redo().create_action(TTR("Move Node In Parent"));
- if (selection.size() > 1)
+ }
+ if (selection.size() > 1) {
editor_data->get_undo_redo().create_action(TTR("Move Nodes In Parent"));
+ }
for (int i = 0; i < selection.size(); i++) {
Node *top_node = selection[i];
@@ -526,28 +523,29 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_DUPLICATE: {
-
if (!profile_allow_editing) {
break;
}
- if (!edited_scene)
+ if (!edited_scene) {
break;
+ }
if (editor_selection->is_selected(edited_scene)) {
-
current_option = -1;
accept->set_text(TTR("This operation can't be done on the tree root."));
accept->popup_centered();
break;
}
- if (!_validate_no_foreign())
+ if (!_validate_no_foreign()) {
break;
+ }
List<Node *> selection = editor_selection->get_selected_node_list();
- if (selection.size() == 0)
+ if (selection.size() == 0) {
break;
+ }
editor_data->get_undo_redo().create_action(TTR("Duplicate Node(s)"));
editor_data->get_undo_redo().add_do_method(editor_selection, "clear");
@@ -560,7 +558,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *add_below_node = selection.back()->get();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
Node *node = E->get();
Node *parent = node->get_parent();
@@ -570,21 +567,22 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Map<const Node *, Node *> duplimap;
Node *dup = node->duplicate_from_editor(duplimap);
- if (EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(node))
+ if (EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(node)) {
editable_children.push_back(dup);
+ }
ERR_CONTINUE(!dup);
- if (selection.size() == 1)
+ if (selection.size() == 1) {
dupsingle = dup;
+ }
dup->set_name(parent->validate_child_name(dup));
- editor_data->get_undo_redo().add_do_method(parent, "add_child_below_node", add_below_node, dup);
- for (List<Node *>::Element *F = owned.front(); F; F = F->next()) {
+ editor_data->get_undo_redo().add_do_method(add_below_node, "add_sibling", dup);
+ for (List<Node *>::Element *F = owned.front(); F; F = F->next()) {
if (!duplimap.has(F->get())) {
-
continue;
}
Node *d = duplimap[F->get()];
@@ -604,37 +602,38 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().commit_action();
- if (dupsingle)
+ if (dupsingle) {
editor->push_item(dupsingle);
+ }
- for (List<Node *>::Element *E = editable_children.back(); E; E = E->prev())
+ for (List<Node *>::Element *E = editable_children.back(); E; E = E->prev()) {
_toggle_editable_children(E->get());
+ }
} break;
case TOOL_REPARENT: {
-
if (!profile_allow_editing) {
break;
}
- if (!scene_tree->get_selected())
+ if (!scene_tree->get_selected()) {
break;
+ }
if (editor_selection->is_selected(edited_scene)) {
-
current_option = -1;
accept->set_text(TTR("This operation can't be done on the tree root."));
accept->popup_centered();
break;
}
- if (!_validate_no_foreign())
+ if (!_validate_no_foreign()) {
break;
+ }
List<Node *> nodes = editor_selection->get_selected_node_list();
Set<Node *> nodeset;
for (List<Node *>::Element *E = nodes.front(); E; E = E->next()) {
-
nodeset.insert(E->get());
}
reparent_dialog->popup_centered_ratio();
@@ -642,7 +641,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_MAKE_ROOT: {
-
if (!profile_allow_editing) {
break;
}
@@ -653,8 +651,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *node = nodes.front()->get();
Node *root = get_tree()->get_edited_scene_root();
- if (node == root)
+ if (node == root) {
return;
+ }
//check that from node to root, all owners are right
@@ -701,14 +700,14 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().commit_action();
} break;
case TOOL_MULTI_EDIT: {
-
if (!profile_allow_editing) {
break;
}
Node *root = EditorNode::get_singleton()->get_edited_scene();
- if (!root)
+ if (!root) {
break;
+ }
Ref<MultiNodeEdit> mne = memnew(MultiNodeEdit);
for (const Map<Node *, Object *>::Element *E = EditorNode::get_singleton()->get_editor_selection()->get_selection().front(); E; E = E->next()) {
mne->add_node(root->get_path_to(E->key()));
@@ -719,18 +718,19 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_ERASE: {
-
if (!profile_allow_editing) {
break;
}
List<Node *> remove_list = editor_selection->get_selected_node_list();
- if (remove_list.empty())
+ if (remove_list.empty()) {
return;
+ }
- if (!_validate_no_foreign())
+ if (!_validate_no_foreign()) {
break;
+ }
if (p_confirm_override) {
_delete_confirm();
@@ -756,7 +756,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_MERGE_FROM_SCENE: {
-
if (!profile_allow_editing) {
break;
}
@@ -764,7 +763,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
EditorNode::get_singleton()->merge_from_scene();
} break;
case TOOL_NEW_SCENE_FROM: {
-
if (!profile_allow_editing) {
break;
}
@@ -820,7 +818,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
new_scene_from_dialog->set_title(TTR("Save New Scene As..."));
} break;
case TOOL_COPY_NODE_PATH: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *>::Element *e = selection.front();
if (e) {
@@ -840,7 +837,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
} break;
case TOOL_SCENE_EDITABLE_CHILDREN: {
-
if (!profile_allow_editing) {
break;
}
@@ -862,7 +858,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
} break;
case TOOL_SCENE_USE_PLACEHOLDER: {
-
if (!profile_allow_editing) {
break;
}
@@ -884,8 +879,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
placeholder = !placeholder;
- if (placeholder)
+ if (placeholder) {
EditorNode::get_singleton()->get_edited_scene()->set_editable_instance(node, false);
+ }
node->set_scene_instance_load_placeholder(placeholder);
scene_tree->update_tree();
@@ -893,7 +889,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
} break;
case TOOL_SCENE_MAKE_LOCAL: {
-
if (!profile_allow_editing) {
break;
}
@@ -905,8 +900,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (node) {
Node *root = EditorNode::get_singleton()->get_edited_scene();
UndoRedo *undo_redo = &editor_data->get_undo_redo();
- if (!root)
+ if (!root) {
break;
+ }
ERR_FAIL_COND(node->get_filename() == String());
undo_redo->create_action(TTR("Make Local"));
@@ -920,7 +916,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
} break;
case TOOL_SCENE_OPEN: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *>::Element *e = selection.front();
if (e) {
@@ -954,7 +949,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
} break;
case TOOL_SCENE_OPEN_INHERITED: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *>::Element *e = selection.front();
if (e) {
@@ -968,7 +962,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
case TOOL_CREATE_3D_SCENE:
case TOOL_CREATE_USER_INTERFACE:
case TOOL_CREATE_FAVORITE: {
-
Node *new_node = nullptr;
if (TOOL_CREATE_FAVORITE == p_tool) {
@@ -1019,9 +1012,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
default: {
-
if (p_tool >= EDIT_SUBRESOURCE_BASE) {
-
int idx = p_tool - EDIT_SUBRESOURCE_BASE;
ERR_FAIL_INDEX(idx, subresources.size());
@@ -1036,10 +1027,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
void SceneTreeDock::_node_collapsed(Object *p_obj) {
-
TreeItem *ti = Object::cast_to<TreeItem>(p_obj);
- if (!ti)
+ if (!ti) {
return;
+ }
if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
_set_collapsed_recursive(ti, ti->is_collapsed());
@@ -1047,12 +1038,11 @@ void SceneTreeDock::_node_collapsed(Object *p_obj) {
}
void SceneTreeDock::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_READY: {
-
- if (!first_enter)
+ if (!first_enter) {
break;
+ }
first_enter = false;
EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &SceneTreeDock::_feature_profile_changed));
@@ -1154,7 +1144,6 @@ void SceneTreeDock::_notification(int p_what) {
filter->set_clear_button_enabled(true);
} break;
case NOTIFICATION_PROCESS: {
-
bool show_create_root = bool(EDITOR_GET("interface/editors/show_scene_tree_root_selection")) && get_tree()->get_edited_scene_root() == nullptr;
if (show_create_root != create_root_dialog->is_visible_in_tree() && !remote_tree->is_visible()) {
@@ -1172,7 +1161,6 @@ void SceneTreeDock::_notification(int p_what) {
}
void SceneTreeDock::_node_replace_owner(Node *p_base, Node *p_node, Node *p_root, ReplaceOwnerMode p_mode) {
-
if (p_node->get_owner() == p_base && p_node != p_root) {
UndoRedo *undo_redo = &editor_data->get_undo_redo();
switch (p_mode) {
@@ -1198,21 +1186,17 @@ void SceneTreeDock::_node_replace_owner(Node *p_base, Node *p_node, Node *p_root
}
void SceneTreeDock::_load_request(const String &p_path) {
-
editor->open_request(p_path);
}
void SceneTreeDock::_script_open_request(const Ref<Script> &p_script) {
-
editor->edit_resource(p_script);
}
void SceneTreeDock::_node_selected() {
-
Node *node = scene_tree->get_selected();
if (!node) {
-
editor->push_item(nullptr);
return;
}
@@ -1225,31 +1209,30 @@ void SceneTreeDock::_node_selected() {
}
void SceneTreeDock::_node_renamed() {
-
_node_selected();
}
void SceneTreeDock::_set_owners(Node *p_owner, const Array &p_nodes) {
-
for (int i = 0; i < p_nodes.size(); i++) {
-
Node *n = Object::cast_to<Node>(p_nodes[i]);
- if (!n)
+ if (!n) {
continue;
+ }
n->set_owner(p_owner);
}
}
void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, List<Pair<NodePath, NodePath>> *p_renames) {
-
base_path.push_back(p_node->get_name());
- if (new_base_path.size())
+ if (new_base_path.size()) {
new_base_path.push_back(p_node->get_name());
+ }
NodePath from(base_path, true);
NodePath to;
- if (new_base_path.size())
+ if (new_base_path.size()) {
to = NodePath(new_base_path, true);
+ }
Pair<NodePath, NodePath> npp;
npp.first = from;
@@ -1258,15 +1241,14 @@ void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<Stri
p_renames->push_back(npp);
for (int i = 0; i < p_node->get_child_count(); i++) {
-
_fill_path_renames(base_path, new_base_path, p_node->get_child(i), p_renames);
}
}
void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, List<Pair<NodePath, NodePath>> *p_renames) {
-
- if (!bool(EDITOR_DEF("editors/animation/autorename_animation_tracks", true)))
+ if (!bool(EDITOR_DEF("editors/animation/autorename_animation_tracks", true))) {
return;
+ }
Vector<StringName> base_path;
Node *n = p_node->get_parent();
@@ -1291,39 +1273,34 @@ void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, List<Pai
}
void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodePath>> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims) {
-
Map<Ref<Animation>, Set<int>> rem_anims;
- if (!r_rem_anims)
+ if (!r_rem_anims) {
r_rem_anims = &rem_anims;
+ }
if (!p_base) {
-
p_base = edited_scene;
}
- if (!p_base)
+ if (!p_base) {
return;
+ }
// Renaming node paths used in script instances
if (p_base->get_script_instance()) {
-
ScriptInstance *si = p_base->get_script_instance();
if (si) {
-
List<PropertyInfo> properties;
si->get_property_list(&properties);
for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
-
String propertyname = E->get().name;
Variant p = p_base->get(propertyname);
if (p.get_type() == Variant::NODE_PATH) {
-
// Goes through all paths to check if its matching
for (List<Pair<NodePath, NodePath>>::Element *F = p_renames->front(); F; F = F->next()) {
-
NodePath root_path = p_base->get_path();
NodePath rel_path_old = root_path.rel_path_to(F->get().first);
@@ -1337,7 +1314,6 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
// if old path detected, then it needs to be replaced with the new one
if (p == rel_path_old) {
-
editor_data->get_undo_redo().add_do_property(p_base, propertyname, rel_path_new);
editor_data->get_undo_redo().add_undo_property(p_base, propertyname, rel_path_old);
@@ -1353,19 +1329,16 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
bool autorename_animation_tracks = bool(EDITOR_DEF("editors/animation/autorename_animation_tracks", true));
if (autorename_animation_tracks && Object::cast_to<AnimationPlayer>(p_base)) {
-
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_base);
List<StringName> anims;
ap->get_animation_list(&anims);
Node *root = ap->get_node(ap->get_root());
if (root) {
-
NodePath root_path = root->get_path();
NodePath new_root_path = root_path;
for (List<Pair<NodePath, NodePath>>::Element *E = p_renames->front(); E; E = E->next()) {
-
if (E->get().first == root_path) {
new_root_path = E->get().second;
break;
@@ -1376,22 +1349,22 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
//will not be erased
for (List<StringName>::Element *E = anims.front(); E; E = E->next()) {
-
Ref<Animation> anim = ap->get_animation(E->get());
if (!r_rem_anims->has(anim)) {
r_rem_anims->insert(anim, Set<int>());
Set<int> &ran = r_rem_anims->find(anim)->get();
- for (int i = 0; i < anim->get_track_count(); i++)
+ for (int i = 0; i < anim->get_track_count(); i++) {
ran.insert(i);
+ }
}
Set<int> &ran = r_rem_anims->find(anim)->get();
- if (anim.is_null())
+ if (anim.is_null()) {
continue;
+ }
for (int i = 0; i < anim->get_track_count(); i++) {
-
NodePath track_np = anim->track_get_path(i);
Node *n = root->get_node(track_np);
if (!n) {
@@ -1400,13 +1373,12 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
NodePath old_np = n->get_path();
- if (!ran.has(i))
+ if (!ran.has(i)) {
continue; //channel was removed
+ }
for (List<Pair<NodePath, NodePath>>::Element *F = p_renames->front(); F; F = F->next()) {
-
if (F->get().first == old_np) {
-
if (F->get().second == NodePath()) {
//will be erased
@@ -1424,7 +1396,6 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
editor_data->get_undo_redo().add_undo_method(anim.ptr(), "track_set_path", idx, track_np);
editor_data->get_undo_redo().add_undo_method(anim.ptr(), "track_set_interpolation_type", idx, anim->track_get_interpolation_type(i));
for (int j = 0; j < anim->track_get_key_count(i); j++) {
-
editor_data->get_undo_redo().add_undo_method(anim.ptr(), "track_insert_key", idx, anim->track_get_key_time(i, j), anim->track_get_key_value(i, j), anim->track_get_key_transition(i, j));
}
@@ -1435,8 +1406,9 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
NodePath rel_path = new_root_path.rel_path_to(F->get().second);
NodePath new_path = NodePath(rel_path.get_names(), track_np.get_subnames(), false);
- if (new_path == track_np)
+ if (new_path == track_np) {
continue; //bleh
+ }
editor_data->get_undo_redo().add_do_method(anim.ptr(), "track_set_path", i, new_path);
editor_data->get_undo_redo().add_undo_method(anim.ptr(), "track_set_path", i, track_np);
}
@@ -1448,12 +1420,12 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
}
}
- for (int i = 0; i < p_base->get_child_count(); i++)
+ for (int i = 0; i < p_base->get_child_count(); i++) {
perform_node_renames(p_base->get_child(i), p_renames, r_rem_anims);
+ }
}
void SceneTreeDock::_node_prerenamed(Node *p_node, const String &p_new_name) {
-
List<Pair<NodePath, NodePath>> path_renames;
Vector<StringName> base_path;
@@ -1474,20 +1446,18 @@ void SceneTreeDock::_node_prerenamed(Node *p_node, const String &p_new_name) {
npp.second = NodePath(new_base_path, true);
path_renames.push_back(npp);
- for (int i = 0; i < p_node->get_child_count(); i++)
+ for (int i = 0; i < p_node->get_child_count(); i++) {
_fill_path_renames(base_path, new_base_path, p_node->get_child(i), &path_renames);
+ }
perform_node_renames(nullptr, &path_renames);
}
bool SceneTreeDock::_validate_no_foreign() {
-
List<Node *> selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
if (E->get() != edited_scene && E->get()->get_owner() != edited_scene) {
-
accept->set_text(TTR("Can't operate on nodes from a foreign scene!"));
accept->popup_centered();
return false;
@@ -1501,7 +1471,6 @@ bool SceneTreeDock::_validate_no_foreign() {
}
if (edited_scene->get_scene_inherited_state().is_valid() && edited_scene->get_scene_inherited_state()->find_node_by_path(edited_scene->get_path_to(E->get())) >= 0) {
-
accept->set_text(TTR("Can't operate on nodes the current scene inherits from!"));
accept->popup_centered();
return false;
@@ -1512,14 +1481,14 @@ bool SceneTreeDock::_validate_no_foreign() {
}
void SceneTreeDock::_node_reparent(NodePath p_path, bool p_keep_global_xform) {
-
Node *new_parent = scene_root->get_node(p_path);
ERR_FAIL_COND(!new_parent);
List<Node *> selection = editor_selection->get_selected_node_list();
- if (selection.empty())
+ if (selection.empty()) {
return; // Nothing to reparent.
+ }
Vector<Node *> nodes;
@@ -1531,31 +1500,32 @@ void SceneTreeDock::_node_reparent(NodePath p_path, bool p_keep_global_xform) {
}
void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, Vector<Node *> p_nodes, bool p_keep_global_xform) {
-
Node *new_parent = p_new_parent;
ERR_FAIL_COND(!new_parent);
- if (p_nodes.size() == 0)
+ if (p_nodes.size() == 0) {
return; // Nothing to reparent.
+ }
p_nodes.sort_custom<Node::Comparator>(); //Makes result reliable.
bool no_change = true;
for (int ni = 0; ni < p_nodes.size(); ni++) {
-
- if (p_nodes[ni] == p_new_parent)
+ if (p_nodes[ni] == p_new_parent) {
return; // Attempt to reparent to itself.
+ }
- if (p_nodes[ni]->get_parent() != p_new_parent || p_position_in_parent + ni != p_nodes[ni]->get_index())
+ if (p_nodes[ni]->get_parent() != p_new_parent || p_position_in_parent + ni != p_nodes[ni]->get_index()) {
no_change = false;
+ }
}
- if (no_change)
+ if (no_change) {
return; // Position and parent didn't change.
+ }
Node *validate = new_parent;
while (validate) {
-
ERR_FAIL_COND_MSG(p_nodes.find(validate) != -1, "Selection changed at some point. Can't reparent.");
validate = validate->get_parent();
}
@@ -1571,7 +1541,6 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
int inc = 0;
for (int ni = 0; ni < p_nodes.size(); ni++) {
-
// No undo implemented for this yet.
Node *node = p_nodes[ni];
@@ -1585,14 +1554,16 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
owners.push_back(E->get());
}
- if (new_parent == node->get_parent() && node->get_index() < p_position_in_parent + ni)
+ if (new_parent == node->get_parent() && node->get_index() < p_position_in_parent + ni) {
inc--; // If the child will generate a gap when moved, adjust.
+ }
editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node);
editor_data->get_undo_redo().add_do_method(new_parent, "add_child", node);
- if (p_position_in_parent >= 0)
+ if (p_position_in_parent >= 0) {
editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc);
+ }
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
String old_name = former_names[ni];
@@ -1600,7 +1571,6 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
// Name was modified, fix the path renames.
if (old_name.casecmp_to(new_name) != 0) {
-
// Fix the to name to have the new name.
NodePath old_new_name = path_renames[ni].second;
NodePath new_path;
@@ -1623,18 +1593,22 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
if (p_keep_global_xform) {
- if (Object::cast_to<Node2D>(node))
+ if (Object::cast_to<Node2D>(node)) {
editor_data->get_undo_redo().add_do_method(node, "set_global_transform", Object::cast_to<Node2D>(node)->get_global_transform());
- if (Object::cast_to<Node3D>(node))
+ }
+ if (Object::cast_to<Node3D>(node)) {
editor_data->get_undo_redo().add_do_method(node, "set_global_transform", Object::cast_to<Node3D>(node)->get_global_transform());
- if (Object::cast_to<Control>(node))
+ }
+ if (Object::cast_to<Control>(node)) {
editor_data->get_undo_redo().add_do_method(node, "set_global_position", Object::cast_to<Control>(node)->get_global_position());
+ }
}
editor_data->get_undo_redo().add_do_method(this, "_set_owners", edited_scene, owners);
- if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == node)
+ if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == node) {
editor_data->get_undo_redo().add_do_method(AnimationPlayerEditor::singleton->get_track_editor(), "set_root", node);
+ }
editor_data->get_undo_redo().add_undo_method(new_parent, "remove_child", node);
editor_data->get_undo_redo().add_undo_method(node, "set_name", former_names[ni]);
@@ -1644,14 +1618,12 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
// Add and move in a second step (so old order is preserved).
for (int ni = 0; ni < p_nodes.size(); ni++) {
-
Node *node = p_nodes[ni];
List<Node *> owned;
node->get_owned_by(node->get_owner(), &owned);
Array owners;
for (List<Node *>::Element *E = owned.front(); E; E = E->next()) {
-
owners.push_back(E->get());
}
@@ -1660,16 +1632,20 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node);
editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, child_pos);
editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners);
- if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == node)
+ if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == node) {
editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_track_editor(), "set_root", node);
+ }
if (p_keep_global_xform) {
- if (Object::cast_to<Node2D>(node))
+ if (Object::cast_to<Node2D>(node)) {
editor_data->get_undo_redo().add_undo_method(node, "set_transform", Object::cast_to<Node2D>(node)->get_transform());
- if (Object::cast_to<Node3D>(node))
+ }
+ if (Object::cast_to<Node3D>(node)) {
editor_data->get_undo_redo().add_undo_method(node, "set_transform", Object::cast_to<Node3D>(node)->get_transform());
- if (Object::cast_to<Control>(node))
+ }
+ if (Object::cast_to<Control>(node)) {
editor_data->get_undo_redo().add_undo_method(node, "set_position", Object::cast_to<Control>(node)->get_position());
+ }
}
}
@@ -1679,14 +1655,12 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
}
bool SceneTreeDock::_is_collapsed_recursive(TreeItem *p_item) const {
-
bool is_branch_collapsed = false;
List<TreeItem *> needs_check;
needs_check.push_back(p_item);
while (!needs_check.empty()) {
-
TreeItem *item = needs_check.back()->get();
needs_check.pop_back();
@@ -1705,12 +1679,10 @@ bool SceneTreeDock::_is_collapsed_recursive(TreeItem *p_item) const {
}
void SceneTreeDock::_set_collapsed_recursive(TreeItem *p_item, bool p_collapsed) {
-
List<TreeItem *> to_collapse;
to_collapse.push_back(p_item);
while (!to_collapse.empty()) {
-
TreeItem *item = to_collapse.back()->get();
to_collapse.pop_back();
@@ -1725,15 +1697,14 @@ void SceneTreeDock::_set_collapsed_recursive(TreeItem *p_item, bool p_collapsed)
}
void SceneTreeDock::_script_created(Ref<Script> p_script) {
-
List<Node *> selected = editor_selection->get_selected_node_list();
- if (selected.empty())
+ if (selected.empty()) {
return;
+ }
editor_data->get_undo_redo().create_action(TTR("Attach Script"));
for (List<Node *>::Element *E = selected.front(); E; E = E->next()) {
-
Ref<Script> existing = E->get()->get_script();
editor_data->get_undo_redo().add_do_method(E->get(), "set_script", p_script);
editor_data->get_undo_redo().add_undo_method(E->get(), "set_script", existing);
@@ -1752,7 +1723,6 @@ void SceneTreeDock::_script_creation_closed() {
}
void SceneTreeDock::_toggle_editable_children_from_selection() {
-
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *>::Element *e = selection.front();
@@ -1762,7 +1732,6 @@ void SceneTreeDock::_toggle_editable_children_from_selection() {
}
void SceneTreeDock::_toggle_placeholder_from_selection() {
-
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *>::Element *e = selection.front();
@@ -1781,12 +1750,12 @@ void SceneTreeDock::_toggle_placeholder_from_selection() {
}
void SceneTreeDock::_toggle_editable_children(Node *p_node) {
-
if (p_node) {
bool editable = !EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(p_node);
EditorNode::get_singleton()->get_edited_scene()->set_editable_instance(p_node, editable);
- if (editable)
+ if (editable) {
p_node->set_scene_instance_load_placeholder(false);
+ }
Node3DEditor::get_singleton()->update_all_gizmos(p_node);
@@ -1795,11 +1764,11 @@ void SceneTreeDock::_toggle_editable_children(Node *p_node) {
}
void SceneTreeDock::_delete_confirm() {
-
List<Node *> remove_list = editor_selection->get_selected_node_list();
- if (remove_list.empty())
+ if (remove_list.empty()) {
return;
+ }
editor->get_editor_plugins_over()->make_visible(false);
@@ -1808,14 +1777,12 @@ void SceneTreeDock::_delete_confirm() {
bool entire_scene = false;
for (List<Node *>::Element *E = remove_list.front(); E; E = E->next()) {
-
if (E->get() == edited_scene) {
entire_scene = true;
}
}
if (entire_scene) {
-
editor_data->get_undo_redo().add_do_method(editor, "set_edited_scene", (Object *)nullptr);
editor_data->get_undo_redo().add_undo_method(editor, "set_edited_scene", edited_scene);
editor_data->get_undo_redo().add_undo_method(edited_scene, "set_owner", edited_scene->get_owner());
@@ -1823,15 +1790,15 @@ void SceneTreeDock::_delete_confirm() {
editor_data->get_undo_redo().add_undo_reference(edited_scene);
} else {
-
remove_list.sort_custom<Node::Comparator>(); //sort nodes to keep positions
List<Pair<NodePath, NodePath>> path_renames;
//delete from animation
for (List<Node *>::Element *E = remove_list.front(); E; E = E->next()) {
Node *n = E->get();
- if (!n->is_inside_tree() || !n->get_parent())
+ if (!n->is_inside_tree() || !n->get_parent()) {
continue;
+ }
fill_path_renames(n, nullptr, &path_renames);
}
@@ -1840,22 +1807,23 @@ void SceneTreeDock::_delete_confirm() {
//delete for read
for (List<Node *>::Element *E = remove_list.front(); E; E = E->next()) {
Node *n = E->get();
- if (!n->is_inside_tree() || !n->get_parent())
+ if (!n->is_inside_tree() || !n->get_parent()) {
continue;
+ }
List<Node *> owned;
n->get_owned_by(n->get_owner(), &owned);
Array owners;
for (List<Node *>::Element *F = owned.front(); F; F = F->next()) {
-
owners.push_back(F->get());
}
editor_data->get_undo_redo().add_do_method(n->get_parent(), "remove_child", n);
editor_data->get_undo_redo().add_undo_method(n->get_parent(), "add_child", n);
editor_data->get_undo_redo().add_undo_method(n->get_parent(), "move_child", n, n->get_index());
- if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == n)
+ if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == n) {
editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_track_editor(), "set_root", n);
+ }
editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners);
editor_data->get_undo_redo().add_undo_reference(n);
@@ -1867,8 +1835,9 @@ void SceneTreeDock::_delete_confirm() {
editor_data->get_undo_redo().commit_action();
// hack, force 2d editor viewport to refresh after deletion
- if (CanvasItemEditor *editor = CanvasItemEditor::get_singleton())
+ if (CanvasItemEditor *editor = CanvasItemEditor::get_singleton()) {
editor->get_viewport_control()->update();
+ }
editor->push_item(nullptr);
@@ -1879,9 +1848,7 @@ void SceneTreeDock::_delete_confirm() {
}
void SceneTreeDock::_update_script_button() {
-
if (!profile_allow_script_editing) {
-
button_create_script->hide();
button_detach_script->hide();
} else if (EditorNode::get_singleton()->get_editor_selection()->get_selection().size() == 0) {
@@ -1911,7 +1878,6 @@ void SceneTreeDock::_update_script_button() {
}
void SceneTreeDock::_selection_changed() {
-
int selection_size = EditorNode::get_singleton()->get_editor_selection()->get_selection().size();
if (selection_size > 1) {
//automatically turn on multi-edit
@@ -1925,17 +1891,17 @@ void SceneTreeDock::_selection_changed() {
}
Node *SceneTreeDock::_get_selection_group_tail(Node *p_node, List<Node *> p_list) {
-
Node *tail = p_node;
Node *parent = tail->get_parent();
for (int i = p_node->get_index(); i < parent->get_child_count(); i++) {
Node *sibling = parent->get_child(i);
- if (p_list.find(sibling))
+ if (p_list.find(sibling)) {
tail = sibling;
- else
+ } else {
break;
+ }
}
return tail;
@@ -1951,7 +1917,6 @@ void SceneTreeDock::_do_create(Node *p_parent) {
editor_data->get_undo_redo().create_action(TTR("Create Node"));
if (edited_scene) {
-
editor_data->get_undo_redo().add_do_method(p_parent, "add_child", child);
editor_data->get_undo_redo().add_do_method(child, "set_owner", edited_scene);
editor_data->get_undo_redo().add_do_method(editor_selection, "clear");
@@ -1965,7 +1930,6 @@ void SceneTreeDock::_do_create(Node *p_parent) {
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name)));
} else {
-
editor_data->get_undo_redo().add_do_method(editor, "set_edited_scene", child);
editor_data->get_undo_redo().add_do_method(scene_tree, "update_tree");
editor_data->get_undo_redo().add_do_reference(child);
@@ -1981,25 +1945,26 @@ void SceneTreeDock::_do_create(Node *p_parent) {
Control *ct = Object::cast_to<Control>(c);
Size2 ms = ct->get_minimum_size();
- if (ms.width < 4)
+ if (ms.width < 4) {
ms.width = 40;
- if (ms.height < 4)
+ }
+ if (ms.height < 4) {
ms.height = 40;
+ }
ct->set_size(ms);
}
}
void SceneTreeDock::_create() {
-
if (current_option == TOOL_NEW) {
-
Node *parent = nullptr;
if (edited_scene) {
// If root exists in edited scene
parent = scene_tree->get_selected();
- if (!parent)
+ if (!parent) {
parent = edited_scene;
+ }
} else {
// If no root exist in edited scene
@@ -2057,17 +2022,19 @@ void SceneTreeDock::_create() {
smaller_path_to_top = path_length;
only_one_top_node = true;
} else if (smaller_path_to_top == path_length) {
- if (only_one_top_node && top_node->get_parent() != n->get_parent())
+ if (only_one_top_node && top_node->get_parent() != n->get_parent()) {
only_one_top_node = false;
+ }
}
}
}
Node *parent = nullptr;
- if (only_one_top_node)
+ if (only_one_top_node) {
parent = top_node->get_parent();
- else
+ } else {
parent = top_node->get_parent()->get_parent();
+ }
_do_create(parent);
@@ -2085,7 +2052,6 @@ void SceneTreeDock::_create() {
}
void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_properties, bool p_remove_old) {
-
Node *n = p_node;
Node *newnode = p_by_node;
@@ -2095,10 +2061,24 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
n->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
- if (!(E->get().usage & PROPERTY_USAGE_STORAGE))
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
continue;
- if (E->get().name == "__meta__")
+ }
+
+ if (E->get().name == "__meta__") {
+ if (Object::cast_to<CanvasItem>(newnode)) {
+ Dictionary metadata = n->get(E->get().name);
+ if (metadata.has("_edit_group_") && metadata["_edit_group_"]) {
+ newnode->set_meta("_edit_group_", true);
+ }
+ if (metadata.has("_edit_lock_") && metadata["_edit_lock_"]) {
+ newnode->set_meta("_edit_lock_", true);
+ }
+ }
+
continue;
+ }
+
if (default_oldnode->get(E->get().name) != n->get(E->get().name)) {
newnode->set(E->get().name, n->get(E->get().name));
}
@@ -2114,15 +2094,14 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
n->get_signal_list(&sl);
for (List<MethodInfo>::Element *E = sl.front(); E; E = E->next()) {
-
List<Object::Connection> cl;
n->get_signal_connection_list(E->get().name, &cl);
for (List<Object::Connection>::Element *F = cl.front(); F; F = F->next()) {
-
Object::Connection &c = F->get();
- if (!(c.flags & Object::CONNECT_PERSIST))
+ if (!(c.flags & Object::CONNECT_PERSIST)) {
continue;
+ }
newnode->connect(c.signal.get_name(), c.callable, c.binds, Object::CONNECT_PERSIST);
}
}
@@ -2149,8 +2128,9 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
c->call("set_transform", c->call("get_transform"));
}
//p_remove_old was added to support undo
- if (p_remove_old)
+ if (p_remove_old) {
editor_data->get_undo_redo().clear_history();
+ }
newnode->set_name(newname);
editor->push_item(newnode);
@@ -2166,22 +2146,18 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
}
void SceneTreeDock::set_edited_scene(Node *p_scene) {
-
edited_scene = p_scene;
}
void SceneTreeDock::set_selected(Node *p_node, bool p_emit_selected) {
-
scene_tree->set_selected(p_node, p_emit_selected);
}
void SceneTreeDock::import_subscene() {
-
import_subscene_dialog->popup_centered_clamped(Size2(500, 800) * EDSCALE, 0.8);
}
void SceneTreeDock::_import_subscene() {
-
Node *parent = scene_tree->get_selected();
if (!parent) {
parent = editor_data->get_edited_scene_root();
@@ -2193,7 +2169,6 @@ void SceneTreeDock::_import_subscene() {
}
void SceneTreeDock::_new_scene_from(String p_file) {
-
List<Node *> selection = editor_selection->get_selected_node_list();
if (selection.size() != 1) {
@@ -2214,7 +2189,6 @@ void SceneTreeDock::_new_scene_from(String p_file) {
reown[editor_data->get_edited_scene_root()] = base;
Node *copy = base->duplicate_and_reown(reown);
if (copy) {
-
Ref<PackedScene> sdata = memnew(PackedScene);
Error err = sdata->pack(copy);
memdelete(copy);
@@ -2226,8 +2200,9 @@ void SceneTreeDock::_new_scene_from(String p_file) {
}
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
+ }
err = ResourceSaver::save(p_file, sdata, flg);
if (err != OK) {
@@ -2244,26 +2219,27 @@ void SceneTreeDock::_new_scene_from(String p_file) {
}
static bool _is_node_visible(Node *p_node) {
-
- if (!p_node->get_owner())
+ if (!p_node->get_owner()) {
return false;
- if (p_node->get_owner() != EditorNode::get_singleton()->get_edited_scene() && !EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(p_node->get_owner()))
+ }
+ if (p_node->get_owner() != EditorNode::get_singleton()->get_edited_scene() && !EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(p_node->get_owner())) {
return false;
+ }
return true;
}
static bool _has_visible_children(Node *p_node) {
-
bool collapsed = p_node->is_displayed_folded();
- if (collapsed)
+ if (collapsed) {
return false;
+ }
for (int i = 0; i < p_node->get_child_count(); i++) {
-
Node *child = p_node->get_child(i);
- if (!_is_node_visible(child))
+ if (!_is_node_visible(child)) {
continue;
+ }
return true;
}
@@ -2272,7 +2248,6 @@ static bool _has_visible_children(Node *p_node) {
}
void SceneTreeDock::_normalize_drop(Node *&to_node, int &to_pos, int p_type) {
-
to_pos = -1;
if (p_type == -1) {
@@ -2315,7 +2290,6 @@ void SceneTreeDock::_normalize_drop(Node *&to_node, int &to_pos, int p_type) {
}
void SceneTreeDock::_files_dropped(Vector<String> p_files, NodePath p_to, int p_type) {
-
Node *node = get_node(p_to);
ERR_FAIL_COND(!node);
@@ -2339,15 +2313,16 @@ void SceneTreeDock::_script_dropped(String p_file, NodePath p_to) {
}
void SceneTreeDock::_nodes_dragged(Array p_nodes, NodePath p_to, int p_type) {
-
List<Node *> selection = editor_selection->get_selected_node_list();
- if (selection.empty())
+ if (selection.empty()) {
return; //nothing to reparent
+ }
Node *to_node = get_node(p_to);
- if (!to_node)
+ if (!to_node) {
return;
+ }
Vector<Node *> nodes;
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
@@ -2361,25 +2336,28 @@ void SceneTreeDock::_nodes_dragged(Array p_nodes, NodePath p_to, int p_type) {
}
void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) {
-
- if (p_depth > 8)
+ if (p_depth > 8) {
return;
+ }
List<PropertyInfo> pinfo;
p_obj->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
-
- if (!(E->get().usage & PROPERTY_USAGE_EDITOR))
+ if (!(E->get().usage & PROPERTY_USAGE_EDITOR)) {
continue;
- if (E->get().hint != PROPERTY_HINT_RESOURCE_TYPE)
+ }
+ if (E->get().hint != PROPERTY_HINT_RESOURCE_TYPE) {
continue;
+ }
Variant value = p_obj->get(E->get().name);
- if (value.get_type() != Variant::OBJECT)
+ if (value.get_type() != Variant::OBJECT) {
continue;
+ }
Object *obj = value;
- if (!obj)
+ if (!obj) {
continue;
+ }
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(obj);
@@ -2396,9 +2374,7 @@ void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) {
}
void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
-
if (!EditorNode::get_singleton()->get_edited_scene()) {
-
menu->clear();
if (profile_allow_editing) {
menu->add_icon_shortcut(get_theme_icon("Add", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/add_child_node"), TOOL_NEW);
@@ -2414,15 +2390,15 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *> full_selection = editor_selection->get_full_selected_node_list(); // Above method only returns nodes with common parent.
- if (selection.size() == 0)
+ if (selection.size() == 0) {
return;
+ }
menu->clear();
Ref<Script> existing_script;
bool existing_script_removable = true;
if (selection.size() == 1) {
-
Node *selected = selection[0];
if (profile_allow_editing) {
@@ -2430,8 +2406,9 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu_subresources->clear();
menu_subresources->set_size(Size2(1, 1));
_add_children_to_popup(selection.front()->get(), 0);
- if (menu->get_item_count() > 0)
+ if (menu->get_item_count() > 0) {
menu->add_separator();
+ }
menu->add_icon_shortcut(get_theme_icon("Add", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/add_child_node"), TOOL_NEW);
menu->add_icon_shortcut(get_theme_icon("Instance", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANCE);
@@ -2498,7 +2475,6 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
}
if (selection.size() == 1) {
-
if (profile_allow_editing) {
menu->add_separator();
menu->add_icon_shortcut(get_theme_icon("Blend", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/merge_from_scene"), TOOL_MERGE_FROM_SCENE);
@@ -2555,23 +2531,19 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
void SceneTreeDock::_filter_changed(const String &p_filter) {
-
scene_tree->set_filter(p_filter);
}
String SceneTreeDock::get_filter() {
-
return filter->get_text();
}
void SceneTreeDock::set_filter(const String &p_filter) {
-
filter->set_text(p_filter);
scene_tree->set_filter(p_filter);
}
void SceneTreeDock::_focus_node() {
-
Node *node = scene_tree->get_selected();
ERR_FAIL_COND(!node);
@@ -2585,17 +2557,24 @@ void SceneTreeDock::_focus_node() {
}
void SceneTreeDock::attach_script_to_selected(bool p_extend) {
+ if (ScriptServer::get_language_count() == 0) {
+ EditorNode::get_singleton()->show_warning(TTR("Cannot attach a script: there are no languages registered.\nThis is probably because this editor was built with all language modules disabled."));
+ return;
+ }
+
if (!profile_allow_script_editing) {
return;
}
List<Node *> selection = editor_selection->get_selected_node_list();
- if (selection.empty())
+ if (selection.empty()) {
return;
+ }
Node *selected = scene_tree->get_selected();
- if (!selected)
+ if (!selected) {
selected = selection.front()->get();
+ }
Ref<Script> existing = selected->get_script();
@@ -2634,7 +2613,6 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
}
void SceneTreeDock::open_script_dialog(Node *p_for_node, bool p_extend) {
-
scene_tree->set_selected(p_for_node, false);
if (p_extend) {
@@ -2652,31 +2630,27 @@ void SceneTreeDock::add_remote_tree_editor(Control *p_remote) {
}
void SceneTreeDock::show_remote_tree() {
-
_remote_tree_selected();
}
void SceneTreeDock::hide_remote_tree() {
-
_local_tree_selected();
}
void SceneTreeDock::show_tab_buttons() {
-
button_hb->show();
}
void SceneTreeDock::hide_tab_buttons() {
-
button_hb->hide();
}
void SceneTreeDock::_remote_tree_selected() {
-
scene_tree->hide();
create_root_dialog->hide();
- if (remote_tree)
+ if (remote_tree) {
remote_tree->show();
+ }
edit_remote->set_pressed(true);
edit_local->set_pressed(false);
@@ -2684,32 +2658,34 @@ void SceneTreeDock::_remote_tree_selected() {
}
void SceneTreeDock::_local_tree_selected() {
-
- scene_tree->show();
- if (remote_tree)
+ if (!bool(EDITOR_GET("interface/editors/show_scene_tree_root_selection")) || get_tree()->get_edited_scene_root() != nullptr) {
+ scene_tree->show();
+ }
+ if (remote_tree) {
remote_tree->hide();
+ }
edit_remote->set_pressed(false);
edit_local->set_pressed(true);
}
void SceneTreeDock::_update_create_root_dialog() {
-
BaseButton *toggle = Object::cast_to<BaseButton>(create_root_dialog->get_node(String("NodeShortcutsTopRow/NodeShortcutsToggle")));
Node *node_shortcuts = create_root_dialog->get_node(String("NodeShortcuts"));
- if (!toggle || !node_shortcuts)
+ if (!toggle || !node_shortcuts) {
return;
+ }
Control *beginner_nodes = Object::cast_to<Control>(node_shortcuts->get_node(String("BeginnerNodeShortcuts")));
Control *favorite_nodes = Object::cast_to<Control>(node_shortcuts->get_node(String("FavoriteNodeShortcuts")));
- if (!beginner_nodes || !favorite_nodes)
+ if (!beginner_nodes || !favorite_nodes) {
return;
+ }
EditorSettings::get_singleton()->set_setting("_use_favorites_root_selection", toggle->is_pressed());
EditorSettings::get_singleton()->save();
if (toggle->is_pressed()) {
-
for (int i = 0; i < favorite_nodes->get_child_count(); i++) {
favorite_nodes->get_child(i)->queue_delete();
}
@@ -2717,7 +2693,6 @@ void SceneTreeDock::_update_create_root_dialog() {
FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("favorites.Node"), FileAccess::READ);
if (f) {
-
while (!f->eof_reached()) {
String l = f->get_line().strip_edges();
@@ -2726,8 +2701,9 @@ void SceneTreeDock::_update_create_root_dialog() {
favorite_nodes->add_child(button);
button->set_text(TTR(l));
String name = l.get_slicec(' ', 0);
- if (ScriptServer::is_global_class(name))
+ if (ScriptServer::is_global_class(name)) {
name = ScriptServer::get_global_class_native_base(name);
+ }
button->set_icon(EditorNode::get_singleton()->get_class_icon(name));
button->connect("pressed", callable_mp(this, &SceneTreeDock::_favorite_root_selected), make_binds(l));
}
@@ -2754,11 +2730,9 @@ void SceneTreeDock::_favorite_root_selected(const String &p_class) {
}
void SceneTreeDock::_feature_profile_changed() {
-
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
if (profile.is_valid()) {
-
profile_allow_editing = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCENE_TREE);
profile_allow_script_editing = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT);
bool profile_allow_3d = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D);
@@ -2781,7 +2755,6 @@ void SceneTreeDock::_feature_profile_changed() {
}
void SceneTreeDock::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_set_owners"), &SceneTreeDock::_set_owners);
ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &SceneTreeDock::_unhandled_key_input);
ClassDB::bind_method(D_METHOD("_input"), &SceneTreeDock::_input);
@@ -2795,7 +2768,6 @@ void SceneTreeDock::_bind_methods() {
}
SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data) {
-
set_name("Scene");
editor = p_editor;
edited_scene = nullptr;
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 00b95c9853..72be3fb02f 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -53,7 +53,6 @@
class EditorNode;
class SceneTreeDock : public VBoxContainer {
-
GDCLASS(SceneTreeDock, VBoxContainer);
enum Tool {
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 251c911038..1b818036e1 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -41,14 +41,12 @@
#include "scene/resources/packed_scene.h"
Node *SceneTreeEditor::get_scene_node() {
-
ERR_FAIL_COND_V(!is_inside_tree(), nullptr);
return get_tree()->get_edited_scene_root();
}
void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_id) {
-
if (connect_to_script_mode) {
return; //don't do anything in this mode
}
@@ -71,8 +69,9 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
}
} else if (p_id == BUTTON_SCRIPT) {
Ref<Script> script_typed = n->get_script();
- if (!script_typed.is_null())
+ if (!script_typed.is_null()) {
emit_signal("open_script", script_typed);
+ }
} else if (p_id == BUTTON_VISIBILITY) {
undo_redo->create_action(TTR("Toggle Visible"));
@@ -93,7 +92,6 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
undo_redo->create_action(TTR("Unlock Node"));
if (n->is_class("CanvasItem") || n->is_class("Node3D")) {
-
undo_redo->add_do_method(n, "remove_meta", "_edit_lock_");
undo_redo->add_undo_method(n, "set_meta", "_edit_lock_", true);
undo_redo->add_do_method(this, "_update_tree", Variant());
@@ -103,7 +101,6 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
}
undo_redo->commit_action();
} else if (p_id == BUTTON_PIN) {
-
if (n->is_class("AnimationPlayer")) {
AnimationPlayerEditor::singleton->unpin();
_update_tree();
@@ -113,7 +110,6 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
undo_redo->create_action(TTR("Button Group"));
if (n->is_class("CanvasItem") || n->is_class("Node3D")) {
-
undo_redo->add_do_method(n, "remove_meta", "_edit_group_");
undo_redo->add_undo_method(n, "set_meta", "_edit_group_", true);
undo_redo->add_do_method(this, "_update_tree", Variant());
@@ -123,16 +119,15 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
}
undo_redo->commit_action();
} else if (p_id == BUTTON_WARNING) {
-
String config_err = n->get_configuration_warning();
- if (config_err == String())
+ if (config_err == String()) {
return;
+ }
config_err = config_err.word_wrap(80);
warning->set_text(config_err);
warning->popup_centered();
} else if (p_id == BUTTON_SIGNALS) {
-
editor_selection->clear();
editor_selection->add_node(n);
@@ -142,7 +137,6 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
NodeDock::singleton->show_connections();
} else if (p_id == BUTTON_GROUPS) {
-
editor_selection->clear();
editor_selection->add_node(n);
@@ -152,6 +146,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
NodeDock::singleton->show_groups();
}
}
+
void SceneTreeEditor::_toggle_visible(Node *p_node) {
if (p_node->has_method("is_visible") && p_node->has_method("set_visible")) {
bool v = bool(p_node->call("is_visible"));
@@ -161,9 +156,9 @@ void SceneTreeEditor::_toggle_visible(Node *p_node) {
}
bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
-
- if (!p_node)
+ if (!p_node) {
return false;
+ }
// only owned nodes are editable, since nodes can create their own (manually owned) child nodes,
// which the editor needs not to know about.
@@ -171,9 +166,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
bool part_of_subscene = false;
if (!display_foreign && p_node->get_owner() != get_scene_node() && p_node != get_scene_node()) {
-
if ((show_enabled_subscene || can_open_instance) && p_node->get_owner() && (get_scene_node()->is_editable_instance(p_node->get_owner()))) {
-
part_of_subscene = true;
//allow
} else {
@@ -186,14 +179,16 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
TreeItem *item = tree->create_item(p_parent);
item->set_text(0, p_node->get_name());
- if (can_rename && !part_of_subscene)
+ if (can_rename && !part_of_subscene) {
item->set_editable(0, true);
+ }
item->set_selectable(0, true);
if (can_rename) {
bool collapsed = p_node->is_displayed_folded();
- if (collapsed)
+ if (collapsed) {
item->set_collapsed(true);
+ }
}
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(p_node, "Node");
@@ -229,12 +224,10 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
item->set_custom_color(0, accent);
}
} else if (part_of_subscene) {
-
if (valid_types.size() == 0) {
item->set_custom_color(0, get_theme_color("disabled_font_color", "Editor"));
}
} else if (marked.has(p_node)) {
-
String node_name = p_node->get_name();
if (connecting_signal) {
node_name += " " + TTR("(Connecting From)");
@@ -243,7 +236,6 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
item->set_selectable(0, marked_selectable);
item->set_custom_color(0, get_theme_color("accent_color", "Editor"));
} else if (!marked_selectable && !marked_children_selectable) {
-
Node *node = p_node;
while (node) {
if (marked.has(node)) {
@@ -323,8 +315,9 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (can_open_instance && undo_redo) { //Show buttons only when necessary(SceneTreeDock) to avoid crashes
- if (!p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed)))
+ if (!p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
p_node->connect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed), varray(p_node));
+ }
Ref<Script> script = p_node->get_script();
if (!script.is_null()) {
@@ -335,47 +328,52 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
}
if (p_node->is_class("CanvasItem")) {
-
bool is_locked = p_node->has_meta("_edit_lock_"); //_edit_group_
- if (is_locked)
+ if (is_locked) {
item->add_button(0, get_theme_icon("Lock", "EditorIcons"), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it."));
+ }
bool is_grouped = p_node->has_meta("_edit_group_");
- if (is_grouped)
+ if (is_grouped) {
item->add_button(0, get_theme_icon("Group", "EditorIcons"), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable."));
+ }
bool v = p_node->call("is_visible");
- if (v)
+ if (v) {
item->add_button(0, get_theme_icon("GuiVisibilityVisible", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
- else
+ } else {
item->add_button(0, get_theme_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
+ }
- if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed)))
+ if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
+ }
_update_visibility_color(p_node, item);
} else if (p_node->is_class("Node3D")) {
-
bool is_locked = p_node->has_meta("_edit_lock_");
- if (is_locked)
+ if (is_locked) {
item->add_button(0, get_theme_icon("Lock", "EditorIcons"), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it."));
+ }
bool is_grouped = p_node->has_meta("_edit_group_");
- if (is_grouped)
+ if (is_grouped) {
item->add_button(0, get_theme_icon("Group", "EditorIcons"), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable."));
+ }
bool v = p_node->call("is_visible");
- if (v)
+ if (v) {
item->add_button(0, get_theme_icon("GuiVisibilityVisible", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
- else
+ } else {
item->add_button(0, get_theme_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
+ }
- if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed)))
+ if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
+ }
_update_visibility_color(p_node, item);
} else if (p_node->is_class("AnimationPlayer")) {
-
bool is_pinned = AnimationPlayerEditor::singleton->get_player() == p_node && AnimationPlayerEditor::singleton->is_pinned();
if (is_pinned) {
@@ -386,21 +384,20 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (editor_selection) {
if (editor_selection->is_selected(p_node)) {
-
item->select(0);
}
}
if (selected == p_node) {
- if (!editor_selection)
+ if (!editor_selection) {
item->select(0);
+ }
item->set_as_cursor(0);
}
bool keep = (filter.is_subsequence_ofi(String(p_node->get_name())));
for (int i = 0; i < p_node->get_child_count(); i++) {
-
bool child_keep = _add_nodes(p_node->get_child(i), item);
keep = keep || child_keep;
@@ -437,9 +434,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
}
void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
-
if (!p_node || (p_node != get_scene_node() && !p_node->get_owner())) {
-
return;
}
@@ -461,10 +456,11 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
visible = p_node->call("is_visible");
}
- if (visible)
+ if (visible) {
item->set_button(0, idx, get_theme_icon("GuiVisibilityVisible", "EditorIcons"));
- else
+ } else {
item->set_button(0, idx, get_theme_icon("GuiVisibilityHidden", "EditorIcons"));
+ }
_update_visibility_color(p_node, item);
}
@@ -482,25 +478,27 @@ void SceneTreeEditor::_update_visibility_color(Node *p_node, TreeItem *p_item) {
}
void SceneTreeEditor::_node_script_changed(Node *p_node) {
-
- if (tree_dirty)
+ if (tree_dirty) {
return;
+ }
MessageQueue::get_singleton()->push_call(this, "_update_tree");
tree_dirty = true;
}
void SceneTreeEditor::_node_removed(Node *p_node) {
-
- if (EditorNode::get_singleton()->is_exiting())
+ if (EditorNode::get_singleton()->is_exiting()) {
return; //speed up exit
+ }
- if (p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed)))
+ if (p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
p_node->disconnect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed));
+ }
if (p_node->is_class("Node3D") || p_node->is_class("CanvasItem")) {
- if (p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed)))
+ if (p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
p_node->disconnect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed));
+ }
}
if (p_node == selected) {
@@ -510,7 +508,6 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
}
void SceneTreeEditor::_node_renamed(Node *p_node) {
-
emit_signal("node_renamed");
if (!tree_dirty) {
@@ -520,7 +517,6 @@ void SceneTreeEditor::_node_renamed(Node *p_node) {
}
void SceneTreeEditor::_update_tree() {
-
if (!is_inside_tree()) {
tree_dirty = false;
return;
@@ -539,61 +535,65 @@ void SceneTreeEditor::_update_tree() {
}
void SceneTreeEditor::_compute_hash(Node *p_node, uint64_t &hash) {
-
hash = hash_djb2_one_64(p_node->get_instance_id(), hash);
- if (p_node->get_parent())
+ if (p_node->get_parent()) {
hash = hash_djb2_one_64(p_node->get_parent()->get_instance_id(), hash); //so a reparent still produces a different hash
+ }
for (int i = 0; i < p_node->get_child_count(); i++) {
-
_compute_hash(p_node->get_child(i), hash);
}
}
void SceneTreeEditor::_test_update_tree() {
-
pending_test_update = false;
- if (!is_inside_tree())
+ if (!is_inside_tree()) {
return;
+ }
- if (tree_dirty)
+ if (tree_dirty) {
return; // don't even bother
+ }
uint64_t hash = hash_djb2_one_64(0);
- if (get_scene_node())
+ if (get_scene_node()) {
_compute_hash(get_scene_node(), hash);
+ }
//test hash
- if (hash == last_hash)
+ if (hash == last_hash) {
return; // did not change
+ }
MessageQueue::get_singleton()->push_call(this, "_update_tree");
tree_dirty = true;
}
void SceneTreeEditor::_tree_changed() {
-
- if (EditorNode::get_singleton()->is_exiting())
+ if (EditorNode::get_singleton()->is_exiting()) {
return; //speed up exit
- if (pending_test_update)
+ }
+ if (pending_test_update) {
return;
- if (tree_dirty)
+ }
+ if (tree_dirty) {
return;
+ }
MessageQueue::get_singleton()->push_call(this, "_test_update_tree");
pending_test_update = true;
}
void SceneTreeEditor::_selected_changed() {
-
TreeItem *s = tree->get_selected();
ERR_FAIL_COND(!s);
NodePath np = s->get_metadata(0);
Node *n = get_node(np);
- if (n == selected)
+ if (n == selected) {
return;
+ }
selected = get_node(np);
@@ -603,7 +603,6 @@ void SceneTreeEditor::_selected_changed() {
}
void SceneTreeEditor::_deselect_items() {
-
// Clear currently elected items in scene tree dock.
if (editor_selection) {
editor_selection->clear();
@@ -612,7 +611,6 @@ void SceneTreeEditor::_deselect_items() {
}
void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_selected) {
-
TreeItem *item = Object::cast_to<TreeItem>(p_object);
ERR_FAIL_COND(!item);
@@ -620,11 +618,13 @@ void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_
Node *n = get_node(np);
- if (!n)
+ if (!n) {
return;
+ }
- if (!editor_selection)
+ if (!editor_selection) {
return;
+ }
if (p_selected) {
editor_selection->add_node(n);
@@ -636,10 +636,8 @@ void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_
}
void SceneTreeEditor::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
-
get_tree()->connect("tree_changed", callable_mp(this, &SceneTreeEditor::_tree_changed));
get_tree()->connect("node_removed", callable_mp(this, &SceneTreeEditor::_node_removed));
get_tree()->connect("node_renamed", callable_mp(this, &SceneTreeEditor::_node_renamed));
@@ -650,7 +648,6 @@ void SceneTreeEditor::_notification(int p_what) {
_update_tree();
} break;
case NOTIFICATION_EXIT_TREE: {
-
get_tree()->disconnect("tree_changed", callable_mp(this, &SceneTreeEditor::_tree_changed));
get_tree()->disconnect("node_removed", callable_mp(this, &SceneTreeEditor::_node_removed));
get_tree()->disconnect("node_renamed", callable_mp(this, &SceneTreeEditor::_node_renamed));
@@ -658,27 +655,27 @@ void SceneTreeEditor::_notification(int p_what) {
get_tree()->disconnect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed));
} break;
case NOTIFICATION_THEME_CHANGED: {
-
_update_tree();
} break;
}
}
TreeItem *SceneTreeEditor::_find(TreeItem *p_node, const NodePath &p_path) {
-
- if (!p_node)
+ if (!p_node) {
return nullptr;
+ }
NodePath np = p_node->get_metadata(0);
- if (np == p_path)
+ if (np == p_path) {
return p_node;
+ }
TreeItem *children = p_node->get_children();
while (children) {
-
TreeItem *n = _find(children, p_path);
- if (n)
+ if (n) {
return n;
+ }
children = children->get_next();
}
@@ -686,16 +683,18 @@ TreeItem *SceneTreeEditor::_find(TreeItem *p_node, const NodePath &p_path) {
}
void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) {
-
ERR_FAIL_COND(blocked > 0);
- if (pending_test_update)
+ if (pending_test_update) {
_test_update_tree();
- if (tree_dirty)
+ }
+ if (tree_dirty) {
_update_tree();
+ }
- if (selected == p_node)
+ if (selected == p_node) {
return;
+ }
TreeItem *item = p_node ? _find(tree->get_root(), p_node->get_path()) : nullptr;
@@ -712,8 +711,9 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) {
tree->ensure_cursor_is_visible();
} else {
- if (!p_node)
+ if (!p_node) {
selected = nullptr;
+ }
_update_tree();
selected = p_node;
}
@@ -724,7 +724,6 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) {
}
void SceneTreeEditor::_rename_node(ObjectID p_node, const String &p_name) {
-
Object *o = ObjectDB::get_instance(p_node);
ERR_FAIL_COND(!o);
Node *n = Object::cast_to<Node>(o);
@@ -738,7 +737,6 @@ void SceneTreeEditor::_rename_node(ObjectID p_node, const String &p_name) {
}
void SceneTreeEditor::_renamed() {
-
TreeItem *which = tree->get_edited();
ERR_FAIL_COND(!which);
@@ -755,7 +753,6 @@ void SceneTreeEditor::_renamed() {
String new_name = which->get_text(0);
if (!Node::_validate_node_name(new_name)) {
-
error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + Node::invalid_character);
error->popup_centered();
@@ -767,8 +764,9 @@ void SceneTreeEditor::_renamed() {
which->set_text(0, new_name);
}
- if (new_name == n->get_name())
+ if (new_name == n->get_name()) {
return;
+ }
if (!undo_redo) {
n->set_name(new_name);
@@ -784,14 +782,13 @@ void SceneTreeEditor::_renamed() {
}
Node *SceneTreeEditor::get_selected() {
-
return selected;
}
void SceneTreeEditor::set_marked(const Set<Node *> &p_marked, bool p_selectable, bool p_children_selectable) {
-
- if (tree_dirty)
+ if (tree_dirty) {
_update_tree();
+ }
marked = p_marked;
marked_selectable = p_selectable;
marked_children_selectable = p_children_selectable;
@@ -799,31 +796,28 @@ void SceneTreeEditor::set_marked(const Set<Node *> &p_marked, bool p_selectable,
}
void SceneTreeEditor::set_marked(Node *p_marked, bool p_selectable, bool p_children_selectable) {
-
Set<Node *> s;
- if (p_marked)
+ if (p_marked) {
s.insert(p_marked);
+ }
set_marked(s, p_selectable, p_children_selectable);
}
void SceneTreeEditor::set_filter(const String &p_filter) {
-
filter = p_filter;
_update_tree();
}
String SceneTreeEditor::get_filter() const {
-
return filter;
}
void SceneTreeEditor::set_display_foreign_nodes(bool p_display) {
-
display_foreign = p_display;
_update_tree();
}
-bool SceneTreeEditor::get_display_foreign_nodes() const {
+bool SceneTreeEditor::get_display_foreign_nodes() const {
return display_foreign;
}
@@ -832,7 +826,6 @@ void SceneTreeEditor::set_valid_types(const Vector<StringName> &p_valid) {
}
void SceneTreeEditor::set_editor_selection(EditorSelection *p_selection) {
-
editor_selection = p_selection;
tree->set_select_mode(Tree::SELECT_MULTI);
tree->set_cursor_can_exit_tree(false);
@@ -840,55 +833,59 @@ void SceneTreeEditor::set_editor_selection(EditorSelection *p_selection) {
}
void SceneTreeEditor::_update_selection(TreeItem *item) {
-
ERR_FAIL_COND(!item);
NodePath np = item->get_metadata(0);
- if (!has_node(np))
+ if (!has_node(np)) {
return;
+ }
Node *n = get_node(np);
- if (!n)
+ if (!n) {
return;
+ }
- if (editor_selection->is_selected(n))
+ if (editor_selection->is_selected(n)) {
item->select(0);
- else
+ } else {
item->deselect(0);
+ }
TreeItem *c = item->get_children();
while (c) {
-
_update_selection(c);
c = c->get_next();
}
}
void SceneTreeEditor::_selection_changed() {
-
- if (!editor_selection)
+ if (!editor_selection) {
return;
+ }
TreeItem *root = tree->get_root();
- if (!root)
+ if (!root) {
return;
+ }
_update_selection(root);
}
void SceneTreeEditor::_cell_collapsed(Object *p_obj) {
-
- if (updating_tree)
+ if (updating_tree) {
return;
- if (!can_rename)
+ }
+ if (!can_rename) {
return;
+ }
TreeItem *ti = Object::cast_to<TreeItem>(p_obj);
- if (!ti)
+ if (!ti) {
return;
+ }
bool collapsed = ti->is_collapsed();
@@ -901,14 +898,14 @@ void SceneTreeEditor::_cell_collapsed(Object *p_obj) {
}
Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
- if (!can_rename)
+ if (!can_rename) {
return Variant(); //not editable tree
+ }
Vector<Node *> selected;
Vector<Ref<Texture2D>> icons;
TreeItem *next = tree->get_next_selected(nullptr);
while (next) {
-
NodePath np = next->get_metadata(0);
Node *n = get_node(np);
@@ -922,8 +919,9 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
next = tree->get_next_selected(next);
}
- if (selected.empty())
+ if (selected.empty()) {
return Variant();
+ }
VBoxContainer *vb = memnew(VBoxContainer);
Array objs;
@@ -931,7 +929,6 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
float opacity_step = 1.0f / list_max;
float opacity_item = 1.0f;
for (int i = 0; i < selected.size(); i++) {
-
if (i < list_max) {
HBoxContainer *hb = memnew(HBoxContainer);
TextureRect *tf = memnew(TextureRect);
@@ -964,30 +961,34 @@ bool SceneTreeEditor::_is_script_type(const StringName &p_type) const {
}
bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
-
- if (!can_rename)
+ if (!can_rename) {
return false; //not editable tree
- if (filter != String())
+ }
+ if (filter != String()) {
return false; //can't rearrange tree with filter turned on
+ }
Dictionary d = p_data;
- if (!d.has("type"))
+ if (!d.has("type")) {
return false;
+ }
TreeItem *item = tree->get_item_at_position(p_point);
- if (!item)
+ if (!item) {
return false;
+ }
int section = tree->get_drop_section_at_position(p_point);
- if (section < -1 || (section == -1 && !item->get_parent()))
+ if (section < -1 || (section == -1 && !item->get_parent())) {
return false;
+ }
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
- if (files.size() == 0)
+ if (files.size() == 0) {
return false; //weird
+ }
if (_is_script_type(EditorFileSystem::get_singleton()->get_file_type(files[0]))) {
tree->set_drop_mode_flags(Tree::DROP_MODE_ON_ITEM);
@@ -997,8 +998,9 @@ bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_d
for (int i = 0; i < files.size(); i++) {
String file = files[i];
String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
- if (ftype != "PackedScene")
+ if (ftype != "PackedScene") {
return false;
+ }
}
tree->set_drop_mode_flags(Tree::DROP_MODE_INBETWEEN | Tree::DROP_MODE_ON_ITEM); //so it works..
@@ -1019,22 +1021,26 @@ bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_d
return String(d["type"]) == "nodes";
}
-void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
- if (!can_drop_data_fw(p_point, p_data, p_from))
+void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
+ if (!can_drop_data_fw(p_point, p_data, p_from)) {
return;
+ }
TreeItem *item = tree->get_item_at_position(p_point);
- if (!item)
+ if (!item) {
return;
+ }
int section = tree->get_drop_section_at_position(p_point);
- if (section < -1)
+ if (section < -1) {
return;
+ }
NodePath np = item->get_metadata(0);
Node *n = get_node(np);
- if (!n)
+ if (!n) {
return;
+ }
Dictionary d = p_data;
@@ -1044,7 +1050,6 @@ void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data,
}
if (String(d["type"]) == "files") {
-
Vector<String> files = d["files"];
String ftype = EditorFileSystem::get_singleton()->get_file_type(files[0]);
@@ -1067,12 +1072,10 @@ void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data,
}
void SceneTreeEditor::_rmb_select(const Vector2 &p_pos) {
-
emit_signal("rmb_pressed", tree->get_global_transform().xform(p_pos));
}
void SceneTreeEditor::_warning_changed(Node *p_for_node) {
-
//should use a timer
update_timer->start();
}
@@ -1088,7 +1091,6 @@ void SceneTreeEditor::set_connecting_signal(bool p_enable) {
}
void SceneTreeEditor::_bind_methods() {
-
ClassDB::bind_method("_update_tree", &SceneTreeEditor::_update_tree); // Still used by some connect_compat.
ClassDB::bind_method("_rename_node", &SceneTreeEditor::_rename_node);
ClassDB::bind_method("_test_update_tree", &SceneTreeEditor::_test_update_tree);
@@ -1114,7 +1116,6 @@ void SceneTreeEditor::_bind_methods() {
}
SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_open_instance) {
-
connect_to_script_mode = false;
connecting_signal = false;
undo_redo = nullptr;
@@ -1184,19 +1185,17 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
}
SceneTreeEditor::~SceneTreeEditor() {
-
memdelete(script_types);
}
/******** DIALOG *********/
void SceneTreeDialog::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
-
- if (is_visible())
+ if (is_visible()) {
tree->update_tree();
+ }
} break;
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &SceneTreeDialog::_select));
@@ -1210,11 +1209,10 @@ void SceneTreeDialog::_notification(int p_what) {
}
void SceneTreeDialog::_cancel() {
-
hide();
}
-void SceneTreeDialog::_select() {
+void SceneTreeDialog::_select() {
if (tree->get_selected()) {
emit_signal("selected", tree->get_selected()->get_path());
hide();
@@ -1222,19 +1220,16 @@ void SceneTreeDialog::_select() {
}
void SceneTreeDialog::_filter_changed(const String &p_filter) {
-
tree->set_filter(p_filter);
}
void SceneTreeDialog::_bind_methods() {
-
ClassDB::bind_method("_cancel", &SceneTreeDialog::_cancel);
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::NODE_PATH, "path")));
}
SceneTreeDialog::SceneTreeDialog() {
-
set_title(TTR("Select a Node"));
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 17ee5ace66..106837f69a 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -39,7 +39,6 @@
#include "scene/gui/tree.h"
class SceneTreeEditor : public Control {
-
GDCLASS(SceneTreeEditor, Control);
EditorSelection *editor_selection;
@@ -163,7 +162,6 @@ public:
};
class SceneTreeDialog : public ConfirmationDialog {
-
GDCLASS(SceneTreeDialog, ConfirmationDialog);
SceneTreeEditor *tree;
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index f84b7e73ed..ae5229b628 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -67,8 +67,8 @@ void ScriptCreateDialog::_theme_changed() {
parent_search_button->set_icon(gc->get_theme_icon("ClassList", "EditorIcons"));
status_panel->add_theme_style_override("panel", gc->get_theme_stylebox("bg", "Tree"));
}
-void ScriptCreateDialog::_notification(int p_what) {
+void ScriptCreateDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
_theme_changed();
@@ -99,7 +99,6 @@ bool ScriptCreateDialog::_can_be_built_in() {
}
void ScriptCreateDialog::config(const String &p_base_name, const String &p_base_path, bool p_built_in_enabled, bool p_load_enabled) {
-
class_name->set_text("");
class_name->deselect();
parent_name->set_text(p_base_name);
@@ -124,57 +123,60 @@ void ScriptCreateDialog::config(const String &p_base_name, const String &p_base_
}
void ScriptCreateDialog::set_inheritance_base_type(const String &p_base) {
-
base_type = p_base;
}
bool ScriptCreateDialog::_validate_parent(const String &p_string) {
-
- if (p_string.length() == 0)
+ if (p_string.length() == 0) {
return false;
+ }
if (can_inherit_from_file && p_string.is_quoted()) {
String p = p_string.substr(1, p_string.length() - 2);
- if (_validate_path(p, true) == "")
+ if (_validate_path(p, true) == "") {
return true;
+ }
}
return ClassDB::class_exists(p_string) || ScriptServer::is_global_class(p_string);
}
bool ScriptCreateDialog::_validate_class(const String &p_string) {
-
- if (p_string.length() == 0)
+ if (p_string.length() == 0) {
return false;
+ }
for (int i = 0; i < p_string.length(); i++) {
-
if (i == 0) {
- if (p_string[0] >= '0' && p_string[0] <= '9')
+ if (p_string[0] >= '0' && p_string[0] <= '9') {
return false; // no start with number plz
+ }
}
bool valid_char = (p_string[i] >= '0' && p_string[i] <= '9') || (p_string[i] >= 'a' && p_string[i] <= 'z') || (p_string[i] >= 'A' && p_string[i] <= 'Z') || p_string[i] == '_' || p_string[i] == '.';
- if (!valid_char)
+ if (!valid_char) {
return false;
+ }
}
return true;
}
String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must_exist) {
-
String p = p_path.strip_edges();
- if (p == "")
+ if (p == "") {
return TTR("Path is empty.");
- if (p.get_file().get_basename() == "")
+ }
+ if (p.get_file().get_basename() == "") {
return TTR("Filename is empty.");
+ }
p = ProjectSettings::get_singleton()->localize_path(p);
- if (!p.begins_with("res://"))
+ if (!p.begins_with("res://")) {
return TTR("Path is not local.");
+ }
DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
if (d->change_dir(p.get_base_dir()) != OK) {
@@ -219,22 +221,24 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
index++;
}
- if (!found)
+ if (!found) {
return TTR("Invalid extension.");
- if (!match)
+ }
+ if (!match) {
return TTR("Wrong extension chosen.");
+ }
/* Let ScriptLanguage do custom validation */
String path_error = ScriptServer::get_language(language_menu->get_selected())->validate_path(p);
- if (path_error != "")
+ if (path_error != "") {
return path_error;
+ }
/* All checks passed */
return "";
}
void ScriptCreateDialog::_class_name_changed(const String &p_name) {
-
if (_validate_class(class_name->get_text())) {
is_class_name_valid = true;
} else {
@@ -244,7 +248,6 @@ void ScriptCreateDialog::_class_name_changed(const String &p_name) {
}
void ScriptCreateDialog::_parent_name_changed(const String &p_parent) {
-
if (_validate_parent(parent_name->get_text())) {
is_parent_name_valid = true;
} else {
@@ -254,7 +257,6 @@ void ScriptCreateDialog::_parent_name_changed(const String &p_parent) {
}
void ScriptCreateDialog::_template_changed(int p_template) {
-
String selected_template = p_template == 0 ? "" : template_menu->get_item_text(p_template);
EditorSettings::get_singleton()->set_project_metadata("script_setup", "last_selected_template", selected_template);
if (p_template == 0) {
@@ -274,7 +276,6 @@ void ScriptCreateDialog::_template_changed(int p_template) {
}
void ScriptCreateDialog::ok_pressed() {
-
if (is_new_script_created) {
_create_new();
} else {
@@ -286,7 +287,6 @@ void ScriptCreateDialog::ok_pressed() {
}
void ScriptCreateDialog::_create_new() {
-
String cname_param;
if (has_named_classes) {
@@ -311,8 +311,9 @@ void ScriptCreateDialog::_create_new() {
if (has_named_classes) {
String cname = class_name->get_text();
- if (cname.length())
+ if (cname.length()) {
scr->set_name(cname);
+ }
}
if (!is_built_in) {
@@ -331,7 +332,6 @@ void ScriptCreateDialog::_create_new() {
}
void ScriptCreateDialog::_load_exist() {
-
String path = file_path->get_text();
RES p_script = ResourceLoader::load(path, "Script");
if (p_script.is_null()) {
@@ -345,14 +345,14 @@ void ScriptCreateDialog::_load_exist() {
}
void ScriptCreateDialog::_lang_changed(int l) {
-
ScriptLanguage *language = ScriptServer::get_language(l);
has_named_classes = language->has_named_classes();
can_inherit_from_file = language->can_inherit_from_file();
supports_built_in = language->supports_builtin_mode();
- if (!supports_built_in)
+ if (!supports_built_in) {
is_built_in = false;
+ }
String selected_ext = "." + language->get_extension();
String path = file_path->get_text();
@@ -409,7 +409,6 @@ void ScriptCreateDialog::_lang_changed(int l) {
// Populate script template items previously sorted and now grouped by origin
for (int i = 0; i < template_list.size(); i++) {
-
if (int(templates[i].origin) != cur_origin) {
template_menu->add_separator();
@@ -474,7 +473,6 @@ void ScriptCreateDialog::_lang_changed(int l) {
}
void ScriptCreateDialog::_update_script_templates(const String &p_extension) {
-
template_list.clear();
template_overrides.clear();
@@ -485,7 +483,6 @@ void ScriptCreateDialog::_update_script_templates(const String &p_extension) {
dirs.push_back(EditorSettings::get_singleton()->get_script_templates_dir());
for (int i = 0; i < dirs.size(); i++) {
-
Vector<String> list = EditorSettings::get_singleton()->get_script_templates(p_extension, dirs[i]);
for (int j = 0; j < list.size(); j++) {
@@ -509,7 +506,6 @@ void ScriptCreateDialog::_update_script_templates(const String &p_extension) {
}
void ScriptCreateDialog::_built_in_pressed() {
-
if (internal->is_pressed()) {
is_built_in = true;
is_new_script_created = true;
@@ -521,7 +517,6 @@ void ScriptCreateDialog::_built_in_pressed() {
}
void ScriptCreateDialog::_browse_path(bool browse_parent, bool p_save) {
-
is_browsing_parent = browse_parent;
if (p_save) {
@@ -549,7 +544,6 @@ void ScriptCreateDialog::_browse_path(bool browse_parent, bool p_save) {
}
void ScriptCreateDialog::_file_selected(const String &p_file) {
-
String p = ProjectSettings::get_singleton()->localize_path(p_file);
if (is_browsing_parent) {
parent_name->set_text("\"" + p + "\"");
@@ -567,19 +561,16 @@ void ScriptCreateDialog::_file_selected(const String &p_file) {
}
void ScriptCreateDialog::_create() {
-
parent_name->set_text(select_class->get_selected_type().split(" ")[0]);
_parent_name_changed(parent_name->get_text());
}
void ScriptCreateDialog::_browse_class_in_tree() {
-
select_class->set_base_type(base_type);
select_class->popup_create(true);
}
void ScriptCreateDialog::_path_changed(const String &p_path) {
-
if (is_built_in) {
return;
}
@@ -612,7 +603,6 @@ void ScriptCreateDialog::_path_entered(const String &p_path) {
}
void ScriptCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
-
error_label->set_text("- " + TTR(p_msg));
if (valid) {
error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
@@ -622,7 +612,6 @@ void ScriptCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
}
void ScriptCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
-
path_error_label->set_text("- " + TTR(p_msg));
if (valid) {
path_error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
@@ -632,7 +621,6 @@ void ScriptCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
}
void ScriptCreateDialog::_update_dialog() {
-
/* "Add Script Dialog" GUI logic and script checks. */
bool script_ok = true;
@@ -737,14 +725,12 @@ void ScriptCreateDialog::_update_dialog() {
}
void ScriptCreateDialog::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("config", "inherits", "path", "built_in_enabled", "load_enabled"), &ScriptCreateDialog::config, DEFVAL(true), DEFVAL(true));
ADD_SIGNAL(MethodInfo("script_created", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script")));
}
ScriptCreateDialog::ScriptCreateDialog() {
-
/* DIALOG */
/* Main Controls */
@@ -797,17 +783,17 @@ ScriptCreateDialog::ScriptCreateDialog() {
gc->add_child(memnew(Label(TTR("Language:"))));
gc->add_child(language_menu);
- default_language = 0;
+ default_language = -1;
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
-
String lang = ScriptServer::get_language(i)->get_name();
language_menu->add_item(lang);
if (lang == "GDScript") {
default_language = i;
}
}
-
- language_menu->select(default_language);
+ if (default_language >= 0) {
+ language_menu->select(default_language);
+ }
current_language = default_language;
language_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_lang_changed));
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 8910e8ec3a..c461bf0410 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -41,21 +41,19 @@
#include "scene/gui/margin_container.h"
void EditorSettingsDialog::ok_pressed() {
-
- if (!EditorSettings::get_singleton())
+ if (!EditorSettings::get_singleton()) {
return;
+ }
_settings_save();
timer->stop();
}
void EditorSettingsDialog::_settings_changed() {
-
timer->start();
}
void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
-
String full_name = inspector->get_full_item_path(p_name);
if (full_name == "interface/theme/accent_color" || full_name == "interface/theme/base_color" || full_name == "interface/theme/contrast") {
@@ -66,23 +64,22 @@ void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
}
void EditorSettingsDialog::_settings_save() {
-
EditorSettings::get_singleton()->notify_changes();
EditorSettings::get_singleton()->save();
}
void EditorSettingsDialog::cancel_pressed() {
-
- if (!EditorSettings::get_singleton())
+ if (!EditorSettings::get_singleton()) {
return;
+ }
EditorSettings::get_singleton()->notify_changes();
}
void EditorSettingsDialog::popup_edit_settings() {
-
- if (!EditorSettings::get_singleton())
+ if (!EditorSettings::get_singleton()) {
return;
+ }
EditorSettings::get_singleton()->list_text_editor_themes(); // make sure we have an up to date list of themes
@@ -116,7 +113,6 @@ void EditorSettingsDialog::_undo_redo_callback(void *p_self, const String &p_nam
}
void EditorSettingsDialog::_notification(int p_what) {
-
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible()) {
@@ -142,17 +138,16 @@ void EditorSettingsDialog::_notification(int p_what) {
}
void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
-
const Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed()) {
-
bool handled = false;
if (ED_IS_SHORTCUT("editor/undo", p_event)) {
String action = undo_redo->get_current_action_name();
- if (action != "")
+ if (action != "") {
EditorNode::get_log()->add_message("Undo: " + action, EditorLog::MSG_TYPE_EDITOR);
+ }
undo_redo->undo();
handled = true;
}
@@ -160,8 +155,9 @@ void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
if (ED_IS_SHORTCUT("editor/redo", p_event)) {
undo_redo->redo();
String action = undo_redo->get_current_action_name();
- if (action != "")
+ if (action != "") {
EditorNode::get_log()->add_message("Redo: " + action, EditorLog::MSG_TYPE_EDITOR);
+ }
handled = true;
}
@@ -177,7 +173,6 @@ void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
}
void EditorSettingsDialog::_update_icons() {
-
search_box->set_right_icon(shortcuts->get_theme_icon("Search", "EditorIcons"));
search_box->set_clear_button_enabled(true);
shortcut_search_box->set_right_icon(shortcuts->get_theme_icon("Search", "EditorIcons"));
@@ -190,7 +185,6 @@ void EditorSettingsDialog::_update_icons() {
}
void EditorSettingsDialog::_update_shortcuts() {
-
Map<String, bool> collapsed;
if (shortcuts->get_root() && shortcuts->get_root()->get_children()) {
@@ -208,10 +202,10 @@ void EditorSettingsDialog::_update_shortcuts() {
Map<String, TreeItem *> sections;
for (List<String>::Element *E = slist.front(); E; E = E->next()) {
-
Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(E->get());
- if (!sc->has_meta("original"))
+ if (!sc->has_meta("original")) {
continue;
+ }
Ref<InputEvent> original = sc->get_meta("original");
@@ -270,7 +264,6 @@ void EditorSettingsDialog::_update_shortcuts() {
}
void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column, int p_idx) {
-
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!ti);
@@ -287,8 +280,9 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
shortcut_configured = item;
} else if (p_idx == 1) { //erase
- if (!sc.is_valid())
+ if (!sc.is_valid()) {
return; //pointless, there is nothing
+ }
undo_redo->create_action(TTR("Erase Shortcut"));
undo_redo->add_do_method(sc.ptr(), "set_shortcut", Ref<InputEvent>());
@@ -299,8 +293,9 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
undo_redo->add_undo_method(this, "_settings_changed");
undo_redo->commit_action();
} else if (p_idx == 2) { //revert to original
- if (!sc.is_valid())
+ if (!sc.is_valid()) {
return; //pointless, there is nothing
+ }
Ref<InputEvent> original = sc->get_meta("original");
@@ -316,11 +311,9 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
}
void EditorSettingsDialog::_wait_for_key(const Ref<InputEvent> &p_event) {
-
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed() && k->get_keycode() != 0) {
-
last_wait_for_key = k;
const String str = keycode_get_string(k->get_keycode_with_modifiers());
@@ -330,9 +323,9 @@ void EditorSettingsDialog::_wait_for_key(const Ref<InputEvent> &p_event) {
}
void EditorSettingsDialog::_press_a_key_confirm() {
-
- if (last_wait_for_key.is_null())
+ if (last_wait_for_key.is_null()) {
return;
+ }
Ref<InputEventKey> ie;
ie.instance();
@@ -355,18 +348,17 @@ void EditorSettingsDialog::_press_a_key_confirm() {
}
void EditorSettingsDialog::_tabs_tab_changed(int p_tab) {
-
_focus_current_search_box();
}
void EditorSettingsDialog::_focus_current_search_box() {
-
Control *tab = tabs->get_current_tab_control();
LineEdit *current_search_box = nullptr;
- if (tab == tab_general)
+ if (tab == tab_general) {
current_search_box = search_box;
- else if (tab == tab_shortcuts)
+ } else if (tab == tab_shortcuts) {
current_search_box = shortcut_search_box;
+ }
if (current_search_box) {
current_search_box->grab_focus();
@@ -388,13 +380,11 @@ void EditorSettingsDialog::_editor_restart_close() {
}
void EditorSettingsDialog::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorSettingsDialog::_unhandled_input);
ClassDB::bind_method(D_METHOD("_update_shortcuts"), &EditorSettingsDialog::_update_shortcuts);
}
EditorSettingsDialog::EditorSettingsDialog() {
-
set_title(TTR("Editor Settings"));
undo_redo = memnew(UndoRedo);
diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h
index 03dd18d23f..05566762fc 100644
--- a/editor/settings_config_dialog.h
+++ b/editor/settings_config_dialog.h
@@ -41,7 +41,6 @@
#include "scene/gui/tool_button.h"
class EditorSettingsDialog : public AcceptDialog {
-
GDCLASS(EditorSettingsDialog, AcceptDialog);
bool updating;
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 6bf9c5ffae..aa88b0ef39 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -225,7 +225,6 @@ protected:
pinfo.hint_string = "Cubemap";
} break;
default: {
-
} break;
}
@@ -367,7 +366,6 @@ static Variant create_var(RS::GlobalVariableType p_type) {
}
void ShaderGlobalsEditor::_variable_added() {
-
String var = variable_name->get_text().strip_edges();
if (var == "" || !var.is_valid_identifier()) {
EditorNode::get_singleton()->show_warning(TTR("Please specify a valid variable identifier name."));
@@ -406,7 +404,6 @@ void ShaderGlobalsEditor::_variable_added() {
}
void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
-
print_line("deleted " + p_variable);
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
@@ -443,7 +440,6 @@ void ShaderGlobalsEditor::_notification(int p_what) {
}
ShaderGlobalsEditor::ShaderGlobalsEditor() {
-
HBoxContainer *add_menu_hb = memnew(HBoxContainer);
add_child(add_menu_hb);
@@ -476,7 +472,8 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() {
interface = memnew(ShaderGlobalsEditorInterface);
interface->connect("var_changed", Callable(this, "_changed"));
}
+
ShaderGlobalsEditor::~ShaderGlobalsEditor() {
- inspector->edit(NULL);
+ inspector->edit(nullptr);
memdelete(interface);
}
diff --git a/editor/shader_globals_editor.h b/editor/shader_globals_editor.h
index b3dbddc87e..33f527f314 100644
--- a/editor/shader_globals_editor.h
+++ b/editor/shader_globals_editor.h
@@ -42,7 +42,6 @@
class ShaderGlobalsEditorInterface;
class ShaderGlobalsEditor : public VBoxContainer {
-
GDCLASS(ShaderGlobalsEditor, VBoxContainer)
ShaderGlobalsEditorInterface *interface;
diff --git a/editor/translations/af.po b/editor/translations/af.po
index fb354fa199..1f598ef5e5 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -870,7 +870,6 @@ msgstr "Koppel tans Sein:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1513,18 +1512,9 @@ msgstr "Aktiveer"
msgid "Rearrange Autoloads"
msgstr "Herrangskik AutoLaaie"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Ongeldige Pad."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Lêer bestaan nie."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Nie in hulpbron pad nie."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2497,11 +2487,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Open Lêer(s)"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2774,10 +2767,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3392,6 +3381,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -4014,6 +4007,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -7005,15 +7002,15 @@ msgid ""
msgstr "Koppel '%s' aan '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Reël:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Maak Funksie"
@@ -7496,6 +7493,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10516,8 +10522,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Deursoek Hulp"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10680,6 +10687,13 @@ msgid "Open Documentation"
msgstr "Opnoemings"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10729,11 +10743,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10858,6 +10872,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Lêer bestaan nie."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Moet 'n geldige uitbreiding gebruik."
@@ -10900,6 +10918,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Ongeldige Pad."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Ongeldige naam."
@@ -11963,6 +11986,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11987,6 +12014,32 @@ msgstr "Ongeldige naam."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12641,6 +12694,9 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "Nie in hulpbron pad nie."
+
#~ msgid "Replaced %d occurrence(s)."
#~ msgstr "Het %d verskynsel(s) vervang."
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 22358973a0..a60de1a41e 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -37,12 +37,16 @@
# Nabeel20 <nabeelandnizam@gmail.com>, 2020.
# merouche djallal <kbordora@gmail.com>, 2020.
# Airbus5717 <Abdussamadf350@gmail.com>, 2020.
+# tamsamani mohamed <tamsmoha@gmail.com>, 2020.
+# Anas <anas.ghamdi61@gmail.com>, 2020.
+# R-K <raouf9005@gmail.com>, 2020.
+# HeroFight dev <abdkafi2002@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-05 14:01+0000\n"
-"Last-Translator: Anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-06-09 02:02+0000\n"
+"Last-Translator: HeroFight dev <abdkafi2002@gmail.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot/ar/>\n"
"Language: ar\n"
@@ -862,7 +866,6 @@ msgstr "إشارة غير قادر على الاتصال"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1472,17 +1475,9 @@ msgstr "تمكين"
msgid "Rearrange Autoloads"
msgstr "اعادة ترتيب التحميلات التلقائية"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "مسار غير صالح."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "الملف غير موجود."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "ليس في مسار الموارد."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2431,12 +2426,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "لا يمكن إعادة تحميل مشهد لم يتم حفظه من قبل."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "إرجاع"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "حفظ المشهد"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "هذا الفعل لا يمكن إرجاعة. إرجاع علي أية حال؟"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2721,10 +2719,6 @@ msgid "Redo"
msgstr "إعادة تراجع"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "إعادة المشهد"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "ادوات لكل-المشهد او لمشاريع متنوعه."
@@ -3007,9 +3001,8 @@ msgid "Update When Changed"
msgstr "تحديث عند التغيير"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Hide Update Spinner"
-msgstr "تعطيل دوار التحديث"
+msgstr "إخفاء دوران التحديث"
#: editor/editor_node.cpp
msgid "FileSystem"
@@ -3238,9 +3231,8 @@ msgid "Assign..."
msgstr "إلحاق..."
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr "اسم غير صالح."
+msgstr "إسم RID غير صالح."
#: editor/editor_properties.cpp
msgid ""
@@ -3278,9 +3270,8 @@ msgid "New Script"
msgstr "نص برمجي جديد"
#: editor/editor_properties.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Extend Script"
-msgstr "فتح الكود"
+msgstr "فتح الكود البرمجي"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "New %s"
@@ -3326,14 +3317,12 @@ msgid "Remove Item"
msgstr "إزالة عنصر"
#: editor/editor_properties_array_dict.cpp
-#, fuzzy
msgid "New Key:"
-msgstr "إسم جديد:"
+msgstr "مفتاح جديد:"
#: editor/editor_properties_array_dict.cpp
-#, fuzzy
msgid "New Value:"
-msgstr "إسم جديد:"
+msgstr "قيمة جديدة:"
#: editor/editor_properties_array_dict.cpp
msgid "Add Key/Value Pair"
@@ -3371,6 +3360,13 @@ msgstr "لم نستطع تشغيل الكود:"
msgid "Did you forget the '_run' method?"
msgstr "هل نسيت الطريقة '_run' ؟"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"اضغط مطولاً على Ctrl لإسقاط جالب Getter. اضغط مطولاً على Shift لإسقاط توقيع "
+"عام generic signature."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "إختيار عقدة(عقد) للإستيراد"
@@ -3388,9 +3384,8 @@ msgid "Import From Node:"
msgstr "إستيراد من عقدة:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Redownload"
-msgstr "اعادة التحميل"
+msgstr "إعادة التحميل"
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -3430,9 +3425,8 @@ msgid "Can't open export templates zip."
msgstr "لم نستطع فتح الملف المضغوط المُورد."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside templates: %s."
-msgstr "صيغة غير صالحة لـ version.txt داخل القالب."
+msgstr "صيغة غير صالحة ل version.txt داخل القالب: %s."
#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
@@ -3501,9 +3495,8 @@ msgid "Download Complete."
msgstr "التحميل إكتمل."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cannot remove temporary file:"
-msgstr "لا يمكن المسح:"
+msgstr "لا يمكن حذف ملف مؤقت:"
#: editor/export_template_manager.cpp
msgid ""
@@ -3514,9 +3507,8 @@ msgstr ""
"يمكن إيجاد أرشيف القوالب المعطوبة في '%s'."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error requesting URL:"
-msgstr "خطأ في طلب الرابط: "
+msgstr "خطأ في طلب الرابط:"
#: editor/export_template_manager.cpp
msgid "Connecting to Mirror..."
@@ -3565,9 +3557,8 @@ msgid "SSL Handshake Error"
msgstr "خطأ مطابقة ssl"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uncompressing Android Build Sources"
-msgstr "يفكك الضغط عن الأصول"
+msgstr "يتم تفكيك مصادر بناء أندرويد Android"
#: editor/export_template_manager.cpp
msgid "Current Version:"
@@ -3586,14 +3577,12 @@ msgid "Remove Template"
msgstr "مسح القالب"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select Template File"
msgstr "حدد ملف القالب"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Godot Export Templates"
-msgstr "إدارة قوالب التصدير"
+msgstr "إدارة قوالب التصدير Godot"
#: editor/export_template_manager.cpp
msgid "Export Template Manager"
@@ -3604,14 +3593,12 @@ msgid "Download Templates"
msgstr "تنزيل القوالب"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select mirror from list: (Shift+Click: Open in Browser)"
-msgstr "حدد السرفر من القائمة: "
+msgstr "حدد السرفر من القائمة: (Shift+Click: للفتح في المتصفح)"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Favorites"
-msgstr "المفضلة:"
+msgstr "المفضلات"
#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
@@ -3642,9 +3629,8 @@ msgid "No name provided."
msgstr "لا أسم مُقدم."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Provided name contains invalid characters."
-msgstr "الأسم المُقدم يحتوي علي حروف خاطئة"
+msgstr "الإسم المُقدم يحتوي على أحرف خاطئة."
#: editor/filesystem_dock.cpp
msgid "A file or folder with this name already exists."
@@ -3671,33 +3657,28 @@ msgid "Duplicating folder:"
msgstr "تكرار مجلد:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Inherited Scene"
-msgstr "مشهد مورث جديد..."
+msgstr "مشهد مُوّرَث جديد"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Set As Main Scene"
-msgstr "إختر المشهد الأساسي"
+msgstr "تعيين كمشهد أساسي"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open Scenes"
-msgstr "فتح مشهد"
+msgstr "فتح المَشاهِد"
#: editor/filesystem_dock.cpp
msgid "Instance"
msgstr "نموذج"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Add to Favorites"
-msgstr "المفضلة:"
+msgstr "إضافة إلى المفضلات"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Remove from Favorites"
-msgstr "حذف من المجموعة"
+msgstr "حذف من المفضلات"
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies..."
@@ -3720,29 +3701,24 @@ msgid "Move To..."
msgstr "تحريك إلي..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Scene..."
-msgstr "مشهد جديد"
+msgstr "مشهد جديد..."
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Script..."
-msgstr "فتح سريع للكود..."
+msgstr "فتح السكريبت..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Resource..."
-msgstr "حفظ المورد باسم..."
+msgstr "مورد جديد..."
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Expand All"
msgstr "توسيع الكل"
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Collapse All"
msgstr "طوي الكل"
@@ -3754,28 +3730,24 @@ msgid "Rename"
msgstr "إعادة التسمية"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Previous Folder/File"
-msgstr "المجلد السابق"
+msgstr "‪المجلد/الملف السابق"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Next Folder/File"
-msgstr "المجلد اللاحق"
+msgstr "المجلد/الملف التالي"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
msgstr "إعادة فحص نظام الملفات"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Toggle Split Mode"
-msgstr "أظهر المود"
+msgstr "تعيين وضعية الإنقسام"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Search files"
-msgstr "إبحث في الأصناف"
+msgstr "بحث الملفات"
#: editor/filesystem_dock.cpp
msgid ""
@@ -3790,42 +3762,36 @@ msgid "Move"
msgstr "تحريك"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "There is already file or folder with the same name in this location."
-msgstr "ملف أو مجلد مع هذا الأسم موجود بالفعل."
+msgstr "يوجد بالفعل ملف أو مجلد بنفس الاسم في هذا المكان."
#: editor/filesystem_dock.cpp
msgid "Overwrite"
msgstr "الكتابة المُتراكبة Overwrite"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Create Scene"
-msgstr "حفظ المشهد"
+msgstr "إنشاء المشهد"
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
msgstr "إنشاء نص برمجي"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Find in Files"
-msgstr "%d مزيد من الملفات"
+msgstr "إبحث في الملفات"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Find:"
-msgstr "جد"
+msgstr "إيجاد:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Folder:"
-msgstr "أنشئ مجلد"
+msgstr "مجلد:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Filters:"
-msgstr "وضع المُصفي:"
+msgstr "فلتر:"
#: editor/find_in_files.cpp
msgid ""
@@ -3849,29 +3815,24 @@ msgid "Cancel"
msgstr "إلغاء"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Find: "
-msgstr "جد"
+msgstr "إيجاد: "
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace: "
-msgstr "إستبدال"
+msgstr "إستبدال:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace all (no undo)"
-msgstr "إستبدال الكل"
+msgstr "إستبدال الكل (بلا تراجع)"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Searching..."
-msgstr "جاري الحفظ..."
+msgstr "جاري البحث..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Search complete"
-msgstr "إبحث عن كتابة"
+msgstr "إكتمل البحث"
#: editor/groups_editor.cpp
msgid "Add to Group"
@@ -3882,57 +3843,49 @@ msgid "Remove from Group"
msgstr "حذف من المجموعة"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group name already exists."
-msgstr "خطأ: إسم الحركة موجود بالفعل!"
+msgstr "توجد مجموعة بهذا الاسم."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Invalid group name."
-msgstr "اسم غير صالح."
+msgstr "اسم المجموعة غير صالح."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Rename Group"
-msgstr "المجموعات"
+msgstr "إعادة تسمية المجموعة"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Delete Group"
-msgstr "مسح المخطط"
+msgstr "حذف المجموعة"
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
msgstr "المجموعات"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Nodes Not in Group"
-msgstr "إضافة إلي مجموعة"
+msgstr "العُقد خارج المجموعة"
#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
#: editor/scene_tree_editor.cpp
msgid "Filter nodes"
-msgstr "العُقد المُرشحة Filter nodes"
+msgstr "تصفية العُقد"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Nodes in Group"
-msgstr "إضافة إلي مجموعة"
+msgstr "العُقد في المجموعة"
#: editor/groups_editor.cpp
msgid "Empty groups will be automatically removed."
-msgstr "ستزال المجموعات الفارغة بصورة تلقائية."
+msgstr "ستزال المجموعات الفارغة تلقائياً."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group Editor"
-msgstr "فتح مُعدل الكود"
+msgstr "محرر المجموعات"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Manage Groups"
-msgstr "المجموعات"
+msgstr "إدارة المجموعات"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
@@ -4008,6 +3961,10 @@ msgid "Error running post-import script:"
msgstr "خطأ في تشغيل الكود الملصق- المستورد:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "جاري الحفظ..."
@@ -4028,7 +3985,6 @@ msgid "Import As:"
msgstr "إستيراد كـ:"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Preset"
msgstr "إعداد مُسبق..."
@@ -4054,14 +4010,12 @@ msgid "Failed to load resource."
msgstr "فشل تحميل المورد."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Expand All Properties"
-msgstr "توسيع كل التفاصيل"
+msgstr "توسيع كل الخصائص"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Collapse All Properties"
-msgstr "طي كل التفاصيل"
+msgstr "طي كل الخصائص"
#: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -4073,9 +4027,8 @@ msgid "Copy Params"
msgstr "إنسخ المُعامل"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource Clipboard"
-msgstr "خطأ: لا مصدر حركة علي الحافظة!"
+msgstr "تحرير حافظة الموارد"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
@@ -4122,9 +4075,8 @@ msgid "Object properties."
msgstr "خصائص العنصر."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Filter properties"
-msgstr "خصائص العنصر."
+msgstr "تصفية الخصائص"
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4135,24 +4087,20 @@ msgid "MultiNode Set"
msgstr "تحديد عقد متعددة"
#: editor/node_dock.cpp
-#, fuzzy
msgid "Select a single node to edit its signals and groups."
-msgstr "حدد عقدة لكي تُعدل الإشارات والمجموعات."
+msgstr "حدد عقدة لكي تُعدل إشاراتها ومجموعاتها."
#: editor/plugin_config_dialog.cpp
-#, fuzzy
msgid "Edit a Plugin"
-msgstr "تعديل البولي"
+msgstr "تعديل إضافة"
#: editor/plugin_config_dialog.cpp
-#, fuzzy
msgid "Create a Plugin"
-msgstr "إنشاء حل C#‎"
+msgstr "إنشاء إضافة"
#: editor/plugin_config_dialog.cpp
-#, fuzzy
msgid "Plugin Name:"
-msgstr "إضافات"
+msgstr "اسم الإضافة:"
#: editor/plugin_config_dialog.cpp
msgid "Subfolder:"
@@ -4172,53 +4120,45 @@ msgstr "التفعيل الآن؟"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon"
-msgstr "إنشاء بولي"
+msgstr "إنشاء مضلع"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Create points."
-msgstr "مسح النقاط"
+msgstr "إنشاء نقاط."
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid ""
"Edit points.\n"
"LMB: Move Point\n"
"RMB: Erase Point"
msgstr ""
-"تعديل المضلعات الموجودة:\n"
-"زر الفأرة الأيسر: لتحريك النقطة.\n"
-"Ctrl+زر الفأرة الأيسر: لتقسيم الجزء.\n"
-"زر الفأرة الأيمن: مسح النقطة."
+"تعديل النقاط.\n"
+"زر الفأرة الأيسر: لتحريك النقطة\n"
+"زر الفأرة الأيمن: مسح النقطة"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
-#, fuzzy
msgid "Erase points."
-msgstr "زر الفأرة الأيمن: مسح النقطة."
+msgstr "مسح النقاط."
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Edit Polygon"
-msgstr "تعديل البولي"
+msgstr "تعديل مضلع"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Insert Point"
msgstr "إدخال نقطة"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Edit Polygon (Remove Point)"
-msgstr "تعديل البولي (مسح النقطة)"
+msgstr "تعديل المضلع (مسح النقطة)"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Remove Polygon And Point"
-msgstr "مسح البولي والنقطة"
+msgstr "مسح المضلع والنقطة"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4232,15 +4172,13 @@ msgstr "أضف حركة"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Load..."
-msgstr "تحميل"
+msgstr "تحميل..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Move Node Point"
-msgstr "مسح النقطة"
+msgstr "تحريك نقطة العقدة"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#, fuzzy
@@ -4261,9 +4199,8 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Node Point"
-msgstr "إضافة نقطة"
+msgstr "إضافة نقطة العقدة"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -7011,12 +6948,13 @@ msgstr "قطع إتصال'%s' من '%s'"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
-msgid "Line"
-msgstr "الخط:"
+msgid "[Ignore]"
+msgstr "(تجاهل)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(تجاهل)"
+#, fuzzy
+msgid "Line"
+msgstr "الخط:"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -7509,6 +7447,15 @@ msgid "XForm Dialog"
msgstr "نافذة XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "محاذاة العُقد إلى الأرضية"
@@ -7963,7 +7910,7 @@ msgstr "الخطوة:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Sep.:"
-msgstr ""
+msgstr "الفاصل:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "TextureRegion"
@@ -8050,7 +7997,7 @@ msgstr "عنصر مُفعل اختياري"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Named Sep."
-msgstr ""
+msgstr "الفاصل المُسمّى"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Submenu"
@@ -9195,9 +9142,8 @@ msgid "Scalar constant."
msgstr "ثابت الكمية القياسية Scalar constant."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar uniform."
-msgstr "تحويل تغيير التحريك"
+msgstr "الكمية القياسية المُوحدة Scalar uniform."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Perform the cubic texture lookup."
@@ -9219,6 +9165,7 @@ msgstr "البحث عن النقش الموحد ثنائي البُعد."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "2D texture uniform lookup with triplanar."
msgstr ""
+"البحث عن النقش ثنائي البُعد الموحد باستخدام الإسقاط ثلاثي المستويات triplanar."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Transform function."
@@ -9234,6 +9181,13 @@ msgid ""
"whose number of rows is the number of components in 'c' and whose number of "
"columns is the number of components in 'r'."
msgstr ""
+"يحسب الجداء السلمي لزوج من المُتجهات (الأشعة). \n"
+"\n"
+"يعامل OuterProduct (الجداء السلمي) المعامل الأول 'c' كمتجه عمودي (مصفوفة "
+"بعمود واحد) بينما يعامل المعامل الثاني 'r' كمُتجه أفقي (مصفوفة بصف واحد) حيث "
+"يقوم بالجداء الجبري الخطي للمصفوفتين بضرب 'c * r'، الأمر الذي ينتج عنه "
+"مصفوفة عدد صفوفها يساوي عدد مكونات 'c' وعدد الأعمدة فيها يكون عدد المكونات "
+"في 'r'."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Composes transform from four vectors."
@@ -9306,6 +9260,11 @@ msgid ""
"incident vector, and Nref, the reference vector. If the dot product of I and "
"Nref is smaller than zero the return value is N. Otherwise -N is returned."
msgstr ""
+"يُرجع المُتجه (الشعاع) الذي يشير إلى ذات اتجاه المُتجه المرجعي. ولدى هذه "
+"الوظيفة البرمجية ثلاث مَعالم كمتجهات: N، المُتجه الموجه، I، المُتجه المُسقط "
+"وأخيراً Nref الذي يمثل المُوجه المرجعي. إذا كان الجداء السُلمي dot product لكل "
+"من I وNref أصغر من الصفر فإن القيمة المُرجعة وقتها ستكون N. عدا ذلك سيتم "
+"إرجاع -N."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the length of a vector."
@@ -9323,25 +9282,27 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the normalize product of vector."
-msgstr ""
+msgstr "يحسب قيمة المُتجه (الشعاع) نسبة للواحد normalize product."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "1.0 - vector"
-msgstr ""
+msgstr "1.0 - مُتجه (شعاع)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "1.0 / vector"
-msgstr ""
+msgstr "1.0 \\ المُتجه (الشعاع)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns the vector that points in the direction of reflection ( a : incident "
"vector, b : normal vector )."
msgstr ""
+"يُرجع المُتجه الذي يشير إلى باتجاه الانعكاس (أ: المُتجه (الشعاع) المُسقَط، ب: "
+"المُتجه (الشعاع) الطبيعي)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the vector that points in the direction of refraction."
-msgstr ""
+msgstr "يُرجع المُتجه (الشعاع) الذي يشير باتجاه الانكسار."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9351,6 +9312,11 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n"
+"\n"
+"تُرجع قيمة 0.0 إذا كان 'x' أصغر من 'edge0' و 1.0 إذا كان 'x' أكبر من 'edge1'. "
+"بخلاف ذلك القيمة المُرجعة سيتم استيفاؤها (استقراء داخلي) بين 0.0 و1.0 "
+"باستخدام متعددات الحدود لهيرمت Hermite polynomials."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9360,6 +9326,11 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n"
+"\n"
+"تُرجع قيمة 0.0 إذا كان 'x' أصغر من 'edge0' و 1.0 إذا كان 'x' أكبر من 'edge1'. "
+"بخلاف ذلك القيمة المُرجعة سيتم استيفاؤها (استقراء داخلي) بين 0.0 و1.0 "
+"باستخدام متعددات الحدود لهيرمت Hermite polynomials."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9367,6 +9338,9 @@ msgid ""
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Step function( vector(edge), vector(x) ).\n"
+"\n"
+"يُرجع القيمة 0.0 إذا كان 'x' أصغر من 'edge' وعدا ذلك ستُرجع القيمة 1.0."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9374,10 +9348,13 @@ msgid ""
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Step function( scalar(edge), vector(x) ).\n"
+"\n"
+"يُرجع القيمة 0.0 إذا كان 'x' أصغر من 'edge' وعدا ذلك ستُرجع القيمة 1.0."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Adds vector to vector."
-msgstr ""
+msgstr "إضافة مُتجه (شعاع) إلى مُتجه (شعاع)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Divides vector by vector."
@@ -9385,19 +9362,19 @@ msgstr "يُقسّم المُتجه (الشعاع) على المُتجه."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Multiplies vector by vector."
-msgstr ""
+msgstr "جداء (مضاعفة) مُتجه بمُتجه."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the remainder of the two vectors."
-msgstr ""
+msgstr "يُرجع باقي كل من المُتجهين (الشعاعين)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Subtracts vector from vector."
-msgstr ""
+msgstr "طرح مُتجه (شعاع) من مُتجه."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector constant."
-msgstr ""
+msgstr "ثابت المُتجه."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9410,12 +9387,18 @@ msgid ""
"output ports. This is a direct injection of code into the vertex/fragment/"
"light function, do not use it to write the function declarations inside."
msgstr ""
+"تعبير إصلاحي (لغوي) خاص بمُظلل غودوت، بواسطة كمية مُخصصة من منافذ المُدخلات "
+"والمُخرجات. إنه إقحام مباشر للنص البرمجي ضمن الوظائف الخاصة بالقمة vertex/ "
+"بالجزء fragment/ بالضوء light ، لذا لا تستخدمها لكي تكتب تعريف وتوضيح "
+"الوظيفة البرمجية داخلها."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns falloff based on the dot product of surface normal and view "
"direction of camera (pass associated inputs to it)."
msgstr ""
+"يُرجع الإسقاط المبني على الجداء السُلمي لكل من السطح الطبيعي وتوجيه الكاميرا "
+"(يمرر المُدخلات المرتبطة بها)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9424,50 +9407,67 @@ msgid ""
"it later in the Expressions. You can also declare varyings, uniforms and "
"constants."
msgstr ""
+"تعبير (إصطلاحي) لغوي خاص بمُظلل غودوت، والذي يكون أعلى المُظلل الناتج. يمكنك "
+"أن تضع تعريفات وظيفية برمجية مختلفة ضمنه واستدعاءها لاحقاً في التعابير عنها. "
+"كما يمكنك أيضاً أن تُصرّح (تعرّف) عن المتحولات، الموحدات (uniforms)، وكذلك "
+"الثوابت."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Scalar derivative function."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) وظيفية برمجية اشتقاقية للكمية القياسية "
+"Scalar."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Vector derivative function."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) وظيفية برمجية اشتقاقية للمُتجه (الشعاع)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'x' using local "
"differencing."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) (مُتجه) مُشتق في 'x' باستخدام الاختلافات "
+"المحلية."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'x' using local "
"differencing."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) (كمية قياسية Scalar) مُشتقة في 'x' باستخدام "
+"الاختلافات المحلية."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'y' using local "
"differencing."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) (مُتجه) مُشتق في 'y' باستخدام الاختلافات "
+"المحلية."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'y' using local "
"differencing."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) (كمية قياسية Scalar) مُشتقة في 'y' باستخدام "
+"الاختلافات المحلية."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and "
"'y'."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) (مُتجه)مجموع الاشتقاق المُطلق في 'x' و 'y'."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and "
"'y'."
msgstr ""
+"(فقط وضع القِطع Fragment/ الضوء) (كمية قياسية Scalar) مُشتق مُطلق في 'x' و'y'."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "VisualShader"
@@ -9863,6 +9863,14 @@ msgid ""
"Warning: You won't be able to open the project with previous versions of the "
"engine anymore."
msgstr ""
+"إن ملف إعدادت المشروع المرفق لا يُحدد نسخة غودوت التي تم بناؤه بها. \n"
+"\n"
+"%s\n"
+"\n"
+"إن أصريت على فتحه، سيتم تحويله لبنية ملف التهيئة (التكوين) الحالي الخاص "
+"بغودوت. \n"
+"تحذير: لن تعد قادارً على فتح المشروع باستخدام النُسخ السابقة من المُحرك بعد "
+"الآن."
#: editor/project_manager.cpp
msgid ""
@@ -9875,6 +9883,13 @@ msgid ""
"Warning: You won't be able to open the project with previous versions of the "
"engine anymore."
msgstr ""
+"إن ملف إعدادات المشروع المرفق كان قد تم إنشاؤه باستخدام إصدار أقدم من "
+"المحرك، لذا إنه بحاجة لتحويله إلى النسخة الحالية:\n"
+"\n"
+"%s\n"
+"\n"
+"هل ترغب في تحويله؟\n"
+"تحذير: لن تعد قادراً على فتح المشروع بالنُسخ السابقة من المُحرك بعد الآن."
#: editor/project_manager.cpp
msgid ""
@@ -9999,6 +10014,9 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"صندوق البحث يُرشح (يُغربل) المشاريع وفقاً للاسم و مكون المسار الأخير.\n"
+"لتشريح (غربلة) المشاريع باستخدام الاسم والمسار الكامل، يجب أن تحتوي المبحوث "
+"عنه query على الأقل حرف `/` واحد."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10021,8 +10039,8 @@ msgid ""
"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'"
msgstr ""
-"اسم فعالية غير صحيح. لا يمكن أن يكون فارغاً أو أو يتضمن '/'، ':'، '='، '\\' "
-"أو '\"'"
+"اسم فعالية غير صحيح. لا يمكن أن يكون فارغاً أو يتضمن '/'، ':'، '='، '\\' أو "
+"'\"'"
#: editor/project_settings_editor.cpp
msgid "An action with the name '%s' already exists."
@@ -10086,27 +10104,27 @@ msgstr "زر العجلة يميناً"
#: editor/project_settings_editor.cpp
msgid "X Button 1"
-msgstr ""
+msgstr "زر X 1"
#: editor/project_settings_editor.cpp
msgid "X Button 2"
-msgstr ""
+msgstr "زر X 2"
#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
-msgstr ""
+msgstr "مؤشر محور القبضة Joypad :"
#: editor/project_settings_editor.cpp
msgid "Axis"
-msgstr ""
+msgstr "محاور"
#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
-msgstr ""
+msgstr "مؤشر زر القبضة Joypad:"
#: editor/project_settings_editor.cpp
msgid "Erase Input Action"
-msgstr ""
+msgstr "مسح إجراء الإدخال"
#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
@@ -10203,19 +10221,19 @@ msgstr "إضافة مسار مُعاد تعيينه Remapped"
#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
-msgstr ""
+msgstr "مورد إعادة رسم الخريطة يُضيف إعادة رسم خريطة"
#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
-msgstr ""
+msgstr "تغيير لغة مورد إعادة تعيين الخريطة"
#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
-msgstr ""
+msgstr "إزالة مورد إعادة تعيين الخريطة"
#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
-msgstr ""
+msgstr "إزالة إعداد مورد إعادة تعيين الخريطة"
#: editor/project_settings_editor.cpp
msgid "Changed Locale Filter"
@@ -10223,7 +10241,7 @@ msgstr "مُرشح محلي مُعدّل"
#: editor/project_settings_editor.cpp
msgid "Changed Locale Filter Mode"
-msgstr ""
+msgstr "وضع المُرشح (المُغربل) المحلي المُعدّل"
#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
@@ -10279,7 +10297,7 @@ msgstr "الترجمات:"
#: editor/project_settings_editor.cpp
msgid "Remaps"
-msgstr ""
+msgstr "إعادة تعيين الخرائط"
#: editor/project_settings_editor.cpp
msgid "Resources:"
@@ -10343,7 +10361,7 @@ msgstr "ملف..."
#: editor/property_editor.cpp
msgid "Dir..."
-msgstr ""
+msgstr "مسار..."
#: editor/property_editor.cpp
msgid "Assign"
@@ -10454,13 +10472,15 @@ msgstr "مقدار الزيادة للعداد لكل عُقدة"
#: editor/rename_dialog.cpp
msgid "Padding"
-msgstr ""
+msgstr "الحدود المُبطنة Padding"
#: editor/rename_dialog.cpp
msgid ""
"Minimum number of digits for the counter.\n"
"Missing digits are padded with leading zeros."
msgstr ""
+"أصغر عدد خانات للعداد.\n"
+"الخانات الناقصة ستعوض padded بأصفار قياسية."
#: editor/rename_dialog.cpp
msgid "Post-Process"
@@ -10566,8 +10586,9 @@ msgid "Instance Child Scene"
msgstr "نمذجة المشهد الابن"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "إخلاء الكود"
+#, fuzzy
+msgid "Detach Script"
+msgstr "إلحاق نص برمجي"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10736,6 +10757,13 @@ msgid "Open Documentation"
msgstr "فُتح مؤخراً"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "إضافة عُقدة ابن"
@@ -10788,11 +10816,13 @@ msgstr ""
"موروث."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "إلحاق نص برمجي موجود أو جديد للعُقدة المختارة."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "مسح النص البرمجي للعُقدة المختارة."
#: editor/scene_tree_dock.cpp
@@ -10829,86 +10859,95 @@ msgstr "خطأ في الإتصال"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "تحذير تهيئة العُقدة:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has %s connection(s) and %s group(s).\n"
"Click to show signals dock."
msgstr ""
+"تملك هذه العُقدة %s اتصال(ات) و %s مجموعة(مجموعات).\n"
+"اضغط لإظهار رصيف (ميناء) الإشارات."
#: editor/scene_tree_editor.cpp
msgid ""
"Node has %s connection(s).\n"
"Click to show signals dock."
msgstr ""
+"تملك العُقدة %s اتصال(ات).\n"
+"اضغط لإظهار رصيف (ميناء) الإشارات."
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in %s group(s).\n"
"Click to show groups dock."
msgstr ""
+"العُقدة ضمن %s مجموعة(مجموعات).\n"
+"اضغط لإظهار رصيف (ميناء) المجموعات."
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open Script:"
-msgstr "فتح الكود"
+msgstr "فتح النص البرمجي:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock it."
msgstr ""
+"إن العُقدة مقفولة. \n"
+"اضغط لفكّ القفل."
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable."
msgstr ""
+"الابن غير قابل للاختيار.\n"
+"اضغط لجعله قابلاً للاختيار."
#: editor/scene_tree_editor.cpp
msgid "Toggle Visibility"
-msgstr ""
+msgstr "تشغيل/إطفاء الوضوحية Visibility"
#: editor/scene_tree_editor.cpp
msgid ""
"AnimationPlayer is pinned.\n"
"Click to unpin."
msgstr ""
+"تم تعليق مُشغل الرسومات المُتحركة.\n"
+"اضغط لإزالة تعليقه."
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
-msgstr ""
+msgstr "اسم عُقدة غير صالح، إن الأحرف التالية غير مسموحة:"
#: editor/scene_tree_editor.cpp
msgid "Rename Node"
-msgstr ""
+msgstr "إعادة تسمية العُقدة"
#: editor/scene_tree_editor.cpp
msgid "Scene Tree (Nodes):"
-msgstr ""
+msgstr "شجرة المشهد (العُقد):"
#: editor/scene_tree_editor.cpp
msgid "Node Configuration Warning!"
-msgstr ""
+msgstr "تحذير تهيئة العُقدة!"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
-msgstr ""
+msgstr "اختر عُقدة"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Path is empty."
-msgstr "الميش فارغ!"
+msgstr "المسار فارغ!."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Filename is empty."
-msgstr "الميش فارغ!"
+msgstr "اسم الملف فارغ."
#: editor/script_create_dialog.cpp
msgid "Path is not local."
-msgstr ""
+msgstr "المسار ليس محلياً."
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -10921,57 +10960,61 @@ msgid "A directory with the same name exists."
msgstr "ملف أو مجلد مع هذا الأسم موجود بالفعل."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "الملف غير موجود."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "يجب أن يستخدم صيغة صحيحة."
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen."
-msgstr ""
+msgstr "لاحقة مُختارة غير مناسبة."
#: editor/script_create_dialog.cpp
msgid "Error loading template '%s'"
-msgstr ""
+msgstr "خطأ في تحميل القالب '%s'"
#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr ""
+msgstr "خطأ - فشل إنشاء النص البرمجي في نظام الملفات filesystem."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
-msgstr ""
+msgstr "خطأ في تحميل النص البرمجي من %s"
#: editor/script_create_dialog.cpp
msgid "Overrides"
-msgstr ""
+msgstr "يتجاوز"
#: editor/script_create_dialog.cpp
msgid "N/A"
-msgstr ""
+msgstr "غير متوافق N/A"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Open Script / Choose Location"
-msgstr "فتح مُعدل الكود"
+msgstr "فتح النص البرمجي / انتقاء الموقع"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Open Script"
-msgstr "فتح الكود"
+msgstr "فتح النص البرمجي"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "File exists, it will be reused."
-msgstr "الملف موجود، سيعاد إستخدامه"
+msgstr "إن الملف موجود، سيعاد إستخدامه."
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "مسار غير صالح."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid class name."
-msgstr "إسم صنف غير صالح"
+msgstr "إسم صف غير صالح."
#: editor/script_create_dialog.cpp
msgid "Invalid inherited parent name or path."
-msgstr ""
+msgstr "إن اسم أو مسار الأب (الأصل parent) الموروث غير صالح."
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -10980,7 +11023,7 @@ msgstr "شجرة الحركة صحيحة."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
-msgstr ""
+msgstr "المسموح: a-z، A-Z ، 0-9 ، _ و ."
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -11007,6 +11050,8 @@ msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
msgstr ""
+"ملاحظة: النصوص البرمجية المبنية ضمناً تملك مقيدة ولها إمكانيات محددة ولا يمكن "
+"تعديلها باستخدام مُحرر خارجي."
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -11025,7 +11070,7 @@ msgstr "فتح الكود"
#: editor/script_create_dialog.cpp
msgid "Attach Node Script"
-msgstr ""
+msgstr "ألحق نص برمجي للعُقدة"
#: editor/script_editor_debugger.cpp
msgid "Remote "
@@ -11033,7 +11078,7 @@ msgstr "من بعد "
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
-msgstr ""
+msgstr "Bytes:"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -11072,11 +11117,11 @@ msgstr "مورد"
#: editor/script_editor_debugger.cpp
msgid "Stack Trace"
-msgstr ""
+msgstr "تتبع المُكدس Stack Trace"
#: editor/script_editor_debugger.cpp
msgid "Errors"
-msgstr ""
+msgstr "أخطاء"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -11089,7 +11134,7 @@ msgstr "خطأ في نسخ"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
-msgstr ""
+msgstr "ذاكرة الفيديو Video RAM"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -11098,19 +11143,19 @@ msgstr "مسح النقاط"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
-msgstr ""
+msgstr "تفحص النمذجة السابقة"
#: editor/script_editor_debugger.cpp
msgid "Inspect Next Instance"
-msgstr ""
+msgstr "تفحص النمذجة التالية"
#: editor/script_editor_debugger.cpp
msgid "Stack Frames"
-msgstr ""
+msgstr "حزم الإطارات Stack Frames"
#: editor/script_editor_debugger.cpp
msgid "Profiler"
-msgstr ""
+msgstr "مُنشئ الملفات التعريفية Profiler"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
@@ -11118,27 +11163,27 @@ msgstr "ملف تعريف الشبكة Network Profiler"
#: editor/script_editor_debugger.cpp
msgid "Monitor"
-msgstr ""
+msgstr "المراقب Monitor"
#: editor/script_editor_debugger.cpp
msgid "Value"
-msgstr ""
+msgstr "القيمة"
#: editor/script_editor_debugger.cpp
msgid "Monitors"
-msgstr ""
+msgstr "المراقبون Monitors"
#: editor/script_editor_debugger.cpp
msgid "Pick one or more items from the list to display the graph."
-msgstr ""
+msgstr "اختر واحدة أو كثر من العناصر في القائمة لعرض الرسم البياني graph."
#: editor/script_editor_debugger.cpp
msgid "List of Video Memory Usage by Resource:"
-msgstr ""
+msgstr "قائمة باستخدام ذاكرة الفيديو لكل من الموارد:"
#: editor/script_editor_debugger.cpp
msgid "Total:"
-msgstr ""
+msgstr "المجموع الكلي:"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -11147,35 +11192,35 @@ msgstr "تصدير الملف"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
-msgstr ""
+msgstr "مسار المورد"
#: editor/script_editor_debugger.cpp
msgid "Type"
-msgstr ""
+msgstr "النوع"
#: editor/script_editor_debugger.cpp
msgid "Format"
-msgstr ""
+msgstr "البنية (اللاحقة)"
#: editor/script_editor_debugger.cpp
msgid "Usage"
-msgstr ""
+msgstr "الاستخدام"
#: editor/script_editor_debugger.cpp
msgid "Misc"
-msgstr ""
+msgstr "المتنوعات Misc"
#: editor/script_editor_debugger.cpp
msgid "Clicked Control:"
-msgstr ""
+msgstr "التحكم بالنقر Clicked Control:"
#: editor/script_editor_debugger.cpp
msgid "Clicked Control Type:"
-msgstr ""
+msgstr "نوع التحكم بالنقر Clicked Control:"
#: editor/script_editor_debugger.cpp
msgid "Live Edit Root:"
-msgstr ""
+msgstr "جذر التعديل المباشر:"
#: editor/script_editor_debugger.cpp
msgid "Set From Tree"
@@ -11218,10 +11263,11 @@ msgstr "تغيير نصف قطر الإنارة"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
msgstr ""
+"تعديل زاوية انبعاث (إصدار) مُشغل الصوت ثلاثي الأبعاد AudioStreamPlayer3D"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
-msgstr ""
+msgstr "تعديل حقل رؤية الكاميرا Camera FOV"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera Size"
@@ -11229,43 +11275,43 @@ msgstr "غيّر حجم الكاميرا"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
-msgstr ""
+msgstr "تعديل Notifier AABB"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "تعديل جُزيئات AABB"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
-msgstr ""
+msgstr "تعديل نطاقات المسبر Probe Extents"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Sphere Shape Radius"
-msgstr ""
+msgstr "تعديل نصف قطر الشكل الكروي"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Box Shape Extents"
-msgstr ""
+msgstr "تعديل حجم الشكل الصندوقي"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Radius"
-msgstr ""
+msgstr "تعديل نصف قطر الشكل الكبسولي Capsule Shape"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Height"
-msgstr ""
+msgstr "تعديل ارتفاع الشكل الكبسولي Capsule Shape"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Radius"
-msgstr ""
+msgstr "تعديل نصف قطر الشكل الأسطواني"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Height"
-msgstr ""
+msgstr "تعديل ارتفاع الشكل الأسطواني"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Ray Shape Length"
-msgstr ""
+msgstr "تعديل طول الشكل الشعاعي"
#: modules/csg/csg_gizmos.cpp
#, fuzzy
@@ -11284,15 +11330,15 @@ msgstr "تغيير المرتكزات و الهوامش"
#: modules/csg/csg_gizmos.cpp
msgid "Change Torus Outer Radius"
-msgstr ""
+msgstr "تعديل نصف القطر الخارجي للطارة Torus Outer Radius"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Select the dynamic library for this entry"
-msgstr ""
+msgstr "اختر المكتبة المطاوعة (الديناميكية) لأجل هذا الإدخال"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Select dependencies of the library for this entry"
-msgstr ""
+msgstr "اختر تبعيات المكتبة لأجل هذا الإدخال"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Remove current entry"
@@ -11300,31 +11346,31 @@ msgstr "مسح المدخلة الحالية"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Double click to create a new entry"
-msgstr ""
+msgstr "الضغط المزدوج لإنشاء إدخال جديد"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Platform:"
-msgstr ""
+msgstr "المنصة:"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Platform"
-msgstr ""
+msgstr "منصة"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Dynamic Library"
-msgstr ""
+msgstr "مكتبة مطاوعة (ديناميكية)"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Add an architecture entry"
-msgstr ""
+msgstr "إضافة إدخال معماري architecture entry"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "GDNativeLibrary"
-msgstr ""
+msgstr "مكتبة GDNativeLibrary"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Enabled GDNative Singleton"
-msgstr ""
+msgstr "تمكين نمط البرمجة Singleton لِ GDNative"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
#, fuzzy
@@ -11333,15 +11379,15 @@ msgstr "تعطيل دوار التحديث"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Library"
-msgstr ""
+msgstr "مكتبة"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Libraries: "
-msgstr ""
+msgstr "مكتبات: "
#: modules/gdnative/register_types.cpp
msgid "GDNative"
-msgstr ""
+msgstr "GDNative"
#: modules/gdscript/gdscript_functions.cpp
#, fuzzy
@@ -11383,7 +11429,7 @@ msgstr "مجسّد القاموس غير صالح (أصناف فرعية غير
#: modules/gdscript/gdscript_functions.cpp
msgid "Object can't provide a length."
-msgstr ""
+msgstr "لا يمكن للكائن Object أن يمنح طولاً."
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
@@ -11397,23 +11443,23 @@ msgstr "التبويب السابق"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "المستوى:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
-msgstr ""
+msgstr "الطابق التالي"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Previous Floor"
-msgstr ""
+msgstr "الطابق السابق"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Floor:"
-msgstr ""
+msgstr "الطابق:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Delete Selection"
-msgstr ""
+msgstr "خريطة الشبكة GridMap لحذف المُختار"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
@@ -11427,67 +11473,67 @@ msgstr "كُل المُحدد"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Paint"
-msgstr ""
+msgstr "تلوين (طلاء) خريطة الشبكة GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
-msgstr ""
+msgstr "خريطة الشبكة"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Snap View"
-msgstr ""
+msgstr "مظهر المحاذاة"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Disabled"
-msgstr ""
+msgstr "القص Clip مُعطّل"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Above"
-msgstr ""
+msgstr "القص Clip أعلاه"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Below"
-msgstr ""
+msgstr "القص Clip أدناه"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit X Axis"
-msgstr ""
+msgstr "تعديل المحور X"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Y Axis"
-msgstr ""
+msgstr "تعديل المحور Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Z Axis"
-msgstr ""
+msgstr "تعديل المحور Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate X"
-msgstr ""
+msgstr "تدوير المؤشر X"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate Y"
-msgstr ""
+msgstr "تدوير المؤشر Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate Z"
-msgstr ""
+msgstr "تدوير المؤشر Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Back Rotate X"
-msgstr ""
+msgstr "تدوير المؤشر عكساً على X"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Back Rotate Y"
-msgstr ""
+msgstr "تدوير المؤشر عكساً على Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Back Rotate Z"
-msgstr ""
+msgstr "تدوير المؤشر عكساً على Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Clear Rotation"
-msgstr ""
+msgstr "مسح تدوير المؤشر"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
@@ -11504,11 +11550,11 @@ msgstr "تعبئة المُحدد"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Settings"
-msgstr ""
+msgstr "إعدادات خريطة الشبكة"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Pick Distance:"
-msgstr ""
+msgstr "اختر المسافة:"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
@@ -11518,18 +11564,20 @@ msgstr "وضع المُصفي:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
msgstr ""
+"امنح مكتبة السطوح MeshLibrary وصولاً لخريطة الشبكة لتستخدم السطوح المجسمة "
+"الخاصة بها meshes."
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
-msgstr ""
+msgstr "لا يمكن أن يكون اسم الصف كلمة محجوزة"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
-msgstr ""
+msgstr "نهاية تتبع مكدس الاستثناء الداخلي"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Bake NavMesh"
-msgstr ""
+msgstr "اطبخ شبكة ملاحة"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
@@ -11592,26 +11640,29 @@ msgid ""
"A node yielded without working memory, please read the docs on how to yield "
"properly!"
msgstr ""
+"عقدة حُصِلت بدون ذاكرة فعالة,الرجاء قراءة الدليل عن كيفية تحصيلها بطريقة صحيحة!"
#: modules/visual_script/visual_script.cpp
msgid ""
"Node yielded, but did not return a function state in the first working "
"memory."
-msgstr ""
+msgstr "العقدة حُصِلت,ولكنها لم ترجع حالة الوظيفة في اول ذاكرة فعالة."
#: modules/visual_script/visual_script.cpp
msgid ""
"Return value must be assigned to first element of node working memory! Fix "
"your node please."
msgstr ""
+"يجب أن تكون القيمة المُرجهة مقرونة بالعنصر الأول من العُقدة العاملة بالذاكرة! "
+"أصلح العقدة من فضلك."
#: modules/visual_script/visual_script.cpp
msgid "Node returned an invalid sequence output: "
-msgstr ""
+msgstr "أرجعت العُقدة تسلسلاً مُخرجاً غير صالح: "
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
-msgstr ""
+msgstr "عثر على تسلسل بت ولكن ليس العقدة في المكدس ,ارفع تقرير عن الخطأ!"
#: modules/visual_script/visual_script.cpp
msgid "Stack overflow with stack depth: "
@@ -11619,23 +11670,23 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
-msgstr ""
+msgstr "تعديل معاملات الإشارات"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Argument Type"
-msgstr ""
+msgstr "تعديل نوع المعامل"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Argument name"
-msgstr ""
+msgstr "تعديل اسم المعامل"
#: modules/visual_script/visual_script_editor.cpp
msgid "Set Variable Default Value"
-msgstr ""
+msgstr "تحديد القيمة الافتراضية للمتغير"
#: modules/visual_script/visual_script_editor.cpp
msgid "Set Variable Type"
-msgstr ""
+msgstr "تحيد نوع المتغير"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11659,7 +11710,7 @@ msgstr "إنشاء %s جديد"
#: modules/visual_script/visual_script_editor.cpp
msgid "Variables:"
-msgstr ""
+msgstr "المتغيرات:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11677,27 +11728,27 @@ msgstr "أنشئ شكل جديد من لا شئ."
#: modules/visual_script/visual_script_editor.cpp
msgid "Name is not a valid identifier:"
-msgstr ""
+msgstr "هذا الاسم ليس مُعرفاً مميزاً صالحاً:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Name already in use by another func/var/signal:"
-msgstr ""
+msgstr "لقد تم استخدام هذا الاسم في وظيفة برمجية/ مُتغيّر/ إشارة، من قبل:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Function"
-msgstr ""
+msgstr "إعادة تسمية الوظيفة البرمجية"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Variable"
-msgstr ""
+msgstr "إعادة تسمية المُتغيّر"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Signal"
-msgstr ""
+msgstr "إعادة تسمية الإشارة"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Function"
-msgstr ""
+msgstr "إضافة وظيفة برمجية"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11706,11 +11757,11 @@ msgstr "مسح النقطة"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Variable"
-msgstr ""
+msgstr "إضافة مُتغيّر"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Signal"
-msgstr ""
+msgstr "إضافة إشارة"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11724,65 +11775,72 @@ msgstr "مسح النقطة"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
-msgstr ""
+msgstr "تعديل التعبير"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
-msgstr ""
+msgstr "إزالة عُقد البرمجة البصرية VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Duplicate VisualScript Nodes"
-msgstr ""
+msgstr "مُضاعفة عُقد البرمجة البصرية VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
+"اضغط مطولاً %s لإسقاط جالب Getter. اضغط مطولاً على Shift لإسقاط توقيع عام "
+"generic signature."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
+"اضغط مطولاً على Ctrl لإسقاط جالب Getter. اضغط مطولاً على Shift لإسقاط توقيع "
+"عام generic signature."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a simple reference to the node."
-msgstr ""
+msgstr "اضغط مطولاً على %s لإسقاط مرجعية بسيطة للعُقدة."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a simple reference to the node."
-msgstr ""
+msgstr "اضغط مطولاً على Ctrl لإسقاط مرجعية بسيطة للعُقدة."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Variable Setter."
-msgstr ""
+msgstr "اضغط مطولاً على %s لإسقاط مُحدد المُتغير Variable Setter."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a Variable Setter."
-msgstr ""
+msgstr "اضغط مطولاً على Ctrl لإسقاط مُحدد المُتغيّر Variable Setter."
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Preload Node"
-msgstr ""
+msgstr "إضافة عُقدة مسبقة التحميل"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
-msgstr ""
+msgstr "إضافة عُقدة (عُقد) من الشجرة"
#: modules/visual_script/visual_script_editor.cpp
msgid ""
"Can't drop properties because script '%s' is not used in this scene.\n"
"Drop holding 'Shift' to just copy the signature."
msgstr ""
+"لا يمكن إضافة (إسقاط) الخاصيات لأن النص البرمجي '%s' ليس موجوداً في هذا "
+"المشهد.\n"
+"للإضافة (للإسقاط) اضغط مطولاً 'Shift' ببساطة لنسخ التوقيع signature."
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Getter Property"
-msgstr ""
+msgstr "إضافية خاصية جالب Getter Property"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Setter Property"
-msgstr ""
+msgstr "إضافة خاصية مُحدد Setter Property"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Base Type"
-msgstr ""
+msgstr "تعديل النوع الأساس"
#: modules/visual_script/visual_script_editor.cpp
msgid "Move Node(s)"
@@ -11790,11 +11848,11 @@ msgstr "تحريك العقدة(عقدات)"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Node"
-msgstr ""
+msgstr "إزالة عُقدة البرمجة البصرية VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Connect Nodes"
-msgstr ""
+msgstr "وصل العُقد"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11813,11 +11871,11 @@ msgstr "صلها بالعقدة:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
-msgstr ""
+msgstr "يملك النص البرمجي سلفاً الوظيفة البرمجية '%s'"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Input Value"
-msgstr ""
+msgstr "تعديل قيمة الإدخال"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11826,31 +11884,32 @@ msgstr "تعديل العنصر القماشي"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
-msgstr ""
+msgstr "لا يمكن نسخ الوظيفة البرمجية للعُقدة."
#: modules/visual_script/visual_script_editor.cpp
msgid "Clipboard is empty!"
-msgstr ""
+msgstr "الحافظة فارغة!"
#: modules/visual_script/visual_script_editor.cpp
msgid "Paste VisualScript Nodes"
-msgstr ""
+msgstr "لصق عُقد البرمجة البصرية VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function with a function node."
-msgstr ""
+msgstr "لا يمكن إنشاء وظيفة برمجية من دون عُقدة وظيفية."
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function of nodes from nodes of multiple functions."
msgstr ""
+"لا يمكن إنشاء وظيفة برمجية لعُقد من عُقد تابعة للعديد من الوظائف البرمجية."
#: modules/visual_script/visual_script_editor.cpp
msgid "Select at least one node with sequence port."
-msgstr ""
+msgstr "اختر على الأقل واحدة من العقد التي تملك منفذ تسلسل sequence port."
#: modules/visual_script/visual_script_editor.cpp
msgid "Try to only have one sequence input in selection."
-msgstr ""
+msgstr "حاول أن يكون لديك تسلسل إدخال واحد من المُختار."
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11863,19 +11922,19 @@ msgstr "مسح المهمة"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Variable"
-msgstr ""
+msgstr "إزالة المُتغيّر"
#: modules/visual_script/visual_script_editor.cpp
msgid "Editing Variable:"
-msgstr ""
+msgstr "تحرير المُتغيّر:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Signal"
-msgstr ""
+msgstr "إزالة الإشارة"
#: modules/visual_script/visual_script_editor.cpp
msgid "Editing Signal:"
-msgstr ""
+msgstr "تحرير الإشارة:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11908,23 +11967,23 @@ msgstr "الإعدادات:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Select or create a function to edit its graph."
-msgstr ""
+msgstr "اختر أو أنشئ وظيفة برمجية لتحرير الرسم الخاص بها (graph)."
#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
-msgstr ""
+msgstr "حذف المُختار"
#: modules/visual_script/visual_script_editor.cpp
msgid "Find Node Type"
-msgstr ""
+msgstr "إيجاد نوع العُقدة"
#: modules/visual_script/visual_script_editor.cpp
msgid "Copy Nodes"
-msgstr ""
+msgstr "نسخ العُقد"
#: modules/visual_script/visual_script_editor.cpp
msgid "Cut Nodes"
-msgstr ""
+msgstr "قص العُقد"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11943,47 +12002,47 @@ msgstr "الأعضاء"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable: "
-msgstr ""
+msgstr "نوع الإدخال غير متوقع: "
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid"
-msgstr ""
+msgstr "أصبح المُكرر غير صالحاً"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid: "
-msgstr ""
+msgstr "أصبح المُكرر غير صالحاً: "
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name."
-msgstr ""
+msgstr "اسم خاصية المؤشر index property غير صالح."
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Base object is not a Node!"
-msgstr ""
+msgstr "الكائن الأساس ليس بعُقدة!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Path does not lead Node!"
-msgstr ""
+msgstr "لا يؤدي المسار للوصول لعُقدة!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
-msgstr ""
+msgstr "اسم خاصية المؤشر \"الفهرس\" '%s' في العُقدة %s غير صالح."
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
-msgstr ""
+msgstr ": معامل النوع غير صحيح: "
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid arguments: "
-msgstr ""
+msgstr ": معاملات غير صالحة: "
#: modules/visual_script/visual_script_nodes.cpp
msgid "VariableGet not found in script: "
-msgstr ""
+msgstr "لم يتم إيجاد VariableGet في النص البرمجي: "
#: modules/visual_script/visual_script_nodes.cpp
msgid "VariableSet not found in script: "
-msgstr ""
+msgstr "لم يتم إيجاد (مُحدد المُتغير) VariableSet في النص البرمجي: "
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -11994,6 +12053,8 @@ msgid ""
"Invalid return value from _step(), must be integer (seq out), or string "
"(error)."
msgstr ""
+"القيمة المُرجعة من _step() غير صالحة، ينبغي أن تكون رقماً (تسلسل)، أو نصاً "
+"(خطأ)."
#: modules/visual_script/visual_script_property_selector.cpp
#, fuzzy
@@ -12053,6 +12114,13 @@ msgstr ""
"الموضوعة سلفاً."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"مُنقح أخطاء مفتاح المتجر keystore غير مُهيئ في إعدادت المُحرر أو في الإعدادات "
+"الموضوعة سلفاً."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"البُنى المخصوصة تتطلب مساراً لحزمة تطوير Android SDK صالحة في إعدادات المُحرر."
@@ -12079,6 +12147,32 @@ msgstr "اسم رُزمة غير صالح:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12237,6 +12331,8 @@ msgid ""
"Only one visible CanvasModulate is allowed per scene (or set of instanced "
"scenes). The first created one will work, while the rest will be ignored."
msgstr ""
+"يُسمح بواحد فقط من CanvasModulate (مُعدلات اللوحة) في كُل مشهد (أو مجموعة "
+"المشاهد المُنمذجة). سيعمل أول واحد فقط، بينما الباقي سيتم تجاهلهم."
#: scene/2d/collision_object_2d.cpp
msgid ""
@@ -12244,6 +12340,11 @@ msgid ""
"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
"define its shape."
msgstr ""
+"لا تملك هذه العُقدة شكلاً، بالتالي إنها غير قادرة على التصادم أو التفاعل مع "
+"الكائنات الأخرى.\n"
+"ضع في الحسبان إضافة عُقدة بنت كالشكل التصادمي ثنائي الأبعاد CollisionShape2D "
+"أو الشكل التصادمي المُضلع ثنائي الأبعاد CollisionPolygon2D لتحديد الشكل "
+"الخاصة بها."
#: scene/2d/collision_polygon_2d.cpp
msgid ""
@@ -12251,6 +12352,11 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
+"يعمل مُضلع التصادم ثنائي الأبعاد CollisionPolygon2D فقط كشكل تصادمي لكل العُقد "
+"المشتقة من الكائن التصادمي ثنائي الأبعاد CollisionObject2D. من فضلك استخدمه "
+"فقط لكل أبناء الحيز ثنائي الأبعاد Area2D، الجسم السكوني ثنائي الأبعاد "
+"StaticBody2D و الجسم الجامد ثنائي الأبعاد RigidBody2D، والجسم المتحرك ثنائي "
+"الأبعاد KinematicBody2D إلخ.. لكي تمنح كل منهم شكلاً."
#: scene/2d/collision_polygon_2d.cpp
msgid "An empty CollisionPolygon2D has no effect on collision."
@@ -12262,6 +12368,11 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
+"يعمل مُضلع التصادم ثنائي الأبعاد CollisionPolygon2D فقط كشكل تصادمي لكل العُقد "
+"المشتقة من الكائن التصادمي ثنائي الأبعاد CollisionObject2D. من فضلك استخدمه "
+"فقط لكل أبناء الحيز ثنائي الأبعاد Area2D، الجسم السكوني ثنائي الأبعاد "
+"StaticBody2D و الجسم الجامد ثنائي الأبعاد RigidBody2D، والجسم المتحرك ثنائي "
+"الأبعاد KinematicBody2D إلخ.. لكي تمنح كل منهم شكلاً."
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -12276,12 +12387,14 @@ msgid ""
"CPUParticles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
msgstr ""
+"تتطلب الرسوم المتحركة CPUParticles2D استخدام CanvasItemMaterial مع تمكين "
+"\"الرسوم المتحركة للجزيئات\"."
#: scene/2d/light_2d.cpp
msgid ""
"A texture with the shape of the light must be supplied to the \"Texture\" "
"property."
-msgstr ""
+msgstr "يجب توريد نقش بهيئة الضوء لخاصية \"النقش\"."
#: scene/2d/light_occluder_2d.cpp
msgid ""
@@ -12748,6 +12861,21 @@ msgstr "يمكن تعيين المتغيرات فقط في الذروة ."
msgid "Constants cannot be modified."
msgstr "لا يمكن تعديل الثوابت."
+#~ msgid "Not in resource path."
+#~ msgstr "ليس في مسار الموارد."
+
+#~ msgid "Revert"
+#~ msgstr "إرجاع"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "هذا الفعل لا يمكن إرجاعة. إرجاع علي أية حال؟"
+
+#~ msgid "Revert Scene"
+#~ msgstr "إعادة المشهد"
+
+#~ msgid "Clear Script"
+#~ msgstr "إخلاء الكود"
+
#~ msgid "Issue Tracker"
#~ msgstr "متتبع الأخطاء"
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index c9be0c2c3f..f08f2b1362 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -825,7 +825,6 @@ msgstr "Сигналът не може да бъде свързан"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1426,17 +1425,9 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Неправилен път."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Не е в пътя на ресурсите."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2356,11 +2347,14 @@ msgid "Can't reload a scene that was never saved."
msgstr "Сцена, която никога не е била запазвана, не може да бъде презаредена."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Запазване на сцената"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2626,10 +2620,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3237,6 +3227,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3822,6 +3816,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Запазване..."
@@ -6763,12 +6761,12 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Ред"
+msgid "[Ignore]"
+msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
+msgid "Line"
+msgstr "Ред"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7246,6 +7244,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10245,8 +10252,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Премахване на скрипта"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Закачане на скрипт"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10403,6 +10411,13 @@ msgid "Open Documentation"
msgstr "Отваряне на документацията"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10453,11 +10468,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10584,6 +10599,10 @@ msgid "A directory with the same name exists."
msgstr "Вече съществува файл или папка с това име."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Трябва да се използва правилно разширение."
@@ -10630,6 +10649,10 @@ msgid "File exists, it will be reused."
msgstr "Файлът съществува. Искате ли да го презапишете?"
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Неправилен път."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid class name."
msgstr "невалидно име на Група."
@@ -11711,6 +11734,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11735,6 +11762,32 @@ msgstr "невалидно име на Група."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12427,6 +12480,12 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "Не е в пътя на ресурсите."
+
+#~ msgid "Clear Script"
+#~ msgstr "Премахване на скрипта"
+
#~ msgid "Replaced %d occurrence(s)."
#~ msgstr "Заменени съвпадения: %d ."
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index aaa46da54d..3680e4ce6c 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -897,7 +897,6 @@ msgstr "সংযোজক সংকেত/সিগন্যাল:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1546,18 +1545,9 @@ msgstr "সক্রিয় করুন"
msgid "Rearrange Autoloads"
msgstr "Autoload সমূহ পুনর্বিন্যস্ত করুন"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "অকার্যকর পথ।"
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "ফাইলটি বিদ্যমান নয়।"
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "রিসোর্সের পথে নয়।"
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2591,12 +2581,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "পূর্বে কখনোই সংরক্ষিত হয়নি এমন দৃশ্য পুনরায়-লোড (রিলোড) করা অসম্ভব।"
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "প্রত্যাবর্তন করুন"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "দৃশ্য সংরক্ষণ করুন"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "এই কাজটি অসম্পাদিত করা সম্ভব হবে না। তবুও প্রত্যাবর্তন করবেন?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2900,10 +2893,6 @@ msgid "Redo"
msgstr "পুনরায় করুন"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "দৃশ্য প্রত্যাবৃত্ত করুন"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "প্রকল্প অথবা দৃশ্যে-ব্যাপী বিবিধ সরঞ্জাম-সমূহ।"
@@ -3584,6 +3573,13 @@ msgstr "স্ক্রিপ্ট চালানো সম্ভব হয়ন
msgid "Did you forget the '_run' method?"
msgstr "আপনি কি '_run' মেথডটি দিতে ভুলেছেন?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"গেটার (Getter) তৈরি করতে/নামাতে কন্ট্রোল কী (Ctrl) চেপে রাখুন। জেনেরিক সিগনেচার "
+"(generic signature) তৈরি করতে/নামাতে শিফট কী (Shift) চেপে রাখুন।"
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "ইম্পোর্টের জন্য নোড(সমূহ) নির্বাচন করুন"
@@ -4265,6 +4261,10 @@ msgid "Error running post-import script:"
msgstr "ইম্পোর্ট-পরবর্তী স্ক্রিপ্ট চালানোয় সমস্যা হয়েছে:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "সংরক্ষিত হচ্ছে..."
@@ -7429,15 +7429,15 @@ msgid ""
msgstr "'%s' এর সাথে '%s' সংযুক্ত করুন"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "লাইন:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "ফাংশনে যান..."
@@ -7953,6 +7953,15 @@ msgid "XForm Dialog"
msgstr "XForm এর সংলাপ"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "স্ন্যাপ মোড:"
@@ -11164,8 +11173,9 @@ msgid "Instance Child Scene"
msgstr "শীষ্য নোড ইন্সট্যান্স করুন"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "স্ক্রিপ্ট পরিস্কার করুন"
+#, fuzzy
+msgid "Detach Script"
+msgstr "স্ক্রিপ্ট সংযুক্ত করুন"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -11337,6 +11347,13 @@ msgid "Open Documentation"
msgstr "রেফারেন্সের ডকুমেন্টেশনে খুঁজুন।"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "শীষ্য নোড তৈরি করুন"
@@ -11390,11 +11407,13 @@ msgstr ""
"উত্তরাধিকারী দৃশ্য তৈরি করে।"
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "একটি নতুন বা বিদ্যমান স্ক্রিপ্ট নির্বাচিত নোডে সংযুক্ত করুন।"
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "নির্বাচিত নোড হতে একটি স্ক্রিপ্ট পরিস্কার করুন।"
#: editor/scene_tree_dock.cpp
@@ -11542,6 +11561,10 @@ msgid "A directory with the same name exists."
msgstr "একই নামের ডিরেক্টরি বিদ্যমান"
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "ফাইলটি বিদ্যমান নয়।"
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "অগ্রহণযোগ্য এক্সটেনশন"
@@ -11591,6 +11614,11 @@ msgstr "একই নামের ফাইল উপস্থিত, তা ম
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "অকার্যকর পথ।"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "অগ্রহণযোগ্য ক্লাস নাম"
@@ -12743,6 +12771,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12767,6 +12799,32 @@ msgstr "অগ্রহণযোগ্য ক্লাস নাম"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -13489,6 +13547,21 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "রিসোর্সের পথে নয়।"
+
+#~ msgid "Revert"
+#~ msgstr "প্রত্যাবর্তন করুন"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "এই কাজটি অসম্পাদিত করা সম্ভব হবে না। তবুও প্রত্যাবর্তন করবেন?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "দৃশ্য প্রত্যাবৃত্ত করুন"
+
+#~ msgid "Clear Script"
+#~ msgstr "স্ক্রিপ্ট পরিস্কার করুন"
+
#~ msgid "Issue Tracker"
#~ msgstr "ইস্যু ট্র্যাকার"
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index a1577b5a15..1640367701 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -16,8 +16,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-03-11 12:20+0000\n"
-"Last-Translator: Alex Mancha <codingstain@gmail.com>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: roger <616steam@gmail.com>\n"
"Language-Team: Catalan <https://hosted.weblate.org/projects/godot-engine/"
"godot/ca/>\n"
"Language: ca\n"
@@ -25,7 +25,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -567,7 +567,7 @@ msgstr "Escala amb el Cursor"
#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr "Duplica la Selecció"
+msgstr "Duplicar la Selecció"
#: editor/animation_track_editor.cpp
msgid "Duplicate Transposed"
@@ -575,7 +575,7 @@ msgstr "Duplica'l Transposat"
#: editor/animation_track_editor.cpp
msgid "Delete Selection"
-msgstr "Elimina la Selecció"
+msgstr "Suprimir la Selecció"
#: editor/animation_track_editor.cpp
msgid "Go to Next Step"
@@ -656,7 +656,7 @@ msgstr "Seleccioneu les Pistes a Copiar"
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
-msgstr "Copia"
+msgstr "Copiar"
#: editor/animation_track_editor.cpp
msgid "Select All/None"
@@ -688,7 +688,7 @@ msgstr "Modifica el Valor de la Taula"
#: editor/code_editor.cpp
msgid "Go to Line"
-msgstr "Vés a la Línia"
+msgstr "Anar a la Línia"
#: editor/code_editor.cpp
msgid "Line Number:"
@@ -715,8 +715,9 @@ msgid "Whole Words"
msgstr "Paraules senceres"
#: editor/code_editor.cpp editor/rename_dialog.cpp
+#, fuzzy
msgid "Replace"
-msgstr "Reemplaça"
+msgstr "Reemplaçar"
#: editor/code_editor.cpp
msgid "Replace All"
@@ -847,7 +848,6 @@ msgstr "No es pot connectar el senyal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1328,7 +1328,7 @@ msgstr "El Bus Principal no es pot pas eliminar!"
#: editor/editor_audio_buses.cpp
msgid "Delete Audio Bus"
-msgstr "Elimina Bus d'Àudio"
+msgstr "Elimina Bus d'Àudio"
#: editor/editor_audio_buses.cpp
msgid "Duplicate Audio Bus"
@@ -1460,17 +1460,9 @@ msgstr "Activa"
msgid "Rearrange Autoloads"
msgstr "Reorganitza AutoCàrregues"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Camí no vàlid."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "El Fitxer no existeix."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Fora del camí dels recursos."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1499,7 +1491,7 @@ msgstr "Singleton"
#: editor/editor_data.cpp editor/inspector_dock.cpp
msgid "Paste Params"
-msgstr "Enganxa els Paràmetres"
+msgstr "Enganxa els Paràmetres"
#: editor/editor_data.cpp
msgid "Updating Scene"
@@ -1984,6 +1976,7 @@ msgid "Constants"
msgstr "Constants"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Property Descriptions"
msgstr "Descripcions de la Propietat"
@@ -2000,6 +1993,7 @@ msgstr ""
"$color][url=$url] totaportant-ne una[/url][/color]!"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Method Descriptions"
msgstr "Descripcions del Mètode"
@@ -2008,7 +2002,7 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"Aquest mètode no disposa de cap descripció. Podeu contribuir [color=$color]"
+"Aquest mètode no disposa de cap descripció. Podeu contribuir [color=$color]"
"[url=$url] tot aportant-ne una[/url][/color]!"
#: editor/editor_help_search.cpp editor/editor_node.cpp
@@ -2077,7 +2071,6 @@ msgid "Property"
msgstr "Propietat"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Theme Property"
msgstr "Propietats del tema"
@@ -2430,12 +2423,19 @@ msgid "Can't reload a scene that was never saved."
msgstr "No es pot recarregar una escena mai desada."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Reverteix"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Desa Escena"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Aquesta acció no es pot desfer. N'esteu segur?"
+#, fuzzy
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"L'escena actual té canvis sense desar.\n"
+"Voleu torna a carregar l'escena desada de totes maneres? Aquesta acció no es "
+"pot desfer."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2484,14 +2484,13 @@ msgid "Close Scene"
msgstr "Tanca l'Escena"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reopen Closed Scene"
msgstr "Reobrir l'escena tancada"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
-"No es pot habilitar el complement a: '%s' ha fallat l'anàlisi de la "
+"No es pot habilitar el complement a: '%s' ha fallat l'anàlisi de la "
"configuració."
#: editor/editor_node.cpp
@@ -2530,8 +2529,8 @@ msgid ""
"Scene '%s' was automatically imported, so it can't be modified.\n"
"To make changes to it, a new inherited scene can be created."
msgstr ""
-"En ser importada automàticament, l'escena '%s' no es pot modificar. Per fer-"
-"hi canvis, creeu una nova escena heretada."
+"En ser importada automàticament, l'escena '%s' no es pot modificar. \n"
+"Per fer-hi canvis, creeu una nova escena heretada."
#: editor/editor_node.cpp
msgid ""
@@ -2607,7 +2606,6 @@ msgid "Close Tab"
msgstr "Tanca la Pestanya"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Undo Close Tab"
msgstr "Desfer Tancament de Pestanya"
@@ -2730,10 +2728,6 @@ msgid "Redo"
msgstr "Refés"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Reverteix Escena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Eines vàries o d'escena."
@@ -2751,7 +2745,6 @@ msgid "Version Control"
msgstr "Control de Versions"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Set Up Version Control"
msgstr "Configurar Control de Versions"
@@ -2764,9 +2757,8 @@ msgid "Export..."
msgstr "Exportar..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install Android Build Template..."
-msgstr "Instal·lar plantilla de compilació d'Android"
+msgstr "Instal·lar Plantilla de Compilació d'Android..."
#: editor/editor_node.cpp
msgid "Open Project Data Folder"
@@ -2777,9 +2769,8 @@ msgid "Tools"
msgstr "Eines"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Orphan Resource Explorer..."
-msgstr "Navegador de Recursos Orfes"
+msgstr "Navegador de Recursos Orfes..."
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -2921,14 +2912,12 @@ msgid "Open Editor Settings Folder"
msgstr "Obre el directori de Configuració de l'Editor"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Editor Features..."
-msgstr "Administrar Característiques de l'Editor"
+msgstr "Administrar Característiques de l'Editor..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Export Templates..."
-msgstr "Gestor de Plantilles d'Exportació"
+msgstr "Administrar Plantilles d'Exportació..."
#: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp
msgid "Help"
@@ -2958,8 +2947,9 @@ msgid "Report a Bug"
msgstr "ReImportar"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Send Docs Feedback"
-msgstr ""
+msgstr "Enviar suggeriments sobre la documentació"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
@@ -3219,7 +3209,7 @@ msgstr "% del Fotograma"
#: editor/editor_profiler.cpp
msgid "Physics Frame %"
-msgstr "Fotograma de Física %"
+msgstr "Fotograma de Física %"
#: editor/editor_profiler.cpp
msgid "Inclusive"
@@ -3294,7 +3284,7 @@ msgid ""
msgstr ""
"No es pot crear una ViewportTexture en aquest recurs ja que no s'ha definit "
"com local per a l'escena.\n"
-"Activeu la propietat \"local a l'escena\" del recurs i també en tots els "
+"Activeu la propietat \"local a l'escena\" del recurs i també en tots els "
"recurs intermitjos que el continguin fins a un node."
#: editor/editor_properties.cpp editor/property_editor.cpp
@@ -3369,7 +3359,7 @@ msgid ""
"No runnable export preset found for this platform.\n"
"Please add a runnable preset in the export menu."
msgstr ""
-"No s'ha trobat cap patró d'exportació executable per aquesta plataforma. \n"
+"No s'ha trobat cap patró d'exportació executable per aquesta plataforma. \n"
"Afegiu un patró predeterminat en el menú d'exportació."
#: editor/editor_run_script.cpp
@@ -3396,6 +3386,13 @@ msgstr "No s'ha pogut executar l'Script:"
msgid "Did you forget the '_run' method?"
msgstr "Podria mancar el mètode '_run'?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Retén Ctrl per dipositar un mètode Accessor (Getter). Retén Maj per "
+"dipositar una firma genèrica."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Selecciona Node(s) per Importar"
@@ -3538,13 +3535,12 @@ msgid ""
"Templates installation failed.\n"
"The problematic templates archives can be found at '%s'."
msgstr ""
-"No s'han pogut instal·lar les plantilles. Els fitxers problemàtics es troben "
-"a '%s'."
+"No s'han pogut instal·lar les plantilles. \n"
+"Les plantilles problemàtics es troben a '%s'."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error requesting URL:"
-msgstr "Error en la sol·licitud de l'url: "
+msgstr "Error en sol·licitar l'URL:"
#: editor/export_template_manager.cpp
msgid "Connecting to Mirror..."
@@ -3739,9 +3735,8 @@ msgid "Move To..."
msgstr "Mou cap a..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Scene..."
-msgstr "Nova Escena"
+msgstr "Nova Escena..."
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "New Script..."
@@ -3792,7 +3787,9 @@ msgstr "Cerca Fitxers"
msgid ""
"Scanning Files,\n"
"Please Wait..."
-msgstr "Analitzant Fitxers..."
+msgstr ""
+"Analitzant Fitxers,\n"
+"Si Us Plau Espereu..."
#: editor/filesystem_dock.cpp
msgid "Move"
@@ -3931,7 +3928,7 @@ msgstr "Gestiona Grups"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
-msgstr "Importar com a Única Escena"
+msgstr "Importar com a Única Escena"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Animations"
@@ -4003,6 +4000,10 @@ msgid "Error running post-import script:"
msgstr "Error en l'execució de l'Script de post-importació:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Desant..."
@@ -4771,9 +4772,8 @@ msgid "Transition: "
msgstr "Transició: "
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Play Mode:"
-msgstr "Mode d'Escombratge lateral"
+msgstr "Mode de Reproducció:"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -4836,7 +4836,7 @@ msgstr "Mescla 1:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "X-Fade Time (s):"
-msgstr "Durada de la fosa (s):"
+msgstr "Durada de la fosa (s):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Current:"
@@ -4970,12 +4970,12 @@ msgstr "Bucle de redirecció."
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Request failed, timeout"
-msgstr "Ha fallat la sol·licitud, codi de devolució:"
+msgstr "La sol·licitud ha fallat, s'ha esgotat el temps d'espera"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Timeout."
-msgstr "Temps"
+msgstr "Temps esgotat."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
@@ -5348,9 +5348,8 @@ msgid "Full Rect"
msgstr "Rect. Complet"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Keep Ratio"
-msgstr "Relació d'Escala:"
+msgstr "Mantenir Proporcions"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
@@ -5371,7 +5370,7 @@ msgid ""
"Overrides game camera with editor viewport camera."
msgstr ""
"Substitueix la càmera del joc.\n"
-"Substitueix la càmera del joc per la la càmera de l'editor."
+"Substitueix la càmera del joc per la càmera de l'editor."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5499,9 +5498,8 @@ msgid "Pan Mode"
msgstr "Mode d'Escombratge lateral"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Ruler Mode"
-msgstr "Mode d'Execució:"
+msgstr "Mode Regla"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -5700,9 +5698,8 @@ msgid "Auto Insert Key"
msgstr "Inserir Clau Automàticament"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Animation Key and Pose Options"
-msgstr "S'ha insertit una Clau d'Animació."
+msgstr "Opcions de Clau d'Animació i Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key (Existing Tracks)"
@@ -5760,7 +5757,7 @@ msgid ""
"Drag & drop + Shift : Add node as sibling\n"
"Drag & drop + Alt : Change node type"
msgstr ""
-"Arrossegar i deixar anar + Maj: Afegeix un node com a germà\n"
+"Arrossegar i deixar anar + Maj: Afegeix un node com a germà\n"
"Arrossegar i deixar anar + Maj: Canvia el tipus del node"
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -5958,7 +5955,7 @@ msgstr "La malla és buida!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Crea una Col·lisió entre malles de triangles germanes"
+msgstr "Crea una Col·lisió entre malles de triangles germanes."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5974,12 +5971,15 @@ msgid "Create Trimesh Static Shape"
msgstr "Crea un forma amb una malla de triangles"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"No es pot crear una sola forma de col·lisió convexa per a l'arrel de "
+"l'escena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr "No s'ha pogut crear una capa de col·lisió convexa."
+msgstr "No s'ha pogut crear una forma de col·lisió convexa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -6132,12 +6132,14 @@ msgstr "Elimina l'element %d?"
msgid ""
"Update from existing scene?:\n"
"%s"
-msgstr "Actualitza des de l'Escena"
+msgstr ""
+"Actualitzar des d'una 'Escena existent?:\n"
+"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
#, fuzzy
msgid "Mesh Library"
-msgstr "Biblioteca de Models (MeshLibrary)..."
+msgstr "Biblioteca de Models (MeshLibrary)"
#: editor/plugins/mesh_library_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -6381,7 +6383,7 @@ msgstr "Selecciona Punts"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Shift+Drag: Select Control Points"
-msgstr "Maj.+ Arrossegar: Selecciona Punts de Control"
+msgstr "Maj.+ Arrossegar: Selecciona Punts de Control"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -6656,7 +6658,7 @@ msgstr "Configurar Quadrícula:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Offset X:"
-msgstr "Desplaçament X de la quadrícula:"
+msgstr "Desplaçament X de la quadrícula:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Offset Y:"
@@ -7028,12 +7030,13 @@ msgstr ""
"'%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Línia"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(ignorar)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignorar)"
+msgid "Line"
+msgstr "Línia"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7089,9 +7092,8 @@ msgid "Bookmarks"
msgstr "Marcadors"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Breakpoints"
-msgstr "Crea punts."
+msgstr "Punts d’interrupció"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
@@ -7125,7 +7127,7 @@ msgstr "(Des)Plega la línia"
#: editor/plugins/script_text_editor.cpp
msgid "Fold All Lines"
-msgstr "Plega totes les Línies"
+msgstr "Plega totes les Línies"
#: editor/plugins/script_text_editor.cpp
msgid "Unfold All Lines"
@@ -7245,7 +7247,7 @@ msgstr "Esquelet2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
msgid "Make Rest Pose (From Bones)"
-msgstr "Crear Pose de Repòs (A partir dels Ossos)"
+msgstr "Crear Pose de Repòs (A partir dels Ossos)"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
@@ -7311,7 +7313,7 @@ msgstr "Rotació de %s graus."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Keying is disabled (no key inserted)."
-msgstr "l'Edició de Claus està inhabilitada (no s'ha inserit cap Clau)."
+msgstr "l'Edició de Claus està inhabilitada (no s'ha inserit cap Clau)."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Animation Key Inserted."
@@ -7526,6 +7528,15 @@ msgid "XForm Dialog"
msgstr "Diàleg XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Ajustar Nodes al Terra"
@@ -7540,9 +7551,9 @@ msgid ""
"Alt+Drag: Move\n"
"Alt+RMB: Depth list selection"
msgstr ""
-"Arrossegar: Gira\n"
+"Arrossegar: Gira\n"
"Alt+Arrossegar: Mou\n"
-"Alt+Clic Dret: Selecció de llista de profunditat"
+"Alt+Clic Dret: Selecció de llista de profunditat"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -7649,9 +7660,8 @@ msgstr "Mostra la Graella"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Settings..."
-msgstr "Configuració"
+msgstr "Configuració..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Settings"
@@ -7842,9 +7852,8 @@ msgid "Add Frame"
msgstr "Afegeix Fotograma"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Unable to load images"
-msgstr "No s'ha pogut carregar el recurs."
+msgstr "No s'han pogut carregar les imatges"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "ERROR: Couldn't load frame resource!"
@@ -8208,7 +8217,7 @@ msgstr "Habilitar Prioritat"
#: editor/plugins/tile_map_editor_plugin.cpp
#, fuzzy
msgid "Filter tiles"
-msgstr "Filtrat de Fitxers..."
+msgstr "Filtrat de Fitxers"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Give a TileSet resource to this TileMap to use its tiles."
@@ -8254,12 +8263,12 @@ msgstr "Restablir Transformació"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Add Texture(s) to TileSet."
-msgstr "Afegeix Nodes des d'Arbre"
+msgstr "Afegeix Nodes des d'Arbre."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove selected Texture from TileSet."
-msgstr "Elimina l'entrada actual"
+msgstr "Elimineu la textura seleccionada de TileSet."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from Scene"
@@ -8608,9 +8617,8 @@ msgid "TileSet"
msgstr "Conjunt de rajoles"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "No VCS addons are available."
-msgstr "Nom del pare del node, si està disponible"
+msgstr "No hi ha addons VCS disponibles."
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
@@ -8649,9 +8657,8 @@ msgid "Staging area"
msgstr "Zona de posada en escena"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Detect new changes"
-msgstr "Crear un nou rectangle."
+msgstr "Detectar nous canvis"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -8727,9 +8734,8 @@ msgid "Add Output"
msgstr "Afegeix una Entrada"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar"
-msgstr "Escala:"
+msgstr "Escalar"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector"
@@ -8850,7 +8856,7 @@ msgstr "Crear node Shader"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Color function."
-msgstr "Vés a la Funció"
+msgstr "Funció color."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color operator."
@@ -8871,7 +8877,7 @@ msgstr "Converteix el vector RGB en un equivalent de HSV."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Sepia function."
-msgstr "Reanomena Funció"
+msgstr "Funció sèpia."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Burn operator."
@@ -8919,7 +8925,7 @@ msgstr "Constant de color."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Color uniform."
-msgstr "Transforma"
+msgstr "Color uniforme."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9004,9 +9010,8 @@ msgstr ""
"escalar."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Boolean constant."
-msgstr "Modificar una constant vectorial"
+msgstr "Constant booleana."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Boolean uniform."
@@ -9052,14 +9057,12 @@ msgid "'%s' input parameter for vertex and fragment shader mode."
msgstr "paràmetre d'entrada 'alpha' per modes shader vèrtex i el fragment."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar function."
-msgstr "Modifica una Funció Escalar"
+msgstr "Funció escalar."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar operator."
-msgstr "Modifica un operador escalar"
+msgstr "Operador escalar."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "E constant (2.718282). Represents the base of the natural logarithm."
@@ -9100,7 +9103,7 @@ msgstr "Retorna el valor absolut del paràmetre."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the arc-cosine of the parameter."
-msgstr "Retorna el l'arc cosinus del paràmetre."
+msgstr "Retorna el l'arc cosinus del paràmetre."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9302,14 +9305,13 @@ msgid "Subtracts scalar from scalar."
msgstr "Resta escalar d'escalar."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar constant."
-msgstr "Modificar una constant escalar"
+msgstr "Constant escalar."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Scalar uniform."
-msgstr "Modificar un Uniforme Escalar"
+msgstr "Escalar uniforme."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9324,7 +9326,7 @@ msgstr "Realitza la cerca de textures."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Cubic texture uniform lookup."
-msgstr "Modifica un Uniforme Textura"
+msgstr "Modifica un Uniforme Textura."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9405,7 +9407,7 @@ msgstr "Funció vector."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vector operator."
-msgstr "Modifica un operador vectorial"
+msgstr "Operador de vector."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Composes vector from three scalars."
@@ -9556,16 +9558,15 @@ msgid "Vector uniform."
msgstr "Modifica un Uniforme Vectorial"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid ""
"Custom Godot Shader Language expression, with custom amount of input and "
"output ports. This is a direct injection of code into the vertex/fragment/"
"light function, do not use it to write the function declarations inside."
msgstr ""
"Expressió personalitzada del llenguatge de Shader de Godot, amb una "
-"quantitat de ports d'entrada i sortida personalitzats. Això es una una "
-"injecció de codi directa en la funció vertex/fragment/light, no lo utilitzau "
-"per a escriure les declaracions de la funció dins seu."
+"quantitat de ports d'entrada i sortida personalitzats. Això es una injecció "
+"de codi directa en la funció vertex/fragment/light, no lo utilitzau per a "
+"escriure les declaracions de la funció dins seu."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9690,7 +9691,7 @@ msgstr "El camí d'exportació donat no existeix:"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Manquen d'exportació per aquesta plataforma o s'han malmès:"
+msgstr "Manquen d'exportació per aquesta plataforma o s'han malmès:"
#: editor/project_export.cpp
msgid "Presets"
@@ -9735,22 +9736,20 @@ msgid "Resources to export:"
msgstr "Recursos per exportar:"
#: editor/project_export.cpp
-#, fuzzy
msgid ""
"Filters to export non-resource files/folders\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
-"Filtres per a l'exportació fitxers no-recurs (separats per comes, ex: *."
-"json, *. txt)"
+"Filtres per a l'exportació de fitxers/carpetes no-recurs \n"
+"(separats per comes, ex: *.json, *. txt, docs/*)"
#: editor/project_export.cpp
-#, fuzzy
msgid ""
"Filters to exclude files/folders from project\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
-"Filtres per excloure fitxers del projecte (separats per comes, ex:*.json, *."
-"txt)"
+"Filtres per excloure fitxers/carpetes del projecte\n"
+"(separats per comes, ex:*.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid "Patches"
@@ -9763,7 +9762,7 @@ msgstr "Crea un Pedaç"
#: editor/project_export.cpp
#, fuzzy
msgid "Pack File"
-msgstr " Fitxers"
+msgstr "Fitxers"
#: editor/project_export.cpp
msgid "Features"
@@ -9823,9 +9822,8 @@ msgid "Export All"
msgstr "Exportar Tot"
#: editor/project_export.cpp editor/project_manager.cpp
-#, fuzzy
msgid "ZIP File"
-msgstr " Fitxers"
+msgstr "Fitxer ZIP"
#: editor/project_export.cpp
msgid "Godot Game Pack"
@@ -10217,7 +10215,7 @@ msgid ""
"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'"
msgstr ""
-"Nom d'acció no vàlid. No pot estar buit ni contenir '/', ':', '=', '\\' o "
+"Nom d'acció no vàlid. No pot estar buit ni contenir '/', ':', '=', '\\' o "
"'\"'"
#: editor/project_settings_editor.cpp
@@ -10705,7 +10703,7 @@ msgstr "Expressions Regulars"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "At character %s"
-msgstr "Caràcters vàlids:"
+msgstr "Al caràcter %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10773,8 +10771,9 @@ msgid "Instance Child Scene"
msgstr "Instancia una Escena Filla"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Esborra l'Script"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Adjunta-li un Script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10814,14 +10813,12 @@ msgid "Make node as Root"
msgstr "Convertir node en arrel"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete %d nodes?"
-msgstr "Eliminar Nodes"
+msgstr "Suprimir %d nodes?"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete the root node \"%s\"?"
-msgstr "Elimina el(s) Node(s) de Graf d'Ombreig"
+msgstr "Voleu suprimir el node arrel \"% s\"?"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -10829,9 +10826,8 @@ msgid "Delete node \"%s\" and its children?"
msgstr "Voleu suprimir el node \"%s\" i els seus fills?"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete node \"%s\"?"
-msgstr "Eliminar Nodes"
+msgstr "Suprimir el node \"% s\"?"
#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
@@ -10950,6 +10946,13 @@ msgid "Open Documentation"
msgstr "Obrir documentació"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Afegeix un Node Fill"
@@ -11002,11 +11005,13 @@ msgstr ""
"node arrel."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Adjunta un Script nou o existent per al Node Seleccionat."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Reestableix un Script per al node Seleccionat."
#: editor/scene_tree_dock.cpp
@@ -11142,6 +11147,10 @@ msgid "A directory with the same name exists."
msgstr "Ja existeix un directori amb el mateix nom."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "El Fitxer no existeix."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "L'extensió no és vàlida."
@@ -11183,6 +11192,10 @@ msgid "File exists, it will be reused."
msgstr "El fitxer ja existeix, es reutilitzarà."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Camí no vàlid."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nom de classe no vàlid."
@@ -11224,19 +11237,16 @@ msgid ""
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name:"
-msgstr "Nom de Classe"
+msgstr "Nom de la Classe:"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template:"
-msgstr "Plantilla"
+msgstr "Plantilla:"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script:"
-msgstr "Script Integrat"
+msgstr "Script integrat:"
#: editor/script_create_dialog.cpp
msgid "Attach Node Script"
@@ -11275,14 +11285,13 @@ msgid "C++ Source"
msgstr "Font"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Source:"
-msgstr "Font"
+msgstr "Font:"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "C++ Source:"
-msgstr "Font"
+msgstr "Font de C++:"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -11729,7 +11738,7 @@ msgstr "Trieu la distància:"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Filter meshes"
-msgstr "Filtra Mode:"
+msgstr "Filtrar malles"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
@@ -12043,7 +12052,7 @@ msgstr "Connecta els Nodes"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
-msgstr "La funció '%s' ja existeix en l'Script"
+msgstr "La funció '%s' ja existeix en l'Script"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Input Value"
@@ -12112,7 +12121,7 @@ msgstr "Edició del Senyal:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Make Tool:"
-msgstr "Fer Local"
+msgstr "Convertir en Eina:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Members:"
@@ -12121,7 +12130,7 @@ msgstr "Membres:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Base Type:"
-msgstr "Modifica el Tipus de Base"
+msgstr "Canviar Tipus de Base:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -12136,7 +12145,7 @@ msgstr "Afegeix una Funció"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "function_name"
-msgstr "Funció:"
+msgstr "nom_funció"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -12284,13 +12293,17 @@ msgstr "L'executable ADB no està configurat a la configuració de l'editor."
#: platform/android/export/export.cpp
#, fuzzy
msgid "OpenJDK jarsigner not configured in the Editor Settings."
-msgstr "OpenJDK Jarsigner no està configurat en la configuració de l'editor."
+msgstr "OpenJDK Jarsigner no està configurat en la configuració de l'editor."
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
#, fuzzy
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12322,6 +12335,32 @@ msgid "Invalid package name:"
msgstr "El nom del paquet no és vàlid:"
#: platform/android/export/export.cpp
+msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
#, fuzzy
msgid ""
"Trying to build from a custom built template, but no version info for it "
@@ -12426,7 +12465,7 @@ msgstr "Utilitzant la imatge de presentació per defecte."
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid package short name."
-msgstr "El nom del paquet no és vàlid:"
+msgstr "El nom curt del paquet no és vàlid."
#: platform/uwp/export/export.cpp
msgid "Invalid package unique name."
@@ -13057,7 +13096,7 @@ msgid ""
msgstr ""
"ScrollContainer fou pensat per treballar-hi amb un sol Control fill.\n"
"Utilitzeu un contenidor (VBox, HBox, ...) com a fill, o un utilitzeu Control "
-"i personalitzeu-hi la mida mínima manualment."
+"i personalitzeu-hi la mida mínima manualment."
#: scene/gui/tree.cpp
msgid "(Other)"
@@ -13117,6 +13156,21 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Les constants no es poden modificar."
+#~ msgid "Not in resource path."
+#~ msgstr "Fora del camí dels recursos."
+
+#~ msgid "Revert"
+#~ msgstr "Reverteix"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Aquesta acció no es pot desfer. N'esteu segur?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Reverteix Escena"
+
+#~ msgid "Clear Script"
+#~ msgstr "Esborra l'Script"
+
#~ msgid "Issue Tracker"
#~ msgstr "Seguiment d'Incidències"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index 566ff0c1e2..fabec77283 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -18,12 +18,14 @@
# David Kubeš <kubesdavid@email.cz>, 2019.
# Emil Jiří Tywoniak <emil.tywoniak@gmail.com>, 2020.
# Filip Vincůrek <vincurek.f@gmail.com>, 2020.
+# Ondrej Pavelka <ondrej.pavelka@outlook.com>, 2020.
+# Zbyněk <zbynek.fiala@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-03-12 23:33+0000\n"
-"Last-Translator: Vojtěch Šamla <auzkok@seznam.cz>\n"
+"PO-Revision-Date: 2020-06-06 10:15+0000\n"
+"Last-Translator: Zbyněk <zbynek.fiala@gmail.com>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/"
"cs/>\n"
"Language: cs\n"
@@ -31,7 +33,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -746,13 +748,13 @@ msgstr "Přepnout panel skriptů"
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom In"
-msgstr "Přiblížit"
+msgstr "Zvětšit"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Out"
-msgstr "Oddálit"
+msgstr "Změnšit"
#: editor/code_editor.cpp
msgid "Reset Zoom"
@@ -852,7 +854,6 @@ msgstr "Připojit Signál"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1463,17 +1464,9 @@ msgstr "Povolit"
msgid "Rearrange Autoloads"
msgstr "Přeskupit Autoloady"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Neplatná cesta."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Soubor neexistuje."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Není v cestě ke zdroji."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1624,7 +1617,7 @@ msgstr "Editor skriptů"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
-msgstr "Knihovna assetů"
+msgstr "Otevřít knihovnu assetů"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
@@ -1888,9 +1881,8 @@ msgid "(Un)favorite current folder."
msgstr "Přidat/odebrat složku z oblíbených."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Toggle the visibility of hidden files."
-msgstr "Zobrazit skryté soubory"
+msgstr "Změnit viditelnost skrytých souborů."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails."
@@ -1990,7 +1982,7 @@ msgstr "Konstanty"
#: editor/editor_help.cpp
msgid "Property Descriptions"
-msgstr "Popis vlastnosti"
+msgstr "Popisy vlastnosti"
#: editor/editor_help.cpp
msgid "(value)"
@@ -2006,7 +1998,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr "Popis metody"
+msgstr "Popisy metod"
#: editor/editor_help.cpp
msgid ""
@@ -2123,7 +2115,7 @@ msgstr "Vymazat výstup"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: editor/editor_profiler.cpp
msgid "Stop"
-msgstr "Zastavit"
+msgstr "Stop"
#: editor/editor_network_profiler.cpp editor/editor_profiler.cpp
#: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp
@@ -2430,12 +2422,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Nelze načíst scénu, která nebyla nikdy uložena."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Vrátit zpět"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Uložit scénu"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Tuto akci nelze vrátit zpět. Pokračovat?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2483,7 +2478,7 @@ msgstr "Zavřít scénu"
#: editor/editor_node.cpp
msgid "Reopen Closed Scene"
-msgstr "Znovuotevřít uzavřenou scénu"
+msgstr "Znovu otevřít zavřenou scénu"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
@@ -2631,7 +2626,7 @@ msgstr "Pozice doku"
#: editor/editor_node.cpp
msgid "Distraction Free Mode"
-msgstr "Nerozptylující režim"
+msgstr "Nerozptylující režitm"
#: editor/editor_node.cpp
msgid "Toggle distraction-free mode."
@@ -2655,11 +2650,11 @@ msgstr "Kopírovat text"
#: editor/editor_node.cpp
msgid "Next tab"
-msgstr "Další záložka"
+msgstr "Další panel"
#: editor/editor_node.cpp
msgid "Previous tab"
-msgstr "Předchozí záložka"
+msgstr "Předchozí tab"
#: editor/editor_node.cpp
msgid "Filter Files..."
@@ -2716,10 +2711,6 @@ msgid "Redo"
msgstr "Znovu"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Vrátit scénu"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Různé nástroje pro projekt nebo scény."
@@ -2882,7 +2873,7 @@ msgstr "Otevřít složku s daty a nastavením editoru"
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr "Celá obrazovka"
+msgstr "Přepnout celou obrazovku"
#: editor/editor_node.cpp
#, fuzzy
@@ -2955,7 +2946,7 @@ msgstr "Spustit projekt."
#: editor/editor_node.cpp
msgid "Play"
-msgstr "Spustit"
+msgstr "Hrát"
#: editor/editor_node.cpp
msgid "Pause the scene execution for debugging."
@@ -2975,7 +2966,7 @@ msgstr "Spustit upravenou scénu."
#: editor/editor_node.cpp
msgid "Play Scene"
-msgstr "Spustit scénu"
+msgstr "Přehrát scénu"
#: editor/editor_node.cpp
msgid "Play custom scene"
@@ -2983,7 +2974,7 @@ msgstr "Přehrát vlastní scénu"
#: editor/editor_node.cpp
msgid "Play Custom Scene"
-msgstr "Spustit vlastní scénu"
+msgstr "Přehrát upravenou scénu"
#: editor/editor_node.cpp
msgid "Changing the video driver requires restarting the editor."
@@ -3091,15 +3082,15 @@ msgstr "Vybrat"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
-msgstr "Otevřít 2D editor"
+msgstr "Otevřít 2D Editor"
#: editor/editor_node.cpp
msgid "Open 3D Editor"
-msgstr "Otevřít 3D editor"
+msgstr "Otevřít 3D Editor"
#: editor/editor_node.cpp
msgid "Open Script Editor"
-msgstr "Otevřít editor skriptů"
+msgstr "Otevřít Editor Skriptů"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
@@ -3327,8 +3318,9 @@ msgid ""
"No runnable export preset found for this platform.\n"
"Please add a runnable preset in the export menu."
msgstr ""
-"Nenalezen žádný spustitelný preset pro export pro tuto platformu.\n"
-"rosím přidejte spustitelný preset v menu exportu."
+"Nebylo nalezeno žádné spustilené přednastavení pro exportování na tuto "
+"platformu.\n"
+"Přidejte prosím spustitelné přednastavení v exportovacím menu."
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
@@ -3354,6 +3346,13 @@ msgstr "Nelze spustit skript:"
msgid "Did you forget the '_run' method?"
msgstr "Nezapoměl jste metodu '_run'?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Podržte Ctrl k uvolnění getteru. Podržte Shift k uvolnění generického "
+"podpisu."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3948,6 +3947,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Ukládání..."
@@ -5067,7 +5070,6 @@ msgid "Failed creating lightmap images, make sure path is writable."
msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Bake Lightmaps"
msgstr "Zapéct lightmapy"
@@ -5332,7 +5334,7 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Reset"
-msgstr "Resetovat zoom"
+msgstr "Obnovení lupy"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6012,11 +6014,12 @@ msgid "Remove item %d?"
msgstr "Odstranit %d?"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid ""
"Update from existing scene?:\n"
"%s"
-msgstr "Aktualizovat ze scény"
+msgstr ""
+"Aktualizovat z existující scény?:\n"
+"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
#, fuzzy
@@ -6898,12 +6901,13 @@ msgid ""
msgstr "Odpojit '%s' od '%s'"
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Řádek"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(ignorovat)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignorovat)"
+msgid "Line"
+msgstr "Řádek"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7389,6 +7393,15 @@ msgid "XForm Dialog"
msgstr "XForm Dialog"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "Přichytit k mřížce"
@@ -8055,7 +8068,7 @@ msgstr "Najít dlaždici"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Transpose"
-msgstr ""
+msgstr "Transponovat"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Disable Autotile"
@@ -8195,14 +8208,12 @@ msgid "Z Index"
msgstr "Index:"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Region Mode"
-msgstr "Režim otáčení"
+msgstr "Režim oblasti"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Collision Mode"
-msgstr "Interpolační režim"
+msgstr "Kolizní režim"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8210,14 +8221,12 @@ msgid "Occlusion Mode"
msgstr "Editovat polygon"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Mode"
-msgstr "Vytvořit Navigation Mesh"
+msgstr "Navigační režim"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Bitmask Mode"
-msgstr "Režim otáčení"
+msgstr "Režim bitové masky"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8225,9 +8234,8 @@ msgid "Priority Mode"
msgstr "Expertní režim:"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Icon Mode"
-msgstr "Režim přesouvání"
+msgstr "Režim ikony"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Z Index Mode"
@@ -9512,9 +9520,8 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Pack File"
-msgstr " Soubory"
+msgstr "Soubour balíčk"
#: editor/project_export.cpp
msgid "Features"
@@ -10498,8 +10505,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Vymazat skript"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Připojit skript"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10661,6 +10669,13 @@ msgid "Open Documentation"
msgstr "Otevřít dokumentaci"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Přidat podřízený uzel"
@@ -10710,12 +10725,14 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Připojit nový, nebo existující skript k vybranému uzlu."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr ""
+#, fuzzy
+msgid "Detach the script from the selected node."
+msgstr "Připojit nový, nebo existující skript k vybranému uzlu."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10837,6 +10854,10 @@ msgid "A directory with the same name exists."
msgstr "Složka se stejným jménem již existuje."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Soubor neexistuje."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Neplatná přípona."
@@ -10878,6 +10899,10 @@ msgid "File exists, it will be reused."
msgstr "Soubor již existuje, bude znovu použit."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Neplatná cesta."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Neplatné jméno třídy."
@@ -11947,6 +11972,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11971,6 +12000,32 @@ msgstr "Neplatné jméno třídy"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12702,6 +12757,21 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Konstanty není možné upravovat."
+#~ msgid "Not in resource path."
+#~ msgstr "Není v cestě ke zdroji."
+
+#~ msgid "Revert"
+#~ msgstr "Vrátit zpět"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Tuto akci nelze vrátit zpět. Pokračovat?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Vrátit scénu"
+
+#~ msgid "Clear Script"
+#~ msgstr "Vymazat skript"
+
#~ msgid "Issue Tracker"
#~ msgstr "Sledování chyb"
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 5e88313d95..8eeaaafaea 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -881,7 +881,6 @@ msgstr "Forbind Signal: "
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1516,18 +1515,9 @@ msgstr "Aktivér"
msgid "Rearrange Autoloads"
msgstr "Flytte om på Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Ugyldig Sti."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Fil eksisterer ikke."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Ikke i stien for ressource."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2520,12 +2510,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Kan ikke genindlæse en scene, der aldrig blev gemt."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Vend tilbage"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Gem Scene"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Denne handling kan ikke fortrydes. Vend tilbage alligevel?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2816,10 +2809,6 @@ msgid "Redo"
msgstr "Annuller Fortyd"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Gendan scene"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Diverse projekt eller scene redskaber."
@@ -3469,6 +3458,10 @@ msgstr "Kunne ikke køre script:"
msgid "Did you forget the '_run' method?"
msgstr "Glemte du '_run' metoden?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Vælg Noder at Importere"
@@ -4108,6 +4101,10 @@ msgid "Error running post-import script:"
msgstr "Fejl ved kørsel af efter-import script:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Gemmer..."
@@ -7154,15 +7151,15 @@ msgid ""
msgstr "Afbryd '%s' fra '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Linje:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Tilføj Funktion"
@@ -7651,6 +7648,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10733,7 +10739,8 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+#, fuzzy
+msgid "Detach Script"
msgstr "Ryd Script"
#: editor/scene_tree_dock.cpp
@@ -10902,6 +10909,13 @@ msgid "Open Documentation"
msgstr "Åben Seneste"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10952,11 +10966,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -11087,6 +11101,10 @@ msgid "A directory with the same name exists."
msgstr "En fil eller mappe med dette navn findes allerede."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Fil eksisterer ikke."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Du skal bruge en gyldig udvidelse."
@@ -11132,6 +11150,11 @@ msgstr "Filen findes, vil blive genbrugt"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Ugyldig Sti."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Ugyldigt navn."
@@ -12224,6 +12247,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12248,6 +12275,32 @@ msgstr "Ugyldigt navn."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12971,6 +13024,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Konstanter kan ikke ændres."
+#~ msgid "Not in resource path."
+#~ msgstr "Ikke i stien for ressource."
+
+#~ msgid "Revert"
+#~ msgstr "Vend tilbage"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Denne handling kan ikke fortrydes. Vend tilbage alligevel?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Gendan scene"
+
#~ msgid "Issue Tracker"
#~ msgstr "Problem Tracker"
diff --git a/editor/translations/de.po b/editor/translations/de.po
index c3b2d6ee58..b52206e56e 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -49,12 +49,15 @@
# Draco Drache <jan.holger.te@gmail.com>, 2019.
# Jonas <dotchucknorris@gmx.de>, 2019.
# PagDev <pag.develop@gmail.com>, 2020.
+# artism90 <artism90@googlemail.com>, 2020.
+# Jaigskim <filzstift112@gmail.com>, 2020.
+# Jacqueline Ulken <Jacqueline.Ulken@protonmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-04 15:11+0000\n"
-"Last-Translator: Anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: So Wieso <sowieso@dukun.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
"Language: de\n"
@@ -67,12 +70,11 @@ msgstr ""
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr ""
-"Ungültiger Argument-Typ in convert()-Aufruf, TYPE_*-Konstanten benötigt."
+msgstr "Ungültiger Argument-Typ in convert(), TYPE_*-Konstanten benötigt."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "Zeichenkette der Länge 1 erwartet (ein Zeichen)."
+msgstr "Zeichenkette der Länge 1 erwartet (exakt ein Symbol)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -95,7 +97,7 @@ msgstr "Ungültige Operanden für Operator %s, %s und %s."
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
-msgstr "Ungültiger Index des Typs ‚%s‘ für Grundtyp %s"
+msgstr "Ungültiger Index des Typs %s für Grundtyp %s"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
@@ -435,7 +437,7 @@ msgstr "Spuren neu anordnen"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr "Transformationsspuren gelten nur für Nodes die auf Spatial basieren."
+msgstr "Transformationsspuren gelten nur für Nodes, die auf Spatial basieren."
#: editor/animation_track_editor.cpp
msgid ""
@@ -538,11 +540,11 @@ msgstr ""
"Diese Animation gehört zu einer importierten Szene, Änderungen an "
"importierten Spuren werden nicht gespeichert.\n"
"\n"
-"Um neue Spuren hinzufügen zu können muss unter den Importeinstellungen\n"
+"Um neue Spuren hinzufügen zu können muss unter den Importeinstellungen der "
+"Szene\n"
"„Animation > Storage“ zu „Files“ gesetzt und „Animation > Keep Custom "
-"Tracks“ aktiviert werden.\n"
-"Danach ist die Szene erneut zu importieren.\n"
-"Alternativ kann eine Importeinstllung benutzt werden welche Animationen in "
+"Tracks“ aktiviert werden, danach ist die Szene erneut zu importieren.\n"
+"Alternativ kann eine Importeinstellung benutzt werden, welche Animationen in "
"separate Dateien importiert."
#: editor/animation_track_editor.cpp
@@ -552,7 +554,7 @@ msgstr "Achtung: Es wird eine importierte Animation bearbeitet"
#: editor/animation_track_editor.cpp
msgid "Select an AnimationPlayer node to create and edit animations."
msgstr ""
-"Ein AnimationPlayer-Node auswählen um Animationen zu erzeugen oder zu "
+"Ein AnimationPlayer-Node auswählen, um Animationen zu erzeugen oder zu "
"bearbeiten."
#: editor/animation_track_editor.cpp
@@ -887,7 +889,6 @@ msgstr "Signal kann nicht verbunden werden"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1502,17 +1503,9 @@ msgstr "Aktivieren"
msgid "Rearrange Autoloads"
msgstr "Autoloads neu anordnen"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Ungültiger Pfad."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Datei existiert nicht."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Nicht im Ressourcen-Pfad."
+msgid "Can't add autoload:"
+msgstr "Autoload konnte nicht hinzugefügt werden:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1629,8 +1622,9 @@ msgid ""
"Enabled'."
msgstr ""
"Die Zielplattform benötigt ‚ETC‘-Texturkompression für den Treiber-Fallback "
-"auf GLES2. Bitte ‚Import Etc‘ in den Projekteinstellungen aktivieren oder "
-"‚Driver Fallback Enabled‘ ausschalten."
+"auf GLES2. \n"
+"Bitte ‚Import Etc‘ in den Projekteinstellungen aktivieren oder ‚Driver "
+"Fallback Enabled‘ ausschalten."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -2015,7 +2009,7 @@ msgstr "Methoden"
#: editor/editor_help.cpp
msgid "Theme Properties"
-msgstr "Motiv-Eigenschaften"
+msgstr "Theme-Eigenschaften"
#: editor/editor_help.cpp
msgid "Enumerations"
@@ -2092,11 +2086,11 @@ msgstr "Nur Eigenschaften"
#: editor/editor_help_search.cpp
msgid "Theme Properties Only"
-msgstr "Nur Motiv-Eigenschaften"
+msgstr "Nur Theme-Eigenschaften"
#: editor/editor_help_search.cpp
msgid "Member Type"
-msgstr "Mitgliedstyp"
+msgstr "Attribut-Typ"
#: editor/editor_help_search.cpp
msgid "Class"
@@ -2112,7 +2106,7 @@ msgstr "Signal"
#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
-msgstr "Konstant"
+msgstr "Konstante"
#: editor/editor_help_search.cpp
msgid "Property"
@@ -2120,7 +2114,7 @@ msgstr "Eigenschaft"
#: editor/editor_help_search.cpp
msgid "Theme Property"
-msgstr "Motiv-Eigenschaft"
+msgstr "Theme-Eigenschaft"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
@@ -2128,11 +2122,11 @@ msgstr "Eigenschaft:"
#: editor/editor_inspector.cpp
msgid "Set"
-msgstr "Setze"
+msgstr "Festlegen"
#: editor/editor_inspector.cpp
msgid "Set Multiple:"
-msgstr "Mehrfach einstellen:"
+msgstr "Mehrfach festlegen:"
#: editor/editor_log.cpp
msgid "Output:"
@@ -2159,7 +2153,7 @@ msgstr "Ausgabe löschen"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: editor/editor_profiler.cpp
msgid "Stop"
-msgstr "Stop"
+msgstr "Stopp"
#: editor/editor_network_profiler.cpp editor/editor_profiler.cpp
#: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp
@@ -2172,7 +2166,7 @@ msgstr "%s/s"
#: editor/editor_network_profiler.cpp
msgid "Down"
-msgstr "Herunter"
+msgstr "Runter"
#: editor/editor_network_profiler.cpp
msgid "Up"
@@ -2213,7 +2207,7 @@ msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Error saving resource!"
-msgstr "Fehler beim speichern der Ressource!"
+msgstr "Fehler beim Speichern der Ressource!"
#: editor/editor_node.cpp
msgid ""
@@ -2229,7 +2223,7 @@ msgstr "Speichere Ressource als..."
#: editor/editor_node.cpp
msgid "Can't open file for writing:"
-msgstr "Datei kann nicht zum schreiben geöffnet werden:"
+msgstr "Datei kann nicht zum Schreiben geöffnet werden:"
#: editor/editor_node.cpp
msgid "Requested file format unknown:"
@@ -2237,13 +2231,13 @@ msgstr "Angefordertes Dateiformat unbekannt:"
#: editor/editor_node.cpp
msgid "Error while saving."
-msgstr "Fehler beim speichern."
+msgstr "Fehler beim Speichern."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
msgstr ""
"Datei ‚%s‘ kann nicht geöffnet werden. Die Datei könnte verschoben oder "
-"gelöscht sein."
+"gelöscht worden sein."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
@@ -2282,8 +2276,8 @@ msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
-"Diese Szene kann nicht gespeichert werden da sie eine zyklische "
-"Instantiierungshierarchie enthält.\n"
+"Diese Szene kann nicht gespeichert werden, da sie eine zyklische "
+"Instanziierungshierarchie enthält.\n"
"Speichern ist erst nach Beheben des Konflikts möglich."
#: editor/editor_node.cpp
@@ -2300,23 +2294,23 @@ msgstr "Momentan geöffnete Szenen können nicht überschrieben werden!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
-msgstr "MeshLibrary konnte nicht zum vereinen geladen werden!"
+msgstr "MeshLibrary konnte nicht zum Vereinen geladen werden!"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
-msgstr "Fehler beim speichern der MeshLibrary!"
+msgstr "Fehler beim Speichern der MeshLibrary!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
-msgstr "TileSet konnte nicht zum vereinen geladen werden!"
+msgstr "TileSet konnte nicht zum Vereinen geladen werden!"
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
-msgstr "Fehler beim speichern des TileSet!"
+msgstr "Fehler beim Speichern des TileSet!"
#: editor/editor_node.cpp
msgid "Error trying to save layout!"
-msgstr "Fehler beim speichern des Layouts!"
+msgstr "Fehler beim Speichern des Layouts!"
#: editor/editor_node.cpp
msgid "Default editor layout overridden."
@@ -2324,7 +2318,7 @@ msgstr "Standard-Editorlayout überschrieben."
#: editor/editor_node.cpp
msgid "Layout name not found!"
-msgstr "Layout Name nicht gefunden!"
+msgstr "Layout-Name nicht gefunden!"
#: editor/editor_node.cpp
msgid "Restored default layout to base settings."
@@ -2345,7 +2339,7 @@ msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it won't be kept when saving the current scene."
msgstr ""
-"Diese Ressource gehört zu einer instantiierten oder geerbten Szene.\n"
+"Diese Ressource gehört zu einer instanziierten oder geerbten Szene.\n"
"Änderungen an der Ressource werden beim Speichern der aktuellen Szene nicht "
"mitgespeichert."
@@ -2366,7 +2360,7 @@ msgid ""
"understand this workflow."
msgstr ""
"Diese Szene wurde importiert, Änderungen an ihr werden nicht gespeichert.\n"
-"Instantiierung oder Vererbung sind nötig um Änderungen vorzunehmen.\n"
+"Instanziierung oder Vererbung ist nötig, um Änderungen vorzunehmen.\n"
"Die Dokumentation zum Szenenimport beschreibt den nötigen Arbeitsablauf."
#: editor/editor_node.cpp
@@ -2375,18 +2369,19 @@ msgid ""
"Please read the documentation relevant to debugging to better understand "
"this workflow."
msgstr ""
-"Dies ist ein Fern-Objekt, Änderungen an ihm werden nicht gespeichert.\n"
+"Dies ist ein nicht-lokales Objekt, Änderungen an ihm werden nicht "
+"gespeichert.\n"
"Die Dokumentation zum Debugging beschreibt den nötigen Arbeitsablauf."
#: editor/editor_node.cpp
msgid "There is no defined scene to run."
-msgstr "Es ist keine zu startende Szene definiert."
+msgstr "Es ist keine abzuspielende Szene definiert."
#: editor/editor_node.cpp
msgid "Current scene was never saved, please save it prior to running."
msgstr ""
-"Die aktuelle Szene wurde noch nicht gespeichert, bitte speichere sie vor dem "
-"Starten."
+"Die aktuelle Szene wurde noch nicht gespeichert, bitte vor dem Abspielen "
+"sichern."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -2474,13 +2469,17 @@ msgstr ""
"Szene kann nicht neu geladen werden, wenn sie vorher nicht gespeichert wurde."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Zurücksetzen"
+msgid "Reload Saved Scene"
+msgstr "Gespeicherte Szene neu laden"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
-"Diese Aktion kann nicht rückgängig gemacht werden. Trotzdem zurücksetzen?"
+"Die aktuelle Szene enthält ungesicherte Änderungen.\n"
+"Soll die Szene trotzdem neu geladen werden? Diese Aktion kann nicht "
+"rückgängig gemacht werden."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2612,9 +2611,10 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"Die ausgewählte Szene ‚%s‘ existiert nicht.\n"
-"Wähle eine gültige Szene in den Projekteinstellungen unter der Kategorie "
-"„Anwendung“."
+"Die ausgewählte Szene ‚%s‘ existiert nicht, soll eine gültige ausgewählt "
+"werden?\n"
+"Dies kann später in den Projekteinstellungen unter der Kategorie ‚Anwendung‘ "
+"geändert werden."
#: editor/editor_node.cpp
msgid ""
@@ -2622,9 +2622,10 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"Die ausgewählte Szene ‚%s‘ ist keine gültige Datei für eine Szene.\n"
-"Wähle eine gültige Szene in den Projekteinstellungen unter der Kategorie "
-"„Anwendung“."
+"Die ausgewählte Szene ‚%s‘ ist keine gültige Datei für eine Szene, soll eine "
+"andere ausgewählt werden?\n"
+"Dies kann später in den Projekteinstellungen unter der Kategorie ‚Anwendung‘ "
+"geändert werden."
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -2775,10 +2776,6 @@ msgid "Redo"
msgstr "Wiederherstellen"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Szene zurücksetzen"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Sonstiges Projekt oder szenenübergreifende Werkzeuge."
@@ -3428,6 +3425,12 @@ msgstr "Skript konnte nicht ausgeführt werden:"
msgid "Did you forget the '_run' method?"
msgstr "Hast du die '_run' Methode vergessen?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Strg-Taste halten um auf Ganzzahlen zu runden. Umschalt-Taste halten für "
+"präzisere Änderungen."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Selektiere Node(s) für den Import"
@@ -3939,7 +3942,7 @@ msgstr "Nodes filtern"
#: editor/groups_editor.cpp
msgid "Nodes in Group"
-msgstr "Nodes in der Gruppe"
+msgstr "Nodes in Gruppe"
#: editor/groups_editor.cpp
msgid "Empty groups will be automatically removed."
@@ -4027,6 +4030,12 @@ msgid "Error running post-import script:"
msgstr "Fehler beim ausführen des Post-Import Skripts:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+"Wurde ein von Node abstammendes Objekt in der ‚post_import()‘-Methode "
+"zurückgegeben?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Speichere..."
@@ -4581,7 +4590,7 @@ msgstr "Spiele ausgewählte Animation vom Start. (Umschalt+D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation from current pos. (D)"
-msgstr "Ausgewählte Animation von aktueller Position aus abspielen. (D)"
+msgstr "Spiele ausgewählte Animation von aktueller Position. (D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation position (in seconds)."
@@ -4621,7 +4630,7 @@ msgstr "Zwiebelhaut aktivieren"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Onion Skinning Options"
-msgstr "Zwiebelhaut-Einstellugen"
+msgstr "Zwiebelhaut-Einstellungen"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Directions"
@@ -5268,8 +5277,8 @@ msgid ""
"When active, moving Control nodes changes their anchors instead of their "
"margins."
msgstr ""
-"Wenn aktiviert ändert das Verschieben von Control-Nodes ihre Anker anstatt "
-"ihre Ausmaße."
+"Wenn aktiviert, ändert das Verschieben von Control-Nodes deren Bezugspunkte "
+"statt ihre Randabstände."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Top Left"
@@ -5624,7 +5633,7 @@ msgstr "Zeige Ansichtsfenster (Viewport)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Group And Lock Icons"
-msgstr "Gruppe zeigen und Icons sperren"
+msgstr "Gruppen und Symbole anzeigen"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -6769,11 +6778,11 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme"
-msgstr "Motiv importieren"
+msgstr "Theme importieren"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
-msgstr "Fehler beim Speichern des Motivs"
+msgstr "Fehler beim Speichern des Themes"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving"
@@ -6781,7 +6790,7 @@ msgstr "Fehler beim Speichern"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme As..."
-msgstr "Motiv speichern als..."
+msgstr "Theme speichern als..."
#: editor/plugins/script_editor_plugin.cpp
msgid "%s Class Reference"
@@ -6868,7 +6877,7 @@ msgstr "Vorwärts im Verlauf"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
-msgstr "Motiv"
+msgstr "Theme"
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme..."
@@ -6876,11 +6885,11 @@ msgstr "Thema importieren..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload Theme"
-msgstr "Motiv neu laden"
+msgstr "Theme neu laden"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme"
-msgstr "Motiv speichern"
+msgstr "Theme speichern"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close All"
@@ -6988,12 +6997,12 @@ msgstr ""
"Fehlende verbundene Methode ‚%s‘ für Signal ‚%s‘ von Node ‚%s‘ zu Node ‚%s‘."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Zeile"
+msgid "[Ignore]"
+msgstr "[Ignorieren]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignorieren)"
+msgid "Line"
+msgstr "Zeile"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7471,6 +7480,21 @@ msgid "XForm Dialog"
msgstr "Transformationsdialog"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Klicken um zwischen Sichtbarkeitsmodi umzuschalten.\n"
+"\n"
+"Offenes Auge: Griffe sind sichtbar.\n"
+"Geschlossenes Auge: Griffe sind unsichtbar.\n"
+"Halb offenes Auge: Griffe sind auch durch deckende Oberflächen sichtbar "
+"(\"Röntgenblick\")."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Nodes am Boden einrasten"
@@ -7961,7 +7985,7 @@ msgstr "Aus derzeitigem Editor-Thema erstellen"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Toggle Button"
-msgstr "Knopf umschalten"
+msgstr "Umschaltknopf"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Disabled Button"
@@ -8066,7 +8090,7 @@ msgstr "Farbe"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme File"
-msgstr "Motiv-Datei"
+msgstr "Theme-Datei"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
@@ -8196,7 +8220,7 @@ msgstr "Nächste Koordinate"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Select the next shape, subtile, or Tile."
-msgstr "Die nächste Form oder Kachel auswählen."
+msgstr "Die nächste Form oder (Unter-)Kachel auswählen."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Previous Coordinate"
@@ -8204,7 +8228,7 @@ msgstr "Vorherige Koordinate"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Select the previous shape, subtile, or Tile."
-msgstr "Die vorherige Form oder Kachel auswählen."
+msgstr "Die vorherige Form oder (Unter-)Kachel auswählen."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Region"
@@ -8244,7 +8268,7 @@ msgstr "Kollisionsmodus"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Occlusion Mode"
-msgstr "Verschlussmodus"
+msgstr "Verdeckungsmodus"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Navigation Mode"
@@ -9317,7 +9341,7 @@ msgid ""
msgstr ""
"Stufenfunktion ( Vektor(Kante), Vektor(x) ).\n"
"\n"
-"Gibt 0.0 zurück falls ‚x‘ kleiner als ‚Kante‘, ansonsten 1.0."
+"Gibt 0.0 zurück falls ‚x‘ kleiner als ‚Kante‘, ansonsten 1.0."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -10575,8 +10599,8 @@ msgid "Instance Child Scene"
msgstr "Szene hier instantiieren"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Skript leeren"
+msgid "Detach Script"
+msgstr "Skript loslösen"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10742,6 +10766,15 @@ msgid "Open Documentation"
msgstr "Dokumentation öffnen"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"Skript konnte nicht angehängt werden: Keine Sprachen registriert.\n"
+"Vermutliche Ursache ist dass der Editor ohne Sprachmodulen gebaut wurde."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Node hier anhängen"
@@ -10790,12 +10823,12 @@ msgstr ""
"kein Root-Node existiert."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr "Ein neues oder existierendes Skript zum ausgewählten Node hinzufügen."
+msgid "Attach a new or existing script to the selected node."
+msgstr "Ein neues oder existierendes Skript dem ausgewählten Node anhängen."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Entferne Skript von ausgewähltem Node."
+msgid "Detach the script from the selected node."
+msgstr "Skript vom ausgewählten Node loslösen."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10850,12 +10883,12 @@ msgid ""
"Node is in %s group(s).\n"
"Click to show groups dock."
msgstr ""
-"Node ist %s Gruppe(n).\n"
+"Node gehört zu %s Gruppe(n).\n"
"Hier klicken zur Gruppenverwaltung."
#: editor/scene_tree_editor.cpp
msgid "Open Script:"
-msgstr "Offenes Skript:"
+msgstr "Skript öffnen:"
#: editor/scene_tree_editor.cpp
msgid ""
@@ -10927,6 +10960,10 @@ msgid "A directory with the same name exists."
msgstr "Ein Verzeichnis mit gleichem Namen existiert bereits."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Datei existiert nicht."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Ungültige Dateiendung."
@@ -10967,6 +11004,10 @@ msgid "File exists, it will be reused."
msgstr "Datei existiert bereits, wird erneut verwendet."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Ungültiger Pfad."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Ungültiger Klassenname."
@@ -11986,7 +12027,7 @@ msgstr "Paketsegmente dürfen keine Länge gleich Null haben."
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
-msgstr "Das Zeichen ‚%s‘ ist in Android-Anwendungs-Paketnamen nicht gestattet."
+msgstr "Das Zeichen ‚%s‘ ist in Android-Anwendungspaketnamen nicht gestattet."
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
@@ -12020,6 +12061,11 @@ msgstr ""
"konfiguriert."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Release-Keystore wurde nicht korrekt konfiguriert in den Exporteinstellungen."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Eigene Builds erfordern gültigen Android-SDK-Pfad in den Editoreinstellungen."
@@ -12047,6 +12093,41 @@ msgstr "Ungültiger Paketname:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"Ungültiges „GodotPaymentV3“-Modul eingebunden in den „android/modules“-"
+"Projekteinstellungen (wurde in Godot 3.2.2 geändert).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+"„Use Custom Build“ muss aktiviert werden um die Plugins nutzen zu können."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"„Degrees Of Freedom“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile VR“ "
+"gesetzt wurde."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"„Hand Tracking“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile VR“ "
+"gesetzt wurde."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"„Focus Awareness“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile VR“ "
+"gesetzt wurde."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12229,7 +12310,7 @@ msgid ""
msgstr ""
"CollisionPolygon2D liefert nur eine Kollisionsform für ein von "
"CollisionObject2D abgeleitetes Node. Es kann nur als Unterobjekt von Area2D, "
-"StaticBody2D, RigidBody2D, KinematicBody2D usw. eingehängt werden um diesen "
+"StaticBody2D, RigidBody2D, KinematicBody2D usw. eingehängt werden, um diesen "
"eine Form zu geben."
#: scene/2d/collision_polygon_2d.cpp
@@ -12244,7 +12325,7 @@ msgid ""
msgstr ""
"CollisionShape2D liefert nur eine Kollisionsform für ein von "
"CollisionObject2D abgeleitetes Node. Es kann nur als Unterobjekt von Area2D, "
-"StaticBody2D, RigidBody2D, KinematicBody2D usw. eingehängt werden um diesen "
+"StaticBody2D, RigidBody2D, KinematicBody2D usw. eingehängt werden, um diesen "
"eine Form zu geben."
#: scene/2d/collision_shape_2d.cpp
@@ -12298,9 +12379,9 @@ msgid ""
"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
"node. It only provides navigation data."
msgstr ""
-"Eine NavigationPolygon-Instanz muss ein Unterobjekt erster oder zweiter "
-"Ordnung unterhalb eines Navigation2D-Node sein. Sie liefert nur "
-"Navigationsdaten."
+"NavigationPolygonInstance muss ein Unterobjekt erster oder zweiter Ordnung "
+"unterhalb eines Navigation2D-Node sein. Es liefert nur "
+"Navigationsinformationen."
#: scene/2d/parallax_layer.cpp
msgid ""
@@ -12381,10 +12462,10 @@ msgid ""
"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
"KinematicBody2D, etc. to give them a shape."
msgstr ""
-"Ein TileMap mit aktivierter „Use Parent“-Option benötigt ein "
-"CollisionObject2D-Elternnode dem es Form verleiht. Das TileMap sollte als "
-"als Unterobjekt von Area2D, StaticBody2D, RigidBody2D, KinematicBody2D, usw. "
-"verwendet werden um ihnen eine Form zu geben."
+"Eine TileMap mit aktivierter „Use Parent“-Option benötigt ein Eltern-Node "
+"des Typs CollisionObject2D, welcher der TileMap eine Form verleiht. Sie "
+"sollte als Unterobjekt von Area2D, StaticBody2D, RigidBody2D, "
+"KinematicBody2D, usw. verwendet werden, um ihnen eine Form zu geben."
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
@@ -12469,7 +12550,8 @@ msgid ""
msgstr ""
"CollisionPolygon liefert nur eine Kollisionsform für ein von CollisionObject "
"abgeleitetes Node. Es kann nur als Unterobjekt von Area, StaticBody, "
-"RigidBody, KinematicBody usw. eingehängt werden um diesen eine Form zu geben."
+"RigidBody, KinematicBody usw. eingehängt werden, um diesen eine Form zu "
+"verleihen."
#: scene/3d/collision_polygon.cpp
msgid "An empty CollisionPolygon has no effect on collision."
@@ -12483,7 +12565,8 @@ msgid ""
msgstr ""
"CollisionShape liefert nur eine Kollisionsform für ein von CollisionObject "
"abgeleitetes Node. Es kann nur als Unterobjekt von Area, StaticBody, "
-"RigidBody, KinematicBody usw. eingehängt werden um diesen eine Form zu geben."
+"RigidBody, KinematicBody usw. eingehängt werden, um diesen eine Form zu "
+"geben."
#: scene/3d/collision_shape.cpp
msgid ""
@@ -12547,8 +12630,8 @@ msgid ""
"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
"It only provides navigation data."
msgstr ""
-"Eine NavigationMesh-Instanz muss ein Unterobjekt erster oder höherer Ordnung "
-"eines Navigation-Nodes sein. Es liefert nur Navigationsdaten."
+"NavigationMeshInstance muss ein Unterobjekt erster oder zweiter Ordnung "
+"eines Navigation-Nodes sein. Es liefert nur Navigationsinformationen."
#: scene/3d/particles.cpp
msgid ""
@@ -12852,6 +12935,22 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden."
msgid "Constants cannot be modified."
msgstr "Konstanten können nicht verändert werden."
+#~ msgid "Not in resource path."
+#~ msgstr "Nicht im Ressourcen-Pfad."
+
+#~ msgid "Revert"
+#~ msgstr "Zurücksetzen"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr ""
+#~ "Diese Aktion kann nicht rückgängig gemacht werden. Trotzdem zurücksetzen?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Szene zurücksetzen"
+
+#~ msgid "Clear Script"
+#~ msgstr "Skript leeren"
+
#~ msgid "Issue Tracker"
#~ msgstr "Problem-Melder"
diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po
deleted file mode 100644
index c86daa54dc..0000000000
--- a/editor/translations/de_CH.po
+++ /dev/null
@@ -1,12956 +0,0 @@
-# Swiss High German translation of the Godot Engine editor
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
-# This file is distributed under the same license as the Godot source code.
-# Christian Fisch <christian.fiesel@gmail.com>, 2016.
-# Nils <nfa106008@iet-gibb.ch>, 2020.
-# PagDev <pag.develop@gmail.com>, 2020.
-msgid ""
-msgstr ""
-"Project-Id-Version: Godot Engine editor\n"
-"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-03-08 22:33+0000\n"
-"Last-Translator: PagDev <pag.develop@gmail.com>\n"
-"Language-Team: German (Switzerland) <https://hosted.weblate.org/projects/"
-"godot-engine/godot/de_CH/>\n"
-"Language: de_CH\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0-dev\n"
-
-#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
-#: modules/visual_script/visual_script_builtin_funcs.cpp
-msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr ""
-"Ungültiger Argument-Typ in convert()-Aufruf, TYPE_*-Konstanten benötigt."
-
-#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
-msgid "Expected a string of length 1 (a character)."
-msgstr "Es wurde eine Zeichenfolge der Länge 1 (a character) erwartet."
-
-#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
-#: modules/mono/glue/gd_glue.cpp
-#: modules/visual_script/visual_script_builtin_funcs.cpp
-msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "Nicht genügend Bytes zum Decodieren von Bytes oder ungültiges Format."
-
-#: core/math/expression.cpp
-msgid "Invalid input %i (not passed) in expression"
-msgstr ""
-
-#: core/math/expression.cpp
-msgid "self can't be used because instance is null (not passed)"
-msgstr "self cha nid brucht wärde wöu d Instanz null isch (nid düre cho)"
-
-#: core/math/expression.cpp
-msgid "Invalid operands to operator %s, %s and %s."
-msgstr "Invalidi Operande füre Operator %s, %s und %s."
-
-#: core/math/expression.cpp
-msgid "Invalid index of type %s for base type %s"
-msgstr "Invalide index vom Typ %s füre Basis Typ %s"
-
-#: core/math/expression.cpp
-msgid "Invalid named index '%s' for base type %s"
-msgstr "Invalid benamslete index '%s' füre Basis Typ %s"
-
-#: core/math/expression.cpp
-msgid "Invalid arguments to construct '%s'"
-msgstr "Invalidi argumänt für s '%s' z konstruiere"
-
-#: core/math/expression.cpp
-msgid "On call to '%s':"
-msgstr "Ufem ufruef für '%s':"
-
-#: core/ustring.cpp
-msgid "B"
-msgstr "B"
-
-#: core/ustring.cpp
-msgid "KiB"
-msgstr "KiB"
-
-#: core/ustring.cpp
-msgid "MiB"
-msgstr "MiB"
-
-#: core/ustring.cpp
-msgid "GiB"
-msgstr "GiB"
-
-#: core/ustring.cpp
-msgid "TiB"
-msgstr "TiB"
-
-#: core/ustring.cpp
-msgid "PiB"
-msgstr "PiB"
-
-#: core/ustring.cpp
-msgid "EiB"
-msgstr "EiB"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Free"
-msgstr "Gratis"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Balanced"
-msgstr "Usgliche"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Mirror"
-msgstr "Spiegu"
-
-#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
-msgid "Time:"
-msgstr "Zit:"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Value:"
-msgstr "Wärt:"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Insert Key Here"
-msgstr "Schlüssu hie ifüege"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Duplicate Selected Key(s)"
-msgstr "Usgwäuti Schlüssle dupliziere"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Delete Selected Key(s)"
-msgstr "Usgwäuti Schlüssle lösche"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Add Bezier Point"
-msgstr "Dr Bezier Punkt hinzuefüege"
-
-#: editor/animation_bezier_editor.cpp
-msgid "Move Bezier Points"
-msgstr "Dr Bezier Punkt bewege"
-
-#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
-msgid "Anim Duplicate Keys"
-msgstr "Anim Schlüssle Dupliziere"
-
-#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
-msgid "Anim Delete Keys"
-msgstr "Anim Schlüssle lösche"
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Change Keyframe Time"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Change Transition"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Change Transform"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Change Keyframe Value"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Change Call"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Multi Change Keyframe Time"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Multi Change Transition"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Multi Change Transform"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Multi Change Keyframe Value"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Multi Change Call"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Change Animation Length"
-msgstr "Typ ändern"
-
-#: editor/animation_track_editor.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Property Track"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "3D Transform Track"
-msgstr "Transformationstyp"
-
-#: editor/animation_track_editor.cpp
-msgid "Call Method Track"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Bezier Curve Track"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Audio Playback Track"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Animation Playback Track"
-msgstr "Stoppe Animations-Wiedergabe. (S)"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Animation length (frames)"
-msgstr "Animations-Node"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Animation length (seconds)"
-msgstr "Animations-Node"
-
-#: editor/animation_track_editor.cpp
-msgid "Add Track"
-msgstr "Spur hinzuefüege"
-
-#: editor/animation_track_editor.cpp
-msgid "Animation Looping"
-msgstr "Animationswiderholig"
-
-#: editor/animation_track_editor.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Functions:"
-msgstr "Funktione:"
-
-#: editor/animation_track_editor.cpp
-msgid "Audio Clips:"
-msgstr "Audioclips:"
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Clips:"
-msgstr "Animationsclips:"
-
-#: editor/animation_track_editor.cpp
-msgid "Change Track Path"
-msgstr "D Spur wächsle"
-
-#: editor/animation_track_editor.cpp
-msgid "Toggle this track on/off."
-msgstr "Die Spur ah-/abschaute"
-
-#: editor/animation_track_editor.cpp
-msgid "Update Mode (How this property is set)"
-msgstr "Update Modus (Wie die Eigeschaft gsetzt isch)"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Interpolation Mode"
-msgstr "Animations-Node"
-
-#: editor/animation_track_editor.cpp
-msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Remove this track."
-msgstr "Ungültige Bilder löschen"
-
-#: editor/animation_track_editor.cpp
-msgid "Time (s): "
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Toggle Track Enabled"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Continuous"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Discrete"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Trigger"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Capture"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Nearest"
-msgstr ""
-
-#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
-#: editor/property_editor.cpp
-msgid "Linear"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Cubic"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Clamp Loop Interp"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Wrap Loop Interp"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Insert Key"
-msgstr "Bild einfügen"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Duplicate Key(s)"
-msgstr "Node(s) duplizieren"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Delete Key(s)"
-msgstr "Node(s) löschen"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Change Animation Update Mode"
-msgstr "Typ ändern"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Change Animation Interpolation Mode"
-msgstr "Animations-Node"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Change Animation Loop Mode"
-msgstr "Animations-Node"
-
-#: editor/animation_track_editor.cpp
-msgid "Remove Anim Track"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Create NEW track for %s and insert key?"
-msgstr "Willst du eine neue Ebene inklusiv Bild in %s einfügen?"
-
-#: editor/animation_track_editor.cpp
-msgid "Create %d NEW tracks and insert keys?"
-msgstr "Erstelle %d in neuer Ebene inklusiv Bild?"
-
-#: editor/animation_track_editor.cpp editor/create_dialog.cpp
-#: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp
-#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#: editor/plugins/particles_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#: editor/script_create_dialog.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Create"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Insert"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "AnimationPlayer can't animate itself, only other players."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Create & Insert"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Insert Track & Key"
-msgstr "Anim Ebene und Bild einfügen"
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Insert Key"
-msgstr "Anim Bild einfügen"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Change Animation Step"
-msgstr "Bild einfügen"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Rearrange Tracks"
-msgstr "Node erstellen"
-
-#: editor/animation_track_editor.cpp
-msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid ""
-"Audio tracks can only point to nodes of type:\n"
-"-AudioStreamPlayer\n"
-"-AudioStreamPlayer2D\n"
-"-AudioStreamPlayer3D"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "An animation player can't animate itself, only other players."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Not possible to add a new track without a root"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Invalid track for Bezier (no suitable sub-properties)"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Add Bezier Track"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Track path is invalid, so can't add a key."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Add Transform Track Key"
-msgstr "Transformationstyp"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Add Track Key"
-msgstr "Anim Ebene und Bild einfügen"
-
-#: editor/animation_track_editor.cpp
-msgid "Track path is invalid, so can't add a method key."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Add Method Track Key"
-msgstr "Anim Ebene und Bild einfügen"
-
-#: editor/animation_track_editor.cpp
-msgid "Method not found in object: "
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Move Keys"
-msgstr "Anim Bilder bewegen"
-
-#: editor/animation_track_editor.cpp
-msgid "Clipboard is empty"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Node erstellen"
-
-#: editor/animation_track_editor.cpp
-msgid "Anim Scale Keys"
-msgstr "Anim verlängern"
-
-#: editor/animation_track_editor.cpp
-msgid ""
-"This option does not work for Bezier editing, as it's only a single track."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid ""
-"This animation belongs to an imported scene, so changes to imported tracks "
-"will not be saved.\n"
-"\n"
-"To enable the ability to add custom tracks, navigate to the scene's import "
-"settings and set\n"
-"\"Animation > Storage\" to \"Files\", enable \"Animation > Keep Custom Tracks"
-"\", then re-import.\n"
-"Alternatively, use an import preset that imports animations to separate "
-"files."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Warning: Editing imported animation"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Select an AnimationPlayer node to create and edit animations."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Only show tracks from nodes selected in tree."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Group tracks by node or display them as plain list."
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Snap:"
-msgstr "Selektiere Node(s) zum Importieren aus"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Animation step value."
-msgstr "Animations-Node"
-
-#: editor/animation_track_editor.cpp
-msgid "Seconds"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/animation_track_editor.cpp editor/editor_properties.cpp
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
-#: editor/plugins/tile_set_editor_plugin.cpp editor/project_manager.cpp
-#: editor/project_settings_editor.cpp editor/property_editor.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Edit"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Animation properties."
-msgstr "Animations-Node"
-
-#: editor/animation_track_editor.cpp
-msgid "Copy Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Scale Selection"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Scale From Cursor"
-msgstr ""
-
-#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Duplicate Selection"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Duplicate Transposed"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Delete Selection"
-msgstr "Script hinzufügen"
-
-#: editor/animation_track_editor.cpp
-msgid "Go to Next Step"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Go to Previous Step"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Optimize Animation"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Clean-Up Animation"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Pick the node that will be animated:"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Use Bezier Curves"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Anim. Optimizer"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Max. Linear Error:"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Max. Angular Error:"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Max Optimizable Angle:"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Optimize"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Remove invalid keys"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/animation_track_editor.cpp
-msgid "Remove unresolved and empty tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Clean-up all animations"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Clean-Up Animation(s) (NO UNDO!)"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Clean-Up"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Scale Ratio:"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-msgid "Select Tracks to Copy"
-msgstr ""
-
-#: editor/animation_track_editor.cpp editor/editor_log.cpp
-#: editor/editor_properties.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
-#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-msgid "Copy"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Select All/None"
-msgstr "Node(s) löschen"
-
-#: editor/animation_track_editor_plugins.cpp
-msgid "Add Audio Track Clip"
-msgstr ""
-
-#: editor/animation_track_editor_plugins.cpp
-msgid "Change Audio Track Clip Start Offset"
-msgstr ""
-
-#: editor/animation_track_editor_plugins.cpp
-msgid "Change Audio Track Clip End Offset"
-msgstr ""
-
-#: editor/array_property_edit.cpp
-msgid "Resize Array"
-msgstr ""
-
-#: editor/array_property_edit.cpp
-msgid "Change Array Value Type"
-msgstr ""
-
-#: editor/array_property_edit.cpp
-msgid "Change Array Value"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Go to Line"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line Number:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "%d replaced."
-msgstr ""
-
-#: editor/code_editor.cpp editor/editor_help.cpp
-msgid "%d match."
-msgstr ""
-
-#: editor/code_editor.cpp editor/editor_help.cpp
-msgid "%d matches."
-msgstr ""
-
-#: editor/code_editor.cpp editor/find_in_files.cpp
-msgid "Match Case"
-msgstr ""
-
-#: editor/code_editor.cpp editor/find_in_files.cpp
-msgid "Whole Words"
-msgstr ""
-
-#: editor/code_editor.cpp editor/rename_dialog.cpp
-msgid "Replace"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Replace All"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Selection Only"
-msgstr ""
-
-#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
-#: editor/plugins/text_editor.cpp
-msgid "Standard"
-msgstr ""
-
-#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
-msgid "Toggle Scripts Panel"
-msgstr ""
-
-#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/texture_region_editor_plugin.cpp
-#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
-msgid "Zoom In"
-msgstr ""
-
-#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/texture_region_editor_plugin.cpp
-#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
-msgid "Zoom Out"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Reset Zoom"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Warnings"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line and column numbers."
-msgstr ""
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Method in target node must be specified."
-msgstr "Die Methode muss im Ziel Node definiert werden!"
-
-#: editor/connections_dialog.cpp
-msgid ""
-"Target method not found. Specify a valid method or attach a script to the "
-"target node."
-msgstr ""
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Connect to Node:"
-msgstr "Verbindung zu Node:"
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Connect to Script:"
-msgstr "Verbindung zu Node:"
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "From Signal:"
-msgstr "Connections editieren"
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Scene does not contain any script."
-msgstr "Node enthält keine Geometrie (Flächen)."
-
-#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
-#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
-msgid "Add"
-msgstr ""
-
-#: editor/connections_dialog.cpp editor/dependency_editor.cpp
-#: editor/editor_feature_profile.cpp editor/groups_editor.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/plugins/theme_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp
-#: editor/project_settings_editor.cpp
-msgid "Remove"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Add Extra Call Argument:"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Extra Call Arguments:"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Receiver Method:"
-msgstr "Node erstellen"
-
-#: editor/connections_dialog.cpp
-msgid "Advanced"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Deferred"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid ""
-"Defers the signal, storing it in a queue and only firing it at idle time."
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Oneshot"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Disconnects the signal after its first emission."
-msgstr ""
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Cannot connect signal"
-msgstr "Connections editieren"
-
-#: editor/connections_dialog.cpp editor/dependency_editor.cpp
-#: editor/export_template_manager.cpp editor/groups_editor.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#: editor/plugins/version_control_editor_plugin.cpp editor/project_export.cpp
-#: editor/project_settings_editor.cpp editor/property_editor.cpp
-#: editor/run_settings_dialog.cpp editor/settings_config_dialog.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Close"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Connect"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Signal:"
-msgstr "Script hinzufügen"
-
-#: editor/connections_dialog.cpp
-msgid "Connect '%s' to '%s'"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Disconnect '%s' from '%s'"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Disconnect all from signal: '%s'"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Connect..."
-msgstr ""
-
-#: editor/connections_dialog.cpp
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Disconnect"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Connect a Signal to a Method"
-msgstr "Connections editieren"
-
-#: editor/connections_dialog.cpp
-#, fuzzy
-msgid "Edit Connection:"
-msgstr "Connections editieren"
-
-#: editor/connections_dialog.cpp
-msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
-msgstr ""
-
-#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
-msgid "Signals"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Are you sure you want to remove all connections from this signal?"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Disconnect All"
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Edit..."
-msgstr ""
-
-#: editor/connections_dialog.cpp
-msgid "Go To Method"
-msgstr ""
-
-#: editor/create_dialog.cpp
-#, fuzzy
-msgid "Change %s Type"
-msgstr "Typ ändern"
-
-#: editor/create_dialog.cpp editor/project_settings_editor.cpp
-#, fuzzy
-msgid "Change"
-msgstr "Typ ändern"
-
-#: editor/create_dialog.cpp
-#, fuzzy
-msgid "Create New %s"
-msgstr "Node erstellen"
-
-#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
-#: editor/filesystem_dock.cpp
-msgid "Favorites:"
-msgstr ""
-
-#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
-msgid "Recent:"
-msgstr ""
-
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
-#: modules/visual_script/visual_script_property_selector.cpp
-msgid "Search:"
-msgstr ""
-
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
-#: modules/visual_script/visual_script_property_selector.cpp
-msgid "Matches:"
-msgstr ""
-
-#: editor/create_dialog.cpp editor/editor_plugin_settings.cpp
-#: editor/plugin_config_dialog.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp editor/property_selector.cpp
-#: modules/visual_script/visual_script_property_selector.cpp
-msgid "Description:"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Search Replacement For:"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Dependencies For:"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid ""
-"Scene '%s' is currently being edited.\n"
-"Changes will only take effect when reloaded."
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid ""
-"Resource '%s' is in use.\n"
-"Changes will only take effect when reloaded."
-msgstr ""
-
-#: editor/dependency_editor.cpp
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Dependencies"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Resource"
-msgstr ""
-
-#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings_editor.cpp
-msgid "Path"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Dependencies:"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Fix Broken"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Dependency Editor"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Search Replacement Resource:"
-msgstr ""
-
-#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
-#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
-#: editor/script_create_dialog.cpp
-#: modules/visual_script/visual_script_property_selector.cpp
-#: scene/gui/file_dialog.cpp
-msgid "Open"
-msgstr "Öffnen"
-
-#: editor/dependency_editor.cpp
-msgid "Owners Of:"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Remove selected files from the project? (Can't be restored)"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid ""
-"The files being removed are required by other resources in order for them to "
-"work.\n"
-"Remove them anyway? (no undo)"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Cannot remove:"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Error loading:"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-#, fuzzy
-msgid "Load failed due to missing dependencies:"
-msgstr "Szene '%s' hat kapute Abhängigkeiten:"
-
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-msgid "Open Anyway"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Which action should be taken?"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Fix Dependencies"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Errors loading!"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Show Dependencies"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Orphan Resource Explorer"
-msgstr ""
-
-#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
-#: editor/editor_file_dialog.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
-#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
-msgid "Delete"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Owns"
-msgstr ""
-
-#: editor/dependency_editor.cpp
-msgid "Resources Without Explicit Ownership:"
-msgstr ""
-
-#: editor/dictionary_property_edit.cpp
-msgid "Change Dictionary Key"
-msgstr ""
-
-#: editor/dictionary_property_edit.cpp
-#, fuzzy
-msgid "Change Dictionary Value"
-msgstr "Typ ändern"
-
-#: editor/editor_about.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_about.cpp
-#, fuzzy
-msgid "Project Founders"
-msgstr "Projekt exportieren"
-
-#: editor/editor_about.cpp
-msgid "Lead Developer"
-msgstr ""
-
-#: editor/editor_about.cpp
-#, fuzzy
-msgid "Project Manager "
-msgstr "Projektname:"
-
-#: editor/editor_about.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Authors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Platinum Sponsors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Gold Sponsors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Mini Sponsors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Gold Donors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Silver Donors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Bronze Donors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Donors"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "License"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Third-party Licenses"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid ""
-"Godot Engine relies on a number of third-party free and open source "
-"libraries, all compatible with the terms of its MIT license. The following "
-"is an exhaustive list of all such third-party components with their "
-"respective copyright statements and license terms."
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "All Components"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Components"
-msgstr ""
-
-#: editor/editor_about.cpp
-msgid "Licenses"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-msgid "Error opening package file, not in ZIP format."
-msgstr ""
-
-#: editor/editor_asset_installer.cpp
-msgid "%s (Already Exists)"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp
-msgid "Uncompressing Assets"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-msgid "The following files failed extraction from package:"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp
-#, fuzzy
-msgid "And %s more files."
-msgstr "Node erstellen"
-
-#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-msgid "Package installed successfully!"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Success!"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp
-msgid "Package Contents:"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp editor/editor_node.cpp
-msgid "Install"
-msgstr ""
-
-#: editor/editor_asset_installer.cpp
-msgid "Package Installer"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Speakers"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Add Effect"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Rename Audio Bus"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-#, fuzzy
-msgid "Change Audio Bus Volume"
-msgstr "Autoplay Umschalten"
-
-#: editor/editor_audio_buses.cpp
-#, fuzzy
-msgid "Toggle Audio Bus Solo"
-msgstr "Autoplay Umschalten"
-
-#: editor/editor_audio_buses.cpp
-msgid "Toggle Audio Bus Mute"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Toggle Audio Bus Bypass Effects"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Select Audio Bus Send"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Add Audio Bus Effect"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Move Bus Effect"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Delete Bus Effect"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Drag & drop to rearrange."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Solo"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Mute"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Bypass"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Bus options"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Reset Volume"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Delete Effect"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Audio"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Add Audio Bus"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Master bus can't be deleted!"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-#, fuzzy
-msgid "Delete Audio Bus"
-msgstr "Bild einfügen"
-
-#: editor/editor_audio_buses.cpp
-#, fuzzy
-msgid "Duplicate Audio Bus"
-msgstr "Node(s) duplizieren"
-
-#: editor/editor_audio_buses.cpp
-msgid "Reset Bus Volume"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-#, fuzzy
-msgid "Move Audio Bus"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/editor_audio_buses.cpp
-msgid "Save Audio Bus Layout As..."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Location for New Layout..."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Open Audio Bus Layout"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "There is no '%s' file."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Layout"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Invalid file, not an audio bus layout."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-#, fuzzy
-msgid "Error saving file: %s"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/editor_audio_buses.cpp
-msgid "Add Bus"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Add a new Audio Bus to this layout."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
-#: editor/script_create_dialog.cpp
-msgid "Load"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Load an existing Bus Layout."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Save As"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Save this Bus Layout to a file."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp editor/import_dock.cpp
-msgid "Load Default"
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Load the default Bus Layout."
-msgstr ""
-
-#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Invalid name."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Valid characters:"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Must not collide with an existing engine class name."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Must not collide with an existing built-in type name."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Must not collide with an existing global constant name."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Keyword cannot be used as an autoload name."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Autoload '%s' already exists!"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Rename Autoload"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Toggle AutoLoad Globals"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Move Autoload"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Remove Autoload"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp
-msgid "Enable"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Rearrange Autoloads"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Projektname:"
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Add AutoLoad"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp
-#: editor/editor_plugin_settings.cpp
-#: editor/plugins/animation_tree_editor_plugin.cpp
-#: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Path:"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Node Name:"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp
-#: editor/editor_profiler.cpp editor/project_manager.cpp
-#: editor/settings_config_dialog.cpp
-msgid "Name"
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp
-msgid "Singleton"
-msgstr ""
-
-#: editor/editor_data.cpp editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/editor_data.cpp
-msgid "Updating Scene"
-msgstr ""
-
-#: editor/editor_data.cpp
-msgid "Storing local changes..."
-msgstr ""
-
-#: editor/editor_data.cpp
-msgid "Updating scene..."
-msgstr ""
-
-#: editor/editor_data.cpp editor/editor_properties.cpp
-msgid "[empty]"
-msgstr ""
-
-#: editor/editor_data.cpp
-msgid "[unsaved]"
-msgstr ""
-
-#: editor/editor_dir_dialog.cpp
-msgid "Please select a base directory first."
-msgstr ""
-
-#: editor/editor_dir_dialog.cpp
-msgid "Choose a Directory"
-msgstr ""
-
-#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
-#: editor/filesystem_dock.cpp editor/project_manager.cpp
-#: scene/gui/file_dialog.cpp
-msgid "Create Folder"
-msgstr ""
-
-#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
-#: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp
-#: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp
-#: modules/visual_script/visual_script_editor.cpp scene/gui/file_dialog.cpp
-msgid "Name:"
-msgstr ""
-
-#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
-#: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp
-msgid "Could not create folder."
-msgstr ""
-
-#: editor/editor_dir_dialog.cpp
-msgid "Choose"
-msgstr ""
-
-#: editor/editor_export.cpp
-msgid "Storing File:"
-msgstr ""
-
-#: editor/editor_export.cpp
-msgid "No export template found at the expected path:"
-msgstr ""
-
-#: editor/editor_export.cpp
-msgid "Packing"
-msgstr ""
-
-#: editor/editor_export.cpp
-msgid ""
-"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
-"Etc' in Project Settings."
-msgstr ""
-
-#: editor/editor_export.cpp
-msgid ""
-"Target platform requires 'ETC2' texture compression for GLES3. Enable "
-"'Import Etc 2' in Project Settings."
-msgstr ""
-
-#: editor/editor_export.cpp
-msgid ""
-"Target platform requires 'ETC' texture compression for the driver fallback "
-"to GLES2.\n"
-"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
-"Enabled'."
-msgstr ""
-
-#: editor/editor_export.cpp platform/android/export/export.cpp
-#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
-#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-msgid "Custom debug template not found."
-msgstr ""
-
-#: editor/editor_export.cpp platform/android/export/export.cpp
-#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
-#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-msgid "Custom release template not found."
-msgstr ""
-
-#: editor/editor_export.cpp platform/javascript/export/export.cpp
-msgid "Template file not found:"
-msgstr ""
-
-#: editor/editor_export.cpp
-msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "3D Editor"
-msgstr "Verzeichnis öffnen"
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Script Editor"
-msgstr "Verzeichnis öffnen"
-
-#: editor/editor_feature_profile.cpp
-msgid "Asset Library"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "Scene Tree Editing"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Import Dock"
-msgstr "Importierte Projekte"
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Node Dock"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/editor_feature_profile.cpp
-msgid "FileSystem and Import Docks"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "Erase profile '%s'? (no undo)"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "Profile must be a valid filename and must not contain '.'"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "Profile with this name already exists."
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "(Editor Disabled, Properties Disabled)"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "(Properties Disabled)"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "(Editor Disabled)"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Class Options:"
-msgstr "Script hinzufügen"
-
-#: editor/editor_feature_profile.cpp
-msgid "Enable Contextual Editor"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Enabled Properties:"
-msgstr "Node erstellen"
-
-#: editor/editor_feature_profile.cpp
-msgid "Enabled Features:"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "Enabled Classes:"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid "File '%s' format is invalid, import aborted."
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-msgid ""
-"Profile '%s' already exists. Remove it first before importing, import "
-"aborted."
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Error saving profile to path: '%s'."
-msgstr "Fehler beim Instanzieren der %s Szene"
-
-#: editor/editor_feature_profile.cpp
-msgid "Unset"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Current Profile:"
-msgstr "Node(s) löschen"
-
-#: editor/editor_feature_profile.cpp
-msgid "Make Current"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "New"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp editor/editor_node.cpp
-#: editor/project_manager.cpp
-msgid "Import"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp editor/project_export.cpp
-msgid "Export"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Available Profiles:"
-msgstr "TimeScale-Node"
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Class Options"
-msgstr "Script hinzufügen"
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "New profile name:"
-msgstr "Node"
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Erase Profile"
-msgstr "Oberfläche %d"
-
-#: editor/editor_feature_profile.cpp
-msgid "Godot Feature Profile"
-msgstr ""
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Import Profile(s)"
-msgstr "Importierte Projekte"
-
-#: editor/editor_feature_profile.cpp
-#, fuzzy
-msgid "Export Profile"
-msgstr "Projekt exportieren"
-
-#: editor/editor_feature_profile.cpp
-msgid "Manage Editor Feature Profiles"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
-msgid "Select Current Folder"
-msgstr "Node(s) löschen"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "File Exists, Overwrite?"
-msgstr "Datei existiert, Überschreiben?"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
-msgid "Select This Folder"
-msgstr "Node(s) löschen"
-
-#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-msgid "Copy Path"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Open in File Manager"
-msgstr "Datei öffnen"
-
-#: editor/editor_file_dialog.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/project_manager.cpp
-#, fuzzy
-msgid "Show in File Manager"
-msgstr "Datei öffnen"
-
-#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-msgid "New Folder..."
-msgstr ""
-
-#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Refresh"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "All Recognized"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "All Files (*)"
-msgstr "Alle Dateien (*)"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Datei öffnen"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Datei(en) öffnen"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Verzeichnis öffnen"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Datei oder Verzeichnis öffnen"
-
-#: editor/editor_file_dialog.cpp editor/editor_node.cpp
-#: editor/editor_properties.cpp editor/inspector_dock.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/script_editor_plugin.cpp scene/gui/file_dialog.cpp
-msgid "Save"
-msgstr "Speichern"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Save a File"
-msgstr "Datei speichern"
-
-#: editor/editor_file_dialog.cpp
-msgid "Go Back"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Go Forward"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Go Up"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Toggle Hidden Files"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Toggle Favorite"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Toggle Mode"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Focus Path"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Move Favorite Up"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "Move Favorite Down"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-#, fuzzy
-msgid "Go to previous folder."
-msgstr "Node erstellen"
-
-#: editor/editor_file_dialog.cpp
-#, fuzzy
-msgid "Go to next folder."
-msgstr "Node erstellen"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
-msgid "Go to parent folder."
-msgstr "Node erstellen"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Refresh files."
-msgstr ""
-
-#: editor/editor_file_dialog.cpp
-msgid "(Un)favorite current folder."
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Toggle the visibility of hidden files."
-msgstr ""
-
-#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Directories & Files:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp
-#: editor/plugins/style_box_editor_plugin.cpp
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Preview:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "File:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Must use a valid extension."
-msgstr ""
-
-#: editor/editor_file_system.cpp
-msgid "ScanSources"
-msgstr ""
-
-#: editor/editor_file_system.cpp
-msgid ""
-"There are multiple importers for different types pointing to file %s, import "
-"aborted"
-msgstr ""
-
-#: editor/editor_file_system.cpp
-msgid "(Re)Importing Assets"
-msgstr ""
-
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
-msgid "Top"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid "Class:"
-msgstr ""
-
-#: editor/editor_help.cpp editor/scene_tree_editor.cpp
-#: editor/script_create_dialog.cpp
-msgid "Inherits:"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid "Inherited by:"
-msgstr ""
-
-#: editor/editor_help.cpp
-#, fuzzy
-msgid "Description"
-msgstr "Script hinzufügen"
-
-#: editor/editor_help.cpp
-msgid "Online Tutorials"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid "Properties"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid "override:"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid "default:"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid "Methods"
-msgstr ""
-
-#: editor/editor_help.cpp
-#, fuzzy
-msgid "Theme Properties"
-msgstr "Node erstellen"
-
-#: editor/editor_help.cpp
-msgid "Enumerations"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid "Constants"
-msgstr ""
-
-#: editor/editor_help.cpp
-#, fuzzy
-msgid "Property Descriptions"
-msgstr "Script hinzufügen"
-
-#: editor/editor_help.cpp
-msgid "(value)"
-msgstr ""
-
-#: editor/editor_help.cpp
-msgid ""
-"There is currently no description for this property. Please help us by "
-"[color=$color][url=$url]contributing one[/url][/color]!"
-msgstr ""
-
-#: editor/editor_help.cpp
-#, fuzzy
-msgid "Method Descriptions"
-msgstr "Script hinzufügen"
-
-#: editor/editor_help.cpp
-msgid ""
-"There is currently no description for this method. Please help us by [color="
-"$color][url=$url]contributing one[/url][/color]!"
-msgstr ""
-
-#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Search Help"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Case Sensitive"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Show Hierarchy"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Display All"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Classes Only"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Methods Only"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Signals Only"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Constants Only"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Properties Only"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Theme Properties Only"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Member Type"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Class"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Method"
-msgstr ""
-
-#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Signal"
-msgstr "Script hinzufügen"
-
-#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
-msgid "Constant"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-msgid "Property"
-msgstr ""
-
-#: editor/editor_help_search.cpp
-#, fuzzy
-msgid "Theme Property"
-msgstr "Node erstellen"
-
-#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
-msgid "Property:"
-msgstr ""
-
-#: editor/editor_inspector.cpp
-msgid "Set"
-msgstr ""
-
-#: editor/editor_inspector.cpp
-msgid "Set Multiple:"
-msgstr ""
-
-#: editor/editor_log.cpp
-msgid "Output:"
-msgstr ""
-
-#: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
-msgid "Copy Selection"
-msgstr "Script hinzufügen"
-
-#: editor/editor_log.cpp editor/editor_network_profiler.cpp
-#: editor/editor_profiler.cpp editor/editor_properties.cpp
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#: editor/property_editor.cpp editor/scene_tree_dock.cpp
-#: editor/script_editor_debugger.cpp
-#: modules/gdnative/gdnative_library_editor_plugin.cpp scene/gui/line_edit.cpp
-#: scene/gui/text_edit.cpp
-msgid "Clear"
-msgstr ""
-
-#: editor/editor_log.cpp
-#, fuzzy
-msgid "Clear Output"
-msgstr "Script hinzufügen"
-
-#: editor/editor_network_profiler.cpp editor/editor_node.cpp
-#: editor/editor_profiler.cpp
-msgid "Stop"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp editor/editor_profiler.cpp
-#: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp
-msgid "Start"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp
-msgid "%s/s"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp
-msgid "Down"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp
-msgid "Up"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp editor/editor_node.cpp
-msgid "Node"
-msgstr "Node"
-
-#: editor/editor_network_profiler.cpp
-msgid "Incoming RPC"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp
-msgid "Incoming RSET"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp
-msgid "Outgoing RPC"
-msgstr ""
-
-#: editor/editor_network_profiler.cpp
-msgid "Outgoing RSET"
-msgstr ""
-
-#: editor/editor_node.cpp editor/project_manager.cpp
-msgid "New Window"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Imported resources can't be saved."
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#: scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Okay"
-
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"This resource can't be saved because it does not belong to the edited scene. "
-"Make it unique first."
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Save Resource As..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Can't open file for writing:"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Requested file format unknown:"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Error while saving."
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Error while parsing '%s'."
-msgstr "Fehler beim Instanzieren der %s Szene"
-
-#: editor/editor_node.cpp
-msgid "Unexpected end of file '%s'."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Missing '%s' or its dependencies."
-msgstr "Szene '%s' hat kapute Abhängigkeiten:"
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Error while loading '%s'."
-msgstr "Fehler beim Instanzieren der %s Szene"
-
-#: editor/editor_node.cpp
-msgid "Saving Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Analyzing"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Creating Thumbnail"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "This operation can't be done without a tree root."
-msgstr "Ohne eine Szene kann das nicht funktionieren."
-
-#: editor/editor_node.cpp
-msgid ""
-"This scene can't be saved because there is a cyclic instancing inclusion.\n"
-"Please resolve it and then attempt to save again."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"Couldn't save scene. Likely dependencies (instances or inheritance) couldn't "
-"be satisfied."
-msgstr ""
-
-#: editor/editor_node.cpp editor/scene_tree_dock.cpp
-msgid "Can't overwrite scene that is still open!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Can't load MeshLibrary for merging!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Error saving MeshLibrary!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Can't load TileSet for merging!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Error saving TileSet!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Error trying to save layout!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Default editor layout overridden."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Layout name not found!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Restored default layout to base settings."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"This resource belongs to a scene that was imported, so it's not editable.\n"
-"Please read the documentation relevant to importing scenes to better "
-"understand this workflow."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"This resource belongs to a scene that was instanced or inherited.\n"
-"Changes to it won't be kept when saving the current scene."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"This resource was imported, so it's not editable. Change its settings in the "
-"import panel and then re-import."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"This scene was imported, so changes to it won't be kept.\n"
-"Instancing it or inheriting will allow making changes to it.\n"
-"Please read the documentation relevant to importing scenes to better "
-"understand this workflow."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"This is a remote object, so changes to it won't be kept.\n"
-"Please read the documentation relevant to debugging to better understand "
-"this workflow."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "There is no defined scene to run."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Current scene was never saved, please save it prior to running."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Could not start subprocess!"
-msgstr ""
-
-#: editor/editor_node.cpp editor/filesystem_dock.cpp
-msgid "Open Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open Base Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Quick Open..."
-msgstr "Öffnen"
-
-#: editor/editor_node.cpp
-msgid "Quick Open Scene..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Quick Open Script..."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Save & Close"
-msgstr "Datei speichern"
-
-#: editor/editor_node.cpp
-msgid "Save changes to '%s' before closing?"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Saved %s modified resource(s)."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "A root node is required to save the scene."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Save Scene As..."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "No"
-msgstr "Node"
-
-#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Ja"
-
-#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
-msgstr ""
-
-#: editor/editor_node.cpp editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Ohne eine Szene kann das nicht funktionieren."
-
-#: editor/editor_node.cpp
-msgid "Export Mesh Library"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "This operation can't be done without a root node."
-msgstr "Ohne eine Szene kann das nicht funktionieren."
-
-#: editor/editor_node.cpp
-msgid "Export Tile Set"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "This operation can't be done without a selected node."
-msgstr "Ohne eine Szene kann das nicht funktionieren."
-
-#: editor/editor_node.cpp
-msgid "Current scene not saved. Open anyway?"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Can't reload a scene that was never saved."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Quick Run Scene..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Quit"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open Project Manager?"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Save & Quit"
-msgstr "Datei speichern"
-
-#: editor/editor_node.cpp
-msgid "Save changes to the following scene(s) before quitting?"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Save changes the following scene(s) before opening Project Manager?"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"This option is deprecated. Situations where refresh must be forced are now "
-"considered a bug. Please report."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Pick a Main Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Close Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Reopen Closed Scene"
-msgstr "Datei(en) öffnen"
-
-#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Unable to load addon script from path: '%s'."
-msgstr "Fehler beim Instanzieren der %s Szene"
-
-#: editor/editor_node.cpp
-msgid ""
-"Unable to load addon script from path: '%s' There seems to be an error in "
-"the code, please check the syntax."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"Scene '%s' was automatically imported, so it can't be modified.\n"
-"To make changes to it, a new inherited scene can be created."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"Error loading scene, it must be inside the project path. Use 'Import' to "
-"open the scene, then save it inside the project path."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Scene '%s' has broken dependencies:"
-msgstr "Szene '%s' hat kapute Abhängigkeiten:"
-
-#: editor/editor_node.cpp
-msgid "Clear Recent Scenes"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"No main scene has ever been defined, select one?\n"
-"You can change it later in \"Project Settings\" under the 'application' "
-"category."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"Selected scene '%s' does not exist, select a valid one?\n"
-"You can change it later in \"Project Settings\" under the 'application' "
-"category."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"Selected scene '%s' is not a scene file, select a valid one?\n"
-"You can change it later in \"Project Settings\" under the 'application' "
-"category."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Save Layout"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Delete Layout"
-msgstr ""
-
-#: editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
-msgstr ""
-
-#: editor/editor_node.cpp editor/editor_properties.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
-#, fuzzy
-msgid "Show in FileSystem"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Play This Scene"
-msgstr "Szene starten"
-
-#: editor/editor_node.cpp
-msgid "Close Tab"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Undo Close Tab"
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-msgid "Close Other Tabs"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Close Tabs to the Right"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Close All Tabs"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Switch Scene Tab"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "%d more files or folders"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "%d more folders"
-msgstr "Node erstellen"
-
-#: editor/editor_node.cpp
-msgid "%d more files"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Dock Position"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Distraction Free Mode"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Toggle distraction-free mode."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Add a new scene."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Go to previously opened scene."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Copy Text"
-msgstr "Script hinzufügen"
-
-#: editor/editor_node.cpp
-msgid "Next tab"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Previous tab"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Filter Files..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Operations with scene files."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "New Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "New Inherited Scene..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open Scene..."
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-msgid "Open Recent"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Save Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Save All Scenes"
-msgstr "Neue Szene speichern als..."
-
-#: editor/editor_node.cpp
-msgid "Convert To..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "MeshLibrary..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "TileSet..."
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
-#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-msgid "Undo"
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
-#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-msgid "Redo"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Miscellaneous project or scene-wide tools."
-msgstr "Verschiedene Projekte oder Szenenweite Werkzeuge."
-
-#: editor/editor_node.cpp editor/project_manager.cpp
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Project"
-msgstr "Projektname:"
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Project Settings..."
-msgstr "Projekteinstellungen"
-
-#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-msgid "Version Control"
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-msgid "Set Up Version Control"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Shut Down Version Control"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Export..."
-msgstr "Projekt exportieren"
-
-#: editor/editor_node.cpp
-msgid "Install Android Build Template..."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Open Project Data Folder"
-msgstr "Projekt exportieren"
-
-#: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp
-msgid "Tools"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Orphan Resource Explorer..."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Quit to Project List"
-msgstr "Zurück zur Projektliste"
-
-#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/project_export.cpp
-msgid "Debug"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Deploy with Remote Debug"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"When exporting or deploying, the resulting executable will attempt to "
-"connect to the IP of this computer in order to be debugged."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Small Deploy with Network FS"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"When this option is enabled, export or deploy will produce a minimal "
-"executable.\n"
-"The filesystem will be provided from the project by the editor over the "
-"network.\n"
-"On Android, deploy will use the USB cable for faster performance. This "
-"option speeds up testing for games with a large footprint."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Visible Collision Shapes"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid ""
-"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the "
-"running game if this option is turned on."
-msgstr ""
-"Collision-Formen und Raycast Nodes (für 2D und 3D) werden im laufenden Spiel "
-"angezeigt, falls diese Option aktiviert ist."
-
-#: editor/editor_node.cpp
-msgid "Visible Navigation"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"Navigation meshes and polygons will be visible on the running game if this "
-"option is turned on."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Sync Scene Changes"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"When this option is turned on, any changes made to the scene in the editor "
-"will be replicated in the running game.\n"
-"When used remotely on a device, this is more efficient with network "
-"filesystem."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Sync Script Changes"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"When this option is turned on, any script that is saved will be reloaded on "
-"the running game.\n"
-"When used remotely on a device, this is more efficient with network "
-"filesystem."
-msgstr ""
-
-#: editor/editor_node.cpp editor/script_create_dialog.cpp
-msgid "Editor"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Editor Settings..."
-msgstr "Connections editieren"
-
-#: editor/editor_node.cpp
-msgid "Editor Layout"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Take Screenshot"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Screenshots are stored in the Editor Data/Settings Folder."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Toggle Fullscreen"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Toggle System Console"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open Editor Data/Settings Folder"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open Editor Data Folder"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open Editor Settings Folder"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Manage Editor Features..."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Manage Export Templates..."
-msgstr "Ungültige Bilder löschen"
-
-#: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp
-msgid "Help"
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp
-#: editor/project_settings_editor.cpp editor/rename_dialog.cpp
-msgid "Search"
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Online Docs"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Q&A"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Report a Bug"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Send Docs Feedback"
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
-msgid "Community"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "About"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Play the project."
-msgstr "Projekt starten."
-
-#: editor/editor_node.cpp
-msgid "Play"
-msgstr "Abspielen"
-
-#: editor/editor_node.cpp
-msgid "Pause the scene execution for debugging."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Pause Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Stop the scene."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Play the edited scene."
-msgstr "Spiele die editierte Szene."
-
-#: editor/editor_node.cpp
-msgid "Play Scene"
-msgstr "Szene starten"
-
-#: editor/editor_node.cpp
-msgid "Play custom scene"
-msgstr "Spiele angepasste Szene"
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Play Custom Scene"
-msgstr "Spiele angepasste Szene"
-
-#: editor/editor_node.cpp
-msgid "Changing the video driver requires restarting the editor."
-msgstr ""
-
-#: editor/editor_node.cpp editor/project_settings_editor.cpp
-#: editor/settings_config_dialog.cpp
-#, fuzzy
-msgid "Save & Restart"
-msgstr "Datei speichern"
-
-#: editor/editor_node.cpp
-msgid "Spins when the editor window redraws."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Update Continuously"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Update When Changed"
-msgstr "Typ ändern"
-
-#: editor/editor_node.cpp
-msgid "Hide Update Spinner"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "FileSystem"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Inspector"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Expand Bottom Panel"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Output"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Don't Save"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Android build template is missing, please install relevant templates."
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Manage Templates"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/editor_node.cpp
-msgid ""
-"This will set up your project for custom Android builds by installing the "
-"source template to \"res://android/build\".\n"
-"You can then apply modifications and build your own custom APK on export "
-"(adding modules, changing the AndroidManifest.xml, etc.).\n"
-"Note that in order to make custom builds instead of using pre-built APKs, "
-"the \"Use Custom Build\" option should be enabled in the Android export "
-"preset."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid ""
-"The Android build template is already installed in this project and it won't "
-"be overwritten.\n"
-"Remove the \"res://android/build\" directory manually before attempting this "
-"operation again."
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Import Templates From ZIP File"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Template Package"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/editor_node.cpp
-msgid "Export Library"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Merge With Existing"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open & Run a Script"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "New Inherited"
-msgstr "Script hinzufügen"
-
-#: editor/editor_node.cpp
-msgid "Load Errors"
-msgstr ""
-
-#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Open 2D Editor"
-msgstr "Verzeichnis öffnen"
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Open 3D Editor"
-msgstr "Verzeichnis öffnen"
-
-#: editor/editor_node.cpp
-msgid "Open Script Editor"
-msgstr ""
-
-#: editor/editor_node.cpp editor/project_manager.cpp
-msgid "Open Asset Library"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open the next Editor"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Open the previous Editor"
-msgstr ""
-
-#: editor/editor_node.h
-msgid "Warning!"
-msgstr ""
-
-#: editor/editor_path.cpp
-#, fuzzy
-msgid "No sub-resources found."
-msgstr "Keine Oberflächen Quelle spezifiziert."
-
-#: editor/editor_plugin.cpp
-msgid "Creating Mesh Previews"
-msgstr ""
-
-#: editor/editor_plugin.cpp
-msgid "Thumbnail..."
-msgstr ""
-
-#: editor/editor_plugin_settings.cpp
-#, fuzzy
-msgid "Main Script:"
-msgstr "Script hinzufügen"
-
-#: editor/editor_plugin_settings.cpp
-#, fuzzy
-msgid "Edit Plugin"
-msgstr "Script hinzufügen"
-
-#: editor/editor_plugin_settings.cpp
-msgid "Installed Plugins:"
-msgstr ""
-
-#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
-msgid "Update"
-msgstr ""
-
-#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Version:"
-msgstr ""
-
-#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
-msgid "Author:"
-msgstr ""
-
-#: editor/editor_plugin_settings.cpp
-msgid "Status:"
-msgstr ""
-
-#: editor/editor_plugin_settings.cpp
-msgid "Edit:"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Measure:"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Frame Time (sec)"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Average Time (sec)"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Frame %"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Physics Frame %"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Inclusive"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Self"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Frame #:"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Time"
-msgstr ""
-
-#: editor/editor_profiler.cpp
-msgid "Calls"
-msgstr ""
-
-#: editor/editor_properties.cpp
-#, fuzzy
-msgid "Edit Text:"
-msgstr "Node Filter editieren"
-
-#: editor/editor_properties.cpp editor/script_create_dialog.cpp
-msgid "On"
-msgstr ""
-
-#: editor/editor_properties.cpp
-msgid "Layer"
-msgstr ""
-
-#: editor/editor_properties.cpp
-msgid "Bit %d, value %d"
-msgstr ""
-
-#: editor/editor_properties.cpp
-msgid "[Empty]"
-msgstr ""
-
-#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
-msgid "Assign..."
-msgstr ""
-
-#: editor/editor_properties.cpp
-msgid "Invalid RID"
-msgstr ""
-
-#: editor/editor_properties.cpp
-msgid ""
-"The selected resource (%s) does not match any type expected for this "
-"property (%s)."
-msgstr ""
-
-#: editor/editor_properties.cpp
-msgid ""
-"Can't create a ViewportTexture on resources saved as a file.\n"
-"Resource needs to belong to a scene."
-msgstr ""
-
-#: editor/editor_properties.cpp
-msgid ""
-"Can't create a ViewportTexture on this resource because it's not set as "
-"local to scene.\n"
-"Please switch on the 'local to scene' property on it (and all resources "
-"containing it up to a node)."
-msgstr ""
-
-#: editor/editor_properties.cpp editor/property_editor.cpp
-msgid "Pick a Viewport"
-msgstr ""
-
-#: editor/editor_properties.cpp editor/property_editor.cpp
-#, fuzzy
-msgid "New Script"
-msgstr "Script hinzufügen"
-
-#: editor/editor_properties.cpp editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Extend Script"
-msgstr "Script hinzufügen"
-
-#: editor/editor_properties.cpp editor/property_editor.cpp
-msgid "New %s"
-msgstr ""
-
-#: editor/editor_properties.cpp editor/property_editor.cpp
-msgid "Make Unique"
-msgstr ""
-
-#: editor/editor_properties.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/animation_state_machine_editor.cpp
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#: editor/plugins/tile_map_editor_plugin.cpp editor/property_editor.cpp
-#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-msgid "Paste"
-msgstr ""
-
-#: editor/editor_properties.cpp editor/property_editor.cpp
-#, fuzzy
-msgid "Convert To %s"
-msgstr "Verbindung zu Node:"
-
-#: editor/editor_properties.cpp editor/property_editor.cpp
-#, fuzzy
-msgid "Selected node is not a Viewport!"
-msgstr "Selektiere Node(s) zum Importieren aus"
-
-#: editor/editor_properties_array_dict.cpp
-msgid "Size: "
-msgstr ""
-
-#: editor/editor_properties_array_dict.cpp
-msgid "Page: "
-msgstr ""
-
-#: editor/editor_properties_array_dict.cpp
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Remove Item"
-msgstr ""
-
-#: editor/editor_properties_array_dict.cpp
-msgid "New Key:"
-msgstr ""
-
-#: editor/editor_properties_array_dict.cpp
-msgid "New Value:"
-msgstr ""
-
-#: editor/editor_properties_array_dict.cpp
-msgid "Add Key/Value Pair"
-msgstr ""
-
-#: editor/editor_run_native.cpp
-msgid ""
-"No runnable export preset found for this platform.\n"
-"Please add a runnable preset in the export menu."
-msgstr ""
-
-#: editor/editor_run_script.cpp
-msgid "Write your logic in the _run() method."
-msgstr ""
-
-#: editor/editor_run_script.cpp
-msgid "There is an edited scene already."
-msgstr ""
-
-#: editor/editor_run_script.cpp
-msgid "Couldn't instance script:"
-msgstr ""
-
-#: editor/editor_run_script.cpp
-msgid "Did you forget the 'tool' keyword?"
-msgstr "Sieht so aus als hättest du das Schlüsselwort \"tool\" vergessen?"
-
-#: editor/editor_run_script.cpp
-msgid "Couldn't run script:"
-msgstr ""
-
-#: editor/editor_run_script.cpp
-msgid "Did you forget the '_run' method?"
-msgstr ""
-
-#: editor/editor_sub_scene.cpp
-msgid "Select Node(s) to Import"
-msgstr "Selektiere Node(s) zum Importieren aus"
-
-#: editor/editor_sub_scene.cpp editor/project_manager.cpp
-msgid "Browse"
-msgstr ""
-
-#: editor/editor_sub_scene.cpp
-msgid "Scene Path:"
-msgstr ""
-
-#: editor/editor_sub_scene.cpp
-msgid "Import From Node:"
-msgstr "Importiere von folgendem Node:"
-
-#: editor/export_template_manager.cpp
-msgid "Redownload"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Uninstall"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "(Installed)"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Download"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Official export templates aren't available for development builds."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "(Missing)"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "(Current)"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Retrieving mirrors, please wait..."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Remove template version '%s'?"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Can't open export templates zip."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Invalid version.txt format inside templates: %s."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "No version.txt found inside templates."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Error creating path for templates:"
-msgstr "Fehler beim Schreiben des Projekts PCK!"
-
-#: editor/export_template_manager.cpp
-msgid "Extracting Export Templates"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Importing:"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Error getting the list of mirrors."
-msgstr "Fehler beim Schreiben des Projekts PCK!"
-
-#: editor/export_template_manager.cpp
-msgid "Error parsing JSON of mirror list. Please report this issue!"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid ""
-"No download links found for this version. Direct download is only available "
-"for official releases."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Can't resolve."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Can't connect."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "No response."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Request Failed."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Redirect Loop."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Failed:"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Download Complete."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Cannot remove temporary file:"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid ""
-"Templates installation failed.\n"
-"The problematic templates archives can be found at '%s'."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Error requesting URL:"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Connecting to Mirror..."
-msgstr "Connections editieren"
-
-#: editor/export_template_manager.cpp
-msgid "Disconnected"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Resolving"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Can't Resolve"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
-msgid "Connecting..."
-msgstr "Connections editieren"
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Can't Connect"
-msgstr "Neues Projekt erstellen"
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Connected"
-msgstr "Verbindung zu Node:"
-
-#: editor/export_template_manager.cpp
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Requesting..."
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Downloading"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Connection Error"
-msgstr "Connections editieren"
-
-#: editor/export_template_manager.cpp
-msgid "SSL Handshake Error"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Uncompressing Android Build Sources"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Current Version:"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Installed Versions:"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-msgid "Install From File"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Remove Template"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Select Template File"
-msgstr "Node(s) löschen"
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Godot Export Templates"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/export_template_manager.cpp
-msgid "Export Template Manager"
-msgstr ""
-
-#: editor/export_template_manager.cpp
-#, fuzzy
-msgid "Download Templates"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/export_template_manager.cpp
-msgid "Select mirror from list: (Shift+Click: Open in Browser)"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Favorites"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Status: Import of file failed. Please fix file and reimport manually."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Cannot move/rename resources root."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Cannot move a folder into itself."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Error moving:"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Error duplicating:"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Unable to update dependencies:"
-msgstr "Szene '%s' hat kapute Abhängigkeiten:"
-
-#: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp
-msgid "No name provided."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Provided name contains invalid characters."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "A file or folder with this name already exists."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Name contains invalid characters."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Renaming file:"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/filesystem_dock.cpp
-msgid "Renaming folder:"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Duplicating file:"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Duplicating folder:"
-msgstr "Node(s) duplizieren"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "New Inherited Scene"
-msgstr "Script hinzufügen"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Set As Main Scene"
-msgstr "Neue Szene speichern als..."
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Open Scenes"
-msgstr "Datei(en) öffnen"
-
-#: editor/filesystem_dock.cpp
-msgid "Instance"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Add to Favorites"
-msgstr "Node"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Remove from Favorites"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/filesystem_dock.cpp
-msgid "Edit Dependencies..."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View Owners..."
-msgstr ""
-
-#: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Rename..."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Duplicate..."
-msgstr "Node(s) duplizieren"
-
-#: editor/filesystem_dock.cpp
-msgid "Move To..."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "New Scene..."
-msgstr "Neue Szene speichern als..."
-
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "New Script..."
-msgstr "Script hinzufügen"
-
-#: editor/filesystem_dock.cpp
-msgid "New Resource..."
-msgstr ""
-
-#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
-#: editor/script_editor_debugger.cpp
-msgid "Expand All"
-msgstr ""
-
-#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
-#: editor/script_editor_debugger.cpp
-msgid "Collapse All"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#: editor/project_manager.cpp editor/rename_dialog.cpp
-#: editor/scene_tree_dock.cpp
-msgid "Rename"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Previous Folder/File"
-msgstr "Node(s) löschen"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Next Folder/File"
-msgstr "Node erstellen"
-
-#: editor/filesystem_dock.cpp
-msgid "Re-Scan Filesystem"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Toggle Split Mode"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Search files"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid ""
-"Scanning Files,\n"
-"Please Wait..."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Move"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "There is already file or folder with the same name in this location."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "Overwrite"
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Create Scene"
-msgstr "Node erstellen"
-
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-msgid "Create Script"
-msgstr ""
-
-#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Find in Files"
-msgstr "Node Filter editieren"
-
-#: editor/find_in_files.cpp
-msgid "Find:"
-msgstr ""
-
-#: editor/find_in_files.cpp
-msgid "Folder:"
-msgstr ""
-
-#: editor/find_in_files.cpp
-#, fuzzy
-msgid "Filters:"
-msgstr "Node erstellen"
-
-#: editor/find_in_files.cpp
-msgid ""
-"Include the files with the following extensions. Add or remove them in "
-"ProjectSettings."
-msgstr ""
-
-#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp
-msgid "Find..."
-msgstr ""
-
-#: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp
-msgid "Replace..."
-msgstr ""
-
-#: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp
-msgid "Cancel"
-msgstr "Abbrechen"
-
-#: editor/find_in_files.cpp
-msgid "Find: "
-msgstr ""
-
-#: editor/find_in_files.cpp
-msgid "Replace: "
-msgstr ""
-
-#: editor/find_in_files.cpp
-msgid "Replace all (no undo)"
-msgstr ""
-
-#: editor/find_in_files.cpp
-#, fuzzy
-msgid "Searching..."
-msgstr "Connections editieren"
-
-#: editor/find_in_files.cpp
-msgid "Search complete"
-msgstr ""
-
-#: editor/groups_editor.cpp
-msgid "Add to Group"
-msgstr ""
-
-#: editor/groups_editor.cpp
-msgid "Remove from Group"
-msgstr ""
-
-#: editor/groups_editor.cpp
-msgid "Group name already exists."
-msgstr ""
-
-#: editor/groups_editor.cpp
-#, fuzzy
-msgid "Invalid group name."
-msgstr "Projektname:"
-
-#: editor/groups_editor.cpp
-#, fuzzy
-msgid "Rename Group"
-msgstr "Neues Projekt erstellen"
-
-#: editor/groups_editor.cpp
-#, fuzzy
-msgid "Delete Group"
-msgstr "Node(s) löschen"
-
-#: editor/groups_editor.cpp editor/node_dock.cpp
-msgid "Groups"
-msgstr ""
-
-#: editor/groups_editor.cpp
-msgid "Nodes Not in Group"
-msgstr ""
-
-#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Filter nodes"
-msgstr "Node erstellen"
-
-#: editor/groups_editor.cpp
-msgid "Nodes in Group"
-msgstr ""
-
-#: editor/groups_editor.cpp
-msgid "Empty groups will be automatically removed."
-msgstr ""
-
-#: editor/groups_editor.cpp
-#, fuzzy
-msgid "Group Editor"
-msgstr "Verzeichnis öffnen"
-
-#: editor/groups_editor.cpp
-msgid "Manage Groups"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import as Single Scene"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import with Separate Animations"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import with Separate Materials"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import with Separate Objects"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import with Separate Objects+Materials"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import with Separate Objects+Animations"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import with Separate Materials+Animations"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import with Separate Objects+Materials+Animations"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import as Multiple Scenes"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Import as Multiple Scenes+Materials"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import Scene"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Importing Scene..."
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Generating Lightmaps"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Generating for Mesh: "
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Running Custom Script..."
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Couldn't load post-import script:"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Invalid/broken script for post-import (check console):"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Error running post-import script:"
-msgstr ""
-
-#: editor/import/resource_importer_scene.cpp
-msgid "Saving..."
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid "%d Files"
-msgstr "%d Dateien"
-
-#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid "Import As:"
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid "Preset"
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid "Reimport"
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid "Save Scenes, Re-Import, and Restart"
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid "Changing the type of an imported file requires editor restart."
-msgstr ""
-
-#: editor/import_dock.cpp
-msgid ""
-"WARNING: Assets exist that use this resource, they may stop loading properly."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Failed to load resource."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Expand All Properties"
-msgstr ""
-
-#: editor/inspector_dock.cpp
-#, fuzzy
-msgid "Collapse All Properties"
-msgstr "Node erstellen"
-
-#: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Save As..."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Copy Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Edit Resource Clipboard"
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Copy Resource"
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Make Built-In"
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Make Sub-Resources Unique"
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Open in Help"
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Create a new resource in memory and edit it."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Load an existing resource from disk and edit it."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Save the currently edited resource."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Go to the previous edited object in history."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Go to the next edited object in history."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "History of recently edited objects."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-msgid "Object properties."
-msgstr ""
-
-#: editor/inspector_dock.cpp
-#, fuzzy
-msgid "Filter properties"
-msgstr "Node erstellen"
-
-#: editor/inspector_dock.cpp
-msgid "Changes may be lost!"
-msgstr ""
-
-#: editor/multi_node_edit.cpp
-#, fuzzy
-msgid "MultiNode Set"
-msgstr "MultiNode Set"
-
-#: editor/node_dock.cpp
-#, fuzzy
-msgid "Select a single node to edit its signals and groups."
-msgstr "Selektiere ein Node um deren Signale und Gruppen zu ändern."
-
-#: editor/plugin_config_dialog.cpp
-msgid "Edit a Plugin"
-msgstr ""
-
-#: editor/plugin_config_dialog.cpp
-#, fuzzy
-msgid "Create a Plugin"
-msgstr "Node erstellen"
-
-#: editor/plugin_config_dialog.cpp
-msgid "Plugin Name:"
-msgstr ""
-
-#: editor/plugin_config_dialog.cpp
-msgid "Subfolder:"
-msgstr ""
-
-#: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp
-msgid "Language:"
-msgstr ""
-
-#: editor/plugin_config_dialog.cpp
-#, fuzzy
-msgid "Script Name:"
-msgstr "Projektname:"
-
-#: editor/plugin_config_dialog.cpp
-msgid "Activate now?"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Create Polygon"
-msgstr "Node erstellen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Create points."
-msgstr "Bild einfügen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#, fuzzy
-msgid "Erase points."
-msgstr "Oberfläche %d"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Insert Point"
-msgstr "Bild einfügen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/animation_state_machine_editor.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Add Animation"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Load..."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Move Node Point"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Change BlendSpace1D Limits"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Change BlendSpace1D Labels"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "This type of node can't be used. Only root nodes are allowed."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Add Node Point"
-msgstr "Node"
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Add Animation Point"
-msgstr "Animations-Node"
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#, fuzzy
-msgid "Remove BlendSpace1D Point"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Move BlendSpace1D Node Point"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid ""
-"AnimationTree is inactive.\n"
-"Activate to enable playback, check node warnings if activation fails."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Set the blending position within the space"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Select and move points, create points with RMB."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
-msgid "Enable snap and show grid."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Point"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
-msgid "Open Editor"
-msgstr "Verzeichnis öffnen"
-
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Open Animation Node"
-msgstr "Animations-Node"
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Triangle already exists."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Add Triangle"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Change BlendSpace2D Limits"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Change BlendSpace2D Labels"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Remove BlendSpace2D Point"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Remove BlendSpace2D Triangle"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "BlendSpace2D does not belong to an AnimationTree node."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "No triangles exist, so no blending can take place."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
-msgid "Toggle Auto Triangles"
-msgstr "Autoplay Umschalten"
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create triangles by connecting points."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Erase points and triangles."
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Generate blend triangles automatically (instead of manually)"
-msgstr ""
-
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Blend:"
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
-msgid "Parameter Changed"
-msgstr "Typ ändern"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Filters"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-msgid "Output node can't be added to the blend tree."
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
-msgid "Add Node to BlendTree"
-msgstr "Node von Szene"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Node Moved"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-msgid "Unable to connect, port may be in use or connection may be invalid."
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Nodes Connected"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Nodes Disconnected"
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
-msgid "Set Animation"
-msgstr "Bild einfügen"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Delete Node"
-msgstr "Node(s) löschen"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/scene_tree_dock.cpp
-msgid "Delete Node(s)"
-msgstr "Node(s) löschen"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-msgid "Toggle Filter On/Off"
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
-msgid "Change Filter"
-msgstr "Typ ändern"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-msgid "No animation player set, so unable to retrieve track names."
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-msgid "Player path set is invalid, so unable to retrieve track names."
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/root_motion_editor_plugin.cpp
-msgid ""
-"Animation player has no valid root node path, so unable to retrieve track "
-"names."
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-msgid "Anim Clips"
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-msgid "Audio Clips"
-msgstr ""
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
-msgid "Functions"
-msgstr "Node erstellen"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Node Renamed"
-msgstr "Node"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Add Node..."
-msgstr "Node"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#: editor/plugins/root_motion_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Filtered Tracks:"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
-msgid "Enable Filtering"
-msgstr "Typ ändern"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Toggle Autoplay"
-msgstr "Autoplay Umschalten"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "New Animation Name:"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "New Anim"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Change Animation Name:"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Delete Animation?"
-msgstr "Bild einfügen"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Remove Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Invalid animation name!"
-msgstr "Bild einfügen"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Animation name already exists!"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Rename Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Blend Next Changed"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Change Blend Time"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Load Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Duplicate Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "No animation to copy!"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "No animation resource on clipboard!"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Pasted Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Paste Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "No animation to edit!"
-msgstr "Animations-Node"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Play selected animation backwards from current pos. (A)"
-msgstr "Spiele ausgewählte Animation rückwärts von aktueller Position. (A)"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Play selected animation backwards from end. (Shift+A)"
-msgstr "Spiele ausgewählte Animation rückwärts vom Ende. (Shift+A)"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Stop animation playback. (S)"
-msgstr "Stoppe Animations-Wiedergabe. (S)"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Play selected animation from start. (Shift+D)"
-msgstr "Spiele ausgewählte Animation vom Start. (Shift+D)"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Play selected animation from current pos. (D)"
-msgstr "Ausgewählte Animation von der aktueller Position aus abspielen. (D)"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Animation position (in seconds)."
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Scale animation playback globally for the node."
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Animation Tools"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Transitions..."
-msgstr "Connections editieren"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Open in Inspector"
-msgstr "Verzeichnis öffnen"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Display list of animations in player."
-msgstr "Liste der Animationen anzeigen."
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Autoplay on Load"
-msgstr "Beim Laden automatisch abpielen"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Enable Onion Skinning"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Onion Skinning Options"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Directions"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Past"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Future"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Depth"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "1 step"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "2 steps"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "3 steps"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Differences Only"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Force White Modulate"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Include Gizmos (3D)"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Pin AnimationPlayer"
-msgstr "Animations-Node"
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Create New Animation"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Animation Name:"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
-msgid "Error!"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Blend Times:"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Next (Auto Queue):"
-msgstr ""
-
-#: editor/plugins/animation_player_editor_plugin.cpp
-msgid "Cross-Animation Blend Times"
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Move Node"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Transition exists!"
-msgstr "Transition-Node"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Add Transition"
-msgstr "Transition-Node"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Node"
-msgstr "Node"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "End"
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Immediate"
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Sync"
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "At End"
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Travel"
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Start and end nodes are needed for a sub-transition."
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "No playback resource set at path: %s."
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Node Removed"
-msgstr "Node"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Transition Removed"
-msgstr "Transition-Node"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Set Start Node (Autoplay)"
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid ""
-"Select and move nodes.\n"
-"RMB to add new nodes.\n"
-"Shift+LMB to create connections."
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Create new nodes."
-msgstr "Node erstellen"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Connect nodes."
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Remove selected node or transition."
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Toggle autoplay this animation on start, restart or seek to zero."
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-msgid "Set the end animation. This is useful for sub-transitions."
-msgstr ""
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Transition: "
-msgstr "Transition-Node"
-
-#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
-msgid "Play Mode:"
-msgstr "Node erstellen"
-
-#: editor/plugins/animation_tree_editor_plugin.cpp
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#, fuzzy
-msgid "AnimationTree"
-msgstr "Animations-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "New name:"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Scale:"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Fade In (s):"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Fade Out (s):"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Blend"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Mix"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Auto Restart:"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Restart (s):"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Random Restart (s):"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Start!"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Amount:"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Blend 0:"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Blend 1:"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "X-Fade Time (s):"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Current:"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Input"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Clear Auto-Advance"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Set Auto-Advance"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Delete Input"
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Animation tree is valid."
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Animation tree is invalid."
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Animation Node"
-msgstr "Animations-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "OneShot Node"
-msgstr "OneShot-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Mix Node"
-msgstr "Mix-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Blend2 Node"
-msgstr "Blend2-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Blend3 Node"
-msgstr "Blend3-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Blend4 Node"
-msgstr "Blend4-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "TimeScale Node"
-msgstr "TimeScale-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "TimeSeek Node"
-msgstr "TimeSeek-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Transition Node"
-msgstr "Transition-Node"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Import Animations..."
-msgstr ""
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Edit Node Filters"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/animation_tree_player_editor_plugin.cpp
-msgid "Filters..."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Contents:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
-msgid "View Files"
-msgstr "Datei(en) öffnen"
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Connection error, please try again."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
-msgid "Can't connect to host:"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "No response from host:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Can't resolve hostname:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Request failed, return code:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Request failed."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Cannot save response to:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Write error."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Request failed, too many redirects"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Redirect loop."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Request failed, timeout"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Timeout."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Expected:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Got:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Failed sha256 hash check"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Asset Download Error:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Downloading (%s / %s)..."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Downloading..."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Resolving..."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
-msgid "Error making request"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Idle"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Install..."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Retry"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Download Error"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Download for this asset is already in progress!"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Recently Updated"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Least Recently Updated"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Name (A-Z)"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Name (Z-A)"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "License (A-Z)"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "License (Z-A)"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "First"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Previous"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Next"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Last"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "All"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "No results for \"%s\"."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
-msgid "Import..."
-msgstr "Importierte Projekte"
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Plugins..."
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp
-msgid "Sort:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/project_settings_editor.cpp
-msgid "Category:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Site:"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Support"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Official"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Testing"
-msgstr ""
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
-msgid "Loading..."
-msgstr "Connections editieren"
-
-#: editor/plugins/asset_library_editor_plugin.cpp
-msgid "Assets ZIP File"
-msgstr ""
-
-#: editor/plugins/baked_lightmap_editor_plugin.cpp
-msgid ""
-"Can't determine a save path for lightmap images.\n"
-"Save your scene (for images to be saved in the same dir), or pick a save "
-"path from the BakedLightmap properties."
-msgstr ""
-
-#: editor/plugins/baked_lightmap_editor_plugin.cpp
-msgid ""
-"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
-"Light' flag is on."
-msgstr ""
-
-#: editor/plugins/baked_lightmap_editor_plugin.cpp
-msgid "Failed creating lightmap images, make sure path is writable."
-msgstr ""
-
-#: editor/plugins/baked_lightmap_editor_plugin.cpp
-msgid "Bake Lightmaps"
-msgstr ""
-
-#: editor/plugins/camera_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp
-msgid "Preview"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Configure Snap"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Grid Offset:"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Grid Step:"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Primary Line Every:"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "steps"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Rotation Offset:"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Rotation Step:"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Scale Step:"
-msgstr "TimeScale-Node"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Move Vertical Guide"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Create Vertical Guide"
-msgstr "Neues Projekt erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Vertical Guide"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Move Horizontal Guide"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Create Horizontal Guide"
-msgstr "Neues Projekt erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Horizontal Guide"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Create Horizontal and Vertical Guides"
-msgstr "Neues Projekt erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Move pivot"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Rotate CanvasItem"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Move anchor"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Resize CanvasItem"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Scale CanvasItem"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Move CanvasItem"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid ""
-"Children of containers have their anchors and margins values overridden by "
-"their parent."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Presets for the anchors and margins values of a Control node."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid ""
-"When active, moving Control nodes changes their anchors instead of their "
-"margins."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Top Left"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Top Right"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Bottom Right"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Bottom Left"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Center Left"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Center Top"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Center Right"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Center Bottom"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Center"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Left Wide"
-msgstr "Bild einfügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Top Wide"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Right Wide"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Bottom Wide"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "VCenter Wide"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "HCenter Wide"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Full Rect"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Keep Ratio"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Anchors only"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Change Anchors and Margins"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Change Anchors"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid ""
-"Game Camera Override\n"
-"Overrides game camera with editor viewport camera."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid ""
-"Game Camera Override\n"
-"No game instance running."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Lock Selected"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Unlock Selected"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Group Selected"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Ungroup Selected"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Paste Pose"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Clear Guides"
-msgstr "Spiele angepasste Szene"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Create Custom Bone(s) from Node(s)"
-msgstr "Spiele angepasste Szene"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Clear Bones"
-msgstr "Spiele angepasste Szene"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Make IK Chain"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Clear IK Chain"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid ""
-"Warning: Children of a container get their position and size determined only "
-"by their parent."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/texture_region_editor_plugin.cpp
-#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
-msgid "Zoom Reset"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Select Mode"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Drag: Rotate"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Alt+Drag: Move"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Alt+RMB: Depth list selection"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Move Mode"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Rotate Mode"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Scale Mode"
-msgstr "TimeScale-Node"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid ""
-"Show a list of all objects at the position clicked\n"
-"(same as Alt+RMB in select mode)."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Click to change object's rotation pivot."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Pan Mode"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Ruler Mode"
-msgstr "TimeScale-Node"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Toggle smart snapping."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Use Smart Snap"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Toggle grid snapping."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Use Grid Snap"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Snapping Options"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Use Rotation Snap"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Use Scale Snap"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Snap Relative"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Use Pixel Snap"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Smart Snapping"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Configure Snap..."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Snap to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Snap to Node Anchor"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Snap to Node Sides"
-msgstr "Selektiere Node(s) zum Importieren aus"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Snap to Node Center"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Snap to Other Nodes"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Snap to Guides"
-msgstr "Selektiere Node(s) zum Importieren aus"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Lock the selected object in place (can't be moved)."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Unlock the selected object (can be moved)."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Makes sure the object's children are not selectable."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Restores the object's children's ability to be selected."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Skeleton Options"
-msgstr "Bild einfügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Show Bones"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Make Custom Bone(s) from Node(s)"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Clear Custom Bones"
-msgstr "Spiele angepasste Szene"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Always Show Grid"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Show Helpers"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Show Rulers"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Show Guides"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Show Origin"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Show Viewport"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Show Group And Lock Icons"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Center Selection"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Frame Selection"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Preview Canvas Scale"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Translation mask for inserting keys."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Rotation mask for inserting keys."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Scale mask for inserting keys."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Insert keys (based on mask)."
-msgstr "Bilder (innerhalb) einfügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid ""
-"Auto insert keys when objects are translated, rotated or scaled (based on "
-"mask).\n"
-"Keys are only added to existing tracks, no new tracks will be created.\n"
-"Keys must be inserted manually for the first time."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Auto Insert Key"
-msgstr "Anim Bild einfügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Animation Key and Pose Options"
-msgstr "Animationsbild eingefügt."
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Insert Key (Existing Tracks)"
-msgstr "Bild in bestehende Ebene einfügen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Copy Pose"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Clear Pose"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Multiply grid step by 2"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Divide grid step by 2"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Pan View"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Add %s"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Adding %s..."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Cannot instantiate multiple nodes without root."
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Create Node"
-msgstr "Node erstellen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Error instancing scene from %s"
-msgstr "Fehler beim Instanzieren der %s Szene"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
-msgid "Change Default Type"
-msgstr "Typ ändern"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid ""
-"Drag & drop + Shift : Add node as sibling\n"
-"Drag & drop + Alt : Change node type"
-msgstr ""
-
-#: editor/plugins/collision_polygon_editor_plugin.cpp
-#, fuzzy
-msgid "Create Polygon3D"
-msgstr "Node erstellen"
-
-#: editor/plugins/collision_polygon_editor_plugin.cpp
-msgid "Edit Poly"
-msgstr ""
-
-#: editor/plugins/collision_polygon_editor_plugin.cpp
-msgid "Edit Poly (Remove Point)"
-msgstr ""
-
-#: editor/plugins/collision_shape_2d_editor_plugin.cpp
-msgid "Set Handle"
-msgstr ""
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Load Emission Mask"
-msgstr "Emissions-Maske laden"
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/cpu_particles_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "Restart"
-msgstr "Datei speichern"
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Clear Emission Mask"
-msgstr "Inhalt der Emissions-Masken löschen"
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Particles"
-msgstr ""
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generated Point Count:"
-msgstr ""
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Emission Mask"
-msgstr "Emissions-Maske setzen"
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Solid Pixels"
-msgstr ""
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Border Pixels"
-msgstr ""
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Directed Border Pixels"
-msgstr ""
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Capture from Pixel"
-msgstr ""
-
-#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Emission Colors"
-msgstr "Emissions-Maske setzen"
-
-#: editor/plugins/cpu_particles_editor_plugin.cpp
-msgid "CPUParticles"
-msgstr ""
-
-#: editor/plugins/cpu_particles_editor_plugin.cpp
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Create Emission Points From Mesh"
-msgstr ""
-
-#: editor/plugins/cpu_particles_editor_plugin.cpp
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Create Emission Points From Node"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Flat 0"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Flat 1"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
-msgid "Ease In"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
-msgid "Ease Out"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Smoothstep"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve Point"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve Tangent"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Load Curve Preset"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
-msgid "Add Point"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Point"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
-msgid "Left Linear"
-msgstr "Bild einfügen"
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Right Linear"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Load Preset"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Curve Point"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Toggle Curve Linear Tangent"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Hold Shift to edit tangents individually"
-msgstr ""
-
-#: editor/plugins/curve_editor_plugin.cpp
-msgid "Right click to add point"
-msgstr ""
-
-#: editor/plugins/gi_probe_editor_plugin.cpp
-msgid "Bake GI Probe"
-msgstr ""
-
-#: editor/plugins/gradient_editor_plugin.cpp
-msgid "Gradient Edited"
-msgstr ""
-
-#: editor/plugins/item_list_editor_plugin.cpp
-msgid "Item %d"
-msgstr ""
-
-#: editor/plugins/item_list_editor_plugin.cpp
-msgid "Items"
-msgstr ""
-
-#: editor/plugins/item_list_editor_plugin.cpp
-msgid "Item List Editor"
-msgstr ""
-
-#: editor/plugins/light_occluder_2d_editor_plugin.cpp
-msgid "Create Occluder Polygon"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Mesh is empty!"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "Couldn't create a Trimesh collision shape."
-msgstr "Node erstellen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Static Trimesh Body"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "This doesn't work on scene root!"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Trimesh Static Shape"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Couldn't create a single convex collision shape."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "Create Single Convex Shape"
-msgstr "Node erstellen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "Couldn't create any collision shapes."
-msgstr "Node erstellen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "Create Multiple Convex Shapes"
-msgstr "Node erstellen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Navigation Mesh"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Contained Mesh is not of type ArrayMesh."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "No mesh to debug."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Model has no UV in this layer"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "MeshInstance lacks a Mesh!"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Mesh has not surface to create outlines from!"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Could not create outline!"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Outline"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Mesh"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Trimesh Static Body"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid ""
-"Creates a StaticBody and assigns a polygon-based collision shape to it "
-"automatically.\n"
-"This is the most accurate (but slowest) option for collision detection."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Trimesh Collision Sibling"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid ""
-"Creates a polygon-based collision shape.\n"
-"This is the most accurate (but slowest) option for collision detection."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "Create Single Convex Collision Sibling"
-msgstr "Node erstellen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid ""
-"Creates a single convex collision shape.\n"
-"This is the fastest (but least accurate) option for collision detection."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "Create Multiple Convex Collision Siblings"
-msgstr "Node erstellen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid ""
-"Creates a polygon-based collision shape.\n"
-"This is a performance middle-ground between the two above options."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Outline Mesh..."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid ""
-"Creates a static outline mesh. The outline mesh will have its normals "
-"flipped automatically.\n"
-"This can be used instead of the SpatialMaterial Grow property when using "
-"that property isn't possible."
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "View UV1"
-msgstr "Datei(en) öffnen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "View UV2"
-msgstr "Datei(en) öffnen"
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Unwrap UV2 for Lightmap/AO"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Outline Mesh"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Outline Size:"
-msgstr ""
-
-#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "UV Channel Debug"
-msgstr ""
-
-#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Remove item %d?"
-msgstr ""
-
-#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid ""
-"Update from existing scene?:\n"
-"%s"
-msgstr ""
-
-#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Mesh Library"
-msgstr ""
-
-#: editor/plugins/mesh_library_editor_plugin.cpp
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Add Item"
-msgstr ""
-
-#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Remove Selected Item"
-msgstr ""
-
-#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
-msgstr ""
-
-#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Update from Scene"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "No mesh source specified (and no MultiMesh set in node)."
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "No mesh source specified (and MultiMesh contains no Mesh)."
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Mesh source is invalid (invalid path)."
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Mesh source is invalid (not a MeshInstance)."
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Mesh source is invalid (contains no Mesh resource)."
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "No surface source specified."
-msgstr "Keine Oberflächen Quelle spezifiziert."
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Surface source is invalid (invalid path)."
-msgstr "Oberflächen Quelle is invalid (invalider Pfad)."
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Surface source is invalid (no geometry)."
-msgstr "Oberflächen Quelle is invalid (keine Form)."
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-#, fuzzy
-msgid "Surface source is invalid (no faces)."
-msgstr "Oberflächen Quelle is invalid (kein Face)"
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Select a Source Mesh:"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Select a Target Surface:"
-msgstr "Wähle eine Ziel Oberfläche aus:"
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Populate Surface"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Populate MultiMesh"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Target Surface:"
-msgstr "Ziel Oberfläche:"
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Source Mesh:"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "X-Axis"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Y-Axis"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Z-Axis"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Mesh Up Axis:"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Random Rotation:"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Random Tilt:"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Random Scale:"
-msgstr ""
-
-#: editor/plugins/multimesh_editor_plugin.cpp
-msgid "Populate"
-msgstr ""
-
-#: editor/plugins/navigation_polygon_editor_plugin.cpp
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Create Navigation Polygon"
-msgstr ""
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "Convert to CPUParticles"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generating Visibility Rect"
-msgstr ""
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr ""
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
-msgstr ""
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generation Time (sec):"
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "The geometry's faces don't contain any area."
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "The geometry doesn't contain any faces."
-msgstr "Node enthält keine Geometrie (Flächen)."
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "\"%s\" doesn't inherit from Spatial."
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "\"%s\" doesn't contain geometry."
-msgstr "Node enthält keine Geometrie (Flächen)."
-
-#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "\"%s\" doesn't contain face geometry."
-msgstr "Node enthält keine Geometrie (Flächen)."
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Create Emitter"
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "Emission Points:"
-msgstr "Emissions-Maske setzen"
-
-#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "Surface Points"
-msgstr "Oberfläche %d"
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Surface Points+Normal (Directed)"
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Volume"
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Emission Source: "
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "A processor material of type 'ParticlesMaterial' is required."
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generating AABB"
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
-msgstr ""
-
-#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Remove Point from Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Remove Out-Control from Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Remove In-Control from Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Add Point to Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Split Curve"
-msgstr "Node Kurve editieren"
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Move Point in Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Move In-Control in Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Move Out-Control in Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Select Points"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Shift+Drag: Select Control Points"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Click: Add Point"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Left Click: Split Segment (in curve)"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Right Click: Delete Point"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-msgid "Select Control Points (Shift+Drag)"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Add Point (in empty space)"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Delete Point"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Close Curve"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp editor/plugins/theme_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_export.cpp
-msgid "Options"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Mirror Handle Angles"
-msgstr ""
-
-#: editor/plugins/path_2d_editor_plugin.cpp
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Mirror Handle Lengths"
-msgstr ""
-
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Curve Point #"
-msgstr ""
-
-#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
-msgid "Set Curve Point Position"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
-msgid "Set Curve In Position"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
-msgid "Set Curve Out Position"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Split Path"
-msgstr ""
-
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Remove Path Point"
-msgstr ""
-
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Remove Out-Control Point"
-msgstr ""
-
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Remove In-Control Point"
-msgstr ""
-
-#: editor/plugins/path_editor_plugin.cpp
-msgid "Split Segment (in curve)"
-msgstr ""
-
-#: editor/plugins/physical_bone_plugin.cpp
-#, fuzzy
-msgid "Move Joint"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid ""
-"The skeleton property of the Polygon2D does not point to a Skeleton2D node"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Sync Bones"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid ""
-"No texture in this polygon.\n"
-"Set a texture to be able to edit UV."
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Create UV Map"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid ""
-"Polygon 2D has internal vertices, so it can no longer be edited in the "
-"viewport."
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Create Polygon & UV"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Create Internal Vertex"
-msgstr "Neues Projekt erstellen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Internal Vertex"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Invalid Polygon (need 3 different vertices)"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Add Custom Polygon"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Custom Polygon"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Transform UV Map"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Transform Polygon"
-msgstr "Transformationstyp"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Paint Bone Weights"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Open Polygon 2D UV editor."
-msgstr "Polygon 2D UV Editor"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Polygon 2D UV Editor"
-msgstr "Polygon 2D UV Editor"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "UV"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Points"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Polygons"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Bones"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Move Points"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Ctrl: Rotate"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Shift: Move All"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Shift+Ctrl: Scale"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Move Polygon"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Rotate Polygon"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Scale Polygon"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Create a custom polygon. Enables custom polygon rendering."
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid ""
-"Remove a custom polygon. If none remain, custom polygon rendering is "
-"disabled."
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Paint weights with specified intensity."
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Unpaint weights with specified intensity."
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Radius:"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Polygon->UV"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "UV->Polygon"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Clear UV"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Grid Settings"
-msgstr "Projekteinstellungen"
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Snap"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Enable Snap"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Grid"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Show Grid"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Configure Grid:"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Grid Offset X:"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Grid Offset Y:"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Grid Step X:"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Grid Step Y:"
-msgstr ""
-
-#: editor/plugins/polygon_2d_editor_plugin.cpp
-msgid "Sync Bones to Polygon"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-msgid "ERROR: Couldn't load resource!"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-msgid "Add Resource"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-msgid "Rename Resource"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Delete Resource"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-msgid "Resource clipboard is empty!"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-msgid "Paste Resource"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/scene_tree_editor.cpp
-msgid "Instance:"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Type:"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-msgid "Load Resource"
-msgstr ""
-
-#: editor/plugins/resource_preloader_editor_plugin.cpp
-msgid "ResourcePreloader"
-msgstr ""
-
-#: editor/plugins/root_motion_editor_plugin.cpp
-msgid "AnimationTree has no path set to an AnimationPlayer"
-msgstr ""
-
-#: editor/plugins/root_motion_editor_plugin.cpp
-msgid "Path to AnimationPlayer is invalid"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Clear Recent Files"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Close and save changes?"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Error writing TextFile:"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Could not load file at:"
-msgstr "Neues Projekt erstellen"
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Error saving file!"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Error while saving theme."
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Error Saving"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Error importing theme."
-msgstr "Fehler beim Exportieren des Projekts!"
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Error Importing"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "New Text File..."
-msgstr "Datei(en) öffnen"
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Open File"
-msgstr "Datei öffnen"
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Save File As..."
-msgstr "Datei speichern"
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Can't obtain the script for running."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Script failed reloading, check console for errors."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Script is not in tool mode, will not be able to run."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid ""
-"To run this script, it must inherit EditorScript and be set to tool mode."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Import Theme"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Error while saving theme"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Error saving"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Save Theme As..."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "%s Class Reference"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp
-msgid "Find Next"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp
-msgid "Find Previous"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Filter scripts"
-msgstr "Node erstellen"
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Toggle alphabetical sorting of the method list."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Filter methods"
-msgstr "Node erstellen"
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Sort"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Move Up"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Move Down"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Next script"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Previous script"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "File"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Open..."
-msgstr "Öffnen"
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Reopen Closed Script"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Save All"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Soft Reload Script"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Copy Script Path"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "History Previous"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "History Next"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Import Theme..."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Reload Theme"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Save Theme"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Close All"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Close Docs"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
-msgid "Run"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
-msgid "Step Into"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
-msgid "Step Over"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
-msgid "Break"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
-#: editor/script_editor_debugger.cpp
-msgid "Continue"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Keep Debugger Open"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Debug with External Editor"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Open Godot online documentation."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Search the reference documentation."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Go to previous edited document."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Go to next edited document."
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid "Discard"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-msgid ""
-"The following files are newer on disk.\n"
-"What action should be taken?:"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
-msgid "Debugger"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Search Results"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
-msgid "Clear Recent Scripts"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Connections to method:"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp
-msgid "Source"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Target"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid ""
-"Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Go to Function"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Only resources from filesystem can be dropped."
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Can't drop nodes because script '%s' is not used in this scene."
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Lookup Symbol"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Pick Color"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
-msgid "Convert Case"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
-msgid "Uppercase"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
-msgid "Lowercase"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
-msgid "Capitalize"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
-msgid "Syntax Highlighter"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
-msgid "Go To"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
-msgid "Bookmarks"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Breakpoints"
-msgstr "Bild einfügen"
-
-#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
-#: scene/gui/text_edit.cpp
-msgid "Cut"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
-#: scene/gui/text_edit.cpp
-msgid "Select All"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Delete Line"
-msgstr "Bild einfügen"
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Indent Left"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Indent Right"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Toggle Comment"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Fold/Unfold Line"
-msgstr "Bild einfügen"
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Fold All Lines"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Unfold All Lines"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Clone Down"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Complete Symbol"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Evaluate Selection"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Trim Trailing Whitespace"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Convert Indent to Spaces"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Convert Indent to Tabs"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Auto Indent"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Find in Files..."
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Contextual Help"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Toggle Bookmark"
-msgstr "Autoplay Umschalten"
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Go to Next Bookmark"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Go to Previous Bookmark"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Remove All Bookmarks"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Go to Function..."
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Go to Line..."
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Toggle Breakpoint"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Remove All Breakpoints"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Go to Next Breakpoint"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
-msgid "Go to Previous Breakpoint"
-msgstr ""
-
-#: editor/plugins/shader_editor_plugin.cpp
-msgid ""
-"This shader has been modified on on disk.\n"
-"What action should be taken?"
-msgstr ""
-
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Shader"
-msgstr ""
-
-#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "This skeleton has no bones, create some children Bone2D nodes."
-msgstr ""
-
-#: editor/plugins/skeleton_2d_editor_plugin.cpp
-#, fuzzy
-msgid "Create Rest Pose from Bones"
-msgstr "Spiele angepasste Szene"
-
-#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Rest Pose to Bones"
-msgstr ""
-
-#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Skeleton2D"
-msgstr ""
-
-#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
-
-#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
-
-#: editor/plugins/skeleton_editor_plugin.cpp
-msgid "Create physical bones"
-msgstr ""
-
-#: editor/plugins/skeleton_editor_plugin.cpp
-msgid "Skeleton"
-msgstr ""
-
-#: editor/plugins/skeleton_editor_plugin.cpp
-msgid "Create physical skeleton"
-msgstr ""
-
-#: editor/plugins/skeleton_ik_editor_plugin.cpp
-#, fuzzy
-msgid "Play IK"
-msgstr "Abspielen"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Orthogonal"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Perspective"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Transform Aborted."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "X-Axis Transform."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Y-Axis Transform."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Z-Axis Transform."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Plane Transform."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Scaling: "
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Translating: "
-msgstr "Transition-Node"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rotating %s degrees."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Keying is disabled (no key inserted)."
-msgstr "\"keying\" ist deaktiviert (Bild nicht hinzugefügt)."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Animation Key Inserted."
-msgstr "Animationsbild eingefügt."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Pitch"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Yaw"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Typ ändern"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Surface Changes"
-msgstr "Oberfläche %d"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Top View."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom View."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left View."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right View."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front View."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear View."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align Transform with View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align Rotation with View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "No parent to instance a child at."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "This operation requires a single selected node."
-msgstr "Bitte nur ein Node selektieren."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Auto Orthogonal Enabled"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Lock View Rotation"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "View FPS"
-msgstr "Datei(en) öffnen"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Half Resolution"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Enable Doppler"
-msgstr "Typ ändern"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Cinematic Preview"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Not available when using the GLES2 renderer."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Slow Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Rotation Locked"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid ""
-"Note: The FPS value displayed is the editor's framerate.\n"
-"It cannot be used as a reliable indication of in-game performance."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "XForm Dialog"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Snap Nodes To Floor"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Couldn't find a solid floor to snap the selection to."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid ""
-"Drag: Rotate\n"
-"Alt+Drag: Move\n"
-"Alt+RMB: Depth list selection"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Use Local Space"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Use Snap"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Top View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Switch Perspective/Orthogonal View"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Insert Animation Key"
-msgstr "Bild einfügen"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Focus Origin"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Focus Selection"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Toggle Freelook"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Transform"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Snap Object to Floor"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Transform Dialog..."
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "1 Viewport"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "2 Viewports"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "2 Viewports (Alt)"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "3 Viewports"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "3 Viewports (Alt)"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "4 Viewports"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Gizmos"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Origin"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Grid"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "Settings..."
-msgstr "Projekteinstellungen"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Snap Settings"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Translate Snap:"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rotate Snap (deg.):"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Scale Snap (%):"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Viewport Settings"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Perspective FOV (deg.):"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Z-Near:"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Z-Far:"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Transform Change"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Translate:"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rotate (deg.):"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Scale (ratio):"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Transform Type"
-msgstr "Transformationstyp"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Pre"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Post"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Create Mesh2D"
-msgstr "Node erstellen"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Mesh2D Preview"
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Create Polygon2D"
-msgstr "Node erstellen"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Polygon2D Preview"
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Create CollisionPolygon2D"
-msgstr "Node erstellen"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "CollisionPolygon2D Preview"
-msgstr "Node erstellen"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Create LightOccluder2D"
-msgstr "Node erstellen"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "LightOccluder2D Preview"
-msgstr "Node erstellen"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Sprite is empty!"
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Can't convert a sprite using animation frames to mesh."
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Invalid geometry, can't replace by mesh."
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Convert to Mesh2D"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Invalid geometry, can't create polygon."
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Convert to Polygon2D"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Invalid geometry, can't create collision polygon."
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Create CollisionPolygon2D Sibling"
-msgstr "Node erstellen"
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Invalid geometry, can't create light occluder."
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Create LightOccluder2D Sibling"
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Sprite"
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Simplification: "
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Shrink (Pixels): "
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Grow (Pixels): "
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-msgid "Update Preview"
-msgstr ""
-
-#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
-msgid "Settings:"
-msgstr "Projekteinstellungen"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "No Frames Selected"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Add %d Frame(s)"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Add Frame"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Unable to load images"
-msgstr "Selektiere Node(s) zum Importieren aus"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "ERROR: Couldn't load frame resource!"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Resource clipboard is empty or not a texture!"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Paste Frame"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Add Empty"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation FPS"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "(empty)"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Move Frame"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Animations:"
-msgstr "Animations-Node"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "New Animation"
-msgstr "Bild einfügen"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Speed (FPS):"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Animation Frames:"
-msgstr "Animations-Node"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Add a Texture from File"
-msgstr "Node von Szene"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Add Frames from a Sprite Sheet"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Insert Empty (Before)"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Insert Empty (After)"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Move (Before)"
-msgstr "Node(s) entfernen"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Move (After)"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
-msgid "Select Frames"
-msgstr "Node(s) löschen"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Horizontal:"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Vertical:"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Select/Clear All Frames"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Create Frames from Sprite Sheet"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "SpriteFrames"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Set Region Rect"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Set Margin"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Snap Mode:"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-#: scene/resources/visual_shader.cpp
-msgid "None"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Pixel Snap"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Grid Snap"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Auto Slice"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Offset:"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Step:"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-msgid "Sep.:"
-msgstr ""
-
-#: editor/plugins/texture_region_editor_plugin.cpp
-#, fuzzy
-msgid "TextureRegion"
-msgstr "2D-Textur"
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Add All Items"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Add All"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Remove All Items"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
-#, fuzzy
-msgid "Remove All"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Theme"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme editing menu."
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Add Class Items"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Remove Class Items"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Create Empty Template"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Create Empty Editor Template"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Create From Current Editor Theme"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Toggle Button"
-msgstr "Autoplay Umschalten"
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Disabled Button"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Item"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Disabled Item"
-msgstr "Node(s) löschen"
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Check Item"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Checked Item"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Radio Item"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Checked Radio Item"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Named Sep."
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Submenu"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Subitem 1"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Subitem 2"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Has"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Many"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Disabled LineEdit"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Tab 1"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Tab 2"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Tab 3"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Editable Item"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Subtree"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Has,Many,Options"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Data Type:"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Icon"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp
-msgid "Style"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Font"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-msgid "Color"
-msgstr ""
-
-#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Theme File"
-msgstr "Datei öffnen"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Erase Selection"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Fix Invalid Tiles"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "Cut Selection"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Paint TileMap"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Line Draw"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Rectangle Paint"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Bucket Fill"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Erase TileMap"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Find Tile"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Transpose"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Disable Autotile"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
-msgid "Enable Priority"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
-msgid "Filter tiles"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Give a TileSet resource to this TileMap to use its tiles."
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Paint Tile"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid ""
-"Shift+LMB: Line Draw\n"
-"Shift+Ctrl+LMB: Rectangle Paint"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Pick Tile"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
-msgid "Rotate Left"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
-msgid "Rotate Right"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Flip Horizontally"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Flip Vertically"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
-msgid "Clear Transform"
-msgstr "Transformationstyp"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Add Texture(s) to TileSet."
-msgstr "Node von Szene"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Remove selected Texture from TileSet."
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Create from Scene"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Merge from Scene"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "New Single Tile"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "New Autotile"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "New Atlas"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Next Coordinate"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Select the next shape, subtile, or Tile."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Previous Coordinate"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Select the previous shape, subtile, or Tile."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Region"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Collision"
-msgstr "Animations-Node"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Occlusion"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Navigation"
-msgstr "Animations-Node"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Bitmask"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Priority"
-msgstr "Projekt exportieren"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Z Index"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Region Mode"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Collision Mode"
-msgstr "Animations-Node"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Occlusion Mode"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Navigation Mode"
-msgstr "Animations-Node"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Bitmask Mode"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Priority Mode"
-msgstr "Projekt exportieren"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Icon Mode"
-msgstr "Bild bewegen/einfügen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Z Index Mode"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Copy bitmask."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Paste bitmask."
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Erase bitmask."
-msgstr "Oberfläche %d"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Create a new rectangle."
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Create a new polygon."
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Keep polygon inside region Rect."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Enable snap and show grid (configurable via the Inspector)."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Display Tile Names (Hold Alt Key)"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid ""
-"Add or select a texture on the left panel to edit the tiles bound to it."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Remove selected texture? This will remove all tiles which use it."
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "You haven't selected a texture to remove."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Create from scene? This will overwrite all current tiles."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Merge from scene?"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Texture"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "%s file(s) were not added because was already on the list."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid ""
-"Drag handles to edit Rect.\n"
-"Click on another Tile to edit it."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Delete selected Rect."
-msgstr "Node(s) löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid ""
-"Select current edited sub-tile.\n"
-"Click on another Tile to edit it."
-msgstr "Node(s) löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Delete polygon."
-msgstr "Bild einfügen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid ""
-"LMB: Set bit on.\n"
-"RMB: Set bit off.\n"
-"Shift+LMB: Set wildcard bit.\n"
-"Click on another Tile to edit it."
-msgstr "Node(s) löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid ""
-"Select sub-tile to use as icon, this will be also used on invalid autotile "
-"bindings.\n"
-"Click on another Tile to edit it."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid ""
-"Select sub-tile to change its priority.\n"
-"Click on another Tile to edit it."
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid ""
-"Select sub-tile to change its z index.\n"
-"Click on another Tile to edit it."
-msgstr "Node(s) löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Set Tile Region"
-msgstr "2D-Textur"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Create Tile"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Set Tile Icon"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Tile Bitmask"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Collision Polygon"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Occlusion Polygon"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Navigation Polygon"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Paste Tile Bitmask"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Clear Tile Bitmask"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Make Polygon Concave"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Make Polygon Convex"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Tile"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Remove Collision Polygon"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Remove Occlusion Polygon"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Remove Navigation Polygon"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Tile Priority"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Edit Tile Z Index"
-msgstr ""
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Make Convex"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Make Concave"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Create Collision Polygon"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "Create Occlusion Polygon"
-msgstr "Node erstellen"
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "This property can't be changed."
-msgstr "Ohne eine Szene kann das nicht funktionieren."
-
-#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
-msgid "TileSet"
-msgstr "Datei(en) öffnen"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "No VCS addons are available."
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Error"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "No commit message was provided"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "No files added to stage"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Commit"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "VCS Addon is not initialized"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Version Control System"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Initialize"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Staging area"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
-msgid "Detect new changes"
-msgstr "Node erstellen"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
-msgid "Changes"
-msgstr "Typ ändern"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Modified"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
-msgid "Renamed"
-msgstr "Node"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
-msgid "Deleted"
-msgstr "Node(s) löschen"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
-msgid "Typechange"
-msgstr "Typ ändern"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
-msgid "Stage Selected"
-msgstr "Verbindung zu Node:"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Stage All"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Add a commit message"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
-msgid "Commit Changes"
-msgstr "Typ ändern"
-
-#: editor/plugins/version_control_editor_plugin.cpp
-#: modules/gdnative/gdnative_library_singleton_editor.cpp
-msgid "Status"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "View file diffs before committing them to the latest version"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "No file diff is active"
-msgstr ""
-
-#: editor/plugins/version_control_editor_plugin.cpp
-msgid "Detect changes in file diff"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "(GLES3 only)"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Add Output"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Scalar"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Vector"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Boolean"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Sampler"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Add input port"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Add output port"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Change input port type"
-msgstr "Typ ändern"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Change output port type"
-msgstr "Typ ändern"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Change input port name"
-msgstr "Typ ändern"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Change output port name"
-msgstr "Typ ändern"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Remove input port"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Remove output port"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Set expression"
-msgstr "Typ ändern"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Resize VisualShader node"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Set Uniform Name"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Set Input Default Port"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Add Node to Visual Shader"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Duplicate Nodes"
-msgstr "Node(s) duplizieren"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Paste Nodes"
-msgstr "Node erstellen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Delete Nodes"
-msgstr "Node(s) löschen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Visual Shader Input Type Changed"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Vertex"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Fragment"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Light"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Show resulted shader code."
-msgstr "Node erstellen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Create Shader Node"
-msgstr "Node erstellen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Color function."
-msgstr "Script hinzufügen"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Color operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Grayscale function."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Converts HSV vector to RGB equivalent."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Converts RGB vector to HSV equivalent."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Sepia function."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Burn operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Darken operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Difference operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Dodge operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "HardLight operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Lighten operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Overlay operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Screen operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "SoftLight operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Color constant."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Color uniform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the boolean result of the %s comparison between two parameters."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Equal (==)"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Greater Than (>)"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Greater Than or Equal (>=)"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns an associated vector if the provided scalars are equal, greater or "
-"less."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns the boolean result of the comparison between INF and a scalar "
-"parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns the boolean result of the comparison between NaN and a scalar "
-"parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Less Than (<)"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Less Than or Equal (<=)"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Not Equal (!=)"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns an associated vector if the provided boolean value is true or false."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns an associated scalar if the provided boolean value is true or false."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the boolean result of the comparison between two parameters."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns the boolean result of the comparison between INF (or NaN) and a "
-"scalar parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Boolean constant."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Boolean uniform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "'%s' input parameter for all shader modes."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Input parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "'%s' input parameter for vertex and fragment shader modes."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "'%s' input parameter for fragment and light shader modes."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "'%s' input parameter for fragment shader mode."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "'%s' input parameter for light shader mode."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "'%s' input parameter for vertex shader mode."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "'%s' input parameter for vertex and fragment shader mode."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Scalar function."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Scalar operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "E constant (2.718282). Represents the base of the natural logarithm."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Epsilon constant (0.00001). Smallest possible scalar number."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Phi constant (1.618034). Golden ratio."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Pi/4 constant (0.785398) or 45 degrees."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Pi/2 constant (1.570796) or 90 degrees."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Pi constant (3.141593) or 180 degrees."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Tau constant (6.283185) or 360 degrees."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Sqrt2 constant (1.414214). Square root of 2."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the absolute value of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the arc-cosine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the inverse hyperbolic cosine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the arc-sine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the inverse hyperbolic sine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the arc-tangent of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the arc-tangent of the parameters."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the inverse hyperbolic tangent of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Finds the nearest integer that is greater than or equal to the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Constrains a value to lie between two further values."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the cosine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the hyperbolic cosine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Converts a quantity in radians to degrees."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Base-e Exponential."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Base-2 Exponential."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Finds the nearest integer less than or equal to the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Computes the fractional part of the argument."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the inverse of the square root of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Natural logarithm."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Base-2 logarithm."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the greater of two values."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the lesser of two values."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Linear interpolation between two scalars."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the opposite value of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "1.0 - scalar"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns the value of the first parameter raised to the power of the second."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Converts a quantity in degrees to radians."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "1.0 / scalar"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Finds the nearest integer to the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Finds the nearest even integer to the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Clamps the value between 0.0 and 1.0."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Extracts the sign of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the sine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the hyperbolic sine of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the square root of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n"
-"\n"
-"Returns 0.0 if 'x' is smaller than 'edge0' and 1.0 if x is larger than "
-"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
-"using Hermite polynomials."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Step function( scalar(edge), scalar(x) ).\n"
-"\n"
-"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the tangent of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the hyperbolic tangent of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Finds the truncated value of the parameter."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Adds scalar to scalar."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Divides scalar by scalar."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Multiplies scalar by scalar."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the remainder of the two scalars."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Subtracts scalar from scalar."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Scalar constant."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Scalar uniform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Perform the cubic texture lookup."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Perform the texture lookup."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Cubic texture uniform lookup."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "2D texture uniform lookup."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "2D texture uniform lookup with triplanar."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Transform function."
-msgstr "Transformationstyp"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Calculate the outer product of a pair of vectors.\n"
-"\n"
-"OuterProduct treats the first parameter 'c' as a column vector (matrix with "
-"one column) and the second parameter 'r' as a row vector (matrix with one "
-"row) and does a linear algebraic matrix multiply 'c * r', yielding a matrix "
-"whose number of rows is the number of components in 'c' and whose number of "
-"columns is the number of components in 'r'."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Composes transform from four vectors."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Decomposes transform to four vectors."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Calculates the determinant of a transform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Calculates the inverse of a transform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Calculates the transpose of a transform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Multiplies transform by transform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Multiplies vector by transform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Transform constant."
-msgstr "Transformationstyp"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Transform uniform."
-msgstr "Transformationstyp"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Vector function."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Vector operator."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Composes vector from three scalars."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Decomposes vector to three scalars."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Calculates the cross product of two vectors."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the distance between two points."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Calculates the dot product of two vectors."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns the vector that points in the same direction as a reference vector. "
-"The function has three vector parameters : N, the vector to orient, I, the "
-"incident vector, and Nref, the reference vector. If the dot product of I and "
-"Nref is smaller than zero the return value is N. Otherwise -N is returned."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Calculates the length of a vector."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Linear interpolation between two vectors."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Linear interpolation between two vectors using scalar."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Calculates the normalize product of vector."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "1.0 - vector"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "1.0 / vector"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns the vector that points in the direction of reflection ( a : incident "
-"vector, b : normal vector )."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the vector that points in the direction of refraction."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n"
-"\n"
-"Returns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than "
-"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
-"using Hermite polynomials."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n"
-"\n"
-"Returns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than "
-"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
-"using Hermite polynomials."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Step function( vector(edge), vector(x) ).\n"
-"\n"
-"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Step function( scalar(edge), vector(x) ).\n"
-"\n"
-"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Adds vector to vector."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Divides vector by vector."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Multiplies vector by vector."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Returns the remainder of the two vectors."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Subtracts vector from vector."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Vector constant."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "Vector uniform."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Custom Godot Shader Language expression, with custom amount of input and "
-"output ports. This is a direct injection of code into the vertex/fragment/"
-"light function, do not use it to write the function declarations inside."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Returns falloff based on the dot product of surface normal and view "
-"direction of camera (pass associated inputs to it)."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"Custom Godot Shader Language expression, which is placed on top of the "
-"resulted shader. You can place various function definitions inside and call "
-"it later in the Expressions. You can also declare varyings, uniforms and "
-"constants."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "(Fragment/Light mode only) Scalar derivative function."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "(Fragment/Light mode only) Vector derivative function."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"(Fragment/Light mode only) (Vector) Derivative in 'x' using local "
-"differencing."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"(Fragment/Light mode only) (Scalar) Derivative in 'x' using local "
-"differencing."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"(Fragment/Light mode only) (Vector) Derivative in 'y' using local "
-"differencing."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"(Fragment/Light mode only) (Scalar) Derivative in 'y' using local "
-"differencing."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and "
-"'y'."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid ""
-"(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and "
-"'y'."
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-msgid "VisualShader"
-msgstr ""
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Edit Visual Property"
-msgstr "Node Filter editieren"
-
-#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
-msgid "Visual Shader Mode Changed"
-msgstr "Typ ändern"
-
-#: editor/project_export.cpp
-msgid "Runnable"
-msgstr ""
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Add initial export..."
-msgstr "Script hinzufügen"
-
-#: editor/project_export.cpp
-msgid "Add previous patches..."
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Delete patch '%s' from list?"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Delete preset '%s'?"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid ""
-"Failed to export the project for platform '%s'.\n"
-"Export templates seem to be missing or invalid."
-msgstr ""
-
-#: editor/project_export.cpp
-msgid ""
-"Failed to export the project for platform '%s'.\n"
-"This might be due to a configuration issue in the export preset or your "
-"export settings."
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Release"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Exporting All"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "The given export path doesn't exist:"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Presets"
-msgstr ""
-
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-msgid "Add..."
-msgstr ""
-
-#: editor/project_export.cpp
-msgid ""
-"If checked, the preset will be available for use in one-click deploy.\n"
-"Only one preset per platform may be marked as runnable."
-msgstr ""
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Export Path"
-msgstr "Projekt exportieren"
-
-#: editor/project_export.cpp
-msgid "Resources"
-msgstr ""
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Export all resources in the project"
-msgstr "Exportiere alle Resources des Projekts."
-
-#: editor/project_export.cpp
-msgid "Export selected scenes (and dependencies)"
-msgstr ""
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Export selected resources (and dependencies)"
-msgstr "Exportiere alle Resources des Projekts."
-
-#: editor/project_export.cpp
-msgid "Export Mode:"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Resources to export:"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid ""
-"Filters to export non-resource files/folders\n"
-"(comma-separated, e.g: *.json, *.txt, docs/*)"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid ""
-"Filters to exclude files/folders from project\n"
-"(comma-separated, e.g: *.json, *.txt, docs/*)"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Patches"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Make Patch"
-msgstr ""
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Pack File"
-msgstr "Datei(en) öffnen"
-
-#: editor/project_export.cpp
-msgid "Features"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Custom (comma-separated):"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Feature List:"
-msgstr ""
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Script"
-msgstr "Script hinzufügen"
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Script Export Mode:"
-msgstr "Projekt exportieren"
-
-#: editor/project_export.cpp
-msgid "Text"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Compiled"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Encrypted (Provide Key Below)"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Invalid Encryption Key (must be 64 characters long)"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Script Encryption Key (256-bits as hex):"
-msgstr ""
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Export PCK/Zip"
-msgstr "Exportiere das Projekt PCK"
-
-#: editor/project_export.cpp
-msgid "Export Project"
-msgstr "Projekt exportieren"
-
-#: editor/project_export.cpp
-#, fuzzy
-msgid "Export mode?"
-msgstr "Projekt exportieren"
-
-#: editor/project_export.cpp
-msgid "Export All"
-msgstr ""
-
-#: editor/project_export.cpp editor/project_manager.cpp
-#, fuzzy
-msgid "ZIP File"
-msgstr "Datei(en) öffnen"
-
-#: editor/project_export.cpp
-msgid "Godot Game Pack"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Export templates for this platform are missing:"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Manage Export Templates"
-msgstr ""
-
-#: editor/project_export.cpp
-msgid "Export With Debug"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "The path specified doesn't exist."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Error opening package file (it's not in ZIP format)."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr ""
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Please choose an empty folder."
-msgstr "Bitte ausserhalb des Projekt Verzeichnis exportieren!"
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Bitte ausserhalb des Projekt Verzeichnis exportieren!"
-
-#: editor/project_manager.cpp
-msgid "This directory already contains a Godot project."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "New Game Project"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Imported Project"
-msgstr "Importierte Projekte"
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Invalid Project Name."
-msgstr "Projektname:"
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Couldn't create folder."
-msgstr "Node erstellen"
-
-#: editor/project_manager.cpp
-msgid "There is already a folder in this path with the specified name."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "It would be a good idea to name your project."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Invalid project path (changed anything?)."
-msgstr "Ungültiger Projektpfad, (wurde was geändert?)!"
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
-msgstr "Die engine.cfg kann im Projektverzeichnis nicht erstellt werden."
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Couldn't edit project.godot in project path."
-msgstr "Die engine.cfg kann im Projektverzeichnis nicht erstellt werden."
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Couldn't create project.godot in project path."
-msgstr "Die engine.cfg kann im Projektverzeichnis nicht erstellt werden."
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Rename Project"
-msgstr "Neues Projekt erstellen"
-
-#: editor/project_manager.cpp
-msgid "Import Existing Project"
-msgstr "Existierendes Projekt importieren"
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Import & Edit"
-msgstr "Importiere von folgendem Node:"
-
-#: editor/project_manager.cpp
-msgid "Create New Project"
-msgstr "Neues Projekt erstellen"
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Create & Edit"
-msgstr "Node erstellen"
-
-#: editor/project_manager.cpp
-msgid "Install Project:"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Install & Edit"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Project Name:"
-msgstr "Projektname:"
-
-#: editor/project_manager.cpp
-msgid "Project Path:"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Project Installation Path:"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Renderer:"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "OpenGL ES 3.0"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Higher visual quality\n"
-"All features available\n"
-"Incompatible with older hardware\n"
-"Not recommended for web games"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "OpenGL ES 2.0"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Lower visual quality\n"
-"Some features not available\n"
-"Works on most hardware\n"
-"Recommended for web games"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Renderer can be changed later, but scenes may need to be adjusted."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Unnamed Project"
-msgstr ""
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Missing Project"
-msgstr "Existierendes Projekt importieren"
-
-#: editor/project_manager.cpp
-msgid "Error: Project is missing on the filesystem."
-msgstr ""
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Can't open project at '%s'."
-msgstr "Neues Projekt erstellen"
-
-#: editor/project_manager.cpp
-msgid "Are you sure to open more than one project?"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"The following project settings file does not specify the version of Godot "
-"through which it was created.\n"
-"\n"
-"%s\n"
-"\n"
-"If you proceed with opening it, it will be converted to Godot's current "
-"configuration file format.\n"
-"Warning: You won't be able to open the project with previous versions of the "
-"engine anymore."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"The following project settings file was generated by an older engine "
-"version, and needs to be converted for this version:\n"
-"\n"
-"%s\n"
-"\n"
-"Do you want to convert it?\n"
-"Warning: You won't be able to open the project with previous versions of the "
-"engine anymore."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"The project settings were created by a newer engine version, whose settings "
-"are not compatible with this version."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Can't run project: no main scene defined.\n"
-"Please edit the project and set the main scene in the Project Settings under "
-"the \"Application\" category."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Can't run project: Assets need to be imported.\n"
-"Please edit the project to trigger the initial import."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Are you sure to run %d projects at once?"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Remove %d projects from the list?\n"
-"The project folders' contents won't be modified."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Remove this project from the list?\n"
-"The project folder's contents won't be modified."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Remove all missing projects from the list?\n"
-"The project folders' contents won't be modified."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Language changed.\n"
-"The interface will update after restarting the editor or project manager."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"Are you sure to scan %s folders for existing Godot projects?\n"
-"This could take a while."
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Projects"
-msgstr "Projektname:"
-
-#: editor/project_manager.cpp
-msgid "Last Modified"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Scan"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Select a Folder to Scan"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "New Project"
-msgstr ""
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Remove Missing"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Templates"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/project_manager.cpp
-msgid "Restart Now"
-msgstr ""
-
-#: editor/project_manager.cpp
-#, fuzzy
-msgid "Can't run project"
-msgstr "Neues Projekt erstellen"
-
-#: editor/project_manager.cpp
-msgid ""
-"You currently don't have any projects.\n"
-"Would you like to explore official example projects in the Asset Library?"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid ""
-"The search box filters projects by name and last path component.\n"
-"To filter projects by name and full path, the query must contain at least "
-"one `/` character."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Key "
-msgstr "Taste "
-
-#: editor/project_settings_editor.cpp
-msgid "Joy Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Joy Axis"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Mouse Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid ""
-"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
-"'\"'"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "An action with the name '%s' already exists."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Rename Input Action Event"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-#, fuzzy
-msgid "Change Action deadzone"
-msgstr "Typ ändern"
-
-#: editor/project_settings_editor.cpp
-msgid "Add Input Action Event"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "All Devices"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Device"
-msgstr ""
-
-#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
-msgid "Press a Key..."
-msgstr "Taste drücken..."
-
-#: editor/project_settings_editor.cpp
-msgid "Mouse Button Index:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Left Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Right Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Middle Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Wheel Up Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Wheel Down Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Wheel Left Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Wheel Right Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "X Button 1"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "X Button 2"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Joypad Axis Index:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Axis"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Joypad Button Index:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Erase Input Action"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Erase Input Action Event"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Add Event"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Button"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Left Button."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Right Button."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Middle Button."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Wheel Up."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Wheel Down."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Add Global Property"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Select a setting item first!"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "No property '%s' exists."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Setting '%s' is internal, and it can't be deleted."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-#, fuzzy
-msgid "Delete Item"
-msgstr "Node(s) löschen"
-
-#: editor/project_settings_editor.cpp
-msgid ""
-"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
-"'\"'."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Add Input Action"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Error saving settings."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Settings saved OK."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Moved Input Action Event"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Override for Feature"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Add Translation"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Remove Translation"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Add Remapped Path"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Resource Remap Add Remap"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Change Resource Remap Language"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Remove Resource Remap"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Remove Resource Remap Option"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-#, fuzzy
-msgid "Changed Locale Filter"
-msgstr "Typ ändern"
-
-#: editor/project_settings_editor.cpp
-msgid "Changed Locale Filter Mode"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-#, fuzzy
-msgid "Project Settings (project.godot)"
-msgstr "Projekteinstellungen"
-
-#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
-msgid "General"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Override For..."
-msgstr ""
-
-#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
-msgid "The editor must be restarted for changes to take effect."
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Input Map"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Action:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-#, fuzzy
-msgid "Action"
-msgstr "Script hinzufügen"
-
-#: editor/project_settings_editor.cpp
-msgid "Deadzone"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Device:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Index:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Localization"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Translations"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Translations:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Remaps"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Resources:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Remaps by Locale:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Locale"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Locales Filter"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Show All Locales"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Show Selected Locales Only"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-#, fuzzy
-msgid "Filter mode:"
-msgstr "Node erstellen"
-
-#: editor/project_settings_editor.cpp
-msgid "Locales:"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "AutoLoad"
-msgstr ""
-
-#: editor/project_settings_editor.cpp
-msgid "Plugins"
-msgstr ""
-
-#: editor/property_editor.cpp
-msgid "Preset..."
-msgstr ""
-
-#: editor/property_editor.cpp
-msgid "Zero"
-msgstr ""
-
-#: editor/property_editor.cpp
-msgid "Easing In-Out"
-msgstr ""
-
-#: editor/property_editor.cpp
-msgid "Easing Out-In"
-msgstr ""
-
-#: editor/property_editor.cpp
-msgid "File..."
-msgstr ""
-
-#: editor/property_editor.cpp
-msgid "Dir..."
-msgstr ""
-
-#: editor/property_editor.cpp
-msgid "Assign"
-msgstr ""
-
-#: editor/property_editor.cpp
-#, fuzzy
-msgid "Select Node"
-msgstr "Node(s) löschen"
-
-#: editor/property_editor.cpp
-msgid "Error loading file: Not a resource!"
-msgstr ""
-
-#: editor/property_editor.cpp
-#, fuzzy
-msgid "Pick a Node"
-msgstr "TimeScale-Node"
-
-#: editor/property_editor.cpp
-msgid "Bit %d, val %d."
-msgstr ""
-
-#: editor/property_selector.cpp
-msgid "Select Property"
-msgstr ""
-
-#: editor/property_selector.cpp
-msgid "Select Virtual Method"
-msgstr ""
-
-#: editor/property_selector.cpp
-msgid "Select Method"
-msgstr ""
-
-#: editor/rename_dialog.cpp editor/scene_tree_dock.cpp
-msgid "Batch Rename"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Prefix"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Suffix"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-#, fuzzy
-msgid "Use Regular Expressions"
-msgstr "Typ ändern"
-
-#: editor/rename_dialog.cpp
-msgid "Advanced Options"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Substitute"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-#, fuzzy
-msgid "Node name"
-msgstr "Node"
-
-#: editor/rename_dialog.cpp
-msgid "Node's parent name, if available"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-#, fuzzy
-msgid "Node type"
-msgstr "Node"
-
-#: editor/rename_dialog.cpp
-msgid "Current scene name"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Root node name"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid ""
-"Sequential integer counter.\n"
-"Compare counter options."
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Per-level Counter"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "If set the counter restarts for each group of child nodes"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Initial value for the counter"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Step"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Amount by which counter is incremented for each node"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Padding"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid ""
-"Minimum number of digits for the counter.\n"
-"Missing digits are padded with leading zeros."
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Post-Process"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Keep"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "PascalCase to snake_case"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "snake_case to PascalCase"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Case"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-#, fuzzy
-msgid "To Lowercase"
-msgstr "Verbindung zu Node:"
-
-#: editor/rename_dialog.cpp
-msgid "To Uppercase"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-msgid "Reset"
-msgstr ""
-
-#: editor/rename_dialog.cpp
-#, fuzzy
-msgid "Regular Expression Error"
-msgstr "Typ ändern"
-
-#: editor/rename_dialog.cpp
-msgid "At character %s"
-msgstr ""
-
-#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
-msgid "Reparent Node"
-msgstr ""
-
-#: editor/reparent_dialog.cpp
-msgid "Reparent Location (Select new Parent):"
-msgstr ""
-
-#: editor/reparent_dialog.cpp
-msgid "Keep Global Transform"
-msgstr ""
-
-#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
-msgid "Reparent"
-msgstr ""
-
-#: editor/run_settings_dialog.cpp
-msgid "Run Mode:"
-msgstr ""
-
-#: editor/run_settings_dialog.cpp
-msgid "Current Scene"
-msgstr ""
-
-#: editor/run_settings_dialog.cpp
-msgid "Main Scene"
-msgstr ""
-
-#: editor/run_settings_dialog.cpp
-msgid "Main Scene Arguments:"
-msgstr ""
-
-#: editor/run_settings_dialog.cpp
-msgid "Scene Run Settings"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "No parent to instance the scenes at."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Error loading scene from %s"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid ""
-"Cannot instance the scene '%s' because the current scene exists within one "
-"of its nodes."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Instance Scene(s)"
-msgstr "Instanziere Szene(n)"
-
-#: editor/scene_tree_dock.cpp
-msgid "Replace with Branch Scene"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Instance Child Scene"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Clear Script"
-msgstr "Script hinzufügen"
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "This operation can't be done on the tree root."
-msgstr "Das funktioniert nicht beim obersten Node. (tree root)"
-
-#: editor/scene_tree_dock.cpp
-msgid "Move Node In Parent"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Move Nodes In Parent"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Duplicate Node(s)"
-msgstr "Node(s) duplizieren"
-
-#: editor/scene_tree_dock.cpp
-msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Node must belong to the edited scene to become root."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Instantiated scenes can't become root"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Make node as Root"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Delete %d nodes?"
-msgstr "Node(s) löschen"
-
-#: editor/scene_tree_dock.cpp
-msgid "Delete the root node \"%s\"?"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Delete node \"%s\" and its children?"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Delete node \"%s\"?"
-msgstr "Node(s) löschen"
-
-#: editor/scene_tree_dock.cpp
-msgid "Can not perform with the root node."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done on instanced scenes."
-msgstr "Das funktioniert nicht bei einer instanzierten Szene."
-
-#: editor/scene_tree_dock.cpp
-msgid "Save New Scene As..."
-msgstr "Neue Szene speichern als..."
-
-#: editor/scene_tree_dock.cpp
-msgid ""
-"Disabling \"editable_instance\" will cause all properties of the node to be "
-"reverted to their default."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid ""
-"Enabling \"Load As Placeholder\" will disable \"Editable Children\" and "
-"cause all properties of the node to be reverted to their default."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Make Local"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "New Scene Root"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Create Root Node:"
-msgstr "Node erstellen"
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "2D Scene"
-msgstr "Szene starten"
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "3D Scene"
-msgstr "Szene starten"
-
-#: editor/scene_tree_dock.cpp
-msgid "User Interface"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Other Node"
-msgstr "Node(s) löschen"
-
-#: editor/scene_tree_dock.cpp
-msgid "Can't operate on nodes from a foreign scene!"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Can't operate on nodes the current scene inherits from!"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Attach Script"
-msgstr "Script hinzufügen"
-
-#: editor/scene_tree_dock.cpp
-msgid "Remove Node(s)"
-msgstr "Node(s) entfernen"
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Change type of node(s)"
-msgstr "Typ ändern"
-
-#: editor/scene_tree_dock.cpp
-msgid ""
-"Couldn't save new scene. Likely dependencies (instances) couldn't be "
-"satisfied."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Error saving scene."
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/scene_tree_dock.cpp
-msgid "Error duplicating scene to save it."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Sub-Resources"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Open Documentation"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Add Child Node"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Expand/Collapse All"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Change Type"
-msgstr "Typ ändern"
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Reparent to New Node"
-msgstr "Node erstellen"
-
-#: editor/scene_tree_dock.cpp
-msgid "Make Scene Root"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Merge From Scene"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
-msgid "Save Branch as Scene"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
-msgid "Copy Node Path"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Delete (No Confirm)"
-msgstr "Bitte bestätigen..."
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Add/Create a New Node."
-msgstr "Node erstellen"
-
-#: editor/scene_tree_dock.cpp
-msgid ""
-"Instance a scene file as a Node. Creates an inherited scene if no root node "
-"exists."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-#, fuzzy
-msgid "Remote"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/scene_tree_dock.cpp
-msgid "Local"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Toggle Visible"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Unlock Node"
-msgstr "Node(s) löschen"
-
-#: editor/scene_tree_editor.cpp
-msgid "Button Group"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "(Connecting From)"
-msgstr "Connections editieren"
-
-#: editor/scene_tree_editor.cpp
-msgid "Node configuration warning:"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid ""
-"Node has %s connection(s) and %s group(s).\n"
-"Click to show signals dock."
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid ""
-"Node has %s connection(s).\n"
-"Click to show signals dock."
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid ""
-"Node is in %s group(s).\n"
-"Click to show groups dock."
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Open Script:"
-msgstr "Script hinzufügen"
-
-#: editor/scene_tree_editor.cpp
-msgid ""
-"Node is locked.\n"
-"Click to unlock it."
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid ""
-"Children are not selectable.\n"
-"Click to make selectable."
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Toggle Visibility"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid ""
-"AnimationPlayer is pinned.\n"
-"Click to unpin."
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Invalid node name, the following characters are not allowed:"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Rename Node"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Scene Tree (Nodes):"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Node Configuration Warning!"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Path is empty."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Filename is empty."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Path is not local."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid base path."
-msgstr "Projektname:"
-
-#: editor/script_create_dialog.cpp
-msgid "A directory with the same name exists."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid extension."
-msgstr "Projektname:"
-
-#: editor/script_create_dialog.cpp
-msgid "Wrong extension chosen."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Error loading template '%s'"
-msgstr "Fehler beim Instanzieren der %s Szene"
-
-#: editor/script_create_dialog.cpp
-msgid "Error - Could not create script in filesystem."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Error loading script from %s"
-msgstr "Fehler beim Instanzieren der %s Szene"
-
-#: editor/script_create_dialog.cpp
-msgid "Overrides"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Open Script / Choose Location"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Open Script"
-msgstr "Script hinzufügen"
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "File exists, it will be reused."
-msgstr "Datei existiert, Überschreiben?"
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid class name."
-msgstr "Projektname:"
-
-#: editor/script_create_dialog.cpp
-msgid "Invalid inherited parent name or path."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Script path/name is valid."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Allowed: a-z, A-Z, 0-9, _ and ."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Built-in script (into scene file)."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Will create a new script file."
-msgstr "Neues Projekt erstellen"
-
-#: editor/script_create_dialog.cpp
-msgid "Will load an existing script file."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Script file already exists."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid ""
-"Note: Built-in scripts have some limitations and can't be edited using an "
-"external editor."
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "Class Name:"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Template:"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Built-in Script:"
-msgstr "Script hinzufügen"
-
-#: editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Attach Node Script"
-msgstr "Script hinzufügen"
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "Remote "
-msgstr "Ungültige Bilder löschen"
-
-#: editor/script_editor_debugger.cpp
-msgid "Bytes:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Warning:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "Error:"
-msgstr "Szene kann nicht gespeichert werden."
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "C++ Error"
-msgstr "Connections editieren"
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "C++ Error:"
-msgstr "Connections editieren"
-
-#: editor/script_editor_debugger.cpp
-msgid "C++ Source"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Source:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "C++ Source:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Stack Trace"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Errors"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "Child process connected."
-msgstr "Verbindung zu Node:"
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "Copy Error"
-msgstr "Connections editieren"
-
-#: editor/script_editor_debugger.cpp
-msgid "Video RAM"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "Skip Breakpoints"
-msgstr "Bild einfügen"
-
-#: editor/script_editor_debugger.cpp
-msgid "Inspect Previous Instance"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Inspect Next Instance"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Stack Frames"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Profiler"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "Network Profiler"
-msgstr "Projekt exportieren"
-
-#: editor/script_editor_debugger.cpp
-msgid "Monitor"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Value"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Monitors"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Pick one or more items from the list to display the graph."
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "List of Video Memory Usage by Resource:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Total:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-#, fuzzy
-msgid "Export list to a CSV file"
-msgstr "Projekt exportieren"
-
-#: editor/script_editor_debugger.cpp
-msgid "Resource Path"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Type"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Format"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Usage"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Misc"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Clicked Control:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Clicked Control Type:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Live Edit Root:"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Set From Tree"
-msgstr ""
-
-#: editor/script_editor_debugger.cpp
-msgid "Export measures as CSV"
-msgstr ""
-
-#: editor/settings_config_dialog.cpp
-msgid "Erase Shortcut"
-msgstr ""
-
-#: editor/settings_config_dialog.cpp
-msgid "Restore Shortcut"
-msgstr ""
-
-#: editor/settings_config_dialog.cpp
-msgid "Change Shortcut"
-msgstr ""
-
-#: editor/settings_config_dialog.cpp
-msgid "Editor Settings"
-msgstr ""
-
-#: editor/settings_config_dialog.cpp
-msgid "Shortcuts"
-msgstr ""
-
-#: editor/settings_config_dialog.cpp
-msgid "Binding"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Light Radius"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change AudioStreamPlayer3D Emission Angle"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Camera FOV"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Camera Size"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Notifier AABB"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Particles AABB"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Probe Extents"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
-msgid "Change Sphere Shape Radius"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
-msgid "Change Box Shape Extents"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Capsule Shape Radius"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Capsule Shape Height"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Cylinder Shape Radius"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Cylinder Shape Height"
-msgstr ""
-
-#: editor/spatial_editor_gizmos.cpp
-msgid "Change Ray Shape Length"
-msgstr ""
-
-#: modules/csg/csg_gizmos.cpp
-msgid "Change Cylinder Radius"
-msgstr ""
-
-#: modules/csg/csg_gizmos.cpp
-msgid "Change Cylinder Height"
-msgstr ""
-
-#: modules/csg/csg_gizmos.cpp
-msgid "Change Torus Inner Radius"
-msgstr ""
-
-#: modules/csg/csg_gizmos.cpp
-msgid "Change Torus Outer Radius"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Select the dynamic library for this entry"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Select dependencies of the library for this entry"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
-msgid "Remove current entry"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Double click to create a new entry"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Platform:"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Platform"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Dynamic Library"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "Add an architecture entry"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_editor_plugin.cpp
-msgid "GDNativeLibrary"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_singleton_editor.cpp
-msgid "Enabled GDNative Singleton"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_singleton_editor.cpp
-msgid "Disabled GDNative Singleton"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_singleton_editor.cpp
-msgid "Library"
-msgstr ""
-
-#: modules/gdnative/gdnative_library_singleton_editor.cpp
-msgid "Libraries: "
-msgstr ""
-
-#: modules/gdnative/register_types.cpp
-msgid "GDNative"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Step argument is zero!"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Not a script with an instance"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Not based on a script"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Not based on a resource file"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Invalid instance dictionary format (missing @path)"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Invalid instance dictionary format (can't load script at @path)"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Invalid instance dictionary format (invalid script at @path)"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Invalid instance dictionary (invalid subclasses)"
-msgstr ""
-
-#: modules/gdscript/gdscript_functions.cpp
-msgid "Object can't provide a length."
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Next Plane"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Previous Plane"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Plane:"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Next Floor"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Previous Floor"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Floor:"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "GridMap Delete Selection"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "GridMap Fill Selection"
-msgstr "Projekteinstellungen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "GridMap Paste Selection"
-msgstr "Projekteinstellungen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "GridMap Paint"
-msgstr "Projekteinstellungen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Grid Map"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Snap View"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Clip Disabled"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Clip Above"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Clip Below"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Edit X Axis"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Edit Y Axis"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Edit Z Axis"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Cursor Rotate X"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Cursor Rotate Y"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Cursor Rotate Z"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Cursor Back Rotate X"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Cursor Back Rotate Y"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Cursor Back Rotate Z"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Cursor Clear Rotation"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "Paste Selects"
-msgstr "Projekteinstellungen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "Clear Selection"
-msgstr "Script hinzufügen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "Fill Selection"
-msgstr "Script hinzufügen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "GridMap Settings"
-msgstr "Projekteinstellungen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Pick Distance:"
-msgstr ""
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
-msgid "Filter meshes"
-msgstr "Node erstellen"
-
-#: modules/gridmap/grid_map_editor_plugin.cpp
-msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
-msgstr ""
-
-#: modules/mono/csharp_script.cpp
-msgid "Class name can't be a reserved keyword"
-msgstr ""
-
-#: modules/mono/mono_gd/gd_mono_utils.cpp
-msgid "End of inner exception stack trace"
-msgstr ""
-
-#: modules/recast/navigation_mesh_editor_plugin.cpp
-msgid "Bake NavMesh"
-msgstr ""
-
-#: modules/recast/navigation_mesh_editor_plugin.cpp
-msgid "Clear the navigation mesh."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Setting up Configuration..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Calculating grid size..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Creating heightfield..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Marking walkable triangles..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Constructing compact heightfield..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Eroding walkable area..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Partitioning..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Creating contours..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Creating polymesh..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Converting to native navigation mesh..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Navigation Mesh Generator Setup:"
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Parsing Geometry..."
-msgstr ""
-
-#: modules/recast/navigation_mesh_generator.cpp
-msgid "Done!"
-msgstr ""
-
-#: modules/visual_script/visual_script.cpp
-msgid ""
-"A node yielded without working memory, please read the docs on how to yield "
-"properly!"
-msgstr ""
-
-#: modules/visual_script/visual_script.cpp
-msgid ""
-"Node yielded, but did not return a function state in the first working "
-"memory."
-msgstr ""
-
-#: modules/visual_script/visual_script.cpp
-msgid ""
-"Return value must be assigned to first element of node working memory! Fix "
-"your node please."
-msgstr ""
-
-#: modules/visual_script/visual_script.cpp
-msgid "Node returned an invalid sequence output: "
-msgstr ""
-
-#: modules/visual_script/visual_script.cpp
-msgid "Found sequence bit but not the node in the stack, report bug!"
-msgstr ""
-
-#: modules/visual_script/visual_script.cpp
-msgid "Stack overflow with stack depth: "
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Signal Arguments"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Change Argument Type"
-msgstr "Typ ändern"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Argument name"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Set Variable Default Value"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Set Variable Type"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Input Port"
-msgstr "Script hinzufügen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Output Port"
-msgstr "Script hinzufügen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Override an existing built-in function."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Create a new function."
-msgstr "Node erstellen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Variables:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Create a new variable."
-msgstr "Node erstellen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Signals:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Create a new signal."
-msgstr "Node erstellen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Name is not a valid identifier:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Name already in use by another func/var/signal:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Function"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Variable"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Signal"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Function"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Delete input port"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Variable"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Signal"
-msgstr "Script hinzufügen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Input Port"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Output Port"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Change Expression"
-msgstr "Typ ändern"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove VisualScript Nodes"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Duplicate VisualScript Nodes"
-msgstr "Node(s) duplizieren"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Hold %s to drop a simple reference to the node."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Hold Ctrl to drop a simple reference to the node."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Hold %s to drop a Variable Setter."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Hold Ctrl to drop a Variable Setter."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Preload Node"
-msgstr "Node"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Node(s) From Tree"
-msgstr "Node von Szene"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid ""
-"Can't drop properties because script '%s' is not used in this scene.\n"
-"Drop holding 'Shift' to just copy the signature."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Getter Property"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Setter Property"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Change Base Type"
-msgstr "Typ ändern"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Move Node(s)"
-msgstr "Node(s) entfernen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove VisualScript Node"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Connect Nodes"
-msgstr "Verbindung zu Node:"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Disconnect Nodes"
-msgstr "Verbindung zu Node:"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Connect Node Data"
-msgstr "Verbindung zu Node:"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Connect Node Sequence"
-msgstr "Verbindung zu Node:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Script already has function '%s'"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Change Input Value"
-msgstr "Typ ändern"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Resize Comment"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Can't copy the function node."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Clipboard is empty!"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Paste VisualScript Nodes"
-msgstr "Node erstellen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Can't create function with a function node."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Can't create function of nodes from nodes of multiple functions."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Select at least one node with sequence port."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Try to only have one sequence input in selection."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Create Function"
-msgstr "Node erstellen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Variable"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Signal"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Make Tool:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Members:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Change Base Type:"
-msgstr "Typ ändern"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Nodes..."
-msgstr "Node"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Function..."
-msgstr "Node erstellen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "function_name"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Select or create a function to edit its graph."
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Delete Selected"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Find Node Type"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Copy Nodes"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Cut Nodes"
-msgstr "Node erstellen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Make Function"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Refresh Graph"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Edit Member"
-msgstr "Node Filter editieren"
-
-#: modules/visual_script/visual_script_flow_control.cpp
-msgid "Input type not iterable: "
-msgstr ""
-
-#: modules/visual_script/visual_script_flow_control.cpp
-msgid "Iterator became invalid"
-msgstr ""
-
-#: modules/visual_script/visual_script_flow_control.cpp
-msgid "Iterator became invalid: "
-msgstr ""
-
-#: modules/visual_script/visual_script_func_nodes.cpp
-msgid "Invalid index property name."
-msgstr ""
-
-#: modules/visual_script/visual_script_func_nodes.cpp
-msgid "Base object is not a Node!"
-msgstr ""
-
-#: modules/visual_script/visual_script_func_nodes.cpp
-msgid "Path does not lead Node!"
-msgstr ""
-
-#: modules/visual_script/visual_script_func_nodes.cpp
-msgid "Invalid index property name '%s' in node %s."
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid ": Invalid argument of type: "
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid ": Invalid arguments: "
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "VariableGet not found in script: "
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "VariableSet not found in script: "
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "Custom node has no _step() method, can't process graph."
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid ""
-"Invalid return value from _step(), must be integer (seq out), or string "
-"(error)."
-msgstr ""
-
-#: modules/visual_script/visual_script_property_selector.cpp
-#, fuzzy
-msgid "Search VisualScript"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_property_selector.cpp
-msgid "Get %s"
-msgstr ""
-
-#: modules/visual_script/visual_script_property_selector.cpp
-msgid "Set %s"
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Package name is missing."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Package segments must be of non-zero length."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "The character '%s' is not allowed in Android application package names."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "A digit cannot be the first character in a package segment."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "The character '%s' cannot be the first character in a package segment."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "The package must have at least one '.' separator."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Select device from the list"
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "ADB executable not configured in the Editor Settings."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "OpenJDK jarsigner not configured in the Editor Settings."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Debug keystore not configured in the Editor Settings nor in the preset."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Custom build requires a valid Android SDK path in Editor Settings."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Invalid Android SDK path for custom build in Editor Settings."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid ""
-"Android build template not installed in the project. Install it from the "
-"Project menu."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Invalid public key for APK expansion."
-msgstr ""
-
-#: platform/android/export/export.cpp
-#, fuzzy
-msgid "Invalid package name:"
-msgstr "Projektname:"
-
-#: platform/android/export/export.cpp
-msgid ""
-"Trying to build from a custom built template, but no version info for it "
-"exists. Please reinstall from the 'Project' menu."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid ""
-"Android build version mismatch:\n"
-" Template installed: %s\n"
-" Godot Version: %s\n"
-"Please reinstall Android build template from 'Project' menu."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "Building Android Project (gradle)"
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid ""
-"Building of Android project failed, check output for the error.\n"
-"Alternatively visit docs.godotengine.org for Android build documentation."
-msgstr ""
-
-#: platform/android/export/export.cpp
-msgid "No build apk generated at: "
-msgstr ""
-
-#: platform/iphone/export/export.cpp
-msgid "Identifier is missing."
-msgstr ""
-
-#: platform/iphone/export/export.cpp
-msgid "The character '%s' is not allowed in Identifier."
-msgstr ""
-
-#: platform/iphone/export/export.cpp
-msgid "App Store Team ID not specified - cannot configure the project."
-msgstr ""
-
-#: platform/iphone/export/export.cpp
-msgid "Invalid Identifier:"
-msgstr ""
-
-#: platform/iphone/export/export.cpp
-msgid "Required icon is not specified in the preset."
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-msgid "Stop HTTP Server"
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-msgid "Run in Browser"
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-msgid "Run exported HTML in the system's default browser."
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-#, fuzzy
-msgid "Could not write file:"
-msgstr "Neues Projekt erstellen"
-
-#: platform/javascript/export/export.cpp
-msgid "Could not open template for export:"
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-msgid "Invalid export template:"
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-msgid "Could not read custom HTML shell:"
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-msgid "Could not read boot splash image file:"
-msgstr ""
-
-#: platform/javascript/export/export.cpp
-msgid "Using default boot splash image."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid package short name."
-msgstr "Projektname:"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid package unique name."
-msgstr "Projektname:"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid package publisher display name."
-msgstr "Projektname:"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "Projektname:"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid background color."
-msgstr "Projektname:"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
-#: scene/2d/animated_sprite.cpp
-#, fuzzy
-msgid ""
-"A SpriteFrames resource must be created or set in the \"Frames\" property in "
-"order for AnimatedSprite to display frames."
-msgstr ""
-"Damit AnimatedSprite Frames anzeigen kann, muss eine SpriteFrame Resource "
-"unter der 'Frames' Property erstellt oder gesetzt sein."
-
-#: scene/2d/canvas_modulate.cpp
-msgid ""
-"Only one visible CanvasModulate is allowed per scene (or set of instanced "
-"scenes). The first created one will work, while the rest will be ignored."
-msgstr ""
-"Nur ein sichtbares CanvasModulate ist pro Szene (oder ein Satz von "
-"instanzierten Szenen) erlaubt. Das erste erstellte gewinnt der Rest wird "
-"ignoriert."
-
-#: scene/2d/collision_object_2d.cpp
-msgid ""
-"This node has no shape, so it can't collide or interact with other objects.\n"
-"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
-"define its shape."
-msgstr ""
-
-#: scene/2d/collision_polygon_2d.cpp
-msgid ""
-"CollisionPolygon2D only serves to provide a collision shape to a "
-"CollisionObject2D derived node. Please only use it as a child of Area2D, "
-"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
-msgstr ""
-
-#: scene/2d/collision_polygon_2d.cpp
-msgid "An empty CollisionPolygon2D has no effect on collision."
-msgstr "Ein leeres CollisionPolygon2D hat keinen Einfluss au die Kollision."
-
-#: scene/2d/collision_shape_2d.cpp
-msgid ""
-"CollisionShape2D only serves to provide a collision shape to a "
-"CollisionObject2D derived node. Please only use it as a child of Area2D, "
-"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
-msgstr ""
-
-#: scene/2d/collision_shape_2d.cpp
-msgid ""
-"A shape must be provided for CollisionShape2D to function. Please create a "
-"shape resource for it!"
-msgstr ""
-
-#: scene/2d/cpu_particles_2d.cpp
-msgid ""
-"CPUParticles2D animation requires the usage of a CanvasItemMaterial with "
-"\"Particles Animation\" enabled."
-msgstr ""
-
-#: scene/2d/light_2d.cpp
-msgid ""
-"A texture with the shape of the light must be supplied to the \"Texture\" "
-"property."
-msgstr ""
-
-#: scene/2d/light_occluder_2d.cpp
-msgid ""
-"An occluder polygon must be set (or drawn) for this occluder to take effect."
-msgstr ""
-"Ein Okkluder Polygon muss gesetzt oder gezeichnet werden, damit dieser "
-"Okkluder funktioniert."
-
-#: scene/2d/light_occluder_2d.cpp
-#, fuzzy
-msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
-msgstr ""
-"Das Okkluder Polygon für diesen Okkluder ist leer. Bitte zeichne ein Polygon!"
-
-#: scene/2d/navigation_polygon.cpp
-#, fuzzy
-msgid ""
-"A NavigationPolygon resource must be set or created for this node to work. "
-"Please set a property or draw a polygon."
-msgstr ""
-"Eine NavigationPolygon Ressource muss für diesen Node gesetzt oder erstellt "
-"werden, damit er funktioniert. Bitte setze eine Variable oder zeichne ein "
-"Polygon."
-
-#: scene/2d/navigation_polygon.cpp
-msgid ""
-"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
-"node. It only provides navigation data."
-msgstr ""
-"NavigationPolygonInstance muss ein Kind oder Grosskind vom Navigation2D Node "
-"sein. Es liefert nur Navigationsdaten."
-
-#: scene/2d/parallax_layer.cpp
-msgid ""
-"ParallaxLayer node only works when set as child of a ParallaxBackground node."
-msgstr ""
-
-#: scene/2d/particles_2d.cpp
-msgid ""
-"GPU-based particles are not supported by the GLES2 video driver.\n"
-"Use the CPUParticles2D node instead. You can use the \"Convert to "
-"CPUParticles\" option for this purpose."
-msgstr ""
-
-#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
-msgid ""
-"A material to process the particles is not assigned, so no behavior is "
-"imprinted."
-msgstr ""
-
-#: scene/2d/particles_2d.cpp
-msgid ""
-"Particles2D animation requires the usage of a CanvasItemMaterial with "
-"\"Particles Animation\" enabled."
-msgstr ""
-
-#: scene/2d/path_2d.cpp
-msgid "PathFollow2D only works when set as a child of a Path2D node."
-msgstr ""
-"PathFollow2D funktioniert nur, wenn sie als Unterobjekt eines Path2D Nodes "
-"gesetzt wird."
-
-#: scene/2d/physics_body_2d.cpp
-msgid ""
-"Size changes to RigidBody2D (in character or rigid modes) will be overridden "
-"by the physics engine when running.\n"
-"Change the size in children collision shapes instead."
-msgstr ""
-
-#: scene/2d/remote_transform_2d.cpp
-msgid "Path property must point to a valid Node2D node to work."
-msgstr ""
-"Die Pfad-Variable muss auf einen gültigen Node2D Node zeigen um zu "
-"funktionieren."
-
-#: scene/2d/skeleton_2d.cpp
-msgid "This Bone2D chain should end at a Skeleton2D node."
-msgstr ""
-
-#: scene/2d/skeleton_2d.cpp
-msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node."
-msgstr ""
-
-#: scene/2d/skeleton_2d.cpp
-msgid ""
-"This bone lacks a proper REST pose. Go to the Skeleton2D node and set one."
-msgstr ""
-
-#: scene/2d/tile_map.cpp
-msgid ""
-"TileMap with Use Parent on needs a parent CollisionObject2D to give shapes "
-"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
-"KinematicBody2D, etc. to give them a shape."
-msgstr ""
-
-#: scene/2d/visibility_notifier_2d.cpp
-#, fuzzy
-msgid ""
-"VisibilityEnabler2D works best when used with the edited scene root directly "
-"as parent."
-msgstr ""
-"VisibilityEnable2D funktioniert am besten, wenn es ein Unterobjekt erster "
-"Ordnung der bearbeiteten Hauptszene ist."
-
-#: scene/3d/arvr_nodes.cpp
-msgid "ARVRCamera must have an ARVROrigin node as its parent."
-msgstr ""
-
-#: scene/3d/arvr_nodes.cpp
-msgid "ARVRController must have an ARVROrigin node as its parent."
-msgstr ""
-
-#: scene/3d/arvr_nodes.cpp
-msgid ""
-"The controller ID must not be 0 or this controller won't be bound to an "
-"actual controller."
-msgstr ""
-
-#: scene/3d/arvr_nodes.cpp
-msgid "ARVRAnchor must have an ARVROrigin node as its parent."
-msgstr ""
-
-#: scene/3d/arvr_nodes.cpp
-msgid ""
-"The anchor ID must not be 0 or this anchor won't be bound to an actual "
-"anchor."
-msgstr ""
-
-#: scene/3d/arvr_nodes.cpp
-msgid "ARVROrigin requires an ARVRCamera child node."
-msgstr ""
-
-#: scene/3d/baked_lightmap.cpp
-msgid "%d%%"
-msgstr ""
-
-#: scene/3d/baked_lightmap.cpp
-msgid "(Time Left: %d:%02d s)"
-msgstr ""
-
-#: scene/3d/baked_lightmap.cpp
-msgid "Plotting Meshes: "
-msgstr ""
-
-#: scene/3d/baked_lightmap.cpp
-msgid "Plotting Lights:"
-msgstr ""
-
-#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
-msgid "Finishing Plot"
-msgstr ""
-
-#: scene/3d/baked_lightmap.cpp
-msgid "Lighting Meshes: "
-msgstr ""
-
-#: scene/3d/collision_object.cpp
-msgid ""
-"This node has no shape, so it can't collide or interact with other objects.\n"
-"Consider adding a CollisionShape or CollisionPolygon as a child to define "
-"its shape."
-msgstr ""
-
-#: scene/3d/collision_polygon.cpp
-msgid ""
-"CollisionPolygon only serves to provide a collision shape to a "
-"CollisionObject derived node. Please only use it as a child of Area, "
-"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
-msgstr ""
-
-#: scene/3d/collision_polygon.cpp
-msgid "An empty CollisionPolygon has no effect on collision."
-msgstr ""
-
-#: scene/3d/collision_shape.cpp
-msgid ""
-"CollisionShape only serves to provide a collision shape to a CollisionObject "
-"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
-"KinematicBody, etc. to give them a shape."
-msgstr ""
-
-#: scene/3d/collision_shape.cpp
-msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it."
-msgstr ""
-
-#: scene/3d/collision_shape.cpp
-msgid ""
-"Plane shapes don't work well and will be removed in future versions. Please "
-"don't use them."
-msgstr ""
-
-#: scene/3d/collision_shape.cpp
-msgid ""
-"ConcavePolygonShape doesn't support RigidBody in another mode than static."
-msgstr ""
-
-#: scene/3d/cpu_particles.cpp
-msgid "Nothing is visible because no mesh has been assigned."
-msgstr ""
-
-#: scene/3d/cpu_particles.cpp
-msgid ""
-"CPUParticles animation requires the usage of a SpatialMaterial whose "
-"Billboard Mode is set to \"Particle Billboard\"."
-msgstr ""
-
-#: scene/3d/gi_probe.cpp
-msgid "Plotting Meshes"
-msgstr ""
-
-#: scene/3d/gi_probe.cpp
-msgid ""
-"GIProbes are not supported by the GLES2 video driver.\n"
-"Use a BakedLightmap instead."
-msgstr ""
-
-#: scene/3d/light.cpp
-msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
-msgstr ""
-
-#: scene/3d/navigation_mesh.cpp
-msgid "A NavigationMesh resource must be set or created for this node to work."
-msgstr ""
-
-#: scene/3d/navigation_mesh.cpp
-msgid ""
-"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
-"It only provides navigation data."
-msgstr ""
-
-#: scene/3d/particles.cpp
-msgid ""
-"GPU-based particles are not supported by the GLES2 video driver.\n"
-"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
-"\" option for this purpose."
-msgstr ""
-
-#: scene/3d/particles.cpp
-msgid ""
-"Nothing is visible because meshes have not been assigned to draw passes."
-msgstr ""
-
-#: scene/3d/particles.cpp
-msgid ""
-"Particles animation requires the usage of a SpatialMaterial whose Billboard "
-"Mode is set to \"Particle Billboard\"."
-msgstr ""
-
-#: scene/3d/path.cpp
-#, fuzzy
-msgid "PathFollow only works when set as a child of a Path node."
-msgstr ""
-"PathFollow2D funktioniert nur, wenn sie als Unterobjekt eines Path2D Nodes "
-"gesetzt wird."
-
-#: scene/3d/path.cpp
-msgid ""
-"PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its "
-"parent Path's Curve resource."
-msgstr ""
-
-#: scene/3d/physics_body.cpp
-msgid ""
-"Size changes to RigidBody (in character or rigid modes) will be overridden "
-"by the physics engine when running.\n"
-"Change the size in children collision shapes instead."
-msgstr ""
-
-#: scene/3d/remote_transform.cpp
-#, fuzzy
-msgid ""
-"The \"Remote Path\" property must point to a valid Spatial or Spatial-"
-"derived node to work."
-msgstr "Die Pfad-Variable muss auf einen gültigen Particles2D Node verweisen."
-
-#: scene/3d/soft_body.cpp
-msgid "This body will be ignored until you set a mesh."
-msgstr ""
-
-#: scene/3d/soft_body.cpp
-msgid ""
-"Size changes to SoftBody will be overridden by the physics engine when "
-"running.\n"
-"Change the size in children collision shapes instead."
-msgstr ""
-
-#: scene/3d/sprite_3d.cpp
-#, fuzzy
-msgid ""
-"A SpriteFrames resource must be created or set in the \"Frames\" property in "
-"order for AnimatedSprite3D to display frames."
-msgstr ""
-"Damit AnimatedSprite Frames anzeigen kann, muss eine SpriteFrame Resource "
-"unter der 'Frames' Property erstellt oder gesetzt sein."
-
-#: scene/3d/vehicle_body.cpp
-msgid ""
-"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
-"it as a child of a VehicleBody."
-msgstr ""
-
-#: scene/3d/world_environment.cpp
-msgid ""
-"WorldEnvironment requires its \"Environment\" property to contain an "
-"Environment to have a visible effect."
-msgstr ""
-
-#: scene/3d/world_environment.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/world_environment.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
-#: scene/animation/animation_blend_tree.cpp
-msgid "On BlendTree node '%s', animation not found: '%s'"
-msgstr ""
-
-#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
-msgid "Animation not found: '%s'"
-msgstr "Animations-Node"
-
-#: scene/animation/animation_tree.cpp
-msgid "In node '%s', invalid animation: '%s'."
-msgstr ""
-
-#: scene/animation/animation_tree.cpp
-msgid "Invalid animation: '%s'."
-msgstr ""
-
-#: scene/animation/animation_tree.cpp
-msgid "Nothing connected to input '%s' of node '%s'."
-msgstr ""
-
-#: scene/animation/animation_tree.cpp
-msgid "No root AnimationNode for the graph is set."
-msgstr ""
-
-#: scene/animation/animation_tree.cpp
-msgid "Path to an AnimationPlayer node containing animations is not set."
-msgstr ""
-
-#: scene/animation/animation_tree.cpp
-msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node."
-msgstr ""
-
-#: scene/animation/animation_tree.cpp
-msgid "The AnimationPlayer root node is not a valid node."
-msgstr ""
-
-#: scene/animation/animation_tree_player.cpp
-msgid "This node has been deprecated. Use AnimationTree instead."
-msgstr ""
-
-#: scene/gui/color_picker.cpp
-msgid ""
-"Color: #%s\n"
-"LMB: Set color\n"
-"RMB: Remove preset"
-msgstr ""
-
-#: scene/gui/color_picker.cpp
-msgid "Pick a color from the editor window."
-msgstr ""
-
-#: scene/gui/color_picker.cpp
-msgid "HSV"
-msgstr ""
-
-#: scene/gui/color_picker.cpp
-msgid "Raw"
-msgstr ""
-
-#: scene/gui/color_picker.cpp
-msgid "Switch between hexadecimal and code values."
-msgstr ""
-
-#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset."
-msgstr ""
-
-#: scene/gui/container.cpp
-msgid ""
-"Container by itself serves no purpose unless a script configures its "
-"children placement behavior.\n"
-"If you don't intend to add a script, use a plain Control node instead."
-msgstr ""
-
-#: scene/gui/control.cpp
-msgid ""
-"The Hint Tooltip won't be displayed as the control's Mouse Filter is set to "
-"\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."
-msgstr ""
-
-#: scene/gui/dialogs.cpp
-msgid "Alert!"
-msgstr "Alert!"
-
-#: scene/gui/dialogs.cpp
-msgid "Please Confirm..."
-msgstr "Bitte bestätigen..."
-
-#: scene/gui/popup.cpp
-msgid ""
-"Popups will hide by default unless you call popup() or any of the popup*() "
-"functions. Making them visible for editing is fine, but they will hide upon "
-"running."
-msgstr ""
-
-#: scene/gui/range.cpp
-msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
-msgstr ""
-
-#: scene/gui/scroll_container.cpp
-msgid ""
-"ScrollContainer is intended to work with a single child control.\n"
-"Use a container as child (VBox, HBox, etc.), or a Control and set the custom "
-"minimum size manually."
-msgstr ""
-
-#: scene/gui/tree.cpp
-msgid "(Other)"
-msgstr ""
-
-#: scene/main/scene_tree.cpp
-msgid ""
-"Default Environment as specified in Project Settings (Rendering -> "
-"Environment -> Default Environment) could not be loaded."
-msgstr ""
-
-#: scene/main/viewport.cpp
-msgid ""
-"This viewport is not set as render target. If you intend for it to display "
-"its contents directly to the screen, make it a child of a Control so it can "
-"obtain a size. Otherwise, make it a RenderTarget and assign its internal "
-"texture to some node for display."
-msgstr ""
-
-#: scene/main/viewport.cpp
-msgid "Viewport size must be greater than 0 to render anything."
-msgstr ""
-
-#: scene/resources/visual_shader_nodes.cpp
-msgid "Invalid source for preview."
-msgstr ""
-
-#: scene/resources/visual_shader_nodes.cpp
-msgid "Invalid source for shader."
-msgstr ""
-
-#: scene/resources/visual_shader_nodes.cpp
-msgid "Invalid comparison function for that type."
-msgstr ""
-
-#: servers/visual/shader_language.cpp
-msgid "Assignment to function."
-msgstr ""
-
-#: servers/visual/shader_language.cpp
-msgid "Assignment to uniform."
-msgstr ""
-
-#: servers/visual/shader_language.cpp
-msgid "Varyings can only be assigned in vertex function."
-msgstr ""
-
-#: servers/visual/shader_language.cpp
-msgid "Constants cannot be modified."
-msgstr ""
-
-#, fuzzy
-#~ msgid "Class Description"
-#~ msgstr "Script hinzufügen"
-
-#, fuzzy
-#~ msgid "Base Type:"
-#~ msgstr "Typ ändern"
-
-#, fuzzy
-#~ msgid "Available Nodes:"
-#~ msgstr "TimeScale-Node"
-
-#, fuzzy
-#~ msgid "Theme Properties:"
-#~ msgstr "Node erstellen"
-
-#, fuzzy
-#~ msgid "Class Description:"
-#~ msgstr "Script hinzufügen"
-
-#, fuzzy
-#~ msgid "Property Descriptions:"
-#~ msgstr "Script hinzufügen"
-
-#, fuzzy
-#~ msgid "Method Descriptions:"
-#~ msgstr "Script hinzufügen"
-
-#~ msgid "Delete Node(s)?"
-#~ msgstr "Node(s) löschen?"
-
-#~ msgid "Faces contain no area!"
-#~ msgstr "Flächen enthalten keinen Bereich!"
-
-#~ msgid "No faces!"
-#~ msgstr "Keine Flächen!"
-
-#, fuzzy
-#~ msgid "Select Mode (Q)"
-#~ msgstr "Selektiere Node(s) zum Importieren aus"
-
-#, fuzzy
-#~ msgid "Snap Mode (%s)"
-#~ msgstr "Selektiere Node(s) zum Importieren aus"
-
-#, fuzzy
-#~ msgid "Error initializing FreeType."
-#~ msgstr "Fehler bei der FreeType Inizialisierung."
-
-#, fuzzy
-#~ msgid "Previous Folder"
-#~ msgstr "Node(s) löschen"
-
-#, fuzzy
-#~ msgid "Next Folder"
-#~ msgstr "Node erstellen"
-
-#, fuzzy
-#~ msgid "Build Project"
-#~ msgstr "Projektname:"
-
-#, fuzzy
-#~ msgid "View log"
-#~ msgstr "Datei(en) öffnen"
-
-#~ msgid "Path to Node:"
-#~ msgstr "Pfad zum Node:"
-
-#, fuzzy
-#~ msgid "Create folder"
-#~ msgstr "Node erstellen"
-
-#, fuzzy
-#~ msgid "Custom Node"
-#~ msgstr "Node erstellen"
-
-#, fuzzy
-#~ msgid "Create Area"
-#~ msgstr "Node erstellen"
-
-#, fuzzy
-#~ msgid "Create Exterior Connector"
-#~ msgstr "Neues Projekt erstellen"
-
-#, fuzzy
-#~ msgid "Insert keys."
-#~ msgstr "Bild einfügen"
-
-#, fuzzy
-#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
-#~ msgstr ""
-#~ "PathFollow2D funktioniert nur, wenn sie als Unterobjekt eines Path2D "
-#~ "Nodes gesetzt wird."
-
-#, fuzzy
-#~ msgid "Add Split"
-#~ msgstr "Script hinzufügen"
-
-#, fuzzy
-#~ msgid "Remove Split"
-#~ msgstr "Ungültige Bilder löschen"
-
-#, fuzzy
-#~ msgid "Add Node.."
-#~ msgstr "Node"
-
-#, fuzzy
-#~ msgid "Show current scene file."
-#~ msgstr "Node(s) löschen"
-
-#~ msgid "Ok"
-#~ msgstr "Okay"
-
-#, fuzzy
-#~ msgid "Convert To Lowercase"
-#~ msgstr "Verbindung zu Node:"
-
-#~ msgid "Anim Add Key"
-#~ msgstr "Anim Bild hinzufügen"
-
-#~ msgid "Enable editing of individual keys by clicking them."
-#~ msgstr "Aktivieren des Bildeditors mit einem click auf die jenigen."
-
-#~ msgid "Key"
-#~ msgstr "Bild"
-
-#~ msgid "Call Functions in Which Node?"
-#~ msgstr "Im welchem Node soll die Funktion aufgerufen werden?"
-
-#~ msgid "Create new animation in player."
-#~ msgstr "Neue Animation erstellen."
-
-#, fuzzy
-#~ msgid "Set pivot at mouse position"
-#~ msgstr "Ungültige Bilder löschen"
-
-#~ msgid "OK :("
-#~ msgstr "Okay :("
-
-#, fuzzy
-#~ msgid "Can't contain '/' or ':'"
-#~ msgstr "Verbindung zu Node:"
-
-#, fuzzy
-#~ msgid "Can't write file."
-#~ msgstr "Neues Projekt erstellen"
-
-#, fuzzy
-#~ msgid "Couldn't get project.godot in project path."
-#~ msgstr "Die engine.cfg kann im Projektverzeichnis nicht erstellt werden."
-
-#, fuzzy
-#~ msgid "Couldn't get project.godot in the project path."
-#~ msgstr "Die engine.cfg kann im Projektverzeichnis nicht erstellt werden."
-
-#~ msgid "Move Add Key"
-#~ msgstr "Bild bewegen/einfügen"
-
-#~ msgid "Set Emission Mask"
-#~ msgstr "Emissions-Maske setzen"
-
-#~ msgid "Surface %d"
-#~ msgstr "Oberfläche %d"
-
-#~ msgid "Import Textures for Atlas (2D)"
-#~ msgstr "Importiere Texturen für Atlas (2D)"
-
-#~ msgid "Import Large Textures (2D)"
-#~ msgstr "Importiere Große Texturen (2D)"
-
-#~ msgid "Import Textures for 2D"
-#~ msgstr "Importiere Texturen für 2D"
-
-#, fuzzy
-#~ msgid ""
-#~ "NOTICE: Importing 2D textures is not mandatory. Just copy png/jpg files "
-#~ "to the project."
-#~ msgstr ""
-#~ "MERKE: Das importieren von 2D Texturen ist nicht zwingend notwendig. "
-#~ "Kopiere einfach png/jpg Dateien in das Projekt."
-
-#, fuzzy
-#~ msgid "Add to Project (project.godot)"
-#~ msgstr "Zum Projekt hinzufügen (engine.cfg)"
-
-#~ msgid "Invalid project path, the path must exist!"
-#~ msgstr "Ungültiger Projektpfad, Pfad existiert nicht!"
-
-#, fuzzy
-#~ msgid "Invalid project path, project.godot must not exist."
-#~ msgstr "Ungültiger Projektpfad, engine.cfg vorhanden!"
-
-#, fuzzy
-#~ msgid "Invalid project path, project.godot must exist."
-#~ msgstr "Ungültiger Projektpfad, engine.cfg nicht vorhanden!"
-
-#~ msgid "Project Path (Must Exist):"
-#~ msgstr "Projektpfad (muss existieren):"
-
-#~ msgid "Node From Scene"
-#~ msgstr "Node von Szene"
-
-#~ msgid "Import assets to the project."
-#~ msgstr "Assets zum Projekt importieren."
-
-#~ msgid "Export the project to many platforms."
-#~ msgstr "Exportiere das Projekt für viele Plattformen."
-
-#~ msgid "Path property must point to a valid Particles2D node to work."
-#~ msgstr ""
-#~ "Die Pfad-Variable muss auf einen gültigen Particles2D Node verweisen."
-
-#~ msgid "Surface"
-#~ msgstr "Oberfläche"
-
-#~ msgid ""
-#~ "A SampleLibrary resource must be created or set in the 'samples' property "
-#~ "in order for SamplePlayer to play sound."
-#~ msgstr ""
-#~ "Damit SamplePlayer einen Sound abspielen kann, muss eine SampleLibrary "
-#~ "Ressource in der 'samples' Property erzeugt oder definiert werden."
-
-#~ msgid ""
-#~ "A SampleLibrary resource must be created or set in the 'samples' property "
-#~ "in order for SpatialSamplePlayer to play sound."
-#~ msgstr ""
-#~ "Damit SpatialSamplePlayer einen Sound abspielen kann, muss eine "
-#~ "SampleLibrary Ressource in der 'samples' Eigenschaft erzeugt oder "
-#~ "definiert werden."
-
-#~ msgid "Error writing the project PCK!"
-#~ msgstr "Fehler beim Schreiben des Projekts PCK!"
-
-#~ msgid "Project Export Settings"
-#~ msgstr "Projektexport Einstellungen"
-
-#~ msgid "Export all files in the project directory."
-#~ msgstr "Exportiere alle Dateien in das Projektverzeichnis."
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index 1302e33e47..4dca7e4c5f 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -809,7 +809,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1409,16 +1408,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2338,11 +2329,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2608,10 +2601,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3217,6 +3206,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3801,6 +3794,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6672,11 +6669,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7146,6 +7143,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10063,7 +10069,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10221,6 +10227,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10267,11 +10280,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10391,6 +10404,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10431,6 +10448,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11455,6 +11476,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11478,6 +11503,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/el.po b/editor/translations/el.po
index b01976c477..127da8ec1f 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -11,8 +11,9 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-20 05:51+0000\n"
-"Last-Translator: George Tsiamasiotis <gtsiam@windowslive.com>\n"
+"PO-Revision-Date: 2020-05-10 12:37+0000\n"
+"Last-Translator: Overloaded @ Orama Interactive http://orama-interactive."
+"com/ <manoschool@yahoo.gr>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
"Language: el\n"
@@ -20,7 +21,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -845,7 +846,6 @@ msgstr "Αδύνατη η σύνδεση σήματος"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1459,17 +1459,9 @@ msgstr "Ενεργοποίηση"
msgid "Rearrange Autoloads"
msgstr "Αναδιάταξη των AutoLoad"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Άκυρη διαδρομή."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Το αρχείο δεν υπάρχει."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Δεν υπάρχει στην διαδρομή πόρων."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2431,14 +2423,15 @@ msgstr ""
"Δεν είναι δυνατό να φορτώσετε εκ νέου μια σκηνή που δεν αποθηκεύτηκε ποτέ."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Επαναφορά"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Αποθηκεύσετε σκηνής"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
-"Αυτή η ενέργεια δεν μπορεί να αναιρεθεί. Θέλετε να συνεχίσετε με την "
-"επαναφορά;"
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2733,10 +2726,6 @@ msgid "Redo"
msgstr "Ακύρωση αναίρεσης"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Επαναφορά σκηνής"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Λοιπά έργα ή εργαλεία για όλη τη σκηνή."
@@ -2944,7 +2933,7 @@ msgstr "Αναζήτηση"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Online Docs"
-msgstr "Ηλεκτρονική τεκμηρίωση"
+msgstr "Ηλεκτρονική τεκμηρίωση"
#: editor/editor_node.cpp
msgid "Q&A"
@@ -3388,6 +3377,13 @@ msgstr "Αδυναμία εκτέλεσης δέσμης ενεργειών:"
msgid "Did you forget the '_run' method?"
msgstr "Μήπως ξεχάσατε τη μέθοδο '_run';"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Πατήστε παρατεταμένα το Ctrl για να προσθέσετε έναν Getter. Πατήστε "
+"παρατεταμένα το Shift για να προσθέσετε μία γενική υπογραφή."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Επιλέξτε κόμβους για εισαγωγή"
@@ -3989,6 +3985,10 @@ msgid "Error running post-import script:"
msgstr "Σφάλμα κατά την εκτέλεση της δέσμης ενεργειών μετεισαγωγής:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Αποθήκευση..."
@@ -6957,12 +6957,13 @@ msgstr ""
"κόμβο «%s»."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Γραμμή"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(Παράβλεψη)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(Παράβλεψη)"
+msgid "Line"
+msgstr "Γραμμή"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7441,6 +7442,15 @@ msgid "XForm Dialog"
msgstr "Διάλογος XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Κούμπωμα Κόμβων στο Δάπεδο"
@@ -10527,8 +10537,9 @@ msgid "Instance Child Scene"
msgstr "Αρχικοποίηση σκηνής ως παιδί"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Εκκαθάριση Δέσμης Ενεργειών"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Σύνδεση Δέσμης Ενεργειών"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10699,6 +10710,13 @@ msgid "Open Documentation"
msgstr "Άνοιγμα Τεκμηρίωσης"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Προσθήκη κόμβου ως παιδί"
@@ -10747,11 +10765,13 @@ msgstr ""
"υπάρχει πηγαίος κόμβος."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Σύνδεση νέας ή υπαρκτής δέσμης ενεργειών για τον επιλεγμένο κόμβο."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Εκκαθάριση δέσμης ενεργειών για τον επιλεγμένο κόμβο."
#: editor/scene_tree_dock.cpp
@@ -10883,6 +10903,10 @@ msgid "A directory with the same name exists."
msgstr "Υπαρκτός ομώνυμος κατάλογος."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Το αρχείο δεν υπάρχει."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Άκυρη επέκταση."
@@ -10923,6 +10947,10 @@ msgid "File exists, it will be reused."
msgstr "Υπαρκτό αρχείο, θα επαναχρησιμοποιηθεί."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Άκυρη διαδρομή."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Άκυρο όνομα κλάσης."
@@ -11983,6 +12011,13 @@ msgstr ""
"διαμόρφωση."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Το «debug keystore» δεν έχει καθοριστεί στις Ρυθμίσεις Επεξεργαστή ή την "
+"διαμόρφωση."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Η προσαρμοσμένη δόμηση απαιτεί μια έγκυρη διαδρομή για το Android SDK στις "
@@ -12012,6 +12047,32 @@ msgstr "Άκυρο όνομα πακέτου:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12804,6 +12865,23 @@ msgstr "Τα «varying» μπορούν να ανατεθούν μόνο στη
msgid "Constants cannot be modified."
msgstr "Οι σταθερές δεν μπορούν να τροποποιηθούν."
+#~ msgid "Not in resource path."
+#~ msgstr "Δεν υπάρχει στην διαδρομή πόρων."
+
+#~ msgid "Revert"
+#~ msgstr "Επαναφορά"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr ""
+#~ "Αυτή η ενέργεια δεν μπορεί να αναιρεθεί. Θέλετε να συνεχίσετε με την "
+#~ "επαναφορά;"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Επαναφορά σκηνής"
+
+#~ msgid "Clear Script"
+#~ msgstr "Εκκαθάριση Δέσμης Ενεργειών"
+
#~ msgid "Issue Tracker"
#~ msgstr "Διαχείριση προβλημάτων"
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index d75cb88920..3addde45ce 100644
--- a/editor/translations/eo.po
+++ b/editor/translations/eo.po
@@ -8,18 +8,19 @@
# Brandon Dyer <brandondyer64@gmail.com>, 2019.
# Alejandro Sánchez Medina <alejandrosanchzmedina@gmail.com>, 2019.
# Sr Half <flavio05@outlook.com>, 2020.
+# Cristian Yepez <cristianyepez@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2020-05-01 11:43+0000\n"
-"Last-Translator: Sr Half <flavio05@outlook.com>\n"
+"PO-Revision-Date: 2020-05-22 21:01+0000\n"
+"Last-Translator: Cristian Yepez <cristianyepez@gmail.com>\n"
"Language-Team: Esperanto <https://hosted.weblate.org/projects/godot-engine/"
"godot/eo/>\n"
"Language: eo\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -640,9 +641,8 @@ msgid "Scale Ratio:"
msgstr "Skali Rejŝo:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select Tracks to Copy"
-msgstr "Elekti vojetojn por duplikati:"
+msgstr "Elekti vojetojn por duplikati"
#: editor/animation_track_editor.cpp editor/editor_log.cpp
#: editor/editor_properties.cpp
@@ -847,7 +847,6 @@ msgstr "Ne povas konekti signalo"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1342,12 +1341,13 @@ msgid "Open Audio Bus Layout"
msgstr ""
#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "There is no '%s' file."
-msgstr ""
+msgstr "Neniu '%s' dosiero."
#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
msgid "Layout"
-msgstr ""
+msgstr "Aranĝo"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -1360,7 +1360,7 @@ msgstr "Eraro dum ŝargante tiparon."
#: editor/editor_audio_buses.cpp
msgid "Add Bus"
-msgstr ""
+msgstr "Aldoni Buso"
#: editor/editor_audio_buses.cpp
msgid "Add a new Audio Bus to this layout."
@@ -1370,7 +1370,7 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Load"
-msgstr ""
+msgstr "Ŝarĝi"
#: editor/editor_audio_buses.cpp
msgid "Load an existing Bus Layout."
@@ -1448,16 +1448,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Nevalida dosierindiko."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2405,12 +2397,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Ne povas reŝarĝi scenon, kiu konservis neniam."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Malfari"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Konservi scenon"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Tiun ĉi agon ne povos malfari. Certe daŭrigi?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2678,10 +2673,6 @@ msgid "Redo"
msgstr "Refari"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Malfari scenon"
-
-#: editor/editor_node.cpp
#, fuzzy
msgid "Miscellaneous project or scene-wide tools."
msgstr "Diversa projekto aŭ sceno-abundaj iloj."
@@ -3313,6 +3304,10 @@ msgstr "Ne povis ruli skripto:"
msgid "Did you forget the '_run' method?"
msgstr "Ĉu vi forgesis la '_run' metodo?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
#, fuzzy
msgid "Select Node(s) to Import"
@@ -3905,6 +3900,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6794,11 +6793,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7269,6 +7268,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10210,8 +10218,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Krei skripton"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10370,6 +10379,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10416,11 +10432,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10540,6 +10556,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Nevalida kromprogramo."
@@ -10580,6 +10600,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Nevalida dosierindiko."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11622,6 +11646,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11645,6 +11673,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12288,6 +12342,15 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Konstantoj ne povas esti modifitaj."
+#~ msgid "Revert"
+#~ msgstr "Malfari"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Tiun ĉi agon ne povos malfari. Certe daŭrigi?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Malfari scenon"
+
#, fuzzy
#~ msgid "Help improve the Godot documentation by giving feedback."
#~ msgstr "Helpi plibonigi la Godotan dokumentadon per doni reagon."
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 8446ed2415..f8c4134d07 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -12,7 +12,7 @@
# David Couto <davidcouto@gmail.com>, 2017.
# Dharkael <izhe@hotmail.es>, 2017, 2019.
# Diego López <diegodario21@gmail.com>, 2017.
-# eon-s <emanuel.segretin@gmail.com>, 2018, 2019.
+# eon-s <emanuel.segretin@gmail.com>, 2018, 2019, 2020.
# Gustavo Leon <gleondiaz@gmail.com>, 2017-2018.
# Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019, 2020.
# Jose Maria Martinez <josemar1992@hotmail.com>, 2018.
@@ -46,12 +46,15 @@
# Victor S. <victorstancioiu@gmail.com>, 2020.
# henry rujano herrera <rujhen@gmail.com>, 2020.
# Megamega53 <Christopher.Morales21@myhunter.cuny.edu>, 2020.
+# Serk Lintur <serk.lintur@gmail.com>, 2020.
+# Pedro J. Estébanez <pedrojrulez@gmail.com>, 2020.
+# paco <pacosoftfree@protonmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-04 15:11+0000\n"
-"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: paco <pacosoftfree@protonmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -886,7 +889,6 @@ msgstr "No se puede conectar la señal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1500,17 +1502,9 @@ msgstr "Activar"
msgid "Rearrange Autoloads"
msgstr "Reordenar Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Ruta inválida."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "El archivo no existe."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "No está en la ruta de recursos."
+msgid "Can't add autoload:"
+msgstr "No se puede añadir un autoload:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2028,7 +2022,7 @@ msgstr "Constantes"
#: editor/editor_help.cpp
msgid "Property Descriptions"
-msgstr "Descripción de Propiedades"
+msgstr "Descripciones de Propiedad"
#: editor/editor_help.cpp
msgid "(value)"
@@ -2051,11 +2045,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"Actualmente no hay una descripción para este método. Por favor, ¡ayúdanos "
-"[color=$color][url=$url]aportando una[/url][/color]!\n"
-"\n"
-"Actualmente no existe descripción para este método. Por favor ¡ayúdanos "
-"[color=$color][url=$url]contribuyendo una[/url][/color]!"
+"Actualmente no existe descripción para este método. Por favor ¡ayúdanos con "
+"[color=$color][url=$url] contribuyendo con una[ /url][/color]!"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -2477,12 +2468,17 @@ msgid "Can't reload a scene that was never saved."
msgstr "No se puede volver a cargar una escena que nunca se guardó."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Revertir"
+msgid "Reload Saved Scene"
+msgstr "Recargar Escena Guardada"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Esta acción no se puede deshacer. ¿Revertir de todos modos?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"La escena actual tiene cambios sin guardar.\n"
+"¿Quieres recargar la escena guardada igualmente? Esta acción no puede "
+"deshacerse."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2777,10 +2773,6 @@ msgid "Redo"
msgstr "Rehacer"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Revertir Escena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Herramientas variadas de proyecto o escena."
@@ -3110,12 +3102,14 @@ msgid ""
"the \"Use Custom Build\" option should be enabled in the Android export "
"preset."
msgstr ""
-"Una vez hecho ésto puedes aplicar modificaciones y generar tu propio APK "
-"personalizado al exportar (agregar módulos, cambiar el AndroidManifest.xml, "
-"etc.).\n"
-"Ten en cuenta que para generar builds personalizados en vez de usar los APKs "
-"pregenerados, la opción \"Usar Build Personalizado\" debería estar activada "
-"en el preset de exportación de Android."
+"Esto configurará tu proyecto para las compilaciones personalizadas de "
+"Android instalando la plantilla base en \"res://android/build\".\n"
+"Luego podrás aplicar las modificaciones y compilar tu propio APK "
+"personalizado al exportarlo (agregando módulos, cambiando el AndroidManifest."
+"xml, etc.).\n"
+"Ten en cuenta que para realizar compilaciones personalizadas en lugar de "
+"usar APKs predefinidos, la opción \"Use Custom Build\" debería estar "
+"habilitada en la configuración de exportación de Android."
#: editor/editor_node.cpp
msgid ""
@@ -3431,6 +3425,12 @@ msgstr "No se pudo ejecutar el script:"
msgid "Did you forget the '_run' method?"
msgstr "Te olvidaste del método '_run'?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Mantén pulsado Ctrl para redondear a enteros. Mantén pulsado Shift para "
+"cambios más precisos."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Selecciona nodo(s) a importar"
@@ -4031,6 +4031,10 @@ msgid "Error running post-import script:"
msgstr "Error ejecutando el script de posimportacion:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr "¿Devolviste un objeto derivado de Node en el método `post_import()`?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Guardando..."
@@ -6994,12 +6998,12 @@ msgstr ""
"'%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Línea"
+msgid "[Ignore]"
+msgstr "[Ignorar]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignorar)"
+msgid "Line"
+msgstr "Línea"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7473,6 +7477,21 @@ msgid "XForm Dialog"
msgstr "Diálogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Haz clic para alternar entre los estados de visibilidad.\n"
+"\n"
+"Ojo abierto: El gizmo es visible.\n"
+"Ojo cerrado: El gizmo está oculto.\n"
+"Ojo medio abierto: El gizmo también es visible a través de superficies "
+"opacas (\"x-ray\")."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Ajustar Nodos al Suelo"
@@ -9373,7 +9392,7 @@ msgid ""
msgstr ""
"Los retornos decrecen en función del producto punto de la superficie normal "
"y de la dirección de visión de la cámara (pasando las entradas asociadas a "
-"esta)."
+"este)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -10568,8 +10587,8 @@ msgid "Instance Child Scene"
msgstr "Instanciar Escena Hija"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Eliminar Script"
+msgid "Detach Script"
+msgstr "Sustraer Script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10735,6 +10754,16 @@ msgid "Open Documentation"
msgstr "Abrir Documentación"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"No se puede adjuntar el script: no hay ningún lenguaje registrado.\n"
+"Esto es probablemente porque este editor fue construido con todos los "
+"módulos de lenguaje desactivados."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Añadir Nodo Hijo"
@@ -10783,12 +10812,12 @@ msgstr ""
"existe ningún nodo raíz."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr "Añadir un script nuevo o existente al nodo seleccionado."
+msgid "Attach a new or existing script to the selected node."
+msgstr "Añadir un nuevo script o ya existente al nodo seleccionado."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Borrar el script del nodo seleccionado."
+msgid "Detach the script from the selected node."
+msgstr "Sustraer script del nodo seleccionado."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10827,7 +10856,7 @@ msgid ""
"Node has %s connection(s) and %s group(s).\n"
"Click to show signals dock."
msgstr ""
-"El nodo tiene %s conexión(es) y %(s) grupo(s).\n"
+"El nodo tiene %s conexión(es) y %s grupo(s).\n"
"Clic para mostrar el panel de señales."
#: editor/scene_tree_editor.cpp
@@ -10920,6 +10949,10 @@ msgid "A directory with the same name exists."
msgstr "Ya existe un directorio con el mismo nombre."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "El archivo no existe."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Extensión inválida."
@@ -10960,6 +10993,10 @@ msgid "File exists, it will be reused."
msgstr "El archivo ya existe, será reutilizado."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Ruta inválida."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nombre de clase inválido."
@@ -12015,6 +12052,12 @@ msgstr ""
"Debug keystore no configurada en Configuración del Editor ni en el preset."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Release keystore no está configurado correctamente en el preset de "
+"exportación."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"La compilación personalizada requiere una ruta de Android SDK válida en "
@@ -12044,6 +12087,39 @@ msgstr "Nombre de paquete inválido:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"El módulo \"GodotPaymentV3\" incluido en los ajustes del proyecto \"android/"
+"modules\" es inválido (cambiado en Godot 3.2.2).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr "\"Use Custom Build\" debe estar activado para usar los plugins."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"\"Degrees Of Freedom\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile "
+"VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Hand Tracking\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Focus Awareness\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR"
+"\"."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12846,6 +12922,21 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
msgid "Constants cannot be modified."
msgstr "Las constantes no pueden modificarse."
+#~ msgid "Not in resource path."
+#~ msgstr "No está en la ruta de recursos."
+
+#~ msgid "Revert"
+#~ msgstr "Revertir"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Esta acción no se puede deshacer. ¿Revertir de todos modos?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Revertir Escena"
+
+#~ msgid "Clear Script"
+#~ msgstr "Eliminar Script"
+
#~ msgid "Issue Tracker"
#~ msgstr "Registro de problemas"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index 9136ac11c3..46cb219e14 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -14,12 +14,13 @@
# roger <616steam@gmail.com>, 2019, 2020.
# Francisco José Carllinni <panchopepe@protonmail.com>, 2019.
# Nicolas Zirulnik <nicolaszirulnik@gmail.com>, 2020.
+# Cristian Yepez <cristianyepez@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-02 01:48+0000\n"
-"Last-Translator: Anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
"Language: es_AR\n"
@@ -852,7 +853,6 @@ msgstr "No se puede conectar la señal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1465,17 +1465,9 @@ msgstr "Activar"
msgid "Rearrange Autoloads"
msgstr "Reordenar Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Ruta inválida."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "El archivo existe."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "No está en la ruta de recursos."
+msgid "Can't add autoload:"
+msgstr "No se puede agregar autoload:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2438,12 +2430,17 @@ msgid "Can't reload a scene that was never saved."
msgstr "No se puede volver a cargar una escena que nunca se guardó."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Revertir"
+msgid "Reload Saved Scene"
+msgstr "Recargar Escena Guardada"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Esta acción no se puede deshacer. ¿Revertir de todos modos?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"La escena actual tiene cambios sin guardar.\n"
+"Querés recargar la escena guardada igualmente? Esta acción no se puede "
+"deshacer."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2738,10 +2735,6 @@ msgid "Redo"
msgstr "Rehacer"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Revertir Escena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Herramientas misceláneas a nivel proyecto o escena."
@@ -2822,7 +2815,7 @@ msgid ""
msgstr ""
"Cuando esta opción está activa, exportar o hacer deploy producirá un "
"ejecutable mínimo.\n"
-"El sistema de archivos sera proveido desde el proyecto por el editor sobre "
+"El sistema de archivos sera proveído desde el proyecto por el editor sobre "
"la red.\n"
"En Android, deploy usará el cable USB para mejor performance. Esta opción "
"acelera el testeo para juegos con footprint grande."
@@ -3392,6 +3385,12 @@ msgstr "No se pudo ejecutar el script:"
msgid "Did you forget the '_run' method?"
msgstr "Te olvidaste del método '_run'?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Mantené pulsado Ctrl para redondear a enteros. Mantené pulsado Shift para "
+"cambios más precisos."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Seleccionar Nodo(s) para Importar"
@@ -3991,6 +3990,10 @@ msgid "Error running post-import script:"
msgstr "Error ejecutando el script de post-importacion:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr "¿Devolviste un objeto derivado de Node en el método `post_import()`?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Guardando..."
@@ -5887,7 +5890,7 @@ msgstr "No se pudo crear una forma de colisión Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
-msgstr "Crear Static Trimesh Body"
+msgstr "Crear Static Trimesh Body"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
@@ -6950,12 +6953,12 @@ msgstr ""
"nodo '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Línea"
+msgid "[Ignore]"
+msgstr "[Ignorar]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignorar)"
+msgid "Line"
+msgstr "Línea"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7429,6 +7432,21 @@ msgid "XForm Dialog"
msgstr "Dialogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Hacé clic para alternar entre los estados de visibilidad.\n"
+"\n"
+"Ojo abierto: El gizmo es visible.\n"
+"Ojo cerrado: El gizmo está oculto.\n"
+"Ojo medio abierto: El gizmo también es visible a través de superficies "
+"opacas (\"x-ray\")."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Ajustar Nodos al Suelo"
@@ -10523,8 +10541,8 @@ msgid "Instance Child Scene"
msgstr "Instanciar Escena Hija"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Quitar Script"
+msgid "Detach Script"
+msgstr "Desasignar Script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10691,6 +10709,16 @@ msgid "Open Documentation"
msgstr "Abrir Documentación"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"No se puede asignar el script: no hay ningún lenguaje registrado.\n"
+"Esto es probablemente porque este editor fue compilado con todos los módulos "
+"de lenguaje desactivados."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Agregar Nodo Hijo"
@@ -10739,12 +10767,12 @@ msgstr ""
"existe ningún nodo raíz."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr "Adjuntar un script nuevo o existente para el nodo seleccionado."
+msgid "Attach a new or existing script to the selected node."
+msgstr "Asignar un script nuevo o existente al nodo seleccionado."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Restablecer un script para el nodo seleccionado."
+msgid "Detach the script from the selected node."
+msgstr "Desasignar el script del nodo seleccionado."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10876,6 +10904,10 @@ msgid "A directory with the same name exists."
msgstr "Existe un directorio con el mismo nombre."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "El archivo existe."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Extensión inválida."
@@ -10916,6 +10948,10 @@ msgid "File exists, it will be reused."
msgstr "El archivo existe, será reutilizado."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Ruta inválida."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nombre de clase inválido."
@@ -11879,7 +11915,7 @@ msgstr "La ruta no apunta a un Nodo!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
-msgstr "Nombre de propiedad índice '%s' inválido en nodo %s."
+msgstr "Nombre de propiedad índice '%s' inválido en nodo %s."
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
@@ -11968,6 +12004,12 @@ msgstr ""
"Keystore debug no configurada en Configuración del Editor ni en el preset."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Release keystore no está configurado correctamente en el preset de "
+"exportación."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"La compilación personalizada requiere una ruta de Android SDK válida en "
@@ -11997,6 +12039,39 @@ msgstr "Nombre de paquete inválido:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"El módulo \"GodotPaymentV3\" incluido en el ajuste de proyecto \"android/"
+"modules\" es inválido (cambiado en Godot 3.2.2).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr "\"Use Custom Build\" debe estar activado para usar los plugins."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"\"Degrees Of Freedom\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile "
+"VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Hand Tracking\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Focus Awareness\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR"
+"\"."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12791,6 +12866,21 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
msgid "Constants cannot be modified."
msgstr "Las constantes no pueden modificarse."
+#~ msgid "Not in resource path."
+#~ msgstr "No está en la ruta de recursos."
+
+#~ msgid "Revert"
+#~ msgstr "Revertir"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Esta acción no se puede deshacer. ¿Revertir de todos modos?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Revertir Escena"
+
+#~ msgid "Clear Script"
+#~ msgstr "Quitar Script"
+
#~ msgid "Issue Tracker"
#~ msgstr "Registro de problemas"
diff --git a/editor/translations/et.po b/editor/translations/et.po
index 2ed8f83317..7be6996d69 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -4,18 +4,20 @@
# This file is distributed under the same license as the Godot source code.
# Jens <arrkiin@gmail.com>, 2019.
# Mattias Aabmets <mattias.aabmets@gmail.com>, 2019.
+# StReef <streef.gtx@gmail.com>, 2020.
+# René <renepiik@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2019-07-19 13:41+0000\n"
-"Last-Translator: Mattias Aabmets <mattias.aabmets@gmail.com>\n"
+"PO-Revision-Date: 2020-05-31 12:39+0000\n"
+"Last-Translator: René <renepiik@gmail.com>\n"
"Language-Team: Estonian <https://hosted.weblate.org/projects/godot-engine/"
"godot/et/>\n"
"Language: et\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.8-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -25,7 +27,7 @@ msgstr ""
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "Eeldati sõne pikkusega 1 (trükimärk)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -63,31 +65,31 @@ msgstr "'%' kutsudes:"
#: core/ustring.cpp
msgid "B"
-msgstr ""
+msgstr "B"
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "KiB"
#: core/ustring.cpp
msgid "MiB"
-msgstr ""
+msgstr "MiB"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "GiB"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "TiB"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "PiB"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "EiB"
#: editor/animation_bezier_editor.cpp
msgid "Free"
@@ -111,23 +113,23 @@ msgstr "Väärtus:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "Sisesta Võti Siia"
+msgstr "Sisesta võti siia"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
-msgstr "Kopeeri Valitud Võti (Võtmed)"
+msgstr "Paljunda valitud võti (võtmed)"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr "Kustuta Valitud Võti (Võtmed)"
+msgstr "Kustuta valitud võti (võtmed)"
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
-msgstr "Lisa Bezieri Punkt"
+msgstr "Lisa Bezieri punkt"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
-msgstr "Liiguta Bezieri Punkte"
+msgstr "Liiguta Bezieri punkte"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
@@ -179,20 +181,20 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Change Animation Length"
-msgstr "Muuda Animatsiooni Pikkust"
+msgstr "Muuda animatsiooni pikkust"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr "Muuda Animatsiooni Silmust"
+msgstr "Muuda animatsiooni silmust"
#: editor/animation_track_editor.cpp
msgid "Property Track"
-msgstr ""
+msgstr "Atribuudi rada"
#: editor/animation_track_editor.cpp
msgid "3D Transform Track"
-msgstr ""
+msgstr "3D muundus rada"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
@@ -200,31 +202,31 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr ""
+msgstr "Bezieri kurvi rada"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
-msgstr ""
+msgstr "Heli taasesituse rada"
#: editor/animation_track_editor.cpp
msgid "Animation Playback Track"
-msgstr ""
+msgstr "Animatsiooni taasesituse rada"
#: editor/animation_track_editor.cpp
msgid "Animation length (frames)"
-msgstr ""
+msgstr "Animatsiooni pikkus (kaadrid)"
#: editor/animation_track_editor.cpp
msgid "Animation length (seconds)"
-msgstr ""
+msgstr "Animatsiooni pikkus (sekundid)"
#: editor/animation_track_editor.cpp
msgid "Add Track"
-msgstr ""
+msgstr "Lisa rada"
#: editor/animation_track_editor.cpp
msgid "Animation Looping"
-msgstr ""
+msgstr "Animatsiooni kordus"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -237,39 +239,39 @@ msgstr "Heliklipid:"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
-msgstr "Animatsiooni Klipid:"
+msgstr "Animatsiooni klipid:"
#: editor/animation_track_editor.cpp
msgid "Change Track Path"
-msgstr ""
+msgstr "Muuda raja teed"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
-msgstr ""
+msgstr "Lülita see rada sisse/välja."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Uuendusrežiim (kuidas see omadus on seatud)"
#: editor/animation_track_editor.cpp
msgid "Interpolation Mode"
-msgstr ""
+msgstr "Interpolatsiooni režiim"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr ""
+msgstr "Korduse mähise režiim (nterpoleeri lõpp silmuse alguses)"
#: editor/animation_track_editor.cpp
msgid "Remove this track."
-msgstr ""
+msgstr "Eemalda see rada."
#: editor/animation_track_editor.cpp
msgid "Time (s): "
-msgstr "Aeg (Ajad): "
+msgstr "Aeg (sek): "
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr ""
+msgstr "Lülita rada sisse"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -285,7 +287,7 @@ msgstr "Päästik"
#: editor/animation_track_editor.cpp
msgid "Capture"
-msgstr ""
+msgstr "Jäädvusta"
#: editor/animation_track_editor.cpp
msgid "Nearest"
@@ -311,35 +313,35 @@ msgstr ""
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr "Sisesta Võti"
+msgstr "Sisesta võti"
#: editor/animation_track_editor.cpp
msgid "Duplicate Key(s)"
-msgstr "Kopeeri Võti (Võtmed)"
+msgstr "Paljunda võti (võtmed)"
#: editor/animation_track_editor.cpp
msgid "Delete Key(s)"
-msgstr "Kustuta Võti (Võtmed)"
+msgstr "Kustuta võti (võtmed)"
#: editor/animation_track_editor.cpp
msgid "Change Animation Update Mode"
-msgstr "Muuda Animatsiooni Uuendamise Töörežiimi"
+msgstr "Muuda animatsiooni uuendamise režiimi"
#: editor/animation_track_editor.cpp
msgid "Change Animation Interpolation Mode"
-msgstr "Muuda Animatsiooni Interpolatsiooni Töörežiimi"
+msgstr "Muuda animatsiooni interpolatsiooni režiimi"
#: editor/animation_track_editor.cpp
msgid "Change Animation Loop Mode"
-msgstr "Muuda Animatsiooni Silmuse Töörežiimi"
+msgstr "Muuda animatsiooni silmuse režiimi"
#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
-msgstr ""
+msgstr "Eemalda animatsiooni rada"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr ""
+msgstr "Loo uus rada %s-le ja sisesta võti?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
@@ -359,19 +361,19 @@ msgstr "Loo"
#: editor/animation_track_editor.cpp
msgid "Anim Insert"
-msgstr ""
+msgstr "Animatsiooni sisestus"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
-msgstr ""
+msgstr "AnimationPlayer ei saa ennast animeerida, ainult teise mänijaid."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
-msgstr ""
+msgstr "Loo ja sisesta animatsioon"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Track & Key"
-msgstr ""
+msgstr "Sisesta animatsiooni rada ja võti"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Key"
@@ -379,15 +381,15 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Change Animation Step"
-msgstr "Muuda Animatsiooni Sammu"
+msgstr "Muuda animatsiooni sammu"
#: editor/animation_track_editor.cpp
msgid "Rearrange Tracks"
-msgstr ""
+msgstr "Paiguta rajad ümber"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr ""
+msgstr "Radade muundamine rakendub ainult ruumilisele sõlmedele."
#: editor/animation_track_editor.cpp
msgid ""
@@ -396,6 +398,10 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"Helirajad võivad osutada ainult järgmistele sõlmetüüpidele:\n"
+"-AudioSteamPlayer\n"
+"-AudioStreamPlayer2D\n"
+"-AudioStreamPlayer3D"
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
@@ -416,7 +422,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Add Bezier Track"
-msgstr "Lisa Bezieri Rada"
+msgstr "Lisa Bezieri rada"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
@@ -424,15 +430,15 @@ msgstr "Raja tee on kehtetu, mistõttu ei sa lisada võtit."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
+msgstr "Rada pole Spatial tüüpi, ei saa sisestada võtit"
#: editor/animation_track_editor.cpp
msgid "Add Transform Track Key"
-msgstr ""
+msgstr "Lisa muunda raja võtit"
#: editor/animation_track_editor.cpp
msgid "Add Track Key"
-msgstr "Lisa Raja Võti"
+msgstr "Lisa raja võti"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
@@ -440,7 +446,7 @@ msgstr "Raja tee on kehtetu, mistõttu ei saa lisada meetodi võtit."
#: editor/animation_track_editor.cpp
msgid "Add Method Track Key"
-msgstr "Lisa Meetodi Raja Võti"
+msgstr "Lisa meetodi raja võti"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
@@ -456,7 +462,7 @@ msgstr "Lõikelaud on tühi"
#: editor/animation_track_editor.cpp
msgid "Paste Tracks"
-msgstr "Kleebi Rajad"
+msgstr "Kleebi rajad"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
@@ -817,7 +823,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1309,73 +1314,73 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Open Audio Bus Layout"
-msgstr ""
+msgstr "Ava heliliinide paigutus"
#: editor/editor_audio_buses.cpp
msgid "There is no '%s' file."
-msgstr ""
+msgstr "Faili '%s' ei ole eksisteeri."
#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
msgid "Layout"
-msgstr ""
+msgstr "Paigutus"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
-msgstr ""
+msgstr "Vigane fial, ei ole heliliini paigutus."
#: editor/editor_audio_buses.cpp
msgid "Error saving file: %s"
-msgstr ""
+msgstr "Tõrge faili '%s' salvestamisel"
#: editor/editor_audio_buses.cpp
msgid "Add Bus"
-msgstr ""
+msgstr "Lisa siin"
#: editor/editor_audio_buses.cpp
msgid "Add a new Audio Bus to this layout."
-msgstr ""
+msgstr "Lisa uus helisiin sellele paigutusele."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Load"
-msgstr ""
+msgstr "Lae"
#: editor/editor_audio_buses.cpp
msgid "Load an existing Bus Layout."
-msgstr ""
+msgstr "Lae olemasolev siini paigutus."
#: editor/editor_audio_buses.cpp
msgid "Save As"
-msgstr ""
+msgstr "Salvesta kui…"
#: editor/editor_audio_buses.cpp
msgid "Save this Bus Layout to a file."
-msgstr ""
+msgstr "Salvesta see siini paigutus faili."
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
msgid "Load Default"
-msgstr ""
+msgstr "Laadi vaikimisi"
#: editor/editor_audio_buses.cpp
msgid "Load the default Bus Layout."
-msgstr ""
+msgstr "Lae vaikimise siini paigutus."
#: editor/editor_audio_buses.cpp
msgid "Create a new Bus Layout."
-msgstr ""
+msgstr "Loo uus siini paigutus."
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
-msgstr ""
+msgstr "Vigane nimi."
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
-msgstr ""
+msgstr "Kehtivad märgid:"
#: editor/editor_autoload_settings.cpp
msgid "Must not collide with an existing engine class name."
-msgstr ""
+msgstr "Ei tohi kokkupõrkuda mängumootori juba olemasoleva klassi nimega."
#: editor/editor_autoload_settings.cpp
msgid "Must not collide with an existing built-in type name."
@@ -1387,7 +1392,7 @@ msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Keyword cannot be used as an autoload name."
-msgstr ""
+msgstr "Võtmesõnu ei saa kasutada automaatsete nimedena."
#: editor/editor_autoload_settings.cpp
msgid "Autoload '%s' already exists!"
@@ -1411,22 +1416,14 @@ msgstr ""
#: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp
msgid "Enable"
-msgstr ""
+msgstr "Luba"
#: editor/editor_autoload_settings.cpp
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -1438,17 +1435,17 @@ msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp
msgid "Path:"
-msgstr ""
+msgstr "Tee:"
#: editor/editor_autoload_settings.cpp
msgid "Node Name:"
-msgstr ""
+msgstr "Sõlme nimi:"
#: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp
#: editor/editor_profiler.cpp editor/project_manager.cpp
#: editor/settings_config_dialog.cpp
msgid "Name"
-msgstr ""
+msgstr "Nimi"
#: editor/editor_autoload_settings.cpp
msgid "Singleton"
@@ -1456,81 +1453,86 @@ msgstr ""
#: editor/editor_data.cpp editor/inspector_dock.cpp
msgid "Paste Params"
-msgstr ""
+msgstr "Kleebi parameetrid"
#: editor/editor_data.cpp
msgid "Updating Scene"
-msgstr ""
+msgstr "Värskendan stseeni"
#: editor/editor_data.cpp
msgid "Storing local changes..."
-msgstr ""
+msgstr "Salvestan kohalikud muudatused..."
#: editor/editor_data.cpp
msgid "Updating scene..."
-msgstr ""
+msgstr "Värskendan stseeni..."
#: editor/editor_data.cpp editor/editor_properties.cpp
msgid "[empty]"
-msgstr ""
+msgstr "[tühi]"
#: editor/editor_data.cpp
msgid "[unsaved]"
-msgstr ""
+msgstr "[salvestamata]"
#: editor/editor_dir_dialog.cpp
msgid "Please select a base directory first."
-msgstr ""
+msgstr "Palun valige kõigepealt baaskataloog."
#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
-msgstr ""
+msgstr "Vali kataloog"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
#: scene/gui/file_dialog.cpp
msgid "Create Folder"
-msgstr ""
+msgstr "Loo kaust"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp
#: modules/visual_script/visual_script_editor.cpp scene/gui/file_dialog.cpp
msgid "Name:"
-msgstr ""
+msgstr "Nimi:"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp
msgid "Could not create folder."
-msgstr ""
+msgstr "Ei saanud luua kausta."
#: editor/editor_dir_dialog.cpp
msgid "Choose"
-msgstr ""
+msgstr "Vali"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Storing File:"
-msgstr ""
+msgstr "Salvestan faili:"
#: editor/editor_export.cpp
msgid "No export template found at the expected path:"
-msgstr ""
+msgstr "Eeldataval teekonnal ei leitud ühtegi ekspordimalli:"
#: editor/editor_export.cpp
msgid "Packing"
-msgstr ""
+msgstr "Pakin"
#: editor/editor_export.cpp
msgid ""
"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
"Etc' in Project Settings."
msgstr ""
+"Sihtplatvorm nõuab GLES2 jaoks 'ETC' tekstuuri tihendamist. Projekti "
+"seadetes lubage „Impordi ETC”."
#: editor/editor_export.cpp
msgid ""
"Target platform requires 'ETC2' texture compression for GLES3. Enable "
"'Import Etc 2' in Project Settings."
msgstr ""
+"Sihtplatvorm nõuab GLES3 jaoks 'ETC2' tekstuuri tihendamist. Projekti "
+"seadetes lubage „Impordi ETC2”."
#: editor/editor_export.cpp
msgid ""
@@ -1539,6 +1541,9 @@ msgid ""
"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
"Enabled'."
msgstr ""
+"Sihtplatvorm nõuab juhi varundamiseks GLES2-ga 'ETC' tekstuuri tihendamist.\n"
+"Lülitage projekti sätetes sisse „Impordi ETC” või keelake „Draiveri "
+"tagasilangemine lubatud”."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -1554,7 +1559,7 @@ msgstr ""
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
-msgstr ""
+msgstr "Mallifaili ei leitud:"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -1562,11 +1567,11 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
-msgstr ""
+msgstr "3D-redigeerija"
#: editor/editor_feature_profile.cpp
msgid "Script Editor"
-msgstr ""
+msgstr "Skriptiredaktor"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
@@ -1574,7 +1579,7 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
-msgstr ""
+msgstr "Stseenipuu redigeerimine"
#: editor/editor_feature_profile.cpp
msgid "Import Dock"
@@ -1595,26 +1600,27 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
msgstr ""
+"Profiil peab olema kehtiv failinimi ja see ei tohi sisaldada '.' (punkti)"
#: editor/editor_feature_profile.cpp
msgid "Profile with this name already exists."
-msgstr ""
+msgstr "Selle nimega profiil on juba olemas."
#: editor/editor_feature_profile.cpp
msgid "(Editor Disabled, Properties Disabled)"
-msgstr ""
+msgstr "(Redaktor keelatud, atribuudid keelatud)"
#: editor/editor_feature_profile.cpp
msgid "(Properties Disabled)"
-msgstr ""
+msgstr "(Atribuudid keelatud)"
#: editor/editor_feature_profile.cpp
msgid "(Editor Disabled)"
-msgstr ""
+msgstr "(Redaktor keelatud)"
#: editor/editor_feature_profile.cpp
msgid "Class Options:"
-msgstr ""
+msgstr "Klassi valikud:"
#: editor/editor_feature_profile.cpp
msgid "Enable Contextual Editor"
@@ -1622,29 +1628,31 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Enabled Properties:"
-msgstr ""
+msgstr "Lubatud atribuudid:"
#: editor/editor_feature_profile.cpp
msgid "Enabled Features:"
-msgstr ""
+msgstr "Lubatud funktsioonid:"
#: editor/editor_feature_profile.cpp
msgid "Enabled Classes:"
-msgstr ""
+msgstr "Lubatud klassid:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
-msgstr ""
+msgstr "Faili '% s' vorming on vale, import katkestati."
#: editor/editor_feature_profile.cpp
msgid ""
"Profile '%s' already exists. Remove it first before importing, import "
"aborted."
msgstr ""
+"Profiil '% s' on juba olemas. Enne importimist eemaldage see, import "
+"katkestati."
#: editor/editor_feature_profile.cpp
msgid "Error saving profile to path: '%s'."
-msgstr ""
+msgstr "Viga profiili salvestamisel teele: '% s'."
#: editor/editor_feature_profile.cpp
msgid "Unset"
@@ -1652,7 +1660,7 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Current Profile:"
-msgstr ""
+msgstr "Praegune profiil:"
#: editor/editor_feature_profile.cpp
msgid "Make Current"
@@ -1662,82 +1670,82 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "New"
-msgstr ""
+msgstr "Uus"
#: editor/editor_feature_profile.cpp editor/editor_node.cpp
#: editor/project_manager.cpp
msgid "Import"
-msgstr ""
+msgstr "Impordi"
#: editor/editor_feature_profile.cpp editor/project_export.cpp
msgid "Export"
-msgstr ""
+msgstr "Ekspordi"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
-msgstr ""
+msgstr "Saadaolevad profiilid:"
#: editor/editor_feature_profile.cpp
msgid "Class Options"
-msgstr ""
+msgstr "Klassi valikud"
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
-msgstr ""
+msgstr "Uus profiilinimi:"
#: editor/editor_feature_profile.cpp
msgid "Erase Profile"
-msgstr ""
+msgstr "Kustuta profiil"
#: editor/editor_feature_profile.cpp
msgid "Godot Feature Profile"
-msgstr ""
+msgstr "Godoti funktsiooniprofiil"
#: editor/editor_feature_profile.cpp
msgid "Import Profile(s)"
-msgstr ""
+msgstr "Impordi profiil(id)"
#: editor/editor_feature_profile.cpp
msgid "Export Profile"
-msgstr ""
+msgstr "Ekspordi profiil"
#: editor/editor_feature_profile.cpp
msgid "Manage Editor Feature Profiles"
-msgstr ""
+msgstr "Halda redigeerija funktsioonide profiile"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select Current Folder"
-msgstr ""
+msgstr "Valige praegune kaust"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File Exists, Overwrite?"
-msgstr ""
+msgstr "Fail on olemas, kirjutate üle?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select This Folder"
-msgstr ""
+msgstr "Vali see kaust"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Copy Path"
-msgstr ""
+msgstr "Kopeeri tee"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Open in File Manager"
-msgstr ""
+msgstr "Ava failihalduris"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
msgid "Show in File Manager"
-msgstr ""
+msgstr "Kuva failihalduris"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "New Folder..."
-msgstr ""
+msgstr "Uus kaust..."
#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
-msgstr ""
+msgstr "Värskenda"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Recognized"
@@ -1745,50 +1753,50 @@ msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Files (*)"
-msgstr ""
+msgstr "Kõik failid (*)"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a File"
-msgstr ""
+msgstr "Ava fail"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open File(s)"
-msgstr ""
+msgstr "Ava fail(id)"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a Directory"
-msgstr ""
+msgstr "Ava kataloog"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a File or Directory"
-msgstr ""
+msgstr "Ava kaust või kataloog"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/editor_properties.cpp editor/inspector_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp scene/gui/file_dialog.cpp
msgid "Save"
-msgstr ""
+msgstr "Salvesta"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Save a File"
-msgstr ""
+msgstr "Salvesta fail"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
-msgstr ""
+msgstr "Mine tagasi"
#: editor/editor_file_dialog.cpp
msgid "Go Forward"
-msgstr ""
+msgstr "Mine edasi"
#: editor/editor_file_dialog.cpp
msgid "Go Up"
-msgstr ""
+msgstr "Mine üles"
#: editor/editor_file_dialog.cpp
msgid "Toggle Hidden Files"
-msgstr ""
+msgstr "Lülita varjatud failid sisse/välja"
#: editor/editor_file_dialog.cpp
msgid "Toggle Favorite"
@@ -1800,15 +1808,15 @@ msgstr ""
#: editor/editor_file_dialog.cpp
msgid "Focus Path"
-msgstr ""
+msgstr "Fookuse tee"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Up"
-msgstr ""
+msgstr "Liiguta lemmikud üles"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Down"
-msgstr ""
+msgstr "Liiguta lemmikud alla"
#: editor/editor_file_dialog.cpp
#, fuzzy
@@ -1822,11 +1830,11 @@ msgstr "Mine Järgmisele Sammule"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Go to parent folder."
-msgstr ""
+msgstr "Mine vanema kausta."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh files."
-msgstr ""
+msgstr "Värskenda faile."
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
@@ -1838,29 +1846,29 @@ msgstr ""
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails."
-msgstr ""
+msgstr "Kuva üksusi pisipiltide ruudustikuna."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a list."
-msgstr ""
+msgstr "Kuva üksused loendina."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
-msgstr ""
+msgstr "Kataloogid ja failid:"
#: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp
#: editor/plugins/style_box_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Preview:"
-msgstr ""
+msgstr "Eelvaade:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File:"
-msgstr ""
+msgstr "Fail:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
-msgstr ""
+msgstr "Peab kasutama kehtivat laiendit."
#: editor/editor_file_system.cpp
msgid "ScanSources"
@@ -1871,39 +1879,42 @@ msgid ""
"There are multiple importers for different types pointing to file %s, import "
"aborted"
msgstr ""
+"Erinevat tüüpi importijaid on mitu, mis osutavad failile % s, import "
+"katkestati"
#: editor/editor_file_system.cpp
+#, fuzzy
msgid "(Re)Importing Assets"
-msgstr ""
+msgstr "(Taas)impordin varasid"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
-msgstr ""
+msgstr "Ülaosa"
#: editor/editor_help.cpp
msgid "Class:"
-msgstr ""
+msgstr "Klass:"
#: editor/editor_help.cpp editor/scene_tree_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Inherits:"
-msgstr ""
+msgstr "Pärib:"
#: editor/editor_help.cpp
msgid "Inherited by:"
-msgstr ""
+msgstr "Päritud %s poolt"
#: editor/editor_help.cpp
msgid "Description"
-msgstr ""
+msgstr "Kirjeldus"
#: editor/editor_help.cpp
msgid "Online Tutorials"
-msgstr ""
+msgstr "Veebijuhendid"
#: editor/editor_help.cpp
msgid "Properties"
-msgstr ""
+msgstr "Atribuudid"
#: editor/editor_help.cpp
msgid "override:"
@@ -1911,32 +1922,31 @@ msgstr ""
#: editor/editor_help.cpp
msgid "default:"
-msgstr ""
+msgstr "vaikimisi:"
#: editor/editor_help.cpp
msgid "Methods"
-msgstr ""
+msgstr "Meetodid"
#: editor/editor_help.cpp
msgid "Theme Properties"
-msgstr ""
+msgstr "Teema atribuudid"
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr ""
+msgstr "Loetelu"
#: editor/editor_help.cpp
msgid "Constants"
-msgstr ""
+msgstr "Konstandid"
#: editor/editor_help.cpp
msgid "Property Descriptions"
-msgstr ""
+msgstr "Atribuutide kirjeldused"
#: editor/editor_help.cpp
-#, fuzzy
msgid "(value)"
-msgstr "Väärtus:"
+msgstr "(väärtus)"
#: editor/editor_help.cpp
msgid ""
@@ -1946,7 +1956,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr ""
+msgstr "Meetodi kirjeldused"
#: editor/editor_help.cpp
msgid ""
@@ -1957,43 +1967,43 @@ msgstr ""
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
msgid "Search Help"
-msgstr ""
+msgstr "Otsimise abi"
#: editor/editor_help_search.cpp
msgid "Case Sensitive"
-msgstr ""
+msgstr "Tõstutundlik"
#: editor/editor_help_search.cpp
msgid "Show Hierarchy"
-msgstr ""
+msgstr "Kuva hierarhia"
#: editor/editor_help_search.cpp
msgid "Display All"
-msgstr ""
+msgstr "Kuva kõik"
#: editor/editor_help_search.cpp
msgid "Classes Only"
-msgstr ""
+msgstr "Ainult klassid"
#: editor/editor_help_search.cpp
msgid "Methods Only"
-msgstr ""
+msgstr "Ainult meetodid"
#: editor/editor_help_search.cpp
msgid "Signals Only"
-msgstr ""
+msgstr "Ainult signaalid"
#: editor/editor_help_search.cpp
msgid "Constants Only"
-msgstr ""
+msgstr "Ainult konstandid"
#: editor/editor_help_search.cpp
msgid "Properties Only"
-msgstr ""
+msgstr "Ainult atribuudid"
#: editor/editor_help_search.cpp
msgid "Theme Properties Only"
-msgstr ""
+msgstr "Ainult teema atribuudid"
#: editor/editor_help_search.cpp
msgid "Member Type"
@@ -2001,47 +2011,47 @@ msgstr ""
#: editor/editor_help_search.cpp
msgid "Class"
-msgstr ""
+msgstr "Klass"
#: editor/editor_help_search.cpp
msgid "Method"
-msgstr ""
+msgstr "Meetod"
#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
msgid "Signal"
-msgstr ""
+msgstr "Signaal"
#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
-msgstr ""
+msgstr "Konstant"
#: editor/editor_help_search.cpp
msgid "Property"
-msgstr ""
+msgstr "Atribuut"
#: editor/editor_help_search.cpp
msgid "Theme Property"
-msgstr ""
+msgstr "Teema atribuut"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
-msgstr ""
+msgstr "Atribuut:"
#: editor/editor_inspector.cpp
msgid "Set"
-msgstr ""
+msgstr "Sea"
#: editor/editor_inspector.cpp
msgid "Set Multiple:"
-msgstr ""
+msgstr "Sea mitu:"
#: editor/editor_log.cpp
msgid "Output:"
-msgstr ""
+msgstr "Väljund:"
#: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Copy Selection"
-msgstr ""
+msgstr "Kopeeri valik"
#: editor/editor_log.cpp editor/editor_network_profiler.cpp
#: editor/editor_profiler.cpp editor/editor_properties.cpp
@@ -2051,21 +2061,23 @@ msgstr ""
#: modules/gdnative/gdnative_library_editor_plugin.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
msgid "Clear"
-msgstr ""
+msgstr "Puhasta"
#: editor/editor_log.cpp
msgid "Clear Output"
-msgstr ""
+msgstr "Puhasta väljund"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Stop"
-msgstr ""
+msgstr "Peatu/Stopp"
#: editor/editor_network_profiler.cpp editor/editor_profiler.cpp
#: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp
+#, fuzzy
msgid "Start"
-msgstr ""
+msgstr "Start/Käivita"
#: editor/editor_network_profiler.cpp
msgid "%s/s"
@@ -2073,15 +2085,15 @@ msgstr ""
#: editor/editor_network_profiler.cpp
msgid "Down"
-msgstr ""
+msgstr "Alla"
#: editor/editor_network_profiler.cpp
msgid "Up"
-msgstr ""
+msgstr "Üles"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
msgid "Node"
-msgstr ""
+msgstr "Sõlm"
#: editor/editor_network_profiler.cpp
msgid "Incoming RPC"
@@ -2101,11 +2113,11 @@ msgstr ""
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "New Window"
-msgstr ""
+msgstr "Uus aken"
#: editor/editor_node.cpp
msgid "Imported resources can't be saved."
-msgstr ""
+msgstr "Imporditud ressursse ei saa salvestada."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -2114,21 +2126,23 @@ msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Error saving resource!"
-msgstr ""
+msgstr "Viga ressursi salvestamisel!"
#: editor/editor_node.cpp
msgid ""
"This resource can't be saved because it does not belong to the edited scene. "
"Make it unique first."
msgstr ""
+"Seda ressurssi ei saa salvestada, kuna see ei kuulu muudetud stseeni. Esmalt "
+"tehke see ainulaadseks."
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
-msgstr ""
+msgstr "Salvesta ressurss kui..."
#: editor/editor_node.cpp
msgid "Can't open file for writing:"
-msgstr ""
+msgstr "Faili ei saa kirjutamiseks avada:"
#: editor/editor_node.cpp
msgid "Requested file format unknown:"
@@ -2136,11 +2150,11 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Error while saving."
-msgstr ""
+msgstr "Viga salvestamisel."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr ""
+msgstr "'%si' ei saa avada. Faili võib olla teisaldatud või kustutatud."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
@@ -2148,37 +2162,39 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "Faili '%s' ootamatu lõpp."
#: editor/editor_node.cpp
msgid "Missing '%s' or its dependencies."
-msgstr ""
+msgstr "Puudub '%s' või selle sõltuvuspaketid."
#: editor/editor_node.cpp
msgid "Error while loading '%s'."
-msgstr ""
+msgstr "Viga faili '%s' laadimisel."
#: editor/editor_node.cpp
msgid "Saving Scene"
-msgstr ""
+msgstr "Stseeni salvestamine"
#: editor/editor_node.cpp
msgid "Analyzing"
-msgstr ""
+msgstr "Analüüsin"
#: editor/editor_node.cpp
msgid "Creating Thumbnail"
-msgstr ""
+msgstr "Loon pisipilti"
#: editor/editor_node.cpp
msgid "This operation can't be done without a tree root."
-msgstr ""
+msgstr "Seda toimingut ei saa teha ilma puu juureta."
#: editor/editor_node.cpp
msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
+"Seda stseeni ei saa salvestada, kuna toimub tsükliline sisestus.\n"
+"Lahenda see ja proovige siis uuesti salvestada."
#: editor/editor_node.cpp
msgid ""
@@ -2188,27 +2204,27 @@ msgstr ""
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "Can't overwrite scene that is still open!"
-msgstr ""
+msgstr "Avatud stseeni ei saa üle kirjutada!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
-msgstr ""
+msgstr "MeshLibrary ei saa ühendamiseks laadida!"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
-msgstr ""
+msgstr "Viga MeshLibrary salvestamisel!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
-msgstr ""
+msgstr "TileSeti ei saa ühendamiseks laadida!"
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
-msgstr ""
+msgstr "Viga TileSeti salvestamisel!"
#: editor/editor_node.cpp
msgid "Error trying to save layout!"
-msgstr ""
+msgstr "Viga paigutuse salvestamisel!"
#: editor/editor_node.cpp
msgid "Default editor layout overridden."
@@ -2216,11 +2232,11 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Layout name not found!"
-msgstr ""
+msgstr "Paigutuse nime ei leitud!"
#: editor/editor_node.cpp
msgid "Restored default layout to base settings."
-msgstr ""
+msgstr "Taastati vaikepaigutus baasseadetesse."
#: editor/editor_node.cpp
msgid ""
@@ -2349,11 +2365,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Stseeni salvestamine"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2620,10 +2639,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3229,6 +3244,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3814,6 +3833,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6691,11 +6714,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7166,6 +7189,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10086,7 +10118,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10246,6 +10278,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10292,11 +10331,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10416,6 +10455,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Faili ei ole olemas."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10456,6 +10499,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Kehtetu tee."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11486,6 +11533,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11509,6 +11560,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12119,23 +12196,23 @@ msgstr ""
#: scene/main/viewport.cpp
msgid "Viewport size must be greater than 0 to render anything."
-msgstr ""
+msgstr "Vaateakne suurus peab olema suurem kui 0, et kuvada."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
-msgstr ""
+msgstr "Vigane eelvaate lähe."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for shader."
-msgstr ""
+msgstr "Vigane varjutaja lähe."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid comparison function for that type."
-msgstr ""
+msgstr "Vigane võrdlusfinktsioon selle tüübi jaoks."
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
-msgstr ""
+msgstr "Funktsiooni määramine."
#: servers/visual/shader_language.cpp
msgid "Assignment to uniform."
@@ -12147,4 +12224,7 @@ msgstr ""
#: servers/visual/shader_language.cpp
msgid "Constants cannot be modified."
-msgstr ""
+msgstr "Konstante ei saa muuta."
+
+#~ msgid "Not in resource path."
+#~ msgstr "Ei ole ressursiteel."
diff --git a/editor/translations/eu.po b/editor/translations/eu.po
index f633f1c298..b47056d82b 100644
--- a/editor/translations/eu.po
+++ b/editor/translations/eu.po
@@ -3,11 +3,11 @@
# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
# Julen Irazoki <rktzbkr.julen@gmail.com>, 2019.
-# Osoitz <oelkoro@gmail.com>, 2019.
+# Osoitz <oelkoro@gmail.com>, 2019, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2019-12-03 14:05+0000\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
"Last-Translator: Osoitz <oelkoro@gmail.com>\n"
"Language-Team: Basque <https://hosted.weblate.org/projects/godot-engine/"
"godot/eu/>\n"
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.10-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -24,7 +24,7 @@ msgstr ""
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "1 luzerako kate bat espero zen (karaktere bat)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -54,79 +54,79 @@ msgstr ""
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr ""
+msgstr "'%s' eraikitzeko argumentu baliogabeak"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr ""
+msgstr "'%s' deitzean:"
#: core/ustring.cpp
msgid "B"
-msgstr ""
+msgstr "B"
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "KiB"
#: core/ustring.cpp
msgid "MiB"
-msgstr ""
+msgstr "MiB"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "GiB"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "TiB"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "PiB"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "EiB"
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr ""
+msgstr "Libre"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr ""
+msgstr "Orekatua"
#: editor/animation_bezier_editor.cpp
msgid "Mirror"
-msgstr ""
+msgstr "Ispilua"
#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
msgid "Time:"
-msgstr ""
+msgstr "Denbora:"
#: editor/animation_bezier_editor.cpp
msgid "Value:"
-msgstr ""
+msgstr "Balioa:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr ""
+msgstr "Txertatu gakoa hemen"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
-msgstr ""
+msgstr "Bikoiztu hautatutako gakoa(k)"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr ""
+msgstr "Ezabatu hautatutako gakoak"
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
-msgstr ""
+msgstr "Gehitu Bezier puntua"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
-msgstr ""
+msgstr "Mugitu Bezier puntuak"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
@@ -178,12 +178,12 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Change Animation Length"
-msgstr ""
+msgstr "Aldatu animazioaren iraupena"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr ""
+msgstr "Aldatu animazioaren begizta"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -211,11 +211,11 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Animation length (frames)"
-msgstr ""
+msgstr "Animazioaren iraupena (fotogramak)"
#: editor/animation_track_editor.cpp
msgid "Animation length (seconds)"
-msgstr ""
+msgstr "Animazioaren iraupena (segundoak)"
#: editor/animation_track_editor.cpp
msgid "Add Track"
@@ -496,7 +496,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Snap:"
-msgstr ""
+msgstr "Atxikitzea:"
#: editor/animation_track_editor.cpp
msgid "Animation step value."
@@ -814,7 +814,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -950,32 +949,32 @@ msgstr ""
#: editor/dependency_editor.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Dependencies"
-msgstr ""
+msgstr "Mendekotasunak"
#: editor/dependency_editor.cpp
msgid "Resource"
-msgstr ""
+msgstr "Baliabidea"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
#: editor/project_manager.cpp editor/project_settings_editor.cpp
msgid "Path"
-msgstr ""
+msgstr "Bidea"
#: editor/dependency_editor.cpp
msgid "Dependencies:"
-msgstr ""
+msgstr "Mendekotasunak:"
#: editor/dependency_editor.cpp
msgid "Fix Broken"
-msgstr ""
+msgstr "Konpondu hautsitakoa"
#: editor/dependency_editor.cpp
msgid "Dependency Editor"
-msgstr ""
+msgstr "Mendekotasun-editorea"
#: editor/dependency_editor.cpp
msgid "Search Replacement Resource:"
-msgstr ""
+msgstr "Bilatu ordezko baliabidea:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
@@ -985,15 +984,16 @@ msgstr ""
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
msgid "Open"
-msgstr ""
+msgstr "Ireki"
#: editor/dependency_editor.cpp
msgid "Owners Of:"
-msgstr ""
+msgstr "Hauen jabeak:"
#: editor/dependency_editor.cpp
msgid "Remove selected files from the project? (Can't be restored)"
msgstr ""
+"Kendu hautatutako fitxategiak proiektutik? (Ezin izango da berreskuratu)"
#: editor/dependency_editor.cpp
msgid ""
@@ -1001,46 +1001,49 @@ msgid ""
"work.\n"
"Remove them anyway? (no undo)"
msgstr ""
+"Kendu beharreko fitxategiak beste baliabide batzuek behar dituzte funtziona "
+"dezaten.\n"
+"Kendu, hala ere? (Ezin da desegin)"
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
-msgstr ""
+msgstr "Ezin kendu:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
-msgstr ""
+msgstr "Errorea kargatzean:"
#: editor/dependency_editor.cpp
msgid "Load failed due to missing dependencies:"
-msgstr ""
+msgstr "Kargak huts egin du mendekotasunak falta direlako:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Open Anyway"
-msgstr ""
+msgstr "Ireki dena den"
#: editor/dependency_editor.cpp
msgid "Which action should be taken?"
-msgstr ""
+msgstr "Zein ekintza egin behar da?"
#: editor/dependency_editor.cpp
msgid "Fix Dependencies"
-msgstr ""
+msgstr "Konpondu mendekotasunak"
#: editor/dependency_editor.cpp
msgid "Errors loading!"
-msgstr ""
+msgstr "Erroreak kargatzean!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr ""
+msgstr "%d elementu behin betiko ezabatu nahi duzu? (Ezin da desegin!)"
#: editor/dependency_editor.cpp
msgid "Show Dependencies"
-msgstr ""
+msgstr "Erakutsi mendekotasunak"
#: editor/dependency_editor.cpp
msgid "Orphan Resource Explorer"
-msgstr ""
+msgstr "Baliabide umezurtzen arakatzailea"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
@@ -1048,27 +1051,28 @@ msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
-msgstr ""
+msgstr "Ezabatu"
#: editor/dependency_editor.cpp
msgid "Owns"
-msgstr ""
+msgstr "Jabea"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
-msgstr ""
+msgstr "Jabetza esplizitu gabeko baliabideak:"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Key"
-msgstr ""
+msgstr "Aldatu hiztegiaren gakoa"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Value"
-msgstr ""
+msgstr "Aldatu hiztegiaren balioa"
#: editor/editor_about.cpp
+#, fuzzy
msgid "Thanks from the Godot community!"
-msgstr ""
+msgstr "Eskerrik asko Godot komunitatearen partetik!"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
@@ -1076,59 +1080,59 @@ msgstr ""
#: editor/editor_about.cpp
msgid "Project Founders"
-msgstr ""
+msgstr "Proiektuaren sortzaileak"
#: editor/editor_about.cpp
msgid "Lead Developer"
-msgstr ""
+msgstr "Garatzaile nagusia"
#: editor/editor_about.cpp
msgid "Project Manager "
-msgstr ""
+msgstr "Proiektu-kudeatzailea "
#: editor/editor_about.cpp
msgid "Developers"
-msgstr ""
+msgstr "Garatzaileak"
#: editor/editor_about.cpp
msgid "Authors"
-msgstr ""
+msgstr "Egileak"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "Platinozko babesleak"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "Urrezko babesleak"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "Mini babesleak"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "Urrezko emaileak"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "Zilarrezko emaileak"
#: editor/editor_about.cpp
msgid "Bronze Donors"
-msgstr ""
+msgstr "Brontzezko emaileak"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "Emaileak"
#: editor/editor_about.cpp
msgid "License"
-msgstr ""
+msgstr "Lizentzia"
#: editor/editor_about.cpp
msgid "Third-party Licenses"
-msgstr ""
+msgstr "Hirugarrengoen lizentziak"
#: editor/editor_about.cpp
msgid ""
@@ -1140,27 +1144,27 @@ msgstr ""
#: editor/editor_about.cpp
msgid "All Components"
-msgstr ""
+msgstr "Osagai guztiak"
#: editor/editor_about.cpp
msgid "Components"
-msgstr ""
+msgstr "Osagaiak"
#: editor/editor_about.cpp
msgid "Licenses"
-msgstr ""
+msgstr "Lizentziak"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Error opening package file, not in ZIP format."
-msgstr ""
+msgstr "Errorea pakete fitxategia irekitzean, ez dago ZIP formatuan."
#: editor/editor_asset_installer.cpp
msgid "%s (Already Exists)"
-msgstr ""
+msgstr "%s (jada existitzen da)"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr ""
+msgstr "Aktiboak deskonprimatzen"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "The following files failed extraction from package:"
@@ -1168,28 +1172,28 @@ msgstr ""
#: editor/editor_asset_installer.cpp
msgid "And %s more files."
-msgstr ""
+msgstr "Eta beste %s fitxategi."
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Package installed successfully!"
-msgstr ""
+msgstr "Paketea ondo instalatu da!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr ""
+msgstr "Arrakasta!"
#: editor/editor_asset_installer.cpp
msgid "Package Contents:"
-msgstr ""
+msgstr "Paketearen edukia:"
#: editor/editor_asset_installer.cpp editor/editor_node.cpp
msgid "Install"
-msgstr ""
+msgstr "Instalatu"
#: editor/editor_asset_installer.cpp
msgid "Package Installer"
-msgstr ""
+msgstr "Pakete instalatzailea"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1197,7 +1201,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Add Effect"
-msgstr ""
+msgstr "Gehitu efektua"
#: editor/editor_audio_buses.cpp
msgid "Rename Audio Bus"
@@ -1237,7 +1241,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Drag & drop to rearrange."
-msgstr ""
+msgstr "Arrastatu eta jaregin berrantolatzeko."
#: editor/editor_audio_buses.cpp
msgid "Solo"
@@ -1258,19 +1262,19 @@ msgstr ""
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Duplicate"
-msgstr ""
+msgstr "Bikoiztu"
#: editor/editor_audio_buses.cpp
msgid "Reset Volume"
-msgstr ""
+msgstr "Berrezarri bolumena"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
-msgstr ""
+msgstr "Ezabatu efektua"
#: editor/editor_audio_buses.cpp
msgid "Audio"
-msgstr ""
+msgstr "Audioa"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus"
@@ -1336,7 +1340,7 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Load"
-msgstr ""
+msgstr "Kargatu"
#: editor/editor_audio_buses.cpp
msgid "Load an existing Bus Layout."
@@ -1344,7 +1348,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Save As"
-msgstr ""
+msgstr "Gorde honela"
#: editor/editor_audio_buses.cpp
msgid "Save this Bus Layout to a file."
@@ -1414,16 +1418,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -1567,7 +1563,7 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
-msgstr ""
+msgstr "Aktiboen liburutegia"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
@@ -1668,35 +1664,35 @@ msgstr ""
#: editor/editor_feature_profile.cpp editor/project_export.cpp
msgid "Export"
-msgstr ""
+msgstr "Esportatu"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
-msgstr ""
+msgstr "Eskuragarri dauden profilak:"
#: editor/editor_feature_profile.cpp
msgid "Class Options"
-msgstr ""
+msgstr "Klaseko aukerak"
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
-msgstr ""
+msgstr "Profilaren izen berria:"
#: editor/editor_feature_profile.cpp
msgid "Erase Profile"
-msgstr ""
+msgstr "Ezabatu profila"
#: editor/editor_feature_profile.cpp
msgid "Godot Feature Profile"
-msgstr ""
+msgstr "Godot ezaugarri profila"
#: editor/editor_feature_profile.cpp
msgid "Import Profile(s)"
-msgstr ""
+msgstr "Inportatu profila(k)"
#: editor/editor_feature_profile.cpp
msgid "Export Profile"
-msgstr ""
+msgstr "Esportatu profila"
#: editor/editor_feature_profile.cpp
msgid "Manage Editor Feature Profiles"
@@ -1704,32 +1700,32 @@ msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select Current Folder"
-msgstr ""
+msgstr "Hautatu uneko karpeta"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File Exists, Overwrite?"
-msgstr ""
+msgstr "Fitxategia badago aurretik, gainidatzi?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select This Folder"
-msgstr ""
+msgstr "Hautatu karpeta hau"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Copy Path"
-msgstr ""
+msgstr "Kopiatu bidea"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Open in File Manager"
-msgstr ""
+msgstr "Ireki fitxategi-kudeatzailean"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
msgid "Show in File Manager"
-msgstr ""
+msgstr "Erakutsi fitxategi-kudeatzailean"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "New Folder..."
-msgstr ""
+msgstr "Karpeta berria..."
#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -1742,58 +1738,58 @@ msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Files (*)"
-msgstr ""
+msgstr "Fitxategi guztiak (*)"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a File"
-msgstr ""
+msgstr "Ireki fitxategi bat"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open File(s)"
-msgstr ""
+msgstr "Ireki fitxategia(k)"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a Directory"
-msgstr ""
+msgstr "Ireki direktorioa"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a File or Directory"
-msgstr ""
+msgstr "Ireki fitxategia edo direktorioa"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/editor_properties.cpp editor/inspector_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp scene/gui/file_dialog.cpp
msgid "Save"
-msgstr ""
+msgstr "Gorde"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Save a File"
-msgstr ""
+msgstr "Gorde fitxategia"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
-msgstr ""
+msgstr "Joan atzera"
#: editor/editor_file_dialog.cpp
msgid "Go Forward"
-msgstr ""
+msgstr "Joan aurrera"
#: editor/editor_file_dialog.cpp
msgid "Go Up"
-msgstr ""
+msgstr "Joan gora"
#: editor/editor_file_dialog.cpp
msgid "Toggle Hidden Files"
-msgstr ""
+msgstr "Txandakatu ezkutatutako fitxategiak"
#: editor/editor_file_dialog.cpp
msgid "Toggle Favorite"
-msgstr ""
+msgstr "Txandakatu gogokoa"
#: editor/editor_file_dialog.cpp
msgid "Toggle Mode"
-msgstr ""
+msgstr "Txandakatu modua"
#: editor/editor_file_dialog.cpp
msgid "Focus Path"
@@ -1801,27 +1797,27 @@ msgstr ""
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Up"
-msgstr ""
+msgstr "Eraman gogokoa gora"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Down"
-msgstr ""
+msgstr "Eraman gogoa behera"
#: editor/editor_file_dialog.cpp
msgid "Go to previous folder."
-msgstr ""
+msgstr "Joan aurreko karpetara."
#: editor/editor_file_dialog.cpp
msgid "Go to next folder."
-msgstr ""
+msgstr "Joan hurrengo karpetara."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Go to parent folder."
-msgstr ""
+msgstr "Joan guraso karpetara."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh files."
-msgstr ""
+msgstr "Eguneratu fitxategiak."
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
@@ -1829,7 +1825,7 @@ msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Toggle the visibility of hidden files."
-msgstr ""
+msgstr "Txandakatu ezkutuko fitxategien ikusgaitasuna."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails."
@@ -1837,25 +1833,25 @@ msgstr ""
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a list."
-msgstr ""
+msgstr "Ikusi elementuak zerrenda gisa."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
-msgstr ""
+msgstr "Direktorioak eta fitxategiak:"
#: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp
#: editor/plugins/style_box_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Preview:"
-msgstr ""
+msgstr "Aurrebista:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File:"
-msgstr ""
+msgstr "Fitxategia:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
-msgstr ""
+msgstr "Baliozko luzapena erabili behar du."
#: editor/editor_file_system.cpp
msgid "ScanSources"
@@ -1869,7 +1865,7 @@ msgstr ""
#: editor/editor_file_system.cpp
msgid "(Re)Importing Assets"
-msgstr ""
+msgstr "Aktiboak (bir)inportatzen"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
@@ -1877,20 +1873,20 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Class:"
-msgstr ""
+msgstr "Klasea:"
#: editor/editor_help.cpp editor/scene_tree_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Inherits:"
-msgstr ""
+msgstr "Herentziak:"
#: editor/editor_help.cpp
msgid "Inherited by:"
-msgstr ""
+msgstr "Hauek heredatua:"
#: editor/editor_help.cpp
msgid "Description"
-msgstr ""
+msgstr "Deskripzioa"
#: editor/editor_help.cpp
msgid "Online Tutorials"
@@ -1898,31 +1894,31 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Properties"
-msgstr ""
+msgstr "Propietateak"
#: editor/editor_help.cpp
msgid "override:"
-msgstr ""
+msgstr "gainidatzi:"
#: editor/editor_help.cpp
msgid "default:"
-msgstr ""
+msgstr "lehenetsia:"
#: editor/editor_help.cpp
msgid "Methods"
-msgstr ""
+msgstr "Metodoak"
#: editor/editor_help.cpp
msgid "Theme Properties"
-msgstr ""
+msgstr "Azalaren propietateak"
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr ""
+msgstr "Enumerazioak"
#: editor/editor_help.cpp
msgid "Constants"
-msgstr ""
+msgstr "Konstanteak"
#: editor/editor_help.cpp
msgid "Property Descriptions"
@@ -1930,7 +1926,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "(value)"
-msgstr ""
+msgstr "(balioa)"
#: editor/editor_help.cpp
msgid ""
@@ -1940,7 +1936,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr ""
+msgstr "Metodo-deskripzioak"
#: editor/editor_help.cpp
msgid ""
@@ -1951,63 +1947,63 @@ msgstr ""
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
msgid "Search Help"
-msgstr ""
+msgstr "Bilatu laguntza"
#: editor/editor_help_search.cpp
msgid "Case Sensitive"
-msgstr ""
+msgstr "Maiuskulak eta minuskulak"
#: editor/editor_help_search.cpp
msgid "Show Hierarchy"
-msgstr ""
+msgstr "Erakutsi hierarkia"
#: editor/editor_help_search.cpp
msgid "Display All"
-msgstr ""
+msgstr "Erakutsi guztiak"
#: editor/editor_help_search.cpp
msgid "Classes Only"
-msgstr ""
+msgstr "Klaseak bakarrik"
#: editor/editor_help_search.cpp
msgid "Methods Only"
-msgstr ""
+msgstr "Metodoak bakarrik"
#: editor/editor_help_search.cpp
msgid "Signals Only"
-msgstr ""
+msgstr "Seinaleak bakarrik"
#: editor/editor_help_search.cpp
msgid "Constants Only"
-msgstr ""
+msgstr "Konstanteak bakarrik"
#: editor/editor_help_search.cpp
msgid "Properties Only"
-msgstr ""
+msgstr "Propietateak bakarrik"
#: editor/editor_help_search.cpp
msgid "Theme Properties Only"
-msgstr ""
+msgstr "Azalaren propietateak bakarrik"
#: editor/editor_help_search.cpp
msgid "Member Type"
-msgstr ""
+msgstr "Kide mota"
#: editor/editor_help_search.cpp
msgid "Class"
-msgstr ""
+msgstr "Klasea"
#: editor/editor_help_search.cpp
msgid "Method"
-msgstr ""
+msgstr "Metodoa"
#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
msgid "Signal"
-msgstr ""
+msgstr "Seinalea"
#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
-msgstr ""
+msgstr "Konstantea"
#: editor/editor_help_search.cpp
msgid "Property"
@@ -2015,7 +2011,7 @@ msgstr ""
#: editor/editor_help_search.cpp
msgid "Theme Property"
-msgstr ""
+msgstr "Azalaren propietatea"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
@@ -2343,11 +2339,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Birkargatu azala"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2605,16 +2604,12 @@ msgstr ""
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Undo"
-msgstr ""
+msgstr "Desegin"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Redo"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
+msgstr "Berregin"
#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
@@ -2623,27 +2618,27 @@ msgstr ""
#: editor/editor_node.cpp editor/project_manager.cpp
#: editor/script_create_dialog.cpp
msgid "Project"
-msgstr ""
+msgstr "Proiektua"
#: editor/editor_node.cpp
msgid "Project Settings..."
-msgstr ""
+msgstr "Proiektuaren ezarpenak..."
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control"
-msgstr ""
+msgstr "Bertsio kontrola"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Set Up Version Control"
-msgstr ""
+msgstr "Ezarri bertsio kontrola"
#: editor/editor_node.cpp
msgid "Shut Down Version Control"
-msgstr ""
+msgstr "Desgaitu bertsio kontrola"
#: editor/editor_node.cpp
msgid "Export..."
-msgstr ""
+msgstr "Esportatu..."
#: editor/editor_node.cpp
msgid "Install Android Build Template..."
@@ -2651,24 +2646,24 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Open Project Data Folder"
-msgstr ""
+msgstr "Ireki proiektuaren datu karpeta"
#: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp
msgid "Tools"
-msgstr ""
+msgstr "Tresnak"
#: editor/editor_node.cpp
msgid "Orphan Resource Explorer..."
-msgstr ""
+msgstr "Baliabide umezurtzen arakatzailea..."
#: editor/editor_node.cpp
msgid "Quit to Project List"
-msgstr ""
+msgstr "Irten proiektuen zerrendara"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/project_export.cpp
msgid "Debug"
-msgstr ""
+msgstr "Araztu"
#: editor/editor_node.cpp
msgid "Deploy with Remote Debug"
@@ -2696,7 +2691,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr ""
+msgstr "Talka formak ikusgai"
#: editor/editor_node.cpp
msgid ""
@@ -2760,11 +2755,11 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr ""
+msgstr "Txandakatu pantaila osoa"
#: editor/editor_node.cpp
msgid "Toggle System Console"
-msgstr ""
+msgstr "Txandakatu sistemaren kontsola"
#: editor/editor_node.cpp
msgid "Open Editor Data/Settings Folder"
@@ -2772,23 +2767,23 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Open Editor Data Folder"
-msgstr ""
+msgstr "Ireki editorearen datu karpeta"
#: editor/editor_node.cpp
msgid "Open Editor Settings Folder"
-msgstr ""
+msgstr "Ireki editorearen ezarpenen karpeta"
#: editor/editor_node.cpp
msgid "Manage Editor Features..."
-msgstr ""
+msgstr "Kudeatu editorearen ezaugarriak..."
#: editor/editor_node.cpp
msgid "Manage Export Templates..."
-msgstr ""
+msgstr "Kudeatu esportazio txantiloiak..."
#: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp
msgid "Help"
-msgstr ""
+msgstr "Laguntza"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -2797,20 +2792,20 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp
#: editor/project_settings_editor.cpp editor/rename_dialog.cpp
msgid "Search"
-msgstr ""
+msgstr "Bilatu"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Online Docs"
-msgstr ""
+msgstr "Lineako dokumentuak"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Galdera-erantzunak"
#: editor/editor_node.cpp
msgid "Report a Bug"
-msgstr ""
+msgstr "Eman akats baten berri"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -2818,11 +2813,11 @@ msgstr ""
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
-msgstr ""
+msgstr "Komunitatea"
#: editor/editor_node.cpp
msgid "About"
-msgstr ""
+msgstr "Honi buruz"
#: editor/editor_node.cpp
msgid "Play the project."
@@ -2978,7 +2973,7 @@ msgstr ""
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
-msgstr ""
+msgstr "Ireki aktiboen liburutegia"
#: editor/editor_node.cpp
msgid "Open the next Editor"
@@ -3204,7 +3199,7 @@ msgstr ""
#: editor/editor_run_script.cpp
msgid "There is an edited scene already."
-msgstr ""
+msgstr "Badago editatutako eszena bat."
#: editor/editor_run_script.cpp
msgid "Couldn't instance script:"
@@ -3216,44 +3211,48 @@ msgstr ""
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
-msgstr ""
+msgstr "Ezin izan da scripta exekutatu:"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
-msgstr ""
+msgstr "Hautatu inportatu nahi dituzun nodoak"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
msgid "Browse"
-msgstr ""
+msgstr "Arakatu"
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
-msgstr ""
+msgstr "Eszenaren bidea:"
#: editor/editor_sub_scene.cpp
msgid "Import From Node:"
-msgstr ""
+msgstr "Inportatu nodotik:"
#: editor/export_template_manager.cpp
msgid "Redownload"
-msgstr ""
+msgstr "Berriro jaitsi"
#: editor/export_template_manager.cpp
msgid "Uninstall"
-msgstr ""
+msgstr "Desinstalatu"
#: editor/export_template_manager.cpp
msgid "(Installed)"
-msgstr ""
+msgstr "(Instalatuta)"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download"
-msgstr ""
+msgstr "Jaitsi"
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -3261,11 +3260,11 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr ""
+msgstr "(Falta da)"
#: editor/export_template_manager.cpp
msgid "(Current)"
-msgstr ""
+msgstr "(Unekoa)"
#: editor/export_template_manager.cpp
msgid "Retrieving mirrors, please wait..."
@@ -3312,6 +3311,8 @@ msgid ""
"No download links found for this version. Direct download is only available "
"for official releases."
msgstr ""
+"Ez da bertsio hau jaisteko estekarik aurkitu. Deskarga zuzena bertsio "
+"ofizialentzat besterik ez dago."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3343,7 +3344,7 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Download Complete."
-msgstr ""
+msgstr "Jaitsiera osatuta."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
@@ -3395,11 +3396,11 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Downloading"
-msgstr ""
+msgstr "Jaisten"
#: editor/export_template_manager.cpp
msgid "Connection Error"
-msgstr ""
+msgstr "Konexio-errorea"
#: editor/export_template_manager.cpp
msgid "SSL Handshake Error"
@@ -3411,35 +3412,35 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Current Version:"
-msgstr ""
+msgstr "Uneko bertsioa:"
#: editor/export_template_manager.cpp
msgid "Installed Versions:"
-msgstr ""
+msgstr "Instalatutako bertsioak:"
#: editor/export_template_manager.cpp
msgid "Install From File"
-msgstr ""
+msgstr "Instalatu fitxategitik"
#: editor/export_template_manager.cpp
msgid "Remove Template"
-msgstr ""
+msgstr "Kendu txantiloia"
#: editor/export_template_manager.cpp
msgid "Select Template File"
-msgstr ""
+msgstr "Hautatu txantiloi fitxategia"
#: editor/export_template_manager.cpp
msgid "Godot Export Templates"
-msgstr ""
+msgstr "Godot esportazio-txantiloiak"
#: editor/export_template_manager.cpp
msgid "Export Template Manager"
-msgstr ""
+msgstr "Esportazio-txantiloi kudeatzailea"
#: editor/export_template_manager.cpp
msgid "Download Templates"
-msgstr ""
+msgstr "Jaitsi txantiloiak"
#: editor/export_template_manager.cpp
msgid "Select mirror from list: (Shift+Click: Open in Browser)"
@@ -3584,7 +3585,7 @@ msgstr ""
#: editor/filesystem_dock.cpp
msgid "Next Folder/File"
-msgstr ""
+msgstr "Hurrengo karpeta/fitxategia"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
@@ -3596,17 +3597,19 @@ msgstr ""
#: editor/filesystem_dock.cpp
msgid "Search files"
-msgstr ""
+msgstr "Bilatu fitxategiak"
#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
msgstr ""
+"Fitxategiak arakatzen,\n"
+"Itxaron mesedez..."
#: editor/filesystem_dock.cpp
msgid "Move"
-msgstr ""
+msgstr "Mugitu"
#: editor/filesystem_dock.cpp
msgid "There is already file or folder with the same name in this location."
@@ -3806,12 +3809,16 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
msgid "%d Files"
-msgstr ""
+msgstr "%d fitxategi"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
@@ -3835,7 +3842,7 @@ msgstr ""
#: editor/import_dock.cpp
msgid "Save Scenes, Re-Import, and Restart"
-msgstr ""
+msgstr "Gorde eszenak, berriro inportatu eta berrabiarazi"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
@@ -3845,6 +3852,8 @@ msgstr ""
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"ABISUA: Baliabide hau darabiltzaten aktiboak daude, kargatzeari utzi "
+"liezaiokete."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -4040,7 +4049,7 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Add Animation Point"
-msgstr ""
+msgstr "Gehitu animazio puntua"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Remove BlendSpace1D Point"
@@ -4072,7 +4081,7 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
msgid "Enable snap and show grid."
-msgstr ""
+msgstr "Gaitu atxikitzea eta erakutsi sareta."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4247,7 +4256,7 @@ msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Enable Filtering"
-msgstr ""
+msgstr "Gaitu iragazkia"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Toggle Autoplay"
@@ -4255,38 +4264,38 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Animation Name:"
-msgstr ""
+msgstr "Animazio berriaren izena:"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Anim"
-msgstr ""
+msgstr "Animazio berria"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Change Animation Name:"
-msgstr ""
+msgstr "Aldatu animazioaren izena:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Delete Animation?"
-msgstr ""
+msgstr "Ezabatu animazioa?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Remove Animation"
-msgstr ""
+msgstr "Kendu animazioa"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Invalid animation name!"
-msgstr ""
+msgstr "Animazio izen baliogabea!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation name already exists!"
-msgstr ""
+msgstr "Animazio izena existitzen da jada!"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Rename Animation"
-msgstr ""
+msgstr "Aldatu izena animazioari"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Next Changed"
@@ -4298,31 +4307,31 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Load Animation"
-msgstr ""
+msgstr "Kargatu animazioa"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Duplicate Animation"
-msgstr ""
+msgstr "Bikoiztu animazioa"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation to copy!"
-msgstr ""
+msgstr "Ez dago animaziorik kopiatzeko!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation resource on clipboard!"
-msgstr ""
+msgstr "Ez dago animazio baliabiderik arbelean!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pasted Animation"
-msgstr ""
+msgstr "Itsatsitako animazioa"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Paste Animation"
-msgstr ""
+msgstr "Itsatsi animazioa"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation to edit!"
-msgstr ""
+msgstr "Ez dago animaziorik editatzeko!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from current pos. (A)"
@@ -4662,7 +4671,7 @@ msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend4 Node"
-msgstr ""
+msgstr "Blend4 nodoa"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeScale Node"
@@ -4674,51 +4683,51 @@ msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Transition Node"
-msgstr ""
+msgstr "Trantsizio nodoa"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Import Animations..."
-msgstr ""
+msgstr "Inportatu animazioak..."
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Node Filters"
-msgstr ""
+msgstr "Editatu nodo-iragazkiak"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Filters..."
-msgstr ""
+msgstr "Iragazkiak..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
-msgstr ""
+msgstr "Edukiak:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "View Files"
-msgstr ""
+msgstr "Ikusi fitxategiak"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Konexio errorea, saiatu berriro."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect to host:"
-msgstr ""
+msgstr "Ezin da ostalariarekin konektatu:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Ostalariaren erantzunik ez:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "Ezin duzu ostalariaren izena ebatzi:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, return code:"
-msgstr ""
+msgstr "Eskaerak huts egin du, itzulera-kodea:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed."
-msgstr ""
+msgstr "Eskaerak huts egin du."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Cannot save response to:"
@@ -4746,7 +4755,7 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "Jaitsiera hash okerra, fitxategia aldatua izan delakoan."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Expected:"
@@ -4762,15 +4771,15 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Aktiboaren jaitsiera errorea:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading (%s / %s)..."
-msgstr ""
+msgstr "Jaisten (%s / %s)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading..."
-msgstr ""
+msgstr "Jaisten..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Resolving..."
@@ -4794,11 +4803,11 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download Error"
-msgstr ""
+msgstr "Jaitsiera errorea"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Aktibo honen jaitsiera abian da jada!"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Recently Updated"
@@ -4887,7 +4896,7 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr ""
+msgstr "Aktiboen ZIP fitxategia"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -4917,7 +4926,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap"
-msgstr ""
+msgstr "Konfiguratu atxikitzea"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Offset:"
@@ -5222,72 +5231,72 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle smart snapping."
-msgstr ""
+msgstr "Txandakatu atxikitze adimentsua."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Smart Snap"
-msgstr ""
+msgstr "Erabili atxikitze adimentsua"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle grid snapping."
-msgstr ""
+msgstr "Txandakatu saretara atxikitzea."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Grid Snap"
-msgstr ""
+msgstr "Erabili saretara atxikitzea"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snapping Options"
-msgstr ""
+msgstr "Atxikitze aukerak"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
-msgstr ""
+msgstr "Erabili biraketa atxikitzea"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Scale Snap"
-msgstr ""
+msgstr "Erabili eskala atxikitzea"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
-msgstr ""
+msgstr "Atxikitze erlatiboa"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Pixel Snap"
-msgstr ""
+msgstr "Erabili pixel atxikitzea"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Smart Snapping"
-msgstr ""
+msgstr "Atxikitze adimentsua"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Configure Snap..."
-msgstr ""
+msgstr "Konfiguratu atxikitzea..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Parent"
-msgstr ""
+msgstr "Atxikitu gurasora"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Node Anchor"
-msgstr ""
+msgstr "Atxikitu nodoaren aingurara"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Node Sides"
-msgstr ""
+msgstr "Atxikitu nodoaren ertzetara"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Node Center"
-msgstr ""
+msgstr "Atxikitu nodoaren zentrora"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Other Nodes"
-msgstr ""
+msgstr "Atxikitu beste nodoetara"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Guides"
-msgstr ""
+msgstr "Atxikitu gidalerroetara"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6298,11 +6307,11 @@ msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Snap"
-msgstr ""
+msgstr "Atxikitu"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Enable Snap"
-msgstr ""
+msgstr "Gaitu atxikitzea"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid"
@@ -6416,7 +6425,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme."
-msgstr ""
+msgstr "Errorea azala gordetzean."
#: editor/plugins/script_editor_plugin.cpp
msgid "Error Saving"
@@ -6424,7 +6433,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Error importing theme."
-msgstr ""
+msgstr "Errorea azala inportatzean."
#: editor/plugins/script_editor_plugin.cpp
msgid "Error Importing"
@@ -6461,11 +6470,11 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme"
-msgstr ""
+msgstr "Inportatu azala"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
-msgstr ""
+msgstr "Errorea azala gordetzean"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving"
@@ -6473,7 +6482,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme As..."
-msgstr ""
+msgstr "Gorde azala honela..."
#: editor/plugins/script_editor_plugin.cpp
msgid "%s Class Reference"
@@ -6560,19 +6569,19 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
-msgstr ""
+msgstr "Azala"
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme..."
-msgstr ""
+msgstr "Inportatu azala..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload Theme"
-msgstr ""
+msgstr "Birkargatu azala"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme"
-msgstr ""
+msgstr "Gorde azala"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close All"
@@ -6677,11 +6686,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7151,12 +7160,21 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Snap Nodes To Floor"
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Atxikitu nodoak lurrera"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Couldn't find a solid floor to snap the selection to."
-msgstr ""
+msgstr "Ez da hautapena atxikitzeko lur trinkorik aurkitu."
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -7171,7 +7189,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Snap"
-msgstr ""
+msgstr "Erabili atxikitzea"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -7224,7 +7242,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Object to Floor"
-msgstr ""
+msgstr "Atxikitu objektua lurrera"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
@@ -7273,19 +7291,19 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Settings"
-msgstr ""
+msgstr "Atxikitze ezarpenak"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate Snap:"
-msgstr ""
+msgstr "Translazio atzikitzea:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
-msgstr ""
+msgstr "Biratze atxikitzea (graduak):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
-msgstr ""
+msgstr "Eskala atxikitzea (%):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Viewport Settings"
@@ -7553,7 +7571,7 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
-msgstr ""
+msgstr "Atxikitze modua:"
#: editor/plugins/texture_region_editor_plugin.cpp
#: scene/resources/visual_shader.cpp
@@ -7562,11 +7580,11 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Pixel Snap"
-msgstr ""
+msgstr "Pixel atxikitzea"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Grid Snap"
-msgstr ""
+msgstr "Sareta atxikitzea"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Auto Slice"
@@ -7598,19 +7616,19 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
-msgstr ""
+msgstr "Kendu elementu guztiak"
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
msgid "Remove All"
-msgstr ""
+msgstr "Kendu guztiak"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Edit Theme"
-msgstr ""
+msgstr "Editatu azala"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme editing menu."
-msgstr ""
+msgstr "Azalaren edizio menua."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -7630,7 +7648,7 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create From Current Editor Theme"
-msgstr ""
+msgstr "Sortu editorearen uneko azaletik"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Toggle Button"
@@ -7739,7 +7757,7 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme File"
-msgstr ""
+msgstr "Azal fitxategia"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
@@ -7963,6 +7981,7 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Enable snap and show grid (configurable via the Inspector)."
msgstr ""
+"Gaitu atxikitzea eta erakutsi sareta (Inspektorearen bidez konfiguragarria)."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Display Tile Names (Hold Alt Key)"
@@ -9149,7 +9168,7 @@ msgstr ""
#: editor/project_export.cpp
msgid "Features"
-msgstr ""
+msgstr "Ezaugarriak"
#: editor/project_export.cpp
msgid "Custom (comma-separated):"
@@ -9157,11 +9176,11 @@ msgstr ""
#: editor/project_export.cpp
msgid "Feature List:"
-msgstr ""
+msgstr "Ezaugarri zerrenda:"
#: editor/project_export.cpp
msgid "Script"
-msgstr ""
+msgstr "Scripta"
#: editor/project_export.cpp
msgid "Script Export Mode:"
@@ -9169,11 +9188,11 @@ msgstr ""
#: editor/project_export.cpp
msgid "Text"
-msgstr ""
+msgstr "Testua"
#: editor/project_export.cpp
msgid "Compiled"
-msgstr ""
+msgstr "Konpilatuta"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
@@ -9229,7 +9248,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Error opening package file (it's not in ZIP format)."
-msgstr ""
+msgstr "Errorea pakete fitxategia irekitzean (ez dago ZIP formatuan)."
#: editor/project_manager.cpp
msgid ""
@@ -9242,7 +9261,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr ""
+msgstr "Aukeratu \"project.godot\" edo \".zip\" fitxategia."
#: editor/project_manager.cpp
msgid "This directory already contains a Godot project."
@@ -9425,6 +9444,8 @@ msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
+"Ezin da proiektua exekutatu: Aktiboak inportatu behar dira.\n"
+"Editatu proiektua hasierako inportazioa abiatzeko."
#: editor/project_manager.cpp
msgid "Are you sure to run %d projects at once?"
@@ -9505,6 +9526,8 @@ msgid ""
"You currently don't have any projects.\n"
"Would you like to explore official example projects in the Asset Library?"
msgstr ""
+"Orain ez duzu proiekturik.\n"
+"Adibide ofizialak arakatu nahi dituzu aktiboen liburutegian?"
#: editor/project_manager.cpp
msgid ""
@@ -9899,7 +9922,7 @@ msgstr ""
#: editor/rename_dialog.cpp
msgid "Use Regular Expressions"
-msgstr ""
+msgstr "Erabili adierazpen erregularrak"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -9975,7 +9998,7 @@ msgstr ""
#: editor/rename_dialog.cpp
msgid "PascalCase to snake_case"
-msgstr ""
+msgstr "PascalCase snake_case-ra"
#: editor/rename_dialog.cpp
msgid "snake_case to PascalCase"
@@ -9999,7 +10022,7 @@ msgstr ""
#: editor/rename_dialog.cpp
msgid "Regular Expression Error"
-msgstr ""
+msgstr "Adierazpen erregularraren errorea"
#: editor/rename_dialog.cpp
msgid "At character %s"
@@ -10068,8 +10091,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Scripta"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10226,6 +10250,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10272,11 +10303,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10396,6 +10427,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10436,6 +10471,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -10445,7 +10484,7 @@ msgstr ""
#: editor/script_create_dialog.cpp
msgid "Script path/name is valid."
-msgstr ""
+msgstr "Scriptaren bidea/izena baliozkoa da."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10472,6 +10511,8 @@ msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
msgstr ""
+"Oharra: Inkorporatutako gidoiek muga batzuk dituzte eta ezin dira editatu "
+"kanpoko editore batekin."
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -10595,7 +10636,7 @@ msgstr ""
#: editor/script_editor_debugger.cpp
msgid "Export list to a CSV file"
-msgstr ""
+msgstr "Esportatu zerrenda CSV fitxategi batera"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -10871,7 +10912,7 @@ msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Snap View"
-msgstr ""
+msgstr "Atxikitu ikuspegia"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Disabled"
@@ -11460,6 +11501,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11483,6 +11528,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index 2754720d3b..3f94d1112b 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -871,7 +871,6 @@ msgstr "اتصال سیگنال:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1503,18 +1502,9 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "مسیر نامعتبر."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "پرونده موجود نیست."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "در مسیرِ منبع نیست."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2493,11 +2483,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "باز کردن صحنه"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2773,10 +2766,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3413,6 +3402,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "انتخاب گره (ها) برای وارد شدن"
@@ -4045,6 +4038,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -7088,15 +7085,15 @@ msgid ""
msgstr "'s%' را از 's%' جدا کن"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "خط:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "افزودن وظیفه"
@@ -7593,6 +7590,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10691,8 +10697,8 @@ msgstr "ارث‌بری صحنهٔ فرزند"
#: editor/scene_tree_dock.cpp
#, fuzzy
-msgid "Clear Script"
-msgstr "صحنه جدید"
+msgid "Detach Script"
+msgstr "پیوست کردن اسکریپت"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10861,6 +10867,13 @@ msgid "Open Documentation"
msgstr "شمارش ها"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "افزودن گره فرزند"
@@ -10910,11 +10923,13 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "پیوست کردن یک اسکریپت جدید یا از پیش موجود برای گره انتخابی."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "حذف یک اسکریپت برای گره انتخابی."
#: editor/scene_tree_dock.cpp
@@ -11043,6 +11058,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "پرونده موجود نیست."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "باید از یک پسوند معتبر استفاده شود."
@@ -11091,6 +11110,11 @@ msgstr "فایل وجود دارد، آیا بازنویسی شود؟"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "مسیر نامعتبر."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "نام نامعتبر."
@@ -12200,6 +12224,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12224,6 +12252,32 @@ msgstr "نام نامعتبر."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12952,6 +13006,13 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "در مسیرِ منبع نیست."
+
+#, fuzzy
+#~ msgid "Clear Script"
+#~ msgstr "صحنه جدید"
+
#~ msgid "Replaced %d occurrence(s)."
#~ msgstr "تعداد d% رخداد جایگزین شد."
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index 6695783866..a95c65be41 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-01 11:42+0000\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
"Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
@@ -24,7 +24,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -839,7 +839,6 @@ msgstr "Ei voida yhdistää signaalia"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1453,17 +1452,9 @@ msgstr "Ota käyttöön"
msgid "Rearrange Autoloads"
msgstr "Järjestele uudelleen automaattiset lataukset"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Virheellinen polku."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Tiedostoa ei ole olemassa."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Ei löytynyt resurssipolusta."
+msgid "Can't add autoload:"
+msgstr "Ei voida lisätä automaattisesti ladattavaa:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1579,8 +1570,8 @@ msgid ""
"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
"Enabled'."
msgstr ""
-"GLES2 vara-ajuri tarvitsee kohdealustalla 'ETC' tekstuuripakkausta. Kytke "
-"'Import Etc' päälle projektin asetuksista tai poista 'Driver Fallback "
+"GLES2 vara-ajuri tarvitsee kohdealustalla 'ETC' tekstuuripakkausta.\n"
+"Kytke 'Import Etc' päälle projektin asetuksista tai poista 'Driver Fallback "
"Enabled' asetus."
#: editor/editor_export.cpp platform/android/export/export.cpp
@@ -1970,7 +1961,7 @@ msgstr "Teeman ominaisuudet"
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr "Enumeraatiot"
+msgstr "Luetteloinnit"
#: editor/editor_help.cpp
msgid "Constants"
@@ -2421,12 +2412,17 @@ msgid "Can't reload a scene that was never saved."
msgstr "Ei voida ladata uudelleen skeneä, jota ei ole koskaan tallennettu."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Palauta"
+msgid "Reload Saved Scene"
+msgstr "Avaa uudelleen tallennettu skene"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Tätä toimintoa ei voida peruttaa. Palauta joka tapauksessa?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"Nykyisessä skenessä on tallentamattomia muutoksia.\n"
+"Avataanko tallennettu skene uudelleen siitä huolimatta? Tätä toimintoa ei "
+"voi perua."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2708,10 +2704,6 @@ msgid "Redo"
msgstr "Tee uudelleen"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Palauta skene"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Sekalaiset projekti- tai skenetyökalut."
@@ -3357,6 +3349,12 @@ msgstr "Skriptiä ei voitu suorittaa:"
msgid "Did you forget the '_run' method?"
msgstr "Unohditko '_run' metodin?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Pidä Ctrl pohjassa pyöristääksesi kokonaislukuun. Pidä Shift pohjassa "
+"tarkempia muutoksia varten."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Valitse tuotavat solmut"
@@ -3953,6 +3951,11 @@ msgid "Error running post-import script:"
msgstr "Virhe ajettaessa tuonnin jälkeistä skriptiä:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+"Palautitko Node-solmusta periytyvän objektin `post_import()` metodissa?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Tallennetaan..."
@@ -6905,12 +6908,12 @@ msgstr ""
"Yhdistetty metodi '%s' signaalille '%s' puuttuu solmusta '%s' solmuun '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Rivi"
+msgid "[Ignore]"
+msgstr "[Sivuuta]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(sivuuta)"
+msgid "Line"
+msgstr "Rivi"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7384,6 +7387,21 @@ msgid "XForm Dialog"
msgstr "XForm-ikkuna"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Napsauta vaihtaaksesi näkyvyystilojen välillä.\n"
+"\n"
+"Avoin silmä: muokkain on näkyvissä.\n"
+"Suljettu silmä: muokkain on piilotettu.\n"
+"Puoliavoin silmä: muokkain on näkyvissä myös läpikuultamattomien pintojen "
+"läpi (\"röntgen\")."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Tarraa solmut lattiaan"
@@ -8795,7 +8813,7 @@ msgstr "E-vakio (2.718282). Kuvastaa luonnollisen logaritmin kantalukua."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Epsilon constant (0.00001). Smallest possible scalar number."
-msgstr "Epsilon-vakio (0.00001). Pienin mahdollinen skaalariluku."
+msgstr "Epsilon-vakio (0.00001). Pienin mahdollinen skaalariluku."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Phi constant (1.618034). Golden ratio."
@@ -9277,7 +9295,7 @@ msgid ""
"direction of camera (pass associated inputs to it)."
msgstr ""
"Palauttaa valovähentymän perustuen pinnan normaalivektorin ja kameran "
-"suuntavektorin pistetuloon (välitä nämä syötteinä)."
+"suuntavektorin pistetuloon (välitä sille liittyvät syötteet)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -10468,8 +10486,8 @@ msgid "Instance Child Scene"
msgstr "Luo aliskenen ilmentymä"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Poista skripti"
+msgid "Detach Script"
+msgstr "Irrota skripti"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10637,6 +10655,16 @@ msgid "Open Documentation"
msgstr "Avaa dokumentaatio"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"Ei voida liittää skriptiä: yhtään kieltä ei ole rekisteröity.\n"
+"Tämä johtuu luultavasti siitä, että editori on käännetty ilman yhtäkään "
+"kielimoduulia."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Lisää alisolmu"
@@ -10685,12 +10713,12 @@ msgstr ""
"juurisolmua ei ole olemassa."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr "Liitä uusi tai olemassa oleva skripti valitulle solmulle."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Poista skripti valitulta solmulta."
+msgid "Detach the script from the selected node."
+msgstr "Irrota skripti valitusta solmusta."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10821,6 +10849,10 @@ msgid "A directory with the same name exists."
msgstr "Samanniminen hakemisto on jo olemassa."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Tiedostoa ei ole olemassa."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Virheellinen tiedostopääte."
@@ -10861,6 +10893,10 @@ msgid "File exists, it will be reused."
msgstr "Tiedosto on jo olemassa, se käytetään uudelleen."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Virheellinen polku."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Virheellinen luokan nimi."
@@ -11910,6 +11946,10 @@ msgstr ""
"Debug keystore ei ole määritettynä editorin asetuksissa eikä esiasetuksissa."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr "Release keystore on konfiguroitu väärin viennin esiasetuksissa."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Mukautettu käännös edellyttää kelvollista Android SDK -polkua editorin "
@@ -11939,6 +11979,42 @@ msgstr "Virheellinen paketin nimi:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"\"android/modules\" projektiasetukseen on liitetty virheellinen "
+"\"GodotPaymentV3\" moduuli (muuttunut Godotin versiossa 3.2.2).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+"\"Use Custom Build\" asetuksen täytyy olla päällä, jotta liittännäisiä voi "
+"käyttää."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"\"Degrees Of Freedom\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" asetus "
+"on \"Oculus Mobile VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Hand Tracking\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" asetus on "
+"\"Oculus Mobile VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Focus Awareness\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" asetus on "
+"\"Oculus Mobile VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12669,8 +12745,8 @@ msgid ""
"Default Environment as specified in Project Settings (Rendering -> "
"Environment -> Default Environment) could not be loaded."
msgstr ""
-"Projektin asetuksissa määriteltyä oletusympäristöä (Rendering -> "
-"Environment -> Default Environment) ei voitu ladata."
+"Projektin asetuksissa määriteltyä oletusympäristöä (Rendering -> Environment "
+"-> Default Environment) ei voitu ladata."
#: scene/main/viewport.cpp
msgid ""
@@ -12717,6 +12793,21 @@ msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa."
msgid "Constants cannot be modified."
msgstr "Vakioita ei voi muokata."
+#~ msgid "Not in resource path."
+#~ msgstr "Ei löytynyt resurssipolusta."
+
+#~ msgid "Revert"
+#~ msgstr "Palauta"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Tätä toimintoa ei voida peruttaa. Palauta joka tapauksessa?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Palauta skene"
+
+#~ msgid "Clear Script"
+#~ msgstr "Poista skripti"
+
#~ msgid "Issue Tracker"
#~ msgstr "Ilmoita viasta"
diff --git a/editor/translations/fil.po b/editor/translations/fil.po
index 32405930ea..920b91a30c 100644
--- a/editor/translations/fil.po
+++ b/editor/translations/fil.po
@@ -822,7 +822,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1422,16 +1421,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2352,11 +2343,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2622,10 +2615,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3233,6 +3222,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3817,6 +3810,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6693,11 +6690,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7167,6 +7164,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10087,7 +10093,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10245,6 +10251,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10291,11 +10304,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10415,6 +10428,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10455,6 +10472,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11484,6 +11505,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11507,6 +11532,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index bb371b7674..fac3b9b84b 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -42,7 +42,7 @@
# Xananax <xananax@yelostudio.com>, 2017-2018.
# Perrier Mathis <mathis.perrier73@gmail.com>, 2018.
# Ewan Lehnebach <ewan.lehnebach@gmail.com>, 2018.
-# Hugo Locurcio <hugo.locurcio@hugo.pro>, 2018, 2019.
+# Hugo Locurcio <hugo.locurcio@hugo.pro>, 2018, 2019, 2020.
# Grigore Antoniuc <grisa181@gmail.com>, 2018.
# x2f <x.defoy@gmail.com>, 2018.
# LittleWhite <lw.demoscene@googlemail.com>, 2018.
@@ -72,12 +72,15 @@
# Pierre Caye <pierrecaye@laposte.net>, 2020.
# Kevin Bouancheau <kevin.bouancheau@gmail.com>, 2020.
# LaurentOngaro <laurent@gameamea.com>, 2020.
+# Julien Humbert <julroy67@gmail.com>, 2020.
+# Nathan <bonnemainsnathan@gmail.com>, 2020.
+# Léo Vincent <l009.vincent@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-05 14:01+0000\n"
-"Last-Translator: Anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: Nathan <bonnemainsnathan@gmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -101,7 +104,7 @@ msgstr "Une chaîne de caractères de longueur 1 est attendue (un caractère)."
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "Pas assez d'octets pour le décodage, ou format non valide."
+msgstr "Pas assez d’octets pour le décodage, ou format non valide."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
@@ -109,7 +112,7 @@ msgstr "Entrée non valide %i (non transmise) dans l’expression"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self ne peut être utilisé car l'instance est nulle (non passée)"
+msgstr "self ne peut être utilisé car l’instance est nulle (non transmise)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -129,7 +132,7 @@ msgstr "Arguments invalides pour construire '%s'"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr "Lors de l'appel à '%s' :"
+msgstr "Lors de l’appel à '%s' :"
#: core/ustring.cpp
msgid "B"
@@ -201,60 +204,60 @@ msgstr "Déplacer des points de Bézier"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr "Dupliquer les clés d'animation"
+msgstr "Dupliquer les clés d’animation"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Delete Keys"
-msgstr "Supprimer les clés d'animation"
+msgstr "Supprimer les clés d’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr "Modifier le temps de l'image-clé"
+msgstr "Modifier le temps de l’image-clé"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "Changer la transition de l'animation"
+msgstr "Changer la transition de l’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr "Changer la transformation de l'animation"
+msgstr "Changer la transformation de l’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Value"
-msgstr "Changer la valeur de l'image-clé de l'animation"
+msgstr "Changer la valeur de l’image-clé de l’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
-msgstr "Changer l'appel de l'animation"
+msgstr "Changer l’appel de l’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
-msgstr "Modification du temps de l'image-clé"
+msgstr "Modification du temps de l’image-clé"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transition"
-msgstr "Changer la transition de l'animation"
+msgstr "Changer la transition de l’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transform"
-msgstr "Changer le Transform de l'animation"
+msgstr "Changer le Transform de l’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Value"
-msgstr "Changer la valeur de l'image-clé de l'animation"
+msgstr "Changer la valeur de l’image-clé de l’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Call"
-msgstr "Changer l'appel de l'animation"
+msgstr "Changer l’appel de l’animation"
#: editor/animation_track_editor.cpp
msgid "Change Animation Length"
-msgstr "Modifier la durée de l'animation"
+msgstr "Modifier la durée de l’animation"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr "Changer la boucle d'animation"
+msgstr "Changer la boucle d’animation"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -266,7 +269,7 @@ msgstr "Piste de transformation 3D"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr "Piste d'appel de méthode"
+msgstr "Piste d’appel de méthode"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
@@ -278,15 +281,15 @@ msgstr "Piste de lecture audio"
#: editor/animation_track_editor.cpp
msgid "Animation Playback Track"
-msgstr "Piste de lecture d'animation"
+msgstr "Piste de lecture d’animation"
#: editor/animation_track_editor.cpp
msgid "Animation length (frames)"
-msgstr "Durée de l'animation (en images)"
+msgstr "Durée de l’animation (en images)"
#: editor/animation_track_editor.cpp
msgid "Animation length (seconds)"
-msgstr "Durée de l'animation (en secondes)"
+msgstr "Durée de l’animation (en secondes)"
#: editor/animation_track_editor.cpp
msgid "Add Track"
@@ -294,7 +297,7 @@ msgstr "Ajouter une piste"
#: editor/animation_track_editor.cpp
msgid "Animation Looping"
-msgstr "Bouclage de l'animation"
+msgstr "Bouclage de l’animation"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -307,7 +310,7 @@ msgstr "Clips audio :"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
-msgstr "Clips d'animation :"
+msgstr "Clips d’animation :"
#: editor/animation_track_editor.cpp
msgid "Change Track Path"
@@ -323,7 +326,7 @@ msgstr "Mode de mise à jour (comment cette propriété est définie)"
#: editor/animation_track_editor.cpp
msgid "Interpolation Mode"
-msgstr "Mode d'interpolation"
+msgstr "Mode d’interpolation"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
@@ -335,7 +338,7 @@ msgstr "Supprime cette piste."
#: editor/animation_track_editor.cpp
msgid "Time (s): "
-msgstr "Temps (s): "
+msgstr "Temps (s) : "
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
@@ -372,11 +375,11 @@ msgstr "Cubique"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
-msgstr "Limiter l'interpolation de la boucle"
+msgstr "Limiter l’interpolation de la boucle"
#: editor/animation_track_editor.cpp
msgid "Wrap Loop Interp"
-msgstr "Envelopper l'interp. de la boucle"
+msgstr "Envelopper l’interp. de la boucle"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -393,19 +396,19 @@ msgstr "Supprimer clé(s)"
#: editor/animation_track_editor.cpp
msgid "Change Animation Update Mode"
-msgstr "Modifier le mode de mise à jour de l'animation"
+msgstr "Modifier le mode de mise à jour de l’animation"
#: editor/animation_track_editor.cpp
msgid "Change Animation Interpolation Mode"
-msgstr "Modifier le mode d'interpolation de l'animation"
+msgstr "Modifier le mode d’interpolation de l’animation"
#: editor/animation_track_editor.cpp
msgid "Change Animation Loop Mode"
-msgstr "Modifier le mode de boucle d'animation"
+msgstr "Modifier le mode de boucle d’animation"
#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
-msgstr "Supprimer la piste d'animation"
+msgstr "Supprimer la piste d’animation"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
@@ -434,7 +437,7 @@ msgstr "Insérer une animation"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
msgstr ""
-"Un AnimationPlayer ne peut s'animer lui-même, seulement les autres lecteurs."
+"Un AnimationPlayer ne peut s’animer lui-même, seulement les autres lecteurs."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -442,15 +445,15 @@ msgstr "Créer et insérer une animation"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Track & Key"
-msgstr "Insérer une piste et clé d'animation"
+msgstr "Insérer une piste et clé d’animation"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Key"
-msgstr "Insérer une clé d'animation"
+msgstr "Insérer une clé d’animation"
#: editor/animation_track_editor.cpp
msgid "Change Animation Step"
-msgstr "Modifier l'étape d'animation"
+msgstr "Modifier l’étape d’animation"
#: editor/animation_track_editor.cpp
msgid "Rearrange Tracks"
@@ -459,7 +462,7 @@ msgstr "Réorganiser les pistes"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
-"Les pistes de transformation ne s'appliquent qu'aux nœuds basés sur Spatial."
+"Les pistes de transformation ne s’appliquent qu’aux nœuds basés sur Spatial."
#: editor/animation_track_editor.cpp
msgid ""
@@ -476,17 +479,17 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
msgstr ""
-"Les pistes d'animation ne peuvent pointer que sur des nœuds AnimationPlayer."
+"Les pistes d’animation ne peuvent pointer que sur des nœuds AnimationPlayer."
#: editor/animation_track_editor.cpp
msgid "An animation player can't animate itself, only other players."
msgstr ""
-"Un lecteur d'animation ne peut s'animer lui-même, seulement les autres "
+"Un lecteur d’animation ne peut s’animer lui-même, seulement les autres "
"lecteurs."
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr "Impossible d'ajouter une nouvelle piste sans racine"
+msgstr "Impossible d’ajouter une nouvelle piste sans racine"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
@@ -498,11 +501,11 @@ msgstr "Ajouter une piste de Bézier"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
-msgstr "Le chemin de la piste est invalide, impossible d'ajouter une clé."
+msgstr "Le chemin de la piste est invalide, impossible d’ajouter une clé."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr "La piste n'est pas de type Spatial, impossible d'insérer une clé"
+msgstr "La piste n’est pas de type Spatial, impossible d’insérer une clé"
#: editor/animation_track_editor.cpp
msgid "Add Transform Track Key"
@@ -515,7 +518,7 @@ msgstr "Ajoutez une clé de piste"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
-"Le chemin de la piste est invalide, impossible d'ajouter une clé d'appel de "
+"Le chemin de la piste est invalide, impossible d’ajouter une clé d’appel de "
"méthode."
#: editor/animation_track_editor.cpp
@@ -524,11 +527,11 @@ msgstr "Ajouter une clé de méthode"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
-msgstr "Méthode introuvable dans l'objet : "
+msgstr "Méthode introuvable dans l’objet : "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
-msgstr "Déplacer les clés d'animation"
+msgstr "Déplacer les clés d’animation"
#: editor/animation_track_editor.cpp
msgid "Clipboard is empty"
@@ -540,14 +543,14 @@ msgstr "Coller pistes"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
-msgstr "Mettre à l'échelle les clés d'animation"
+msgstr "Mettre à l’échelle les clés d’animation"
#: editor/animation_track_editor.cpp
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
msgstr ""
-"Cette option ne fonctionne pas pour l'édition de courbes de Bézier car il ne "
-"s'agit que d'une seule piste."
+"Cette option ne fonctionne pas pour l’édition de courbes de Bézier car il ne "
+"s’agit que d’une seule piste."
#: editor/animation_track_editor.cpp
msgid ""
@@ -564,16 +567,16 @@ msgstr ""
"Cette animation appartient à une scène importée, donc les changements "
"apportés aux pistes importées ne seront pas sauvegardés.\n"
"\n"
-"Pour activer la possibilité d'ajouter des pistes personnalisées, naviguez "
-"dans les paramètres d'importation de la scène et définissez\n"
+"Pour activer la possibilité d’ajouter des pistes personnalisées, naviguez "
+"dans les paramètres d’importation de la scène et définissez\n"
"\"Animation > Stockage\" à \"Fichiers\", activez \"Animation > Garder Pistes "
"Courantes\" puis ré-importez.\n"
-"Alternativement, utilise un préréglage d'import qui importe les animations "
+"Alternativement, utilise un préréglage d’import qui importe les animations "
"dans des fichiers différents."
#: editor/animation_track_editor.cpp
msgid "Warning: Editing imported animation"
-msgstr "Avertissement : Édition d'une animation importée"
+msgstr "Avertissement : Édition d’une animation importée"
#: editor/animation_track_editor.cpp
msgid "Select an AnimationPlayer node to create and edit animations."
@@ -584,7 +587,7 @@ msgstr ""
msgid "Only show tracks from nodes selected in tree."
msgstr ""
"Afficher seulement les pistes provenant des nœuds sélectionnés dans "
-"l'arborescence."
+"l’arborescence."
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
@@ -914,7 +917,6 @@ msgstr "Impossible de connecter le signal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1528,17 +1530,9 @@ msgstr "Activer"
msgid "Rearrange Autoloads"
msgstr "Ré-organiser les AutoLoads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Chemin invalide."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Le fichier n'existe pas."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Pas dans le chemin de la ressource."
+msgid "Can't add autoload:"
+msgstr "Impossible d'ajouter le chargement automatique :"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1766,7 +1760,7 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Error saving profile to path: '%s'."
-msgstr "Erreur lors de l'enregistrement du profil au chemin: '%s'."
+msgstr "Erreur lors de l'enregistrement du profil au chemin : « %s »."
#: editor/editor_feature_profile.cpp
msgid "Unset"
@@ -1898,7 +1892,7 @@ msgstr "Enregistrer un fichier"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
-msgstr "Retour"
+msgstr "Retourner"
#: editor/editor_file_dialog.cpp
msgid "Go Forward"
@@ -1950,7 +1944,7 @@ msgstr "Rafraîchir les fichiers."
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
-msgstr "Ajouter ou supprimer des favoris le dossier courant."
+msgstr "Ajouter ou supprimer aux favoris le dossier courant."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Toggle the visibility of hidden files."
@@ -2126,7 +2120,7 @@ msgstr "Type de membre"
#: editor/editor_help_search.cpp
msgid "Class"
-msgstr "Classe :"
+msgstr "Classe"
#: editor/editor_help_search.cpp
msgid "Method"
@@ -2502,12 +2496,16 @@ msgid "Can't reload a scene that was never saved."
msgstr "Impossible de recharger une scène qui n'a jamais été sauvegardée."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Réinitialiser"
+msgid "Reload Saved Scene"
+msgstr "Recharger la scène sauvegardée"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Cette action ne peut être annulée. Réinitialiser quand même ?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"La scène actuelle contient des changements non sauvegardés.\n"
+"Recharger la scène quand même ? Cette action ne peut pas être annulée."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2806,10 +2804,6 @@ msgid "Redo"
msgstr "Refaire"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Réinitialiser la scène"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Outils divers liés au projet ou à la scène."
@@ -3461,6 +3455,12 @@ msgstr "Impossible d'exécuter le script :"
msgid "Did you forget the '_run' method?"
msgstr "Avez-vous oublié la méthode « _run » ?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Maintenir Ctrl pour arrondir à l'entier. Maintenir Maj pour des changements "
+"plus précis."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Sélectionner les nœuds à importer"
@@ -4063,6 +4063,11 @@ msgid "Error running post-import script:"
msgstr "Erreur d'exécution du script de post-importation :"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+"Avez-vous renvoyé un objet dérivé de Node dans la méthode `post_import()` ?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Enregistrement…"
@@ -4092,7 +4097,7 @@ msgstr "Réimporter"
#: editor/import_dock.cpp
msgid "Save Scenes, Re-Import, and Restart"
-msgstr "Sauvegarder les scènes, Réimporter, et Redémarrer"
+msgstr "Enregistrer les scènes, réimporter, puis redémarrer"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
@@ -5039,7 +5044,7 @@ msgstr "Attendu :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr "A:"
+msgstr "A :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
@@ -6078,7 +6083,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Collision Sibling"
-msgstr "Créer une unique collision convexe sœur"
+msgstr "Créer une seule collision convexe sœur"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6091,7 +6096,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Créer une collision convexe multiple sœur(s)"
+msgstr "Créer plusieurs collisions convexes sœurs"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6114,7 +6119,7 @@ msgid ""
msgstr ""
"Crée un maillage de contour statique. Le maillage de contour verra ses "
"normales inversées automatiquement.\n"
-"Cela peut être utilisé à la place de la propriété SpatialMaterial Grow "
+"Cela peut être utilisé à la place de la propriété Grow de SpatialMaterial "
"lorsque l'utilisation de cette propriété n'est pas possible."
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -6341,7 +6346,7 @@ msgstr "Volume"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Source: "
-msgstr "Source d'Émission: "
+msgstr "Source d'émission : "
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -7037,12 +7042,12 @@ msgstr ""
"nœud '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Ligne"
+msgid "[Ignore]"
+msgstr "[Ignorer]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignorer)"
+msgid "Line"
+msgstr "Ligne"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7412,7 +7417,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Auto Orthogonal Enabled"
-msgstr "Auto Orthogonal Activé"
+msgstr "Vue orthogonale automatique"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
@@ -7520,6 +7525,21 @@ msgid "XForm Dialog"
msgstr "Dialogue XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Cliquez pour modifier l'état de visibilité.\n"
+"\n"
+"Œil ouvert : Gizmo est visible.\n"
+"Œil fermé : Gizmo est masqué.\n"
+"Œil entrouvert : Gizmo est également visible à travers les surfaces opaques "
+"(« rayon x »)."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Aligner les nœuds avec le sol"
@@ -7759,7 +7779,7 @@ msgstr "Convertir en Mesh2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
-msgstr "Géométrie invalide, impossible de créer le polygone."
+msgstr "Géométrie invalide, impossible de créer le polygone."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Polygon2D"
@@ -9640,7 +9660,7 @@ msgstr "Fonctionnalités"
#: editor/project_export.cpp
msgid "Custom (comma-separated):"
-msgstr "Personnalisé (séparé par des virgules) :"
+msgstr "Personnalisé (séparé par des virgules) :"
#: editor/project_export.cpp
msgid "Feature List:"
@@ -9998,7 +10018,7 @@ msgid ""
msgstr ""
"Êtes vous certain de vouloir scanner %s dossiers à la recherche de projets "
"Godot existants ?\n"
-"Cela pourrait prendre prendre un moment."
+"Cela pourrait prendre un moment."
#: editor/project_manager.cpp
msgid "Project Manager"
@@ -10056,7 +10076,7 @@ msgid ""
msgstr ""
"La barre de recherche filtre les projets par leur nom et la dernière partie "
"de leur chemin d'accès.\n"
-"Pour filter les projects par leur nom et le chemin d'accès complet, la "
+"Pour filtrer les projets par leur nom et le chemin d'accès complet, la "
"recherche doit inclure au moins un caractère `/`."
#: editor/project_settings_editor.cpp
@@ -10553,11 +10573,11 @@ msgstr "Réinitialiser"
#: editor/rename_dialog.cpp
msgid "Regular Expression Error"
-msgstr "Erreur d'expression régulière"
+msgstr "Erreur dans l'expression régulière"
#: editor/rename_dialog.cpp
msgid "At character %s"
-msgstr "À caractère %s"
+msgstr "Au caractère %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10624,8 +10644,8 @@ msgid "Instance Child Scene"
msgstr "Instancier une scène enfant"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Supprimer le script"
+msgid "Detach Script"
+msgstr "Détacher le script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10791,6 +10811,16 @@ msgid "Open Documentation"
msgstr "Ouvrir la documentation"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"Impossible de joindre un script : aucune langue n'est enregistrée.\n"
+"C'est probablement parce que cet éditeur a été construit avec tous les "
+"modules de langue désactivés."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Ajouter un nœud enfant"
@@ -10839,12 +10869,12 @@ msgstr ""
"nœud racine n'existe."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr "Attacher un script (nouveau ou existant) pour le nœud sélectionné."
+msgid "Attach a new or existing script to the selected node."
+msgstr "Attacher un nouveau script ou un script existant au nœud sélectionné."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Effacer un script pour le nœud sélectionné."
+msgid "Detach the script from the selected node."
+msgstr "Détacher le script du nœud sélectionné."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10975,6 +11005,10 @@ msgid "A directory with the same name exists."
msgstr "Un dossier du même nom existe déjà."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Le fichier n'existe pas."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Extension invalide."
@@ -11015,6 +11049,10 @@ msgid "File exists, it will be reused."
msgstr "Le fichier existe, il sera réutilisé."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Chemin invalide."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nom de classe invalide."
@@ -11124,7 +11162,7 @@ msgstr "Copier l'erreur"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
-msgstr "Vidéo RAM"
+msgstr "Mémoire vidéo"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -11177,7 +11215,7 @@ msgstr "Total :"
#: editor/script_editor_debugger.cpp
msgid "Export list to a CSV file"
-msgstr "Exporter la liste en fichier CSV"
+msgstr "Exporter la liste vers un fichier CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -11365,7 +11403,7 @@ msgstr "Bibliothèque"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Libraries: "
-msgstr "Bibliothèques: "
+msgstr "Bibliothèques : "
#: modules/gdnative/register_types.cpp
msgid "GDNative"
@@ -11525,7 +11563,7 @@ msgstr "Remplir la sélection"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Settings"
-msgstr "Paramètres GridMap"
+msgstr "Paramètres GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Pick Distance:"
@@ -11634,7 +11672,7 @@ msgstr ""
#: modules/visual_script/visual_script.cpp
msgid "Node returned an invalid sequence output: "
-msgstr "Le nœud a retourné une séquence de sortie invalide: "
+msgstr "Le nœud a retourné une séquence de sortie invalide : "
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
@@ -11644,7 +11682,7 @@ msgstr ""
#: modules/visual_script/visual_script.cpp
msgid "Stack overflow with stack depth: "
-msgstr "Débordement de pile avec profondeur de pile: "
+msgstr "Débordement de pile avec profondeur de pile : "
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
@@ -11959,7 +11997,7 @@ msgstr "Modifier le membre"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable: "
-msgstr "Type d'entrée non itérable: "
+msgstr "Type d'entrée non itérable : "
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid"
@@ -11967,7 +12005,7 @@ msgstr "L'itérateur est devenu invalide"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid: "
-msgstr "L'itérateur est devenu invalide: "
+msgstr "L'itérateur est devenu invalide : "
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name."
@@ -11987,19 +12025,19 @@ msgstr "Nom de propriété invalide « %s » dans le nœud %s."
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
-msgstr ": Argument invalide de type: "
+msgstr ": Argument invalide de type : "
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid arguments: "
-msgstr ": Arguments invalides: "
+msgstr ": Arguments invalides : "
#: modules/visual_script/visual_script_nodes.cpp
msgid "VariableGet not found in script: "
-msgstr "VariableGet introuvable dans le script: "
+msgstr "VariableGet introuvable dans le script : "
#: modules/visual_script/visual_script_nodes.cpp
msgid "VariableSet not found in script: "
-msgstr "VariableSet introuvable dans le script: "
+msgstr "VariableSet introuvable dans le script : "
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -12076,6 +12114,12 @@ msgstr ""
"dans le préréglage."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"La clé de version n'est pas configurée correctement dans le préréglage "
+"d'exportation."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"La création d'une version personnalisée nécessite un chemin d'accès Android "
@@ -12105,6 +12149,40 @@ msgstr "Nom de paquet invalide :"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"Module \"GodotPaymentV3\" invalide inclus dans le paramétrage du projet "
+"\"android/modules\" (modifié dans Godot 3.2.2).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr "« Use Custom Build » doit être activé pour utiliser les plugins."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"« Degrés de liberté » est valide uniquement lorsque le « Mode Xr » est « "
+"Oculus Mobile VR »."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"« Suivi de la main » est valide uniquement lorsque le « Mode Xr » est « "
+"Oculus Mobile VR »."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"« Sensibilité de la mise au point » est valide uniquement lorsque le « Mode "
+"Xr » est « Oculus Mobile VR »."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12414,9 +12492,9 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Les changements de taille pour RigidBody2D (en mode caractère ou rigide) "
-"seront remplacés par le moteur physique lors de l'exécution. Modifiez la "
-"taille des formes de collision enfants à la place."
+"Les modifications de taille pour RigidBody2D (en mode caractère ou rigide) "
+"seront remplacées par le moteur physique lors de l'exécution. \n"
+"Modifiez la taille des formes de collision enfant à la place."
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
@@ -12497,7 +12575,7 @@ msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr "(Temps restant: %d:%02d s)"
+msgstr "(Temps restant : %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
@@ -12661,9 +12739,9 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Les changements de taille pour RigidBody (dans les modes caractère ou "
-"rigide) seront remplacés par le moteur physique lors de l'exécution. "
-"Modifiez la taille dans les formes de collision enfants à la place."
+"Les modifications de taille pour RigidBody (dans les modes caractère ou "
+"rigide) seront remplacées par le moteur physique lors de l'exécution.\n"
+"Modifiez la taille dans les formes de collision enfant à la place."
#: scene/3d/remote_transform.cpp
msgid ""
@@ -12912,6 +12990,21 @@ msgstr "Les variations ne peuvent être affectées que dans la fonction vertex."
msgid "Constants cannot be modified."
msgstr "Les constantes ne peuvent être modifiées."
+#~ msgid "Not in resource path."
+#~ msgstr "Pas dans le chemin de la ressource."
+
+#~ msgid "Revert"
+#~ msgstr "Réinitialiser"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Cette action ne peut être annulée. Réinitialiser quand même ?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Réinitialiser la scène"
+
+#~ msgid "Clear Script"
+#~ msgstr "Supprimer le script"
+
#~ msgid "Issue Tracker"
#~ msgstr "Traqueur de problèmes"
diff --git a/editor/translations/ga.po b/editor/translations/ga.po
index 7b271f6a77..b9e6ba69c6 100644
--- a/editor/translations/ga.po
+++ b/editor/translations/ga.po
@@ -2,11 +2,11 @@
# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
-# Rónán Quill <ronan085@gmail.com>, 2019.
+# Rónán Quill <ronan085@gmail.com>, 2019, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2019-08-04 14:22+0000\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
"Last-Translator: Rónán Quill <ronan085@gmail.com>\n"
"Language-Team: Irish <https://hosted.weblate.org/projects/godot-engine/godot/"
"ga/>\n"
@@ -15,7 +15,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :"
"(n>6 && n<11) ? 3 : 4;\n"
-"X-Generator: Weblate 3.8-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -91,7 +91,7 @@ msgstr ""
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr ""
+msgstr "Saor"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
@@ -815,7 +815,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1416,16 +1415,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2346,11 +2337,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Cruthaigh"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2616,10 +2610,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3225,6 +3215,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3811,6 +3805,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6686,11 +6684,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7160,6 +7158,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10082,7 +10089,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10240,6 +10247,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10286,11 +10300,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10410,6 +10424,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10450,6 +10468,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11481,6 +11503,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11504,6 +11530,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/he.po b/editor/translations/he.po
index 69d8bcc3b5..56126249dc 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -12,12 +12,14 @@
# MordechaiHadad <Mordechai.hadad01@gmail.com>, 2019.
# Daniel <danielharush5252@gmail.com>, 2020.
# test test <ugbdvwpeikvyzwaadt@awdrt.org>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
+# Daniel Kariv <danielkariv98@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-05 14:01+0000\n"
-"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
+"PO-Revision-Date: 2020-05-07 21:28+0000\n"
+"Last-Translator: Anonymous <noreply@weblate.org>\n"
"Language-Team: Hebrew <https://hosted.weblate.org/projects/godot-engine/"
"godot/he/>\n"
"Language: he\n"
@@ -49,7 +51,7 @@ msgstr "קלט שגוי %I (לא הועבר) בתוך הביטוי"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
+msgstr "לא ניתן להשתמש ב־self כיוון שהמופע הוא אפס (null - לא הועבר)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -60,51 +62,48 @@ msgid "Invalid index of type %s for base type %s"
msgstr "שם מאפיין האינדקס מסוג %s עבור בסיס %s שגוי"
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid named index '%s' for base type %s"
msgstr "שם אינדקס לא תקין '%s' לסוג בסיס '%s'"
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid arguments to construct '%s'"
-msgstr ": ארגומנט שגוי מסוג: "
+msgstr "פרמטרים שגויים לבניית 's%'"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr ""
+msgstr "בקריאה ל־‚%s’:"
#: core/ustring.cpp
msgid "B"
-msgstr ""
+msgstr "ב׳"
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "KiB"
#: core/ustring.cpp
msgid "MiB"
-msgstr ""
+msgstr "MiB"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "GiB"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "TiB"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "PiB"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "EiB"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Free"
-msgstr "חינם"
+msgstr "חופשי"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
@@ -143,62 +142,52 @@ msgid "Move Bezier Points"
msgstr "הזזת נקודות בזייה"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Duplicate Keys"
msgstr "שכפול מפתחות הנפשה"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Delete Keys"
msgstr "מחיקת מפתחות הנפשה"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Change Keyframe Time"
msgstr "שינוי זמן פריים-מפתח אנימציה"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Change Transition"
-msgstr "שינוי מיקום אנימציה"
+msgstr "החלפת הנפשת אפקט החלפה"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr "שינוי מיקום אנימציה"
+msgstr "החלפת הנפשת אפקט שינוי צורה"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Change Keyframe Value"
-msgstr "שינוי ערך קיפריים אנימציה"
+msgstr "שינוי ערך פריים-מפתח אנימציה"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
-msgstr ""
+msgstr "שינוי קריאת אנימציה"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Time"
-msgstr "שינוי זמן פריים-מפתח אנימציה"
+msgstr "שינוי זמן פריים-מפתח אנימציה רבים"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transition"
-msgstr "שינוי מיקום אנימציה"
+msgstr "שינוי מיקומי אנימציה רבים"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transform"
-msgstr "שינוי מיקום אנימציה"
+msgstr "שינוי מיקומי אנימציה רבים"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Value"
-msgstr "שינוי ערך קיפריים אנימציה"
+msgstr "שינוי ערכי פריים-מפתח אנימציה רבים"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Call"
-msgstr "שינוי מיקום אנימציה"
+msgstr "שינוי מיקומים אנימציה רבים"
#: editor/animation_track_editor.cpp
msgid "Change Animation Length"
@@ -206,16 +195,14 @@ msgstr "שנה אורך אנימציה"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Change Animation Loop"
-msgstr "שינוי לופ אנימציה"
+msgstr "שינוי לולאת אנימציה"
#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "רצועת מאפיין"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "3D Transform Track"
msgstr "רצועת שינוי 3D"
@@ -229,12 +216,10 @@ msgid "Bezier Curve Track"
msgstr "רצועת עקום בזייה"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Audio Playback Track"
msgstr "רצועת שמע"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Playback Track"
msgstr "רצועת הנפשה"
@@ -243,7 +228,6 @@ msgid "Animation length (frames)"
msgstr "משך ההנפשה (פריימים)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (seconds)"
msgstr "משך ההנפשה (שניות)"
@@ -252,7 +236,6 @@ msgid "Add Track"
msgstr "הוספת רצועה"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Looping"
msgstr "לולאת הנפשה"
@@ -262,19 +245,16 @@ msgid "Functions:"
msgstr "פונקציות:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Audio Clips:"
-msgstr "מאזין לשמע"
+msgstr "רצועות שמע:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Clips:"
msgstr "קטעי הנפשה:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Track Path"
-msgstr "החלפת ערך רצועה"
+msgstr "החלפת נתיב רצועה"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
@@ -286,7 +266,7 @@ msgstr "עדכן מצב (איך המאפיין הזה נקבע)"
#: editor/animation_track_editor.cpp
msgid "Interpolation Mode"
-msgstr ""
+msgstr "מצב אינתרפולציה"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
@@ -310,11 +290,11 @@ msgstr "מתמשך"
#: editor/animation_track_editor.cpp
msgid "Discrete"
-msgstr ""
+msgstr "בדיד"
#: editor/animation_track_editor.cpp
msgid "Trigger"
-msgstr ""
+msgstr "הדק/מפעיל"
#: editor/animation_track_editor.cpp
msgid "Capture"
@@ -435,14 +415,18 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"רצועת אודיו יכולה להצביע על חוליות מסוג:\n"
+"- AudioStreamPlayer\n"
+"- AudioStreamPlayer2D\n"
+"- AudioStreamPlayer3D"
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr ""
+msgstr "רצועות הנפשה יכולות להצביע רק על איברי AnimationPlayer."
#: editor/animation_track_editor.cpp
msgid "An animation player can't animate itself, only other players."
-msgstr ""
+msgstr "נגן הנפשה אינו יכול להנפיש את עצמו, רק שחקנים אחרים."
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
@@ -758,7 +742,7 @@ msgstr "בחירה בלבד"
#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/text_editor.cpp
msgid "Standard"
-msgstr ""
+msgstr "רגיל"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
@@ -877,7 +861,6 @@ msgstr "שגיאת חיבור"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1497,18 +1480,9 @@ msgstr "הפעלה"
msgid "Rearrange Autoloads"
msgstr "סידור טעינות אוטומטית מחדש"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "נתיב שגוי."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "הקובץ לא קיים."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "לא בנתיב המשאב."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2493,12 +2467,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "לא ניתן לרענן סצנה שמעולם לא נשמרה."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "שחזור"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "שמירת סצנה"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "לא ניתן לבטל פעולה זו. לשחזר בכל זאת?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2773,10 +2750,6 @@ msgid "Redo"
msgstr "ביצוע חוזר"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "שחזור סצנה"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "כלים שונים למיזם או למגוון סצנות."
@@ -3413,6 +3386,10 @@ msgstr "לא ניתן להריץ את הסקריפט:"
msgid "Did you forget the '_run' method?"
msgstr "שכחת את השיטה ‚‎_run’?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "נא לבחור מפרקים לייצוא"
@@ -4040,6 +4017,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "שמירה…"
@@ -7071,15 +7052,15 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "שורה:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "מעבר לפונקציה…"
@@ -7573,6 +7554,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10651,8 +10641,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "יצירת סקריפט"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10819,6 +10810,13 @@ msgid "Open Documentation"
msgstr "פתיחת התיעוד המקוון של Godot"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10869,11 +10867,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -11003,6 +11001,10 @@ msgid "A directory with the same name exists."
msgstr "כבר קיימים קובץ או תיקייה בשם הזה."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "הקובץ לא קיים."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "יש להשתמש בסיומת תקנית."
@@ -11047,6 +11049,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "נתיב שגוי."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "שם שגוי."
@@ -12118,6 +12125,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12142,6 +12153,32 @@ msgstr "שם שגוי."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12801,6 +12838,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "לא בנתיב המשאב."
+
+#~ msgid "Revert"
+#~ msgstr "שחזור"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "לא ניתן לבטל פעולה זו. לשחזר בכל זאת?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "שחזור סצנה"
+
#~ msgid "Issue Tracker"
#~ msgstr "עוקב תקלות"
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index 12cf8fd242..4782afecb0 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -837,7 +837,6 @@ msgstr "इशारा कनेक्ट नहीं कर सकते"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1446,17 +1445,9 @@ msgstr "सक्रिय करे"
msgid "Rearrange Autoloads"
msgstr "औटोलोड पुनर्व्यवस्थित करें"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "अमान्य रास्ता।"
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "फ़ाइल नहीं मौजूद."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "रेसोर्स पाथ में नहीं."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2403,12 +2394,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "एक दृश्य है कि कभी नहीं बचाया गया था फिर से लोड नहीं कर सकते ।"
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "वापस लौटना"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "दृश्य बचाओ"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "इस कार्रवाई को पूर्ववत नहीं किया जा सकता । वैसे भी वापस?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2687,10 +2681,6 @@ msgid "Redo"
msgstr "दोहराएँ"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "वापस दृश्य"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "विविध परियोजना या दृश्य-व्यापी उपकरण।"
@@ -3329,6 +3319,10 @@ msgstr "स्क्रिप्ट नहीं चला सका:"
msgid "Did you forget the '_run' method?"
msgstr "क्या आप '_run' विधि को भूल गए?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "आयात करने के लिए नोड (एस) का चयन करें"
@@ -3918,6 +3912,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6811,15 +6809,15 @@ msgid ""
msgstr "जुडिये '%s' to '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "रेखा:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "कार्यों:"
@@ -7290,6 +7288,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10279,8 +10286,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "नई स्क्रिप्ट"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10442,6 +10450,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10490,11 +10505,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10617,6 +10632,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "फ़ाइल नहीं मौजूद."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "गलत फॉण्ट का आकार |"
@@ -10658,6 +10677,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "अमान्य रास्ता।"
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid class name."
msgstr "गलत फॉण्ट का आकार |"
@@ -11710,6 +11733,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11734,6 +11761,32 @@ msgstr "गलत फॉण्ट का आकार |"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12385,6 +12438,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "रेसोर्स पाथ में नहीं."
+
+#~ msgid "Revert"
+#~ msgstr "वापस लौटना"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "इस कार्रवाई को पूर्ववत नहीं किया जा सकता । वैसे भी वापस?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "वापस दृश्य"
+
#~ msgid "Issue Tracker"
#~ msgstr "मुद्दा पर नज़र रखने वाला"
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index 8627e7f239..ad095145b2 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -823,7 +823,6 @@ msgstr "Ne mogu spojiti signal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1431,16 +1430,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2363,11 +2354,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Stvori"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2633,10 +2627,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3245,6 +3235,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3830,6 +3824,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6719,11 +6717,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7193,6 +7191,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10129,8 +10136,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Spoji sa skriptom:"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10289,6 +10297,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10335,11 +10350,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10461,6 +10476,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10501,6 +10520,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11540,6 +11563,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11563,6 +11590,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 620a2d4d5b..ef15f85977 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -878,7 +878,6 @@ msgstr "Csatlakoztató Jelzés:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1514,18 +1513,9 @@ msgstr "Engedélyezés"
msgid "Rearrange Autoloads"
msgstr "AutoLoad-ok Átrendezése"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Érvénytelen Elérési Út."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "A fájl nem létezik."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Nincs az erőforrás elérési útban."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2537,12 +2527,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Nem lehet újratölteni egy olyan jelenetet, amit soha nem mentett el."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Visszaállítás"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Scene mentés"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Ez a művelet nem vonható vissza. Visszaállítja mindenképp?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2845,10 +2838,6 @@ msgid "Redo"
msgstr "Mégis"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Scene visszaállítás"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Egyéb projekt- vagy Scene-szintű eszközök."
@@ -3507,6 +3496,10 @@ msgstr "Nem sikerült a szkript futtatása:"
msgid "Did you forget the '_run' method?"
msgstr "Nem felejtette el a '_run' metódust?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Válassza ki az importálandó Node-okat"
@@ -4141,6 +4134,10 @@ msgid "Error running post-import script:"
msgstr "Hiba történt az importálás utána szkript futtatásakor:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Mentés..."
@@ -7249,15 +7246,15 @@ msgid ""
msgstr "'%s' Lecsatlakoztatása '%s'-ról"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Sor:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Ugrás Funkcióra..."
@@ -7749,6 +7746,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "Rácshoz illesztés"
@@ -10844,8 +10850,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Szkript Létrehozása"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -11012,6 +11019,13 @@ msgid "Open Documentation"
msgstr "Godot online dokumentáció megnyitása"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -11062,12 +11076,13 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr ""
+#, fuzzy
+msgid "Detach the script from the selected node."
+msgstr "Kiválasztott Scene(k) példányosítása a kiválasztott Node gyermekeként."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -11196,6 +11211,10 @@ msgid "A directory with the same name exists."
msgstr "Egy fájl vagy mappa már létezik a megadott névvel."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "A fájl nem létezik."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Használjon érvényes kiterjesztést."
@@ -11240,6 +11259,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Érvénytelen Elérési Út."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Érvénytelen név."
@@ -12322,6 +12346,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12346,6 +12374,32 @@ msgstr "Érvénytelen név."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -13007,6 +13061,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "Nincs az erőforrás elérési útban."
+
+#~ msgid "Revert"
+#~ msgstr "Visszaállítás"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Ez a művelet nem vonható vissza. Visszaállítja mindenképp?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Scene visszaállítás"
+
#~ msgid "Issue Tracker"
#~ msgstr "Problémakövető"
@@ -13210,10 +13276,6 @@ msgstr ""
#~ msgid "Insert keys."
#~ msgstr "Kulcsok Beszúrása"
-#~ msgid "Instance the selected scene(s) as child of the selected node."
-#~ msgstr ""
-#~ "Kiválasztott Scene(k) példányosítása a kiválasztott Node gyermekeként."
-
#, fuzzy
#~ msgid "Font Size:"
#~ msgstr "Körvonal Mérete:"
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 54222d1aeb..f7a86197b6 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -30,8 +30,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-16 11:03+0000\n"
-"Last-Translator: Richard Urban <redasuio1@gmail.com>\n"
+"PO-Revision-Date: 2020-06-03 20:09+0000\n"
+"Last-Translator: Sofyan Sugianto <sofyanartem@gmail.com>\n"
"Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/"
"godot/id/>\n"
"Language: id\n"
@@ -39,7 +39,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0.1-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -860,7 +860,6 @@ msgstr "Tidak dapat menghubungkan sinyal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -893,7 +892,7 @@ msgstr "Memutuskan semua dari sinyal '%s'"
#: editor/connections_dialog.cpp
msgid "Connect..."
-msgstr "Sambungkan..."
+msgstr "Hubungkan..."
#: editor/connections_dialog.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -914,7 +913,7 @@ msgstr "Anda yakin ingin menghapus semua hubungan dari sinyal '%s'?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
-msgstr "Sinyal-sinyal"
+msgstr "Sinyal"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
@@ -1471,17 +1470,9 @@ msgstr "Aktifkan"
msgid "Rearrange Autoloads"
msgstr "Mengatur kembali Autoload-autoload"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Path tidak valid."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "File tidak ada."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Tidak dalam lokasi resource."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1967,7 +1958,7 @@ msgstr "Tutorial Daring"
#: editor/editor_help.cpp
msgid "Properties"
-msgstr "Properti Objek"
+msgstr "Properti"
#: editor/editor_help.cpp
msgid "override:"
@@ -1979,11 +1970,11 @@ msgstr "baku:"
#: editor/editor_help.cpp
msgid "Methods"
-msgstr "Fungsi"
+msgstr "Method"
#: editor/editor_help.cpp
msgid "Theme Properties"
-msgstr "Properti-properti Tema"
+msgstr "Properti Tema"
#: editor/editor_help.cpp
msgid "Enumerations"
@@ -2011,7 +2002,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr "Deskripsi Metode"
+msgstr "Deskripsi Method"
#: editor/editor_help.cpp
msgid ""
@@ -2440,12 +2431,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Tidak bisa memuat ulang skena yang belum pernah disimpan."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Pulihkan"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Simpan Skena"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Tindakan ini tidak dapat dibatalkan. Pulihkan saja?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2733,10 +2727,6 @@ msgid "Redo"
msgstr "Ulangi"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Kembalikan Skena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Perkakas macam-macam proyek atau lingkup skena."
@@ -2948,13 +2938,12 @@ msgid "Q&A"
msgstr "Tanya Jawab"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Report a Bug"
-msgstr "Impor ulang"
+msgstr "Laporkan Kutu"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
-msgstr ""
+msgstr "Kirim Tanggapan Dokumentasi"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
@@ -3384,6 +3373,13 @@ msgstr "Tidak bisa menjalankan script:"
msgid "Did you forget the '_run' method?"
msgstr "Apakah anda lupa dengan fungsi '_run' ?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Tahan Ctrl untuk meletakkan Getter. Tahan Shift untuk meletakkan generic "
+"signature."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Pilih node untuk diimpor"
@@ -3978,6 +3974,10 @@ msgid "Error running post-import script:"
msgstr "Kesalahan saat menjalankan skrip post-import:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Menyimpan..."
@@ -4006,9 +4006,8 @@ msgid "Reimport"
msgstr "Impor ulang"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Save Scenes, Re-Import, and Restart"
-msgstr "Simpan skena, impor ulang, dan mulai ulang"
+msgstr "Simpan Skena, Impor Ulang, dan Mulai Ulang"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
@@ -6924,12 +6923,13 @@ msgstr ""
"'%s' ke node '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Baris"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(abaikan)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(abaikan)"
+msgid "Line"
+msgstr "Baris"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7297,9 +7297,8 @@ msgid "This operation requires a single selected node."
msgstr "Operasi ini membutuhkan satu node yang dipilih."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Auto Orthogonal Enabled"
-msgstr "Ortogonal"
+msgstr "Ortogonal Otomatis Difungsikan"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
@@ -7406,6 +7405,15 @@ msgid "XForm Dialog"
msgstr "Dialog XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Kancingkan Node ke Lantai"
@@ -9931,6 +9939,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Kotak filter pencarian proyek berdasarkan nama dan lokasi komponen "
+"terakhir.\n"
+"Untuk memfilter proyek berdasarkan nama dan lokasi penuhnya, kueri harus "
+"mengandung paling tidak satu karakter `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10497,8 +10509,9 @@ msgid "Instance Child Scene"
msgstr "Instansi Skena Anak"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Bersihkan Skrip"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Lampirkan Skrip"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10666,6 +10679,13 @@ msgid "Open Documentation"
msgstr "Buka Dokumentasi"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Tambah Node Anak"
@@ -10714,11 +10734,13 @@ msgstr ""
"akar."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Lampirkan skrip baru atau yang sudah ada untuk node yang dipilih."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Bersihkan skrip untuk node yang dipilih."
#: editor/scene_tree_dock.cpp
@@ -10850,6 +10872,10 @@ msgid "A directory with the same name exists."
msgstr "Sudah ada nama direktori seperti itu."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "File tidak ada."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Ekstensi tidak valid."
@@ -10890,6 +10916,10 @@ msgid "File exists, it will be reused."
msgstr "Berkas sudah ada, itu akan digunakan kembali."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Path tidak valid."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nama kelas tidak valid."
@@ -10926,6 +10956,8 @@ msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
msgstr ""
+"Catatan: Skrip bawaan memiliki banyak keterbatasan dan tidak dapat disunting "
+"menggunakan editor eksternal."
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -11048,9 +11080,8 @@ msgid "Total:"
msgstr "Total:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Ekspor Profil"
+msgstr "Ekspor daftar ke berkas CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -11936,6 +11967,13 @@ msgstr ""
"prasetel proyek."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Berkas debug keystore belum dikonfigurasi dalam Pengaturan Editor maupun di "
+"prasetel proyek."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Membangun kustom APK memerlukan lokasi Android SDK yang valid dalam "
@@ -11965,6 +12003,32 @@ msgstr "Nama paket tidak valid:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12352,7 +12416,7 @@ msgstr "Plotting Lights:"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
msgid "Finishing Plot"
-msgstr ""
+msgstr "Menyelesaikan Pemetaan"
#: scene/3d/baked_lightmap.cpp
msgid "Lighting Meshes: "
@@ -12422,13 +12486,15 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
-msgstr ""
+msgstr "Memetakan Mesh"
#: scene/3d/gi_probe.cpp
msgid ""
"GIProbes are not supported by the GLES2 video driver.\n"
"Use a BakedLightmap instead."
msgstr ""
+"GIProbes tidak didukung oleh driver video GLES2.\n"
+"Gunakan BakedLightmap sebagai gantinya."
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -12541,6 +12607,8 @@ msgid ""
"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
"this environment's Background Mode to Canvas (for 2D scenes)."
msgstr ""
+"WorldEnvironment ini diabaikan. Tambahkan Camera (untuk skena 3D) atau setel "
+"Mode Latar Belakang lingkungannya menjadi Canvas (untuk skena 2D)."
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
@@ -12591,6 +12659,9 @@ msgid ""
"LMB: Set color\n"
"RMB: Remove preset"
msgstr ""
+"Warna:#%s\n"
+"LMB: Atur warna\n"
+"RMB: Cabut preset"
#: scene/gui/color_picker.cpp
msgid "Pick a color from the editor window."
@@ -12694,7 +12765,7 @@ msgstr ""
#: scene/main/viewport.cpp
msgid "Viewport size must be greater than 0 to render anything."
-msgstr ""
+msgstr "Ukuran viewport harus lebih besar dari 0 untuk me-render apa pun."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
@@ -12724,6 +12795,21 @@ msgstr "Variasi hanya bisa ditetapkan dalam fungsi vertex."
msgid "Constants cannot be modified."
msgstr "Konstanta tidak dapat dimodifikasi."
+#~ msgid "Not in resource path."
+#~ msgstr "Tidak dalam lokasi resource."
+
+#~ msgid "Revert"
+#~ msgstr "Pulihkan"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Tindakan ini tidak dapat dibatalkan. Pulihkan saja?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Kembalikan Skena"
+
+#~ msgid "Clear Script"
+#~ msgstr "Bersihkan Skrip"
+
#~ msgid "Issue Tracker"
#~ msgstr "Pelacak Isu"
diff --git a/editor/translations/is.po b/editor/translations/is.po
index e2943eb9cf..5a1ac9b73c 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -849,7 +849,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1451,16 +1450,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2384,11 +2375,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2656,10 +2649,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3269,6 +3258,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3856,6 +3849,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6756,11 +6753,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7231,6 +7228,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10193,7 +10199,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10354,6 +10360,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10400,11 +10413,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10525,6 +10538,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10565,6 +10582,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11603,6 +11624,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11626,6 +11651,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 8e9432baac..eeec1e05eb 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -13,7 +13,7 @@
# Myself <whatamidoing.wt@gmail.com>, 2017-2018.
# RealAquilus <JamesHeller@live.it>, 2017.
# Samuele Zolfanelli <samdazel@gmail.com>, 2018, 2019.
-# Sean Bone <seanbone@zumguy.com>, 2017.
+# Sean Bone <seanbone@zumguy.com>, 2017, 2020.
# Red Pill <redpill902@gmail.com>, 2018.
# iRadEntertainment <devitadario@gmail.com>, 2018, 2019.
# ondsinet _ (nik man) <nikman00@gmail.com>, 2018.
@@ -30,7 +30,7 @@
# RHC <rhc.throwaway@gmail.com>, 2019.
# Antonio Giungato <antonio.giungato@gmail.com>, 2019.
# Marco Galli <mrcgll98@gmail.com>, 2019.
-# MassiminoilTrace <omino.gis@gmail.com>, 2019.
+# MassiminoilTrace <omino.gis@gmail.com>, 2019, 2020.
# MARCO BANFI <mbanfi@gmail.com>, 2019.
# Marco <rodomar705@gmail.com>, 2019.
# Davide Giuliano <davidegiuliano00@gmail.com>, 2019.
@@ -48,12 +48,14 @@
# Giuseppe Lucido <giuseppe.lucido@gmail.com>, 2020.
# Mirko Proto <mirko7@protonmail.com>, 2020.
# J. Lavoie <j.lavoie@net-c.ca>, 2020.
+# Andrea Terenziani <andrea.terenziani.at@gmail.com>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-04 15:12+0000\n"
-"Last-Translator: J. Lavoie <j.lavoie@net-c.ca>\n"
+"PO-Revision-Date: 2020-05-07 21:28+0000\n"
+"Last-Translator: Sean Bone <seanbone@zumguy.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
"Language: it\n"
@@ -77,8 +79,8 @@ msgstr "Prevista una stringa di lunghezza 1 (singolo carattere)."
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr ""
-"Non vi sono abbastanza byte per i byte di decodifica, oppure il formato non "
-"è valido."
+"Non vi sono abbastanza byte per riuscire a decodificarli, oppure il formato "
+"non è valido."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
@@ -679,7 +681,7 @@ msgstr "Pulisci"
#: editor/animation_track_editor.cpp
msgid "Scale Ratio:"
-msgstr "Fattore di scalatura:"
+msgstr "Fattore di scala:"
#: editor/animation_track_editor.cpp
msgid "Select Tracks to Copy"
@@ -752,7 +754,7 @@ msgstr "Parole intere"
#: editor/code_editor.cpp editor/rename_dialog.cpp
msgid "Replace"
-msgstr "Rimpiazza"
+msgstr "Sostituisci"
#: editor/code_editor.cpp
msgid "Replace All"
@@ -769,7 +771,7 @@ msgstr "Standard"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
-msgstr "Attiva Pannello Scripts"
+msgstr "Commuta pannello degli script"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
@@ -785,7 +787,7 @@ msgstr "Rimpicciolisci"
#: editor/code_editor.cpp
msgid "Reset Zoom"
-msgstr "Azzera ingrandimento"
+msgstr "Resetta ingrandimento"
#: editor/code_editor.cpp
msgid "Warnings"
@@ -883,7 +885,6 @@ msgstr "Impossibile connettere il segnale"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1496,17 +1497,9 @@ msgstr "Abilita"
msgid "Rearrange Autoloads"
msgstr "Riordina gli Autoload"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Percorso non valido."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "File inesistente."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Non è nel percorso risorse."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1654,7 +1647,7 @@ msgstr "Editor 3D"
#: editor/editor_feature_profile.cpp
msgid "Script Editor"
-msgstr "Editor degli script"
+msgstr "Editor script"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
@@ -1878,7 +1871,7 @@ msgstr "Va' su"
#: editor/editor_file_dialog.cpp
msgid "Toggle Hidden Files"
-msgstr "Attiva/disattiva file nascosti"
+msgstr "Mostra/nascondi file nascosti"
#: editor/editor_file_dialog.cpp
msgid "Toggle Favorite"
@@ -1886,11 +1879,11 @@ msgstr "Attiva/disattiva preferito"
#: editor/editor_file_dialog.cpp
msgid "Toggle Mode"
-msgstr "Modalità Attivazione/Disattivazione"
+msgstr "Modalità di Attivazione/Disattivazione"
#: editor/editor_file_dialog.cpp
msgid "Focus Path"
-msgstr "Percorso di Focus"
+msgstr "Metti a fuoco il percorso"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Up"
@@ -2009,7 +2002,7 @@ msgstr "Metodi"
#: editor/editor_help.cpp
msgid "Theme Properties"
-msgstr "Proprietà del tema"
+msgstr "Proprietà Tema"
#: editor/editor_help.cpp
msgid "Enumerations"
@@ -2021,7 +2014,7 @@ msgstr "Costanti"
#: editor/editor_help.cpp
msgid "Property Descriptions"
-msgstr "Descrizioni delle proprietà"
+msgstr "Descrizioni Proprietà"
#: editor/editor_help.cpp
msgid "(value)"
@@ -2037,7 +2030,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr "Descrizioni dei metodi"
+msgstr "Descrizioni Metodo"
#: editor/editor_help.cpp
msgid ""
@@ -2470,12 +2463,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Impossibile ricaricare una scena che non è mai stata salvata."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Ripristina"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Salva Scena"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Questa azione non può essere annullata. Ripristinare comunque?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2525,7 +2521,7 @@ msgstr "Chiudi scena"
#: editor/editor_node.cpp
msgid "Reopen Closed Scene"
-msgstr "Riapri Scena Chiusa"
+msgstr "Riapri la scena chiusa"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
@@ -2622,11 +2618,11 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Save Layout"
-msgstr "Salva layout"
+msgstr "Salva disposizione"
#: editor/editor_node.cpp
msgid "Delete Layout"
-msgstr "Elimina Layout"
+msgstr "Elimina disposizione"
#: editor/editor_node.cpp editor/import_dock.cpp
#: editor/script_create_dialog.cpp
@@ -2740,7 +2736,7 @@ msgstr "Apri recente"
#: editor/editor_node.cpp
msgid "Save Scene"
-msgstr "Salva scena"
+msgstr "Salva Scena"
#: editor/editor_node.cpp
msgid "Save All Scenes"
@@ -2769,10 +2765,6 @@ msgid "Redo"
msgstr "Rifai"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Ripristina scena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Strumenti di progetto o scena vari."
@@ -2783,7 +2775,7 @@ msgstr "Progetto"
#: editor/editor_node.cpp
msgid "Project Settings..."
-msgstr "Impostazioni Progetto…"
+msgstr "Impostazioni progetto…"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control"
@@ -2925,11 +2917,11 @@ msgstr "Impostazioni editor…"
#: editor/editor_node.cpp
msgid "Editor Layout"
-msgstr "Layout dell'editor"
+msgstr "Disposizione dell'editor"
#: editor/editor_node.cpp
msgid "Take Screenshot"
-msgstr "Acquisisci screenshot"
+msgstr "Acquisisci una schermata"
#: editor/editor_node.cpp
msgid "Screenshots are stored in the Editor Data/Settings Folder."
@@ -3000,7 +2992,7 @@ msgstr "Comunità"
#: editor/editor_node.cpp
msgid "About"
-msgstr "Riguardo a"
+msgstr "Informazioni su Godot"
#: editor/editor_node.cpp
msgid "Play the project."
@@ -3016,7 +3008,7 @@ msgstr "Metti in pausa l'esecuzione della scena per eseguire il debug."
#: editor/editor_node.cpp
msgid "Pause Scene"
-msgstr "Pausa Scena"
+msgstr "Pausa scena"
#: editor/editor_node.cpp
msgid "Stop the scene."
@@ -3158,15 +3150,15 @@ msgstr "Seleziona"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
-msgstr "Apri editor 2D"
+msgstr "Apri Editor 2D"
#: editor/editor_node.cpp
msgid "Open 3D Editor"
-msgstr "Apri Editor 3D"
+msgstr "Apri editor 3D"
#: editor/editor_node.cpp
msgid "Open Script Editor"
-msgstr "Apri Editor Script"
+msgstr "Apri editor degli script"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
@@ -3425,6 +3417,13 @@ msgstr "Impossibile eseguire lo script:"
msgid "Did you forget the '_run' method?"
msgstr "Hai dimenticato il metodo '_run'?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Mantieni premuto Control per rilasciare un Getter. Mantieni premuto Shift "
+"per rilasciare una firma generica."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Scegli Nodo(i) da Importare"
@@ -3841,7 +3840,7 @@ msgstr "Crea Script"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
msgid "Find in Files"
-msgstr "Trova nei File"
+msgstr "Trova nei file"
#: editor/find_in_files.cpp
msgid "Find:"
@@ -4023,6 +4022,10 @@ msgid "Error running post-import script:"
msgstr "Errore di esecuzione dello script di post-import:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Salvataggio..."
@@ -4623,7 +4626,7 @@ msgstr "Opzioni dell'onion skinning"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Directions"
-msgstr "Direzioni"
+msgstr "Indicazioni"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Past"
@@ -4643,11 +4646,11 @@ msgstr "1 passo"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "2 steps"
-msgstr "2 passaggi"
+msgstr "2 passi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "3 steps"
-msgstr "3 passaggi"
+msgstr "3 passi"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Differences Only"
@@ -5175,7 +5178,7 @@ msgstr "Offset Griglia:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Step:"
-msgstr "Step Griglia:"
+msgstr "Passo della griglia:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Primary Line Every:"
@@ -5183,7 +5186,7 @@ msgstr "Line Primaria Ogni:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "steps"
-msgstr "passaggi"
+msgstr "passi"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
@@ -5191,11 +5194,11 @@ msgstr "Offset Rotazione:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Step:"
-msgstr "Step Rotazione:"
+msgstr "Passo di rotazione:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale Step:"
-msgstr "Intervallo:"
+msgstr "Passo di scala:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move Vertical Guide"
@@ -5393,7 +5396,7 @@ msgstr "Incolla Posa"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear Guides"
-msgstr "Rimuvi Guide"
+msgstr "Rimuovi guide"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Create Custom Bone(s) from Node(s)"
@@ -5423,12 +5426,12 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Reset"
-msgstr "Ripristino Zoom"
+msgstr "Ripristina ingrandimento"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode"
-msgstr "Modalità di Selezione"
+msgstr "Modalità di selezione"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
@@ -5451,17 +5454,17 @@ msgstr "Alt+RMB: Selezione Lista Profondità"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode"
-msgstr "Modalità Movimento"
+msgstr "Modalità spostamento"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Mode"
-msgstr "Modalità Rotazione"
+msgstr "Modalità rotazione"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode"
-msgstr "Modalità Scala"
+msgstr "Modalità scala"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5482,7 +5485,7 @@ msgstr "Modalità di Pan"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Ruler Mode"
-msgstr "Modalità Righello"
+msgstr "Modalità righello"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle smart snapping."
@@ -5490,7 +5493,7 @@ msgstr "Abilita snapping intelligente."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Smart Snap"
-msgstr "Usa lo Snap Intelligente"
+msgstr "Usa lo Snap intelligente"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle grid snapping."
@@ -5498,7 +5501,7 @@ msgstr "Abilita/Disabilita snapping magnetico."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Grid Snap"
-msgstr "Usa snap magnetico"
+msgstr "Usa Griglia Magnetica"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snapping Options"
@@ -5600,7 +5603,7 @@ msgstr "Mostra Sempre Griglia"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Helpers"
-msgstr "Mostra Guide"
+msgstr "Mostra guide"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Rulers"
@@ -5608,7 +5611,7 @@ msgstr "Mostra Righelli"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Guides"
-msgstr "Mostra guide"
+msgstr "Mostra Guide"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Origin"
@@ -5624,15 +5627,15 @@ msgstr "Mostra Gruppo e Blocca Icone"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
-msgstr "Centra Selezione"
+msgstr "Centra selezione"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Frame Selection"
-msgstr "Selezione Frame"
+msgstr "Selezione frame"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
-msgstr "Anteprima dimensione canvas"
+msgstr "Anteprima Dimensione Canvas"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Translation mask for inserting keys."
@@ -5673,7 +5676,7 @@ msgstr "Chiavi d'Animazione e Opzioni Posa"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key (Existing Tracks)"
-msgstr "Inserisci Key (Tracce Esistenti)"
+msgstr "Inserisci chiave (tracce esistenti)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Copy Pose"
@@ -5681,7 +5684,7 @@ msgstr "Copia Posa"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear Pose"
-msgstr "Pulisci Posa"
+msgstr "Azzera posa"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -5693,7 +5696,7 @@ msgstr "Dividi per 2 il passo della griglia"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Pan View"
-msgstr "Vista panoramica"
+msgstr "Trasla Visuale"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6633,11 +6636,11 @@ msgstr "Offset Y Griglia:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Step X:"
-msgstr "Step X Griglia:"
+msgstr "Passo X della griglia:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Step Y:"
-msgstr "Step Y Griglia:"
+msgstr "Passo Y della griglia:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Sync Bones to Polygon"
@@ -6791,12 +6794,12 @@ msgstr "%s Riferimento di Classe"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Next"
-msgstr "Trova Successivo"
+msgstr "Trova successivo"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Previous"
-msgstr "Trova Precedente"
+msgstr "Trova precedente"
#: editor/plugins/script_editor_plugin.cpp
msgid "Filter scripts"
@@ -6818,13 +6821,13 @@ msgstr "Ordina"
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Move Up"
-msgstr "Sposta Su"
+msgstr "Sposta in su"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Move Down"
-msgstr "Sposta giù"
+msgstr "Sposta in giù"
#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
@@ -6844,15 +6847,15 @@ msgstr "Apri..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Reopen Closed Script"
-msgstr "Riapri Script Chiuso"
+msgstr "Riapri lo script chiuso"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
-msgstr "Salva Tutto"
+msgstr "Salva tutto"
#: editor/plugins/script_editor_plugin.cpp
msgid "Soft Reload Script"
-msgstr "Ricarica Script Soft"
+msgstr "Ricarica Soft Script"
#: editor/plugins/script_editor_plugin.cpp
msgid "Copy Script Path"
@@ -6897,11 +6900,11 @@ msgstr "Esegui"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Into"
-msgstr "Passo Precedente"
+msgstr "Passo dentro all'istruzione"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
-msgstr "Passo Successivo"
+msgstr "Passo successivo"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
@@ -6989,16 +6992,17 @@ msgstr ""
"Manca il metodo '%s' connesso per il segnale '%s' dal nodo '%s' al nodo '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Linea"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(ignora)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignora)"
+msgid "Line"
+msgstr "Linea"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
-msgstr "Vai a Funzione"
+msgstr "Va' alla funzione"
#: editor/plugins/script_text_editor.cpp
msgid "Only resources from filesystem can be dropped."
@@ -7032,7 +7036,7 @@ msgstr "Minuscolo"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Capitalize"
-msgstr "Aggiungi maiuscola iniziale"
+msgstr "Rendi prima lettera maiuscola"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Syntax Highlighter"
@@ -7050,7 +7054,7 @@ msgstr "Segnalibri"
#: editor/plugins/script_text_editor.cpp
msgid "Breakpoints"
-msgstr "Punti di rottura"
+msgstr "Breakpoint"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
@@ -7060,11 +7064,11 @@ msgstr "Taglia"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
msgid "Select All"
-msgstr "Seleziona tutti"
+msgstr "Seleziona tutto"
#: editor/plugins/script_text_editor.cpp
msgid "Delete Line"
-msgstr "Elimina Linea"
+msgstr "Elimina linea"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
@@ -7076,11 +7080,11 @@ msgstr "Indenta Destra"
#: editor/plugins/script_text_editor.cpp
msgid "Toggle Comment"
-msgstr "Cambia a Commento"
+msgstr "Commuta commento"
#: editor/plugins/script_text_editor.cpp
msgid "Fold/Unfold Line"
-msgstr "Piega/Dispiega Linea"
+msgstr "Espandi/comprimi linea"
#: editor/plugins/script_text_editor.cpp
msgid "Fold All Lines"
@@ -7092,31 +7096,31 @@ msgstr "Dispiegare Tutte le Linee"
#: editor/plugins/script_text_editor.cpp
msgid "Clone Down"
-msgstr "Clona Sotto"
+msgstr "Clona sotto"
#: editor/plugins/script_text_editor.cpp
msgid "Complete Symbol"
-msgstr "Completa Simbolo"
+msgstr "Completa simbolo"
#: editor/plugins/script_text_editor.cpp
msgid "Evaluate Selection"
-msgstr "Valuta Selezione"
+msgstr "Valuta selezione"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
-msgstr "Taglia Spazi in Coda"
+msgstr "Taglia spazi in coda"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent to Spaces"
-msgstr "Converti Indentazione in Spazi"
+msgstr "Converti l'indentazione in spazi"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent to Tabs"
-msgstr "Converti Indentazione in Tabulazioni"
+msgstr "Converti l'indentazione in tabulazioni"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
-msgstr "Auto Indenta"
+msgstr "Indenta automaticamente"
#: editor/plugins/script_text_editor.cpp
msgid "Find in Files..."
@@ -7124,19 +7128,19 @@ msgstr "Cerca nei File..."
#: editor/plugins/script_text_editor.cpp
msgid "Contextual Help"
-msgstr "Aiuto Contestuale"
+msgstr "Aiuto contestuale"
#: editor/plugins/script_text_editor.cpp
msgid "Toggle Bookmark"
-msgstr "Abilita/Disabilita Segnalibri"
+msgstr "Abilita/Disabilita segnalibri"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Next Bookmark"
-msgstr "Vai al Segnalibri Successivo"
+msgstr "Va' al segnalibro successivo"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Previous Bookmark"
-msgstr "Vai al Segnalibri Precedente"
+msgstr "Va' al segnalibro precedente"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Bookmarks"
@@ -7153,19 +7157,19 @@ msgstr "Vai a Linea..."
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Toggle Breakpoint"
-msgstr "Abilita Breakpoint"
+msgstr "Commuta breakpoint"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr "Rimuovi Tutti i Breakpoints"
+msgstr "Rimuovi tutti i breakpoint"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Next Breakpoint"
-msgstr "Vai a Breakpoint Successivo"
+msgstr "Vai al breakpoint successivo"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Previous Breakpoint"
-msgstr "Vai a Breakpoint Precedente"
+msgstr "Vai al breakpoint precedente"
#: editor/plugins/shader_editor_plugin.cpp
msgid ""
@@ -7345,11 +7349,11 @@ msgstr "Retro"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
-msgstr "Allinea Trasformazione con la Vista"
+msgstr "Allinea trasformazione con la vista"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Rotation with View"
-msgstr "Allinea Rotazione con la Vista"
+msgstr "Allinea rotazione con la vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -7469,6 +7473,15 @@ msgid "XForm Dialog"
msgstr "Finestra di XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Sposta i Nodi sul Pavimento"
@@ -7488,51 +7501,51 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Local Space"
-msgstr "Usa lo Spazio Locale"
+msgstr "Usa Spazio Locale"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Snap"
-msgstr "Usa lo Snap"
+msgstr "Usa Snap"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
-msgstr "Vista dal Basso"
+msgstr "Vista dal basso"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View"
-msgstr "Vista dall'Alto"
+msgstr "Vista dall'alto"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View"
-msgstr "Vista dal Retro"
+msgstr "Vista dal retro"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View"
-msgstr "Vista Frontale"
+msgstr "Vista frontale"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View"
-msgstr "Vista Sinistra"
+msgstr "Vista laterale sinistra"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View"
-msgstr "Vista Destra"
+msgstr "Vista laterale destra"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Switch Perspective/Orthogonal View"
-msgstr "Cambia tra Vista Prospettiva/Ortogonale"
+msgstr "Cambia tra vista prospettica/ortogonale"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Insert Animation Key"
-msgstr "Inserisci Key Animazione"
+msgstr "Inserisci chiave animazione"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Origin"
-msgstr "Focalizza su Origine"
+msgstr "Centra Origine"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Selection"
-msgstr "Centra a Selezione"
+msgstr "Centra la Selezione"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Toggle Freelook"
@@ -7901,7 +7914,7 @@ msgstr "Offset:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Step:"
-msgstr "Step:"
+msgstr "Passo:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Sep.:"
@@ -8066,7 +8079,7 @@ msgstr "File Tema"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
-msgstr "Cancella Selezione"
+msgstr "Cancella selezione"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Fix Invalid Tiles"
@@ -8075,7 +8088,7 @@ msgstr "Correggi le Tile non Valide"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cut Selection"
-msgstr "Taglia Selezione"
+msgstr "Taglia selezione"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
@@ -8099,7 +8112,7 @@ msgstr "Cancella TileMap"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Find Tile"
-msgstr "Trova Tile"
+msgstr "Trova tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Transpose"
@@ -8124,7 +8137,7 @@ msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint Tile"
-msgstr "Disegna Tile"
+msgstr "Disegna tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid ""
@@ -8136,7 +8149,7 @@ msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
-msgstr "Preleva Tile"
+msgstr "Preleva tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate Left"
@@ -8156,7 +8169,7 @@ msgstr "Ribalta verticalmente"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Clear Transform"
-msgstr "Cancella la trasformazione"
+msgstr "Azzera la trasformazione"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Add Texture(s) to TileSet."
@@ -8188,7 +8201,7 @@ msgstr "Nuova Atlas"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Next Coordinate"
-msgstr "Prossima Coordinata"
+msgstr "Coordinata successiva"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Select the next shape, subtile, or Tile."
@@ -8196,7 +8209,7 @@ msgstr "Seleziona la prossima forma, sottotile, o Tile."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Previous Coordinate"
-msgstr "Coordinata Precedente"
+msgstr "Coordinata precedente"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Select the previous shape, subtile, or Tile."
@@ -8232,27 +8245,27 @@ msgstr "Indice Z"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Region Mode"
-msgstr "Modalità regione"
+msgstr "Modalità Regione"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Collision Mode"
-msgstr "Modalità di Collisione"
+msgstr "Modalità di collisione"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Occlusion Mode"
-msgstr "Modalità di occlusione"
+msgstr "Modalità Occlusione"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Navigation Mode"
-msgstr "Modalità di navigazione"
+msgstr "Modalità Navigazione"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Bitmask Mode"
-msgstr "Modalità Maschera di Bit"
+msgstr "Modalità Bitmask"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Priority Mode"
-msgstr "Modalità prioritaria"
+msgstr "Modalità Prioritaria"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Icon Mode"
@@ -8260,7 +8273,7 @@ msgstr "Modalità Icona"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Z Index Mode"
-msgstr "Modalità indice Z"
+msgstr "Modalità Indice Z"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
@@ -8661,7 +8674,7 @@ msgstr "Duplica Nodi"
#: editor/plugins/visual_shader_editor_plugin.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Paste Nodes"
-msgstr "Incolla Nodi"
+msgstr "Incolla nodi"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Delete Nodes"
@@ -9996,6 +10009,10 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"La casella di ricerca filtra i progetti per nome e l'ultimo componente del "
+"percorso.\n"
+"Per filtrare i progetti per nome e percorso completo, la query deve "
+"contenere almeno un carattere `/`."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10375,7 +10392,7 @@ msgstr "Seleziona Metodo"
#: editor/rename_dialog.cpp editor/scene_tree_dock.cpp
msgid "Batch Rename"
-msgstr "Rinomina in Blocco"
+msgstr "Rinomina in blocco"
#: editor/rename_dialog.cpp
msgid "Prefix"
@@ -10562,8 +10579,9 @@ msgid "Instance Child Scene"
msgstr "Istanzia Scena Figlia"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Svuota Script"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Allega Script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10729,8 +10747,15 @@ msgid "Open Documentation"
msgstr "Apri la documentazione"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
-msgstr "Aggiungi Nodo Figlio"
+msgstr "Aggiungi un nodo figlio"
#: editor/scene_tree_dock.cpp
msgid "Expand/Collapse All"
@@ -10758,7 +10783,7 @@ msgstr "Salva Ramo come Scena"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
msgid "Copy Node Path"
-msgstr "Copia Percorso Nodo"
+msgstr "Copia percorso del nodo"
#: editor/scene_tree_dock.cpp
msgid "Delete (No Confirm)"
@@ -10777,11 +10802,13 @@ msgstr ""
"root esiste."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Allega un nuovo script o uno esistente al nodo selezionato."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Svuota uno script per il nodo selezionato."
#: editor/scene_tree_dock.cpp
@@ -10913,6 +10940,10 @@ msgid "A directory with the same name exists."
msgstr "Esiste già una directory con lo stesso nome."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "File inesistente."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Estensione non valida."
@@ -10953,6 +10984,10 @@ msgid "File exists, it will be reused."
msgstr "Il file è già esistente, quindi, verrà riutilizzato."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Percorso non valido."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nome classe non valido."
@@ -11058,7 +11093,7 @@ msgstr "Processo Figlio Connesso."
#: editor/script_editor_debugger.cpp
msgid "Copy Error"
-msgstr "Errore di Copia"
+msgstr "Copia messaggio di errore"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -11066,7 +11101,7 @@ msgstr "RAM Video"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
-msgstr "Salta Punti di rottura"
+msgstr "Salta i breakpoint"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
@@ -11860,31 +11895,31 @@ msgstr "Seleziona o crea una funzione per modificarne il grafico."
#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
-msgstr "Elimina selezionati"
+msgstr "Elimina Selezionati"
#: modules/visual_script/visual_script_editor.cpp
msgid "Find Node Type"
-msgstr "Trova Tipo Nodo"
+msgstr "Trova tipo del nodo"
#: modules/visual_script/visual_script_editor.cpp
msgid "Copy Nodes"
-msgstr "Copia Nodi"
+msgstr "Copia nodi"
#: modules/visual_script/visual_script_editor.cpp
msgid "Cut Nodes"
-msgstr "Taglia Nodi"
+msgstr "Taglia nodi"
#: modules/visual_script/visual_script_editor.cpp
msgid "Make Function"
-msgstr "Crea Funzione"
+msgstr "Crea funzione"
#: modules/visual_script/visual_script_editor.cpp
msgid "Refresh Graph"
-msgstr "Aggiorna Grafico"
+msgstr "Aggiorna grafico"
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit Member"
-msgstr "Modifica Membro"
+msgstr "Modifica membro"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable: "
@@ -11933,16 +11968,16 @@ msgstr "VariableSet non trovato nello script: "
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
msgstr ""
-"Il nodo personalizato non ha un metodo _step(), impossibile processare il "
-"grafico."
+"Il nodo personalizzato non ha alcun metodo _step(), impossibile processare "
+"il grafico."
#: modules/visual_script/visual_script_nodes.cpp
msgid ""
"Invalid return value from _step(), must be integer (seq out), or string "
"(error)."
msgstr ""
-"Valore di return invalido da _step(), deve esere intero (seq out), oppure "
-"stringa (errore)."
+"Valore di ritorno di _step() non valido, deve essere un intero (seq out), "
+"oppure una stringa (errore)."
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search VisualScript"
@@ -12003,6 +12038,12 @@ msgstr ""
"Debug keystore non configurato nelle Impostazioni dell'Editor né nel preset."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Debug keystore non configurato nelle Impostazioni dell'Editor né nel preset."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Le build personalizzate richiedono un percorso per un Android SDK valido "
@@ -12032,6 +12073,32 @@ msgstr "Nome del pacchetto non valido:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12831,6 +12898,21 @@ msgstr "Varyings può essere assegnato soltanto nella funzione del vertice."
msgid "Constants cannot be modified."
msgstr "Le constanti non possono essere modificate."
+#~ msgid "Not in resource path."
+#~ msgstr "Non è nel percorso risorse."
+
+#~ msgid "Revert"
+#~ msgstr "Ripristina"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Questa azione non può essere annullata. Ripristinare comunque?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Ripristina scena"
+
+#~ msgid "Clear Script"
+#~ msgstr "Svuota Script"
+
#~ msgid "Issue Tracker"
#~ msgstr "Tracciatore segnalazioni"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index 8aef04db94..7d4aed4b29 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -31,12 +31,13 @@
# Akihiro Ogoshi <technical@palsystem-game.com>, 2019, 2020.
# Wataru Onuki <bettawat@yahoo.co.jp>, 2020.
# sporeball <sporeballdev@gmail.com>, 2020.
+# BinotaLIU <me@binota.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-04 15:12+0000\n"
-"Last-Translator: Wataru Onuki <bettawat@yahoo.co.jp>\n"
+"PO-Revision-Date: 2020-06-03 20:09+0000\n"
+"Last-Translator: BinotaLIU <me@binota.org>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
"Language: ja\n"
@@ -866,7 +867,6 @@ msgstr "シグナルに接続できません"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1476,17 +1476,9 @@ msgstr "有効"
msgid "Rearrange Autoloads"
msgstr "自動読込みの並べ替え"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "パスが無効です。"
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "ファイルが存在しません。"
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "リソースパスにありません。"
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2444,12 +2436,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "保存されていないシーンを読み込むことはできません。"
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "元に戻す"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "シーンを保存"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "この操作は取り消せません。それでも元に戻しますか?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2737,10 +2732,6 @@ msgid "Redo"
msgstr "やり直す"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "シーンを元に戻す"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "その他のプロジェクトまたはシーン全体のツール。"
@@ -3386,6 +3377,13 @@ msgstr "スクリプトを実行できませんでした:"
msgid "Did you forget the '_run' method?"
msgstr "'_run' メソッドを忘れていませんか?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Ctrlを押したままGetterを(ドラッグ&)ドロップする。Shiftを押したまま汎用シグネ"
+"チャを(ドラッグ&)ドロップする."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "インポートするノードを選択"
@@ -3979,6 +3977,10 @@ msgid "Error running post-import script:"
msgstr "インポート済スクリプトの実行中にエラー:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "保存中..."
@@ -4051,9 +4053,8 @@ msgid "Copy Resource"
msgstr "リソースをコピー"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Make Built-In"
-msgstr "ビルトインを作成"
+msgstr "組み込みにする"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
@@ -5692,7 +5693,7 @@ msgstr "ハンドルを設定する"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
-msgstr "放射マスクを読み込む"
+msgstr "放出マスクを読み込む"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/cpu_particles_editor_plugin.cpp
@@ -5704,7 +5705,7 @@ msgstr "再起動"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Clear Emission Mask"
-msgstr "発光(Emission)マスクをクリア"
+msgstr "放出マスクをクリア"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5720,7 +5721,7 @@ msgstr "生成したポイントの数:"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Mask"
-msgstr "\\ Emission Mask"
+msgstr "放出マスク"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5745,7 +5746,7 @@ msgstr "ピクセルからキャプチャ"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Colors"
-msgstr "発光(Emission)色"
+msgstr "放出色"
#: editor/plugins/cpu_particles_editor_plugin.cpp
msgid "CPUParticles"
@@ -6210,7 +6211,7 @@ msgstr "\"%s\" はフェイスジオメトリーを含んでいません。"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emitter"
-msgstr "放出器を作成"
+msgstr "放出源を作成"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Points:"
@@ -6923,12 +6924,13 @@ msgstr ""
"ド'%s'へのシグナル用です。"
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "ライン"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(無視)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(無視)"
+msgid "Line"
+msgstr "ライン"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7403,6 +7405,15 @@ msgid "XForm Dialog"
msgstr "XFormダイアログ"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "ノードをフロアにスナップ"
@@ -8815,27 +8826,27 @@ msgstr "ネイピア数(2.718282)。自然対数のベースを表します。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Epsilon constant (0.00001). Smallest possible scalar number."
-msgstr "Υ(イプシロン)定数(0.00001)。使用可能な最小のスカラー数。"
+msgstr "ε(イプシロン)定数(0.00001)。使用可能な最小のスカラー数。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Phi constant (1.618034). Golden ratio."
-msgstr "Φ(ファイ)定数 (1.618034)。黄金比。"
+msgstr "φ(ファイ)定数 (1.618034)。黄金比。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Pi/4 constant (0.785398) or 45 degrees."
-msgstr "Π(パイ)/4定数 (0.785398) または45度。"
+msgstr "π(パイ)/4定数 (0.785398) または45度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Pi/2 constant (1.570796) or 90 degrees."
-msgstr "Π(パイ)/2 定数(1.570796)または90度。"
+msgstr "π(パイ)/2 定数(1.570796)または90度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Pi constant (3.141593) or 180 degrees."
-msgstr "Π(パイ)定数(3.141593)または180度。"
+msgstr "π(パイ)定数(3.141593)または180度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Tau constant (6.283185) or 360 degrees."
-msgstr "Τ(タウ)定数(6.283185)または360度。"
+msgstr "τ(タウ)定数(6.283185)または360度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Sqrt2 constant (1.414214). Square root of 2."
@@ -9286,7 +9297,6 @@ msgstr ""
"ためにそれを使用しないでください。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid ""
"Returns falloff based on the dot product of surface normal and view "
"direction of camera (pass associated inputs to it)."
@@ -9885,7 +9895,7 @@ msgstr "新規プロジェクト"
#: editor/project_manager.cpp
msgid "Remove Missing"
-msgstr "存在しないものを削除"
+msgstr "存在しないものを除去"
#: editor/project_manager.cpp
msgid "Templates"
@@ -9939,8 +9949,8 @@ msgid ""
"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'"
msgstr ""
-"アクション名が無効です。空にしたり、'/'、':'、'='、'\\'等を含めることはできま"
-"せん"
+"アクション名が無効です。空にしたり、'/'、':'、'='、'\\'、'\"'を含めることはで"
+"きません"
#: editor/project_settings_editor.cpp
msgid "An action with the name '%s' already exists."
@@ -10083,8 +10093,8 @@ msgid ""
"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'."
msgstr ""
-"無効なアクション名です。空もしくは'/'、':'、'='、'\\' 、'\"'等を含めることは"
-"できません。"
+"無効なアクション名です。空もしくは'/'、':'、'='、'\\' 、'\"'を含めることはで"
+"きません。"
#: editor/project_settings_editor.cpp
msgid "Add Input Action"
@@ -10483,8 +10493,9 @@ msgid "Instance Child Scene"
msgstr "子シーンをインスタンス化"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "スクリプトをクリア"
+#, fuzzy
+msgid "Detach Script"
+msgstr "スクリプトをアタッチ"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10648,6 +10659,13 @@ msgid "Open Documentation"
msgstr "ドキュメントを開く"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "子ノードを追加"
@@ -10696,11 +10714,13 @@ msgstr ""
"合は、継承されたシーンを作成します。"
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "選択したノードに新規または既存のスクリプトをアタッチする。"
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "選択したノードのスクリプトをクリアする。"
#: editor/scene_tree_dock.cpp
@@ -10832,6 +10852,10 @@ msgid "A directory with the same name exists."
msgstr "同名のフォルダが存在します。"
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "ファイルが存在しません。"
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "無効な拡張子です。"
@@ -10872,6 +10896,10 @@ msgid "File exists, it will be reused."
msgstr "ファイルが既に存在します。そちらを再利用します。"
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "パスが無効です。"
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "無効なクラス名。"
@@ -10973,7 +11001,7 @@ msgstr "エラー"
#: editor/script_editor_debugger.cpp
msgid "Child process connected."
-msgstr "子プロセスが接続された。"
+msgstr "子プロセスが接続されました。"
#: editor/script_editor_debugger.cpp
msgid "Copy Error"
@@ -11919,6 +11947,11 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "デバッグキーストアがエディタ設定にもプリセットにも設定されていません。"
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr "デバッグキーストアがエディタ設定にもプリセットにも設定されていません。"
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr "カスタムビルドにはエディタ設定で有効なAndroid SDKパスが必要です。"
@@ -11944,6 +11977,32 @@ msgstr "無効なパッケージ名:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12724,6 +12783,21 @@ msgstr "Varying変数は頂点関数にのみ割り当てることができま
msgid "Constants cannot be modified."
msgstr "定数は変更できません。"
+#~ msgid "Not in resource path."
+#~ msgstr "リソースパスにありません。"
+
+#~ msgid "Revert"
+#~ msgstr "元に戻す"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "この操作は取り消せません。それでも元に戻しますか?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "シーンを元に戻す"
+
+#~ msgid "Clear Script"
+#~ msgstr "スクリプトをクリア"
+
#~ msgid "Issue Tracker"
#~ msgstr "課題管理システム"
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index 07eeeb5377..2435a50898 100644
--- a/editor/translations/ka.po
+++ b/editor/translations/ka.po
@@ -876,7 +876,6 @@ msgstr "დამაკავშირებელი სიგნალი:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1503,17 +1502,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "არასწორი ფონტის ზომა."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2459,11 +2449,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "გახსნილი"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2734,10 +2727,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3350,6 +3339,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3954,6 +3947,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6906,15 +6903,15 @@ msgid ""
msgstr "'%s' და '%s' შორის კავშირის გაწყვეტა"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "ხაზი:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "ფუნქციის შექმნა"
@@ -7391,6 +7388,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10392,8 +10398,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "დამოკიდებულებების შემსწორებელი"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10554,6 +10561,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10603,11 +10617,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10732,6 +10746,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "არასწორი ფონტის ზომა."
@@ -10774,6 +10792,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "არასწორი ფონტის ზომა."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "არასწორი ფონტის ზომა."
@@ -11827,6 +11850,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11851,6 +11878,32 @@ msgstr "არასწორი ფონტის ზომა."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index f25550709a..c568dc19b8 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -17,12 +17,13 @@
# Ervin <zetsmart@gmail.com>, 2019.
# Tilto_ <tilto0822@develable.xyz>, 2020.
# Myeongjin Lee <aranet100@gmail.com>, 2020.
+# Doyun Kwon <caen4516@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-01 11:42+0000\n"
-"Last-Translator: Ch. <ccwpc@hanmail.net>\n"
+"PO-Revision-Date: 2020-05-22 21:01+0000\n"
+"Last-Translator: Doyun Kwon <caen4516@gmail.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
"Language: ko\n"
@@ -30,7 +31,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -850,7 +851,6 @@ msgstr "시그널을 연결할 수 없음"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1459,17 +1459,9 @@ msgstr "켜기"
msgid "Rearrange Autoloads"
msgstr "오토로드 다시 정렬"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "올바르지 않은 경로입니다."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "파일이 존재하지 않습니다."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "리소스 경로에 없습니다."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1586,8 +1578,9 @@ msgid ""
"Enabled'."
msgstr ""
"대상 플랫폼에서 드라이버가 GLES2로 폴백하기 위해 'ETC' 텍스처 압축이 필요합니"
-"다. 프로젝트 설정에서 'Import Etc' 설정을 켜거나, 'Driver Fallback Enabled' "
-"설정을 끄세요."
+"다.\n"
+"프로젝트 설정에서 'Import Etc' 설정을 활성화 하거나, 'Driver Fallback "
+"Enabled' 설정을 비활성화 하세요."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -1968,7 +1961,7 @@ msgstr "메서드"
#: editor/editor_help.cpp
msgid "Theme Properties"
-msgstr "테마 속성"
+msgstr "테마 속성들"
#: editor/editor_help.cpp
msgid "Enumerations"
@@ -2420,12 +2413,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "저장하지 않은 씬은 새로고침할 수 없습니다."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "되돌리기"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "씬 저장"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "이 행동은 취소할 수 없습니다. 무시하고 되돌릴까요?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2710,10 +2706,6 @@ msgid "Redo"
msgstr "다시 실행"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "씬 되돌리기"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "프로젝트 또는 씬 관련 여러가지 도구들."
@@ -3354,6 +3346,13 @@ msgstr "스크립트를 실행할 수 없음:"
msgid "Did you forget the '_run' method?"
msgstr "'_run' 메서드를 잊었나요?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Ctrl을 누르고 있으면 Getter를 드롭합니다. Shift를 누르고 있으면 일반적인 시그"
+"니처를 드롭합니다."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "가져올 노드 선택"
@@ -3948,6 +3947,10 @@ msgid "Error running post-import script:"
msgstr "후 가져오기 스크립트 실행 중 오류:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "저장 중..."
@@ -6878,12 +6881,13 @@ msgstr ""
"다."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "행"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(무시함)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(무시함)"
+msgid "Line"
+msgstr "행"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7357,6 +7361,15 @@ msgid "XForm Dialog"
msgstr "XForm 대화 상자"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "노드를 바닥에 스냅"
@@ -9233,8 +9246,8 @@ msgid ""
"Returns falloff based on the dot product of surface normal and view "
"direction of camera (pass associated inputs to it)."
msgstr ""
-"카메라의 화면 방향과 표면 노멀의 스칼라곱을 기반으로 하는 폴오프를 반환합니"
-"다 (폴오프와 관련된 입력을 전달함)."
+"표면의 법선 벡터와 카메라가 바라보는 방향 벡터의 내적을 기반으로 한 폴오프를 "
+"반환합니다. (폴오프와 관련된 입력을 전달함)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9407,15 +9420,16 @@ msgid ""
"Filters to export non-resource files/folders\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
-"리소스가 아닌 파일/폴더 내보내기 필터 (쉼표로 구분, 예: *.json, *.txt, docs/"
-"*)"
+"리소스가 아닌 파일/폴더 내보내기 필터\n"
+"(쉼표로 구분, 예: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid ""
"Filters to exclude files/folders from project\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
-"프로젝트에서 제외할 파일/폴더 필터 (쉼표로 구분, 예: *.json, *.txt, docs/*)"
+"프로젝트에서 제외할 파일/폴더 필터\n"
+"(쉼표로 구분, 예: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid "Patches"
@@ -10405,8 +10419,9 @@ msgid "Instance Child Scene"
msgstr "자식 씬 인스턴스화"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "스크립트 삭제"
+#, fuzzy
+msgid "Detach Script"
+msgstr "스크립트 붙이기"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10569,6 +10584,13 @@ msgid "Open Documentation"
msgstr "문서 열기"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "자식 노드 추가"
@@ -10616,11 +10638,13 @@ msgstr ""
"씬 파일을 노드로 인스턴스합니다. 루트 노드가 없으면 상속된 씬을 만듭니다."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "선택한 노드에 새로운 혹은 존재하는 스크립트를 붙입니다."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "선택한 노드의 스크립트를 삭제합니다."
#: editor/scene_tree_dock.cpp
@@ -10752,6 +10776,10 @@ msgid "A directory with the same name exists."
msgstr "같은 이름의 디렉토리가 있습니다."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "파일이 존재하지 않습니다."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "잘못된 확장자."
@@ -10792,6 +10820,10 @@ msgid "File exists, it will be reused."
msgstr "파일이 있습니다. 다시 사용할 것입니다."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "올바르지 않은 경로입니다."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "잘못된 클래스 이름."
@@ -11834,6 +11866,11 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "Debug keystore를 편집기 설정과 프리셋에 설정하지 않았습니다."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr "Debug keystore를 편집기 설정과 프리셋에 설정하지 않았습니다."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr "맞춤 빌드에는 편집기 설정에서 올바른 안드로이드 SDK 경로가 필요합니다."
@@ -11859,6 +11896,32 @@ msgstr "잘못된 패키지 이름:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12616,6 +12679,21 @@ msgstr "Varying은 꼭짓점 함수에만 지정할 수 있습니다."
msgid "Constants cannot be modified."
msgstr "상수는 수정할 수 없습니다."
+#~ msgid "Not in resource path."
+#~ msgstr "리소스 경로에 없습니다."
+
+#~ msgid "Revert"
+#~ msgstr "되돌리기"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "이 행동은 취소할 수 없습니다. 무시하고 되돌릴까요?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "씬 되돌리기"
+
+#~ msgid "Clear Script"
+#~ msgstr "스크립트 삭제"
+
#~ msgid "Issue Tracker"
#~ msgstr "이슈 트래커"
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index 57c377b571..bbbe630d4a 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -858,7 +858,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1465,17 +1464,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Netinkamas šrifto dydis."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2424,11 +2414,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Atidaryti Skriptų Editorių"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2699,10 +2692,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3320,6 +3309,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr "Galbūt jūs pamiršote '_run' metodą?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Pasirinkite Nodus, kuriuos norite importuoti"
@@ -3927,6 +3920,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6888,15 +6885,15 @@ msgid ""
msgstr "Prijungti '%s' prie '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Linija:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
msgstr ""
@@ -7367,6 +7364,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10378,8 +10384,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Atidaryti Skriptų Editorių"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10540,6 +10547,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10588,11 +10602,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10715,6 +10729,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Netinkamas šrifto dydis."
@@ -10759,6 +10777,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Netinkamas šrifto dydis."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Netinkamas šrifto dydis."
@@ -11812,6 +11835,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11836,6 +11863,32 @@ msgstr "Netinkamas šrifto dydis."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index 642050468b..b69ecf7eef 100644
--- a/editor/translations/lv.po
+++ b/editor/translations/lv.po
@@ -3,14 +3,16 @@
# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
# Gustavs Porietis (pg829-) <porietisgustavs@gmail.com>, 2018.
-# Martch Zagorski <martchzagorski@gmail.com>, 2018.
+# Martch Zagorski <martchzagorski@gmail.com>, 2018, 2020.
# Jānis Ondzuls <janisond@inbox.lv>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
+# StiLins <aigars.skilins@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-03-11 12:20+0000\n"
-"Last-Translator: Jānis Ondzuls <janisond@inbox.lv>\n"
+"PO-Revision-Date: 2020-06-04 18:34+0000\n"
+"Last-Translator: StiLins <aigars.skilins@gmail.com>\n"
"Language-Team: Latvian <https://hosted.weblate.org/projects/godot-engine/"
"godot/lv/>\n"
"Language: lv\n"
@@ -19,16 +21,17 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n % 10 == 0 || n % 100 >= 11 && n % 100 <= "
"19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2);\n"
-"X-Generator: Weblate 4.0-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
msgstr ""
+"Nepareizs argumenta tips convert() izsaukšanai, lietojiet TYPE_* konstantes."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "Jālieto teksta rinda ar garumu 1 (simbols)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -42,7 +45,7 @@ msgstr "Nederīga ievade %i (nav padota) izteikumā"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
+msgstr "'self' nevar izmantot, jo instance ir 'null' (nav padota)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -58,11 +61,11 @@ msgstr "Nederīgs nosaukts indekss '%s' bāzes tipam %s"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "Nderīgs arguments, lai izveidotu '%s'"
+msgstr "Nederīgs arguments, lai izveidotu '%s'"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr ""
+msgstr "'%s' izsaukumā:"
#: core/ustring.cpp
msgid "B"
@@ -98,7 +101,7 @@ msgstr "Bezmaksas"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr "Balancēts"
+msgstr "Balansēts"
#: editor/animation_bezier_editor.cpp
msgid "Mirror"
@@ -114,97 +117,96 @@ msgstr "Vērtība:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "Ievadiet vērtību šeit"
+msgstr "Ievadiet Atslēgu Šeit"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
-msgstr "Dublikāta Vērtības"
+msgstr "Izveidot Dublikātu Izvēlētajai(ām) Atslēgai(ām)"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr "Izdzēst izvēlēto(ās) vērtību(as)?"
+msgstr "Izdzēst Izvēlēto(ās) Atslēgu(as)"
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
-msgstr ""
+msgstr "Pievienot Bezjē Punktu"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
-msgstr ""
+msgstr "Pārvietot Bezjē Punktus"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr ""
+msgstr "Anim Izveidot Atslēgu Dublikātu"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Delete Keys"
-msgstr ""
+msgstr "Anim Izdzēst Atslēgas"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr ""
+msgstr "Anim Izmainīt Atslēgkadra Laiku"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr ""
+msgstr "Anim Izmainīt Pāreju"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr ""
+msgstr "Anim Izmainīt Transformāciju"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Value"
-msgstr ""
+msgstr "Anim Izmainīt Atslēgkadra Vērtību"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
-msgstr ""
+msgstr "Anim Izmainīt Izsaukumu"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
-msgstr ""
+msgstr "Anim Vairākkārt Izmainīt Atslēgkadra Laiku"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transition"
-msgstr ""
+msgstr "Anim Vairākkārt Izmainīt Pāreju"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transform"
-msgstr ""
+msgstr "Anim Vairākkārt Izmainīt Transformāciju"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Value"
-msgstr ""
+msgstr "Anim Vairākkārt Izmainīt Atslēgkadra Vērtību"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Call"
-msgstr ""
+msgstr "Anim Vairākkārt Izmainīt Izsaukumu"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Length"
-msgstr "Animāciju Cilpa"
+msgstr "Izmainīt Animācijas Garumu"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr ""
+msgstr "Izmainīt Animācijas Atkārtošanos"
#: editor/animation_track_editor.cpp
msgid "Property Track"
-msgstr ""
+msgstr "Mainīgo Celiņš"
#: editor/animation_track_editor.cpp
msgid "3D Transform Track"
-msgstr ""
+msgstr "3D Transformācijas Celiņš"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr ""
+msgstr "Izsaukt Metožu Celiņu"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr ""
+msgstr "Bezjē Līkņu Celiņš"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
@@ -215,14 +217,12 @@ msgid "Animation Playback Track"
msgstr "Animācijas atskaņošanas celiņs"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (frames)"
-msgstr "Animācijas Garums (sekundes)"
+msgstr "Animācijas garums (kadri)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (seconds)"
-msgstr "Animācijas Garums (sekundes)"
+msgstr "Animācijas garums (sekundes)"
#: editor/animation_track_editor.cpp
msgid "Add Track"
@@ -247,15 +247,15 @@ msgstr "Animācijas klipi:"
#: editor/animation_track_editor.cpp
msgid "Change Track Path"
-msgstr ""
+msgstr "Izmainīt Ceļu uz Celiņa"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
-msgstr ""
+msgstr "Pārslēgt šo celiņu ieslēgts/izslēgts."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Atjaunošanas Režīms (Kā šis mainīgais tiek iestatīts)"
#: editor/animation_track_editor.cpp
msgid "Interpolation Mode"
@@ -263,7 +263,7 @@ msgstr "Interpolācijas režīms"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr ""
+msgstr "Atkārtošanās Aptīšanas Režīms (Interpolē beigas ar cilpas sākumu)"
#: editor/animation_track_editor.cpp
msgid "Remove this track."
@@ -275,7 +275,7 @@ msgstr "Laiks (s): "
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr ""
+msgstr "Pārslēgt Celiņu uz Iespējotu"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -308,16 +308,16 @@ msgstr "Kubisks"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
-msgstr ""
+msgstr "Apgriezt Cilpas Interpolāciju"
#: editor/animation_track_editor.cpp
msgid "Wrap Loop Interp"
-msgstr ""
+msgstr "Aptīt Cilpas Interpolāciju"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr "Ievietot atslēgievietni"
+msgstr "Ievietot Atslēgu"
#: editor/animation_track_editor.cpp
msgid "Duplicate Key(s)"
@@ -328,23 +328,20 @@ msgid "Delete Key(s)"
msgstr "Izdzēst atslēgvietnes"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Update Mode"
-msgstr "Animācijas tālummaiņa."
+msgstr "Izmainīt Animācijas Atjaunošanas Režīmu"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Interpolation Mode"
-msgstr "Interpolācijas režīms"
+msgstr "Izmainīt Animācijas Interpolācijas Režīmu"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Loop Mode"
-msgstr "Animācijas tālummaiņa."
+msgstr "Izmainīt Animācijas Atkārtošanās Režīmu"
#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
-msgstr "Noņemt animācijas celiņu"
+msgstr "Noņemt Anim. Celiņu"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
@@ -372,33 +369,31 @@ msgstr "Anim ievietot"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
-msgstr "AnimationPlayer nevar animēt pats sevi, tikai citi spēlētāji."
+msgstr "AnimationPlayer nevar animēt pats sevi, tikai citus spēlētājus."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
-msgstr "Anim izveidot un ievietot"
+msgstr "Anim Izveidot un Ievietot"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Track & Key"
-msgstr "Anim ievietot celiņu un atslēgvietni"
+msgstr "Anim Ievietot Celiņu un Atslēgu"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Key"
-msgstr "Anim ievietot atslēgievietni"
+msgstr "Anim Ievietot Atslēgu"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Step"
-msgstr "Animācijas tālummaiņa."
+msgstr "Izmainīt Animācijas Soli"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Rearrange Tracks"
-msgstr "Ielīmēt celiņus"
+msgstr "Pārkārtot Celiņus"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr ""
+msgstr "Transformācijas celiņi tiek tikai pievienoti Telpiskajām mezgliem."
#: editor/animation_track_editor.cpp
msgid ""
@@ -407,7 +402,7 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
-"Audio celiņu var tikai rādīt uz šāda tipa mezgliem:\n"
+"Audio celiņu var tikai norādīt uz šāda tipa mezgliem:\n"
"-AudioStreamPlayer\n"
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
@@ -426,47 +421,43 @@ msgstr "Nevar izveidot jaunu celiņu bez saknes"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
-msgstr ""
+msgstr "Neatbilstošs celiņš priekš Bezjē (nav piemērotu apakš-mainīgo)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Bezier Track"
-msgstr "Pievienot celiņu"
+msgstr "Pievienot Bezjē Celiņu"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
-msgstr ""
+msgstr "Ceļš uz Celiņu nav derīgs, tāpēc nevar pievienot atslēgu."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
+msgstr "Celiņš nepieder Telpiskajam tipam, nevar ievietot atslēgu"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Transform Track Key"
-msgstr "Anim ievietot celiņu un atslēgvietni"
+msgstr "Pievienot Atslēgu Transformācijas Celiņam"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track Key"
-msgstr "Pievienot celiņu"
+msgstr "Pievienot Celiņa Atslēgu"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
-msgstr ""
+msgstr "Ceļš uz Celiņu nav derīgs, tāpēc nevar pievienot metodes atslēgu."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Method Track Key"
-msgstr "Anim ievietot celiņu un atslēgvietni"
+msgstr "Pievienot Celiņa Metodes Atslēgu"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
-msgstr "Metode netika atrasta objektā: "
+msgstr "Metode objektā netika atrasta: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
-msgstr "Anim pārvietot atslēgievietnes"
+msgstr "Anim Pārvietot Atslēgas"
#: editor/animation_track_editor.cpp
msgid "Clipboard is empty"
@@ -478,12 +469,12 @@ msgstr "Ielīmēt celiņus"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
-msgstr "Anim pārvietot atslēgievietnes"
+msgstr "Anim Mainīt Atslēgas Izmēru"
#: editor/animation_track_editor.cpp
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
-msgstr ""
+msgstr "Šī iespēja nestrādā ar Bazjē rediģēšanu, jo tai ir tikai viens celiņš."
#: editor/animation_track_editor.cpp
msgid ""
@@ -497,14 +488,24 @@ msgid ""
"Alternatively, use an import preset that imports animations to separate "
"files."
msgstr ""
+"Šī animācija pieder importētajai ainai, tāpēc importētā celiņa izmaiņas "
+"netiks saglabātas.\n"
+"\n"
+"Lai iespējotu pielāgotu celiņu pievienošanu, atrodiet ainu importēšanas "
+"iespējas un iestādiet\n"
+"\"Animation > Storage\" uz \"Files\", iespējojiet \"Animation > Keep Custom "
+"Tracks\", tad nospiediet 're-import'.\n"
+"Alternatīvi, izmantojiet 'import preset', kas importē animācijas uz "
+"atsevišķiem failiem."
#: editor/animation_track_editor.cpp
msgid "Warning: Editing imported animation"
-msgstr ""
+msgstr "Brīdinājums: Rediģējat importēto animāciju"
#: editor/animation_track_editor.cpp
msgid "Select an AnimationPlayer node to create and edit animations."
msgstr ""
+"Izvēlieties 'AnimationPlayer' mezglu, lai izveidotu un rediģētu animācijas."
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
@@ -516,9 +517,8 @@ msgstr ""
"Sagrupēt celiņus atkarībā no mezgliem vai rādīt tos vienkāršā sarakstā."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Snap:"
-msgstr "Solis (s): "
+msgstr "Pievilkt:"
#: editor/animation_track_editor.cpp
msgid "Animation step value."
@@ -526,11 +526,11 @@ msgstr "Animācijas soļa vērtība."
#: editor/animation_track_editor.cpp
msgid "Seconds"
-msgstr ""
+msgstr "Sekundes"
#: editor/animation_track_editor.cpp
msgid "FPS"
-msgstr ""
+msgstr "FPS"
#: editor/animation_track_editor.cpp editor/editor_properties.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -560,7 +560,7 @@ msgstr "Skala No Kursora"
#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr "Dublikāta Izvēle"
+msgstr "Izveidot Dublikātu Izvēlētajam"
#: editor/animation_track_editor.cpp
msgid "Duplicate Transposed"
@@ -571,14 +571,12 @@ msgid "Delete Selection"
msgstr "Dzēst izvēlētos"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Next Step"
-msgstr "Doties uz nākamo soli"
+msgstr "Doties uz Nākamo Soli"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Previous Step"
-msgstr "Doties uz iepriekšējo soli"
+msgstr "Doties uz Iepriekšējo Soli"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -586,7 +584,7 @@ msgstr "Optimizēt animāciju"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation"
-msgstr ""
+msgstr "Iztīrīšanas Animācija"
#: editor/animation_track_editor.cpp
msgid "Pick the node that will be animated:"
@@ -594,7 +592,7 @@ msgstr "Izvēlies mezglu, kurā tiks animēta:"
#: editor/animation_track_editor.cpp
msgid "Use Bezier Curves"
-msgstr ""
+msgstr "Izmanto Bezjē Līknes"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -602,15 +600,15 @@ msgstr "Anim. Optimizētājs"
#: editor/animation_track_editor.cpp
msgid "Max. Linear Error:"
-msgstr ""
+msgstr "Maks. Lineārā Kļūda:"
#: editor/animation_track_editor.cpp
msgid "Max. Angular Error:"
-msgstr ""
+msgstr "Maks. Rotācijas Kļūda:"
#: editor/animation_track_editor.cpp
msgid "Max Optimizable Angle:"
-msgstr ""
+msgstr "Max. Optimizējamais Leņķis:"
#: editor/animation_track_editor.cpp
msgid "Optimize"
@@ -618,23 +616,23 @@ msgstr "Optimizēt"
#: editor/animation_track_editor.cpp
msgid "Remove invalid keys"
-msgstr ""
+msgstr "Noņemt nederīgās atslēgas"
#: editor/animation_track_editor.cpp
msgid "Remove unresolved and empty tracks"
-msgstr ""
+msgstr "Noņemt neatrisinātos un nedefinētos celiņus"
#: editor/animation_track_editor.cpp
msgid "Clean-up all animations"
-msgstr ""
+msgstr "Iztīrīt visas animācijas"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation(s) (NO UNDO!)"
-msgstr ""
+msgstr "Iztīrīt Animāciju(as) (NEATGRIEZENISKI!)"
#: editor/animation_track_editor.cpp
msgid "Clean-Up"
-msgstr ""
+msgstr "Iztīrit"
#: editor/animation_track_editor.cpp
msgid "Scale Ratio:"
@@ -642,7 +640,7 @@ msgstr "Mēroga Attiecība:"
#: editor/animation_track_editor.cpp
msgid "Select Tracks to Copy"
-msgstr ""
+msgstr "Izvēlēties Celiņus ko Kopēt"
#: editor/animation_track_editor.cpp editor/editor_log.cpp
#: editor/editor_properties.cpp
@@ -651,33 +649,31 @@ msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
-msgstr ""
+msgstr "Kopēt"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select All/None"
-msgstr "Dzēst izvēlētos"
+msgstr "Izvēlēties Visus/Nevienu"
#: editor/animation_track_editor_plugins.cpp
-#, fuzzy
msgid "Add Audio Track Clip"
-msgstr "Audio klipi:"
+msgstr "Pievienot Audio Celiņa Klipu"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip Start Offset"
-msgstr ""
+msgstr "Mainīt Audio Celiņa Apgriešanas Sākuma Kompensāciju"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip End Offset"
-msgstr ""
+msgstr "Mainīt Audio Celiņa Apgriešanas Beigu Kompensāciju"
#: editor/array_property_edit.cpp
msgid "Resize Array"
-msgstr ""
+msgstr "Mainīt Masīva Lielumu"
#: editor/array_property_edit.cpp
msgid "Change Array Value Type"
-msgstr ""
+msgstr "Mainīt Masīva Vērtības Tipu"
#: editor/array_property_edit.cpp
msgid "Change Array Value"
@@ -705,11 +701,11 @@ msgstr "%d sakritības."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
-msgstr ""
+msgstr "Atrast Gadījumu"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Whole Words"
-msgstr ""
+msgstr "Visu Vārdu"
#: editor/code_editor.cpp editor/rename_dialog.cpp
msgid "Replace"
@@ -730,13 +726,13 @@ msgstr "Standarts"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
-msgstr ""
+msgstr "Pārslēgt Skriptu Paneli"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom In"
-msgstr "Pietuvināt"
+msgstr "Palielināt"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
@@ -746,44 +742,43 @@ msgstr "Attālināt"
#: editor/code_editor.cpp
msgid "Reset Zoom"
-msgstr "Atiestatīt tālummaiņu"
+msgstr "Atiestatīt Tālummaiņu"
#: editor/code_editor.cpp
msgid "Warnings"
-msgstr ""
+msgstr "Brīdinājumi"
#: editor/code_editor.cpp
msgid "Line and column numbers."
-msgstr ""
+msgstr "Rindu un kolonnu numuri."
#: editor/connections_dialog.cpp
msgid "Method in target node must be specified."
-msgstr ""
+msgstr "Metodi mērķa mezglā nepieciešams specificēt."
#: editor/connections_dialog.cpp
msgid ""
"Target method not found. Specify a valid method or attach a script to the "
"target node."
msgstr ""
+"Mērķa metode netika atrasta. Specificējiet derīgu metodi vai pievienojiet "
+"skriptu mērķa mezglam."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect to Node:"
-msgstr "Savienot"
+msgstr "Savienot ar Mezglu:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect to Script:"
-msgstr "Savieno Signālu:"
+msgstr "Savieno ar Skriptu:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "From Signal:"
-msgstr "Savieno Signālu:"
+msgstr "No Signāla:"
#: editor/connections_dialog.cpp
msgid "Scene does not contain any script."
-msgstr ""
+msgstr "Aina nesatur skriptu."
#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
@@ -804,48 +799,45 @@ msgstr "Noņemt"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
-msgstr ""
+msgstr "Pievienot Ekstra Izsaukuma Argumentu:"
#: editor/connections_dialog.cpp
msgid "Extra Call Arguments:"
-msgstr ""
+msgstr "Ekstra Izsaukuma Argumenti:"
#: editor/connections_dialog.cpp
msgid "Receiver Method:"
-msgstr ""
+msgstr "Saņemšanas Metode:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Advanced"
-msgstr "Balancēts"
+msgstr "Papildus"
#: editor/connections_dialog.cpp
msgid "Deferred"
-msgstr ""
+msgstr "Atlikts"
#: editor/connections_dialog.cpp
msgid ""
"Defers the signal, storing it in a queue and only firing it at idle time."
-msgstr ""
+msgstr "Atliek signālu, glabājot to rindā, un to izstaro tikai dīkstāvē."
#: editor/connections_dialog.cpp
msgid "Oneshot"
-msgstr ""
+msgstr "Vienreiz"
#: editor/connections_dialog.cpp
msgid "Disconnects the signal after its first emission."
-msgstr ""
+msgstr "Atvieno signālu pēc tā pirmās izstarošanas."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Cannot connect signal"
-msgstr "Savieno Signālu:"
+msgstr "Nevar savienot signālu"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -861,9 +853,8 @@ msgid "Connect"
msgstr "Savienot"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Signal:"
-msgstr "Signāli"
+msgstr "Signāls:"
#: editor/connections_dialog.cpp
msgid "Connect '%s' to '%s'"
@@ -874,32 +865,30 @@ msgid "Disconnect '%s' from '%s'"
msgstr "Atvienot '%s' no '%s'"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Disconnect all from signal: '%s'"
-msgstr "Atvienot '%s' no '%s'"
+msgstr "Atvienot visus no signāla: '%s'"
#: editor/connections_dialog.cpp
msgid "Connect..."
-msgstr ""
+msgstr "Savieno..."
#: editor/connections_dialog.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Disconnect"
-msgstr ""
+msgstr "Atvieno"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect a Signal to a Method"
-msgstr "Savieno Signālu:"
+msgstr "Savienot Signālu ar Metodi"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Edit Connection:"
-msgstr "Savieno Signālu:"
+msgstr "Izmainīt Savienojumu:"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
msgstr ""
+"Vai esat drošs(ša), ka vēlaties noņemt visus savienojumus no \"%s\" signāla?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
@@ -908,18 +897,19 @@ msgstr "Signāli"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
msgstr ""
+"Vai esat drošs(ša), ka vēlaties noņemt visus savienojumus no šī signāla?"
#: editor/connections_dialog.cpp
msgid "Disconnect All"
-msgstr ""
+msgstr "Atvienot Visu"
#: editor/connections_dialog.cpp
msgid "Edit..."
-msgstr ""
+msgstr "Rediģēt..."
#: editor/connections_dialog.cpp
msgid "Go To Method"
-msgstr ""
+msgstr "Doties Uz Metodi"
#: editor/create_dialog.cpp
msgid "Change %s Type"
@@ -952,7 +942,7 @@ msgstr "Meklēt:"
#: editor/property_selector.cpp editor/quick_open.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
-msgstr ""
+msgstr "Sakritības:"
#: editor/create_dialog.cpp editor/editor_plugin_settings.cpp
#: editor/plugin_config_dialog.cpp
@@ -964,28 +954,32 @@ msgstr "Apraksts:"
#: editor/dependency_editor.cpp
msgid "Search Replacement For:"
-msgstr ""
+msgstr "Meklēt Aizstājēju Priekš:"
#: editor/dependency_editor.cpp
msgid "Dependencies For:"
-msgstr ""
+msgstr "Atkarības Priekš:"
#: editor/dependency_editor.cpp
msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will only take effect when reloaded."
msgstr ""
+"Aina '%s' pašlaik tiek rediģēta.\n"
+"Izmaiņas stāsies spēkā, kad tā tiks pārlādēta."
#: editor/dependency_editor.cpp
msgid ""
"Resource '%s' is in use.\n"
"Changes will only take effect when reloaded."
msgstr ""
+"Resurss '%s' tiek izmantots.\n"
+"Izmaiņas stāsies spēkā, kad tas tiks pārlādēts."
#: editor/dependency_editor.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Dependencies"
-msgstr ""
+msgstr "Atkarības"
#: editor/dependency_editor.cpp
msgid "Resource"
@@ -994,23 +988,23 @@ msgstr "Resurs"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
#: editor/project_manager.cpp editor/project_settings_editor.cpp
msgid "Path"
-msgstr ""
+msgstr "Ceļš"
#: editor/dependency_editor.cpp
msgid "Dependencies:"
-msgstr ""
+msgstr "Atkarības:"
#: editor/dependency_editor.cpp
msgid "Fix Broken"
-msgstr ""
+msgstr "Labot Salauzto"
#: editor/dependency_editor.cpp
msgid "Dependency Editor"
-msgstr ""
+msgstr "Atkarību Redaktors"
#: editor/dependency_editor.cpp
msgid "Search Replacement Resource:"
-msgstr ""
+msgstr "Meklēt Aizstājēja Resursu:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
@@ -1028,7 +1022,7 @@ msgstr "Īpašnieki:"
#: editor/dependency_editor.cpp
msgid "Remove selected files from the project? (Can't be restored)"
-msgstr ""
+msgstr "Vai noņemt izvēlētos failus no projekta? (Netiks atjaunoti)"
#: editor/dependency_editor.cpp
msgid ""
@@ -1049,9 +1043,8 @@ msgid "Error loading:"
msgstr "Kļūme lādējot:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Load failed due to missing dependencies:"
-msgstr "Ainu nevarēja ielādēt dēļ neatrastiem dependencīem:"
+msgstr "Ielādēšana apturēta, jo trūkst ceļu uz pamata failiem:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Open Anyway"
@@ -1062,9 +1055,8 @@ msgid "Which action should be taken?"
msgstr "Kuru darbību izdarīt?"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Fix Dependencies"
-msgstr "Salabot dependecīju"
+msgstr "Salabot Atkarības"
#: editor/dependency_editor.cpp
msgid "Errors loading!"
@@ -1072,16 +1064,15 @@ msgstr "Kļūmes lādējot!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr ""
+msgstr "Vai neatgriezeniski izdzēst %d priekšmetu(us)? (NEATGRIEZENISKI!)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Show Dependencies"
-msgstr "Salabot dependecīju"
+msgstr "Rādīt Ceļus uz Pamata Failiem"
#: editor/dependency_editor.cpp
msgid "Orphan Resource Explorer"
-msgstr ""
+msgstr "Bāreņu Resursu Pārlūks"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
@@ -1097,15 +1088,15 @@ msgstr "Pieder"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
-msgstr ""
+msgstr "Resursi Bez Skaidra Īpašnieka:"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Key"
-msgstr ""
+msgstr "Mainīt Vārdnīcas Atslēgu"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Value"
-msgstr ""
+msgstr "Mainīt Vārdnīcas Vērtību"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
@@ -1168,22 +1159,20 @@ msgid "License"
msgstr "Licence"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Third-party Licenses"
-msgstr "Trešās partijas Licence"
+msgstr "Trešās partijas Licences"
#: editor/editor_about.cpp
-#, fuzzy
msgid ""
"Godot Engine relies on a number of third-party free and open source "
"libraries, all compatible with the terms of its MIT license. The following "
"is an exhaustive list of all such third-party components with their "
"respective copyright statements and license terms."
msgstr ""
-"Godot Dzinējs paļaujas uz citiem trešās partijas brīvajām un atvērtā avota "
-"bibliotēkām, kuri visi sader ar to MIT licences nosacījumiem. Sekojošais ir "
-"saraksts ar šīm trešās partijas komponentēm ar to autortiesību apgalvojumiem "
-"un licences nosacījumiem."
+"Godot Konstruktors paļaujas uz citiem trešās partijas brīvajām un atvērtā "
+"avota bibliotēkām, kuras ir saderīgas ar to MIT licences nosacījumiem. "
+"Sekojošais ir saraksts ar šīm trešās partijas komponentēm ar to autortiesību "
+"apgalvojumiem un licences nosacījumiem."
#: editor/editor_about.cpp
msgid "All Components"
@@ -1198,38 +1187,37 @@ msgid "Licenses"
msgstr "Licences"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file, not in ZIP format."
-msgstr "Kļūme atverot arhīvu failu, nav ZIP formātā."
+msgstr "Kļūda atverot failu arhīvu, nav ZIP formātā."
#: editor/editor_asset_installer.cpp
msgid "%s (Already Exists)"
-msgstr ""
+msgstr "%s (Jau Eksistē)"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr ""
+msgstr "Nekompresēti Līdzekļi"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "The following files failed extraction from package:"
-msgstr ""
+msgstr "Sekojošie faili netika izvilkti no paketes:"
#: editor/editor_asset_installer.cpp
msgid "And %s more files."
-msgstr ""
+msgstr "Un %s vēl faili."
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Package installed successfully!"
-msgstr ""
+msgstr "Pakete instalēta sekmīgi!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr "Izdevās!"
+msgstr "Mērķis sasniegts!"
#: editor/editor_asset_installer.cpp
msgid "Package Contents:"
-msgstr ""
+msgstr "Paketes Saturs:"
#: editor/editor_asset_installer.cpp editor/editor_node.cpp
msgid "Install"
@@ -1237,7 +1225,7 @@ msgstr "Ieinstalēt"
#: editor/editor_asset_installer.cpp
msgid "Package Installer"
-msgstr ""
+msgstr "Paketes Instalētājs"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1257,47 +1245,47 @@ msgstr "Nomainīt Audio Kopnes Skaļumu"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Solo"
-msgstr ""
+msgstr "Pārslēgt Audio Busa Solo"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Mute"
-msgstr ""
+msgstr "Pārslēgt Audio Busa Apklusināšanu"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Bypass Effects"
-msgstr ""
+msgstr "Pārslēgt Audio Busa Šuntēšanas Efektu"
#: editor/editor_audio_buses.cpp
msgid "Select Audio Bus Send"
-msgstr ""
+msgstr "Izvēlēties Audio Busa Sūtīšanu"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus Effect"
-msgstr ""
+msgstr "Pievienot Audio Busa Efektu"
#: editor/editor_audio_buses.cpp
msgid "Move Bus Effect"
-msgstr ""
+msgstr "Pārvietot Busa Efektu"
#: editor/editor_audio_buses.cpp
msgid "Delete Bus Effect"
-msgstr ""
+msgstr "Izdzēst Busa Efektu"
#: editor/editor_audio_buses.cpp
msgid "Drag & drop to rearrange."
-msgstr ""
+msgstr "Velc un atlaid, lai pārkārtotu."
#: editor/editor_audio_buses.cpp
msgid "Solo"
-msgstr ""
+msgstr "Solo"
#: editor/editor_audio_buses.cpp
msgid "Mute"
-msgstr ""
+msgstr "Apklusināt"
#: editor/editor_audio_buses.cpp
msgid "Bypass"
-msgstr ""
+msgstr "Šunts"
#: editor/editor_audio_buses.cpp
msgid "Bus options"
@@ -1306,7 +1294,7 @@ msgstr "Kopnes iestatījumi"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Duplicate"
-msgstr ""
+msgstr "Izveidot Dublikātu"
#: editor/editor_audio_buses.cpp
msgid "Reset Volume"
@@ -1369,9 +1357,8 @@ msgid "Invalid file, not an audio bus layout."
msgstr ""
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Error saving file: %s"
-msgstr "Kļūmes lādējot!"
+msgstr "Kļūda saglabājot failu: %s"
#: editor/editor_audio_buses.cpp
msgid "Add Bus"
@@ -1420,25 +1407,18 @@ msgid "Valid characters:"
msgstr "Derīgie simboli:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing engine class name."
msgstr ""
-"Nederīgs nosaukums. Nedrīkst sadurties ar eksistējošu dzinēja klases "
-"nosaukumu."
+"Nosaukums nedrīkst būt vienāds ar eksistējošu konstruktora klases nosaukumu."
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing built-in type name."
-msgstr ""
-"Nederīgs nosaukums. Nedrīkst sadurties ar eksistējošu iebūvēto tipa "
-"nosaukumu."
+msgstr "Nosaukums nedrīkst būt vienāds ar eksistējošu iebūvēta tipa nosaukumu."
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing global constant name."
msgstr ""
-"Nederīgs nosaukums. Nedrīkst sadurties ar eksistējošu dzinēja klases "
-"nosaukumu."
+"Nosaukums nedrīkst būt vienāds ar eksistējošu globālo konstantes nosaukumu."
#: editor/editor_autoload_settings.cpp
msgid "Keyword cannot be used as an autoload name."
@@ -1472,17 +1452,8 @@ msgstr "Iespējot"
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Nederīgs nosaukums."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -1617,9 +1588,8 @@ msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "3D Editor"
-msgstr "Rediģēt"
+msgstr "3D Redaktors"
#: editor/editor_feature_profile.cpp
msgid "Script Editor"
@@ -1666,23 +1636,20 @@ msgid "(Properties Disabled)"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(Editor Disabled)"
-msgstr "Atspējots"
+msgstr "(Redaktors Izslēgts)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Options:"
-msgstr "Apraksts:"
+msgstr "Klases Iespējas:"
#: editor/editor_feature_profile.cpp
msgid "Enable Contextual Editor"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Enabled Properties:"
-msgstr "Animācijas īpašības."
+msgstr "Ieslēgtie Mainīgie:"
#: editor/editor_feature_profile.cpp
msgid "Enabled Features:"
@@ -1703,9 +1670,8 @@ msgid ""
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Error saving profile to path: '%s'."
-msgstr "Kļūmes lādējot!"
+msgstr "Kļūda saglabājot profilu uz ceļu: '%s'."
#: editor/editor_feature_profile.cpp
msgid "Unset"
@@ -1716,9 +1682,8 @@ msgid "Current Profile:"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Make Current"
-msgstr "Izveidot Funkciju"
+msgstr "Aktualizēt"
#: editor/editor_feature_profile.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -1736,14 +1701,12 @@ msgid "Export"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Available Profiles:"
-msgstr "Animācijas īpašības."
+msgstr "Pieejamie Profili:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Options"
-msgstr "Apraksts:"
+msgstr "Klases Iespējas"
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -1778,18 +1741,16 @@ msgid "File Exists, Overwrite?"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Select This Folder"
-msgstr "Izvēlēties šo Mapi"
+msgstr "Izvēlēties Šo Mapi"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Copy Path"
msgstr ""
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open in File Manager"
-msgstr "Atvērt"
+msgstr "Atvērt Failu Pārlūkā"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
@@ -1877,23 +1838,20 @@ msgid "Move Favorite Down"
msgstr ""
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to previous folder."
-msgstr "Doties uz iepriekšējo soli"
+msgstr "Doties uz iepriekšējo mapi."
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to next folder."
-msgstr "Doties uz nākamo soli"
+msgstr "Doties uz nākamo mapi."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Go to parent folder."
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Refresh files."
-msgstr "Meklēt:"
+msgstr "Atjaunot failus."
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
@@ -1961,9 +1919,8 @@ msgid "Inherited by:"
msgstr ""
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "Apraksts:"
+msgstr "Apraksts"
#: editor/editor_help.cpp
msgid "Online Tutorials"
@@ -1978,9 +1935,8 @@ msgid "override:"
msgstr ""
#: editor/editor_help.cpp
-#, fuzzy
msgid "default:"
-msgstr "Ielādēt Noklusējumu"
+msgstr "pēc noklusējuma:"
#: editor/editor_help.cpp
msgid "Methods"
@@ -1999,9 +1955,8 @@ msgid "Constants"
msgstr ""
#: editor/editor_help.cpp
-#, fuzzy
msgid "Property Descriptions"
-msgstr "Apraksts:"
+msgstr "Mainīgo Apraksts"
#: editor/editor_help.cpp
msgid "(value)"
@@ -2014,9 +1969,8 @@ msgid ""
msgstr ""
#: editor/editor_help.cpp
-#, fuzzy
msgid "Method Descriptions"
-msgstr "Apraksts:"
+msgstr "Metožu Apraksts"
#: editor/editor_help.cpp
msgid ""
@@ -2050,9 +2004,8 @@ msgid "Methods Only"
msgstr ""
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Signals Only"
-msgstr "Signāli"
+msgstr "Tikai Signāli"
#: editor/editor_help_search.cpp
msgid "Constants Only"
@@ -2079,9 +2032,8 @@ msgid "Method"
msgstr ""
#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Signal"
-msgstr "Signāli"
+msgstr "Signāls"
#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
@@ -2112,9 +2064,8 @@ msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Copy Selection"
-msgstr "Noņemt Izvēlēto"
+msgstr "Kopēt Izvēlēto"
#: editor/editor_log.cpp editor/editor_network_profiler.cpp
#: editor/editor_profiler.cpp editor/editor_properties.cpp
@@ -2350,9 +2301,8 @@ msgid "Open Base Scene"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Quick Open..."
-msgstr "Atvērt"
+msgstr "Ātri Atvērt..."
#: editor/editor_node.cpp
msgid "Quick Open Scene..."
@@ -2423,11 +2373,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Atvērt Aizvērto Ainu"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2473,9 +2426,8 @@ msgid "Close Scene"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reopen Closed Scene"
-msgstr "Atjaunina Ainu"
+msgstr "Atvērt Aizvērto Ainu"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
@@ -2568,14 +2520,12 @@ msgid "Play This Scene"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Close Tab"
-msgstr "Aizvērt"
+msgstr "Aizvērt Cilni"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Undo Close Tab"
-msgstr "Aizvērt"
+msgstr "Atcelt Cilnes Aizvēršanu"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Close Other Tabs"
@@ -2586,9 +2536,8 @@ msgid "Close Tabs to the Right"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Close All Tabs"
-msgstr "Aizvērt"
+msgstr "Aizvērt Visas Cilnes"
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
@@ -2631,9 +2580,8 @@ msgid "Go to previously opened scene."
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Copy Text"
-msgstr "Noņemt Izvēlēto"
+msgstr "Kopēt Tekstu"
#: editor/editor_node.cpp
msgid "Next tab"
@@ -2672,9 +2620,8 @@ msgid "Save Scene"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save All Scenes"
-msgstr "Saglabāt Kā"
+msgstr "Saglabāt Visas Ainas"
#: editor/editor_node.cpp
msgid "Convert To..."
@@ -2699,10 +2646,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -2736,9 +2679,8 @@ msgid "Install Android Build Template..."
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Project Data Folder"
-msgstr "Projekta Dibinātāji"
+msgstr "Atvērt Projekta Datu Mapi"
#: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp
msgid "Tools"
@@ -2905,11 +2847,11 @@ msgstr ""
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
-msgstr ""
+msgstr "Sabiedrība"
#: editor/editor_node.cpp
msgid "About"
-msgstr ""
+msgstr "Par"
#: editor/editor_node.cpp
msgid "Play the project."
@@ -2961,9 +2903,8 @@ msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update Continuously"
-msgstr "Nepārtraukti"
+msgstr "Nepārtraukti Atjaunot"
#: editor/editor_node.cpp
msgid "Update When Changed"
@@ -3093,9 +3034,8 @@ msgid "Thumbnail..."
msgstr ""
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Main Script:"
-msgstr "Savieno Signālu:"
+msgstr "Galvenais Skripts:"
#: editor/editor_plugin_settings.cpp
msgid "Edit Plugin"
@@ -3167,9 +3107,8 @@ msgid "Calls"
msgstr ""
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Edit Text:"
-msgstr "Savieno Signālu:"
+msgstr "Rediģēt Tekstu:"
#: editor/editor_properties.cpp editor/script_create_dialog.cpp
msgid "On"
@@ -3192,9 +3131,8 @@ msgid "Assign..."
msgstr ""
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr "Nederīgs nosaukums."
+msgstr "Nederīgs RID"
#: editor/editor_properties.cpp
msgid ""
@@ -3313,6 +3251,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3437,9 +3379,8 @@ msgid "Download Complete."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cannot remove temporary file:"
-msgstr "Nevar noņemt:"
+msgstr "Nevar noņemt pagaidu failu:"
#: editor/export_template_manager.cpp
msgid ""
@@ -3448,9 +3389,8 @@ msgid ""
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error requesting URL:"
-msgstr "Kļūme lādējot:"
+msgstr "Kļūda pieprasot URL:"
#: editor/export_template_manager.cpp
msgid "Connecting to Mirror..."
@@ -3519,9 +3459,8 @@ msgid "Remove Template"
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select Template File"
-msgstr "Izvēlēties šo Mapi"
+msgstr "Izvēlēties Šablona Failu"
#: editor/export_template_manager.cpp
msgid "Godot Export Templates"
@@ -3540,9 +3479,8 @@ msgid "Select mirror from list: (Shift+Click: Open in Browser)"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Favorites"
-msgstr "Favorīti:"
+msgstr "Favorīti"
#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
@@ -3605,28 +3543,24 @@ msgid "New Inherited Scene"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Set As Main Scene"
-msgstr "Saglabāt Kā"
+msgstr "Iestatīt Kā Galveno Ainu"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open Scenes"
-msgstr "Atjaunina Ainu"
+msgstr "Atvērt Ainas"
#: editor/filesystem_dock.cpp
msgid "Instance"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Add to Favorites"
-msgstr "Favorīti:"
+msgstr "Pievienot Favorītiem"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Remove from Favorites"
-msgstr "Favorīti:"
+msgstr "Noņemt no Favorītiem"
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies..."
@@ -3649,18 +3583,16 @@ msgid "Move To..."
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Scene..."
-msgstr "Resurs"
+msgstr "Jauna Aina..."
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "New Script..."
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Resource..."
-msgstr "Resurs"
+msgstr "Jauns Resurss..."
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
@@ -3680,14 +3612,12 @@ msgid "Rename"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Previous Folder/File"
-msgstr "Izvēlēties šo Mapi"
+msgstr "Iepriekšējā Mape/Fails"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Next Folder/File"
-msgstr "Izvēlēties šo Mapi"
+msgstr "Nākamā Mape/Fails"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
@@ -3698,9 +3628,8 @@ msgid "Toggle Split Mode"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Search files"
-msgstr "Meklēt:"
+msgstr "Meklēt failus"
#: editor/filesystem_dock.cpp
msgid ""
@@ -3721,18 +3650,16 @@ msgid "Overwrite"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Create Scene"
-msgstr "Izveidot"
+msgstr "Izveidot Ainu"
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
msgstr ""
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Find in Files"
-msgstr "Nederīgs nosaukums."
+msgstr "Atrast Failos"
#: editor/find_in_files.cpp
msgid "Find:"
@@ -3770,18 +3697,16 @@ msgid "Find: "
msgstr ""
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace: "
-msgstr "Aizvietot"
+msgstr "Aizvietot: "
#: editor/find_in_files.cpp
msgid "Replace all (no undo)"
msgstr ""
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Searching..."
-msgstr "Meklēt:"
+msgstr "Meklē..."
#: editor/find_in_files.cpp
msgid "Search complete"
@@ -3800,19 +3725,16 @@ msgid "Group name already exists."
msgstr ""
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Invalid group name."
-msgstr "Nederīgs nosaukums."
+msgstr "Nederīgs grupas nosaukums."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Rename Group"
-msgstr "Pārsaukt Audio Kopni"
+msgstr "Pārsaukt Grupu"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Delete Group"
-msgstr "Izdzēst"
+msgstr "Izdzēst Grupu"
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
@@ -3836,9 +3758,8 @@ msgid "Empty groups will be automatically removed."
msgstr ""
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group Editor"
-msgstr "Rediģēt"
+msgstr "Grupas Redaktors"
#: editor/groups_editor.cpp
msgid "Manage Groups"
@@ -3918,13 +3839,16 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-#, fuzzy
msgid "%d Files"
-msgstr "Nederīgs nosaukums."
+msgstr "%d Failā"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
@@ -3939,9 +3863,8 @@ msgid "Import As:"
msgstr ""
#: editor/import_dock.cpp
-#, fuzzy
msgid "Preset"
-msgstr "Atiestatīt tālummaiņu"
+msgstr "Sagatave"
#: editor/import_dock.cpp
msgid "Reimport"
@@ -4075,16 +3998,14 @@ msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon"
-msgstr "Izveidot"
+msgstr "Izveidot Daudzstūri"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Create points."
-msgstr "Izveidot"
+msgstr "Izveidot punktus."
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid ""
@@ -4099,9 +4020,8 @@ msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Edit Polygon"
-msgstr "Izveidot"
+msgstr "Rediģēt Daudzstūri"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Insert Point"
@@ -4127,9 +4047,8 @@ msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Load..."
-msgstr "Ielādēt"
+msgstr "Ielādē..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4152,15 +4071,13 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Node Point"
-msgstr "Favorīti:"
+msgstr "Pievienot Mezgla Punktu"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Animation Point"
-msgstr "Animāciju Cilpa"
+msgstr "Pievienot Animācijas Punktu"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Remove BlendSpace1D Point"
@@ -4209,18 +4126,16 @@ msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Open Animation Node"
-msgstr "Animācijas tālummaiņa."
+msgstr "Atvērt Animācijas Mezglu"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Triangle already exists."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Triangle"
-msgstr "Pievienot celiņu"
+msgstr "Pievienot Trijstūri"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Change BlendSpace2D Limits"
@@ -4295,9 +4210,8 @@ msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Nodes Connected"
-msgstr "Savienot"
+msgstr "Mezgli Savienoti"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -4305,15 +4219,13 @@ msgid "Nodes Disconnected"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Set Animation"
-msgstr "Optimizēt animāciju"
+msgstr "Iestatīt Animāciju"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Delete Node"
-msgstr "Izdzēst"
+msgstr "Izdzēst Mezglu"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/scene_tree_dock.cpp
@@ -4325,9 +4237,8 @@ msgid "Toggle Filter On/Off"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Change Filter"
-msgstr "Nomainīt"
+msgstr "Nomainīt Filtru"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
@@ -4345,19 +4256,16 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Anim Clips"
-msgstr "Animācijas klipi:"
+msgstr "Anim. Klipi"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Audio Clips"
-msgstr "Audio klipi:"
+msgstr "Audio Klipi"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Functions"
-msgstr "Funkcijas:"
+msgstr "Funkcijas"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
@@ -4375,9 +4283,8 @@ msgid "Edit Filtered Tracks:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Enable Filtering"
-msgstr "Nomainīt"
+msgstr "Ieslēgt Filtrēšanu"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Toggle Autoplay"
@@ -4406,9 +4313,8 @@ msgid "Remove Animation"
msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Invalid animation name!"
-msgstr "Nederīgs nosaukums."
+msgstr "Nederīgs animācijas nosaukums!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation name already exists!"
@@ -4436,9 +4342,8 @@ msgid "Duplicate Animation"
msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "No animation to copy!"
-msgstr "Animācijas tālummaiņa."
+msgstr "Nav animācijas ko kopēt!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation resource on clipboard!"
@@ -4592,14 +4497,12 @@ msgid "Move Node"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition exists!"
-msgstr "Pievienot celiņu"
+msgstr "Pāreja eksistē!"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Add Transition"
-msgstr "Pievienot celiņu"
+msgstr "Pievienot Pāreju"
#: editor/plugins/animation_state_machine_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -4635,9 +4538,8 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Node Removed"
-msgstr "Noņemt"
+msgstr "Mezgls Noņemts"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Transition Removed"
@@ -4655,19 +4557,16 @@ msgid ""
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Create new nodes."
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot jaunus mezglus."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Connect nodes."
-msgstr "Savienot"
+msgstr "Savienot mezglus."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Remove selected node or transition."
-msgstr "Noņemt Izvēlēto"
+msgstr "Noņemt izvēlēto mezglu vai pāreju."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Toggle autoplay this animation on start, restart or seek to zero."
@@ -4682,9 +4581,8 @@ msgid "Transition: "
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Play Mode:"
-msgstr "Mēroga Attiecība:"
+msgstr "Atskaņošanas Režīms:"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -4860,9 +4758,8 @@ msgid "Request failed."
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Cannot save response to:"
-msgstr "Nevar noņemt:"
+msgstr "Nevar saglabāt atbildi uz:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Write error."
@@ -4925,9 +4822,8 @@ msgid "Idle"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Install..."
-msgstr "Ieinstalēt"
+msgstr "Instalēt..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Retry"
@@ -4958,14 +4854,12 @@ msgid "Name (Z-A)"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (A-Z)"
-msgstr "Licence"
+msgstr "Licence (A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (Z-A)"
-msgstr "Licence"
+msgstr "Licence (Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "First"
@@ -5025,9 +4919,8 @@ msgid "Testing"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Loading..."
-msgstr "Ielādēt"
+msgstr "Ielādēt..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -5088,37 +4981,32 @@ msgid "Rotation Step:"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Scale Step:"
-msgstr "Mēroga Attiecība:"
+msgstr "Mainīt Soļa Mērogu:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move Vertical Guide"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Vertical Guide"
-msgstr "Izveidot"
+msgstr "Izveidot Vertikālu Vadotni"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Remove Vertical Guide"
-msgstr "Noņemt Izvēlēto"
+msgstr "Noņemt Vertikālo Vadotni"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move Horizontal Guide"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Horizontal Guide"
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot Horizontālu Vadotni"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Remove Horizontal Guide"
-msgstr "Noņemt Izvēlēto"
+msgstr "Noņemt Horizontālo Vadotni"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Create Horizontal and Vertical Guides"
@@ -5201,18 +5089,16 @@ msgid "Center"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Left Wide"
-msgstr "Lineārs"
+msgstr "Pa Kreisi, Plašs"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Top Wide"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Right Wide"
-msgstr "Lineārs"
+msgstr "Pa labi, Plašs"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Bottom Wide"
@@ -5231,9 +5117,8 @@ msgid "Full Rect"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Keep Ratio"
-msgstr "Mēroga Attiecība:"
+msgstr "Ievērot Attiecību"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
@@ -5273,24 +5158,21 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Group Selected"
-msgstr "Noņemt Izvēlēto"
+msgstr "Grupa Izvēlēta"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Ungroup Selected"
-msgstr "Noņemt Izvēlēto"
+msgstr "Pārtraukt Izvēlētā Grupēšanu"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Paste Pose"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Guides"
-msgstr "Izveidot"
+msgstr "Notīrīt Vadotnes"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Create Custom Bone(s) from Node(s)"
@@ -5317,9 +5199,8 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Reset"
-msgstr "Attālināt"
+msgstr "Atiestatīt Tuvinājumu"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5354,9 +5235,8 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale Mode"
-msgstr "Mēroga Attiecība:"
+msgstr "Mēroga Režīms"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5374,9 +5254,8 @@ msgid "Pan Mode"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Ruler Mode"
-msgstr "Mēroga Attiecība:"
+msgstr "Lineāla Režīms"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle smart snapping."
@@ -5553,14 +5432,12 @@ msgid ""
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Auto Insert Key"
-msgstr "Anim ievietot atslēgievietni"
+msgstr "Automātiski Ievietot Atslēgu"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Animation Key and Pose Options"
-msgstr "Animācijas Garums (sekundes)"
+msgstr "Animācijas Atslēga un Pozas Iestatījumi"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key (Existing Tracks)"
@@ -5609,9 +5486,8 @@ msgid "Error instancing scene from %s"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Default Type"
-msgstr "Nomainīt %s Tipu"
+msgstr "Nomainīt Noklusējuma Tipu"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -5620,9 +5496,8 @@ msgid ""
msgstr ""
#: editor/plugins/collision_polygon_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon3D"
-msgstr "Izveidot"
+msgstr "Izveidot Daudzstūris3D"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Edit Poly"
@@ -5741,29 +5616,24 @@ msgid "Load Curve Preset"
msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Add Point"
-msgstr "Favorīti:"
+msgstr "Pievienot Punktu"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Point"
-msgstr "Noņemt Izvēlēto"
+msgstr "Noņemt Punktu"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Left Linear"
-msgstr "Lineārs"
+msgstr "Pa Kreisi, Lineārs"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Right Linear"
-msgstr "Lineārs"
+msgstr "Pa Labi, Lineārs"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Load Preset"
-msgstr "Ielādēt Noklusējumu"
+msgstr "Ielādēt Sagatavi"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Remove Curve Point"
@@ -5834,9 +5704,8 @@ msgid "Couldn't create a single convex collision shape."
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot Vienu Izliektu Formu"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
@@ -5847,9 +5716,8 @@ msgid "Couldn't create any collision shapes."
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot Vairākas Izliektas Formas"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5917,9 +5785,8 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Collision Sibling"
-msgstr "Izveidot"
+msgstr "Izveidot Vienu Izliektu Sadursmes Uzmavu"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -5928,9 +5795,8 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Izveidot"
+msgstr "Izveidot Vairākas Izliektas Sadursmes Uzmavas"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6591,14 +6457,12 @@ msgid "Error saving file!"
msgstr "Kļūmes lādējot!"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error while saving theme."
-msgstr "Kļūmes lādējot!"
+msgstr "Kļūda saglabājot motīvu."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Saving"
-msgstr "Kļūme lādējot:"
+msgstr "Kļūda Saglabājot"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -6606,9 +6470,8 @@ msgid "Error importing theme."
msgstr "Kļūda lādējot fontu."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Importing"
-msgstr "Kļūme lādējot:"
+msgstr "Kļūda Importējot"
#: editor/plugins/script_editor_plugin.cpp
msgid "New Text File..."
@@ -6620,9 +6483,8 @@ msgid "Open File"
msgstr "Atvērt"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Save File As..."
-msgstr "Saglabāt Kā"
+msgstr "Saglabāt Failu Kā..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Can't obtain the script for running."
@@ -6712,9 +6574,8 @@ msgid "File"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open..."
-msgstr "Atvērt"
+msgstr "Atvērt..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Reopen Closed Script"
@@ -6835,9 +6696,8 @@ msgid "Debugger"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Search Results"
-msgstr "Meklēt:"
+msgstr "Meklēšanas Rezultāti"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Scripts"
@@ -6857,19 +6717,18 @@ msgid "Target"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid ""
"Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."
-msgstr "Atvienot '%s' no '%s'"
+msgstr ""
+"Trūkst savienošanas metode '%s' signālam '%s' no mezgla '%s' uz mezglu '%s'."
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Line"
-msgstr "Rinda:"
+msgid "[Ignore]"
+msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
+msgid "Line"
+msgstr "Rinda"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -7022,14 +6881,12 @@ msgid "Remove All Bookmarks"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Function..."
-msgstr "Izveidot Funkciju"
+msgstr "Doties uz Funkciju..."
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Line..."
-msgstr "Doties uz Rindu"
+msgstr "Doties uz Rindu..."
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -7348,6 +7205,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -7700,9 +7566,8 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Animation Frames:"
-msgstr "Animācijas īpašības."
+msgstr "Animācijas Kadri:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
@@ -7960,9 +7825,8 @@ msgid "Erase Selection"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Fix Invalid Tiles"
-msgstr "Nederīgs nosaukums."
+msgstr "Salabot Nederīgās Flīzes"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8053,9 +7917,8 @@ msgid "Add Texture(s) to TileSet."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected Texture from TileSet."
-msgstr "Noņemt Izvēlēto"
+msgstr "Noņemt izvēlētās Tekstūras no Flīžu Komplekta."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from Scene"
@@ -8154,9 +8017,8 @@ msgid "Priority Mode"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Icon Mode"
-msgstr "Mēroga Attiecība:"
+msgstr "Ikonu Režīms"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Z Index Mode"
@@ -8167,23 +8029,20 @@ msgid "Copy bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Paste bitmask."
-msgstr "Ielīmēt celiņus"
+msgstr "Ielīmēt bitu masku."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create a new rectangle."
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot jaunu taisnstūri."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create a new polygon."
-msgstr "Izveidot"
+msgstr "Izveidot jaunu daudzstūri."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Keep polygon inside region Rect."
@@ -8203,9 +8062,9 @@ msgid ""
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected texture? This will remove all tiles which use it."
-msgstr "Noņemt Izvēlēto"
+msgstr ""
+"Noņemt Izvēlēto tekstūru? Šī darbība noņems visas flīzes, kas to izmanto."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "You haven't selected a texture to remove."
@@ -8235,9 +8094,8 @@ msgid ""
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Delete selected Rect."
-msgstr "Izdzēst izvēlētos failus?"
+msgstr "Izdzēst izvēlēto Taisnstūri."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -8246,9 +8104,8 @@ msgid ""
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Delete polygon."
-msgstr "Izveidot"
+msgstr "Izdzēst daudzstūri."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -8485,9 +8342,8 @@ msgid "(GLES3 only)"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Add Output"
-msgstr "Favorīti:"
+msgstr "Pievienot Izeju"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Scalar"
@@ -8506,9 +8362,8 @@ msgid "Sampler"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Add input port"
-msgstr "Favorīti:"
+msgstr "Pievienot ieejas pieslēgvietu"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add output port"
@@ -8593,9 +8448,8 @@ msgid "Light"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Show resulted shader code."
-msgstr "Izveidot Jaunu %s"
+msgstr "Attēlot rezultējošo ēnotāja kodu."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -8603,18 +8457,16 @@ msgid "Create Shader Node"
msgstr "Izveidot Jaunu %s"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color function."
-msgstr "Izveidot Funkciju"
+msgstr "Krāsas funkcija."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color operator."
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Grayscale function."
-msgstr "Izveidot Funkciju"
+msgstr "Pelēktoņu funkcija."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Converts HSV vector to RGB equivalent."
@@ -8625,9 +8477,8 @@ msgid "Converts RGB vector to HSV equivalent."
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Sepia function."
-msgstr "Izveidot Funkciju"
+msgstr "Sēpija funkcija."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Burn operator."
@@ -8780,9 +8631,8 @@ msgid "'%s' input parameter for vertex and fragment shader mode."
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar function."
-msgstr "Mēroga Izvēle"
+msgstr "Skalāra funkcija."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Scalar operator."
@@ -9039,9 +8889,8 @@ msgid "2D texture uniform lookup with triplanar."
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform function."
-msgstr "Izveidot"
+msgstr "Transformēšanas funkcija."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9083,19 +8932,16 @@ msgid "Multiplies vector by transform."
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform constant."
-msgstr "Izveidot"
+msgstr "Transformēt konstanti."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform uniform."
-msgstr "Izveidot"
+msgstr "Transformēt vienmērīgo."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Vector function."
-msgstr "Izveidot Funkciju"
+msgstr "Vektora funkcija."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector operator."
@@ -9305,9 +9151,8 @@ msgid "Runnable"
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Add initial export..."
-msgstr "Favorīti:"
+msgstr "Pievienot sākuma eksportu..."
#: editor/project_export.cpp
msgid "Add previous patches..."
@@ -10011,7 +9856,7 @@ msgstr ""
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
-msgstr ""
+msgstr "Vispārēji"
#: editor/project_settings_editor.cpp
msgid "Override For..."
@@ -10221,9 +10066,8 @@ msgid "Initial value for the counter"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Step"
-msgstr "Solis (ļi):"
+msgstr "Solis"
#: editor/rename_dialog.cpp
msgid "Amount by which counter is incremented for each node"
@@ -10277,9 +10121,8 @@ msgid "Regular Expression Error"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Derīgie simboli:"
+msgstr "Pie rakstzīmes %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10344,8 +10187,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Galvenais Skripts:"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10380,9 +10224,8 @@ msgid "Make node as Root"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete %d nodes?"
-msgstr "Izdzēst"
+msgstr "Izdzēst %d mezglus?"
#: editor/scene_tree_dock.cpp
msgid "Delete the root node \"%s\"?"
@@ -10393,9 +10236,8 @@ msgid "Delete node \"%s\" and its children?"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete node \"%s\"?"
-msgstr "Izdzēst"
+msgstr "Izdzēst mezglu \"%s\"?"
#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
@@ -10430,9 +10272,8 @@ msgid "New Scene Root"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Create Root Node:"
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot Cilmes Mezglu:"
#: editor/scene_tree_dock.cpp
msgid "2D Scene"
@@ -10506,6 +10347,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10543,9 +10391,8 @@ msgid "Delete (No Confirm)"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Add/Create a New Node."
-msgstr "Izveidot Jaunu %s"
+msgstr "Pievienot/Izveidot Jaunu Mezglu."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -10554,11 +10401,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10586,9 +10433,8 @@ msgid "Button Group"
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "(Connecting From)"
-msgstr "Savieno Signālu:"
+msgstr "(Savienojas No)"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
@@ -10659,14 +10505,12 @@ msgid "Select a Node"
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Path is empty."
-msgstr "Starpliktuve ir tukša"
+msgstr "Ceļš nav definēts."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Filename is empty."
-msgstr "Starpliktuve ir tukša"
+msgstr "Faila Nosaukums nav definēts."
#: editor/script_create_dialog.cpp
msgid "Path is not local."
@@ -10682,6 +10526,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Nederīgs fonta izmērs."
@@ -10723,6 +10571,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Nederīgs ceļš."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid class name."
msgstr "Nederīgs nosaukums."
@@ -10744,9 +10596,8 @@ msgid "Built-in script (into scene file)."
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Will create a new script file."
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidos jaunu skripta failu."
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -10811,14 +10662,12 @@ msgid "C++ Source"
msgstr "Resurs"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Source:"
-msgstr "Resurs"
+msgstr "Avots:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "C++ Source:"
-msgstr "Resurs"
+msgstr "C++ Avots:"
#: editor/script_editor_debugger.cpp
msgid "Stack Trace"
@@ -10829,9 +10678,8 @@ msgid "Errors"
msgstr ""
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Child process connected."
-msgstr "Savienot"
+msgstr "Bērna process savienots."
#: editor/script_editor_debugger.cpp
msgid "Copy Error"
@@ -11373,14 +11221,12 @@ msgid "Set Variable Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Input Port"
-msgstr "Favorīti:"
+msgstr "Pievienot Ieejas Pieslēgvietu"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Output Port"
-msgstr "Favorīti:"
+msgstr "Pievienot Izejas Pieslēgvietu"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11390,27 +11236,24 @@ msgstr ""
"nosaukumu."
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new function."
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot jaunu funkciju."
#: modules/visual_script/visual_script_editor.cpp
msgid "Variables:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new variable."
-msgstr "Izveidot Jaunu %s"
+msgstr "Izveidot jaunu mainīgo."
#: modules/visual_script/visual_script_editor.cpp
msgid "Signals:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new signal."
-msgstr "Izveidot"
+msgstr "Izveidot jaunu signālu."
#: modules/visual_script/visual_script_editor.cpp
msgid "Name is not a valid identifier:"
@@ -11620,24 +11463,20 @@ msgid "Members:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Base Type:"
-msgstr "Nomainīt %s Tipu"
+msgstr "Nomainīt Bāzes Tipu:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Nodes..."
-msgstr "Favorīti:"
+msgstr "Pievienot Mezglus..."
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Function..."
-msgstr "Izveidot Funkciju"
+msgstr "Pievienot Funkciju..."
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "function_name"
-msgstr "Funkcijas:"
+msgstr "funkcijas_nosaukums"
#: modules/visual_script/visual_script_editor.cpp
msgid "Select or create a function to edit its graph."
@@ -11660,9 +11499,8 @@ msgid "Cut Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Make Function"
-msgstr "Funkcijas:"
+msgstr "Izveidot Funkciju"
#: modules/visual_script/visual_script_editor.cpp
msgid "Refresh Graph"
@@ -11779,6 +11617,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11797,9 +11639,34 @@ msgid "Invalid public key for APK expansion."
msgstr ""
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid package name:"
-msgstr "Nederīgs nosaukums."
+msgstr "Nederīgs paketes nosaukums:"
+
+#: platform/android/export/export.cpp
+msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
#: platform/android/export/export.cpp
msgid ""
@@ -11842,9 +11709,8 @@ msgid "App Store Team ID not specified - cannot configure the project."
msgstr ""
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Invalid Identifier:"
-msgstr "Nederīgs fonta izmērs."
+msgstr "Nederīgs Identifikators:"
#: platform/iphone/export/export.cpp
msgid "Required icon is not specified in the preset."
@@ -12299,9 +12165,8 @@ msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Animation not found: '%s'"
-msgstr "Animācijas garums (sekundēs)."
+msgstr "Animācija netika atrasta: '%s'"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
@@ -12313,9 +12178,8 @@ msgid "Invalid animation: '%s'."
msgstr "Nederīgs fonta izmērs."
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Nothing connected to input '%s' of node '%s'."
-msgstr "Atvienot '%s' no '%s'"
+msgstr "Nekas nav savienots ar ieeju '%s' mezglam '%s'."
#: scene/animation/animation_tree.cpp
msgid "No root AnimationNode for the graph is set."
@@ -12361,9 +12225,8 @@ msgid "Switch between hexadecimal and code values."
msgstr ""
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "Add current color as a preset."
-msgstr "Pievienot pašreizējo krāsu kā iepriekšnoteiktu krāsu"
+msgstr "Pievienot pašreizējo krāsu kā iepriekšnoteiktu krāsu."
#: scene/gui/container.cpp
msgid ""
diff --git a/editor/translations/mi.po b/editor/translations/mi.po
index 5c33f2e72e..fbf4bce3d6 100644
--- a/editor/translations/mi.po
+++ b/editor/translations/mi.po
@@ -807,7 +807,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1407,16 +1406,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2336,11 +2327,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2606,10 +2599,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3215,6 +3204,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3799,6 +3792,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6670,11 +6667,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7144,6 +7141,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10061,7 +10067,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10219,6 +10225,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10265,11 +10278,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10389,6 +10402,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10429,6 +10446,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11453,6 +11474,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11476,6 +11501,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index e46fd5a10d..77ac327f71 100644
--- a/editor/translations/ml.po
+++ b/editor/translations/ml.po
@@ -817,7 +817,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1417,16 +1416,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2348,11 +2339,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2618,10 +2611,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3227,6 +3216,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3811,6 +3804,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6686,11 +6683,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7160,6 +7157,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10077,7 +10083,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10235,6 +10241,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10281,11 +10294,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10405,6 +10418,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10445,6 +10462,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11470,6 +11491,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11493,6 +11518,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index 902c243d16..38e3ee7185 100644
--- a/editor/translations/mr.po
+++ b/editor/translations/mr.po
@@ -814,7 +814,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1414,16 +1413,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2343,11 +2334,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2613,10 +2606,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3222,6 +3211,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3806,6 +3799,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6677,11 +6674,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7151,6 +7148,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10068,7 +10074,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10226,6 +10232,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10272,11 +10285,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10396,6 +10409,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10436,6 +10453,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11460,6 +11481,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11483,6 +11508,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index 09e2bcc096..233b5cb428 100644
--- a/editor/translations/ms.po
+++ b/editor/translations/ms.po
@@ -837,7 +837,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1437,16 +1436,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2368,11 +2359,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2639,10 +2632,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3249,6 +3238,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3834,6 +3827,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6724,11 +6721,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7199,6 +7196,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10135,7 +10141,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10296,6 +10302,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10342,11 +10355,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10466,6 +10479,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10506,6 +10523,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11540,6 +11561,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11563,6 +11588,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 34d6e9dc76..5c80321d03 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -19,8 +19,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-16 11:03+0000\n"
-"Last-Translator: Petter Reinholdtsen <pere-weblate@hungry.com>\n"
+"PO-Revision-Date: 2020-06-03 20:09+0000\n"
+"Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-"
"engine/godot/nb_NO/>\n"
"Language: nb\n"
@@ -28,7 +28,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.1-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -883,7 +883,6 @@ msgstr "Kobler Til Signal:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1527,18 +1526,9 @@ msgstr "Aktiver"
msgid "Rearrange Autoloads"
msgstr "Omorganiser Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Ugyldig Filsti."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Fil eksisterer ikke."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Ikke i resource path."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2556,12 +2546,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Kan ikke laste en scene som aldri ble lagret."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Gå tilbake"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Lagre Scene"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Denne handlingen kan ikke angres. Gå tilbake likevel?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2856,10 +2849,6 @@ msgid "Redo"
msgstr "Gjenta"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Tilbakestille Scene"
-
-#: editor/editor_node.cpp
#, fuzzy
msgid "Miscellaneous project or scene-wide tools."
msgstr "Diverse prosjekt- eller scene-relaterte verktøy"
@@ -3401,9 +3390,8 @@ msgid "Assign..."
msgstr "Tilordne..."
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr ": Ugyldige argumenter: "
+msgstr "Ugyldig RID"
#: editor/editor_properties.cpp
#, fuzzy
@@ -3533,6 +3521,10 @@ msgstr "Kunne ikke kjøre skript:"
msgid "Did you forget the '_run' method?"
msgstr "Glemte du '_run'-metoden?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Velg Node(r) for Importering"
@@ -3678,9 +3670,8 @@ msgid ""
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error requesting URL:"
-msgstr "Error ved forespørsel av url: "
+msgstr "Feil ved nettadresse-forespørsel:"
#: editor/export_template_manager.cpp
msgid "Connecting to Mirror..."
@@ -3772,9 +3763,8 @@ msgid "Download Templates"
msgstr "Last ned Mal"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select mirror from list: (Shift+Click: Open in Browser)"
-msgstr "Velg fillager fra liste: "
+msgstr "Velg speil fra liste: (Shift+Klikk: Åpne i nettleser)"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -4027,14 +4017,12 @@ msgid "Cancel"
msgstr "Avbryt"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Find: "
-msgstr "Finn"
+msgstr "Finn: "
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace: "
-msgstr "Erstatt"
+msgstr "Erstatt: "
#: editor/find_in_files.cpp
#, fuzzy
@@ -4188,6 +4176,10 @@ msgid "Error running post-import script:"
msgstr "Error ved kjøring av post-import script:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Lagrer..."
@@ -5002,9 +4994,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition: "
-msgstr "Overgang"
+msgstr "Overgang: "
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
@@ -7313,15 +7304,15 @@ msgid ""
msgstr "Koble '%s' fra '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Linje:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Fjern Funksjon"
@@ -7816,6 +7807,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "Snap til rutenett"
@@ -10937,8 +10937,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Nytt Skript"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -11105,6 +11106,13 @@ msgid "Open Documentation"
msgstr "Åpne Godots nettbaserte dokumentasjon"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -11158,12 +11166,13 @@ msgstr ""
"finnes en rot-node."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr ""
+#, fuzzy
+msgid "Detach the script from the selected node."
+msgstr "Instanser den valgte scene(r) som barn av den valgte noden."
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -11293,6 +11302,10 @@ msgid "A directory with the same name exists."
msgstr "En fil eller mappe med dette navnet eksisterer allerede."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Fil eksisterer ikke."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Må ha en gyldig filutvidelse."
@@ -11338,6 +11351,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Ugyldig Filsti."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Ugyldig navn."
@@ -11403,7 +11421,7 @@ msgstr ""
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Remote "
-msgstr "Fjern Funksjon"
+msgstr "Fjern-funksjon "
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
@@ -12440,6 +12458,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12464,6 +12486,32 @@ msgstr "Ugyldig navn."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12575,7 +12623,7 @@ msgstr "Prosjektnavn:"
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid publisher GUID."
-msgstr ": Ugyldige argumenter: "
+msgstr "Ugyldig forlags-GUID."
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -13123,6 +13171,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Konstanter kan ikke endres."
+#~ msgid "Not in resource path."
+#~ msgstr "Ikke i resource path."
+
+#~ msgid "Revert"
+#~ msgstr "Gå tilbake"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Denne handlingen kan ikke angres. Gå tilbake likevel?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Tilbakestille Scene"
+
#~ msgid "Issue Tracker"
#~ msgstr "Problemtracker"
@@ -13369,10 +13429,6 @@ msgstr "Konstanter kan ikke endres."
#~ msgstr "Sett inn Nøkler"
#, fuzzy
-#~ msgid "Instance the selected scene(s) as child of the selected node."
-#~ msgstr "Instanser den valgte scene(r) som barn av den valgte noden."
-
-#, fuzzy
#~ msgid "Font Size:"
#~ msgstr "Frontvisning"
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 93219f8bfc..8e6c4bcfa4 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -44,7 +44,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-04 15:12+0000\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
"Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/"
"nl/>\n"
@@ -873,7 +873,6 @@ msgstr "Kan signaal niet verbinden"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1488,17 +1487,9 @@ msgstr "Inschakelen"
msgid "Rearrange Autoloads"
msgstr "Autoloads opnieuw ordenen"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Ongeldig pad."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Bestand bestaat niet."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Niet in bronpad."
+msgid "Can't add autoload:"
+msgstr "Autoload kon niet toevoegd worden:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2458,13 +2449,16 @@ msgid "Can't reload a scene that was never saved."
msgstr "Een scène die nooit opgeslagen is kan niet opnieuw laden worden."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Herstellen"
+msgid "Reload Saved Scene"
+msgstr "Opgeslagen scène herladen"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
-"Deze actie kan niet ongedaan gemaakt worden. WIlt u desondanks terugzetten?"
+"De huidige scène bevat niet opgeslagen veranderingen.\n"
+"Scène desondanks herladen? Dit kan niet ongedaan gemaakt worden."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2751,10 +2745,6 @@ msgid "Redo"
msgstr "Opnieuw"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Scène terugzetten"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Overig project of scène-brede hulpmiddelen."
@@ -3404,6 +3394,12 @@ msgstr "Script kon niet uitgevoerd worden:"
msgid "Did you forget the '_run' method?"
msgstr "Ben je de '_run' methode vergeten?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Houdt Ctrl ingedrukt om op gehele getallen af te ronden. Houdt Shift "
+"ingedrukt voor preciezere veranderingen."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Selecteer een of meer knopen om te importeren"
@@ -4001,6 +3997,11 @@ msgid "Error running post-import script:"
msgstr "Fout bij uitvoeren post-import script:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+"Gaf je een van Node afstammend object terug in de `post_import()`-methode?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Opslaan..."
@@ -6955,12 +6956,12 @@ msgid ""
msgstr "Ontbrekende verbonden methode '%s' voor signaal '%s' naar knoop '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Regel"
+msgid "[Ignore]"
+msgstr "[Negeren]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(negeren)"
+msgid "Line"
+msgstr "Regel"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7435,6 +7436,20 @@ msgid "XForm Dialog"
msgstr "XForm Dialoog"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Klik om te wisselen tussen zichtbaarheidsweergaven.\n"
+"\n"
+"Open oog: handvat is zichtbaar.\n"
+"Gesloten oog: handvat is verborgen.\n"
+"Half open oog: handvat is ook zichtbaar door ondoorzichtige oppervlaktes."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Knopen aan vloer kleven"
@@ -10538,8 +10553,8 @@ msgid "Instance Child Scene"
msgstr "Scène instantiëren"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Script wissen"
+msgid "Detach Script"
+msgstr "Script losmaken"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10705,6 +10720,15 @@ msgid "Open Documentation"
msgstr "Open Godot online documentatie"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"Script kon niet aangebracht worden: er zijn geen talen ingesteld.\n"
+"Dit is waarschijnlijk omdat deze editor zonder taalmodules was gecompileerd."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Knoop hieronder toevoegen"
@@ -10753,12 +10777,12 @@ msgstr ""
"wortelknoop bestaat."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr "Verbind een nieuw of bestaand script aan de geselecteerde knoop."
+msgid "Attach a new or existing script to the selected node."
+msgstr "Een nieuw of bestaand script verbinden aan de geselecteerde knoop."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Script van geselecteerde knopen wissen."
+msgid "Detach the script from the selected node."
+msgstr "Script van geselecteerde knoop losmaken."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10889,6 +10913,10 @@ msgid "A directory with the same name exists."
msgstr "Een map met dezelfde naam bestaat al."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Bestand bestaat niet."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Ongeldige extentie."
@@ -10929,6 +10957,10 @@ msgid "File exists, it will be reused."
msgstr "Bestand Bestaat, zal hergebruikt worden."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Ongeldig pad."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Ongeldige klassenaam."
@@ -11978,6 +12010,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "Debug Keystore is niet ingesteld of aanwezig in de Editor Settings."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr "Release-Keystore is verkeerd ingesteld in de exportinstelingen."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Eigen build vereist een geldige Android SDK pad in de Editorinstellingen."
@@ -12004,6 +12040,40 @@ msgstr "Ongeldige pakketnaam:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"Ongeldige \"GodotPaymentV3\" module ingesloten in de projectinstelling "
+"\"android/modules\" (veranderd in Godot 3.2.2).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr "\"Use Custom Build\" moet geactiveerd zijn om plugins te gebruiken."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"\"Degrees Of Freedom\" is alleen geldig als \"Xr Mode\" op \"Oculus Mobile VR"
+"\" staat."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Hand Tracking\" is alleen geldig als \"Xr Mode\" op \"Oculus Mobile VR\" "
+"staat."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Focus Awareness\" is alleen geldig als \"Xr Mode\" op \"Oculus Mobile VR\" "
+"staat."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12787,6 +12857,23 @@ msgstr "Varyings kunnen alleen worden toegewezenin vertex functies."
msgid "Constants cannot be modified."
msgstr "Constanten kunnen niet worden aangepast."
+#~ msgid "Not in resource path."
+#~ msgstr "Niet in bronpad."
+
+#~ msgid "Revert"
+#~ msgstr "Herstellen"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr ""
+#~ "Deze actie kan niet ongedaan gemaakt worden. WIlt u desondanks "
+#~ "terugzetten?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Scène terugzetten"
+
+#~ msgid "Clear Script"
+#~ msgstr "Script wissen"
+
#~ msgid "Issue Tracker"
#~ msgstr "Issue Tracker"
diff --git a/editor/translations/or.po b/editor/translations/or.po
index 2ce05efe5d..afff834dee 100644
--- a/editor/translations/or.po
+++ b/editor/translations/or.po
@@ -813,7 +813,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1413,16 +1412,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2342,11 +2333,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2612,10 +2605,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3221,6 +3210,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3805,6 +3798,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6676,11 +6673,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7150,6 +7147,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10067,7 +10073,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10225,6 +10231,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10271,11 +10284,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10395,6 +10408,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10435,6 +10452,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11459,6 +11480,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11482,6 +11507,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index a7b57f31ba..414e66685a 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -19,7 +19,7 @@
# NeverK <neverkoxu@gmail.com>, 2018, 2019.
# Rafal Brozio <rafal.brozio@gmail.com>, 2016, 2019.
# Rafał Ziemniak <synaptykq@gmail.com>, 2017.
-# RM <synaptykq@gmail.com>, 2018.
+# RM <synaptykq@gmail.com>, 2018, 2020.
# Sebastian Krzyszkowiak <dos@dosowisko.net>, 2017.
# Sebastian Pasich <sebastian.pasich@gmail.com>, 2017, 2019.
# siatek papieros <sbigneu@gmail.com>, 2016.
@@ -38,11 +38,12 @@
# Myver <igormakarowicz@gmail.com>, 2019.
# Maciej Chamera <chameramaciej@gmail.com>, 2019.
# Cezary Stasiak <cezary.p.stasiak@gmail.com>, 2019.
+# Jan Ligudziński <jan.ligudzinski@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-01 11:42+0000\n"
+"PO-Revision-Date: 2020-06-06 10:15+0000\n"
"Last-Translator: Tomek <kobewi4e@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
@@ -52,7 +53,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -177,11 +178,11 @@ msgstr "Usuń klucze animacji"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr "Zmiana czasu klatki kluczowej"
+msgstr "Zmień wartość czasu klatki kluczowej"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "Zmiana przejścia"
+msgstr "Przejście zmiany animacji"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
@@ -872,7 +873,6 @@ msgstr "Nie można połączyć sygnału"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1482,17 +1482,9 @@ msgstr "Włącz"
msgid "Rearrange Autoloads"
msgstr "Przestaw Autoloady"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Niepoprawna ścieżka."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Plik nie istnieje."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Nie znaleziono w ścieżce zasobów."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2448,12 +2440,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Nie można przeładować sceny która nie została zapisana."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Przywróć"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Zapisz scenę"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Tego nie można cofnąć. Przywrócić mimo to?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2740,10 +2735,6 @@ msgid "Redo"
msgstr "Ponów"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Przywróć scenę"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Różne narzędzia dla scen lub projektu."
@@ -3111,7 +3102,7 @@ msgstr "Nowa dziedzicząca scena"
#: editor/editor_node.cpp
msgid "Load Errors"
-msgstr "Wczytaj błędy"
+msgstr "Błędy wczytywania"
#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Select"
@@ -3386,6 +3377,13 @@ msgstr "Nie można uruchomić skryptu:"
msgid "Did you forget the '_run' method?"
msgstr "Zapomniano metody \"_run\"?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Przytrzymaj Ctrl, by upuścić pobieracz (Getter). Przytrzymaj Shift, by "
+"upuścić generyczną sygnaturę."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Wybierz węzły do importu"
@@ -3627,7 +3625,7 @@ msgstr ""
#: editor/filesystem_dock.cpp
msgid "Cannot move/rename resources root."
-msgstr "Nie można przenieść/zmienić nazwy źródłowego zasobu."
+msgstr "Nie można przenieść/zmienić nazwy korzenia zasobów."
#: editor/filesystem_dock.cpp
msgid "Cannot move a folder into itself."
@@ -3984,6 +3982,10 @@ msgid "Error running post-import script:"
msgstr "Błąd podczas uruchamiania skryptu po imporcie:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Zapisywanie..."
@@ -5701,7 +5703,7 @@ msgstr "Edytuj wielokąt (usuń punkty)"
#: editor/plugins/collision_shape_2d_editor_plugin.cpp
msgid "Set Handle"
-msgstr "Ustaw Uchwyt"
+msgstr "Ustaw uchwyt"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -6936,12 +6938,13 @@ msgstr ""
"\"%s\"."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Linia"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(ignoruj)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignoruj)"
+msgid "Line"
+msgstr "Linia"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7415,6 +7418,15 @@ msgid "XForm Dialog"
msgstr "Okno dialogowe XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Przyciągnij węzły do podłogi"
@@ -10503,8 +10515,9 @@ msgid "Instance Child Scene"
msgstr "Dodaj instancję sceny"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Usuń skrypt"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Dodaj skrypt"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10669,6 +10682,13 @@ msgid "Open Documentation"
msgstr "Otwórz dokumentację"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Dodaj węzeł"
@@ -10717,11 +10737,13 @@ msgstr ""
"główny nie istnieje."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Dołącz nowy lub istniejący skrypt do zaznaczonego węzła."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Wyczyść skrypt dla zaznaczonego węzła."
#: editor/scene_tree_dock.cpp
@@ -10853,6 +10875,10 @@ msgid "A directory with the same name exists."
msgstr "Katalog o tej nazwie już istnieje."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Plik nie istnieje."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Niepoprawne rozszerzenie."
@@ -10893,6 +10919,10 @@ msgid "File exists, it will be reused."
msgstr "Plik istnieje, zostanie użyty ponownie."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Niepoprawna ścieżka."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Niepoprawna nazwa klasy."
@@ -11939,6 +11969,13 @@ msgstr ""
"eksportu."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Debugowy keystore nieskonfigurowany w Ustawieniach Edytora ani w profilu "
+"eksportu."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Własny build wymaga poprawnej ścieżki do SDK Androida w Ustawieniach Edytora."
@@ -11967,6 +12004,32 @@ msgstr "Niepoprawna nazwa paczki:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12752,6 +12815,21 @@ msgstr "Varying może być przypisane tylko w funkcji wierzchołków."
msgid "Constants cannot be modified."
msgstr "Stałe nie mogą być modyfikowane."
+#~ msgid "Not in resource path."
+#~ msgstr "Nie znaleziono w ścieżce zasobów."
+
+#~ msgid "Revert"
+#~ msgstr "Przywróć"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Tego nie można cofnąć. Przywrócić mimo to?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Przywróć scenę"
+
+#~ msgid "Clear Script"
+#~ msgstr "Usuń skrypt"
+
#~ msgid "Issue Tracker"
#~ msgstr "Lista problemów"
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 646d14c2cf..9d46edcbae 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -851,7 +851,6 @@ msgstr "Slit th' Node"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1461,17 +1460,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr ": Evil arguments: "
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2421,11 +2411,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Yar, Blow th' Selected Down!"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2696,10 +2689,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3319,6 +3308,13 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Smash yer Ctrl key t' sink yer Getter. Smash yer Shift t' sink a generic "
+"signature."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3931,6 +3927,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6890,11 +6890,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7380,6 +7380,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10400,8 +10409,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Discharge ye' Variable"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10562,6 +10572,13 @@ msgid "Open Documentation"
msgstr "Yer functions:"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10611,11 +10628,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10742,6 +10759,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Yer Calligraphy be wrongly sized."
@@ -10785,6 +10806,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr ": Evil arguments: "
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Yer unique name be evil."
@@ -11879,6 +11905,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11903,6 +11933,32 @@ msgstr "Yer unique name be evil."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index d38c4186c7..199d828897 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -88,12 +88,17 @@
# Lucas Araujo <lucassants2808@gmail.com>, 2020.
# Sr Half <flavio05@outlook.com>, 2020.
# Matheus Pesegoginski <pese.ek.tk@outlook.com>, 2020.
+# DeeJayLSP <djlsplays@gmail.com>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
+# André Sousa <andrelvsousa@gmail.com>, 2020.
+# Kleyton Luiz de Sousa Vieira <kleytonluizdesouzavieira@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2020-05-04 15:12+0000\n"
-"Last-Translator: Anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: Kleyton Luiz de Sousa Vieira "
+"<kleytonluizdesouzavieira@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -106,11 +111,11 @@ msgstr ""
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr "Tipo de argumento inválido para converter(), use TYPE_* constantes."
+msgstr "Tipo de argumento inválido para convert(), use constantes TYPE_*."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "Esperado uma corda de comprimento 1 (um caractere)."
+msgstr "Esperado uma string de comprimento 1 (um caractere)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -920,7 +925,6 @@ msgstr "Não foi possível conectar o sinal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1531,17 +1535,9 @@ msgstr "Habilitar"
msgid "Rearrange Autoloads"
msgstr "Reordenar Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Caminho inválido."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "O arquivo não existe."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Não está no caminho de recursos."
+msgid "Can't add autoload:"
+msgstr "Não pode adicionar autoload:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2497,12 +2493,16 @@ msgid "Can't reload a scene that was never saved."
msgstr "Não foi possível recarregar a cena pois nunca foi salva."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Reverter"
+msgid "Reload Saved Scene"
+msgstr "Recarregar Cena Salva"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Esta ação não pode ser desfeita. Reverter mesmo assim?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"A cena atual possui alterações não salvas.\n"
+"Recarregar a cena salva mesmo assim? Essa ação não poderá ser desfeita."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2733,11 +2733,11 @@ msgstr "Copiar Texto"
#: editor/editor_node.cpp
msgid "Next tab"
-msgstr "Próxima guia"
+msgstr "Próxima aba"
#: editor/editor_node.cpp
msgid "Previous tab"
-msgstr "Guia anterior"
+msgstr "Aba anterior"
#: editor/editor_node.cpp
msgid "Filter Files..."
@@ -2794,10 +2794,6 @@ msgid "Redo"
msgstr "Refazer"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Reverter Cena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Ferramentas diversas atuantes no projeto ou cena."
@@ -2849,7 +2845,7 @@ msgstr "Sair para a Lista de Projetos"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/project_export.cpp
msgid "Debug"
-msgstr "Depurar"
+msgstr "Depuração"
#: editor/editor_node.cpp
msgid "Deploy with Remote Debug"
@@ -2960,7 +2956,7 @@ msgstr "Capturas de Telas ficam salvas na Pasta Editor Data/Settings."
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr "Alternar Tela-Cheia"
+msgstr "Alternar Tela Cheia"
#: editor/editor_node.cpp
msgid "Toggle System Console"
@@ -3030,7 +3026,7 @@ msgstr "Roda o projeto."
#: editor/editor_node.cpp
msgid "Play"
-msgstr "Tocar"
+msgstr "Rodar"
#: editor/editor_node.cpp
msgid "Pause the scene execution for debugging."
@@ -3038,7 +3034,7 @@ msgstr "Pausar a execução da cena para depuração."
#: editor/editor_node.cpp
msgid "Pause Scene"
-msgstr "Pausa a cena"
+msgstr "Pausar Cena"
#: editor/editor_node.cpp
msgid "Stop the scene."
@@ -3186,7 +3182,7 @@ msgstr "Abrir Editor 3D"
#: editor/editor_node.cpp
msgid "Open Script Editor"
-msgstr "Abrir Editor de Scripts"
+msgstr "Abrir Editor de Script"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
@@ -3446,6 +3442,12 @@ msgstr "Não foi possível rodar o script:"
msgid "Did you forget the '_run' method?"
msgstr "Você esqueceu o método '_run'?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Segure Ctrl para arredondar para números inteiros. Segure Shift para aplicar "
+"mudanças mais precisas."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Selecione Nó(s) para Importar"
@@ -4044,6 +4046,10 @@ msgid "Error running post-import script:"
msgstr "Erro ao rodar script pós-importação:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Salvando..."
@@ -5376,7 +5382,7 @@ msgid ""
"Game Camera Override\n"
"Overrides game camera with editor viewport camera."
msgstr ""
-"Sobrepor câmera de Jogo\n"
+"Sobrepor Câmera de Jogo\n"
"Sobrepõe a câmera de jogo com a janela de exibição da câmera."
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -5385,8 +5391,8 @@ msgid ""
"Game Camera Override\n"
"No game instance running."
msgstr ""
-"Sobrepor câmera de Jogo\n"
-"Sem instancia de jogo rodando."
+"Sobrepor Câmera de Jogo\n"
+"Sem instância de jogo em execução."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5472,17 +5478,17 @@ msgstr "Alt + botão direito do mouse: Lista de seleção de profundidade"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode"
-msgstr "Modo Mover"
+msgstr "Modo de Movimentação"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Mode"
-msgstr "Modo Rotacionar"
+msgstr "Modo de Rotação"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode"
-msgstr "Modo Escala"
+msgstr "Modo de Escalonamento"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5503,7 +5509,7 @@ msgstr "Modo Panorâmico"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Ruler Mode"
-msgstr "Modo Régua"
+msgstr "Modo de Régua"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle smart snapping."
@@ -5617,7 +5623,7 @@ msgstr "Visualizar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Always Show Grid"
-msgstr "Sempre Mostrar a Grade"
+msgstr "Sempre Mostrar Grade"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Helpers"
@@ -5645,11 +5651,11 @@ msgstr "Exibir grupo e travar ícones"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
-msgstr "Centralizar Seleção"
+msgstr "Seleção Central"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Frame Selection"
-msgstr "Seleção de Quadros"
+msgstr "Seleção de Frame"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
@@ -5657,7 +5663,7 @@ msgstr "Visualizar Canvas Scale"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Translation mask for inserting keys."
-msgstr "Máscara de tradução para inserção de chaves"
+msgstr "Máscara de tradução para inserção de chaves."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation mask for inserting keys."
@@ -5714,7 +5720,7 @@ msgstr "Dividir o passo da grade por 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Pan View"
-msgstr "Vista Panorâmica"
+msgstr "Deslocar Visão"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6999,12 +7005,13 @@ msgid ""
msgstr "Falta método conectado '%s' para sinal '%s' do nó '%s' para nó '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Linha"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(ignore)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignore)"
+msgid "Line"
+msgstr "Linha"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7478,6 +7485,15 @@ msgid "XForm Dialog"
msgstr "Diálogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Encaixar Nó(s) no Chão"
@@ -7533,7 +7549,7 @@ msgstr "Alternar Visão Perspectiva/Ortogonal"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Insert Animation Key"
-msgstr "Inserir Chanve de Animação"
+msgstr "Inserir Chave de Animação"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Origin"
@@ -8508,7 +8524,7 @@ msgstr "Confirmação"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "VCS Addon is not initialized"
-msgstr "Extensão VCS não inicializado"
+msgstr "Extensão VCS não está inicializada"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control System"
@@ -8983,7 +8999,7 @@ msgstr "Encontra o inteiro mais próximo que é menor ou igual ao parâmetro."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Computes the fractional part of the argument."
-msgstr "Calcula a parte decimal do argumento."
+msgstr "Calcula a parte fracional do argumento."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the inverse of the square root of the parameter."
@@ -9036,7 +9052,7 @@ msgstr "Encontra o inteiro mais próximo do parâmetro."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Finds the nearest even integer to the parameter."
-msgstr "Encontra o inteiro par mais próximo do parâmetro."
+msgstr "Encontra o número inteiro par mais próximo do parâmetro."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Clamps the value between 0.0 and 1.0."
@@ -9194,11 +9210,11 @@ msgstr "Multiplica vetor por transformação."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Transform constant."
-msgstr "Constante da transformada."
+msgstr "Constante de transformação."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Transform uniform."
-msgstr "Transformada uniforme."
+msgstr "Uniforme de transformação."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector function."
@@ -10296,11 +10312,11 @@ msgstr "Filtro de Idiomas"
#: editor/project_settings_editor.cpp
msgid "Show All Locales"
-msgstr "Mostrar todos os idiomas"
+msgstr "Mostrar todos os Locales"
#: editor/project_settings_editor.cpp
msgid "Show Selected Locales Only"
-msgstr "Mostrar apenas os idiomas selecionados"
+msgstr "Mostrar apenas os Locales selecionados"
#: editor/project_settings_editor.cpp
msgid "Filter mode:"
@@ -10563,8 +10579,9 @@ msgid "Instance Child Scene"
msgstr "Instânciar Cena Filha"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Remover Script"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Adicionar Script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10729,12 +10746,19 @@ msgid "Open Documentation"
msgstr "Abrir Documentação"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Adicionar Nó Filho"
#: editor/scene_tree_dock.cpp
msgid "Expand/Collapse All"
-msgstr "Expandir/Colapsar Tudo"
+msgstr "Expandir/Recolher Tudo"
#: editor/scene_tree_dock.cpp
msgid "Change Type"
@@ -10777,11 +10801,13 @@ msgstr ""
"existir um nó raiz."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Adicionar um script novo ou existente para o nó selecionado."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Remove um script do nó selecionado."
#: editor/scene_tree_dock.cpp
@@ -10913,6 +10939,10 @@ msgid "A directory with the same name exists."
msgstr "Existe um diretório com o mesmo nome."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "O arquivo não existe."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Extensão inválida."
@@ -10953,6 +10983,10 @@ msgid "File exists, it will be reused."
msgstr "O arquivo existe, será reaproveitado."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Caminho inválido."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nome da classe inválido."
@@ -10989,7 +11023,7 @@ msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
msgstr ""
-"Nota: Os scripts internos têm algumas limitações e não podem ser editados "
+"Nota: Scripts embutidos possuem algumas limitações e não podem ser editados "
"usando um editor externo."
#: editor/script_create_dialog.cpp
@@ -11858,7 +11892,7 @@ msgstr "function_name"
#: modules/visual_script/visual_script_editor.cpp
msgid "Select or create a function to edit its graph."
-msgstr "Selecione ou crie uma função para editar o grafo."
+msgstr "Selecione ou crie uma função para editar seu gráfico."
#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
@@ -12004,9 +12038,16 @@ msgstr ""
"na predefinição."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Porta-chaves de depuração não configurado nas Configurações do Editor e nem "
+"na predefinição."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
-"Compilação personalizada requer um caminho do Android SDK válido para as "
+"A compilação personalizada requer um caminho SDK do Android válido nas "
"Configurações do Editor."
#: platform/android/export/export.cpp
@@ -12033,6 +12074,32 @@ msgstr "Nome de pacote inválido:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12811,6 +12878,21 @@ msgstr "Variáveis só podem ser atribuídas na função de vértice."
msgid "Constants cannot be modified."
msgstr "Constantes não podem serem modificadas."
+#~ msgid "Not in resource path."
+#~ msgstr "Não está no caminho de recursos."
+
+#~ msgid "Revert"
+#~ msgstr "Reverter"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Esta ação não pode ser desfeita. Reverter mesmo assim?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Reverter Cena"
+
+#~ msgid "Clear Script"
+#~ msgstr "Remover Script"
+
#~ msgid "Issue Tracker"
#~ msgstr "Rastreador de Problemas"
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index 6314d31908..40a83eaa87 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-01 11:42+0000\n"
+"PO-Revision-Date: 2020-06-15 12:01+0000\n"
"Last-Translator: João Lopes <linux-man@hotmail.com>\n"
"Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_PT/>\n"
@@ -29,7 +29,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -851,7 +851,6 @@ msgstr "Não consigo conectar sinal"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -893,7 +892,7 @@ msgstr "Desligar"
#: editor/connections_dialog.cpp
msgid "Connect a Signal to a Method"
-msgstr "Conectar Sinal a Método"
+msgstr "Conectar Sinal a Método"
#: editor/connections_dialog.cpp
msgid "Edit Connection:"
@@ -1212,7 +1211,7 @@ msgstr "A Descomprimir Ativos"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "The following files failed extraction from package:"
-msgstr "Falhou a extração dos seguintes Ficheiros do pacote:"
+msgstr "Falhou a extração dos seguintes Ficheiros do pacote:"
#: editor/editor_asset_installer.cpp
msgid "And %s more files."
@@ -1253,7 +1252,7 @@ msgstr "Renomear o barramento de áudio"
#: editor/editor_audio_buses.cpp
msgid "Change Audio Bus Volume"
-msgstr "Alterar Volume do barramento de áudio"
+msgstr "Alterar Volume do Barramento de Áudio"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Solo"
@@ -1463,17 +1462,9 @@ msgstr "Ativar"
msgid "Rearrange Autoloads"
msgstr "Reorganizar Carregamentos Automáticos"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Caminho inválido."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "O Ficheiro não existe."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Não está no caminho do recurso."
+msgid "Can't add autoload:"
+msgstr "Não consigo adicionar carregamento automático:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2431,12 +2422,16 @@ msgid "Can't reload a scene that was never saved."
msgstr "Não consigo recarregar uma cena que nunca foi guardada."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Reverter"
+msgid "Reload Saved Scene"
+msgstr "Recarregar Cena Guardada"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Esta acção não pode ser desfeita. Reverter na mesma?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"A cena atual tem alterações não guardadas.\n"
+"Recarregar a cena guardada? Esta ação não pode ser revertida."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2725,10 +2720,6 @@ msgid "Redo"
msgstr "Refazer"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Reverter Cena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Ferramentas diversas de projeto ou cena."
@@ -3374,6 +3365,12 @@ msgstr "Não consegui executar o script:"
msgid "Did you forget the '_run' method?"
msgstr "Esqueceu-se do médodo '_run'?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Pressione Ctrl para arredondar para inteiro. Pressione Shift para mudanças "
+"mais precisas."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Selecionar Nó(s) para Importar"
@@ -3971,6 +3968,10 @@ msgid "Error running post-import script:"
msgstr "Erro na execução do Script de pós-importação:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr "Devolveu um objeto derivado de Nó no método `post_import()`?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "A guardar..."
@@ -4023,7 +4024,7 @@ msgstr "Expandir Todas as Propriedades"
#: editor/inspector_dock.cpp
msgid "Collapse All Properties"
-msgstr "Colapsar Todas as Propriedades"
+msgstr "Colapsar Todas as Propriedades"
#: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -4602,7 +4603,7 @@ msgstr "Forçar modulação branca"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Include Gizmos (3D)"
-msgstr "Incluir ferramentas (3D)"
+msgstr "Incluir Bugigangas (3D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pin AnimationPlayer"
@@ -5193,7 +5194,7 @@ msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
msgstr ""
-"As âncoras e margens de filhos de um contentores são sobrescritas pelo seu "
+"As âncoras e margens de filhos de um contentores são sobrescritas pelo seu "
"pai."
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -6912,12 +6913,12 @@ msgid ""
msgstr "Falta método conectado '%s' para sinal '%s' do nó '%s' para nó '%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Linha"
+msgid "[Ignore]"
+msgstr "[Ignorar]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ignorar)"
+msgid "Line"
+msgstr "Linha"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7311,7 +7312,7 @@ msgstr "Ver ambiente"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Gizmos"
-msgstr "Ver ferramentas"
+msgstr "Ver Bugigangas"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
@@ -7390,6 +7391,21 @@ msgid "XForm Dialog"
msgstr "Diálogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Clique para alternar entre estados de visibilidade.\n"
+"\n"
+"Olho aberto: Bugiganga é visível.\n"
+"Olho fechado: Bugiganga está escondida.\n"
+"Olho meio-aberto: Bugiganga também é visível através de superfícies opacas "
+"(\"raios X\")."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Ajustar Nós ao Fundo"
@@ -10472,8 +10488,8 @@ msgid "Instance Child Scene"
msgstr "Instanciar Cena Filha"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Limpar Script"
+msgid "Detach Script"
+msgstr "Separar Script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10637,6 +10653,16 @@ msgid "Open Documentation"
msgstr "Abrir documentação"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"Não consigo anexar um script: não há linguagens registadas.\n"
+"Isto provavelmente acontece porque o editor foi compilado com todos os "
+"módulos de linguagem desativados."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Adicionar Nó Filho"
@@ -10685,12 +10711,12 @@ msgstr ""
"existir nó raiz."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr "Anexar script novo ou existente ao nó selecionado."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Limpar script do nó selecionado."
+msgid "Detach the script from the selected node."
+msgstr "Separar o script do nó selecionado."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10821,6 +10847,10 @@ msgid "A directory with the same name exists."
msgstr "Já existe diretoria com o mesmo nome."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "O Ficheiro não existe."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Extensão inválida."
@@ -10861,6 +10891,10 @@ msgid "File exists, it will be reused."
msgstr "O Ficheiro já existe, será reutilizado."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Caminho inválido."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Nome de classe inválido."
@@ -10874,7 +10908,7 @@ msgstr "Caminho/nome de script é válido."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
-msgstr "Permitido: a-z, A-Z, 0-9, _ e ."
+msgstr "Permitido: a-z, A-Z, 0-9, _ e ."
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)."
@@ -11906,10 +11940,15 @@ msgstr "O jarsigner do OpenJDK não está configurado nas Definições do Editor
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-"Depuração de keystore não configurado nas Configurações do Editor e nem na "
+"Depuração de keystore não configurada nas Configurações do Editor e nem na "
"predefinição."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Lançamento de keystore configurado incorretamente na predefinição exportada."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Compilação personalizada necessita de um caminho válido para Android SDK no "
@@ -11939,6 +11978,40 @@ msgstr "Nome de pacote inválido:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"Módulo inválido \"GodotPaymentV3\" incluído na configuração do projeto "
+"\"android/modules\" (alterado em Godot 3.2.2).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+"\"Usar Compilação Personalizada\" têm de estar ativa para usar os plugins."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"\"Graus de Liberdade\" só é válido quando \"Modo Xr\" é \"Oculus Mobile VR\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Rastreamento de Mão\" só é válido quando \"Modo Xr\" é \"Oculus Mobile VR"
+"\"."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"\"Consciência do Foco\" só é válido quando \"Modo Xr\" é \"Oculus Mobile VR"
+"\"."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12504,7 +12577,7 @@ msgid ""
"order for AnimatedSprite3D to display frames."
msgstr ""
"Um recurso SpriteFrames tem de ser criado ou definido na Propriedade \"Frames"
-"\" de forma a que AnimatedSprite3D mostre frames."
+"\" de forma a que AnimatedSprite3D mostre frames."
#: scene/3d/vehicle_body.cpp
msgid ""
@@ -12535,7 +12608,7 @@ msgid ""
"this environment's Background Mode to Canvas (for 2D scenes)."
msgstr ""
"Este WorldEnvironment ė ignorado. Pode adicionar uma Camera (para cenas 3D) "
-"ou definir o Modo Background deste ambiente como Canvas (para cenas 2D)."
+"ou definir o Modo Background deste ambiente como Canvas (para cenas 2D)."
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
@@ -12716,6 +12789,21 @@ msgstr "Variações só podem ser atribuídas na função vértice."
msgid "Constants cannot be modified."
msgstr "Constantes não podem ser modificadas."
+#~ msgid "Not in resource path."
+#~ msgstr "Não está no caminho do recurso."
+
+#~ msgid "Revert"
+#~ msgstr "Reverter"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Esta acção não pode ser desfeita. Reverter na mesma?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Reverter Cena"
+
+#~ msgid "Clear Script"
+#~ msgstr "Limpar Script"
+
#~ msgid "Issue Tracker"
#~ msgstr "Rastreador de Problemas"
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 624ae005f2..5e362de330 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -830,7 +830,6 @@ msgstr "Nu se poate conecta semnalul"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1445,17 +1444,9 @@ msgstr "Activați"
msgid "Rearrange Autoloads"
msgstr "Rearanjați Autoload-urile"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Cale nevalidă."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Fișierul nu există."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Nu în calea de resurse."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2404,12 +2395,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Nu se poate reîncărca o scenă care nu a fost salvată niciodată."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Întoarcere"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Salvează Scena"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Această acțiune nu poate fi recuperată. Te reîntorci oricum?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2707,10 +2701,6 @@ msgid "Redo"
msgstr "Reîntoarcere"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Restabilește Scena"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Proiect Divers sau unelte pentru scenă."
@@ -3368,6 +3358,10 @@ msgstr "Nu a putut fi executat scriptul:"
msgid "Did you forget the '_run' method?"
msgstr "Ai uitat cumva metoda '_run' ?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Selectează Nodul(rile) pentru Importare"
@@ -4001,6 +3995,10 @@ msgid "Error running post-import script:"
msgstr "Eroare la executarea scripyului post-importare:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Se Salvează..."
@@ -7101,15 +7099,15 @@ msgid ""
msgstr "Deconectați '%s' de la '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Linie:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Faceți Funcția"
@@ -7596,6 +7594,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "Snap pe grilă"
@@ -10682,7 +10689,8 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+#, fuzzy
+msgid "Detach Script"
msgstr "Curăță Scriptul"
#: editor/scene_tree_dock.cpp
@@ -10851,6 +10859,13 @@ msgid "Open Documentation"
msgstr "Deschide Recente"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10901,11 +10916,13 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr ""
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
+msgstr "Curăță un script pentru nodul selectat."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Curăță un script pentru nodul selectat."
#: editor/scene_tree_dock.cpp
@@ -11034,6 +11051,10 @@ msgid "A directory with the same name exists."
msgstr "Un fișier sau un director cu acest nume există deja."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Fișierul nu există."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Trebuie să utilizaţi o extensie valida."
@@ -11077,6 +11098,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Cale nevalidă."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid class name."
msgstr "Nume nevalid."
@@ -12154,6 +12179,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12178,6 +12207,32 @@ msgstr "Nume nevalid."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12830,6 +12885,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "Nu în calea de resurse."
+
+#~ msgid "Revert"
+#~ msgstr "Întoarcere"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Această acțiune nu poate fi recuperată. Te reîntorci oricum?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Restabilește Scena"
+
#~ msgid "Issue Tracker"
#~ msgstr "Agent de Monitorizare al Problemelor"
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index d8c55d825e..8bae9207d0 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -71,12 +71,17 @@
# Super Pracion <superpracion2@gmail.com>, 2020.
# PizzArt <7o7goo7o7@gmail.com>, 2020.
# TheGracekale <mrsmailbot.lg@gmail.com>, 2020.
+# Климентий Титов <titoffklim@cclc.tech>, 2020.
+# Richard Urban <redasuio1@gmail.com>, 2020.
+# Nikita <Kulacnikita@ya.ru>, 2020.
+# Alexander <ramzi7208@gmail.com>, 2020.
+# Alex Tern <ternvein@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-05 14:01+0000\n"
-"Last-Translator: Super Pracion <superpracion2@gmail.com>\n"
+"PO-Revision-Date: 2020-06-15 12:01+0000\n"
+"Last-Translator: Alex Tern <ternvein@gmail.com>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -85,12 +90,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.1-dev\n"
+"X-Generator: Weblate 4.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr "Неверный тип аргумента для convert(), используйте TYPE_* константы."
+msgstr "Неверный тип аргумента для convert(), используйте константы TYPE_*."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
@@ -129,7 +134,7 @@ msgstr "Недопустимые аргументы для построения
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr "На вызове '%s':"
+msgstr "На вызове '%s':"
#: core/ustring.cpp
msgid "B"
@@ -340,7 +345,7 @@ msgstr "Время (сек.): "
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr "Переключатель дорожки включен"
+msgstr "Включить/выключить дорожку"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -906,7 +911,6 @@ msgstr "Не удается подключить сигнал"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1516,17 +1520,9 @@ msgstr "Включить"
msgid "Rearrange Autoloads"
msgstr "Перестановка автозагрузок"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Недопустимый путь."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Файл не существует."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Не в пути ресурсов."
+msgid "Can't add autoload:"
+msgstr "Нельзя добваить автозагрузку:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2041,7 +2037,7 @@ msgstr "Константы"
#: editor/editor_help.cpp
msgid "Property Descriptions"
-msgstr "Описание свойств"
+msgstr "Описания свойств"
#: editor/editor_help.cpp
msgid "(value)"
@@ -2057,7 +2053,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr "Описание методов"
+msgstr "Описания методов"
#: editor/editor_help.cpp
msgid ""
@@ -2485,12 +2481,16 @@ msgid "Can't reload a scene that was never saved."
msgstr "Не возможно загрузить сцену, которая не была сохранена."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Восстановить"
+msgid "Reload Saved Scene"
+msgstr "Перезагрузить сохранённую сцену"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Это действие нельзя отменить. Восстановить в любом случае?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"Текущая сцена имеет несохраненные изменения. \n"
+"Всё равно перезагрузить сцену? Это действие нельзя отменить."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2539,7 +2539,7 @@ msgstr "Закрыть сцену"
#: editor/editor_node.cpp
msgid "Reopen Closed Scene"
-msgstr "Открыть ранее закрытую сцену"
+msgstr "Открыть закрытую сцену"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
@@ -2776,10 +2776,6 @@ msgid "Redo"
msgstr "Повторить"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Восстановить сцену"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Прочие инструменты."
@@ -2861,8 +2857,8 @@ msgstr ""
"Когда эта опция включена, экспорт или развёртывание будет создавать "
"минимальный исполняемый файл.\n"
"Файловая система проекта будет предоставляться редактором через сеть.\n"
-"На Android развёртывание будет быстрее при подключении через USB.\n"
-"Эта опция ускоряет тестирование больших проектов."
+"На Android развёртывание будет быстрее при подключении через USB. Эта опция "
+"ускоряет тестирование игр с большим объемом памяти."
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
@@ -3161,11 +3157,11 @@ msgstr "Выделение"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
-msgstr "Открыть 2D редактор"
+msgstr "Открыть 2D-редактор"
#: editor/editor_node.cpp
msgid "Open 3D Editor"
-msgstr "Открыть 3D редактор"
+msgstr "Открыть 3D-редактор"
#: editor/editor_node.cpp
msgid "Open Script Editor"
@@ -3427,6 +3423,12 @@ msgstr "Невозможно запустить скрипт:"
msgid "Did you forget the '_run' method?"
msgstr "Быть может вы забыли метод _run()?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Зажмите Ctrl, чтобы округлить до целых. Зажмите Shift для более точных "
+"изменений."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Выберите узлы для импорта"
@@ -4022,6 +4024,10 @@ msgid "Error running post-import script:"
msgstr "Ошибка запуска пост-импорт скрипта:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Сохранение..."
@@ -6044,17 +6050,16 @@ msgid "Create Outline Mesh..."
msgstr "Создать полисетку обводки..."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a static outline mesh. The outline mesh will have its normals "
"flipped automatically.\n"
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
-"Создаёт статичную контурную полисетку. Её нормали будут перевёрнуты "
+"Создаёт статичную обводочную полисетку. Её нормали переворачиваются "
"автоматически.\n"
-"Она может быть заменой свойству Grow ресурса SpatialMaterial, когда это "
-"свойство невозможно использовать."
+"Она может быть использована в случае, если использовать свойство Grow "
+"материала SpatialMaterial не представляется возможным."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -6678,7 +6683,7 @@ msgstr "AnimationTree - не задан путь к AnimationPlayer"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "Path to AnimationPlayer is invalid"
-msgstr "Путь к AnimationPlayer недействительный"
+msgstr "Путь к AnimationPlayer недействительный"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Files"
@@ -6969,12 +6974,13 @@ msgstr ""
"'%s'."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Строка"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(игнорировать)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(игнорировать)"
+msgid "Line"
+msgstr "Строка"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7340,7 +7346,6 @@ msgid "This operation requires a single selected node."
msgstr "Эта операция требует одного выбранного узла."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Auto Orthogonal Enabled"
msgstr "Ортогональный"
@@ -7450,6 +7455,15 @@ msgid "XForm Dialog"
msgstr "XForm диалоговое окно"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Привязать узлы к полу"
@@ -9113,9 +9127,8 @@ msgid "2D texture uniform lookup."
msgstr "Равномерный поиск 2D-текстур."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "2D texture uniform lookup with triplanar."
-msgstr "Форменный поиск 2d текстуры с трипланаром."
+msgstr "Равномерный поиск 2d текстуры с трипланаром."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Transform function."
@@ -10152,7 +10165,6 @@ msgid "Settings saved OK."
msgstr "Настройки сохранены нормально."
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Moved Input Action Event"
msgstr "Событие ввода действия перемещено"
@@ -10471,7 +10483,6 @@ msgid "Regular Expression Error"
msgstr "Ошибка в регулярном выражении"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
msgstr "На символе %s"
@@ -10540,8 +10551,9 @@ msgid "Instance Child Scene"
msgstr "Добавить дочернюю сцену"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Убрать скрипт"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Прикрепить скрипт"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10707,6 +10719,13 @@ msgid "Open Documentation"
msgstr "Открыть документацию"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Добавить дочерний узел"
@@ -10755,11 +10774,13 @@ msgstr ""
"не существует."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Прикрепить новый или существующий скрипт к выбранному узлу."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Убрать скрипт у выбранного узла."
#: editor/scene_tree_dock.cpp
@@ -10891,6 +10912,10 @@ msgid "A directory with the same name exists."
msgstr "Каталог с таким же именем существует."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Файл не существует."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Недопустимое расширение."
@@ -10931,6 +10956,10 @@ msgid "File exists, it will be reused."
msgstr "Файл существует, будет использован повторно."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Недопустимый путь."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Недопустимое имя класса."
@@ -11979,6 +12008,13 @@ msgstr ""
"предустановках."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Отладочная клавиатура не настроена ни в настройках редактора, ни в "
+"предустановках."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Пользовательская сборка требует наличия правильного пути к Android SDK в "
@@ -12007,6 +12043,32 @@ msgstr "Недопустимое имя пакета:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12039,7 +12101,6 @@ msgstr ""
"Android."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "No build apk generated at: "
msgstr "Нет сборки apk в: "
@@ -12235,10 +12296,9 @@ msgstr ""
"чтобы работать."
#: scene/2d/light_occluder_2d.cpp
-#, fuzzy
msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
msgstr ""
-"Заслоняющий полигон для этого окклюдера пуст. Пожалуйста, нарисуйте полигон!"
+"Заслоняющий полигон для этого окклюдера пуст. Пожалуйста, нарисуйте полигон."
#: scene/2d/navigation_polygon.cpp
msgid ""
@@ -12725,8 +12785,7 @@ msgid ""
msgstr ""
"ScrollContainer предназначен для работы с одним дочерним элементом "
"управления.\n"
-"Используйте дочерний контейнер (VBox, HBox и т.д.), или Control и "
-"установите\n"
+"Используйте дочерний контейнер (VBox, HBox и т.д.), или Control и установите "
"минимальный размер вручную."
#: scene/gui/tree.cpp
@@ -12786,6 +12845,21 @@ msgstr "Изменения могут быть назначены только
msgid "Constants cannot be modified."
msgstr "Константы не могут быть изменены."
+#~ msgid "Not in resource path."
+#~ msgstr "Не в пути ресурсов."
+
+#~ msgid "Revert"
+#~ msgstr "Восстановить"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Это действие нельзя отменить. Восстановить в любом случае?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Восстановить сцену"
+
+#~ msgid "Clear Script"
+#~ msgstr "Убрать скрипт"
+
#~ msgid "Issue Tracker"
#~ msgstr "Система отслеживания ошибок"
diff --git a/editor/translations/si.po b/editor/translations/si.po
index 2eb9cad3f8..4d252a53d6 100644
--- a/editor/translations/si.po
+++ b/editor/translations/si.po
@@ -836,7 +836,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1436,16 +1435,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2366,11 +2357,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "සාදන්න"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2636,10 +2630,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3246,6 +3236,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3832,6 +3826,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6727,11 +6725,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7202,6 +7200,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10143,7 +10150,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10304,6 +10311,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10350,11 +10364,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10474,6 +10488,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10514,6 +10532,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11551,6 +11573,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11574,6 +11600,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index 295b7ac429..a341552d1c 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -9,11 +9,12 @@
# Michal <alladinsiffon@gmail.com>, 2019.
# Richard <rgarlik@gmail.com>, 2019.
# Richard Urban <redasuio1@gmail.com>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-01 11:42+0000\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
"Last-Translator: Richard Urban <redasuio1@gmail.com>\n"
"Language-Team: Slovak <https://hosted.weblate.org/projects/godot-engine/"
"godot/sk/>\n"
@@ -22,7 +23,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -31,17 +32,17 @@ msgstr "Chybný argument convert(), použite TYPE_* konštanty."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "Očakávaná dĺžka stringu 1 (písmeno)."
+msgstr "dĺžka očakávaného stringu 1 (písmeno)"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "Nedostatok bajtov na dekódovanie, možný chybný formát."
+msgstr "Nedostatok bajtov na dekódovanie, alebo chybný formát."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr "Nesprávny vstup %i (chýba) vo výraze"
+msgstr "Neplatný vstup %i (neprešlo) vo výraze"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -97,7 +98,7 @@ msgstr "EiB"
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr "Voľné"
+msgstr "zadarmo"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
@@ -117,7 +118,7 @@ msgstr "Hodnota:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "Vložiť tu kľúč"
+msgstr "Sem Vložte Kľúč"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
@@ -125,7 +126,7 @@ msgstr "Duplikovať kľúč(e)"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr "Zmazať kľúč(e)"
+msgstr "Zmazať označené kľúč(e)"
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
@@ -133,64 +134,64 @@ msgstr "Pridať Bezierov bod"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
-msgstr "Presunúť Vybraté Body"
+msgstr "Presunúť Bazier Points"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr "Animácia Duplikovať Kľúče"
+msgstr "Anim Duplikovať Kľúče"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Delete Keys"
-msgstr "Animácia Vymazať Kľúče"
+msgstr "Anim Zmazať Kľúče"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr "Animácia Zmeniť Keyframe Čas"
+msgstr "Anim Zmeniť Keyframe Čas"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "Animácia zmeniť prechod"
+msgstr "Anim zmeniť prechod"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr "Zmeniť Veľkosť Animácie"
+msgstr "Anim Zmeniť Veľkosť"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Value"
-msgstr "Animácia Zmeniť Keyframe Hodnotu"
+msgstr "Anim Zmeniť Hodnotu Keyframe"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
-msgstr "Animácia zmenila Hovor"
+msgstr "Anim Change Call"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
-msgstr "Animácia Zmeniť čas Keyframe-u"
+msgstr "Anim Zmeniť čas Keyframe-u"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transition"
-msgstr "Zmeniť Transition Animácie"
+msgstr "Animácia zmeniť prechod(Anim Multi Change Transition)"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transform"
-msgstr "Animácia zmeniť Transform"
+msgstr "Anim zmeniť Transform"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Value"
-msgstr "Animácia Zmeniť hodnotu Keyframe-u"
+msgstr "Animácia Zmeniť Keyframe Hodnotu (Anim Multi Change Keyframe Value)"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Call"
-msgstr "Animácia Zmenila Hovor"
+msgstr "Animácia Zmeniť Hovor (Anim Multi Change Call)"
#: editor/animation_track_editor.cpp
msgid "Change Animation Length"
-msgstr "Zmeniť Dĺžku Animácie"
+msgstr "Zmeniť Dĺžku Animácie (Change Animation Length)"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr "Zmeniť Dĺžku Animácie"
+msgstr "Zmeniť opakovanie Animácie (Change Animation Loop)"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -206,7 +207,7 @@ msgstr "Call Method Track"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr "Krivka Bezier Track"
+msgstr "Bezier Curve Track"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
@@ -214,7 +215,7 @@ msgstr "Audio Playback Track"
#: editor/animation_track_editor.cpp
msgid "Animation Playback Track"
-msgstr "Playback Track Animácie"
+msgstr "Animation Playback Track"
#: editor/animation_track_editor.cpp
msgid "Animation length (frames)"
@@ -836,7 +837,6 @@ msgstr "Nedá sa pripojiť signál"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1446,17 +1446,9 @@ msgstr "Povoliť"
msgid "Rearrange Autoloads"
msgstr "Rearandžovať AutoLoad-y"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Neplatná cesta."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Súbor neexistuje."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Nieje v resource path."
+msgid "Can't add autoload:"
+msgstr "Nepodarilo sa pridať autoload:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2414,12 +2406,16 @@ msgid "Can't reload a scene that was never saved."
msgstr "Nemožno načítať scénu, ktorá nikdy nebola uložená."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Revert"
+msgid "Reload Saved Scene"
+msgstr "Reloadnuť Uloženú Scénu"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Túto akciu nie je možné vrátiť späť. Chcete Revertovatť aj tak?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"Táto scéna má neuložené zmeny.\n"
+"Aj tak chcete scény reloadnuť? Táto akcia nomôže byť nedokončená."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2705,10 +2701,6 @@ msgid "Redo"
msgstr "Prerobiť"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Vrátiť Scénu"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Zmiešanosti projektových alebo scénových wide tool-ov."
@@ -3075,176 +3067,172 @@ msgid "Open & Run a Script"
msgstr "Otvoriť & Spustiť Script"
#: editor/editor_node.cpp
-#, fuzzy
msgid "New Inherited"
-msgstr "Popis:"
+msgstr "Novo Zdedené"
#: editor/editor_node.cpp
msgid "Load Errors"
-msgstr ""
+msgstr "Načítať Chyby"
#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Select"
-msgstr ""
+msgstr "Zvoliť"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "Otvorit priečinok"
+msgstr "Otvoriť 2D Editor"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "Otvorit priečinok"
+msgstr "Otvoriť 3D Editor"
#: editor/editor_node.cpp
msgid "Open Script Editor"
-msgstr ""
+msgstr "Otvoriť Editor Skriptov"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
-msgstr ""
+msgstr "Otvoriť Knižnicu \"Assetov\""
#: editor/editor_node.cpp
msgid "Open the next Editor"
-msgstr ""
+msgstr "Otvoriť následujúci Editor"
#: editor/editor_node.cpp
msgid "Open the previous Editor"
-msgstr ""
+msgstr "Otvoriť predchádzajúci Editor"
#: editor/editor_node.h
msgid "Warning!"
-msgstr ""
+msgstr "Varovanie!"
#: editor/editor_path.cpp
msgid "No sub-resources found."
-msgstr ""
+msgstr "Nenašli sa žiadne \"sub-resources\"."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
-msgstr ""
+msgstr "Vytváranie Zobrazenia \"Mesh-u\""
#: editor/editor_plugin.cpp
msgid "Thumbnail..."
-msgstr ""
+msgstr "\"Thumbnail\"..."
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Main Script:"
-msgstr "Popis:"
+msgstr "Hlavný Script:"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Edit Plugin"
-msgstr "Signály:"
+msgstr "Editovať Plugin"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
-msgstr ""
+msgstr "Nainštalované Plugins:"
#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
msgid "Update"
-msgstr ""
+msgstr "Update"
#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Version:"
-msgstr ""
+msgstr "Verzia:"
#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
msgid "Author:"
-msgstr ""
+msgstr "Autor:"
#: editor/editor_plugin_settings.cpp
msgid "Status:"
-msgstr ""
+msgstr "Status:"
#: editor/editor_plugin_settings.cpp
msgid "Edit:"
-msgstr ""
+msgstr "Edit:"
#: editor/editor_profiler.cpp
msgid "Measure:"
-msgstr ""
+msgstr "Opatrenia:"
#: editor/editor_profiler.cpp
msgid "Frame Time (sec)"
-msgstr ""
+msgstr "Čas Snímky (v sek.)"
#: editor/editor_profiler.cpp
msgid "Average Time (sec)"
-msgstr ""
+msgstr "Priemerný Čas (v sek.)"
#: editor/editor_profiler.cpp
msgid "Frame %"
-msgstr ""
+msgstr "Snímka %"
#: editor/editor_profiler.cpp
msgid "Physics Frame %"
-msgstr ""
+msgstr "Fyzická Snímka %"
#: editor/editor_profiler.cpp
msgid "Inclusive"
-msgstr ""
+msgstr "Inkluzívne"
#: editor/editor_profiler.cpp
msgid "Self"
-msgstr ""
+msgstr "Vlastné"
#: editor/editor_profiler.cpp
msgid "Frame #:"
-msgstr ""
+msgstr "Snímka #:"
#: editor/editor_profiler.cpp
msgid "Time"
-msgstr ""
+msgstr "Čas"
#: editor/editor_profiler.cpp
msgid "Calls"
-msgstr ""
+msgstr "Volania"
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Edit Text:"
-msgstr "Súbor:"
+msgstr "Editovať Text:"
#: editor/editor_properties.cpp editor/script_create_dialog.cpp
msgid "On"
-msgstr ""
+msgstr "Zapnúť"
#: editor/editor_properties.cpp
msgid "Layer"
-msgstr ""
+msgstr "Vrstva"
#: editor/editor_properties.cpp
msgid "Bit %d, value %d"
-msgstr ""
+msgstr "Bit %d, hodnota %d"
#: editor/editor_properties.cpp
msgid "[Empty]"
-msgstr ""
+msgstr "[Prázdne]"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
msgid "Assign..."
-msgstr ""
+msgstr "Priradiť..."
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr "Nesprávna veľkosť písma."
+msgstr "Nesprávny \"RID\""
#: editor/editor_properties.cpp
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
msgstr ""
+"Vybraný prostriedok (%s) sa nezhoduje žiadnemu typu pre túto vlastnosť (%s)."
#: editor/editor_properties.cpp
msgid ""
"Can't create a ViewportTexture on resources saved as a file.\n"
"Resource needs to belong to a scene."
msgstr ""
+"Nepodarilo sa vytvoriť ViewportTextúru na zdroj uložený ako súbor.\n"
+"Zdroj musí patriť scéne."
#: editor/editor_properties.cpp
msgid ""
@@ -3253,28 +3241,30 @@ msgid ""
"Please switch on the 'local to scene' property on it (and all resources "
"containing it up to a node)."
msgstr ""
+"Nepodarilo sa vytvoriť ViewportTextúru na tomto zdroji lebo není nastavený "
+"ako lokálna scéna.\n"
+"Prosím zmeňte ho vo vlastnosti 'local to scene' (a všetky zdroje ktoré ho "
+"obsahujú hore v node-e)."
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Pick a Viewport"
-msgstr ""
+msgstr "Vybrať Viewport"
#: editor/editor_properties.cpp editor/property_editor.cpp
-#, fuzzy
msgid "New Script"
-msgstr "Popis:"
+msgstr "Nový Script"
#: editor/editor_properties.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Extend Script"
-msgstr "Popis:"
+msgstr "\"Extendovaný\" Script"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "New %s"
-msgstr ""
+msgstr "Nový %s"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Make Unique"
-msgstr ""
+msgstr "Spraviť Jedinečným"
#: editor/editor_properties.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3292,845 +3282,837 @@ msgstr "Vložiť"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Convert To %s"
-msgstr ""
+msgstr "Konvertovať Do %s"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Selected node is not a Viewport!"
-msgstr ""
+msgstr "Vybraný node není Viewport!"
#: editor/editor_properties_array_dict.cpp
msgid "Size: "
-msgstr ""
+msgstr "Veľkosť: "
#: editor/editor_properties_array_dict.cpp
msgid "Page: "
-msgstr ""
+msgstr "Strana: "
#: editor/editor_properties_array_dict.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Item"
-msgstr ""
+msgstr "Vymazať Predmet"
#: editor/editor_properties_array_dict.cpp
msgid "New Key:"
-msgstr ""
+msgstr "Nový Kľúč:"
#: editor/editor_properties_array_dict.cpp
msgid "New Value:"
-msgstr ""
+msgstr "Nová Hodnota:"
#: editor/editor_properties_array_dict.cpp
msgid "Add Key/Value Pair"
-msgstr ""
+msgstr "Pridať Kľúč/Hodnota \"Pair\""
#: editor/editor_run_native.cpp
msgid ""
"No runnable export preset found for this platform.\n"
"Please add a runnable preset in the export menu."
msgstr ""
+"Pre túto platformu sa nenašiel žiadny spustiteľný \"export preset\" .\n"
+"Prosím pridajte spustiteľný \"preset\" v export menu."
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
-msgstr ""
+msgstr "Napíšte svoju logiku v metóde _run()."
#: editor/editor_run_script.cpp
msgid "There is an edited scene already."
-msgstr ""
+msgstr "Už tu je editovaná scéna."
#: editor/editor_run_script.cpp
msgid "Couldn't instance script:"
-msgstr ""
+msgstr "Nepodarilo sa inštancovať script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the 'tool' keyword?"
-msgstr ""
+msgstr "Zabudli ste skratku pre 'tool'?"
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
-msgstr ""
+msgstr "Nepodarilo sa spustiť script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
+msgstr "Nezabudli ste na metódu '_run'?"
+
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
msgstr ""
+"Podržte Ctrl na zaokrúhlenie na celé čísla. Podržte Shift pre viac precízne "
+"zmeny."
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
-msgstr ""
+msgstr "Vyberte Node(y) pre Importovanie"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
msgid "Browse"
-msgstr ""
+msgstr "Vyhladať"
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
-msgstr ""
+msgstr "Cesta Scény:"
#: editor/editor_sub_scene.cpp
msgid "Import From Node:"
-msgstr ""
+msgstr "Importovať Z Node-u:"
#: editor/export_template_manager.cpp
msgid "Redownload"
-msgstr ""
+msgstr "Preinštalovať"
#: editor/export_template_manager.cpp
msgid "Uninstall"
-msgstr ""
+msgstr "Odinštalovať"
#: editor/export_template_manager.cpp
msgid "(Installed)"
-msgstr ""
+msgstr "(Nainštalované)"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download"
-msgstr ""
+msgstr "Stiahnuté"
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
-msgstr ""
+msgstr "Oficiálne export šablóny niesu dostupné pre \"development builds\"."
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr ""
+msgstr "(Chýba)"
#: editor/export_template_manager.cpp
msgid "(Current)"
-msgstr ""
+msgstr "(Aktuálny)"
#: editor/export_template_manager.cpp
msgid "Retrieving mirrors, please wait..."
-msgstr ""
+msgstr "Načítavanie zrkadiel, prosím čakajte..."
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
-msgstr ""
+msgstr "Vymazať verziu šablóny '%s'?"
#: editor/export_template_manager.cpp
msgid "Can't open export templates zip."
-msgstr ""
+msgstr "Nedá sa otvoriť export templates zip."
#: editor/export_template_manager.cpp
msgid "Invalid version.txt format inside templates: %s."
-msgstr ""
+msgstr "Neplatný version.txt formát vo vnútri šablón: %s."
#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
-msgstr ""
+msgstr "Nenašla sa žiadny version.txt vo vnútri šablón."
#: editor/export_template_manager.cpp
msgid "Error creating path for templates:"
-msgstr ""
+msgstr "Chyba pri vytváraní cesty pre šablóny:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
-msgstr ""
+msgstr "Extrahovanie exportných šablón"
#: editor/export_template_manager.cpp
msgid "Importing:"
-msgstr ""
+msgstr "Importovanie:"
#: editor/export_template_manager.cpp
msgid "Error getting the list of mirrors."
-msgstr ""
+msgstr "Chyba pri získavaní listu zrkadiel."
#: editor/export_template_manager.cpp
msgid "Error parsing JSON of mirror list. Please report this issue!"
-msgstr ""
+msgstr "Chyba pri rozbore JSON listu zrkadiel. Prosím nahláste túto chybu!"
#: editor/export_template_manager.cpp
msgid ""
"No download links found for this version. Direct download is only available "
"for official releases."
msgstr ""
+"Nenašli sa žiadne download linky pre túto verziu. Priame stiahnutie je "
+"dostupný iba pre \"official releases\"."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Nerozpoznané."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect."
-msgstr ""
+msgstr "Nedá sa pripojiť."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Žiadna odozva."
#: editor/export_template_manager.cpp
msgid "Request Failed."
-msgstr ""
+msgstr "Žiadosť Zlihala."
#: editor/export_template_manager.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "Presmerovanie \"Loop-u\"."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Zlihalo:"
#: editor/export_template_manager.cpp
msgid "Download Complete."
-msgstr ""
+msgstr "Inštalácia je Dokončená."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cannot remove temporary file:"
-msgstr "Nemôžete odstrániť:"
+msgstr "Nepodarilo sa vymazať dočasné súbory:"
#: editor/export_template_manager.cpp
msgid ""
"Templates installation failed.\n"
"The problematic templates archives can be found at '%s'."
msgstr ""
+"Inštalácia šablón zlihala.\n"
+"Archívy problémových šablón nájdete v '%s'."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
-msgstr ""
+msgstr "Chyba pri zadávaní URL:"
#: editor/export_template_manager.cpp
msgid "Connecting to Mirror..."
-msgstr ""
+msgstr "Prebieha Pripájanie do Zrkadla..."
#: editor/export_template_manager.cpp
msgid "Disconnected"
-msgstr ""
+msgstr "Odpojené"
#: editor/export_template_manager.cpp
msgid "Resolving"
-msgstr ""
+msgstr "Riešenie"
#: editor/export_template_manager.cpp
msgid "Can't Resolve"
-msgstr ""
+msgstr "Nepodarilo sa Vyriešiť"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Connecting..."
-msgstr ""
+msgstr "Pripájanie..."
#: editor/export_template_manager.cpp
msgid "Can't Connect"
-msgstr ""
+msgstr "Nepodarilo sa pripojiť"
#: editor/export_template_manager.cpp
msgid "Connected"
-msgstr ""
+msgstr "Pripojené"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Requesting..."
-msgstr ""
+msgstr "Requestuje sa..."
#: editor/export_template_manager.cpp
msgid "Downloading"
-msgstr ""
+msgstr "Inštalovanie"
#: editor/export_template_manager.cpp
msgid "Connection Error"
-msgstr ""
+msgstr "Chyba pri Pripájaní"
#: editor/export_template_manager.cpp
msgid "SSL Handshake Error"
-msgstr ""
+msgstr "Chyba SSL Handshake"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
-msgstr ""
+msgstr "Nekompresované \"Android Build Sources\""
#: editor/export_template_manager.cpp
msgid "Current Version:"
-msgstr ""
+msgstr "Aktuálna Verzia:"
#: editor/export_template_manager.cpp
msgid "Installed Versions:"
-msgstr ""
+msgstr "Inštalované Verzie:"
#: editor/export_template_manager.cpp
msgid "Install From File"
-msgstr ""
+msgstr "Inštalovať Zo Súboru"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove Template"
-msgstr "Všetky vybrané"
+msgstr "Vymazať Šablónu"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select Template File"
-msgstr "Vytvoriť adresár"
+msgstr "Vybrať Súbor Šablóny"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Godot Export Templates"
-msgstr "Všetky vybrané"
+msgstr "Godot Exportovanie Šablón"
#: editor/export_template_manager.cpp
msgid "Export Template Manager"
-msgstr ""
+msgstr "Exportovať Manažera Šablón"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download Templates"
-msgstr "Všetky vybrané"
+msgstr "Stiahnuť Šablónu"
#: editor/export_template_manager.cpp
msgid "Select mirror from list: (Shift+Click: Open in Browser)"
-msgstr ""
+msgstr "Vybrať zrkadlo z listu: (Shift+Click: Open in Browser)"
#: editor/filesystem_dock.cpp
msgid "Favorites"
-msgstr ""
+msgstr "Obľúbené"
#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
+"Status:Import súboru zlihal. Prosím opravte súbor a manuálne reimportujte."
#: editor/filesystem_dock.cpp
msgid "Cannot move/rename resources root."
-msgstr ""
+msgstr "Nedá sa presunúť/premenovať \"resources root\"."
#: editor/filesystem_dock.cpp
msgid "Cannot move a folder into itself."
-msgstr ""
+msgstr "Nadá sa presunúť pričinok do toho istého priečinku."
#: editor/filesystem_dock.cpp
msgid "Error moving:"
-msgstr ""
+msgstr "Chyba pri presúvaní:"
#: editor/filesystem_dock.cpp
msgid "Error duplicating:"
-msgstr ""
+msgstr "Chyba pri duplikovaní:"
#: editor/filesystem_dock.cpp
msgid "Unable to update dependencies:"
-msgstr ""
+msgstr "Nepodarilo sa update-nuť závislosti:"
#: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp
msgid "No name provided."
-msgstr ""
+msgstr "Nieje uvedené žiadne meno."
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters."
-msgstr ""
+msgstr "Toto meno obsahuje nepodporované písmená."
#: editor/filesystem_dock.cpp
msgid "A file or folder with this name already exists."
-msgstr ""
+msgstr "Súbor alebo priečinok s tímto menom už existuje."
#: editor/filesystem_dock.cpp
msgid "Name contains invalid characters."
-msgstr ""
+msgstr "Meno obsahuje neplatné písmená."
#: editor/filesystem_dock.cpp
msgid "Renaming file:"
-msgstr ""
+msgstr "Zostávajúce súbory:"
#: editor/filesystem_dock.cpp
msgid "Renaming folder:"
-msgstr ""
+msgstr "Zostávajúce priečinky:"
#: editor/filesystem_dock.cpp
msgid "Duplicating file:"
-msgstr ""
+msgstr "Duplikovanie súborov:"
#: editor/filesystem_dock.cpp
msgid "Duplicating folder:"
-msgstr ""
+msgstr "Duplikovanie priečinka:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Inherited Scene"
-msgstr "Popis:"
+msgstr "Nová Zdedená Scéna"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Set As Main Scene"
-msgstr "Uložiť súbor"
+msgstr "Nastaviť ako Hlavnú Scénu"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open Scenes"
-msgstr "Otvoriť súbor(y)"
+msgstr "Otvoriť Scény"
#: editor/filesystem_dock.cpp
msgid "Instance"
-msgstr ""
+msgstr "Inštancie"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Add to Favorites"
-msgstr "Obľúbené:"
+msgstr "Pridať do Obľúbených"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Remove from Favorites"
-msgstr "Všetky vybrané"
+msgstr "Odstrániť z Obľúbených"
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies..."
-msgstr ""
+msgstr "Editovať Závislosti..."
#: editor/filesystem_dock.cpp
msgid "View Owners..."
-msgstr ""
+msgstr "Zobraziť Majiteľov..."
#: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Rename..."
-msgstr ""
+msgstr "Premenovať..."
#: editor/filesystem_dock.cpp
msgid "Duplicate..."
-msgstr ""
+msgstr "Duplikovať..."
#: editor/filesystem_dock.cpp
msgid "Move To..."
-msgstr ""
+msgstr "Presunúť Do..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Scene..."
-msgstr "Popis:"
+msgstr "Nová Scéna..."
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Script..."
-msgstr "Popis:"
+msgstr "Nový Script..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Resource..."
-msgstr "Vytvoriť adresár"
+msgstr "Nový Prostriedok..."
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
msgid "Expand All"
-msgstr ""
+msgstr "Expandovať Všetky"
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
msgid "Collapse All"
-msgstr ""
+msgstr "Collapse All"
#: editor/filesystem_dock.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/project_manager.cpp editor/rename_dialog.cpp
#: editor/scene_tree_dock.cpp
msgid "Rename"
-msgstr ""
+msgstr "Premenovať"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Previous Folder/File"
-msgstr "Vytvoriť adresár"
+msgstr "Minulý Priečinok/Súbor"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Next Folder/File"
-msgstr "Vytvoriť adresár"
+msgstr "Ďalší Priečinok/Súbor"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
-msgstr ""
+msgstr "Preskenovať Filesystem"
#: editor/filesystem_dock.cpp
msgid "Toggle Split Mode"
-msgstr ""
+msgstr "Prepnúť Split Mode"
#: editor/filesystem_dock.cpp
msgid "Search files"
-msgstr ""
+msgstr "Vyhľadať súbory"
#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
msgstr ""
+"Skenujem Súbory,\n"
+"Počkajte Prosím..."
#: editor/filesystem_dock.cpp
msgid "Move"
-msgstr ""
+msgstr "Presunúť"
#: editor/filesystem_dock.cpp
msgid "There is already file or folder with the same name in this location."
-msgstr ""
+msgstr "Už tu je súbor alebo priečinok pomenovaný rovnako."
#: editor/filesystem_dock.cpp
msgid "Overwrite"
-msgstr ""
+msgstr "Prepísať"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Create Scene"
-msgstr "Vytvoriť adresár"
+msgstr "Vytvoriť Scénu"
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
-msgstr ""
+msgstr "Vytvoriť Script"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Find in Files"
-msgstr "Súbor:"
+msgstr "Nájsť v Súboroch"
#: editor/find_in_files.cpp
msgid "Find:"
-msgstr ""
+msgstr "Nájsť:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Folder:"
-msgstr "Vytvoriť adresár"
+msgstr "Priečinok:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Filters:"
-msgstr "Filter:"
+msgstr "Filtre:"
#: editor/find_in_files.cpp
msgid ""
"Include the files with the following extensions. Add or remove them in "
"ProjectSettings."
msgstr ""
+"Obsahuje súbory s následujúcimi extensiami. Pridajte ich alebo Odstránte v "
+"NastaveniachProjektu."
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find..."
-msgstr ""
+msgstr "Nájsť..."
#: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp
msgid "Replace..."
-msgstr ""
+msgstr "Nahradiť..."
#: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp
msgid "Cancel"
-msgstr ""
+msgstr "Zrušiť"
#: editor/find_in_files.cpp
msgid "Find: "
-msgstr ""
+msgstr "Nájsť: "
#: editor/find_in_files.cpp
msgid "Replace: "
-msgstr ""
+msgstr "Nahradiť: "
#: editor/find_in_files.cpp
msgid "Replace all (no undo)"
-msgstr ""
+msgstr "Nahradiť všetky (nedá sa vrátiť späť)"
#: editor/find_in_files.cpp
msgid "Searching..."
-msgstr ""
+msgstr "Vyhľadávam..."
#: editor/find_in_files.cpp
msgid "Search complete"
-msgstr ""
+msgstr "Vyhľadávanie bolo dokončené"
#: editor/groups_editor.cpp
msgid "Add to Group"
-msgstr ""
+msgstr "Pridať do Skupiny"
#: editor/groups_editor.cpp
msgid "Remove from Group"
-msgstr ""
+msgstr "Vymazať zo Skupiny"
#: editor/groups_editor.cpp
msgid "Group name already exists."
-msgstr ""
+msgstr "Meno skupiny už existuje."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Invalid group name."
-msgstr "Nesprávna veľkosť písma."
+msgstr "Neplatné meno skupiny."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Rename Group"
-msgstr "Všetky vybrané"
+msgstr "Premenovať Skupinu"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Delete Group"
-msgstr "Všetky vybrané"
+msgstr "Zmazať Skupinu"
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
-msgstr ""
+msgstr "Skupiny"
#: editor/groups_editor.cpp
msgid "Nodes Not in Group"
-msgstr ""
+msgstr "Node-y Nie sú v Skupine"
#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Filter nodes"
-msgstr "Filter:"
+msgstr "Filter Node-y"
#: editor/groups_editor.cpp
msgid "Nodes in Group"
-msgstr ""
+msgstr "Node-y v Skupine"
#: editor/groups_editor.cpp
msgid "Empty groups will be automatically removed."
-msgstr ""
+msgstr "Prázdne Skupiny budú automaticky zmazané."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group Editor"
-msgstr "Otvorit priečinok"
+msgstr "Editor Skupín"
#: editor/groups_editor.cpp
msgid "Manage Groups"
-msgstr ""
+msgstr "Spravovať Skupiny"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
-msgstr ""
+msgstr "Importovať ako Samostatnú Scénu"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Animations"
-msgstr ""
+msgstr "Importovať z Oddelenými Animáciami"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
-msgstr ""
+msgstr "Importovať z Oddelenými Materiálmi"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects"
-msgstr ""
+msgstr "Importovať z Oddelenými Objektami"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials"
-msgstr ""
+msgstr "Importovať z Oddelenými Objektami+Materiálmi"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Animations"
-msgstr ""
+msgstr "Importovať z Oddelenými Objektami+Animáciami"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials+Animations"
-msgstr ""
+msgstr "Importovať z Oddelenými Materiálmi+Animáciami"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials+Animations"
-msgstr ""
+msgstr "Importovať z Oddelenými Objektami+Materiálmi+Animáciami"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
-msgstr ""
+msgstr "Importovať ako Dvojité Scény"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes+Materials"
-msgstr ""
+msgstr "Importovať ako Dvojité Scény+Materiály"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Import Scene"
-msgstr ""
+msgstr "Importovať Scénu"
#: editor/import/resource_importer_scene.cpp
msgid "Importing Scene..."
-msgstr ""
+msgstr "Importujem Scénu..."
#: editor/import/resource_importer_scene.cpp
msgid "Generating Lightmaps"
-msgstr ""
+msgstr "Generovanie Lightmaps"
#: editor/import/resource_importer_scene.cpp
msgid "Generating for Mesh: "
-msgstr ""
+msgstr "Generovanie pre Mesh: "
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
-msgstr ""
+msgstr "Spustiť Vlastný Script..."
#: editor/import/resource_importer_scene.cpp
msgid "Couldn't load post-import script:"
-msgstr ""
+msgstr "Nepodarilo sa načítať post-import script:"
#: editor/import/resource_importer_scene.cpp
msgid "Invalid/broken script for post-import (check console):"
-msgstr ""
+msgstr "Neplatný/rozbitý script pre post-import (prezrite konzolu):"
#: editor/import/resource_importer_scene.cpp
msgid "Error running post-import script:"
-msgstr ""
+msgstr "Chyba pri spustení post-import scriptu:"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr "Vrátili ste Node-derived objekt v `post_import()` metóde?"
#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
-msgstr ""
+msgstr "Ukladám..."
#: editor/import_dock.cpp
-#, fuzzy
msgid "%d Files"
-msgstr "Súbor:"
+msgstr "%d Súbory"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr ""
+msgstr "Nastaviť ako Štandardné pre '%s'"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr ""
+msgstr "Vyčistiť Štandardné pre '%s'"
#: editor/import_dock.cpp
msgid "Import As:"
-msgstr ""
+msgstr "Importovať Ako:"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Preset"
-msgstr "Načítať predvolené"
+msgstr "Preset"
#: editor/import_dock.cpp
msgid "Reimport"
-msgstr ""
+msgstr "Reimportovať"
#: editor/import_dock.cpp
msgid "Save Scenes, Re-Import, and Restart"
-msgstr ""
+msgstr "Uložiť Scény, Re-Importovať, a Reštartovať"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
-msgstr ""
+msgstr "Mení sa typ impotovaného súboru, treba reštartovať editor."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"VAROVANIE: Položky ktoré existujú v tomto prostriedku, Sa nemusia načitať "
+"správne."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
-msgstr ""
+msgstr "Nepodarilo sa načítať prostriedok."
#: editor/inspector_dock.cpp
msgid "Expand All Properties"
-msgstr ""
+msgstr "Expandovať Všetky Vlastnosti"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Collapse All Properties"
-msgstr "Filter:"
+msgstr "Collapsovať Všetky Vlastnosti"
#: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
msgid "Save As..."
-msgstr ""
+msgstr "Uložiť Ako..."
#: editor/inspector_dock.cpp
msgid "Copy Params"
-msgstr ""
+msgstr "Skopírovať Parametre"
#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
-msgstr ""
+msgstr "Editovať Clipboard Prostriedku"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
-msgstr ""
+msgstr "Skopírovať Prostriedok"
#: editor/inspector_dock.cpp
msgid "Make Built-In"
-msgstr ""
+msgstr "Spraviť Built-In"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
-msgstr ""
+msgstr "Spraviť Sub-Prostriedky Unikátne"
#: editor/inspector_dock.cpp
msgid "Open in Help"
-msgstr ""
+msgstr "Otvoriť v Pomoci"
#: editor/inspector_dock.cpp
msgid "Create a new resource in memory and edit it."
-msgstr ""
+msgstr "Vytvoriť nový prostriedok v pamäti a upraviť ho."
#: editor/inspector_dock.cpp
msgid "Load an existing resource from disk and edit it."
-msgstr ""
+msgstr "Načítať existujúci prostriedok z disku a upraviť ho."
#: editor/inspector_dock.cpp
msgid "Save the currently edited resource."
-msgstr ""
+msgstr "Uložiť aktuálne upravený prostriedok."
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
-msgstr ""
+msgstr "Ísť do histórie predchádzajúceho upravovaného objekta."
#: editor/inspector_dock.cpp
msgid "Go to the next edited object in history."
-msgstr ""
+msgstr "Ísť do ďalšej histórie upraveného objekta."
#: editor/inspector_dock.cpp
msgid "History of recently edited objects."
-msgstr ""
+msgstr "História upravených objektov."
#: editor/inspector_dock.cpp
msgid "Object properties."
-msgstr ""
+msgstr "Vlastnosti Objekta."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Filter properties"
-msgstr "Filter:"
+msgstr "Vlastnosti Filtra"
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
-msgstr ""
+msgstr "Zmeny môžu byť stratené!"
#: editor/multi_node_edit.cpp
msgid "MultiNode Set"
-msgstr ""
+msgstr "MultiNode Set"
#: editor/node_dock.cpp
msgid "Select a single node to edit its signals and groups."
-msgstr ""
+msgstr "Vyberte jeden node aby ste mohli upraviť jeho signály a skupiny."
#: editor/plugin_config_dialog.cpp
msgid "Edit a Plugin"
-msgstr ""
+msgstr "Upraviť Plugin"
#: editor/plugin_config_dialog.cpp
-#, fuzzy
msgid "Create a Plugin"
-msgstr "Vytvoriť adresár"
+msgstr "Vytvoriť Plugin"
#: editor/plugin_config_dialog.cpp
msgid "Plugin Name:"
-msgstr ""
+msgstr "Meno Pluginu:"
#: editor/plugin_config_dialog.cpp
msgid "Subfolder:"
-msgstr ""
+msgstr "Subfolder:"
#: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp
msgid "Language:"
-msgstr ""
+msgstr "Jazyk:"
#: editor/plugin_config_dialog.cpp
msgid "Script Name:"
-msgstr ""
+msgstr "Meno Skriptu:"
#: editor/plugin_config_dialog.cpp
msgid "Activate now?"
-msgstr ""
+msgstr "Aktivovať teraz?"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon"
-msgstr "Vytvoriť adresár"
+msgstr "Vytvoriť Polygon"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Create points."
-msgstr "Všetky vybrané"
+msgstr "Vytvoriť body."
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid ""
@@ -4138,30 +4120,30 @@ msgid ""
"LMB: Move Point\n"
"RMB: Erase Point"
msgstr ""
+"Upraviť body.\n"
+"LMB: Presunúť Bod\n"
+"RMB: Zmazať Bod"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
-#, fuzzy
msgid "Erase points."
-msgstr "Všetky vybrané"
+msgstr "Zmazať body."
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Edit Polygon"
-msgstr "Signály:"
+msgstr "Upraviť Polygon"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Insert Point"
-msgstr ""
+msgstr "Vložiť Bod"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Edit Polygon (Remove Point)"
-msgstr ""
+msgstr "Upraviť Polygon (Zmazať Bod)"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Remove Polygon And Point"
-msgstr "Všetky vybrané"
+msgstr "Zmazať Polygon A Bod"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4169,55 +4151,51 @@ msgstr "Všetky vybrané"
#: editor/plugins/animation_state_machine_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Animation"
-msgstr ""
+msgstr "Pridať Animáciu"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Load..."
-msgstr ""
+msgstr "Načítať..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Move Node Point"
-msgstr "Všetky vybrané"
+msgstr "Presunúť Bod Node-u"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Change BlendSpace1D Limits"
-msgstr ""
+msgstr "Zmeniť BlendSpace1D Limity"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Change BlendSpace1D Labels"
-msgstr ""
+msgstr "Zmeniť BlendSpace1D Označenia"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
-msgstr ""
+msgstr "Tento typ node-u nemôže byť použitý. Iba ak povolíte root node-y."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Node Point"
-msgstr "Signály:"
+msgstr "Pridať Bod Node-u"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Animation Point"
-msgstr "Popis:"
+msgstr "Pridať Bod Animácie"
#: editor/plugins/animation_blend_space_1d_editor.cpp
-#, fuzzy
msgid "Remove BlendSpace1D Point"
-msgstr "Všetky vybrané"
+msgstr "Zmazať BlendSpace1D Bod"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Move BlendSpace1D Node Point"
-msgstr ""
+msgstr "Presunúť BlendSpace1D Node Bod"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4227,49 +4205,50 @@ msgid ""
"AnimationTree is inactive.\n"
"Activate to enable playback, check node warnings if activation fails."
msgstr ""
+"StromAnimácie je neaktívny.\n"
+"Aktivujte aby ste povolili playback, zaškrtnite node warnings ak aktívacia "
+"nepôjde."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Set the blending position within the space"
-msgstr ""
+msgstr "Nastaviť pozíciu blending v priestore"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Select and move points, create points with RMB."
-msgstr ""
+msgstr "Vyberte a premiestnite body, vytvorte body z RMB."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
msgid "Enable snap and show grid."
-msgstr ""
+msgstr "Povoliť snap a show grid."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Point"
-msgstr ""
+msgstr "Bod"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Open Editor"
-msgstr "Otvorit priečinok"
+msgstr "Otvorit Editor"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Open Animation Node"
-msgstr ""
+msgstr "Otvoriť Node Animácie"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Triangle already exists."
-msgstr ""
+msgstr "Trojuholník už existuje."
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Triangle"
-msgstr "Signály:"
+msgstr "Pridať Trojuholník"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Change BlendSpace2D Limits"
@@ -6942,11 +6921,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7429,6 +7408,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10463,7 +10451,7 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
-msgid "Clear Script"
+msgid "Detach Script"
msgstr "Popis:"
#: editor/scene_tree_dock.cpp
@@ -10627,6 +10615,13 @@ msgid "Open Documentation"
msgstr "Popis:"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10675,11 +10670,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10805,6 +10800,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Súbor neexistuje."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Nesprávna veľkosť písma."
@@ -10847,6 +10846,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Neplatná cesta."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid class name."
msgstr "Neplatný Názov."
@@ -11920,6 +11923,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11944,6 +11951,32 @@ msgstr "Nesprávna veľkosť písma."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12610,6 +12643,22 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "Nieje v resource path."
+
+#~ msgid "Revert"
+#~ msgstr "Revert"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Túto akciu nie je možné vrátiť späť. Chcete Revertovatť aj tak?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Vrátiť Scénu"
+
+#, fuzzy
+#~ msgid "Clear Script"
+#~ msgstr "Popis:"
+
#, fuzzy
#~ msgid "Brief Description"
#~ msgstr "Popis:"
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index a4a668f76b..faec304f67 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -886,7 +886,6 @@ msgstr "Povezovanje Signala:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1523,18 +1522,9 @@ msgstr "Omogoči"
msgid "Rearrange Autoloads"
msgstr "Preuredi SamodejnoNalaganje"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Neveljavna Pot."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Datoteka ne obstaja."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Ni na poti virov."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2538,12 +2528,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Ni mogoče osvežiti scene, ki ni bila shranjena."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Povrni"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Shrani Prizor"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Tega dejanja ni mogoče razveljaviti. Vseeno povrni?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2840,10 +2833,6 @@ msgid "Redo"
msgstr "Ponovi"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Povrni Prizor"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Različna projektna ali prizorska orodja."
@@ -3498,6 +3487,10 @@ msgstr "Ni mogoče zagnati skripte:"
msgid "Did you forget the '_run' method?"
msgstr "Ali si pozabil metodo '_run' ?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Izberi Gradnik(e) za Uvoz"
@@ -4130,6 +4123,10 @@ msgid "Error running post-import script:"
msgstr "Napaka pri zagonu skripte po uvozu:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Shranjevanje..."
@@ -7211,15 +7208,15 @@ msgid ""
msgstr "Odklopite '%s' iz '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Vrstica:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Dodaj Funkcijo"
@@ -7704,6 +7701,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "Pripni na mrežo"
@@ -10790,8 +10796,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Odstrani Gradnik VizualnaSkripta"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10957,6 +10964,13 @@ msgid "Open Documentation"
msgstr "Odpri Nedavne"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -11007,12 +11021,14 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr ""
+"Naredi primer iz izbranih prizorov, ki bo naslednik izbranega gradnika."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -11141,6 +11157,10 @@ msgid "A directory with the same name exists."
msgstr "Datoteka ali mapa s tem imenom že obstaja."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Datoteka ne obstaja."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Uporabiti moraš valjavno razširitev."
@@ -11185,6 +11205,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Neveljavna Pot."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Neveljavno ime."
@@ -12273,6 +12298,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12297,6 +12326,32 @@ msgstr "Neveljavno ime."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12979,6 +13034,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Konstante ni možno spreminjati."
+#~ msgid "Not in resource path."
+#~ msgstr "Ni na poti virov."
+
+#~ msgid "Revert"
+#~ msgstr "Povrni"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Tega dejanja ni mogoče razveljaviti. Vseeno povrni?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Povrni Prizor"
+
#~ msgid "Issue Tracker"
#~ msgstr "Sledilnik Napak"
@@ -13179,10 +13246,6 @@ msgstr "Konstante ni možno spreminjati."
#~ msgid "Edit Variable:"
#~ msgstr "Uredi Spremenljivko:"
-#~ msgid "Instance the selected scene(s) as child of the selected node."
-#~ msgstr ""
-#~ "Naredi primer iz izbranih prizorov, ki bo naslednik izbranega gradnika."
-
#~ msgid "Line:"
#~ msgstr "Vrstica:"
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index f24645059a..5bcf15eb82 100644
--- a/editor/translations/sq.po
+++ b/editor/translations/sq.po
@@ -829,7 +829,6 @@ msgstr "Lidh Sinjalin: "
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1460,18 +1459,9 @@ msgstr "Lejo"
msgid "Rearrange Autoloads"
msgstr "Riorganizo Autoload-et"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Rruga e pasaktë."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Skedari nuk egziston."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Jo në rrugën e resurseve."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2468,12 +2458,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Nuk mund të ringarkojë një skenë që nuk është ruajtur më parë."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Rikthe"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Ruaj Skenën"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Ky veprim nuk mund të çbëhet. Rikthe gjithsesi?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2768,10 +2761,6 @@ msgid "Redo"
msgstr "Ribëj"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Rikthe Skenën"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Vegla të ndryshme për projektin ose skenën."
@@ -3424,6 +3413,10 @@ msgstr "Nuk mund të ekzekutonte shkrimin:"
msgid "Did you forget the '_run' method?"
msgstr "A mos harrove metodën '_run'?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Zgjidh Nyjet Për ti Importuar"
@@ -4041,6 +4034,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Duke Ruajtur..."
@@ -6967,11 +6964,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7448,6 +7445,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10425,8 +10431,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Shkrim i Ri"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10587,6 +10594,13 @@ msgid "Open Documentation"
msgstr "Hap të Fundit"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10636,11 +10650,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10767,6 +10781,10 @@ msgid "A directory with the same name exists."
msgstr "Një skedar ose folder me këtë emër ekziston që më parë."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Skedari nuk egziston."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Duhet të perdorësh një shtesë të lejuar."
@@ -10810,6 +10828,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Rruga e pasaktë."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Emër i palejuar."
@@ -11868,6 +11891,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11891,6 +11918,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12533,6 +12586,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "Jo në rrugën e resurseve."
+
+#~ msgid "Revert"
+#~ msgstr "Rikthe"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Ky veprim nuk mund të çbëhet. Rikthe gjithsesi?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Rikthe Skenën"
+
#~ msgid "Issue Tracker"
#~ msgstr "Gjurmuesi i Problemeve"
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index 52639bbeeb..4e7064f00c 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -4,12 +4,13 @@
# This file is distributed under the same license as the Godot source code.
#
# Александар Урошевић <nicecubedude@gmail.com>, 2017.
-#
+# Младен Габић <cupakabra@protonmail.com>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-12-14 23:08+0000\n"
-"Last-Translator: Александар Урошевић <alek.sandar0@yandex.com>\n"
+"PO-Revision-Date: 2020-05-22 21:01+0000\n"
+"Last-Translator: Младен Габић <cupakabra@protonmail.com>\n"
"Language-Team: Serbian (cyrillic) <https://hosted.weblate.org/projects/godot-"
"engine/godot/sr_Cyrl/>\n"
"Language: sr_Cyrl\n"
@@ -17,79 +18,78 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 2.18-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr ""
+msgstr "Погрешан тип аргумента за функију convert(), користи TYPE_* константе."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "Очекиван стринг дужине 1 (карактер)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr ""
+msgstr "Недовољно бајтова за дешифровање бајтова, или неважећи формат."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr ""
+msgstr "Неважећи унос %i (није прошао) у изразу"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
+msgstr "self не може бити примењен јер је инстанца нула(није прошао)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr ""
+msgstr "Неважећи поступци оператора %s, %s и %s."
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
-msgstr ""
+msgstr "Неважећи индекс врсте %s за основну врсту %s"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr ""
+msgstr "Неважећи именовани индекс '%s' за основну врсту %s"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr ""
+msgstr "Неважећи аргументи ка конструкту '%s'"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr ""
+msgstr "На позиву за '%s':"
#: core/ustring.cpp
msgid "B"
-msgstr ""
+msgstr "Б"
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "КиБ"
#: core/ustring.cpp
-#, fuzzy
msgid "MiB"
-msgstr "Микс"
+msgstr "МиБ"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "ГиБ"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "ТиБ"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "ПиБ"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "ЕиБ"
#: editor/animation_bezier_editor.cpp
msgid "Free"
@@ -97,12 +97,12 @@ msgstr "Слободно"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr ""
+msgstr "Балансирано"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Mirror"
-msgstr "Огледало X осе"
+msgstr "Огледало"
#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
msgid "Time:"
@@ -111,32 +111,30 @@ msgstr "Време:"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Value:"
-msgstr "Ново име:"
+msgstr "Вредност:"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Insert Key Here"
-msgstr "Убаци кључеве"
+msgstr "Убаци кључ"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Duplicate Selected Key(s)"
-msgstr "Дуплирај одабрано"
+msgstr "Дуплирај одабрани Кључ/еве"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Delete Selected Key(s)"
-msgstr "Обриши одабране датотеке?"
+msgstr "Обриши одабрани Кључ/еве"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Add Bezier Point"
-msgstr "Додај тачку"
+msgstr "Додај Безиер Тачку"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Move Bezier Points"
-msgstr "Помери тачку"
+msgstr "Помери Безиер Тачку"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
@@ -149,7 +147,7 @@ msgstr "Уколни кључеве"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Anim Change Keyframe Time"
-msgstr "Промени вредност"
+msgstr "Промени време КључОквира"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
@@ -204,25 +202,29 @@ msgid "Change Animation Loop"
msgstr "Промени циклус анимације"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Property Track"
-msgstr ""
+msgstr "Особине Трака"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "3D Transform Track"
-msgstr "Тип трансформације"
+msgstr "3Д Трака Трансформа"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Call Method Track"
-msgstr ""
+msgstr "Метод Позива Трака"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Bezier Curve Track"
-msgstr ""
+msgstr "Безиер Крива Трака"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Audio Playback Track"
-msgstr ""
+msgstr "Аудио Репродукција Трака"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -251,8 +253,9 @@ msgstr "Скала анимације."
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Functions:"
-msgstr ""
+msgstr "Функције:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -261,7 +264,7 @@ msgstr "Звучни слушалац"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
-msgstr ""
+msgstr "Аним Клипови:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -274,8 +277,9 @@ msgid "Toggle this track on/off."
msgstr "Укљ./Искљ. режим без сметње."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Режим ажурирања (Како је постављена ова особина)"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -283,8 +287,9 @@ msgid "Interpolation Mode"
msgstr "Анимациони чвор"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr ""
+msgstr "Круг Увијени Режим( Интерполирај крај са почетком на кругу)"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -319,8 +324,9 @@ msgid "Capture"
msgstr "Карактеристике"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Nearest"
-msgstr ""
+msgstr "Најближи"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
@@ -328,16 +334,19 @@ msgid "Linear"
msgstr "Линеаран"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Cubic"
-msgstr ""
+msgstr "Кубни"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Clamp Loop Interp"
-msgstr ""
+msgstr "Притегнут Круг Интерп"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Wrap Loop Interp"
-msgstr ""
+msgstr "Увијен Круг Интерп"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -398,8 +407,9 @@ msgid "Anim Insert"
msgstr "Налепи"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "AnimationPlayer can't animate itself, only other players."
-msgstr ""
+msgstr "AnimationPlayer не може сам себе да анимира, само друге плејере."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -425,31 +435,40 @@ msgstr "Преуреди аутоматска учитавања"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr ""
+msgstr "Трансформа траке само важи за Просторно-базиране нодове."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid ""
"Audio tracks can only point to nodes of type:\n"
"-AudioStreamPlayer\n"
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"Аудио траке могу само усмеравати ка нодовима врсте:\n"
+"-AudioStreamPlayer\n"
+"-AudioStreamPlayer2D\n"
+"-AudioStreamPlayer3D"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr ""
+msgstr "Анимационе траке могу само усмеравати ка AnimationPlayer нодовима"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "An animation player can't animate itself, only other players."
-msgstr ""
+msgstr "Анимациони плејер не може анимирати самог себе, само друге плејере."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Not possible to add a new track without a root"
-msgstr ""
+msgstr "Није могуже додати нову траку без корена"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Invalid track for Bezier (no suitable sub-properties)"
-msgstr ""
+msgstr "Неважећа трака за Безиер ( нема прикладних под-особина)"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -457,12 +476,14 @@ msgid "Add Bezier Track"
msgstr "Додај нову траку"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track path is invalid, so can't add a key."
-msgstr ""
+msgstr "Путања траке је неважећа, па је кључ немогуће додати."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
+msgstr "Трака није врсте Просторна, немогуће убацити кључ."
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -475,8 +496,9 @@ msgid "Add Track Key"
msgstr "Додај нову траку"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track path is invalid, so can't add a method key."
-msgstr ""
+msgstr "Трака путање је неважећа, немогуће додати кључ методе."
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -484,8 +506,9 @@ msgid "Add Method Track Key"
msgstr "Уметни траку и кључ"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
-msgstr ""
+msgstr "Метода није нађена у објекту:"
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -506,11 +529,13 @@ msgid "Anim Scale Keys"
msgstr "Увећај кључеве"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
-msgstr ""
+msgstr "Ова операција не ради за Безиер уређивање, пошто је само једна трака."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid ""
"This animation belongs to an imported scene, so changes to imported tracks "
"will not be saved.\n"
@@ -522,10 +547,20 @@ msgid ""
"Alternatively, use an import preset that imports animations to separate "
"files."
msgstr ""
+"Ова анимација припада увезеној сцени, па промене на увезеној траци неће бити "
+"сачуване.\n"
+"\n"
+"Да омогућиш способност додавања прилагођених трака, упути се ка увозним "
+"подешавањима сцене и постави\n"
+"\"Анимација > Складиште\" у \"Фајлови\", омогући \"Анимација > Сачувај "
+"прилагођене траке\", онда поново увези.\n"
+"Алтернативно, користи увозна подешавања која увозе анимације у засебне "
+"фајлове."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Warning: Editing imported animation"
-msgstr ""
+msgstr "Упозорење: Уређивање увезене анимације"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -533,12 +568,14 @@ msgid "Select an AnimationPlayer node to create and edit animations."
msgstr "Одабери AnimationPlayer из дрвета сцене за уређивање анимација."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Only show tracks from nodes selected in tree."
-msgstr ""
+msgstr "Прикажи само траке из нодова одабраних у стаблу"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Group tracks by node or display them as plain list."
-msgstr ""
+msgstr "Групиши траке по нодовима или их прикажи као чист текст."
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -551,8 +588,9 @@ msgid "Animation step value."
msgstr "Анимационо дрво је важеће."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Seconds"
-msgstr ""
+msgstr "Секунди"
#: editor/animation_track_editor.cpp
msgid "FPS"
@@ -618,12 +656,14 @@ msgid "Clean-Up Animation"
msgstr "Очистите анимацију"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Pick the node that will be animated:"
-msgstr ""
+msgstr "Одабери нод који ће бити анимиран:"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Use Bezier Curves"
-msgstr ""
+msgstr "Користи Безиер Криве"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -694,12 +734,14 @@ msgid "Add Audio Track Clip"
msgstr "Звучни слушалац"
#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
msgid "Change Audio Track Clip Start Offset"
-msgstr ""
+msgstr "Промени Размак Аудио Траке од Почетка"
#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
msgid "Change Audio Track Clip End Offset"
-msgstr ""
+msgstr "Промени Размак Аудио Траке од Краја"
#: editor/array_property_edit.cpp
msgid "Resize Array"
@@ -727,13 +769,14 @@ msgid "%d replaced."
msgstr "Замени..."
#: editor/code_editor.cpp editor/editor_help.cpp
+#, fuzzy
msgid "%d match."
-msgstr ""
+msgstr "%d подударања."
#: editor/code_editor.cpp editor/editor_help.cpp
#, fuzzy
msgid "%d matches."
-msgstr "Нема подудара"
+msgstr "Нема подударања."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
@@ -757,8 +800,9 @@ msgstr "Само одабрано"
#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/text_editor.cpp
+#, fuzzy
msgid "Standard"
-msgstr ""
+msgstr "Стандард"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
@@ -781,12 +825,14 @@ msgid "Reset Zoom"
msgstr "Ресетуј увеличање"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Warnings"
-msgstr ""
+msgstr "Упозорење"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Line and column numbers."
-msgstr ""
+msgstr "Линија и колона бројева."
#: editor/connections_dialog.cpp
#, fuzzy
@@ -862,17 +908,19 @@ msgid "Deferred"
msgstr "Одложен"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid ""
"Defers the signal, storing it in a queue and only firing it at idle time."
-msgstr ""
+msgstr "Одлаже сигнал, памти га у ред и пали га само за време чекања."
#: editor/connections_dialog.cpp
msgid "Oneshot"
msgstr "Једном"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Disconnects the signal after its first emission."
-msgstr ""
+msgstr "Одкачиње сигнал после првог емитовања."
#: editor/connections_dialog.cpp
#, fuzzy
@@ -883,7 +931,6 @@ msgstr "Везујући сигнал:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -937,16 +984,18 @@ msgid "Edit Connection:"
msgstr "Повезивање не успешно"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
-msgstr ""
+msgstr "Сигурно желиш да уклониш све везе са \"%s\" сигналом?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
msgstr "Сигнали"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Are you sure you want to remove all connections from this signal?"
-msgstr ""
+msgstr "Сугурно желиш да уклониш све везе са овог сигнала?"
#: editor/connections_dialog.cpp
#, fuzzy
@@ -969,8 +1018,9 @@ msgid "Change %s Type"
msgstr "Измени уобичајен тип"
#: editor/create_dialog.cpp editor/project_settings_editor.cpp
+#, fuzzy
msgid "Change"
-msgstr ""
+msgstr "Промени"
#: editor/create_dialog.cpp
#, fuzzy
@@ -1263,8 +1313,9 @@ msgid "Uncompressing Assets"
msgstr "Декомпресија средства"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+#, fuzzy
msgid "The following files failed extraction from package:"
-msgstr ""
+msgstr "Неуспело извлачење следећих фалова из паковања:"
#: editor/editor_asset_installer.cpp
#, fuzzy
@@ -1374,8 +1425,9 @@ msgid "Delete Effect"
msgstr "Обриши ефекат"
#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "Audio"
-msgstr ""
+msgstr "Аудио"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus"
@@ -1414,8 +1466,9 @@ msgid "Open Audio Bus Layout"
msgstr "Отвори распоред звучног баса"
#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "There is no '%s' file."
-msgstr ""
+msgstr "Нема '%s' фајла."
#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
msgid "Layout"
@@ -1493,8 +1546,9 @@ msgid "Must not collide with an existing global constant name."
msgstr "Неважеће име. Име је резервисано за постојећу глобалну константу."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Keyword cannot be used as an autoload name."
-msgstr ""
+msgstr "Кључна реч не може бити употребљена као ауто-учитавајуће име"
#: editor/editor_autoload_settings.cpp
msgid "Autoload '%s' already exists!"
@@ -1524,18 +1578,9 @@ msgstr "Укључи"
msgid "Rearrange Autoloads"
msgstr "Преуреди аутоматска учитавања"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Неважећи пут."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Датотека не постоји."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Није на пут ресурса."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1584,8 +1629,9 @@ msgid "[empty]"
msgstr "(празно)"
#: editor/editor_data.cpp
+#, fuzzy
msgid "[unsaved]"
-msgstr ""
+msgstr "[несачувано]"
#: editor/editor_dir_dialog.cpp
#, fuzzy
@@ -1623,32 +1669,44 @@ msgid "Storing File:"
msgstr "Складиштење датотеке:"
#: editor/editor_export.cpp
+#, fuzzy
msgid "No export template found at the expected path:"
-msgstr ""
+msgstr "Извозни образац није нађен на очекиваној путањи:"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "Паковање"
#: editor/editor_export.cpp
+#, fuzzy
msgid ""
"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
"Etc' in Project Settings."
msgstr ""
+"Циљана платформа захтева 'ETC' компресију текстуре за GLES2. Омогући 'Увоз "
+"Etc' у подешавањима пројекта."
#: editor/editor_export.cpp
+#, fuzzy
msgid ""
"Target platform requires 'ETC2' texture compression for GLES3. Enable "
"'Import Etc 2' in Project Settings."
msgstr ""
+"Циљана платформа захтева 'ETC2 компресију текстуре за GLES3. Омогући 'Увоз "
+"Etc 2' у подешавањима пројекта."
#: editor/editor_export.cpp
+#, fuzzy
msgid ""
"Target platform requires 'ETC' texture compression for the driver fallback "
"to GLES2.\n"
"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
"Enabled'."
msgstr ""
+"Циљана платформа захтева 'ETC' компресију текстуре за повратак управљача "
+"GLES2.\n"
+"Омогући 'Увоз Etc' у подешавањима пројекта, или онемогући 'Поваратак "
+"Управљача Омогућен'."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -1660,8 +1718,9 @@ msgstr "Шаблонска датотека није пронађена:\n"
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
+#, fuzzy
msgid "Custom release template not found."
-msgstr ""
+msgstr "Прилагођени образци објаве нису пронађени."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
#, fuzzy
@@ -1669,8 +1728,9 @@ msgid "Template file not found:"
msgstr "Шаблонска датотека није пронађена:\n"
#: editor/editor_export.cpp
+#, fuzzy
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
-msgstr ""
+msgstr "На 32-битним извозима уграђени PCK не може бити већи од 4 GiB."
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1688,8 +1748,9 @@ msgid "Asset Library"
msgstr "Отвори библиотеку средства"
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "Scene Tree Editing"
-msgstr ""
+msgstr "Едитовање Стабла Сцене"
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1712,8 +1773,9 @@ msgid "Erase profile '%s'? (no undo)"
msgstr "Замени све"
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "Profile must be a valid filename and must not contain '.'"
-msgstr ""
+msgstr "Профил мора имати важеће име фајла и не сме садржати '.'"
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1721,8 +1783,9 @@ msgid "Profile with this name already exists."
msgstr "Датотека или директоријум са овим именом већ постоји."
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "(Editor Disabled, Properties Disabled)"
-msgstr ""
+msgstr "(Уређивач Онемогућен, Својства Омогућена)"
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1760,14 +1823,16 @@ msgid "Enabled Classes:"
msgstr "Потражи класе"
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "File '%s' format is invalid, import aborted."
-msgstr ""
+msgstr "Фајл '%s' формат је неважећи, увоз отказан."
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid ""
"Profile '%s' already exists. Remove it first before importing, import "
"aborted."
-msgstr ""
+msgstr "Профил '%s' већ постоји. Уклони га пре увоза, увоз отказан."
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1775,8 +1840,9 @@ msgid "Error saving profile to path: '%s'."
msgstr "Грешка при чувању TileSet!"
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "Unset"
-msgstr ""
+msgstr "Поништи"
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -2014,10 +2080,13 @@ msgid "ScanSources"
msgstr "Скенирање извора"
#: editor/editor_file_system.cpp
+#, fuzzy
msgid ""
"There are multiple importers for different types pointing to file %s, import "
"aborted"
msgstr ""
+"Постоји више увозника за различите врсте који показују на фајл %s, увоз "
+"отказан"
#: editor/editor_file_system.cpp
msgid "(Re)Importing Assets"
@@ -2055,8 +2124,9 @@ msgid "Properties"
msgstr "Особине"
#: editor/editor_help.cpp
+#, fuzzy
msgid "override:"
-msgstr ""
+msgstr "препиши"
#: editor/editor_help.cpp
#, fuzzy
@@ -2195,16 +2265,19 @@ msgid "Theme Property"
msgstr "Особине"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
+#, fuzzy
msgid "Property:"
-msgstr ""
+msgstr "Особина:"
#: editor/editor_inspector.cpp
+#, fuzzy
msgid "Set"
-msgstr ""
+msgstr "Постави"
#: editor/editor_inspector.cpp
+#, fuzzy
msgid "Set Multiple:"
-msgstr ""
+msgstr "Постави Више:"
#: editor/editor_log.cpp
msgid "Output:"
@@ -2242,8 +2315,9 @@ msgid "Start"
msgstr "Започни!"
#: editor/editor_network_profiler.cpp
+#, fuzzy
msgid "%s/s"
-msgstr ""
+msgstr "%s/s"
#: editor/editor_network_profiler.cpp
#, fuzzy
@@ -2251,51 +2325,62 @@ msgid "Down"
msgstr "Преучми"
#: editor/editor_network_profiler.cpp
+#, fuzzy
msgid "Up"
-msgstr ""
+msgstr "Горе"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
msgid "Node"
msgstr "Чвор"
#: editor/editor_network_profiler.cpp
+#, fuzzy
msgid "Incoming RPC"
-msgstr ""
+msgstr "Долазећи RPC"
#: editor/editor_network_profiler.cpp
+#, fuzzy
msgid "Incoming RSET"
-msgstr ""
+msgstr "Долазећи RSET"
#: editor/editor_network_profiler.cpp
+#, fuzzy
msgid "Outgoing RPC"
-msgstr ""
+msgstr "Одлазећи RPC"
#: editor/editor_network_profiler.cpp
+#, fuzzy
msgid "Outgoing RSET"
-msgstr ""
+msgstr "Одлазећи RSET"
#: editor/editor_node.cpp editor/project_manager.cpp
+#, fuzzy
msgid "New Window"
-msgstr ""
+msgstr "Нов Прозор"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Imported resources can't be saved."
-msgstr ""
+msgstr "Увезени ресурси не могу бити упамћени."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
+#, fuzzy
msgid "OK"
-msgstr ""
+msgstr "ОК"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Error saving resource!"
msgstr "Грешка при чувању ресурса!"
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This resource can't be saved because it does not belong to the edited scene. "
"Make it unique first."
msgstr ""
+"Овај ресурс не може бити упамћен пошто не припада едитованој сцени. Прво га "
+"учини јединственим."
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
@@ -2314,8 +2399,9 @@ msgid "Error while saving."
msgstr "Грешка при чувању."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr ""
+msgstr "Неуспело отварање '%s'. Фајл је можда померен или обрисан."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
@@ -2350,10 +2436,13 @@ msgid "This operation can't be done without a tree root."
msgstr "Ова операција се не може обавити без корена дрвета."
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
+"Ова сцена не може бити упамћена зато што има укључење кружног инстанцирања\n"
+"Прво га отклони и онда поново пробај да упамтиш."
#: editor/editor_node.cpp
#, fuzzy
@@ -2363,8 +2452,9 @@ msgid ""
msgstr "Не могу сачувати сцену. Вероватно зависности нису задовољене."
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can't overwrite scene that is still open!"
-msgstr ""
+msgstr "Немогуће преписивање сцене која је и даље отворена!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
@@ -2496,8 +2586,9 @@ msgid "Saved %s modified resource(s)."
msgstr "Грешка при учитавању ресурса."
#: editor/editor_node.cpp
+#, fuzzy
msgid "A root node is required to save the scene."
-msgstr ""
+msgstr "За памћене сцене неопходан је корени нод."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2544,12 +2635,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Не могу поново учитати сцену која није сачувана."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Врати"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Сачувај сцену"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Ова акција се не може опозвати. Настави?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2728,8 +2822,9 @@ msgid "Close Other Tabs"
msgstr "Затвори остале зупчанике"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Close Tabs to the Right"
-msgstr ""
+msgstr "Затвори Табове са Десна"
#: editor/editor_node.cpp
#, fuzzy
@@ -2845,10 +2940,6 @@ msgid "Redo"
msgstr "Поново уради"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Поврати сцену"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Разни алати за пројекат или сцену."
@@ -2868,12 +2959,14 @@ msgid "Version Control"
msgstr "Верзија:"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "Set Up Version Control"
-msgstr ""
+msgstr "Постави Контролу Верзије"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Shut Down Version Control"
-msgstr ""
+msgstr "Угаси Контролу Верзије"
#: editor/editor_node.cpp
#, fuzzy
@@ -2881,8 +2974,9 @@ msgid "Export..."
msgstr "Извоз"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Install Android Build Template..."
-msgstr ""
+msgstr "Инсталирај Android образце градње"
#: editor/editor_node.cpp
#, fuzzy
@@ -3032,8 +3126,9 @@ msgid "Open Editor Data/Settings Folder"
msgstr "Поставке уредника"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open Editor Data Folder"
-msgstr ""
+msgstr "Отвори Фолдер Уређивача Података"
#: editor/editor_node.cpp
#, fuzzy
@@ -3078,8 +3173,9 @@ msgid "Report a Bug"
msgstr "Поново увези"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Send Docs Feedback"
-msgstr ""
+msgstr "Пошаљи Подржку о Документацији"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
@@ -3087,7 +3183,7 @@ msgstr "Заједница"
#: editor/editor_node.cpp
msgid "About"
-msgstr "О програму"
+msgstr "О"
#: editor/editor_node.cpp
msgid "Play the project."
@@ -3098,8 +3194,9 @@ msgid "Play"
msgstr "Покрени"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Pause the scene execution for debugging."
-msgstr ""
+msgstr "Паузирај извршење сцене зарад отклањања грешки."
#: editor/editor_node.cpp
msgid "Pause Scene"
@@ -3126,8 +3223,9 @@ msgid "Play Custom Scene"
msgstr "Покрени специфичну сцену"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Changing the video driver requires restarting the editor."
-msgstr ""
+msgstr "Промена видео управљача захтева рестартовање уређивача."
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
@@ -3177,8 +3275,9 @@ msgid "Don't Save"
msgstr "Немој сачувати"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Android build template is missing, please install relevant templates."
-msgstr ""
+msgstr "Недостаје Android образац за изградњу, инсталирај релевантне обрасце."
#: editor/editor_node.cpp
#, fuzzy
@@ -3186,6 +3285,7 @@ msgid "Manage Templates"
msgstr "Управљај извозним шаблонима"
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This will set up your project for custom Android builds by installing the "
"source template to \"res://android/build\".\n"
@@ -3195,14 +3295,26 @@ msgid ""
"the \"Use Custom Build\" option should be enabled in the Android export "
"preset."
msgstr ""
+"Ово ће подесити твој пројекат за произвољну Android грању инсталирајући "
+"изворни образац у \"res://android/build\".\n"
+"Затим можеш применити измене и изградити сопствени APK на извозу (додајући "
+"модуле, променом AndroidManifest.xml, итд.).\n"
+"Имај на уму да за произвољну градњу уместо коришћења изграђеног APK-а, "
+"\"Користи Произвољну Градњу\" опција треба бити омогућена у Android извозним "
+"подешавањима."
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"The Android build template is already installed in this project and it won't "
"be overwritten.\n"
"Remove the \"res://android/build\" directory manually before attempting this "
"operation again."
msgstr ""
+"Android образац градње је већ инсталиран у овај пројекат и неће бити "
+"преписан.\n"
+"Уклони \"res://android/build\" директоријум ручно пре поновног покушавања "
+"ове операције."
#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
@@ -3262,8 +3374,9 @@ msgid "Open the previous Editor"
msgstr "Отвори претходни уредник"
#: editor/editor_node.h
+#, fuzzy
msgid "Warning!"
-msgstr ""
+msgstr "Упозорење!"
#: editor/editor_path.cpp
#, fuzzy
@@ -3366,12 +3479,14 @@ msgid "On"
msgstr ""
#: editor/editor_properties.cpp
+#, fuzzy
msgid "Layer"
-msgstr ""
+msgstr "Лајер"
#: editor/editor_properties.cpp
+#, fuzzy
msgid "Bit %d, value %d"
-msgstr ""
+msgstr "Бит %d, вредност %d"
#: editor/editor_properties.cpp
#, fuzzy
@@ -3379,8 +3494,9 @@ msgid "[Empty]"
msgstr "Додај празан"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
+#, fuzzy
msgid "Assign..."
-msgstr ""
+msgstr "Додели..."
#: editor/editor_properties.cpp
#, fuzzy
@@ -3388,45 +3504,60 @@ msgid "Invalid RID"
msgstr "Неважеће име."
#: editor/editor_properties.cpp
+#, fuzzy
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
msgstr ""
+"Одабрани ресурс (%s) не одговара ни једној очекиваној врсти за ову особину "
+"(%s)."
#: editor/editor_properties.cpp
+#, fuzzy
msgid ""
"Can't create a ViewportTexture on resources saved as a file.\n"
"Resource needs to belong to a scene."
msgstr ""
+"Неуспело креирање ViewportTexture на ресурсима упамћеним као фајл\n"
+"Ресурси морају припадати сцени."
#: editor/editor_properties.cpp
+#, fuzzy
msgid ""
"Can't create a ViewportTexture on this resource because it's not set as "
"local to scene.\n"
"Please switch on the 'local to scene' property on it (and all resources "
"containing it up to a node)."
msgstr ""
+"Неуспело креирање ViewportTexture на ресурсима, није постављено као локално "
+"према сцени\n"
+"Пребаци на 'локално према сцени' особину ( и сви ресурси који их садрже "
+"све до нода)."
#: editor/editor_properties.cpp editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Viewport"
-msgstr ""
+msgstr "Одабери Viewport"
#: editor/editor_properties.cpp editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
-msgstr ""
+msgstr "Нова Скрипта"
#: editor/editor_properties.cpp editor/scene_tree_dock.cpp
#, fuzzy
msgid "Extend Script"
-msgstr "Покрени скриптицу"
+msgstr "Надовежи Скрипту"
#: editor/editor_properties.cpp editor/property_editor.cpp
+#, fuzzy
msgid "New %s"
-msgstr ""
+msgstr "Нов %s"
#: editor/editor_properties.cpp editor/property_editor.cpp
+#, fuzzy
msgid "Make Unique"
-msgstr ""
+msgstr "Учини Јединственим"
#: editor/editor_properties.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3443,20 +3574,24 @@ msgid "Paste"
msgstr "Налепи"
#: editor/editor_properties.cpp editor/property_editor.cpp
+#, fuzzy
msgid "Convert To %s"
-msgstr ""
+msgstr "Пребаци у %s"
#: editor/editor_properties.cpp editor/property_editor.cpp
+#, fuzzy
msgid "Selected node is not a Viewport!"
-msgstr ""
+msgstr "Одабрани нод није Viewport!"
#: editor/editor_properties_array_dict.cpp
+#, fuzzy
msgid "Size: "
-msgstr ""
+msgstr "Величина:"
#: editor/editor_properties_array_dict.cpp
+#, fuzzy
msgid "Page: "
-msgstr ""
+msgstr "Страна:"
#: editor/editor_properties_array_dict.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -3466,16 +3601,17 @@ msgstr "Обриши ставку"
#: editor/editor_properties_array_dict.cpp
#, fuzzy
msgid "New Key:"
-msgstr "Ново име:"
+msgstr "Нов кључ:"
#: editor/editor_properties_array_dict.cpp
#, fuzzy
msgid "New Value:"
-msgstr "Ново име:"
+msgstr "Нова вредност:"
#: editor/editor_properties_array_dict.cpp
+#, fuzzy
msgid "Add Key/Value Pair"
-msgstr ""
+msgstr "Додај Кључ/Вредност пар"
#: editor/editor_run_native.cpp
msgid ""
@@ -3509,13 +3645,19 @@ msgstr "Неуспех при покретању скриптице:"
msgid "Did you forget the '_run' method?"
msgstr "Да ли сте заборавили методу „_run“?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr "Држи Ctrl да испустиш Узимача. Држи Shift да испустиш општи потпис."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Одабери чвор/ове за увоз"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
+#, fuzzy
msgid "Browse"
-msgstr ""
+msgstr "Потражи"
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
@@ -3544,8 +3686,9 @@ msgid "Download"
msgstr "Преучми"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Official export templates aren't available for development builds."
-msgstr ""
+msgstr "Званични извозни нацрти нису доступни за развојну градњу."
#: editor/export_template_manager.cpp
msgid "(Missing)"
@@ -3590,12 +3733,15 @@ msgid "Importing:"
msgstr "Увожење:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Error getting the list of mirrors."
-msgstr ""
+msgstr "Грешка у добијању листе огледала."
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Error parsing JSON of mirror list. Please report this issue!"
msgstr ""
+"Грешка при JSON обради са листе огледала. Молимо пријавите овај проблем!"
#: editor/export_template_manager.cpp
msgid ""
@@ -3644,10 +3790,13 @@ msgid "Cannot remove temporary file:"
msgstr "Неуспех при чувању теме:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid ""
"Templates installation failed.\n"
"The problematic templates archives can be found at '%s'."
msgstr ""
+"Инсталација нацрта неуспешна.\n"
+"Архиве проблематичних нацрта могу би нађене на '%s'."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3943,8 +4092,9 @@ msgid "There is already file or folder with the same name in this location."
msgstr "Датотека или директоријум са овим именом већ постоји."
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Overwrite"
-msgstr ""
+msgstr "Препиши"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -3976,10 +4126,13 @@ msgid "Filters:"
msgstr "Филтери..."
#: editor/find_in_files.cpp
+#, fuzzy
msgid ""
"Include the files with the following extensions. Add or remove them in "
"ProjectSettings."
msgstr ""
+"Урачунај фајлове са следећим екстензијама. Додај или обриши их у "
+"ПодешавањимаПројекта"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -3991,8 +4144,9 @@ msgid "Replace..."
msgstr "Замени..."
#: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp
+#, fuzzy
msgid "Cancel"
-msgstr ""
+msgstr "Откажи"
#: editor/find_in_files.cpp
#, fuzzy
@@ -4058,8 +4212,9 @@ msgstr "Додај у групу"
#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Filter nodes"
-msgstr ""
+msgstr "Филтрирај чворове"
#: editor/groups_editor.cpp
#, fuzzy
@@ -4067,8 +4222,9 @@ msgid "Nodes in Group"
msgstr "Додај у групу"
#: editor/groups_editor.cpp
+#, fuzzy
msgid "Empty groups will be automatically removed."
-msgstr ""
+msgstr "Празне групе биће аутоматски уклоњене."
#: editor/groups_editor.cpp
#, fuzzy
@@ -4156,13 +4312,17 @@ msgid "Error running post-import script:"
msgstr "Грешка при обрађивању пост-увозне скриптице:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Чување..."
#: editor/import_dock.cpp
#, fuzzy
msgid "%d Files"
-msgstr " Датотеке"
+msgstr " %d Датотеке"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
@@ -4186,17 +4346,22 @@ msgid "Reimport"
msgstr "Поново увези"
#: editor/import_dock.cpp
+#, fuzzy
msgid "Save Scenes, Re-Import, and Restart"
-msgstr ""
+msgstr "Упамти Сцену, Опет Увези, и Рестартуј"
#: editor/import_dock.cpp
+#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr ""
+msgstr "Промена врсте увезених фајлова захтева рестарт уређивача."
#: editor/import_dock.cpp
+#, fuzzy
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"УПОЗОРЕЊЕ: Постоје средства која користе овај ресурс, могу престати да се "
+"учитавају правилно."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -4273,7 +4438,7 @@ msgstr "Поставке објекта."
#: editor/inspector_dock.cpp
#, fuzzy
msgid "Filter properties"
-msgstr "Поставке објекта."
+msgstr "Пречисти особине"
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4291,33 +4456,37 @@ msgstr "Одабери чвор за мењање сигнала и група."
#: editor/plugin_config_dialog.cpp
#, fuzzy
msgid "Edit a Plugin"
-msgstr "Измени полигон"
+msgstr "Измени Прикључак"
#: editor/plugin_config_dialog.cpp
#, fuzzy
msgid "Create a Plugin"
-msgstr "Направи ивице"
+msgstr "Направи Прикључак"
#: editor/plugin_config_dialog.cpp
#, fuzzy
msgid "Plugin Name:"
-msgstr "Прикључци"
+msgstr "Име Прикључка :"
#: editor/plugin_config_dialog.cpp
+#, fuzzy
msgid "Subfolder:"
-msgstr ""
+msgstr "ПодФолдер:"
#: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp
+#, fuzzy
msgid "Language:"
-msgstr ""
+msgstr "Језик:"
#: editor/plugin_config_dialog.cpp
+#, fuzzy
msgid "Script Name:"
-msgstr ""
+msgstr "Име Скрипте:"
#: editor/plugin_config_dialog.cpp
+#, fuzzy
msgid "Activate now?"
-msgstr ""
+msgstr "Активирај сад?"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -4330,7 +4499,7 @@ msgstr "Направи полигон"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
msgid "Create points."
-msgstr "Обриши тачке"
+msgstr "Направи тачке."
#: editor/plugins/abstract_polygon_2d_editor.cpp
#, fuzzy
@@ -4404,8 +4573,10 @@ msgstr "Промени време мешања"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
+"Ова врста чвора се не може користити. Само корени чворови су дозвољени."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4425,32 +4596,40 @@ msgid "Remove BlendSpace1D Point"
msgstr "Обриши тачку путање"
#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
msgid "Move BlendSpace1D Node Point"
-msgstr ""
+msgstr "Помери BlendSpace1D Чворну Тачку"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid ""
"AnimationTree is inactive.\n"
"Activate to enable playback, check node warnings if activation fails."
msgstr ""
+"AnimationTree је неактивно.\n"
+"Активирај да омогућиш репродукцију, провери чвор упозорења ако активација не "
+"успе."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "Set the blending position within the space"
-msgstr ""
+msgstr "Постави стопљиву позицију са размаком"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "Select and move points, create points with RMB."
-msgstr ""
+msgstr "Одабери и помери тачке, направи тачке са RMB."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
+#, fuzzy
msgid "Enable snap and show grid."
-msgstr ""
+msgstr "Омогући лепљење и прикажи мрежу."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4476,12 +4655,12 @@ msgstr "Анимациони чвор"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
msgid "Triangle already exists."
-msgstr "Грешка: име анимације већ постоји!"
+msgstr "Троугао већ постоји."
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
msgid "Add Triangle"
-msgstr "Додај нову траку"
+msgstr "Додај Троугао"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -4499,33 +4678,39 @@ msgid "Remove BlendSpace2D Point"
msgstr "Обриши тачку путање"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "Remove BlendSpace2D Triangle"
-msgstr ""
+msgstr "Уклони BlendSpace2D Троугао"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "BlendSpace2D does not belong to an AnimationTree node."
-msgstr ""
+msgstr "BlendSpace2D не припада AnimationTree чвору."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "No triangles exist, so no blending can take place."
-msgstr ""
+msgstr "Троуглови не постоје, па се утапање не може догодити."
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
msgid "Toggle Auto Triangles"
-msgstr "Укљ./Искљ. глобале аутоматског учитавања"
+msgstr "Укљ./Искљ. Троуглове"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "Create triangles by connecting points."
-msgstr ""
+msgstr "Направи троуглове спајајући тачке."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "Erase points and triangles."
-msgstr ""
+msgstr "Обриши тачке и троуглове."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "Generate blend triangles automatically (instead of manually)"
-msgstr ""
+msgstr "Произведи стопљене троуглове аутоматски (уместо ручно)"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -4543,34 +4728,37 @@ msgid "Edit Filters"
msgstr "Уреди филтере"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
msgid "Output node can't be added to the blend tree."
-msgstr ""
+msgstr "Излазни чвор не може бити додат утапајућем стаблу."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
msgid "Add Node to BlendTree"
-msgstr ""
+msgstr "Додај Чвор УтапајућемСтаблу"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Node Moved"
-msgstr "Режим померања"
+msgstr "Чвор Поморен"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
msgid "Unable to connect, port may be in use or connection may be invalid."
-msgstr ""
+msgstr "Неуспела веза, порт може бити заузет или не важећи."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Nodes Connected"
-msgstr "Повезан"
+msgstr "Чворови Спојени"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Nodes Disconnected"
-msgstr "Веза прекинута"
+msgstr "Чворови Раздвојени"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#, fuzzy
@@ -4581,37 +4769,43 @@ msgstr "Анимација"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Delete Node"
-msgstr "Направи чвор"
+msgstr "Обриши Чвор"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Delete Node(s)"
-msgstr ""
+msgstr "Обриши Чвор(ове)"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#, fuzzy
msgid "Toggle Filter On/Off"
-msgstr "Укљ./Искљ. режим без сметње."
+msgstr "Укљ./Искљ. филтере."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#, fuzzy
msgid "Change Filter"
-msgstr "Измени дужину анимације"
+msgstr "Измени Филтер"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
msgid "No animation player set, so unable to retrieve track names."
-msgstr ""
+msgstr "Анимациони плејер није постављен, неуспешно повлачење имена трака."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
msgid "Player path set is invalid, so unable to retrieve track names."
-msgstr ""
+msgstr "Неважећа путања плејера, неуспешно повлачење имена трака."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/root_motion_editor_plugin.cpp
+#, fuzzy
msgid ""
"Animation player has no valid root node path, so unable to retrieve track "
"names."
msgstr ""
+"Анимациони плејер нема правилну путању кореног чвора, неуспешно повлачење "
+"имена трака."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#, fuzzy
@@ -4636,8 +4830,9 @@ msgstr "Име чвора:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Add Node..."
-msgstr ""
+msgstr "Додај Чвор..."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/root_motion_editor_plugin.cpp
@@ -4785,13 +4980,14 @@ msgid "Autoplay on Load"
msgstr "Аутоматско пуштање након учитавања"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Enable Onion Skinning"
-msgstr ""
+msgstr "Омогући Слојевито Обмотавање"
#: editor/plugins/animation_player_editor_plugin.cpp
#, fuzzy
msgid "Onion Skinning Options"
-msgstr "Поставке залепљавања"
+msgstr "Опције Слојевитог Обмотавања"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Directions"
@@ -4868,105 +5064,121 @@ msgstr "Вишеанимационо време мешања"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Move Node"
-msgstr "Режим померања"
+msgstr "Помери Чвор"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Transition exists!"
-msgstr "Померај"
+msgstr "Прелаз постоји!"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Add Transition"
-msgstr "Померај"
+msgstr "Додај Прелаз"
#: editor/plugins/animation_state_machine_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Node"
-msgstr ""
+msgstr "Додај Чвор"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "End"
-msgstr ""
+msgstr "Крај"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "Immediate"
-msgstr ""
+msgstr "Непосредан"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "Sync"
-msgstr ""
+msgstr "Усклади"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "At End"
-msgstr ""
+msgstr "На Крај"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "Travel"
-msgstr ""
+msgstr "Путуј"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "Start and end nodes are needed for a sub-transition."
-msgstr ""
+msgstr "Почетни и крајњи чвор су потребни за под-прелаз."
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "No playback resource set at path: %s."
-msgstr "Није на пут ресурса."
+msgstr "Нема репородуктивних ресурса постављених као путања: %s."
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Node Removed"
-msgstr "Обриши"
+msgstr "Чвор Уклоњен"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Transition Removed"
-msgstr "Transition чвор"
+msgstr "Прелаз Уклољен"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "Set Start Node (Autoplay)"
-msgstr ""
+msgstr "Постави Почетни Чвор(ауто-покретање)"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
"Shift+LMB to create connections."
msgstr ""
+"Одабери и помери чворове.\n"
+"RMB да додаш нове чворове.\n"
+"Shift+LMB да креираш конекције."
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Create new nodes."
-msgstr "Направи нов"
+msgstr "Направи нов."
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Connect nodes."
-msgstr "Повежи са чвором:"
+msgstr "Повежи чворове."
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Remove selected node or transition."
-msgstr "Обриши одабрану траку."
+msgstr "Обриши одабрани чвор или прелаз."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "Toggle autoplay this animation on start, restart or seek to zero."
msgstr ""
+"Искљ/Укљ ауто-покретање ове анимације на почетак, поновни почетак или "
+"претрагу нуле."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "Set the end animation. This is useful for sub-transitions."
-msgstr ""
+msgstr "Постави крај анимације. Ово је корисно за под-прелазе."
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Transition: "
-msgstr "Померај"
+msgstr "Прелаз:"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Play Mode:"
-msgstr "Режим инспекције"
+msgstr "Режим Игре:"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5149,8 +5361,9 @@ msgid "Cannot save response to:"
msgstr "Неуспех при чувању теме:"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Write error."
-msgstr ""
+msgstr "Грешка при уписивању."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
@@ -5199,7 +5412,7 @@ msgstr "Преузимање у току"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Downloading..."
-msgstr "Преузимање у току"
+msgstr "Преузимање..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Resolving..."
@@ -5216,7 +5429,7 @@ msgstr "Неактиван"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Install..."
-msgstr "Инсталирај"
+msgstr "Инсталирај..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Retry"
@@ -5231,35 +5444,39 @@ msgid "Download for this asset is already in progress!"
msgstr "Преузимање овог ресурса је у току!"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Recently Updated"
-msgstr ""
+msgstr "Недавно Ажурирано"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Least Recently Updated"
-msgstr ""
+msgstr "Последње Недавно Ажурирано"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Name (A-Z)"
-msgstr ""
+msgstr "Име (A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Name (Z-A)"
-msgstr ""
+msgstr "Име (Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "License (A-Z)"
-msgstr "Лиценса"
+msgstr "Лиценса (A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "License (Z-A)"
-msgstr "Лиценса"
+msgstr "Лиценса (Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "First"
-msgstr "први"
+msgstr "Први"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
@@ -5271,16 +5488,18 @@ msgid "Next"
msgstr "Следеће"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Last"
-msgstr ""
+msgstr "Последњи"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "All"
msgstr "сви"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "No results for \"%s\"."
-msgstr ""
+msgstr "Нема резултата за \"%s\"."
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
@@ -5321,32 +5540,42 @@ msgstr "Тестирање"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Loading..."
-msgstr "Учитај"
+msgstr "Учитај..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
msgstr "Ресурси ЗИП датотека"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
+#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene (for images to be saved in the same dir), or pick a save "
"path from the BakedLightmap properties."
msgstr ""
+"Неуспело одређивање путање памћења за слике МапеСенчења.\n"
+"Упамти сцену (за слике да буду сачуване у истом директоријуму), или одабери "
+"путању памћења из особина изпечене МапеСенчења."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
+#, fuzzy
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
msgstr ""
+"Нема мрежа за печење. Провери да ли садрже UV2 канал и да је опција 'Изпеци "
+"Светла' укључена."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
+#, fuzzy
msgid "Failed creating lightmap images, make sure path is writable."
msgstr ""
+"Неуспешно креирање слике МапеСенчења, провери да ли могуће уписивање путање."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
+#, fuzzy
msgid "Bake Lightmaps"
-msgstr ""
+msgstr "Изпеци МапеСенчења"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp
@@ -5366,13 +5595,14 @@ msgid "Grid Step:"
msgstr "Корак мреже:"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Primary Line Every:"
-msgstr ""
+msgstr "Примарна Линија Сваки:"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "steps"
-msgstr "2 корака"
+msgstr "корака"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
@@ -5385,7 +5615,7 @@ msgstr "Ротације корака:"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Scale Step:"
-msgstr "Скала:"
+msgstr "Корак Увећања:"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -5453,64 +5683,70 @@ msgid "Move CanvasItem"
msgstr "Уреди CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
-msgstr ""
+msgstr "Деца наслеђују сидра и граничне вредности од својих родитеља."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Presets for the anchors and margins values of a Control node."
-msgstr ""
+msgstr "Поставке сидара и граничних вредности Контролног чвора."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid ""
"When active, moving Control nodes changes their anchors instead of their "
"margins."
msgstr ""
+"Када су активни, померање Контролних чворова мења њихова сидра уместо "
+"маргина."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Top Left"
-msgstr "Лево"
+msgstr "Горе Лево"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Top Right"
-msgstr "десно"
+msgstr "Горе Десно"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Bottom Right"
-msgstr "Ротирај полигон"
+msgstr "Доле Десно"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Bottom Left"
-msgstr "Поглед одоздо"
+msgstr "Доле Лево"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Center Left"
-msgstr "Увучи лево"
+msgstr "Средина Лево"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Center Top"
-msgstr "Центрирај одабрано"
+msgstr "Средина Горе"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Center Right"
-msgstr "Увучи десно"
+msgstr "Средина Десно"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Center Bottom"
-msgstr "Доле"
+msgstr "Средина Доле"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Center"
-msgstr ""
+msgstr "Средина"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -5533,21 +5769,24 @@ msgid "Bottom Wide"
msgstr "Поглед одоздо"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "VCenter Wide"
-msgstr ""
+msgstr "Вертикална Средина Широко"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "HCenter Wide"
-msgstr ""
+msgstr "Хоризонтална Средина Широко"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Full Rect"
-msgstr ""
+msgstr "Пун Правоугаоник"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Keep Ratio"
-msgstr "Размера скале:"
+msgstr "Задржи однос"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
@@ -5563,41 +5802,47 @@ msgstr "Промени сидра"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid ""
"Game Camera Override\n"
"Overrides game camera with editor viewport camera."
msgstr ""
+"Препиши Играчку Камеру\n"
+"Препиши играчку камеру са камером уређивача viewport-а."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid ""
"Game Camera Override\n"
"No game instance running."
msgstr ""
+"Препиши Играчку Камеру\n"
+"Инстанца игре није покренута."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Lock Selected"
-msgstr "Избор алатки"
+msgstr "Закључај одабрано"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Unlock Selected"
-msgstr "Избор алатки"
+msgstr "Откључај одабрано"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Group Selected"
-msgstr "Обриши одабрано"
+msgstr "Групиши Одабрано"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Ungroup Selected"
-msgstr "Обриши одабрано"
+msgstr "Разгрупиши Одабрано"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Paste Pose"
@@ -5627,10 +5872,11 @@ msgid "Clear IK Chain"
msgstr "Очисти IK ланац"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid ""
"Warning: Children of a container get their position and size determined only "
"by their parent."
-msgstr ""
+msgstr "Упозорење: Деца наслеђују позицију и величину само од својих родитеља."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
@@ -5675,7 +5921,7 @@ msgstr "Режим ротације"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Scale Mode"
-msgstr "Режим скалирања (R)"
+msgstr "Режим Увећања"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5697,32 +5943,32 @@ msgstr "Режим инспекције"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Ruler Mode"
-msgstr "Режим скалирања (R)"
+msgstr "Режим Мерења"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Toggle smart snapping."
-msgstr "Укљ./Искљ. лепљења"
+msgstr "Укљ./Искљ. лепљења."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Use Smart Snap"
-msgstr "Користи лепљење"
+msgstr "Користи паметно лепљење"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Toggle grid snapping."
-msgstr "Укљ./Искљ. лепљења"
+msgstr "Укљ./Искљ. лепљење за мрежу."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Use Grid Snap"
-msgstr "Лепљење по мрежи"
+msgstr "Лепљење за мрежу"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Snapping Options"
-msgstr "Поставке залепљавања"
+msgstr "Поставке Залепљавања"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
@@ -5731,7 +5977,7 @@ msgstr "Користи лепљење ротације"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Use Scale Snap"
-msgstr "Користи лепљење"
+msgstr "Користи Лествично Лепљење"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -5744,7 +5990,7 @@ msgstr "Користи лепљење за пикселе"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Smart Snapping"
-msgstr "Паметно лепљење"
+msgstr "Паметно Лепљење"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5754,22 +6000,22 @@ msgstr "Поставке лепљења..."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Snap to Parent"
-msgstr "Лепи за родитеља"
+msgstr "Лепи за Родитеља"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Snap to Node Anchor"
-msgstr "Лепи за сидро чвора"
+msgstr "Лепи за Сидро Чвора"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Snap to Node Sides"
-msgstr "Лепи за стране чвора"
+msgstr "Лепи за Стране Чвора"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Snap to Node Center"
-msgstr "Лепи за сидро чвора"
+msgstr "Лепи за Сидро Чвора"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -5811,13 +6057,14 @@ msgid "Show Bones"
msgstr "Покажи кости"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Make Custom Bone(s) from Node(s)"
-msgstr ""
+msgstr "Направи Произвољне Кости од Чворова"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Clear Custom Bones"
-msgstr "Обриши кости"
+msgstr "Обриши Кости"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5852,8 +6099,9 @@ msgid "Show Viewport"
msgstr "1 прозор"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Show Group And Lock Icons"
-msgstr ""
+msgstr "Прикажи Групу и Закључане Иконице"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -5864,43 +6112,52 @@ msgid "Frame Selection"
msgstr "Ибор рама"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Preview Canvas Scale"
-msgstr ""
+msgstr "Преглед Величине Платна"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Translation mask for inserting keys."
-msgstr ""
+msgstr "Преводна маска за убацивање кључева."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Rotation mask for inserting keys."
-msgstr ""
+msgstr "Ротациона маска за убацивање кључева."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Scale mask for inserting keys."
-msgstr ""
+msgstr "Лествична маска за убацивање кључева."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Insert keys (based on mask)."
-msgstr "Убаци кључ (постојеће траке)"
+msgstr "Убаци кључеве (базиране на масци)."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid ""
"Auto insert keys when objects are translated, rotated or scaled (based on "
"mask).\n"
"Keys are only added to existing tracks, no new tracks will be created.\n"
"Keys must be inserted manually for the first time."
msgstr ""
+"Аутоматски убаци кључеве где су објекти преведени, ротирирани или увећани "
+"(базирано на масци).\n"
+"Кључеви су додани само постојећим тракама, нове траке неће бити креиране.\n"
+"Кључеви први пут морају бити убачени ручно."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Auto Insert Key"
-msgstr "Уметни кључ"
+msgstr "Ауто-Уметни кључ"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Animation Key and Pose Options"
-msgstr "Анимациони кључ убачен."
+msgstr "Опције Анимациононг кључа и Позе"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key (Existing Tracks)"
@@ -5936,8 +6193,9 @@ msgid "Adding %s..."
msgstr "Додавање %s..."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Cannot instantiate multiple nodes without root."
-msgstr ""
+msgstr "Неуспело инстанцирање више чворова без корена."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6015,19 +6273,21 @@ msgstr "Маска емисије"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Solid Pixels"
-msgstr ""
+msgstr "Пиксели Тела"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Border Pixels"
-msgstr ""
+msgstr "Пиксели Оквира"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
#, fuzzy
msgid "Directed Border Pixels"
-msgstr "Директоријуми и датотеке:"
+msgstr "Пиксели Усмерених Оквира"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -6042,7 +6302,7 @@ msgstr "Боје емисије"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#, fuzzy
msgid "CPUParticles"
-msgstr "Честице"
+msgstr "CPU Честице"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6065,12 +6325,14 @@ msgid "Flat 1"
msgstr "Раван1"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
+#, fuzzy
msgid "Ease In"
-msgstr ""
+msgstr "Благ Почетак"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
+#, fuzzy
msgid "Ease Out"
-msgstr ""
+msgstr "Благ Крај"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
@@ -6135,8 +6397,9 @@ msgid "Bake GI Probe"
msgstr "Испечи сонде глобалног осветљења (GI)"
#: editor/plugins/gradient_editor_plugin.cpp
+#, fuzzy
msgid "Gradient Edited"
-msgstr ""
+msgstr "Нагиб Измењен"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -6161,7 +6424,7 @@ msgstr "Мрежа је празна!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Направи троугластог сударног брата"
+msgstr "Неуспело креирање три-мрежног сударног облика."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -6174,54 +6437,61 @@ msgstr "Ово не ради на корену сцене!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Create Trimesh Static Shape"
-msgstr "Направи фигуру од троуглова"
+msgstr "Направи облик од троуглова"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "Неуспело креирање једног конвексног судардног облика за корен сцене."
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Неуспело креирање једног конвексног сударног облика."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Направи конвексну фигуру"
+msgstr "Направи конвексну облик"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "Неуспело креирање више конвексних сударних облика за корен сцене."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Неуспех при прављењу директоријума."
+msgstr "Неуспело креирање сударног облика."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Направи конвексну фигуру"
+msgstr "Направи конвексни облик"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
msgstr "Направи навигациону мрежу"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Contained Mesh is not of type ArrayMesh."
-msgstr ""
+msgstr "Садржана-Мрежа није од врсте Низ-Мрежа."
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr ""
+msgstr "Неуспешно UV одмотавање, можда мрежа није многострука?"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "No mesh to debug."
-msgstr ""
+msgstr "Нема мреже за проверу."
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Model has no UV in this layer"
-msgstr ""
+msgstr "Модел нема UV мапу на овом слоју"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
@@ -6232,8 +6502,9 @@ msgid "Mesh has not surface to create outlines from!"
msgstr "Мрежа нема површине за прављење ивица!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
-msgstr ""
+msgstr "Примитивна врста Мреже није ПРИМИТИВНИ_ТРОУГЛОВИ!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
@@ -6252,21 +6523,27 @@ msgid "Create Trimesh Static Body"
msgstr "Направи троугласто статично тело"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid ""
"Creates a StaticBody and assigns a polygon-based collision shape to it "
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+" Креира НепомичноТело и додељује му сударни облик на бази многоугла "
+"аутоматски."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
msgstr "Направи троугластог сударног брата"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Креира сударни облик на бази моногоугла.\n"
+"Ово је најпрецизнија(али и најспорија) опција за препознавање судара."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -6274,10 +6551,13 @@ msgid "Create Single Convex Collision Sibling"
msgstr "Направи конвексног сударног брата"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Креира један конвексни сударни облик.\n"
+"Ово је најбржа(али и најнепрецизнија) опција за препознавање судара."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -6285,36 +6565,45 @@ msgid "Create Multiple Convex Collision Siblings"
msgstr "Направи конвексног сударног брата"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Креира сударни облик на бази многоугла.\n"
+"Ова опција постиже средињи учинак између 2 горе наведене."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
msgstr "Направи ивичну мрежу..."
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid ""
"Creates a static outline mesh. The outline mesh will have its normals "
"flipped automatically.\n"
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Креира непомични оквир мреже. Оквир мреже ће имати обрнуте нормале "
+"аутоматски.\n"
+"Ово може бити коришћено уместо Раст особине РастућегМатеријала кад коришћење "
+"те особине није могуће."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "View UV1"
-msgstr "Поглед"
+msgstr "Види UV1"
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "View UV2"
-msgstr "Поглед"
+msgstr "Види UV2"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Unwrap UV2 for Lightmap/AO"
-msgstr ""
+msgstr "Одмотај UV2 за МапуСенки/Упијање Окружења"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh"
@@ -6325,8 +6614,9 @@ msgid "Outline Size:"
msgstr "Величина ивице:"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "UV Channel Debug"
-msgstr ""
+msgstr "UV Канал ПИП (Проналажење и Исправка Проблема)"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Remove item %d?"
@@ -6337,12 +6627,14 @@ msgstr "Обриши ствар %d?"
msgid ""
"Update from existing scene?:\n"
"%s"
-msgstr "Ажурирај из сцене"
+msgstr ""
+"Ажурирај из сцене? :\n"
+"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
#, fuzzy
msgid "Mesh Library"
-msgstr "MeshLibrary..."
+msgstr "Библиотека Мрежа..."
#: editor/plugins/mesh_library_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -6462,12 +6754,12 @@ msgstr "Направи навигациони полигон"
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
msgid "Convert to CPUParticles"
-msgstr "Претвори у велика слова"
+msgstr "Претвори у CPU честице"
#: editor/plugins/particles_2d_editor_plugin.cpp
#, fuzzy
msgid "Generating Visibility Rect"
-msgstr "Генериши правоугаоник видљивости"
+msgstr "Генерација Правоугаоника Видљивости"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
@@ -6483,17 +6775,19 @@ msgid "Generation Time (sec):"
msgstr "Време генерисања (сек.):"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "The geometry's faces don't contain any area."
-msgstr ""
+msgstr "Лица геометрије не садржи ни једну област."
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
msgid "The geometry doesn't contain any faces."
-msgstr "Чвор не садржи геометрију (стране)."
+msgstr "Геометрија не садржи ни једно лице."
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "\"%s\" doesn't inherit from Spatial."
-msgstr ""
+msgstr "\"%s\" не наслеђује од Просторног."
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
@@ -6565,7 +6859,7 @@ msgstr "Уметни тачку у криву"
#: editor/plugins/path_2d_editor_plugin.cpp
#, fuzzy
msgid "Split Curve"
-msgstr "Затвори криву"
+msgstr "Подели Криву"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move Point in Curve"
@@ -6631,13 +6925,15 @@ msgstr "Опција"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Mirror Handle Angles"
-msgstr ""
+msgstr "Углови Дршке Огледала"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Mirror Handle Lengths"
-msgstr ""
+msgstr "Дужине Дршке Огледала"
#: editor/plugins/path_editor_plugin.cpp
msgid "Curve Point #"
@@ -6681,30 +6977,36 @@ msgid "Move Joint"
msgstr "Помери тачку"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid ""
"The skeleton property of the Polygon2D does not point to a Skeleton2D node"
-msgstr ""
+msgstr "Костур особина 2Д полигона не упире ка 2Д Костур чвору"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Sync Bones"
-msgstr "Покажи кости"
+msgstr "Усклади Коске"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid ""
"No texture in this polygon.\n"
"Set a texture to be able to edit UV."
msgstr ""
+"Нема текстуре у овом многоуглу.\n"
+"Постави текстуру да би едитовао UV."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
msgstr "Направи UV мапу"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid ""
"Polygon 2D has internal vertices, so it can no longer be edited in the "
"viewport."
msgstr ""
+"2Д многоугао има унутрашње тачке, па не може више бити едитован у viewport-у."
#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
@@ -6722,8 +7024,9 @@ msgid "Remove Internal Vertex"
msgstr "Обриши тачку контроле улаза"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Invalid Polygon (need 3 different vertices)"
-msgstr ""
+msgstr "Неважећи Многоугао(потребне 3 различите тачке)"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
@@ -6745,8 +7048,9 @@ msgid "Transform Polygon"
msgstr "Тип трансформације"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Paint Bone Weights"
-msgstr ""
+msgstr "Боји Тежине Костура"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
@@ -6758,8 +7062,9 @@ msgid "Polygon 2D UV Editor"
msgstr "Уредник UV 2Д полигона"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "UV"
-msgstr ""
+msgstr "UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
@@ -6806,26 +7111,34 @@ msgid "Scale Polygon"
msgstr "Скалирај полигон"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Create a custom polygon. Enables custom polygon rendering."
msgstr ""
+"Креирај произвољни многоугао. Омогућује изцртавање произвољног многоугла."
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid ""
"Remove a custom polygon. If none remain, custom polygon rendering is "
"disabled."
msgstr ""
+"Уклони произвољни многоугао. Ако ни један није остао, изцртавање произв. "
+"многоугла је онемогућено."
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Paint weights with specified intensity."
-msgstr ""
+msgstr "Боји тежине са наведеном снагом"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Unpaint weights with specified intensity."
-msgstr ""
+msgstr "Обриши обојене тежине наведене снаге"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Radius:"
-msgstr ""
+msgstr " Опсег:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon->UV"
@@ -6917,8 +7230,9 @@ msgstr "Налепи ресурсе"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Instance:"
-msgstr ""
+msgstr "Инстанца:"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
@@ -6929,8 +7243,9 @@ msgstr "Тип:"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Open in Editor"
-msgstr ""
+msgstr "Отвори у Уреднику"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Load Resource"
@@ -6942,13 +7257,14 @@ msgid "ResourcePreloader"
msgstr "Ресурс"
#: editor/plugins/root_motion_editor_plugin.cpp
+#, fuzzy
msgid "AnimationTree has no path set to an AnimationPlayer"
-msgstr ""
+msgstr "AnimationTree нема путању постављену ка AnimationPlayer-у"
#: editor/plugins/root_motion_editor_plugin.cpp
#, fuzzy
msgid "Path to AnimationPlayer is invalid"
-msgstr "Анимационо дрво није важеће."
+msgstr "Путања до AnimationPlayer није важећа."
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Files"
@@ -7012,21 +7328,27 @@ msgid "Save File As..."
msgstr "Сачувај као..."
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Can't obtain the script for running."
-msgstr ""
+msgstr "Неуспело добијање скрипте за покретање"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Script failed reloading, check console for errors."
-msgstr ""
+msgstr "Неуспело учитавање Скрипте, провери конзолу за могуће грешке."
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Script is not in tool mode, will not be able to run."
-msgstr ""
+msgstr "Скрипта није у Алат Режиму, неће бити покренута."
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid ""
"To run this script, it must inherit EditorScript and be set to tool mode."
msgstr ""
+"За покретање скрипте, мора наследити УредникСкрипту и бити постављена у Алат "
+"Режим."
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme"
@@ -7062,16 +7384,17 @@ msgstr "Нађи претходни"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Filter scripts"
-msgstr "Поставке објекта."
+msgstr "Филтрирај скрипте"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Toggle alphabetical sorting of the method list."
-msgstr ""
+msgstr "Укљ/Искљ алфабет сортирање списка метода."
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Filter methods"
-msgstr "Поставке објекта."
+msgstr "Филтрирај методе"
#: editor/plugins/script_editor_plugin.cpp
msgid "Sort"
@@ -7104,12 +7427,12 @@ msgstr "Датотека"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Open..."
-msgstr "Отвори"
+msgstr "Отвори..."
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Reopen Closed Script"
-msgstr "Покрени скриптицу"
+msgstr "Покрени Затворену Скрипту"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
@@ -7122,7 +7445,7 @@ msgstr "Мекано освежење скриптице"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Copy Script Path"
-msgstr "Копирај пут"
+msgstr "Копирај Путању Скрипте"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -7137,12 +7460,12 @@ msgstr "Историја следеће"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
msgid "Theme"
-msgstr "Сачувај тему"
+msgstr "Тема"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Import Theme..."
-msgstr "Увези тему"
+msgstr "Увези тему..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload Theme"
@@ -7193,7 +7516,7 @@ msgstr "Дебагуј са спољашњим уредником"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Open Godot online documentation."
-msgstr "Отвори Godot онлајн документацију"
+msgstr "Отвори Godot документацију са мреже"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the reference documentation."
@@ -7236,28 +7559,27 @@ msgstr "Дебагер"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Search Results"
-msgstr "Потражи помоћ"
+msgstr "Потражи Ретултате"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Clear Recent Scripts"
-msgstr "Очисти недавне сцене"
+msgstr "Очисти Недавне Скрипте"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Connections to method:"
-msgstr "Повежи са чвором:"
+msgstr "Везе са методом:"
#: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp
#, fuzzy
msgid "Source"
-msgstr ""
-"\n"
-"Извор: "
+msgstr "Извор"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Target"
-msgstr ""
+msgstr "Мета"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -7267,12 +7589,13 @@ msgstr "Повежи '%s' са '%s'"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
-msgid "Line"
-msgstr "Линија:"
+msgid "[Ignore]"
+msgstr "(игнориши)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
+#, fuzzy
+msgid "Line"
+msgstr "Линија:"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -7285,8 +7608,9 @@ msgstr "Само ресурси из датотечног система се м
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Can't drop nodes because script '%s' is not used in this scene."
-msgstr ""
+msgstr "Неуспешно испуштање чворова јер скрипта'%s' није део ове сцене."
#: editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -7314,23 +7638,26 @@ msgid "Capitalize"
msgstr "Велика слова"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
+#, fuzzy
msgid "Syntax Highlighter"
-msgstr ""
+msgstr "Изтицање Синтаксе"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
+#, fuzzy
msgid "Go To"
-msgstr ""
+msgstr "Иди На"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
+#, fuzzy
msgid "Bookmarks"
-msgstr ""
+msgstr "Белешке"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Breakpoints"
-msgstr "Обриши тачке"
+msgstr "Тачке прекида"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
@@ -7361,7 +7688,7 @@ msgstr "Коментариши"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Fold/Unfold Line"
-msgstr "Откриј линију"
+msgstr "Сакриј/Отркиј Линију"
#: editor/plugins/script_text_editor.cpp
msgid "Fold All Lines"
@@ -7382,7 +7709,7 @@ msgstr "Потпун симбол"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Evaluate Selection"
-msgstr "Увећај одабрано"
+msgstr "Процени Одабрано"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
@@ -7466,7 +7793,7 @@ msgid ""
"This shader has been modified on on disk.\n"
"What action should be taken?"
msgstr ""
-"Следеће датотеке су нове на диску.\n"
+"Овај Цртач је измењен на диску.\n"
"Која акција се треба предузети?:"
#: editor/plugins/shader_editor_plugin.cpp
@@ -7474,8 +7801,9 @@ msgid "Shader"
msgstr "Шејдер"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "This skeleton has no bones, create some children Bone2D nodes."
-msgstr ""
+msgstr "Овај костур нема кости, креирај му децу Коска2Д чворове."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
@@ -7483,21 +7811,24 @@ msgid "Create Rest Pose from Bones"
msgstr "Направи тачке емисије од мреже"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Set Rest Pose to Bones"
-msgstr ""
+msgstr "Постави Одмор Позу на Коске"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
msgid "Skeleton2D"
-msgstr "Синглетон"
+msgstr "Синглетон2Д"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Make Rest Pose (From Bones)"
-msgstr ""
+msgstr "Направи Одмор Позу(од Костију)"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Set Bones to Rest Pose"
-msgstr ""
+msgstr "Постави Коске у Одмор Позу"
#: editor/plugins/skeleton_editor_plugin.cpp
#, fuzzy
@@ -7568,12 +7899,14 @@ msgid "Animation Key Inserted."
msgstr "Анимациони кључ убачен."
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Pitch"
-msgstr ""
+msgstr "Лево-Десно"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Yaw"
-msgstr ""
+msgstr "Горе-Доле"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
@@ -7722,8 +8055,9 @@ msgid "Cinematic Preview"
msgstr "Направи приказ мрежа"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Not available when using the GLES2 renderer."
-msgstr ""
+msgstr "Недоступно кад користиш GLES2 изцртавање."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Left"
@@ -7764,23 +8098,36 @@ msgid "View Rotation Locked"
msgstr "Прикажи информације"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid ""
"Note: The FPS value displayed is the editor's framerate.\n"
"It cannot be used as a reliable indication of in-game performance."
msgstr ""
+"Белешка: FPS вредност приказана је FPS вредност Уредника.\n"
+"Не може бити коришћена као поуздана оцена учинка у игри."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "XForm дијалог"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "Залепи за мрежу"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Couldn't find a solid floor to snap the selection to."
-msgstr ""
+msgstr "Није пронађен чврст под где ће се одабир прилепити"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -7854,7 +8201,7 @@ msgstr "Трансформација"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Object to Floor"
-msgstr "Залепи за мрежу"
+msgstr "Залепи Објекат за Под"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
@@ -7936,8 +8283,9 @@ msgid "View Z-Far:"
msgstr "Максимум Z за приказ:"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Transform Change"
-msgstr ""
+msgstr "Промена Трансформације"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate:"
@@ -7964,8 +8312,9 @@ msgid "Post"
msgstr "После"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Nameless gizmo"
-msgstr ""
+msgstr "Безимена ручка"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -7983,8 +8332,9 @@ msgid "Create Polygon2D"
msgstr "Направи полигон"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Polygon2D Preview"
-msgstr ""
+msgstr "Приказ Polygon2D"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -8012,12 +8362,14 @@ msgid "Sprite is empty!"
msgstr "Мрежа је празна!"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Can't convert a sprite using animation frames to mesh."
-msgstr ""
+msgstr "Неуспело претварање спрајта користећи анимационе оквире у мрежу."
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Invalid geometry, can't replace by mesh."
-msgstr ""
+msgstr "Неважећа геометрија, неуспеша замена са мрежом."
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -8025,8 +8377,9 @@ msgid "Convert to Mesh2D"
msgstr "Претвори у велика слова"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Invalid geometry, can't create polygon."
-msgstr ""
+msgstr "Неважећа геометрија, неуспешно креирање многоугла."
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -8034,8 +8387,9 @@ msgid "Convert to Polygon2D"
msgstr "Помери полигон"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Invalid geometry, can't create collision polygon."
-msgstr ""
+msgstr "Неважећа геометрија, неуспело креирање сударног многоугла."
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -8043,8 +8397,9 @@ msgid "Create CollisionPolygon2D Sibling"
msgstr "Направи навигациони полигон"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Invalid geometry, can't create light occluder."
-msgstr ""
+msgstr "Неважећа геометрија, неуспело креирање затамљивача светла."
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -8057,16 +8412,19 @@ msgid "Sprite"
msgstr "Налепи оквир"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Simplification: "
-msgstr ""
+msgstr "Поједностављено:"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Shrink (Pixels): "
-msgstr ""
+msgstr "Умањи (Пиксели):"
#: editor/plugins/sprite_editor_plugin.cpp
+#, fuzzy
msgid "Grow (Pixels): "
-msgstr ""
+msgstr "Увећај (Пиксели):"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -8156,8 +8514,9 @@ msgid "Add a Texture from File"
msgstr "Сними од пиксела"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Add Frames from a Sprite Sheet"
-msgstr ""
+msgstr "Додај Рамове са Спрајт Листе"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -8181,13 +8540,14 @@ msgid "Select Frames"
msgstr "Одабери режим"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Horizontal:"
-msgstr ""
+msgstr "Хоризонтално:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
msgid "Vertical:"
-msgstr "Тачке"
+msgstr "Вертикално:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
@@ -8244,8 +8604,9 @@ msgid "Step:"
msgstr "Корак:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
msgid "Sep.:"
-msgstr ""
+msgstr "Сеп.:"
#: editor/plugins/texture_region_editor_plugin.cpp
#, fuzzy
@@ -8317,12 +8678,14 @@ msgid "Disabled Item"
msgstr "Онемогућено"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Check Item"
-msgstr ""
+msgstr "Провери Предмет"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Checked Item"
-msgstr ""
+msgstr "Предмет проверен"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8335,12 +8698,14 @@ msgid "Checked Radio Item"
msgstr "CheckBox Radio1"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Named Sep."
-msgstr ""
+msgstr "Иманован Сеп."
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Submenu"
-msgstr ""
+msgstr "Под-мени"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8385,8 +8750,9 @@ msgid "Editable Item"
msgstr "Измени тему..."
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Subtree"
-msgstr ""
+msgstr "Под-стабло"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8461,8 +8827,9 @@ msgid "Find Tile"
msgstr "Нађи плочицу"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Transpose"
-msgstr ""
+msgstr "Преокрени"
#: editor/plugins/tile_map_editor_plugin.cpp
#, fuzzy
@@ -8480,18 +8847,22 @@ msgid "Filter tiles"
msgstr "Филтрирај датотеке..."
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Give a TileSet resource to this TileMap to use its tiles."
-msgstr ""
+msgstr "Дај КомплетПлочица ресурс овом КомплетуМапа да користе његове плочице."
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint Tile"
msgstr "Цртај полчице"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid ""
"Shift+LMB: Line Draw\n"
"Shift+Ctrl+LMB: Rectangle Paint"
msgstr ""
+"Shift+LMB: Цртање Линије\n"
+"Shift+Ctrl+LMB: Бојење Четвороугла"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
@@ -8508,21 +8879,24 @@ msgid "Rotate Right"
msgstr "Ротирај полигон"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Flip Horizontally"
-msgstr ""
+msgstr "Обрни Хоризонтално"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Flip Vertically"
-msgstr ""
+msgstr "Обрни Вертикално"
#: editor/plugins/tile_map_editor_plugin.cpp
#, fuzzy
msgid "Clear Transform"
-msgstr "Трансформација"
+msgstr "Очисти Трансформацију"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Add Texture(s) to TileSet."
-msgstr ""
+msgstr "Додај Текстуру(е) КомплетуПлочица."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8539,8 +8913,9 @@ msgid "Merge from Scene"
msgstr "Споји од сцене"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "New Single Tile"
-msgstr ""
+msgstr "Нова Једна Плочица"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8548,8 +8923,9 @@ msgid "New Autotile"
msgstr "Аутоматски рез"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "New Atlas"
-msgstr ""
+msgstr "Нов Атлас"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8557,8 +8933,9 @@ msgid "Next Coordinate"
msgstr "Следећа скриптица"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Select the next shape, subtile, or Tile."
-msgstr ""
+msgstr "Одабери следећи облик, под-плочицу, или плочицу."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8566,8 +8943,9 @@ msgid "Previous Coordinate"
msgstr "Претодни спрат"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Select the previous shape, subtile, or Tile."
-msgstr ""
+msgstr "Одабери претходни облик, под-плочицу, или плочицу."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8645,8 +9023,9 @@ msgid "Z Index Mode"
msgstr "Режим инспекције"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Copy bitmask."
-msgstr ""
+msgstr "Копирај БитМаску."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8669,21 +9048,26 @@ msgid "Create a new polygon."
msgstr "Направи нови полигон од почетка."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Keep polygon inside region Rect."
-msgstr ""
+msgstr "Задржи многоугао унутар региона Четвороугла."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Enable snap and show grid (configurable via the Inspector)."
-msgstr ""
+msgstr "Омогући лепљење и прикажи мрежу ( подесива преко инспектора)."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Display Tile Names (Hold Alt Key)"
-msgstr ""
+msgstr "Прикажи Имена Плочица (Држи Alt дугмић)"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid ""
"Add or select a texture on the left panel to edit the tiles bound to it."
msgstr ""
+"Додај или одабери текстуру на левом панелу да измениш њену везану плочицу."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8691,12 +9075,14 @@ msgid "Remove selected texture? This will remove all tiles which use it."
msgstr "Обриши тачку криве"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "You haven't selected a texture to remove."
-msgstr ""
+msgstr "Текстура за уклањање није одабрана."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create from scene? This will overwrite all current tiles."
-msgstr ""
+msgstr "Креирај од сцене? Ово ће преписати све тренутне плочице."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8709,14 +9095,18 @@ msgid "Remove Texture"
msgstr "Обриши шаблон"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "%s file(s) were not added because was already on the list."
-msgstr ""
+msgstr "%s фајл(ови) нису додани јер су већ на листи."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid ""
"Drag handles to edit Rect.\n"
"Click on another Tile to edit it."
msgstr ""
+"Вуци ручице да изениш Правоугаоник.\n"
+"Кликни на другу плочицу да је измениш."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8745,17 +9135,24 @@ msgid ""
msgstr "Сачувај тренутно измењени ресурс."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid ""
"Select sub-tile to use as icon, this will be also used on invalid autotile "
"bindings.\n"
"Click on another Tile to edit it."
msgstr ""
+"Одабери под-плочицу као иконицу, ово ће такође бити изкоришћено на неважећим "
+"спојевима ауто-плочицица.\n"
+"Кликни на другу плочицу да је измениш."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid ""
"Select sub-tile to change its priority.\n"
"Click on another Tile to edit it."
msgstr ""
+"Одабери под-плочицу да измениш њен приоритет.\n"
+"Кликни на другу плочицу да је измениш."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8775,8 +9172,9 @@ msgid "Create Tile"
msgstr "Направи директоријум"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Set Tile Icon"
-msgstr ""
+msgstr "Постави иконицу Плочице"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8804,8 +9202,9 @@ msgid "Paste Tile Bitmask"
msgstr "Налепи анимацију"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Clear Tile Bitmask"
-msgstr ""
+msgstr "Очисти БитМаске са Плочице"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8843,8 +9242,9 @@ msgid "Edit Tile Priority"
msgstr "Уреди филтере"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Edit Tile Z Index"
-msgstr ""
+msgstr "Измени Z индекс Плочице"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8877,8 +9277,9 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "No VCS addons are available."
-msgstr ""
+msgstr " VCS додатци нису доступни."
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
@@ -8890,8 +9291,9 @@ msgid "No commit message was provided"
msgstr "Име није дато"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "No files added to stage"
-msgstr ""
+msgstr "Ни један фајл није додат на позорницу"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -8899,12 +9301,14 @@ msgid "Commit"
msgstr "Заједница"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "VCS Addon is not initialized"
-msgstr ""
+msgstr "VCS додатак није иницијализован"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "Version Control System"
-msgstr ""
+msgstr "VCS(Систем Контроле Верзије)"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -8912,8 +9316,9 @@ msgid "Initialize"
msgstr "Велика слова"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "Staging area"
-msgstr ""
+msgstr "Сценски простор"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -8926,8 +9331,9 @@ msgid "Changes"
msgstr "Промене шејдера"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "Modified"
-msgstr ""
+msgstr "Измењено"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -8940,8 +9346,9 @@ msgid "Deleted"
msgstr "Обриши"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "Typechange"
-msgstr ""
+msgstr "Промена типа"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -8954,8 +9361,9 @@ msgid "Stage All"
msgstr "Сачувај све"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "Add a commit message"
-msgstr ""
+msgstr "Додај предајну поруку"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -8964,24 +9372,29 @@ msgstr "Синхронизуј промене скриптица"
#: editor/plugins/version_control_editor_plugin.cpp
#: modules/gdnative/gdnative_library_singleton_editor.cpp
+#, fuzzy
msgid "Status"
-msgstr ""
+msgstr "Статус"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "View file diffs before committing them to the latest version"
-msgstr ""
+msgstr "Погледај фајл разлике пре него га предаш задњој верзији."
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "No file diff is active"
-msgstr ""
+msgstr "Ни једна фајл разлика није активна"
#: editor/plugins/version_control_editor_plugin.cpp
+#, fuzzy
msgid "Detect changes in file diff"
-msgstr ""
+msgstr "Пронађене промене у фајл разликама"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "(GLES3 only)"
-msgstr ""
+msgstr "(само GLES3)"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -8999,12 +9412,14 @@ msgid "Vector"
msgstr "Инспектор"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Boolean"
-msgstr ""
+msgstr "Тачница"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Sampler"
-msgstr ""
+msgstr "Узрокотвор"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9012,8 +9427,9 @@ msgid "Add input port"
msgstr "Додај улаз"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Add output port"
-msgstr ""
+msgstr "Додај одлазни порт"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9056,8 +9472,9 @@ msgid "Resize VisualShader node"
msgstr "Шејдер"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Set Uniform Name"
-msgstr ""
+msgstr "Постави Јединствено Име"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9076,17 +9493,19 @@ msgstr "Дуплирај чвор/ове графа"
#: editor/plugins/visual_shader_editor_plugin.cpp
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Paste Nodes"
-msgstr ""
+msgstr "Налепи Чворове"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Delete Nodes"
-msgstr "Направи чвор"
+msgstr "Обриши Чворове"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Visual Shader Input Type Changed"
-msgstr ""
+msgstr "Улазна Врста Визуелног Цртача промењена"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9094,8 +9513,9 @@ msgid "Vertex"
msgstr "Тачке"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Fragment"
-msgstr ""
+msgstr "Део"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9118,8 +9538,9 @@ msgid "Color function."
msgstr "Иди на функцију..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Color operator."
-msgstr ""
+msgstr "Операције боје."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9127,359 +9548,441 @@ msgid "Grayscale function."
msgstr "Направи функцију"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Converts HSV vector to RGB equivalent."
-msgstr ""
+msgstr "Претвара HSV вектор у RGB."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Converts RGB vector to HSV equivalent."
-msgstr ""
+msgstr "Претвара RGB вектор у HSV."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Sepia function."
-msgstr "Направи функцију"
+msgstr "Sepia функција."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Burn operator."
-msgstr ""
+msgstr "Нагорено оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Darken operator."
-msgstr ""
+msgstr "Затамњење оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Difference operator."
-msgstr "Само разлике"
+msgstr "Различитости оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Dodge operator."
-msgstr ""
+msgstr "Упијање оперетор."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "HardLight operator."
-msgstr "Промени скаларни оператор"
+msgstr "ЈакаСветла оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Lighten operator."
-msgstr ""
+msgstr "Посветли оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Overlay operator."
-msgstr ""
+msgstr "Прекриј оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Screen operator."
-msgstr ""
+msgstr "Заслон оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "SoftLight operator."
-msgstr ""
+msgstr "МекоСветло оператор."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Color constant."
-msgstr "Константан"
+msgstr "Боја константна."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Color uniform."
-msgstr "Трансформација"
+msgstr "Боја хомогена."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the boolean result of the %s comparison between two parameters."
-msgstr ""
+msgstr "Враћа Булов резултат од %s порећења између 2 параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Equal (==)"
-msgstr ""
+msgstr "Једнако (==)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Greater Than (>)"
-msgstr ""
+msgstr "Веће од (>)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Greater Than or Equal (>=)"
-msgstr ""
+msgstr "Веће или Једнако (>=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns an associated vector if the provided scalars are equal, greater or "
"less."
msgstr ""
+"Враћа асоцијативни вектор ако су снабдевени скалари једнаки, већи или мањи."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns the boolean result of the comparison between INF and a scalar "
"parameter."
-msgstr ""
+msgstr "Враћа Булов резултат након поређења измђу INF и скаларног параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns the boolean result of the comparison between NaN and a scalar "
"parameter."
-msgstr ""
+msgstr "Враћа Булов резултат након поређења NaN и скаларног параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Less Than (<)"
-msgstr ""
+msgstr "Мање од (<)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Less Than or Equal (<=)"
-msgstr ""
+msgstr "Мање или Једнако (<=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Not Equal (!=)"
-msgstr ""
+msgstr "Неједнако (!=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns an associated vector if the provided boolean value is true or false."
msgstr ""
+"Враћа асоцијативни вектор ако је снабдевена Булова вредност тачна или "
+"нетачна."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns an associated scalar if the provided boolean value is true or false."
msgstr ""
+"Враћа асоцијативни скалар ако је снабдевена Булова вредност тачна или "
+"нетачна."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the boolean result of the comparison between two parameters."
-msgstr ""
+msgstr "Враћа Булов резултат након поређења 2 параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns the boolean result of the comparison between INF (or NaN) and a "
"scalar parameter."
msgstr ""
+"Враћа Булов резултат након поређења између INF (или NaN) и скаларног "
+"параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Boolean constant."
-msgstr "Промени векторску константу"
+msgstr "Бул константан."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Boolean uniform."
-msgstr ""
+msgstr "Бул уједначен."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "'%s' input parameter for all shader modes."
-msgstr ""
+msgstr "'%s' улазни параметар за све Цртачке Режиме."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Input parameter."
-msgstr "Лепи за родитеља"
+msgstr "Улазни параметар"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "'%s' input parameter for vertex and fragment shader modes."
-msgstr ""
+msgstr "'%s' улазни параметар за тачкасте и раздељене Цртачке Режиме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "'%s' input parameter for fragment and light shader modes."
-msgstr ""
+msgstr "'%s' улазни параметар за раздељене и светле Цртачке Режиме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "'%s' input parameter for fragment shader mode."
-msgstr ""
+msgstr "'%s' улазни параметар за раздељене Цртачке Режиме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "'%s' input parameter for light shader mode."
-msgstr ""
+msgstr "'%s' улазни параметар за светле Цртачке Режиме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "'%s' input parameter for vertex shader mode."
-msgstr ""
+msgstr "'%s' улазни параметар за тачкасте Цртачке Режиме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "'%s' input parameter for vertex and fragment shader mode."
-msgstr ""
+msgstr "'%s' улазни параметар за тачкасте и раздељене Цртачке Режиме."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Scalar function."
-msgstr "Промени скаларну функцију"
+msgstr "Скаларна функција."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Scalar operator."
-msgstr "Промени скаларни оператор"
+msgstr "Скаларни опреатор."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "E constant (2.718282). Represents the base of the natural logarithm."
-msgstr ""
+msgstr "E константа (2.718282). Представља базу природног логаритма."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Epsilon constant (0.00001). Smallest possible scalar number."
-msgstr ""
+msgstr "Епсилон константа (0.00001). Најмањи могући скаларни број."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Phi constant (1.618034). Golden ratio."
-msgstr ""
+msgstr " Phi константа (1.618034). Златни пресек."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Pi/4 constant (0.785398) or 45 degrees."
-msgstr ""
+msgstr "Pi/4 константа (0.785398) или 45 степени."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Pi/2 constant (1.570796) or 90 degrees."
-msgstr ""
+msgstr "Pi/2 константа (1.570796) или 90 степени."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Pi constant (3.141593) or 180 degrees."
-msgstr ""
+msgstr "Pi константа (3.141593) или 180 степени."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Tau constant (6.283185) or 360 degrees."
-msgstr ""
+msgstr "Tau константа (6.283185) или 360 степни."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Sqrt2 constant (1.414214). Square root of 2."
-msgstr ""
+msgstr "Sqrt2 константа (1.414214). Корен од 2."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the absolute value of the parameter."
-msgstr ""
+msgstr "Враћа абсолутну вредност параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the arc-cosine of the parameter."
-msgstr ""
+msgstr "Враћа арк-косинус параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the inverse hyperbolic cosine of the parameter."
-msgstr ""
+msgstr "Враћа обрнут хиперболични косинус параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the arc-sine of the parameter."
-msgstr ""
+msgstr "Враћа арк-синус параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the inverse hyperbolic sine of the parameter."
-msgstr ""
+msgstr "Враћа обрнут хиперболични синус параметра"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the arc-tangent of the parameter."
-msgstr ""
+msgstr "Враћа арк-тангенту параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the arc-tangent of the parameters."
-msgstr ""
+msgstr "Враћа арк-тангенту параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the inverse hyperbolic tangent of the parameter."
-msgstr ""
+msgstr "Враћа обрнуту хиперболичну тангенту параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Finds the nearest integer that is greater than or equal to the parameter."
-msgstr ""
+msgstr "Налази најближи интиџер који је већи или једнак параметру."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Constrains a value to lie between two further values."
-msgstr ""
+msgstr "Ограђује вредност између 2 наредне вредности."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the cosine of the parameter."
-msgstr ""
+msgstr "Враћа косинус параметра"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the hyperbolic cosine of the parameter."
-msgstr ""
+msgstr "Враћа хиперболички косинус параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Converts a quantity in radians to degrees."
-msgstr ""
+msgstr "Претвара количину из радијана у степене."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Base-e Exponential."
-msgstr ""
+msgstr "База-е Експоненцијал."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Base-2 Exponential."
-msgstr ""
+msgstr "База-е Експоненцијал."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Finds the nearest integer less than or equal to the parameter."
-msgstr ""
+msgstr "Налази најближи интиџер мањи или једнак параметру."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Computes the fractional part of the argument."
-msgstr ""
+msgstr "Прорачунава фракциони део аргумента."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the inverse of the square root of the parameter."
-msgstr ""
+msgstr "Враћа обрнути квадратни корен параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Natural logarithm."
-msgstr ""
+msgstr "Природни логаритам."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Base-2 logarithm."
-msgstr ""
+msgstr "База-2 логаритам."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the greater of two values."
-msgstr ""
+msgstr "Враћа већу од 2 понуђене вредности."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the lesser of two values."
-msgstr ""
+msgstr "Враћа мању од 2 понуђене вредности."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Linear interpolation between two scalars."
-msgstr ""
+msgstr "Линеарно уметање између 2 скалара."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the opposite value of the parameter."
-msgstr ""
+msgstr "Враћа супротну вредност параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "1.0 - scalar"
-msgstr ""
+msgstr "1.0 - скалар"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns the value of the first parameter raised to the power of the second."
-msgstr ""
+msgstr "Враћа вредност првог параметра увећану за вредност другог."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Converts a quantity in degrees to radians."
-msgstr ""
+msgstr "Претвара количину из степена у радијане."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "1.0 / scalar"
-msgstr ""
+msgstr "1.0 / скалар"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Finds the nearest integer to the parameter."
-msgstr ""
+msgstr "Налази најближи интиџер параметру."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Finds the nearest even integer to the parameter."
-msgstr ""
+msgstr "Налази најближи једнак интиџер параметру."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Clamps the value between 0.0 and 1.0."
-msgstr ""
+msgstr "Притеже вредност између 0.0 и 1.0."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Extracts the sign of the parameter."
-msgstr ""
+msgstr "Извлачи знак параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the sine of the parameter."
-msgstr ""
+msgstr "Враћа синус параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the hyperbolic sine of the parameter."
-msgstr ""
+msgstr "Враћа хиперболичи синус параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the square root of the parameter."
-msgstr ""
+msgstr "Враћа квадратни корен параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n"
"\n"
@@ -9487,45 +9990,60 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"УглађенКорак функција ( скалар(ивица0), скалар(ивица1), скалар(x) ).\n"
+"Враћа 0.0 ако је 'x' мање од 'ивице0' и 1.0 ако је x веће од 'edge1'. Иначе "
+"враћена вредност је уметнутута између 0.0 и 1.0 користећи Хермитове полиноме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Step function( scalar(edge), scalar(x) ).\n"
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Корак функција ( scalar(edge), scalar(x) ).\n"
+"\n"
+"Враћа 0.0 ако је 'x' мање од 'ивице' иначе враћа 1.0."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the tangent of the parameter."
-msgstr ""
+msgstr "Враћа танкгенту параметра"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the hyperbolic tangent of the parameter."
-msgstr ""
+msgstr "Враћа хипероболичну тангенту параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Finds the truncated value of the parameter."
-msgstr ""
+msgstr "Налази скраћену вредност параметра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Adds scalar to scalar."
-msgstr ""
+msgstr "Додаје скалар скалару."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Divides scalar by scalar."
-msgstr ""
+msgstr "Дели скалар са скаларом."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Multiplies scalar by scalar."
-msgstr ""
+msgstr "Множи скалар са скаларом."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the remainder of the two scalars."
-msgstr ""
+msgstr "Враћа остатак 2 скалара."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Subtracts scalar from scalar."
-msgstr ""
+msgstr "Одузима скалар од скалара."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9538,12 +10056,14 @@ msgid "Scalar uniform."
msgstr "Промени скаларну униформу (uniform)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Perform the cubic texture lookup."
-msgstr ""
+msgstr "Извршава претрагу кубичне текстуре."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Perform the texture lookup."
-msgstr ""
+msgstr "Извршава претрагу текстуре."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9566,6 +10086,7 @@ msgid "Transform function."
msgstr "Прозор трансформације..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Calculate the outer product of a pair of vectors.\n"
"\n"
@@ -9575,34 +10096,47 @@ msgid ""
"whose number of rows is the number of components in 'c' and whose number of "
"columns is the number of components in 'r'."
msgstr ""
+"Прорачунава спољашњи продукт векторског пара.\n"
+"СпољашњиПродукт третира први параметар 'c' као вектор колону (матрица са "
+"једном колоном) и други параметар 'r' као ред вектор (матрица са једним "
+"редом) и одрађује линеарно алгебарско множење матрица 'c * r', приносећи "
+"матрицу чији број редова је број компоненти у 'c' и број колона је број "
+"компоненти у 'r'."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Composes transform from four vectors."
-msgstr ""
+msgstr "Саставља трансформу од четири вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Decomposes transform to four vectors."
-msgstr ""
+msgstr "Раставља трансформу у четри вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Calculates the determinant of a transform."
-msgstr ""
+msgstr "Прорачунава детерминанту трансформе."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Calculates the inverse of a transform."
-msgstr ""
+msgstr "Прорачунава инверзију трансформе."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Calculates the transpose of a transform."
-msgstr ""
+msgstr "Прорачунава пренос трансформе."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Multiplies transform by transform."
-msgstr ""
+msgstr "Множи трансформу трансформом."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Multiplies vector by transform."
-msgstr ""
+msgstr "Множи вектор са трансформом."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9625,68 +10159,89 @@ msgid "Vector operator."
msgstr "Промени векторски оператор"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Composes vector from three scalars."
-msgstr ""
+msgstr "Саставља вектор од 3 скалара."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Decomposes vector to three scalars."
-msgstr ""
+msgstr "Раставља вектор у 3 скалара."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Calculates the cross product of two vectors."
-msgstr ""
+msgstr "Прорачунава векторски производ 2 вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the distance between two points."
-msgstr ""
+msgstr "Враћа растојање између 2 тачке."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Calculates the dot product of two vectors."
-msgstr ""
+msgstr "Прорачунава скаларни производ 2 вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns the vector that points in the same direction as a reference vector. "
"The function has three vector parameters : N, the vector to orient, I, the "
"incident vector, and Nref, the reference vector. If the dot product of I and "
"Nref is smaller than zero the return value is N. Otherwise -N is returned."
msgstr ""
+"Враћа вектор који упућује у истом правцу као и дати вектор. Функција има три "
+"вектор параметра: N, оријнтациони вектор, I, вектор инцидента, и Nref , "
+"референтни вектор. Ако је скаларни продукт од I и Nref мањи од 0 повратна "
+"вредност је N. У супротном враћа -N."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Calculates the length of a vector."
-msgstr ""
+msgstr "Прорачунава дужину вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Linear interpolation between two vectors."
-msgstr ""
+msgstr "Линерно уметање између 2 вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Linear interpolation between two vectors using scalar."
-msgstr ""
+msgstr "Линерно уметање између 2 вектора користећи скалар."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Calculates the normalize product of vector."
-msgstr ""
+msgstr "Прорачунава нормализовани векторски продукт."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "1.0 - vector"
-msgstr ""
+msgstr "1.0 - вектор"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "1.0 / vector"
-msgstr ""
+msgstr "1.0 / вектор"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns the vector that points in the direction of reflection ( a : incident "
"vector, b : normal vector )."
msgstr ""
+"Враћа вектор који указује у правцу одраза ( a : вектор инцидента, b : "
+"нормални вектор )."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the vector that points in the direction of refraction."
-msgstr ""
+msgstr "Враћа вектор који указује у правцу преламања."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n"
"\n"
@@ -9694,8 +10249,14 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"ГлаткиКорак функција ( вектор(ивица0), вектор(ивица1), вектор(x) ).\n"
+"\n"
+"Враћа 0.0 ако је 'x' мање од 'ивице0' и 1.0 ако је 'x' веће од 'ивице1'. У "
+"супротном повратна вредност уметнута између 0.0 и 1.0 користећи Хермитове "
+"полиноме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n"
"\n"
@@ -9703,40 +10264,58 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"ГлаткиКорак функција ( скалар(ивица0), скалар(ивица1), вектор(x) ).\n"
+"\n"
+"Враћа 0.0 ако је 'x' мање од 'ивице0' и 1.0 ако је 'x' веће од 'ивице1'. У "
+"супротном повратна вредност је уметнута између 0.0 и 1.0 користећи Хермитове "
+"полиноме."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Step function( vector(edge), vector(x) ).\n"
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Корак функција ( вектор(ивица), вектор(x) ).\n"
+"\n"
+"Враћа 0.0 ако је 'x' мање од 'ивице' у супротном 1.0."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Step function( scalar(edge), vector(x) ).\n"
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Корак функција ( акалар(ивица), вектор(x) ).\n"
+"\n"
+"Враћа 0.0 ако је 'x' мање од 'ивице' у супротном 1.0."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Adds vector to vector."
-msgstr ""
+msgstr "Додаје вектор вектору."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Divides vector by vector."
-msgstr ""
+msgstr "Дели вектор са вектором."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Multiplies vector by vector."
-msgstr ""
+msgstr "Множи вектор са вектором."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Returns the remainder of the two vectors."
-msgstr ""
+msgstr "Враћа остатак 2 вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Subtracts vector from vector."
-msgstr ""
+msgstr "Одузима вектор од вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9749,84 +10328,112 @@ msgid "Vector uniform."
msgstr "Промени векторску униформу (uniform)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Custom Godot Shader Language expression, with custom amount of input and "
"output ports. This is a direct injection of code into the vertex/fragment/"
"light function, do not use it to write the function declarations inside."
msgstr ""
+"Произвољни израз за Годот Цртачки Језик, са произвољном количином улазних и "
+"излазних портова. Ово је директно убризгавање кода у тачка/део/светло "
+"функцију, не користи за писање декларација функција унутра."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Returns falloff based on the dot product of surface normal and view "
"direction of camera (pass associated inputs to it)."
msgstr ""
+"Враћа смањење базирано на скаларном продукту нормале површине и правца "
+"гледања камере (прослеђује удружене улазе)."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"Custom Godot Shader Language expression, which is placed on top of the "
"resulted shader. You can place various function definitions inside and call "
"it later in the Expressions. You can also declare varyings, uniforms and "
"constants."
msgstr ""
+"Произвољни израз Годот Цртачког Језика, који је постављен на врх "
+"резултирајућег цртача. Можеш поставити разне дефиниције функција унутра и "
+"позвати их касније у Изразу. Такође можеш дакларисати варијације, униформе и "
+"константе."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "(Fragment/Light mode only) Scalar derivative function."
-msgstr ""
+msgstr "(само Део/Светло режим) Функција скаларне деривације."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "(Fragment/Light mode only) Vector derivative function."
-msgstr ""
+msgstr "(само Део/Светло режим) Вектор скаларне деривације."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'x' using local "
"differencing."
msgstr ""
+"(само Део/Светло режим) (Вектор) Дериват у 'x' користећи локалну "
+"диференцијацију."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'x' using local "
"differencing."
msgstr ""
+"(само Део/Светло режим) (Скалар) Дериват у 'x' користећи локалну "
+"диференцијацију."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'y' using local "
"differencing."
msgstr ""
+"(само Део/Светло режим) (Вектор) Дериват у 'y' користећи локалну "
+"диференцијацију."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'y' using local "
"differencing."
msgstr ""
+"(само Део/Светло режим) (Скалар) Дериват у 'y' користећи локалну "
+"диференцијацију."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and "
"'y'."
-msgstr ""
+msgstr "(само Део/Светло режим) (Вектор) Сума абсолутних деривата у 'x' и 'y'."
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid ""
"(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and "
"'y'."
-msgstr ""
+msgstr "(само Део/Светло режим) (Скалар) Сума абсолутних деривата у 'x' и 'y'."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "VisualShader"
-msgstr "Шејдер"
+msgstr "ВизуелниЦртач"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Edit Visual Property"
-msgstr "Уреди филтере"
+msgstr "Уреди Визуелне Особине"
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Visual Shader Mode Changed"
-msgstr "Промене шејдера"
+msgstr "Визуелни Цртач Режим промењен"
#: editor/project_export.cpp
msgid "Runnable"
@@ -9835,11 +10442,12 @@ msgstr "Покретљива"
#: editor/project_export.cpp
#, fuzzy
msgid "Add initial export..."
-msgstr "Додај улаз"
+msgstr "Додај почетни извоз..."
#: editor/project_export.cpp
+#, fuzzy
msgid "Add previous patches..."
-msgstr ""
+msgstr "Додај претходне закрпе..."
#: editor/project_export.cpp
msgid "Delete patch '%s' from list?"
@@ -9851,21 +10459,29 @@ msgid "Delete preset '%s'?"
msgstr "Обриши поставку „%s“?"
#: editor/project_export.cpp
+#, fuzzy
msgid ""
"Failed to export the project for platform '%s'.\n"
"Export templates seem to be missing or invalid."
msgstr ""
+"Неуспешан извоз пројекта за плазформу '%s'.\n"
+"Изгледа да недостају извозни нацрти или нису исправни."
#: editor/project_export.cpp
+#, fuzzy
msgid ""
"Failed to export the project for platform '%s'.\n"
"This might be due to a configuration issue in the export preset or your "
"export settings."
msgstr ""
+"Неуспешан извоз пројекта за платформу '%s'.\n"
+"Ово може бити због проблема са подешавањима у извозним поставкама или твојим "
+"извозним подешавањима."
#: editor/project_export.cpp
+#, fuzzy
msgid "Release"
-msgstr ""
+msgstr "Издање"
#: editor/project_export.cpp
#, fuzzy
@@ -9891,10 +10507,12 @@ msgid "Add..."
msgstr "Додај..."
#: editor/project_export.cpp
+#, fuzzy
msgid ""
"If checked, the preset will be available for use in one-click deploy.\n"
"Only one preset per platform may be marked as runnable."
msgstr ""
+"Ако је означено, поставке ће бити омогућене за коришћење у један-клик развој."
#: editor/project_export.cpp
#, fuzzy
@@ -9961,8 +10579,9 @@ msgid "Features"
msgstr "Карактеристике"
#: editor/project_export.cpp
+#, fuzzy
msgid "Custom (comma-separated):"
-msgstr ""
+msgstr "Произвољно (одвојено зарезом):"
#: editor/project_export.cpp
msgid "Feature List:"
@@ -9979,24 +10598,29 @@ msgid "Script Export Mode:"
msgstr "Режим извоза:"
#: editor/project_export.cpp
+#, fuzzy
msgid "Text"
-msgstr ""
+msgstr "Текст"
#: editor/project_export.cpp
+#, fuzzy
msgid "Compiled"
-msgstr ""
+msgstr "Састављено"
#: editor/project_export.cpp
+#, fuzzy
msgid "Encrypted (Provide Key Below)"
-msgstr ""
+msgstr "Шифровано (Одабери Кључ Испод)"
#: editor/project_export.cpp
+#, fuzzy
msgid "Invalid Encryption Key (must be 64 characters long)"
-msgstr ""
+msgstr "Неважећи Кључ за Шифровање(мора бити 64 карактера дуг)"
#: editor/project_export.cpp
+#, fuzzy
msgid "Script Encryption Key (256-bits as hex):"
-msgstr ""
+msgstr "Кључ Шифровања Скрипте (256-бајтова као хекс)"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -10022,8 +10646,9 @@ msgid "ZIP File"
msgstr " Датотеке"
#: editor/project_export.cpp
+#, fuzzy
msgid "Godot Game Pack"
-msgstr ""
+msgstr "Годот Игра Паковање"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
@@ -10034,8 +10659,9 @@ msgid "Manage Export Templates"
msgstr "Управљај извозним шаблонима"
#: editor/project_export.cpp
+#, fuzzy
msgid "Export With Debug"
-msgstr ""
+msgstr "Извези са Инсектицидом"
#: editor/project_manager.cpp
#, fuzzy
@@ -10048,29 +10674,35 @@ msgid "Error opening package file (it's not in ZIP format)."
msgstr "Грешка при отварању датотеку пакета. Датотека није zip формата."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr ""
+msgstr "Неважећи \".zip\" пројекат фајл; не садржи \"project.godot\" фајл."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Please choose an empty folder."
-msgstr ""
+msgstr "Одабери празан фолдер."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr ""
+msgstr "Одабери \"project.godot\" или \".zip\" фајл."
#: editor/project_manager.cpp
+#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr ""
+msgstr "Овај директоријум већ садржи Годот пројекат."
#: editor/project_manager.cpp
+#, fuzzy
msgid "New Game Project"
-msgstr ""
+msgstr "Нова Игра Пројекат"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Imported Project"
-msgstr ""
+msgstr "Увезен Пројекат"
#: editor/project_manager.cpp
#, fuzzy
@@ -10083,118 +10715,149 @@ msgid "Couldn't create folder."
msgstr "Неуспех при прављењу директоријума."
#: editor/project_manager.cpp
+#, fuzzy
msgid "There is already a folder in this path with the specified name."
-msgstr ""
+msgstr "На овој путањи већ постоји фолдер са овим именом."
#: editor/project_manager.cpp
+#, fuzzy
msgid "It would be a good idea to name your project."
-msgstr ""
+msgstr "Била би добра идеја да именујеш свој пројекат."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Invalid project path (changed anything?)."
-msgstr ""
+msgstr "Неважећа путања пројекта(нешто је измењено?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
msgstr ""
+"Неуспешно учитавање project.godot-а у његовој путањи (грешка %d). Могуће да "
+"нешто недостаје или је корумпирано."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Couldn't edit project.godot in project path."
-msgstr ""
+msgstr "Неуспешна измена project.godot-а у путањи пројекта."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr ""
+msgstr "Неуспешно креирање project.godot у путањи пројекта."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Rename Project"
-msgstr ""
+msgstr "Преимениуј Пројекат"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Import Existing Project"
-msgstr ""
+msgstr "Увези Постојећи Пројекат"
#: editor/project_manager.cpp
#, fuzzy
msgid "Import & Edit"
-msgstr "Увоз"
+msgstr "Увези и Измени"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Create New Project"
-msgstr ""
+msgstr "Креирај Нов Пројекат"
#: editor/project_manager.cpp
#, fuzzy
msgid "Create & Edit"
-msgstr "Направи емитер"
+msgstr "Креирај и Измени"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Install Project:"
-msgstr ""
+msgstr "Инсталирај Пројекат:"
#: editor/project_manager.cpp
#, fuzzy
msgid "Install & Edit"
-msgstr "Инсталирај"
+msgstr "Инсталирај и Измени"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Project Name:"
-msgstr ""
+msgstr "Има Пројекта:"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Project Path:"
-msgstr ""
+msgstr "Путања Пројекта:"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Project Installation Path:"
-msgstr ""
+msgstr "Инсталациона Путања Пројекта:"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Renderer:"
-msgstr ""
+msgstr "Цртач:"
#: editor/project_manager.cpp
+#, fuzzy
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Higher visual quality\n"
"All features available\n"
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Виши визуелни квалитет\n"
+"Свe карактеристике доступне\n"
+"Некомпатибилно са старијим хардвером\n"
+"Није препоручљиво за веб игрице"
#: editor/project_manager.cpp
+#, fuzzy
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Lower visual quality\n"
"Some features not available\n"
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Нижи визуелни квалитет\n"
+"Неке карактеристике нису доступне\n"
+"Ради на скоро сваком хардверу\n"
+"Пропоручљиво за веб игрице"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Renderer can be changed later, but scenes may need to be adjusted."
-msgstr ""
+msgstr "Цртач може бити промењен касније, али сцене морају бити прилагођене."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Unnamed Project"
-msgstr ""
+msgstr "Неименован Пројекат"
#: editor/project_manager.cpp
#, fuzzy
msgid "Missing Project"
-msgstr "Пројекат"
+msgstr "Недостаје Пројекат"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Error: Project is missing on the filesystem."
-msgstr ""
+msgstr "Грешка: Пројекат недостаје у фајл систему."
#: editor/project_manager.cpp
#, fuzzy
@@ -10202,10 +10865,12 @@ msgid "Can't open project at '%s'."
msgstr "Не могу отворити '%s'."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Are you sure to open more than one project?"
-msgstr ""
+msgstr "Да ли сигурно желиш да отвориш више одједног пројекта?"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"The following project settings file does not specify the version of Godot "
"through which it was created.\n"
@@ -10217,8 +10882,18 @@ msgid ""
"Warning: You won't be able to open the project with previous versions of the "
"engine anymore."
msgstr ""
+"Наредни фајл са подешавањима пројекта нема наведену верзију Годот-а са у "
+"којем је креиран.\n"
+"\n"
+"%s\n"
+"\n"
+"Ако наставиш са отварањем, биће пребачен у тренутни Годот фајл формат за "
+"подешавања.\n"
+"Упозорење: Више нећеш бити у стању да отвориш пројекат у претходним "
+"верзијама Годот-а."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
@@ -10229,12 +10904,23 @@ msgid ""
"Warning: You won't be able to open the project with previous versions of the "
"engine anymore."
msgstr ""
+"Наведени фајл са подешавањима пројекта је креиран од стране старије верзује "
+"Годот-а, и треба га пребацити у ову верзију:\n"
+"\n"
+"%s\n"
+"\n"
+"Желиш то да извршиш пребацивање?\n"
+"Упозорење: Више нећеш бити у стању да отвориш пројекат са преходном верзијом "
+"Годот-а."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"The project settings were created by a newer engine version, whose settings "
"are not compatible with this version."
msgstr ""
+"Подешавања пројекта су креирана са новијом верзијом Годот-а, која нису "
+"доступна у овој верзији."
#: editor/project_manager.cpp
#, fuzzy
@@ -10248,44 +10934,64 @@ msgstr ""
"„апликација“."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
+"Пројекат није могуће покренути: Средства морају бити увезена.\n"
+"Молимо измени пројекат да активираш иницијални увоз."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Are you sure to run %d projects at once?"
-msgstr ""
+msgstr "Да ли сигурно желиш да покренеш %d пројеката одједном?"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Remove %d projects from the list?\n"
"The project folders' contents won't be modified."
msgstr ""
+"Уклони %d пројекте са листе?\n"
+"Садржај фолдера пројекта неће бити измењен."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Remove this project from the list?\n"
"The project folder's contents won't be modified."
msgstr ""
+"Уклони овај пројекат са листе?\n"
+"Садржај фолдера пројекта неће бити измењен."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Remove all missing projects from the list?\n"
"The project folders' contents won't be modified."
msgstr ""
+"Уклони све изгубљене пројекте са листе?\n"
+"Садржај фолдера пројекта неће бити измењен."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Language changed.\n"
"The interface will update after restarting the editor or project manager."
msgstr ""
+"Језик промењен.\n"
+"Изглед ће бити ажуриран после рестартовања уредника или менеџера пројекта."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"Are you sure to scan %s folders for existing Godot projects?\n"
"This could take a while."
msgstr ""
+"Да ли сигурно желиш да прегледаш %s фолдере у потрази за постојећим Годот "
+"пројектима?\n"
+"Ово може потрајати."
#: editor/project_manager.cpp
msgid "Project Manager"
@@ -10294,350 +11000,434 @@ msgstr "Менаџер пројекта"
#: editor/project_manager.cpp
#, fuzzy
msgid "Projects"
-msgstr "Пројекат"
+msgstr "Пројекти"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Last Modified"
-msgstr ""
+msgstr "Задњи Измењен"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Scan"
-msgstr ""
+msgstr "Претрага"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Select a Folder to Scan"
-msgstr ""
+msgstr "Одабери Фолдер за Претрагу"
#: editor/project_manager.cpp
+#, fuzzy
msgid "New Project"
-msgstr ""
+msgstr "Нов Порјекат"
#: editor/project_manager.cpp
#, fuzzy
msgid "Remove Missing"
-msgstr "Обриши тачку"
+msgstr "Обриши Изгубњено"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Templates"
-msgstr ""
+msgstr "Образси"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Restart Now"
-msgstr ""
+msgstr "Рестартуј Сада"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
-msgstr ""
+msgstr "Пројекат није могуће покренути"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"You currently don't have any projects.\n"
"Would you like to explore official example projects in the Asset Library?"
msgstr ""
+"Тренутно немаш ни један пројекат.\n"
+"Желиш ли да изтражиш званичне примере пројеката из Библиотеке Средстава?"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
"The search box filters projects by name and last path component.\n"
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Оквир за претрагу пробира пројекте на основу имена и последњег дела путање.\n"
+"За пробирање на основу имену и целе путање, упит мора садржати бар један `/` "
+"карактер."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Key "
-msgstr ""
+msgstr "Кључ"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joy Button"
-msgstr ""
+msgstr "Џојс дугмиж"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joy Axis"
-msgstr ""
+msgstr "Џојс Осе"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Mouse Button"
-msgstr ""
+msgstr "Миш Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid ""
"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'"
msgstr ""
+"Неважеће име акције. Не може бити празно или садржати '/', ':', '=', '\\' "
+"или '\"'"
#: editor/project_settings_editor.cpp
#, fuzzy
msgid "An action with the name '%s' already exists."
-msgstr "Грешка: име анимације већ постоји!"
+msgstr "Радња са именом '%s' већ постоји."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Rename Input Action Event"
-msgstr ""
+msgstr "Преименуј Догађај Улазне Радње"
#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Change Action deadzone"
-msgstr "Измени име анимације:"
+msgstr "Измени мртву-зону Радње"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Input Action Event"
-msgstr ""
+msgstr "Додај Догађај Улазне Радње"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "All Devices"
-msgstr ""
+msgstr "Сви Уређаји"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Device"
-msgstr ""
+msgstr "Уређаји"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Press a Key..."
-msgstr ""
+msgstr "Стисни Дугме..."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Mouse Button Index:"
-msgstr ""
+msgstr "Миш Дугме Индекс"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Left Button"
-msgstr ""
+msgstr "Лево Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Right Button"
-msgstr ""
+msgstr "Десно Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Middle Button"
-msgstr ""
+msgstr "Средње Дугма"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Up Button"
-msgstr ""
+msgstr "Точкић Горе Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Down Button"
-msgstr ""
+msgstr "Точкић Доле Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Left Button"
-msgstr ""
+msgstr "Точкић Лево Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Right Button"
-msgstr ""
+msgstr "Точкић Десно Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "X Button 1"
-msgstr ""
+msgstr "X Дугме 1"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "X Button 2"
-msgstr ""
+msgstr "X Дугме 2"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joypad Axis Index:"
-msgstr ""
+msgstr "Џојпад Оса Индекс:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Axis"
-msgstr ""
+msgstr "Осе"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joypad Button Index:"
-msgstr ""
+msgstr "Џојпад Дугме Индекс:"
#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Erase Input Action"
-msgstr "Обриши одабрано"
+msgstr "Обриши Улазну Радњу"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Erase Input Action Event"
-msgstr ""
+msgstr "Обриши Догађај Улазне Радње"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Event"
-msgstr ""
+msgstr "Додај Догађај"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Button"
-msgstr ""
+msgstr "Дугме"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Left Button."
-msgstr ""
+msgstr "Лево Дугме."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Right Button."
-msgstr ""
+msgstr "Десно Дугме."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Middle Button."
-msgstr ""
+msgstr "Средње Дугме."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Up."
-msgstr ""
+msgstr "Точкић Горе."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Down."
-msgstr ""
+msgstr "Точкић Доле."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Global Property"
-msgstr ""
+msgstr "Додај Глобалну Особину"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Select a setting item first!"
-msgstr ""
+msgstr "Прво одабери подешавање предмета!"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "No property '%s' exists."
-msgstr ""
+msgstr "Особина %s' не постоји."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Setting '%s' is internal, and it can't be deleted."
-msgstr ""
+msgstr "Подешавање '%s' је унутрашње, и не може бити обрисано."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Delete Item"
-msgstr ""
+msgstr "Обриши Предмет"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid ""
"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'."
msgstr ""
+"Неважеће име радње. Не може бити празно или садржати '/', ':', '=', '\\' или "
+"'\"'."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Input Action"
-msgstr ""
+msgstr "Додај Улазну Радњу"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Error saving settings."
-msgstr ""
+msgstr "Грешка при памћењу подешавања."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Settings saved OK."
-msgstr ""
+msgstr "Подешавања успешно упамћена."
#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Moved Input Action Event"
-msgstr "Обриши одабрано"
+msgstr "Померен Догађај Улазне Радње"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Override for Feature"
-msgstr ""
+msgstr "Препиши за Особину"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Translation"
-msgstr ""
+msgstr "Додај Превод"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remove Translation"
-msgstr ""
+msgstr "Обриши Превод"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Remapped Path"
-msgstr ""
+msgstr "Додај Преправљену Путању"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Resource Remap Add Remap"
-msgstr ""
+msgstr "Ресурс Преправка Додај Преправку"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Change Resource Remap Language"
-msgstr ""
+msgstr "Промени Језик Ресурс Преправке"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remove Resource Remap"
-msgstr ""
+msgstr "Уклони Ресурс Преправку"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remove Resource Remap Option"
-msgstr ""
+msgstr "Уклони Опцију Ресурс Преправке"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Changed Locale Filter"
-msgstr ""
+msgstr "Измењен Локални Пробирач"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Changed Locale Filter Mode"
-msgstr ""
+msgstr "Измењен Локални Режим Пробирања"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
-msgstr ""
+msgstr "Подешавања Пројекта (project.godot)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
-msgstr ""
+msgstr "Генерална"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Override For..."
-msgstr ""
+msgstr "Препиши За..."
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+#, fuzzy
msgid "The editor must be restarted for changes to take effect."
-msgstr ""
+msgstr "Уредник мора бити рестартован да би наступиле промене."
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Input Map"
-msgstr ""
+msgstr "Мапа Улаза"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Action:"
-msgstr ""
+msgstr "Радња:"
#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Action"
-msgstr "Помери акцију"
+msgstr "Радња"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Deadzone"
-msgstr ""
+msgstr "Мртва-зона"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Device:"
-msgstr ""
+msgstr "Уређај:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Index:"
-msgstr ""
+msgstr "Индекс:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Localization"
-msgstr ""
+msgstr "Локализација"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Translations"
-msgstr ""
+msgstr "Превод"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Translations:"
-msgstr ""
+msgstr "Преводи:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remaps"
-msgstr ""
+msgstr "Преправке"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Resources:"
-msgstr ""
+msgstr "Ресурси:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remaps by Locale:"
-msgstr ""
+msgstr "Локалне Преправке:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Locale"
-msgstr ""
+msgstr "Локал"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Locales Filter"
-msgstr ""
+msgstr "Локални Пробирачи"
#: editor/project_settings_editor.cpp
#, fuzzy
@@ -10650,16 +11440,19 @@ msgid "Show Selected Locales Only"
msgstr "Само одабрано"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Filter mode:"
-msgstr ""
+msgstr "Режим Пробирања:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Locales:"
-msgstr ""
+msgstr "Локал:"
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "AutoLoad"
-msgstr ""
+msgstr "Ауто-Учитавање"
#: editor/project_settings_editor.cpp
msgid "Plugins"
@@ -10670,125 +11463,146 @@ msgid "Preset..."
msgstr "Поставке..."
#: editor/property_editor.cpp
+#, fuzzy
msgid "Zero"
-msgstr ""
+msgstr "Нула"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Easing In-Out"
-msgstr ""
+msgstr "Ублажавање У-Од"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Easing Out-In"
-msgstr ""
+msgstr "Ублажавање Од-У"
#: editor/property_editor.cpp
+#, fuzzy
msgid "File..."
-msgstr ""
+msgstr "Фајл..."
#: editor/property_editor.cpp
+#, fuzzy
msgid "Dir..."
-msgstr ""
+msgstr "Дир..."
#: editor/property_editor.cpp
+#, fuzzy
msgid "Assign"
-msgstr ""
+msgstr "Додели"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Select Node"
-msgstr ""
+msgstr "Одабери Чвор"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Error loading file: Not a resource!"
-msgstr ""
+msgstr "Гречка при учитавању фајла: Није ресурс!"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
-msgstr ""
+msgstr "Одабери Чвор"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Bit %d, val %d."
-msgstr ""
+msgstr "Бит %d, вредност %d."
#: editor/property_selector.cpp
+#, fuzzy
msgid "Select Property"
-msgstr ""
+msgstr "Одабери Особину"
#: editor/property_selector.cpp
+#, fuzzy
msgid "Select Virtual Method"
-msgstr ""
+msgstr "Одабери Виртуелну Методу"
#: editor/property_selector.cpp
+#, fuzzy
msgid "Select Method"
-msgstr ""
+msgstr "Одабери Методу"
#: editor/rename_dialog.cpp editor/scene_tree_dock.cpp
#, fuzzy
msgid "Batch Rename"
-msgstr "Преименуј"
+msgstr "Преименуј Гомилу"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Prefix"
-msgstr ""
+msgstr "Предметак"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Suffix"
-msgstr ""
+msgstr "Наставак"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Постави правоугаони регион"
+msgstr "Користи Регуларне Изразе"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "Advanced Options"
-msgstr "Поставке залепљавања"
+msgstr "Напредне Поставке"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Substitute"
-msgstr ""
+msgstr "Замена"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "Node name"
-msgstr "Име чвора:"
+msgstr "Име Чвора"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Node's parent name, if available"
-msgstr ""
+msgstr "Чворово име оца, ако је доступно"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "Node type"
-msgstr "Име чвора:"
+msgstr "Врста Чвора"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "Current scene name"
-msgstr "Тренутна сцена није сачувана. Ипак отвори?"
+msgstr "Име тренутне сцене"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "Root node name"
-msgstr "Преименуј"
+msgstr "Име кореног нода"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid ""
"Sequential integer counter.\n"
"Compare counter options."
-msgstr ""
+msgstr "Редни бројач интиџера"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Per-level Counter"
-msgstr ""
+msgstr "Пред-Ниво Бројач"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "If set the counter restarts for each group of child nodes"
-msgstr ""
+msgstr "Ако је постављен, бројач се рестартује за сваку групу деце чворова"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Initial value for the counter"
-msgstr ""
+msgstr "Иницијална вредност бројача"
#: editor/rename_dialog.cpp
#, fuzzy
@@ -10796,38 +11610,48 @@ msgid "Step"
msgstr "Корак:"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Amount by which counter is incremented for each node"
-msgstr ""
+msgstr "Износ за који је бројач увећан за сваки Чвор"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Padding"
-msgstr ""
+msgstr " Пуњење"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid ""
"Minimum number of digits for the counter.\n"
"Missing digits are padded with leading zeros."
msgstr ""
+"Најмањи број цифара за сваки бројач.\n"
+"Недостатак цифара је попуњен водећим нулама."
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Post-Process"
-msgstr ""
+msgstr "Након-Обраде"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Keep"
-msgstr ""
+msgstr "Задржи"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "PascalCase to snake_case"
-msgstr ""
+msgstr "ПаскалЗапис у змија_запис"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "snake_case to PascalCase"
-msgstr ""
+msgstr "змија_запис у ПаскалЗапис"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Case"
-msgstr ""
+msgstr "Запис"
#: editor/rename_dialog.cpp
#, fuzzy
@@ -10845,155 +11669,193 @@ msgid "Reset"
msgstr "Ресетуј увеличање"
#: editor/rename_dialog.cpp
+#, fuzzy
msgid "Regular Expression Error"
-msgstr ""
+msgstr "Регуларни Израз Грешка"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "At character %s"
-msgstr "Важећа слова:"
+msgstr "Код карактера %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Reparent Node"
-msgstr ""
+msgstr "Промени оца Чвору"
#: editor/reparent_dialog.cpp
+#, fuzzy
msgid "Reparent Location (Select new Parent):"
-msgstr ""
+msgstr "Промени оца Локацији (Одабери новог Оца):"
#: editor/reparent_dialog.cpp
+#, fuzzy
msgid "Keep Global Transform"
-msgstr ""
+msgstr "Сачувај Глобалну Трансформу"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Reparent"
-msgstr ""
+msgstr "Промени оца"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Run Mode:"
-msgstr ""
+msgstr "Режим Кретања:"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Current Scene"
-msgstr ""
+msgstr "Тренутна Сцена"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Main Scene"
-msgstr ""
+msgstr "Главна Сцена"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Main Scene Arguments:"
-msgstr ""
+msgstr "Аргументи Главне Сцене"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Scene Run Settings"
-msgstr ""
+msgstr "Подешавања Сцене Кретања"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "No parent to instance the scenes at."
-msgstr ""
+msgstr "Нема оца где би сцена била инстанцирана"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Error loading scene from %s"
-msgstr ""
+msgstr "Грешка при учитавању сцене из %s"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Cannot instance the scene '%s' because the current scene exists within one "
"of its nodes."
msgstr ""
+"Немогуће инстанцирање сцене '%s' јер трентутна сцене постоји унутар једаног "
+"од њених Чворова."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Instance Scene(s)"
-msgstr ""
+msgstr "Сцена/е Инстанца"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Replace with Branch Scene"
-msgstr ""
+msgstr "Замени са Граном Сцене"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Instance Child Scene"
-msgstr ""
+msgstr "Инстанца Сцена Дете"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Припој Скрипту"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "This operation can't be done on the tree root."
-msgstr ""
+msgstr "Операције не може бити извржена над кореном дрвета."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Move Node In Parent"
-msgstr ""
+msgstr "Пребаци Чвор код Родитеља"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Move Nodes In Parent"
-msgstr ""
+msgstr "Пребаци Чворове код Родитеља"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Duplicate Node(s)"
-msgstr ""
+msgstr "Удвостручи Чвор/ове"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"Неуспело додељивање родитеља чвору у наслеђеним сценама, редослед чворова се "
+"не може мењати."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Node must belong to the edited scene to become root."
-msgstr ""
+msgstr "Чвор мора припадати измењеној сцени да би постао корен."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Instantiated scenes can't become root"
-msgstr ""
+msgstr "Инстанциране сцене не могу бити корен"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Make node as Root"
-msgstr "Сачувај сцену"
+msgstr "Направи Корен од чвора"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Delete %d nodes?"
-msgstr "Направи чвор"
+msgstr "Обриши %d чворове?"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Delete the root node \"%s\"?"
-msgstr "Обриши чвор/ове графа шејдера"
+msgstr "Обриши корени чвор \"%s\"?"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Delete node \"%s\" and its children?"
-msgstr ""
+msgstr "Обриши чвор \"%s\" и његову децу?"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Delete node \"%s\"?"
-msgstr "Направи чвор"
+msgstr "Обриши чвор \"%s\"?"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can not perform with the root node."
-msgstr ""
+msgstr "Немогуће извршити са кореним чвором."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "This operation can't be done on instanced scenes."
-msgstr ""
+msgstr "Операција не може бити извршена на инстанцираној сцени."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Save New Scene As..."
-msgstr ""
+msgstr "Упамти Нову Сцену Као..."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Disabling \"editable_instance\" will cause all properties of the node to be "
"reverted to their default."
msgstr ""
+"Онемогућивање \"измењиве_инстанце\" ће проузроковати да сва подешавања чвора "
+"буду повраћена на уобичајена."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Enabling \"Load As Placeholder\" will disable \"Editable Children\" and "
"cause all properties of the node to be reverted to their default."
msgstr ""
+"Омогућавање \"Учитај Као Месточувца\" ће онемогућити \"Измељива Деца\" и "
+"проузтоковати сва подешавања чвора да буду враћена на уобичајена."
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -11003,272 +11865,333 @@ msgstr "Направи кости"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "New Scene Root"
-msgstr "Сачувај сцену"
+msgstr "Нови Корен Сцене"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
-msgstr "Направи чвор"
+msgstr "Направи корени чвор:"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "2D Scene"
-msgstr "Сцена"
+msgstr "2Д Сцена"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "3D Scene"
-msgstr "Сцена"
+msgstr "3Д Сцена"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "User Interface"
-msgstr ""
+msgstr "Кориснички Интерфејс"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Other Node"
-msgstr "Направи чвор"
+msgstr "Други Чвор"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can't operate on nodes from a foreign scene!"
-msgstr ""
+msgstr "Немогуће оперисати на чвору из стране сцене!"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can't operate on nodes the current scene inherits from!"
-msgstr ""
+msgstr "Немогуће оперисати на чворовима од којих тренутна сцена наслеђује!"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Attach Script"
-msgstr ""
+msgstr "Припој Скрипту"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Remove Node(s)"
-msgstr ""
+msgstr "Уклони Чвор/ове"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Change type of node(s)"
-msgstr "Промени улазно име"
+msgstr "Промени врсту чвора/ова"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Couldn't save new scene. Likely dependencies (instances) couldn't be "
"satisfied."
msgstr ""
+"Неуспело памћене сцене. Вероватно зависности (инстанце) нису задовољени."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Error saving scene."
-msgstr ""
+msgstr "Грешка памћена сцена."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Error duplicating scene to save it."
-msgstr ""
+msgstr "Грешка удвостручивање сцене ради памћења."
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Sub-Resources"
-msgstr "Ресурси"
+msgstr "Под-Ресурси"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Clear Inheritance"
-msgstr ""
+msgstr "Очисти Наслеђивања"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Editable Children"
-msgstr ""
+msgstr "Измењиа Деца"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Load As Placeholder"
-msgstr ""
+msgstr "Учитај као Месточувца"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Open Documentation"
-msgstr "Отвори Godot онлајн документацију"
+msgstr "Отвори Документацију"
#: editor/scene_tree_dock.cpp
-msgid "Add Child Node"
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "Add Child Node"
+msgstr "Додај Дете Члан"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Expand/Collapse All"
-msgstr "Умањи све"
+msgstr "Откриј/Сакриј Све"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Change Type"
-msgstr ""
+msgstr "Промени Тип"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Reparent to New Node"
-msgstr "Направи нов"
+msgstr "Промени Родитеља Новом Чвору"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Make Scene Root"
-msgstr "Сачувај сцену"
+msgstr "Направи Корен Сцене"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Merge From Scene"
-msgstr ""
+msgstr "Припоји из Сцене"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Save Branch as Scene"
-msgstr ""
+msgstr "Упамти Грану као Сцену"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Copy Node Path"
-msgstr ""
+msgstr "Копирај Путању Чвора"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Delete (No Confirm)"
-msgstr ""
+msgstr "Обриши (Без Потврде)"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Add/Create a New Node."
-msgstr "Направи нов"
+msgstr "Додај/Направи Нов Члан."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Instance a scene file as a Node. Creates an inherited scene if no root node "
"exists."
msgstr ""
+"Инстанцирај сценске фајлова као Чвор. Креирај наслеђену сцену ако корени "
+"чвор постоји."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr ""
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
+msgstr "Припој нову или постојећу скрпту за одабрани чвор."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr ""
+#, fuzzy
+msgid "Detach the script from the selected node."
+msgstr "Очисти скрипту за одабрани чвор."
#: editor/scene_tree_dock.cpp
msgid "Remote"
msgstr "Удаљени уређај"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Local"
-msgstr ""
+msgstr "Локално"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
+msgstr "Очисти Наследства? (Нема Назад!)"
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Toggle Visible"
-msgstr "Прикажи сакривене датотеке"
+msgstr "Прикажи Сакривене"
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Unlock Node"
-msgstr "OneShot чвор"
+msgstr "Откључај Чвор"
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Button Group"
-msgstr "Додај у групу"
+msgstr "Група Дугмића"
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "(Connecting From)"
-msgstr "Повезивање не успешно"
+msgstr "(Повезивање од)"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Node configuration warning:"
-msgstr ""
+msgstr "Подешавања чвора упозорење:"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node has %s connection(s) and %s group(s).\n"
"Click to show signals dock."
msgstr ""
+"Чвор има %s конекцију/је и %s групу(е).\n"
+"Кликни да прикажеш пристаниште сигнала."
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node has %s connection(s).\n"
"Click to show signals dock."
msgstr ""
+"Чвор има %s конекцију(е).\n"
+"Кликни да прикажеш пристаниште сигнала."
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node is in %s group(s).\n"
"Click to show groups dock."
msgstr ""
+"Чвор је у %s групи/ама.\n"
+"Кликни да прикажеш пристаниште групе."
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Open Script:"
-msgstr "Покрени скриптицу"
+msgstr "Отвори Скрипту:"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node is locked.\n"
"Click to unlock it."
msgstr ""
+"Чвор је закључан.\n"
+"Кликни да га откључаш."
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Children are not selectable.\n"
"Click to make selectable."
msgstr ""
+"Деца нису одабирљива.\n"
+"Кликни да их начиниш одабирљивим."
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Toggle Visibility"
-msgstr ""
+msgstr "Укљ/Искљ Видљивост"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"AnimationPlayer is pinned.\n"
"Click to unpin."
msgstr ""
+"АнимациониПлејер је закачен.\n"
+"Кликни да га откачиш."
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Invalid node name, the following characters are not allowed:"
-msgstr ""
+msgstr "Неважеће име чвора, следећи карактери нису дозвољени:"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Rename Node"
-msgstr ""
+msgstr "Преименуј Чвор"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Scene Tree (Nodes):"
-msgstr ""
+msgstr "Стабло Сцене (Чворови):"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Node Configuration Warning!"
-msgstr ""
+msgstr "Чворови Конфигурација Упозорење!"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Select a Node"
-msgstr ""
+msgstr "Одабери Чвор"
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Path is empty."
-msgstr "Мрежа је празна!"
+msgstr "Путања је празна."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Filename is empty."
-msgstr "Мрежа је празна!"
+msgstr "Име фајла је празно."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Path is not local."
-msgstr "Путања не води ка чвору!"
+msgstr "Путања није локална."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid base path."
-msgstr "Неважећи пут."
+msgstr "Неважећа основна путања."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "A directory with the same name exists."
-msgstr "Датотека или директоријум са овим именом већ постоји."
+msgstr "Већ постоји директоријум са овим именом."
+
+#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Датотека не постоји."
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -11276,575 +12199,670 @@ msgid "Invalid extension."
msgstr "Мора се користити важећа екстензија."
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Wrong extension chosen."
-msgstr ""
+msgstr "Одабарна погрешна екстензија."
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error loading template '%s'"
-msgstr ""
+msgstr "Грешка при учитавању нацрта '%s'"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
-msgstr ""
+msgstr "Грешка - Неуспело креирање скрипте у фајл систему."
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error loading script from %s"
-msgstr ""
+msgstr "Грешка при учитавању скрипте из %s"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Overrides"
-msgstr ""
+msgstr "Преписке"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "N/A"
-msgstr ""
+msgstr "Није Доступно"
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Open Script / Choose Location"
-msgstr "Отвори уредник скриптица"
+msgstr "Отвори Скрипту / Одабери Локацију"
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Open Script"
-msgstr "Покрени скриптицу"
+msgstr "Отвори Скрипту"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "File exists, it will be reused."
-msgstr ""
+msgstr "Фајл постоји, биће поново употребљен."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
+msgid "Invalid path."
+msgstr "Неважећи пут."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid class name."
-msgstr "Неважеће име."
+msgstr "Неважеће име класе."
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid inherited parent name or path."
-msgstr ""
+msgstr "Неважеће наслеђено име од родитеља или путање."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Script path/name is valid."
-msgstr "Анимационо дрво је важеће."
+msgstr "Важеће име/путања скрипте."
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
-msgstr ""
+msgstr "Дозвољено: a-z, A-Z, 0-9, _ и ."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Built-in script (into scene file)."
-msgstr "Операције са датотекама сцена."
+msgstr "Уграђена скрипта (у фајл сцене)."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Will create a new script file."
-msgstr "Направи нов"
+msgstr "Биће креиран нов фајл скирпте."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Will load an existing script file."
-msgstr "Учитај постојећи бас распоред."
+msgstr "Биће учитан постојећи фајл скрипте."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Script file already exists."
-msgstr "Аутоматско учитавање '%s' већ постоји!"
+msgstr "Фајл скрипте већ постоји."
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
msgstr ""
+"Напомена: Уграђене скрипте имају неке границе и не могу бити измењене "
+"користећи уредник."
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Class Name:"
-msgstr "Класа:"
+msgstr "Име Класе:"
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Template:"
-msgstr "Обриши шаблон"
+msgstr "Нацрт:"
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Built-in Script:"
-msgstr "Покрени скриптицу"
+msgstr "Уграђена Скрипта:"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Attach Node Script"
-msgstr ""
+msgstr "Припој Чвор Скрипту"
#: editor/script_editor_debugger.cpp
msgid "Remote "
msgstr "Удаљени уређај "
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Bytes:"
-msgstr ""
+msgstr "Бајтови:"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Warning:"
-msgstr ""
+msgstr "Упозорење:"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Error:"
-msgstr "Грешка"
+msgstr "Грешка:"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "C++ Error"
-msgstr "Учитај грешке"
+msgstr "C++ Грешке"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "C++ Error:"
-msgstr "Учитај грешке"
+msgstr "C++ Грешке:"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "C++ Source"
-msgstr ""
-"\n"
-"Извор: "
+msgstr "C++ Извор"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Source:"
-msgstr ""
-"\n"
-"Извор: "
+msgstr "Извор:"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "C++ Source:"
-msgstr ""
-"\n"
-"Извор: "
+msgstr "C++ Извор:"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Stack Trace"
-msgstr ""
+msgstr "Потражна Наслага"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Errors"
-msgstr ""
+msgstr "Грешке"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Child process connected."
-msgstr "Веза прекинута"
+msgstr "Дете процез повезан."
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Copy Error"
-msgstr "Учитај грешке"
+msgstr "Копирај Грешку"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Video RAM"
-msgstr ""
+msgstr "Видео RAM"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Skip Breakpoints"
-msgstr "Обриши тачке"
+msgstr "Прескочи тачке-прекида"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Inspect Previous Instance"
-msgstr ""
+msgstr "Истражи Претходну Инстанцу"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Inspect Next Instance"
-msgstr ""
+msgstr "Истражи Наредну Инстанцу"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Stack Frames"
-msgstr ""
+msgstr "Наслага Фрејмова"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Profiler"
-msgstr ""
+msgstr "Осматрач"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Network Profiler"
-msgstr "Извези пројекат"
+msgstr "Мрежни Осматрач"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Monitor"
-msgstr ""
+msgstr "Монитор"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Value"
-msgstr ""
+msgstr "Вредност"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Monitors"
-msgstr ""
+msgstr "Монитори"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Pick one or more items from the list to display the graph."
-msgstr ""
+msgstr "Одабери један или више предмета са листе за приказ графикона."
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "List of Video Memory Usage by Resource:"
-msgstr ""
+msgstr "Листа Видео Утрошка Меморије од стране Ресурса:"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Total:"
-msgstr ""
+msgstr "Укупно:"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Извези пројекат"
+msgstr "Извези листу у CSV фајл"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Resource Path"
-msgstr ""
+msgstr "Путања Ресурса"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Type"
-msgstr ""
+msgstr "Врста"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Format"
-msgstr ""
+msgstr "Формат"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Usage"
-msgstr ""
+msgstr "Искориштеност"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Misc"
-msgstr ""
+msgstr "Несврстано"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Clicked Control:"
-msgstr ""
+msgstr "Контрола Кликног:"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Clicked Control Type:"
-msgstr ""
+msgstr "Врста Контроле Кликнутог:"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Live Edit Root:"
-msgstr ""
+msgstr "Измена Корена Уживо:"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Set From Tree"
-msgstr ""
+msgstr "Постави са Стабла"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Export measures as CSV"
-msgstr ""
+msgstr "Извези мере као CSV"
#: editor/settings_config_dialog.cpp
#, fuzzy
msgid "Erase Shortcut"
-msgstr "Излазна транзиција"
+msgstr "Обриши Пречицу"
#: editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Restore Shortcut"
-msgstr ""
+msgstr "Поврати Пречицу"
#: editor/settings_config_dialog.cpp
#, fuzzy
msgid "Change Shortcut"
-msgstr "Промени сидра"
+msgstr "Измени Пречицу"
#: editor/settings_config_dialog.cpp
msgid "Editor Settings"
msgstr "Поставке уредника"
#: editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Shortcuts"
-msgstr ""
+msgstr "Пречице"
#: editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Binding"
-msgstr ""
+msgstr "Спојеви"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Light Radius"
-msgstr ""
+msgstr "Промени Опсег Светла"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change AudioStreamPlayer3D Emission Angle"
-msgstr ""
+msgstr "Промени AudioStreamPlayer3D Угао Емитовања"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Camera FOV"
-msgstr ""
+msgstr "Промени FOV Камере"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Camera Size"
-msgstr ""
+msgstr "Проемени Велићину Камере"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Notifier AABB"
-msgstr ""
+msgstr "Промени AABB Обавештајца"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Particles AABB"
-msgstr ""
+msgstr "Промени AABB Честица"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Probe Extents"
-msgstr ""
+msgstr "Промени Наставке Сонде"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
+#, fuzzy
msgid "Change Sphere Shape Radius"
-msgstr ""
+msgstr "Промени Опсег Лоптастог Облика"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
+#, fuzzy
msgid "Change Box Shape Extents"
-msgstr ""
+msgstr "Промени Наставке Кутија Облика"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Capsule Shape Radius"
-msgstr ""
+msgstr "Промени Опсег Капсула Облика"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Capsule Shape Height"
-msgstr ""
+msgstr "Промени Висину Капсула Облика"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Cylinder Shape Radius"
-msgstr ""
+msgstr "Промени Опсег Цилиндар Облика"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Cylinder Shape Height"
-msgstr ""
+msgstr "Промени Висину Цилиндар Облика"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Ray Shape Length"
-msgstr ""
+msgstr "Промени Дужину Зрак Облика"
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Cylinder Radius"
-msgstr "Промени време мешања"
+msgstr "Промени Опсег Цилиндра"
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Cylinder Height"
-msgstr "Промени време мешања"
+msgstr "Промени Висину Цилиндра"
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Torus Inner Radius"
-msgstr "Промени сидра и ивице"
+msgstr "Промени Унутрашњи Опсег Торуса"
#: modules/csg/csg_gizmos.cpp
+#, fuzzy
msgid "Change Torus Outer Radius"
-msgstr ""
+msgstr "Промени Спољашњи Опсег Торуса"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Select the dynamic library for this entry"
-msgstr ""
+msgstr "Одабери динамичку библиотеку за овај унос"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Select dependencies of the library for this entry"
-msgstr ""
+msgstr "Одабери зависности од библиотеке за овај унос"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
#, fuzzy
msgid "Remove current entry"
-msgstr "Обриши тачку криве"
+msgstr "Обриши тренутни унос"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Double click to create a new entry"
-msgstr ""
+msgstr "Дупли клик да креираш нов унос"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Platform:"
-msgstr ""
+msgstr "Платформа:"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Platform"
-msgstr ""
+msgstr "Платформа"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Dynamic Library"
-msgstr ""
+msgstr "Динамичка Библиотека"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Add an architecture entry"
-msgstr ""
+msgstr "Додај архитектуру унос"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "GDNativeLibrary"
-msgstr ""
+msgstr "GDNativeLibrary"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
+#, fuzzy
msgid "Enabled GDNative Singleton"
-msgstr ""
+msgstr "Омогућен GDNative Singleton"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
#, fuzzy
msgid "Disabled GDNative Singleton"
-msgstr "Искључи индикатор ажурирања"
+msgstr "Онемогућен GDNative Singleton"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
+#, fuzzy
msgid "Library"
-msgstr ""
+msgstr "Библиотека"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
+#, fuzzy
msgid "Libraries: "
-msgstr ""
+msgstr "Библиотеке:"
#: modules/gdnative/register_types.cpp
+#, fuzzy
msgid "GDNative"
-msgstr ""
+msgstr "GDNative"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Step argument is zero!"
-msgstr ""
+msgstr "Корак аргуменат је нула!"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Not a script with an instance"
-msgstr ""
+msgstr "Није скрипта са инстанцом"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Not based on a script"
-msgstr ""
+msgstr "Није базирано на скрипти"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Not based on a resource file"
-msgstr ""
+msgstr "Није базирано на ресурс фајлу"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Invalid instance dictionary format (missing @path)"
-msgstr ""
+msgstr "Неважећа инстанца речник формата (недостаје @путања)"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Invalid instance dictionary format (can't load script at @path)"
msgstr ""
+"Неважећа инстанца речник формата (неуспешно учитавање скрипте код @путање)"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Invalid instance dictionary format (invalid script at @path)"
-msgstr ""
+msgstr "Неважећа инстанца речник формата (неважећа скрипта на @путања)"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Invalid instance dictionary (invalid subclasses)"
-msgstr ""
+msgstr "Неважећа инстанца речника (неважеће класе)"
#: modules/gdscript/gdscript_functions.cpp
+#, fuzzy
msgid "Object can't provide a length."
-msgstr ""
+msgstr "Објекат не може снабдети дужину."
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Next Plane"
-msgstr "Следећи таб"
+msgstr "Следећа Раван"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Previous Plane"
-msgstr "Претходни таб"
+msgstr "Претходна Раван"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Plane:"
-msgstr ""
+msgstr "Раван:"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Next Floor"
-msgstr ""
+msgstr "Следећи Спрат"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Previous Floor"
msgstr "Претодни спрат"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Floor:"
-msgstr ""
+msgstr "Спрат:"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "GridMap Delete Selection"
-msgstr ""
+msgstr "МапаМреже Обриши Одабир"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "GridMap Fill Selection"
-msgstr "Све одабрано"
+msgstr "МапаМреже Испуни Одабрано"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "GridMap Paste Selection"
-msgstr "Све одабрано"
+msgstr "МапаМреже налепи Одабрано"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "GridMap Paint"
-msgstr "Мапа мреже"
+msgstr "МапаМреже Боји"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Мапа мреже"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Snap View"
-msgstr ""
+msgstr "Залепљив Поглед"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Clip Disabled"
-msgstr ""
+msgstr "Клип Онемогућен"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Clip Above"
-msgstr ""
+msgstr "Клип Изнад"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Clip Below"
-msgstr ""
+msgstr "Клип Испод"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Edit X Axis"
-msgstr ""
+msgstr "Измени X Осу"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Edit Y Axis"
-msgstr ""
+msgstr "Измени Y Осу"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Edit Z Axis"
-msgstr ""
+msgstr "Измени Z Осу"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Cursor Rotate X"
-msgstr ""
+msgstr "Курсор Ротација X"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Cursor Rotate Y"
-msgstr ""
+msgstr "Курсор Ротација Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Cursor Rotate Z"
-msgstr ""
+msgstr "Курсор Ротација Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Cursor Back Rotate X"
-msgstr ""
+msgstr "Курсор Ротација Уназад X"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Cursor Back Rotate Y"
-msgstr ""
+msgstr "Курсор Ротација Уназад Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Cursor Back Rotate Z"
-msgstr ""
+msgstr "Курсор Ротација Уназад Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Cursor Clear Rotation"
-msgstr ""
+msgstr "Курсор Обриши Ротацију"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Paste Selects"
-msgstr "Обриши одабрано"
+msgstr "Налепи Одабрано"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clear Selection"
@@ -11853,36 +12871,42 @@ msgstr "Обриши избор"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Fill Selection"
-msgstr "Све одабрано"
+msgstr "Испуни одабрано"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "GridMap Settings"
-msgstr ""
+msgstr "МапаМреже Подешавања"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Pick Distance:"
-msgstr ""
+msgstr "Одабери Одстојање:"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Filter meshes"
-msgstr "Поставке објекта."
+msgstr "Пробери мреже"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
-msgstr ""
+msgstr "Дај БиблиотециМрежа ресурс ове МапеМреже да користи њене мреже."
#: modules/mono/csharp_script.cpp
+#, fuzzy
msgid "Class name can't be a reserved keyword"
-msgstr ""
+msgstr "Има Класе не може бити резервисана кључна реч"
#: modules/mono/mono_gd/gd_mono_utils.cpp
+#, fuzzy
msgid "End of inner exception stack trace"
-msgstr ""
+msgstr "Крај Унутрашњег израза потражне наслаге"
#: modules/recast/navigation_mesh_editor_plugin.cpp
+#, fuzzy
msgid "Bake NavMesh"
-msgstr ""
+msgstr "Испеци НавМрежу"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
@@ -11941,83 +12965,99 @@ msgid "Done!"
msgstr "Готово!"
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
"properly!"
msgstr ""
+"Чвор попустио без радне меморије, молимо прочитајте докуметацију како "
+"попустити правило!"
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid ""
"Node yielded, but did not return a function state in the first working "
"memory."
-msgstr ""
+msgstr "Чвор попустио, али није вратио стање функције у првој радној меморији."
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid ""
"Return value must be assigned to first element of node working memory! Fix "
"your node please."
msgstr ""
+"Враћена вредност мора бити додељена првом елементу члана радне меморије! "
+"Молимо поправи чвор."
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid "Node returned an invalid sequence output: "
-msgstr ""
+msgstr "Члан вратио неважећи излаз секвенце:"
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid "Found sequence bit but not the node in the stack, report bug!"
-msgstr ""
+msgstr "Пронађена секвенца битова али не члан наслаге, пријави грешку!"
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid "Stack overflow with stack depth: "
-msgstr ""
+msgstr "Преоптерећење наслаге са дубином наслаге:"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Change Signal Arguments"
-msgstr ""
+msgstr "Измени Аргументе Сигнала"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Change Argument Type"
-msgstr ""
+msgstr "Измени Врсту Аргумента"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Change Argument name"
-msgstr ""
+msgstr "Измени име Аргумента"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Set Variable Default Value"
-msgstr ""
+msgstr "Постави Уобичајену Вредност Променљиве"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Set Variable Type"
-msgstr ""
+msgstr "Постави Врсту Променљиве"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Add Input Port"
-msgstr "Додај улаз"
+msgstr "Додај улазни порт"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Add Output Port"
-msgstr "Додај улаз"
+msgstr "Додај излазни порт"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Override an existing built-in function."
-msgstr "Неважеће име. Име је резервисано за постојећи уграђени тип."
+msgstr "Препиши постојећу уграђену функцију."
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Create a new function."
-msgstr "Направи нов"
+msgstr "Направи нову функцију."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Variables:"
-msgstr ""
+msgstr "Променљиве:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Create a new variable."
-msgstr "Направи нов"
+msgstr "Направи нову променљиву."
#: modules/visual_script/visual_script_editor.cpp
msgid "Signals:"
@@ -12026,82 +13066,97 @@ msgstr "Сигнали:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Create a new signal."
-msgstr "Направи нови полигон од почетка."
+msgstr "Направи нови сигнал."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Name is not a valid identifier:"
-msgstr ""
+msgstr "Име није важећи идентификатор:"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Name already in use by another func/var/signal:"
-msgstr ""
+msgstr "Име је већ у употреби у функ/пром/сигналу:"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Rename Function"
-msgstr ""
+msgstr "Преименуј Функцију"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Rename Variable"
-msgstr ""
+msgstr "Преименуј Променљиву"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Rename Signal"
-msgstr ""
+msgstr "Преименуј Сигнал"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Function"
-msgstr ""
+msgstr "Додај Функцију"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Delete input port"
-msgstr "Обриши тачку"
+msgstr "Обриши улазни порт"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Variable"
-msgstr ""
+msgstr "Додај Промељиву"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Signal"
-msgstr ""
+msgstr "Додај Сигнал"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove Input Port"
-msgstr "Обриши тачку"
+msgstr "Обриши Улазни Порт"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove Output Port"
-msgstr "Обриши тачку"
+msgstr "Обриши Излазни Порт"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Change Expression"
-msgstr ""
+msgstr "Измени Израз"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Remove VisualScript Nodes"
-msgstr ""
+msgstr "Уклони ВизуелнаСкрипта Чланове"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Duplicate VisualScript Nodes"
-msgstr ""
+msgstr "Удвостручи ВизуелнаСкрипта Чланове"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
-msgstr ""
+msgstr "Држи %s да испустиш Узимача. Држи Shift да испустиш општи потпис."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
-msgstr ""
+msgstr "Држи Ctrl да испустиш Узимача. Држи Shift да испустиш општи потпис."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold %s to drop a simple reference to the node."
-msgstr ""
+msgstr "Држи %s да испустиш једноставну референцу ка члану."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Ctrl to drop a simple reference to the node."
-msgstr ""
+msgstr "Држи Ctrl да испустиш једноставну референцу ка члану"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Variable Setter."
@@ -12334,629 +13389,874 @@ msgid "VariableGet not found in script: "
msgstr ""
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid "VariableSet not found in script: "
-msgstr ""
+msgstr "СкупПроменљивих није нађен у скрипти:"
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid "Custom node has no _step() method, can't process graph."
-msgstr ""
+msgstr "Произвољни чвор нема _step() методу, граф не моће бити обрађен."
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid ""
"Invalid return value from _step(), must be integer (seq out), or string "
"(error)."
msgstr ""
+"Неважећа повратна вредност од _step(), мора бити интиџер (seq out), или "
+"стринг (грешка)."
#: modules/visual_script/visual_script_property_selector.cpp
#, fuzzy
msgid "Search VisualScript"
-msgstr "Потражи помоћ"
+msgstr "Потражи VisualScript"
#: modules/visual_script/visual_script_property_selector.cpp
+#, fuzzy
msgid "Get %s"
-msgstr ""
+msgstr "Повуци %s"
#: modules/visual_script/visual_script_property_selector.cpp
+#, fuzzy
msgid "Set %s"
-msgstr ""
+msgstr "Постави %s"
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Package name is missing."
-msgstr ""
+msgstr "Недостаје име паковања."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Package segments must be of non-zero length."
-msgstr ""
+msgstr "Одломци паковања не могу бити нулте дужине."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "The character '%s' is not allowed in Android application package names."
-msgstr ""
+msgstr "Карактер '%s' није дозвољен у именима паковања Android апликације."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "A digit cannot be the first character in a package segment."
-msgstr ""
+msgstr "Цифра не може бити први карактер у одломку паковања."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "The character '%s' cannot be the first character in a package segment."
-msgstr ""
+msgstr "Карактер '%s' не може бити први карактер у одломку паковања."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "The package must have at least one '.' separator."
-msgstr ""
+msgstr "Паковање мора имати бар један '.' раздвојник."
#: platform/android/export/export.cpp
msgid "Select device from the list"
msgstr "Одабери уређај са листе"
#: platform/android/export/export.cpp
+#, fuzzy
msgid "ADB executable not configured in the Editor Settings."
-msgstr ""
+msgstr "ADB извршна датотека није подешена у Подешавањима Уредника."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "OpenJDK jarsigner not configured in the Editor Settings."
-msgstr ""
+msgstr "OpenJDK jar потписник није подешен у Подешавањима Уредника."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
+"Сладиште кључева Разгрешеника није подешено у Подешавањима Уредника ни у "
+"поставкама."
+
+#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Сладиште кључева Разгрешеника није подешено у Подешавањима Уредника ни у "
+"поставкама."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
+"Произвољна изградња захтева важећу путању до Android SDK у Подешавањима "
+"Уредника."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Invalid Android SDK path for custom build in Editor Settings."
msgstr ""
+"Неважећа Android SDK путања за произвољну изградњу у Подешавањима Уредника."
#: platform/android/export/export.cpp
+#, fuzzy
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
+"Android нацрт изградње није инсталиран у пројекат. Инсталирај га из Пројекат "
+"менија."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Invalid public key for APK expansion."
-msgstr ""
+msgstr "Неважећи јавни кључ за АПК проширење."
#: platform/android/export/export.cpp
#, fuzzy
msgid "Invalid package name:"
-msgstr "Неважеће име."
+msgstr "Неважеће име паковања:"
+
+#: platform/android/export/export.cpp
+msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
#: platform/android/export/export.cpp
+#, fuzzy
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
+"Покушај изградње за произвољни нацрт изградње, али не постоји инфо о "
+"верзији. Молимо реинсталирај из \"Пројекат\" менија."
#: platform/android/export/export.cpp
+#, fuzzy
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
" Godot Version: %s\n"
"Please reinstall Android build template from 'Project' menu."
msgstr ""
+"Верзија Android изградње се не подудара:\n"
+" Нацрт инсталиран: %s\n"
+" Годот Верзија: %s\n"
+"Молимо реинсталирајте Android нацрт изградње из \"Пројекат\" менија."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Building Android Project (gradle)"
-msgstr ""
+msgstr "Изградња Android Пројекта (gradle)"
#: platform/android/export/export.cpp
+#, fuzzy
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
+"Изградња Android пројекта неуспешна, провери излаз за грешке.\n"
+"Алтернативно посети docs.godotengine.org за Android документацију изградње."
#: platform/android/export/export.cpp
+#, fuzzy
msgid "No build apk generated at: "
-msgstr ""
+msgstr "Нема градње apk произведеног код:"
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "Identifier is missing."
-msgstr ""
+msgstr "Идентификатор недостаје."
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "The character '%s' is not allowed in Identifier."
-msgstr ""
+msgstr "Карактер '%s' није дозвољен као идентификатор."
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "App Store Team ID not specified - cannot configure the project."
msgstr ""
+"Тимски ИД Продавнице Апликација није наведен - неуспешно подешавање пројекта."
#: platform/iphone/export/export.cpp
#, fuzzy
msgid "Invalid Identifier:"
-msgstr "Неважећа величина фонта."
+msgstr "Неважећи идентификатор:"
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "Required icon is not specified in the preset."
-msgstr ""
+msgstr "Неопходна иконица није наведена у подешавању."
#: platform/javascript/export/export.cpp
+#, fuzzy
msgid "Stop HTTP Server"
-msgstr ""
+msgstr "Заустави HTTP Сервер"
#: platform/javascript/export/export.cpp
+#, fuzzy
msgid "Run in Browser"
-msgstr ""
+msgstr "Покрени у Претраживачу"
#: platform/javascript/export/export.cpp
+#, fuzzy
msgid "Run exported HTML in the system's default browser."
-msgstr ""
+msgstr "Покрени извезени HTML у уобичајеном претраживачу система."
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not write file:"
-msgstr "Неуспех при тражењу плочице:"
+msgstr "Неуспело уписивање фајла:"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not open template for export:"
-msgstr "Неуспех при прављењу директоријума."
+msgstr "Неуспешно отварање нацрта за извоз:"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Invalid export template:"
-msgstr "Неважећи извозни шаблон:\n"
+msgstr "Неважећи извозни нацрт:"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not read custom HTML shell:"
-msgstr "Неуспех при учитавању датотеке са сличицом учитавања:\n"
+msgstr "Неуспешно читаље произвољне HTML шкољке:"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not read boot splash image file:"
-msgstr "Неуспех при учитавању датотеке са сличицом учитавања:\n"
+msgstr "Неуспешно читаље фајла уводне слике:"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Using default boot splash image."
-msgstr "Неуспех при учитавању датотеке са сличицом учитавања:\n"
+msgstr "Коришћење уобичајне уводне слике."
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid package short name."
-msgstr "Неважеће име."
+msgstr "Неважеће кратко име паковања."
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid package unique name."
-msgstr "Неважеће име."
+msgstr "Неважеће јединствено име паковања."
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid package publisher display name."
-msgstr "Неважеће име."
+msgstr "Неважеће приказно име издавача паковања."
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid product GUID."
-msgstr "Неважеће име."
+msgstr "Неважећи GUID продукт."
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid publisher GUID."
-msgstr "Неважећи пут."
+msgstr "Неважећи GUID итдавача."
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Invalid background color."
-msgstr "Неважеће име."
+msgstr "Неважећа боја позадине."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
+msgstr "Неважеће димензије Логотипа Продавнице (треба да буде 50*50)."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
+msgstr "Неважеће димензије слике за квадрат логотип (треба да буде 44*44)."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
+msgstr "Неважеће димензије слике за квадрат логотип (треба да буде 71*71)."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
+msgstr "Неважеће димензије слике за квадрат логотип (треба да буде 150*150)."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
+msgstr "Неважеће димензије слике за квадрат логотип (треба да буде 310*310)."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
+msgstr "Неважеће димензије слике за широки логотип (треба да буде 310*150)."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
+msgstr "Неважеће димензије слике за уводни екран (треба да буде 620*300)."
#: scene/2d/animated_sprite.cpp
+#, fuzzy
msgid ""
"A SpriteFrames resource must be created or set in the \"Frames\" property in "
"order for AnimatedSprite to display frames."
msgstr ""
+"СпрајтРамови ресурс мора бити креиран или поставњен у \"Рамови\" особини да "
+"би АнимациониСпрајт приказао фрејмове."
#: scene/2d/canvas_modulate.cpp
+#, fuzzy
msgid ""
"Only one visible CanvasModulate is allowed per scene (or set of instanced "
"scenes). The first created one will work, while the rest will be ignored."
msgstr ""
+"Само један видљив CanvasModulate је дозвољен по сцени (или групи "
+"инстанцираних сцена). Први креиран ће радити, док ће остали бити занемарени."
#: scene/2d/collision_object_2d.cpp
+#, fuzzy
msgid ""
"This node has no shape, so it can't collide or interact with other objects.\n"
"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
"define its shape."
msgstr ""
+"Овај члан нема облик, тако да се не моће сударати са осталим објектима.\n"
+"Размотри додавање СударнихОблика2Д или СударнихМногоуглова2Д као деце да "
+"дефинишеш његов облик."
#: scene/2d/collision_polygon_2d.cpp
+#, fuzzy
msgid ""
"CollisionPolygon2D only serves to provide a collision shape to a "
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
+"СударниМногоугао2Д само служи да обезбеди сударни облик изведеном члану од "
+"СударномОбјекту2Д. Молимо користи га само као дете од Области2Д, "
+"НепомичногТела2Д, ЧврстогТела2Д, КинематичкогТела2Д итд. да им даш облик."
#: scene/2d/collision_polygon_2d.cpp
+#, fuzzy
msgid "An empty CollisionPolygon2D has no effect on collision."
-msgstr ""
+msgstr "Непријатењ СударниМногоугао2Д нема утицаја на судар."
#: scene/2d/collision_shape_2d.cpp
+#, fuzzy
msgid ""
"CollisionShape2D only serves to provide a collision shape to a "
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
+"СударниОблик2Д само служи да обезбеди сударни облик за изведени чвор од "
+"СударниОбјекат2Д. Молимо само га користи као дете Области2Д, "
+"НепомичногТела2Д, ЧврстогТела2Д, КинематичкогТела2Д, итд. да им даш облик."
#: scene/2d/collision_shape_2d.cpp
+#, fuzzy
msgid ""
"A shape must be provided for CollisionShape2D to function. Please create a "
"shape resource for it!"
msgstr ""
+"Облик мора бити снабдевен за СударниОблик2Д да би радио. Молимо креирај "
+"облик ресурс за њега!"
#: scene/2d/cpu_particles_2d.cpp
+#, fuzzy
msgid ""
"CPUParticles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
msgstr ""
+"ПроцесорЧестице2Д анимација захтева коришћење ПлатноПредметМатеријала са "
+"омогућеном \"Анимациом Честица\"."
#: scene/2d/light_2d.cpp
+#, fuzzy
msgid ""
"A texture with the shape of the light must be supplied to the \"Texture\" "
"property."
msgstr ""
+"Текстура са обликом светла мора бити снабдевена у \"Текстура\" особини."
#: scene/2d/light_occluder_2d.cpp
+#, fuzzy
msgid ""
"An occluder polygon must be set (or drawn) for this occluder to take effect."
msgstr ""
+"Многоугао Затамљивач мора бити постављен (или исцртан) да би затамљивач имао "
+"утицаја."
#: scene/2d/light_occluder_2d.cpp
+#, fuzzy
msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
msgstr ""
+"Многоугао затамљивач за овај затамљивач је празан. Молимо нацртај моногоугао."
#: scene/2d/navigation_polygon.cpp
+#, fuzzy
msgid ""
"A NavigationPolygon resource must be set or created for this node to work. "
"Please set a property or draw a polygon."
msgstr ""
+"НавигациониПолигон ресурс мора бити постављен или креиран да би овај чвор "
+"радио. Молимо постави особину или нацртај многоугао."
#: scene/2d/navigation_polygon.cpp
+#, fuzzy
msgid ""
"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
"node. It only provides navigation data."
msgstr ""
+"ИнстанцаНавигационогМногоугла мора бити дете или прадете Навигација2Д чвору. "
+"Само обезбеђује навигационе податке."
#: scene/2d/parallax_layer.cpp
+#, fuzzy
msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
-msgstr ""
+msgstr "ПаралаксСлој чвор само ради кад је дете од ПаралаксПозадина чвора."
#: scene/2d/particles_2d.cpp
+#, fuzzy
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
"Use the CPUParticles2D node instead. You can use the \"Convert to "
"CPUParticles\" option for this purpose."
msgstr ""
+"Честице базиране на графичкој нису подржане од стране GLES2 видео "
+"управљача.\n"
+"Уместо тога користи ПроцесорЧестице2Д чвор."
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
+#, fuzzy
msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
msgstr ""
+"Материјал за извршавање честица није додељен. па ни једно понашање није "
+"утиснуто."
#: scene/2d/particles_2d.cpp
+#, fuzzy
msgid ""
"Particles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
msgstr ""
+"Честице2Д анимација захтева корићење ПозориштеПредметМатеријала са "
+"омогућеном \"Анимација Честица\"."
#: scene/2d/path_2d.cpp
+#, fuzzy
msgid "PathFollow2D only works when set as a child of a Path2D node."
-msgstr ""
+msgstr "ПутањаПраћења2Д само ради кад је дете Путање2Д чвора."
#: scene/2d/physics_body_2d.cpp
+#, fuzzy
msgid ""
"Size changes to RigidBody2D (in character or rigid modes) will be overridden "
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
+"Промена величине ЧврстогТела2Д (у карактеру или чврстом режиму) биће "
+"преписана од стране физичког мотора током рада.\n"
+"Уместо тога промени величину у детету сударног облика."
#: scene/2d/remote_transform_2d.cpp
+#, fuzzy
msgid "Path property must point to a valid Node2D node to work."
-msgstr ""
+msgstr "Путања особина мора показивати ка важећем Чвор2Д чвор да би радила."
#: scene/2d/skeleton_2d.cpp
+#, fuzzy
msgid "This Bone2D chain should end at a Skeleton2D node."
-msgstr ""
+msgstr "Овај Коска2Д ланац треба да се заврши код Костур2Д чвора."
#: scene/2d/skeleton_2d.cpp
+#, fuzzy
msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node."
msgstr ""
+"Коска2Д ради само са Костуром2Д или другом Коска2Д као родитељским чвором."
#: scene/2d/skeleton_2d.cpp
+#, fuzzy
msgid ""
"This bone lacks a proper REST pose. Go to the Skeleton2D node and set one."
msgstr ""
+"Овај коски недостаје одговарајућа Одмор поза. Иди у Костур2Д чвор и постави "
+"је."
#: scene/2d/tile_map.cpp
+#, fuzzy
msgid ""
"TileMap with Use Parent on needs a parent CollisionObject2D to give shapes "
"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
"KinematicBody2D, etc. to give them a shape."
msgstr ""
+"МапаПлочица са Користи Родитеља укљученим треба да има као родитеља "
+"СударниОблик2Д да му да облик. Молимо користи је као дете од Област2Д, "
+"ЧврстоТело2Д, КинематикоТело2Д, итд. да им даш облик."
#: scene/2d/visibility_notifier_2d.cpp
+#, fuzzy
msgid ""
"VisibilityEnabler2D works best when used with the edited scene root directly "
"as parent."
msgstr ""
+"ВидљивостОмогућивач2Д ради најбоље кад се користи са измењеним кореном сцене "
+"као родитељем."
#: scene/3d/arvr_nodes.cpp
+#, fuzzy
msgid "ARVRCamera must have an ARVROrigin node as its parent."
-msgstr ""
+msgstr "ARVRCamera мора имати ARVROrigin члан као родитеља."
#: scene/3d/arvr_nodes.cpp
+#, fuzzy
msgid "ARVRController must have an ARVROrigin node as its parent."
-msgstr ""
+msgstr "ARVRController мора имати ARVROrigin члан као родитеља."
#: scene/3d/arvr_nodes.cpp
+#, fuzzy
msgid ""
"The controller ID must not be 0 or this controller won't be bound to an "
"actual controller."
msgstr ""
+"ИД Контролора не сме бити 0 или овај контролор неће бити везан за актуелнонг "
+"контролора."
#: scene/3d/arvr_nodes.cpp
+#, fuzzy
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
-msgstr ""
+msgstr "ARVRAnchor мора имати ARVROrigin чвор као родитеља."
#: scene/3d/arvr_nodes.cpp
+#, fuzzy
msgid ""
"The anchor ID must not be 0 or this anchor won't be bound to an actual "
"anchor."
msgstr ""
+"Чвор ИД не сме биди 0 или ово сидро неће бити везано за актуелно сидро."
#: scene/3d/arvr_nodes.cpp
+#, fuzzy
msgid "ARVROrigin requires an ARVRCamera child node."
-msgstr ""
+msgstr "ARVROrigin захтева ARVRCamera дете чвор."
#: scene/3d/baked_lightmap.cpp
+#, fuzzy
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
+#, fuzzy
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(Време преостало: %d:%02d с)"
#: scene/3d/baked_lightmap.cpp
+#, fuzzy
msgid "Plotting Meshes: "
-msgstr ""
+msgstr "Сковане Мреже:"
#: scene/3d/baked_lightmap.cpp
+#, fuzzy
msgid "Plotting Lights:"
-msgstr ""
+msgstr "Скована Светла:"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
+#, fuzzy
msgid "Finishing Plot"
-msgstr ""
+msgstr "Завршни Ков"
#: scene/3d/baked_lightmap.cpp
+#, fuzzy
msgid "Lighting Meshes: "
-msgstr ""
+msgstr "Светлосне Мреже:"
#: scene/3d/collision_object.cpp
+#, fuzzy
msgid ""
"This node has no shape, so it can't collide or interact with other objects.\n"
"Consider adding a CollisionShape or CollisionPolygon as a child to define "
"its shape."
msgstr ""
+"Овај чвор нема облик, па се не може сударати са осталим објектима.\n"
+"Размотри додавање СударногОблика или СударногМногоугла као детета да би "
+"дефинисао облик."
#: scene/3d/collision_polygon.cpp
+#, fuzzy
msgid ""
"CollisionPolygon only serves to provide a collision shape to a "
"CollisionObject derived node. Please only use it as a child of Area, "
"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
msgstr ""
+"СуадрниМногоугао само служи да обезбеди сударни облик чвуру изведеном од "
+"СуадрниОбјекат. Молимо кориси га само као дете Области, НепомичногТела, "
+"ЧврстогТела, итд. да им даш облик."
#: scene/3d/collision_polygon.cpp
+#, fuzzy
msgid "An empty CollisionPolygon has no effect on collision."
-msgstr ""
+msgstr "Празан СударниМногоугао нема утицаја на судар."
#: scene/3d/collision_shape.cpp
+#, fuzzy
msgid ""
"CollisionShape only serves to provide a collision shape to a CollisionObject "
"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
"KinematicBody, etc. to give them a shape."
msgstr ""
+"СударниОблик само служи да обезбеди сударни облик чвору изведеном ис "
+"СударниОбјекат. Молимо само га користи као дете Области, НепомичногТела, "
+"ЧврстогТела, итд. да им даш облик."
#: scene/3d/collision_shape.cpp
+#, fuzzy
msgid ""
"A shape must be provided for CollisionShape to function. Please create a "
"shape resource for it."
msgstr ""
+"Облик мора бити снабдевен за СударниОблик да би радио. Молимо креирајте "
+"облик ресурс за њега."
#: scene/3d/collision_shape.cpp
+#, fuzzy
msgid ""
"Plane shapes don't work well and will be removed in future versions. Please "
"don't use them."
msgstr ""
+"Облици равни не раде добро и биће уклоњени у будућим верзија. Молимо не "
+"користите их."
#: scene/3d/collision_shape.cpp
+#, fuzzy
msgid ""
"ConcavePolygonShape doesn't support RigidBody in another mode than static."
msgstr ""
+"УдубљениМоногоугаониОблик не подржава ЧврстоТело у другом рећим осим "
+"непокретног."
#: scene/3d/cpu_particles.cpp
+#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
-msgstr ""
+msgstr "Ништа није видљиво пошто мрежа није била додељена."
#: scene/3d/cpu_particles.cpp
+#, fuzzy
msgid ""
"CPUParticles animation requires the usage of a SpatialMaterial whose "
"Billboard Mode is set to \"Particle Billboard\"."
msgstr ""
+"ПроцесорЧестице анимација захтева коришћење ПросторногМатеријала чији Режим "
+"ОгласнеТабле је постављен као \"ОгласнаТабла Честице\"."
#: scene/3d/gi_probe.cpp
+#, fuzzy
msgid "Plotting Meshes"
-msgstr ""
+msgstr "Сковане Мреже"
#: scene/3d/gi_probe.cpp
+#, fuzzy
msgid ""
"GIProbes are not supported by the GLES2 video driver.\n"
"Use a BakedLightmap instead."
msgstr ""
+"СондеГлобалногОсветљења нису подржане од стране GLES2 видео управљача.\n"
+" \n"
+"Као замену користи ИспеченеСенкеМапу."
#: scene/3d/light.cpp
+#, fuzzy
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
-msgstr ""
+msgstr "ТачкаСветло са углом ширим од 90 степени не може бацати сенке."
#: scene/3d/navigation_mesh.cpp
+#, fuzzy
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
+"НавигационаМрежа ресурс мора бити постављен или креиран да би овај чвор "
+"радио."
#: scene/3d/navigation_mesh.cpp
+#, fuzzy
msgid ""
"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
"It only provides navigation data."
msgstr ""
+"НавМрежнаИнстанца мора бити дете или прадете Навигационог чвора. Само "
+"обезбећује навигационе податке."
#: scene/3d/particles.cpp
+#, fuzzy
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
"\" option for this purpose."
-msgstr ""
+msgstr "GPU-базиране честице нису подржане од стране GLES2 видео управљача."
#: scene/3d/particles.cpp
+#, fuzzy
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
-msgstr ""
+msgstr "Ништа није видљиво пошто мрежама није било додељено да цртају пролазе."
#: scene/3d/particles.cpp
+#, fuzzy
msgid ""
"Particles animation requires the usage of a SpatialMaterial whose Billboard "
"Mode is set to \"Particle Billboard\"."
msgstr ""
+"Честице анимација захтева коришћење ПросторногМатеријала чије је Режим "
+"ОгласнеТабле постављен као \"Честице ОгласнеТабле\"."
#: scene/3d/path.cpp
+#, fuzzy
msgid "PathFollow only works when set as a child of a Path node."
-msgstr ""
+msgstr "ПутањаПраћења ради само кад је постављена као дете Путања чвора."
#: scene/3d/path.cpp
+#, fuzzy
msgid ""
"PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its "
"parent Path's Curve resource."
msgstr ""
+"ОРИЈЕНТИСАНА_РОТАЦИЈА ПутањеПраћења захтева \"Горе Вектор\" да би била "
+"омогућена у свом родитељ ресурсу Путања Криве."
#: scene/3d/physics_body.cpp
+#, fuzzy
msgid ""
"Size changes to RigidBody (in character or rigid modes) will be overridden "
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
+"Промена величине у ТврдомТелу (у карактеру или трвдом моду) ће бити "
+"преписана од стране физичког мотора у раду."
#: scene/3d/remote_transform.cpp
+#, fuzzy
msgid ""
"The \"Remote Path\" property must point to a valid Spatial or Spatial-"
"derived node to work."
msgstr ""
+"\"Даљинска Путања\" подешавање да би радило мора упирати ка важећем "
+"Просторном или Просторно-изведеном чвору."
#: scene/3d/soft_body.cpp
+#, fuzzy
msgid "This body will be ignored until you set a mesh."
-msgstr ""
+msgstr "Ово тело ће бити занемарено док не поставиш мрежу."
#: scene/3d/soft_body.cpp
+#, fuzzy
msgid ""
"Size changes to SoftBody will be overridden by the physics engine when "
"running.\n"
"Change the size in children collision shapes instead."
msgstr ""
+"Промене величине МекогТела ће бити преписане од стране фитичког мотора током "
+"рада."
#: scene/3d/sprite_3d.cpp
+#, fuzzy
msgid ""
"A SpriteFrames resource must be created or set in the \"Frames\" property in "
"order for AnimatedSprite3D to display frames."
msgstr ""
+"СпрајтРам ресурси морају бити креирани или подешени у \"Рамови\" особини да "
+"би АнимираниСпрајт3Д приказао рамове."
#: scene/3d/vehicle_body.cpp
+#, fuzzy
msgid ""
"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
"it as a child of a VehicleBody."
msgstr ""
+"ТочакВозила служи да снабде точак систем ТелуВозила. Молимо користите га као "
+"детете од ТелаВозила."
#: scene/3d/world_environment.cpp
+#, fuzzy
msgid ""
"WorldEnvironment requires its \"Environment\" property to contain an "
"Environment to have a visible effect."
msgstr ""
+"СветскоОкружење изискује своју \"Окружење\" особину да садржи Окружење да би "
+"било видљиво."
#: scene/3d/world_environment.cpp
+#, fuzzy
msgid ""
"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
msgstr ""
+"Само једно СветскоОкружење је дозвољено за сцену (или групу инстанцираних "
+"сцена)."
#: scene/3d/world_environment.cpp
+#, fuzzy
msgid ""
"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
+msgstr "СветскоОкружење је занемарено."
#: scene/animation/animation_blend_tree.cpp
+#, fuzzy
msgid "On BlendTree node '%s', animation not found: '%s'"
-msgstr ""
+msgstr "На BlendTree чвору '%s', анимација није нађена: '%s'"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
msgid "Animation not found: '%s'"
-msgstr "Анимационе алатке"
+msgstr "Анимација није нађена: '%s'"
#: scene/animation/animation_tree.cpp
+#, fuzzy
msgid "In node '%s', invalid animation: '%s'."
-msgstr ""
+msgstr "У чвору '%s', неважећа анимација: '%s'."
#: scene/animation/animation_tree.cpp
#, fuzzy
msgid "Invalid animation: '%s'."
-msgstr "Грешка: неважеће име анимације!"
+msgstr "Неважећа анимација: '%s'."
#: scene/animation/animation_tree.cpp
#, fuzzy
msgid "Nothing connected to input '%s' of node '%s'."
-msgstr "Повежи '%s' са '%s'"
+msgstr "Ништа није позевано са улазом '%s' од чвора '%s'."
#: scene/animation/animation_tree.cpp
+#, fuzzy
msgid "No root AnimationNode for the graph is set."
-msgstr ""
+msgstr "AnimationNode без корена за графикон је постављено."
#: scene/animation/animation_tree.cpp
#, fuzzy
msgid "Path to an AnimationPlayer node containing animations is not set."
-msgstr "Одабери AnimationPlayer из дрвета сцене за уређивање анимација."
+msgstr "Путања ка AnimationPlayer чвору који садржи анимацију није постављена."
#: scene/animation/animation_tree.cpp
+#, fuzzy
msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node."
-msgstr ""
+msgstr "Путања постављена за AnimationPlayer не води ка AnimationPlayer чвору."
#: scene/animation/animation_tree.cpp
#, fuzzy
@@ -12964,127 +14264,187 @@ msgid "The AnimationPlayer root node is not a valid node."
msgstr "Анимационо дрво није важеће."
#: scene/animation/animation_tree_player.cpp
+#, fuzzy
msgid "This node has been deprecated. Use AnimationTree instead."
-msgstr ""
+msgstr "Овај члан је застарео. Користи AnimationTree као замену."
#: scene/gui/color_picker.cpp
+#, fuzzy
msgid ""
"Color: #%s\n"
"LMB: Set color\n"
"RMB: Remove preset"
msgstr ""
+"Боја: #%s\n"
+"LMB: Постави боју\n"
+"RMB: Уклони поставку"
#: scene/gui/color_picker.cpp
+#, fuzzy
msgid "Pick a color from the editor window."
-msgstr ""
+msgstr "Одабери боју из прозора уредника."
#: scene/gui/color_picker.cpp
+#, fuzzy
msgid "HSV"
-msgstr ""
+msgstr "Нијанса Засићење Вредност"
#: scene/gui/color_picker.cpp
+#, fuzzy
msgid "Raw"
-msgstr ""
+msgstr "Сиров"
#: scene/gui/color_picker.cpp
+#, fuzzy
msgid "Switch between hexadecimal and code values."
-msgstr ""
+msgstr "Пребаци између хексадецималних и кодних вредности."
#: scene/gui/color_picker.cpp
+#, fuzzy
msgid "Add current color as a preset."
-msgstr ""
+msgstr "Додај тренутну боју као поставку."
#: scene/gui/container.cpp
+#, fuzzy
msgid ""
"Container by itself serves no purpose unless a script configures its "
"children placement behavior.\n"
"If you don't intend to add a script, use a plain Control node instead."
msgstr ""
+"Контејнер као такав није употревљив осим ако скрипта подеси позиционо "
+"понашање своје деце.\n"
+"Ако не намераваш да додаш скрипту, онда користи прости Контрол чвор."
#: scene/gui/control.cpp
+#, fuzzy
msgid ""
"The Hint Tooltip won't be displayed as the control's Mouse Filter is set to "
"\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."
msgstr ""
+"Савет-Кутије неће бити приказане као контроле, Миш Пробирач је постављен на "
+"\"Занемари\". Да решиш ово, постави Миш Пробирач на \"Заустави\" или "
+"\"Проследи\"."
#: scene/gui/dialogs.cpp
+#, fuzzy
msgid "Alert!"
-msgstr ""
+msgstr "Узбуна!"
#: scene/gui/dialogs.cpp
+#, fuzzy
msgid "Please Confirm..."
-msgstr ""
+msgstr "Молимо Потврди..."
#: scene/gui/popup.cpp
+#, fuzzy
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
"functions. Making them visible for editing is fine, but they will hide upon "
"running."
msgstr ""
+"Скок-Прозори биће скривени осим ако позовеш popup() или било коју од "
+"popup*() функција. Чинити их видљивим за измену је добро, али ће се сакрити "
+"након покретања."
#: scene/gui/range.cpp
+#, fuzzy
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
msgstr ""
+"Ако је \"Експ Измена\" омогућена, \"Најмања Вредност\" мора бити већа од 0."
#: scene/gui/scroll_container.cpp
+#, fuzzy
msgid ""
"ScrollContainer is intended to work with a single child control.\n"
"Use a container as child (VBox, HBox, etc.), or a Control and set the custom "
"minimum size manually."
msgstr ""
+"ScrollContainer је намењен да ради са једном дете контролом.\n"
+"Користи контејнер као дете (ВКутија, ХКутија, итд.), или Контролу и подеси "
+"ручно произвољну најмању величину."
#: scene/gui/tree.cpp
+#, fuzzy
msgid "(Other)"
-msgstr ""
+msgstr "(Остатак)"
#: scene/main/scene_tree.cpp
+#, fuzzy
msgid ""
"Default Environment as specified in Project Settings (Rendering -> "
"Environment -> Default Environment) could not be loaded."
msgstr ""
+"Уобичајено Окружење наведено у Подешавањима Пројекта (Исцртавање -> Окружење "
+"-> Уобичајено Окружење) није успешно учитано."
#: scene/main/viewport.cpp
+#, fuzzy
msgid ""
"This viewport is not set as render target. If you intend for it to display "
"its contents directly to the screen, make it a child of a Control so it can "
"obtain a size. Otherwise, make it a RenderTarget and assign its internal "
"texture to some node for display."
msgstr ""
+"Овај viewport није постављен као мета за исцртавање. Ако намераваш да "
+"прикаже садржај директно на екран, учини га дететом Контроле да може да "
+"добави величину. У супротном, учини га МетомИсцртавања и додели његову "
+"унутрашњу текстуру неком чвору за приказ."
#: scene/main/viewport.cpp
+#, fuzzy
msgid "Viewport size must be greater than 0 to render anything."
-msgstr ""
+msgstr "Величина Viewport-а мора бити већа од 0 да би се нешто исцртало."
#: scene/resources/visual_shader_nodes.cpp
#, fuzzy
msgid "Invalid source for preview."
-msgstr "Неважећа величина фонта."
+msgstr "Неважећи извор за преглед."
#: scene/resources/visual_shader_nodes.cpp
#, fuzzy
msgid "Invalid source for shader."
-msgstr "Неважећа величина фонта."
+msgstr "Неважећи извор за цртач"
#: scene/resources/visual_shader_nodes.cpp
#, fuzzy
msgid "Invalid comparison function for that type."
-msgstr "Неважећа величина фонта."
+msgstr "Неважећа упоредна функција за зај тип"
#: servers/visual/shader_language.cpp
+#, fuzzy
msgid "Assignment to function."
-msgstr ""
+msgstr "Додељивање функцији."
#: servers/visual/shader_language.cpp
+#, fuzzy
msgid "Assignment to uniform."
-msgstr ""
+msgstr "Додељивање унформи."
#: servers/visual/shader_language.cpp
+#, fuzzy
msgid "Varyings can only be assigned in vertex function."
-msgstr ""
+msgstr "Варијације могу само бити одређене у функцији тачке."
#: servers/visual/shader_language.cpp
+#, fuzzy
msgid "Constants cannot be modified."
-msgstr ""
+msgstr "Константе није могуће мењати."
+
+#~ msgid "Not in resource path."
+#~ msgstr "Није на пут ресурса."
+
+#~ msgid "Revert"
+#~ msgstr "Врати"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Ова акција се не може опозвати. Настави?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Поврати сцену"
+
+#, fuzzy
+#~ msgid "Clear Script"
+#~ msgstr "Испразни Скрипту"
#~ msgid "Issue Tracker"
#~ msgstr "Пратилац грешака"
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index a2ae9fccea..e62d152c45 100644
--- a/editor/translations/sr_Latn.po
+++ b/editor/translations/sr_Latn.po
@@ -844,7 +844,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1445,16 +1444,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2380,11 +2371,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Napravi"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2651,10 +2645,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3263,6 +3253,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3849,6 +3843,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6763,15 +6761,15 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Linearna"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
msgstr ""
@@ -7244,6 +7242,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10222,7 +10229,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10383,6 +10390,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10431,11 +10445,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10555,6 +10569,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10595,6 +10613,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11639,6 +11661,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11662,6 +11688,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index a03a37b533..e316c74160 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -12,12 +12,15 @@
# Toiya <elviraa98@gmail.com>, 2019.
# Fredrik Welin <figgemail@gmail.com>, 2019.
# Mattias Münster <mattiasmun@gmail.com>, 2019.
+# Anonymous <noreply@weblate.org>, 2020.
+# Joakim Lundberg <joakim@joakimlundberg.com>, 2020.
+# Kristoffer Grundström <swedishsailfishosuser@tutanota.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-11-25 04:05+0000\n"
-"Last-Translator: Mattias Münster <mattiasmun@gmail.com>\n"
+"PO-Revision-Date: 2020-06-03 20:09+0000\n"
+"Last-Translator: Kristoffer Grundström <swedishsailfishosuser@tutanota.com>\n"
"Language-Team: Swedish <https://hosted.weblate.org/projects/godot-engine/"
"godot/sv/>\n"
"Language: sv\n"
@@ -25,7 +28,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.10-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -34,7 +37,7 @@ msgstr "Ogiltligt typargument till convert(), använd TYPE_* konstanter."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "Förväntade en sträng med längden 1 (en karaktär)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -73,31 +76,31 @@ msgstr "I anrop till '%s':"
#: core/ustring.cpp
msgid "B"
-msgstr ""
+msgstr "B"
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "KiB"
#: core/ustring.cpp
msgid "MiB"
-msgstr ""
+msgstr "MiB"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "GiB"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "TiB"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "PiB"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "EiB"
#: editor/animation_bezier_editor.cpp
msgid "Free"
@@ -168,29 +171,24 @@ msgid "Anim Change Call"
msgstr "Anim Ändra Anrop"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Time"
-msgstr "Anim Ändra Tid för Nyckebild"
+msgstr "Anim multi-ändring nyckelbildstid"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transition"
-msgstr "Anim Ändra Övergång"
+msgstr "Anim Fler-Ändra Övergång"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transform"
-msgstr "Anim Ändra Transformation"
+msgstr "Anim Fler-Ändra Transformation"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Value"
-msgstr "Anim Ändra Värde På Nyckelbild"
+msgstr "Anim Fler-Ändra Nyckelbildsvärde"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Call"
-msgstr "Anim Ändra Anrop"
+msgstr "Anim Fler-Ändra Anrop"
#: editor/animation_track_editor.cpp
msgid "Change Animation Length"
@@ -203,43 +201,39 @@ msgstr "Ändra Animationsloop"
#: editor/animation_track_editor.cpp
msgid "Property Track"
-msgstr ""
+msgstr "Egenskapsspår"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "3D Transform Track"
-msgstr "Transformera"
+msgstr "3D Transformationsspår"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr ""
+msgstr "Anropa Metod Spår"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr ""
+msgstr "Bezier kurvspår"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
-msgstr ""
+msgstr "Ljuduppspelningsspår"
#: editor/animation_track_editor.cpp
msgid "Animation Playback Track"
-msgstr ""
+msgstr "Animationsuppspelningsspår"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (frames)"
-msgstr "Animation längd (i sekunder)."
+msgstr "Animation längd (bildrutor)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (seconds)"
-msgstr "Animation längd (i sekunder)."
+msgstr "Animationslängd (i sekunder)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track"
-msgstr "Anim Lägg till spår"
+msgstr "Lägg till spår"
#: editor/animation_track_editor.cpp
msgid "Animation Looping"
@@ -259,9 +253,8 @@ msgid "Anim Clips:"
msgstr "Animklipp:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Track Path"
-msgstr "Ändra Arrays Värde"
+msgstr "Ändra spårväg"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
@@ -269,21 +262,19 @@ msgstr "Ändra spårets läge till på/av."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Uppdateringsläge (Hur denna egenskap sätts)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Interpolation Mode"
-msgstr "Animations-Node"
+msgstr "Interpolationsläge"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr ""
+msgstr "Återgående slingläge (Interpolerar slutet med början på slingan)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Remove this track."
-msgstr "Ta bort valt spår."
+msgstr "Ta bort detta spår."
#: editor/animation_track_editor.cpp
msgid "Time (s): "
@@ -291,7 +282,7 @@ msgstr "Tid (s): "
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr ""
+msgstr "Växla Spår På"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -324,11 +315,11 @@ msgstr "Kubik"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
-msgstr ""
+msgstr "Begränsa Sling Interpolering"
#: editor/animation_track_editor.cpp
msgid "Wrap Loop Interp"
-msgstr ""
+msgstr "Återgåendeslinginterpolering"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -348,14 +339,12 @@ msgid "Change Animation Update Mode"
msgstr "Ändra Animationens Uppdateringsläge"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Interpolation Mode"
-msgstr "Animations-Node"
+msgstr "Ändra Animationsinterpoleringsläge"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Loop Mode"
-msgstr "Ändra Anim Loop"
+msgstr "Ändra Animationsslingläge"
#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
@@ -388,6 +377,7 @@ msgstr "Anim Infoga"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
msgstr ""
+"Animationsspelaren kan inte animera sig själv, utan bara andra spelare."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -402,18 +392,16 @@ msgid "Anim Insert Key"
msgstr "Anim Infoga Nyckel"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Step"
-msgstr "Ändra Animationsnamn:"
+msgstr "Ändra Animationssteg"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Rearrange Tracks"
-msgstr "Ändra ordning på Autoloads"
+msgstr "Ändra ordning på spår"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr ""
+msgstr "Applicera Transformationsspår enbart på 3D-noder."
#: editor/animation_track_editor.cpp
msgid ""
@@ -422,22 +410,27 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"Ljudspår kan bara peka på noder av typ:\n"
+"-LjudStrömsSpelare\n"
+"-LjudStrömsSpelare2D\n"
+"-LjudStrömsSpelare3D"
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr ""
+msgstr "Animationsspår kan bara peka på AnimationsSpelar noder."
#: editor/animation_track_editor.cpp
msgid "An animation player can't animate itself, only other players."
msgstr ""
+"En animationsspelare kan inte animera sig själv, utan bara andra spelare."
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr ""
+msgstr "Det är inte möjligt att lägga till ett nytt spår utan en rot-nod"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
-msgstr ""
+msgstr "Felaktigt spår för Bezier (ej lämplig delegenskap)"
#: editor/animation_track_editor.cpp
msgid "Add Bezier Track"
@@ -456,37 +449,32 @@ msgid "Add Transform Track Key"
msgstr "Lägg till kurvförändringsnyckel"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track Key"
-msgstr "Anim Lägg till spår"
+msgstr "Lägg till spårnyckel"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
-msgstr ""
+msgstr "Spårväg ogiltig, kan således inte lägga till en metod nyckel."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Method Track Key"
-msgstr "Anim Infoga Spår & Nyckel"
+msgstr "Lägg till metodspårnyckel"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object: "
-msgstr "VariableGet hittades inte i Skript: "
+msgstr "Metoden hittades inte i objektet: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
msgstr "Anim Flytta Nycklar"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Clipboard is empty"
-msgstr "Sökvägen är tom"
+msgstr "Urklipp är tomt"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Paste Tracks"
-msgstr "Klistra in Params"
+msgstr "Klistra in spår"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
@@ -496,6 +484,8 @@ msgstr "Anim Skala Nycklar"
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
msgstr ""
+"Detta alternativ fungerar ej för att redigera Bezier, då det enbart är ett "
+"spår."
#: editor/animation_track_editor.cpp
msgid ""
@@ -512,16 +502,15 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Warning: Editing imported animation"
-msgstr ""
+msgstr "Varning: Redigerar importerad animation"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select an AnimationPlayer node to create and edit animations."
-msgstr "Välj en AnimationPlayer från Scenträdet för att redigera animationer."
+msgstr "Välj en AnimationsSpelar-nod för att skapa och redigera animationer."
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
-msgstr ""
+msgstr "Visa enbart spår från valda noder i trädet."
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
@@ -539,7 +528,7 @@ msgstr "Animation"
#: editor/animation_track_editor.cpp
msgid "Seconds"
-msgstr ""
+msgstr "Sekunder"
#: editor/animation_track_editor.cpp
msgid "FPS"
@@ -575,11 +564,11 @@ msgstr "Skala Från Muspekare"
#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr "Duplicera urval"
+msgstr "Fördubbla val"
#: editor/animation_track_editor.cpp
msgid "Duplicate Transposed"
-msgstr "Duplicera Transponerade"
+msgstr "Fördubbla Transponerade"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -606,11 +595,11 @@ msgstr "Städa upp Animation"
#: editor/animation_track_editor.cpp
msgid "Pick the node that will be animated:"
-msgstr ""
+msgstr "Välj noden som ska animeras:"
#: editor/animation_track_editor.cpp
msgid "Use Bezier Curves"
-msgstr ""
+msgstr "Använd Bezier-kurvor"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -870,7 +859,6 @@ msgstr "Ansluter Signal:"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1515,18 +1503,9 @@ msgstr "Aktivera"
msgid "Rearrange Autoloads"
msgstr "Ändra ordning på Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Ogiltig Sökväg."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Fil existerar inte."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Inte i resursens sökväg."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2533,12 +2512,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Kan inte ladda om en scen som aldrig har sparats."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Återställ"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Spara Scen"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Åtgärden kan inte ångras. Återställ ändå?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
#, fuzzy
@@ -2838,10 +2820,6 @@ msgid "Redo"
msgstr "Ångra"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Återställ Scen"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3476,6 +3454,10 @@ msgstr "Kunde inte köra Skript:"
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Välj Nod(er) att Importera"
@@ -4115,6 +4097,10 @@ msgid "Error running post-import script:"
msgstr "Fel uppstod efter importering av skript:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Sparar..."
@@ -7157,15 +7143,15 @@ msgid ""
msgstr "Anslut '%s' till '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Rad:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Funktion:"
@@ -7656,6 +7642,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10735,8 +10730,9 @@ msgid "Instance Child Scene"
msgstr "Instansiera Barn-Scen"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Fäst Skript"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10906,6 +10902,13 @@ msgid "Open Documentation"
msgstr "Öppna Senaste"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Lägg till Barn-Node"
@@ -10956,12 +10959,14 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Koppla på ett nytt eller befintligt Skript till vald Node."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr ""
+#, fuzzy
+msgid "Detach the script from the selected node."
+msgstr "Koppla på ett nytt eller befintligt Skript till vald Node."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -11092,6 +11097,10 @@ msgid "A directory with the same name exists."
msgstr "Katalog med samma namn finns redan"
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Fil existerar inte."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Måste använda en giltigt filändelse."
@@ -11136,6 +11145,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Ogiltig Sökväg."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Ogiltigt namn."
@@ -12216,6 +12230,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12240,6 +12258,32 @@ msgstr "Ogiltigt namn."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12925,6 +12969,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Not in resource path."
+#~ msgstr "Inte i resursens sökväg."
+
+#~ msgid "Revert"
+#~ msgstr "Återställ"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Åtgärden kan inte ångras. Återställ ändå?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Återställ Scen"
+
#~ msgid "Replaced %d occurrence(s)."
#~ msgstr "Ersatte %d förekomst(er)."
diff --git a/editor/translations/ta.po b/editor/translations/ta.po
index 7dd9f5f38c..b8ea8d3538 100644
--- a/editor/translations/ta.po
+++ b/editor/translations/ta.po
@@ -836,7 +836,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1437,16 +1436,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2368,11 +2359,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2639,10 +2632,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3250,6 +3239,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3836,6 +3829,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6728,11 +6725,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7203,6 +7200,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10140,7 +10146,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10301,6 +10307,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10347,11 +10360,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10472,6 +10485,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10512,6 +10529,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11546,6 +11567,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11569,6 +11594,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/te.po b/editor/translations/te.po
index a6c727fe89..589064278d 100644
--- a/editor/translations/te.po
+++ b/editor/translations/te.po
@@ -815,7 +815,6 @@ msgstr ""
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1415,16 +1414,8 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2344,11 +2335,13 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Reload Saved Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2614,10 +2607,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3223,6 +3212,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3807,6 +3800,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6678,11 +6675,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7152,6 +7149,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10070,7 +10076,7 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
+msgid "Detach Script"
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10228,6 +10234,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10274,11 +10287,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10398,6 +10411,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10438,6 +10455,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11462,6 +11483,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11485,6 +11510,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
diff --git a/editor/translations/th.po b/editor/translations/th.po
index e908dde33c..db7fd6adea 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -5,11 +5,12 @@
# Kaveeta Vivatchai <goodytong@gmail.com>, 2017.
# Poommetee Ketson (Noshyaar) <poommetee@protonmail.com>, 2017-2018.
# Thanachart Monpassorn <nunf_2539@hotmail.com>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-03-31 02:26+0000\n"
+"PO-Revision-Date: 2020-05-26 13:41+0000\n"
"Last-Translator: Thanachart Monpassorn <nunf_2539@hotmail.com>\n"
"Language-Team: Thai <https://hosted.weblate.org/projects/godot-engine/godot/"
"th/>\n"
@@ -18,7 +19,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -41,7 +42,7 @@ msgstr "ค่าอินพุตผิดพลาด %i (ไม่ผ่า
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self ไม่สามารถใช้ได้เนื่องจากอินสแตนซ์มีค่า null (ไม่ผ่าน)"
+msgstr "self ไม่สามารถใช้ได้เนื่องจาก instance ว่าง (ไม่ผ่าน)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -57,7 +58,7 @@ msgstr "ชื่อดัชนีของ '%s' ผิดพลาด สำ
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "อากิวเมนต์ไม่ถูกต้องในคอนสตรัก '%s'"
+msgstr "อาร์กิวเมนต์ของคอนสตรัค '%s' ผิดพลาด"
#: core/math/expression.cpp
msgid "On call to '%s':"
@@ -97,7 +98,7 @@ msgstr "อิสระ"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr "สมดุล"
+msgstr "ความสมดุล"
#: editor/animation_bezier_editor.cpp
msgid "Mirror"
@@ -113,7 +114,7 @@ msgstr "ค่า:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "เพิ่มคีย์ที่นี่"
+msgstr "เพิ่มปุ่มที่นี่"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
@@ -235,7 +236,7 @@ msgstr "ฟังก์ชัน:"
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
-msgstr "คลิปเสียง:"
+msgstr "คลิปเสียง"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
@@ -328,9 +329,8 @@ msgid "Change Animation Update Mode"
msgstr "เปลี่ยนโหมดการอัพเดทแอนิเมชัน"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Interpolation Mode"
-msgstr "โหนดแอนิเมชัน"
+msgstr "เปลี่ยนโหมดการประมาณค่าช่วงของแอนิเมชัน"
#: editor/animation_track_editor.cpp
msgid "Change Animation Loop Mode"
@@ -381,9 +381,8 @@ msgid "Anim Insert Key"
msgstr "แทรกคีย์แอนิเมชัน"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Step"
-msgstr "แก้ไขความเร็วแอนิเมชัน"
+msgstr "แก้ไขช่วงของแอนิเมชัน"
#: editor/animation_track_editor.cpp
msgid "Rearrange Tracks"
@@ -391,7 +390,7 @@ msgstr "จัดเรียงแทร็ก"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr ""
+msgstr "แปลงแทร็กเฉพาะที่ Spatial-based nodes"
#: editor/animation_track_editor.cpp
msgid ""
@@ -504,9 +503,8 @@ msgid "Group tracks by node or display them as plain list."
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Snap:"
-msgstr "จำกัดการเคลื่อนย้าย"
+msgstr "สแนป:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -825,7 +823,6 @@ msgstr "ไม่สามารถเชื่อมต่อสัญญาณ
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1434,17 +1431,9 @@ msgstr "เปิด"
msgid "Rearrange Autoloads"
msgstr "จัดลำดับออโต้โหลด"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "ตำแหน่งผิดพลาด"
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "ไม่พบไฟล์"
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "ไม่อยู่ในโฟลเดอร์รีซอร์ส"
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1940,7 +1929,7 @@ msgstr "ค่าเริ่มต้น:"
#: editor/editor_help.cpp
msgid "Methods"
-msgstr "รายชื่อเมท็อด"
+msgstr "เมท็อด"
#: editor/editor_help.cpp
msgid "Theme Properties"
@@ -2384,12 +2373,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "ฉากยังไม่ได้บันทึก ไม่สามารถโหลดใหม่ได้"
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "คืนกลับ"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "บันทึกฉาก"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "การคืนกลับไม่สามารถยกเลิกได้ คืนกลับ?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2667,10 +2659,6 @@ msgid "Redo"
msgstr "ทำซ้ำ"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "คืนกลับฉาก"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "โปรเจกต์และเครื่องมืออื่น ๆ"
@@ -3288,6 +3276,11 @@ msgstr "รันสคริปต์ไม่ได้:"
msgid "Did you forget the '_run' method?"
msgstr "ลืมใส่เมท็อด '_run' หรือไม่?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr "กด Ctrl ค้างเพื่อวาง Getter กด Shift ค้างเพื่อวาง generic signature"
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "เลือกโหนดเพื่อนำเข้า"
@@ -3878,6 +3871,10 @@ msgid "Error running post-import script:"
msgstr "ผิดพลาดขณะรันสคริปต์หลังนำเข้า:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "กำลังบันทึก..."
@@ -4636,9 +4633,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition: "
-msgstr "ทรานสิชัน"
+msgstr "ทรานสิชัน: "
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -5270,9 +5266,8 @@ msgid "Create Custom Bone(s) from Node(s)"
msgstr "สร้างจุดปะทุจาก Mesh"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Bones"
-msgstr "ลบท่าทาง"
+msgstr "ลบโครง"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Make IK Chain"
@@ -5979,11 +5974,12 @@ msgid "Remove item %d?"
msgstr "ลบไอเทม %d?"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid ""
"Update from existing scene?:\n"
"%s"
-msgstr "อัพเดตจากฉาก"
+msgstr ""
+"อัพเดตจากฉากที่มีอยู่หรือไม่\n"
+"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
#, fuzzy
@@ -6601,9 +6597,8 @@ msgid "Close and save changes?"
msgstr "ปิดและบันทึก?"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error writing TextFile:"
-msgstr "ผิดพลาดขณะย้ายไฟล์:\n"
+msgstr "ผิดพลาดขณะย้ายไฟล์:"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -6887,12 +6882,13 @@ msgstr "ลบการเชื่อมโยง '%s' กับ '%s'"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
-msgid "Line"
-msgstr "บรรทัด:"
+msgid "[Ignore]"
+msgstr "(ละเว้น)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ละเว้น)"
+#, fuzzy
+msgid "Line"
+msgstr "บรรทัด:"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -7080,13 +7076,12 @@ msgid "Go to Previous Breakpoint"
msgstr "ไปจุดพักก่อนหน้า"
#: editor/plugins/shader_editor_plugin.cpp
-#, fuzzy
msgid ""
"This shader has been modified on on disk.\n"
"What action should be taken?"
msgstr ""
-"ไฟล์ต่อไปนี้ในดิสก์ใหม่กว่า\n"
-"จะทำอย่างไรต่อไป?:"
+"เชดเดอร์ถูกแก้ไขบนดิสก์\n"
+"จะทำอย่างไรต่อไป?"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
@@ -7393,6 +7388,15 @@ msgid "XForm Dialog"
msgstr "เครื่องมือเคลื่อนย้าย"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Snap Nodes To Floor"
msgstr "จำกัดด้วยเส้นตาราง"
@@ -8260,17 +8264,16 @@ msgid ""
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected texture? This will remove all tiles which use it."
-msgstr "ลบรายการ"
+msgstr "ลบเทกเจอร์หรือไม่ โดยจะลบไทล์ทุกอันที่ใช้เทกเจอร์นี้"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "You haven't selected a texture to remove."
-msgstr ""
+msgstr "คุณยังไม่ได้เลือกเทกเจอร์ที่จะลบ"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from scene? This will overwrite all current tiles."
-msgstr ""
+msgstr "สร้างจากสกรีน นี่จะสร้างทับไทล์เดิม"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from scene?"
@@ -8291,16 +8294,16 @@ msgid ""
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Delete selected Rect."
-msgstr "ลบไฟล์ที่เลือก?"
+msgstr "ลบสี่เหลี่ยมที่เลือก"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid ""
"Select current edited sub-tile.\n"
"Click on another Tile to edit it."
-msgstr "เลือกไทล์ย่อยที่กำลังปรับแต่ง"
+msgstr ""
+"เลือกไทล์ย่อยอันปัจจุบันเพื่อปรับแต่ง\n"
+"คลิกที่ไทล์อันอื่นพื่อปรับแต่ง"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Delete polygon."
@@ -8319,12 +8322,13 @@ msgstr ""
"คลิกไทล์อันอื่นเพื่อปรับแต่ง"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid ""
"Select sub-tile to use as icon, this will be also used on invalid autotile "
"bindings.\n"
"Click on another Tile to edit it."
-msgstr "เลือกรูปภาพย่อยเพื่อทำเป็นไอคอน ภาพนี้จะใช้แสดงเมื่อการ"
+msgstr ""
+"เลือกไทล์ย่อยเพื่อใช้เป็นไอคอน สามารถใช้เมื่อ autotile bindings มีความผิดพลาด\n"
+"คลิกไทล์อันอื่นเพื่อแก้ไขไทล์นั้น"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -8335,11 +8339,12 @@ msgstr ""
"คลิกไทล์อันอื่นเพื่อแก้ไขไทล์นั้น"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid ""
"Select sub-tile to change its z index.\n"
"Click on another Tile to edit it."
-msgstr "เลือกไทล์ย่อยเพื่อจัดลำดับความสำคัญ"
+msgstr ""
+"เลือกไทล์ย่อยเพื่อเปลี่ยน z index\n"
+"คลิกที่ไทล์อื่นเพื่อแก้ไขไทล์นั้น"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Region"
@@ -9477,11 +9482,12 @@ msgid "Resources to export:"
msgstr "รีซอร์สที่จะส่งออก:"
#: editor/project_export.cpp
-#, fuzzy
msgid ""
"Filters to export non-resource files/folders\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
-msgstr "ตัวกรองไฟล์ที่จะส่งออกเพิ่มเติม (คั่นด้วยจุลภาค ตัวอย่างเช่น: *.json, *.txt)"
+msgstr ""
+"ตัวกรองไฟล์ที่จะส่งออกเพิ่มเติม\n"
+"(คั่นด้วยจุลภาค ตัวอย่างเช่น: *.json, *.txt, docs/)"
#: editor/project_export.cpp
#, fuzzy
@@ -9499,9 +9505,8 @@ msgid "Make Patch"
msgstr "สร้างแพตช์"
#: editor/project_export.cpp
-#, fuzzy
msgid "Pack File"
-msgstr " ไฟล์"
+msgstr "ไฟล์"
#: editor/project_export.cpp
msgid "Features"
@@ -10461,8 +10466,9 @@ msgid "Instance Child Scene"
msgstr "อินสแตนซ์ฉากลูก"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "ลบสคริปต์"
+#, fuzzy
+msgid "Detach Script"
+msgstr "แนบสคริปต์"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10620,6 +10626,13 @@ msgid "Open Documentation"
msgstr "เปิดคู่มือ"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "เพิ่มโหนดลูก"
@@ -10666,11 +10679,13 @@ msgid ""
msgstr "อินสแตนซ์ฉากเป็นโหนด สร้างฉากสืบทอดถ้าไม่มีโหนดราก"
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "สร้างสคริปต์ให้โหนดที่เลือก"
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "ลบสคริปต์ของโหนดที่เลือก"
#: editor/scene_tree_dock.cpp
@@ -10810,6 +10825,10 @@ msgid "A directory with the same name exists."
msgstr "มีไดเรกทอรีชื่อนี้อยู่แล้ว"
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "ไม่พบไฟล์"
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "นามสกุลไม่ถูกต้อง"
@@ -10853,6 +10872,10 @@ msgid "File exists, it will be reused."
msgstr "มีไฟล์นี้อยู่แล้ว จะนำมาใช้"
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "ตำแหน่งผิดพลาด"
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "ชื่อคลาสไม่ถูกต้อง"
@@ -11894,6 +11917,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11917,6 +11944,32 @@ msgstr "ชื่อแพ็คเกจผิดพลาด:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12631,6 +12684,21 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "ค่าคงที่ไม่สามารถแก้ไขได้"
+#~ msgid "Not in resource path."
+#~ msgstr "ไม่อยู่ในโฟลเดอร์รีซอร์ส"
+
+#~ msgid "Revert"
+#~ msgstr "คืนกลับ"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "การคืนกลับไม่สามารถยกเลิกได้ คืนกลับ?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "คืนกลับฉาก"
+
+#~ msgid "Clear Script"
+#~ msgstr "ลบสคริปต์"
+
#~ msgid "Issue Tracker"
#~ msgstr "ติดตามปัญหา"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index fdb8f76605..277cc2c807 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -44,12 +44,15 @@
# Zsosu Ktosu <zktosu@gmail.com>, 2020.
# Mesut Aslan <kontinyu@gmail.com>, 2020.
# Kaan Genç <kaan@kaangenc.me>, 2020.
+# Anonymous <noreply@weblate.org>, 2020.
+# Güneş Gümüş <gunes.gumus.001@gmail.com>, 2020.
+# Oğuz Ersen <oguzersen@protonmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-04-23 20:21+0000\n"
-"Last-Translator: Anonymous <noreply@weblate.org>\n"
+"PO-Revision-Date: 2020-05-22 21:01+0000\n"
+"Last-Translator: Güneş Gümüş <gunes.gumus.001@gmail.com>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot/tr/>\n"
"Language: tr\n"
@@ -57,18 +60,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.0.2-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr ""
-"\"convert ()\" için geçersiz tür bağımsız değişkeni, \"TYPE_ *\" sabitlerini "
-"kullanın."
+msgstr "convert() için geçersiz türde argüman, TYPE_* sabitlerini kullanın."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "1 (karakter) uzunlukta metin bekleniyor."
+msgstr "1 uzunluğunda bir metin (bir karakter) bekleniyor."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -354,7 +355,7 @@ msgstr "Döngü Aradeğerlemesin Sar"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr "Yeni Anahtar"
+msgstr "Anahtar Ekle"
#: editor/animation_track_editor.cpp
msgid "Duplicate Key(s)"
@@ -532,12 +533,12 @@ msgstr ""
"Bu animasyon içe aktarılmış bir sahneye ait, bu yüzden içe aktarılan "
"parçalara yapılan değişiklikler kaydedilmeyecek.\n"
"\n"
-"Özel parça ekleme özelliğini aktif etmek için, sahnenin içe aktarma "
-"ayarlarına gidin ve \"Animasyon > Depolama\" ayarını \"Dosyalama\" olarak "
-"ayarlayın, \"Animasyon > Özel Parçaları Sakla\"ayarını aktif edin ve sonra "
-"tekrar içe aktarın.\n"
-"Alternatif olarak, animasyonları ayrı dosyalara aktaran bir içe aktarma "
-"hazır ayarı kullanabilirsiniz."
+"Özel parça ekleme özelliğini etkinleştirmek için, sahnenin içe aktarma "
+"ayarlarına gidin ve \"Animasyon > Depolama\"\n"
+"ayarını \"Dosyalama\" olarak ayarlayın, \"Animasyon > Özel Parçaları Sakla\" "
+"ayarını etkinleştirin ve sonra tekrar içe aktarın.\n"
+"Alternatif olarak, animasyonları ayrı dosyalara aktaran bir içe aktarma ön "
+"ayarı kullanabilirsiniz."
#: editor/animation_track_editor.cpp
msgid "Warning: Editing imported animation"
@@ -878,7 +879,6 @@ msgstr "Sinyale bağlanamıyor"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -899,7 +899,7 @@ msgstr "Sinyal:"
#: editor/connections_dialog.cpp
msgid "Connect '%s' to '%s'"
-msgstr "Bunu '%s' şuna '%s' bağla"
+msgstr "'%s' sinyalini '%s' yöntemine bağla"
#: editor/connections_dialog.cpp
msgid "Disconnect '%s' from '%s'"
@@ -1216,7 +1216,7 @@ msgstr ""
#: editor/editor_about.cpp
msgid "All Components"
-msgstr "Tüm Bileşenler"
+msgstr "Tüm Bileşenler"
#: editor/editor_about.cpp
msgid "Components"
@@ -1490,17 +1490,9 @@ msgstr "Etkin"
msgid "Rearrange Autoloads"
msgstr "KendindenYüklenme'leri Yeniden Sırala"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Geçersiz yol."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Dosya yok."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Kaynak yolunda değil."
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1726,7 +1718,7 @@ msgstr ""
#: editor/editor_feature_profile.cpp
msgid "Error saving profile to path: '%s'."
-msgstr "Profil yolu kaydetme hatası: '%s'."
+msgstr "Profil '%s' yoluna kaydedilirken hata oluştu."
#: editor/editor_feature_profile.cpp
msgid "Unset"
@@ -2432,7 +2424,7 @@ msgstr "Bu işlem bir sahne olmadan yapılamaz."
#: editor/editor_node.cpp
msgid "Export Mesh Library"
-msgstr "Örüntü Betikevini Dışa Aktar"
+msgstr "Örüntü Kütüphanesini Dışa Aktar"
#: editor/editor_node.cpp
msgid "This operation can't be done without a root node."
@@ -2455,12 +2447,15 @@ msgid "Can't reload a scene that was never saved."
msgstr "Hiç kaydedilmemiş bir sahne yeniden yüklenemiyor."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Geri dön"
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "Sahne Kaydet"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Bu eylem geri alınamaz. Yine de geri dönsün mü?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2484,7 +2479,7 @@ msgstr "Kaydet & Çık"
#: editor/editor_node.cpp
msgid "Save changes to the following scene(s) before quitting?"
-msgstr "Çıkmadan önce değişiklikler aşağıdaki sahneye(lere) kaydedilsin mi?"
+msgstr "Çıkmadan önce değişiklikler aşağıdaki sahne(ler)e kaydedilsin mi?"
#: editor/editor_node.cpp
msgid "Save changes the following scene(s) before opening Project Manager?"
@@ -2497,8 +2492,8 @@ msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
-"Bu seçenek artık kullanılmıyor. Yenilemeye zorlayan durumlar bug olarak "
-"değerlendirilir. Lütfen bildirin."
+"Bu seçenek artık kullanılmıyor. Yenilemenin zorlanması gereken durumlar "
+"artık hata olarak değerlendiriliyor. Lütfen bildirin."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
@@ -2739,16 +2734,12 @@ msgstr "TileSet ..."
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Undo"
-msgstr "Geri"
+msgstr "Geri al"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Redo"
-msgstr "Geri"
-
-#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Sahneyi Eski Durumuna Çevir"
+msgstr "Yeniden yap"
#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
@@ -2913,7 +2904,7 @@ msgstr "Ekran Görüntüleri Düzenleyici Verileri/Ayarları Klasöründe saklan
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr "Tam Ekran Aç / Kapat"
+msgstr "Tam Ekranı Aç/Kapat"
#: editor/editor_node.cpp
msgid "Toggle System Console"
@@ -3077,8 +3068,14 @@ msgid ""
"the \"Use Custom Build\" option should be enabled in the Android export "
"preset."
msgstr ""
-"Bu, kaynak şablonlarını \"res://android/build\" yoluna yükleyerek, projenizi "
-"isteğe dayalı Android inşasına ayarlayacaktır."
+"Bu, kaynak şablonunu \"res://android/build\" dizinine kurarak projenizi özel "
+"Android derlemeleri için ayarlayacaktır.\n"
+"Daha sonra dışa aktarırken değişiklikleri uygulayabilir ve kendi özel "
+"APK'nızı oluşturabilirsiniz (modül ekleme, AndroidManifest.xml dosyasını "
+"değiştirme vb.).\n"
+"Önceden oluşturulmuş APK'ları kullanmak yerine özel derlemeler yapmak için "
+"Android dışa aktarma ön ayarında \"Özel Derleme Kullan\" seçeneğinin "
+"etkinleştirilmesi gerektiğini unutmayın."
#: editor/editor_node.cpp
msgid ""
@@ -3125,11 +3122,11 @@ msgstr "Seç"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
-msgstr "Düzenleyicide Aç"
+msgstr "2B Düzenleyiciyi Aç"
#: editor/editor_node.cpp
msgid "Open 3D Editor"
-msgstr "3B Düzenleyicide Aç"
+msgstr "3B Düzenleyiciyi Aç"
#: editor/editor_node.cpp
msgid "Open Script Editor"
@@ -3250,7 +3247,7 @@ msgstr "Katman"
#: editor/editor_properties.cpp
msgid "Bit %d, value %d"
-msgstr "Bit %d, değer %d"
+msgstr "Bit %d, değer %d"
#: editor/editor_properties.cpp
msgid "[Empty]"
@@ -3392,6 +3389,13 @@ msgstr "Betik çalıştırılamadı:"
msgid "Did you forget the '_run' method?"
msgstr "'_run()' metodunu unuttunuz mu?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Alıcı bırakmak için Ctrl'e basılı tutun. Genel imza bırakmak için Shift'e "
+"basılı tutun."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Düğüm(leri) içe Aktarmak için Seç"
@@ -3990,6 +3994,10 @@ msgid "Error running post-import script:"
msgstr "sonradan-içe aktarılmış betik çalıştırılırken hata:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Kaydediliyor..."
@@ -4444,7 +4452,7 @@ msgstr "Süzgeçlenmiş Parçaları Düzenle:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Enable Filtering"
-msgstr "Süzgeçlemeyi Aç"
+msgstr "Süzgeçlemeyi Aç"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Toggle Autoplay"
@@ -5384,7 +5392,7 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Reset"
-msgstr "Yakınlaşmayı Sıfırla"
+msgstr "Yakınlaştırmayı Sıfırla"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5839,7 +5847,7 @@ msgstr "Eğri Doğrusal Tanjantını Aç/Kapa"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Hold Shift to edit tangents individually"
-msgstr "Tanjantları tek tek düzenlemek için Shift'e basılı tut"
+msgstr "Tanjantları bireysel olarak düzenlemek için Shift tuşuna basılı tutun"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Right click to add point"
@@ -5875,7 +5883,7 @@ msgstr "Örüntü boş!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Trimesh çarpışma şekli oluşturulamadı."
+msgstr "Üçlü Örüntü çarpışma yüzeyi oluşturulamadı."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5911,7 +5919,7 @@ msgstr "Herhangi bir çarpışma şekli oluşturulamadı."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Shapes"
-msgstr "Dışbükey Şekilleri Oluştur"
+msgstr "Çoklu Dışbükey Şekiller Oluştur"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -6934,12 +6942,13 @@ msgstr ""
"'%s' düğümünden '%s' düğümüne, '%s' sinyali için '%s' bağlantı metodu eksik."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Satır"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(gözardı et)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(gözardı et)"
+msgid "Line"
+msgstr "Satır"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7413,6 +7422,15 @@ msgid "XForm Dialog"
msgstr "XForm İletişim Kutusu"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Düğümleri zemine hizala"
@@ -9927,6 +9945,9 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"Arama kutusu, projeleri adına ve son yol bileşenine göre filtreler.\n"
+"Projeleri adına ve tam yoluna göre filtrelemek için, sorgunun en az bir `/` "
+"karakteri içermesi gereklidir."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10081,7 +10102,7 @@ msgstr "'%s' özelliği mevcut değil."
#: editor/project_settings_editor.cpp
msgid "Setting '%s' is internal, and it can't be deleted."
-msgstr "Ayar '%s' dahilidir silinemez."
+msgstr "'%s' ayarı dahilidir ve silinemez."
#: editor/project_settings_editor.cpp
msgid "Delete Item"
@@ -10290,7 +10311,7 @@ msgstr "Bir Düğüm Seç"
#: editor/property_editor.cpp
msgid "Bit %d, val %d."
-msgstr "Bit %d, val %d."
+msgstr "Bit %d, değer %d."
#: editor/property_selector.cpp
msgid "Select Property"
@@ -10425,9 +10446,8 @@ msgid "Regular Expression Error"
msgstr "Düzenli İfade Hatası"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Geçerli karakterler:"
+msgstr "%s karakterinde"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10494,8 +10514,9 @@ msgid "Instance Child Scene"
msgstr "Çocuk Sahnesini Örnekle"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Betiği Temizle"
+#, fuzzy
+msgid "Detach Script"
+msgstr "Betik İliştir"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10660,6 +10681,13 @@ msgid "Open Documentation"
msgstr "Klavuzu Aç"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Çocuk Düğüm Ekle"
@@ -10708,11 +10736,13 @@ msgstr ""
"alınmış bir sahne oluşturur."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Seçili düğüm için yeni veya mevcut bir betik iliştir."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Seçilen düğüm için betik temizle."
#: editor/scene_tree_dock.cpp
@@ -10844,6 +10874,10 @@ msgid "A directory with the same name exists."
msgstr "Aynı isimde dizin zaten var."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Dosya yok."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Geçersiz uzantı."
@@ -10884,6 +10918,10 @@ msgid "File exists, it will be reused."
msgstr "Dosya mevcut, yeniden kullanılacak."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Geçersiz yol."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Geçersiz sınıf ismi."
@@ -11044,9 +11082,8 @@ msgid "Total:"
msgstr "Toplam:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "Profil Dışa Aktar"
+msgstr "Listeyi CSV dosyasına aktar"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -11928,6 +11965,13 @@ msgstr ""
"yapılandırılmamış."
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"Anahtar deposunda Hata Ayıklayıcı Ayarları'nda veya ön ayarda "
+"yapılandırılmamış."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Özel derleme için Editör Ayarları'nda geçerli bir Android SDK yolu gerekir."
@@ -11953,6 +11997,32 @@ msgstr "Geçersiz paket ismi:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12733,6 +12803,21 @@ msgstr "varyings yalnızca vertex işlevinde atanabilir."
msgid "Constants cannot be modified."
msgstr "Sabit değerler değiştirilemez."
+#~ msgid "Not in resource path."
+#~ msgstr "Kaynak yolunda değil."
+
+#~ msgid "Revert"
+#~ msgstr "Geri dön"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Bu eylem geri alınamaz. Yine de geri dönsün mü?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Sahneyi Eski Durumuna Çevir"
+
+#~ msgid "Clear Script"
+#~ msgstr "Betiği Temizle"
+
#~ msgid "Issue Tracker"
#~ msgstr "Sorun İzleyici"
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index e713e79a4c..75cce04e0e 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -13,11 +13,12 @@
# Александр <ol-vin@mail.ru>, 2018.
# Богдан Матвіїв <bomtvv@gmail.com>, 2019.
# Tymofij Lytvynenko <till.svit@gmail.com>, 2020.
+# Vladislav Glinsky <cl0ne@mithril.org.ua>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-05-01 11:43+0000\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -27,24 +28,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
msgstr ""
-"Некоректний тип аргументу для convert(), слід використовувати константу "
+"Некоректний тип аргументу для convert(), слід використовувати константи "
"TYPE_*."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "Мало бути вказано рядок довжини 1 (символ)."
+msgstr "Очікувався рядок довжиною 1 (символ)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "Недостатньо байтів для декодування або вказано некоректний формат."
+msgstr "Недостатньо байтів для їх декодування або вказано некоректний формат."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
@@ -53,7 +54,8 @@ msgstr "Некоректні вхідні дані %i (не передано) у
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
msgstr ""
-"не можна використовувати self, оскільки екземпляр є порожнім (не передано)"
+"неможливо використовувати self, оскільки екземпляр має значення null (не "
+"передано)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -65,15 +67,15 @@ msgstr "Некоректний індекс типу %s для базового
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr "Некоректний іменований індекс «%s» для базового типу %s"
+msgstr "Некоректний іменований індекс \"%s\" для базового типу %s"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "Некоректні аргументи для побудови «%s»"
+msgstr "Некоректні аргументи для створення \"%s\""
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr "При виклику «%s»:"
+msgstr "При виклику \"%s\":"
#: core/ustring.cpp
msgid "B"
@@ -105,15 +107,15 @@ msgstr "ЕіБ"
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr "Вивільнити"
+msgstr "Вільні"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr "Збалансована"
+msgstr "Балансовані"
#: editor/animation_bezier_editor.cpp
msgid "Mirror"
-msgstr "Віддзеркалити"
+msgstr "Віддзеркалені"
#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
msgid "Time:"
@@ -125,7 +127,7 @@ msgstr "Значення:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "Тут слід вставити ключ"
+msgstr "Вставити ключ тут"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
@@ -574,7 +576,7 @@ msgstr "Масштаб від курсору"
#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr "Дублювати виділене"
+msgstr "Дублювати позначене"
#: editor/animation_track_editor.cpp
msgid "Duplicate Transposed"
@@ -854,7 +856,6 @@ msgstr "Не вдалося з'єднати сигнал"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1212,7 +1213,7 @@ msgstr "%s (вже існує)"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr "Розпаковування активів"
+msgstr "Розпаковування ресурсів"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "The following files failed extraction from package:"
@@ -1448,7 +1449,7 @@ msgstr "Перейменувати автозавантаження"
#: editor/editor_autoload_settings.cpp
msgid "Toggle AutoLoad Globals"
-msgstr "Увімкнути автозавантаження глобальних скриптів"
+msgstr "Увімкнути автозавантаження глобальних скриптів"
#: editor/editor_autoload_settings.cpp
msgid "Move Autoload"
@@ -1460,23 +1461,15 @@ msgstr "Видалити автозавантаження"
#: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp
msgid "Enable"
-msgstr "Активувати"
+msgstr "Увімкнути"
#: editor/editor_autoload_settings.cpp
msgid "Rearrange Autoloads"
msgstr "Змінити порядок автозавантажень"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "Неправильний шлях."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Файл не існує."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "Не в ресурсному шляху."
+msgid "Can't add autoload:"
+msgstr "Не вдалося додати автозавантаження:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1628,7 +1621,7 @@ msgstr "Редактор скриптів"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
-msgstr "Бібліотека активів"
+msgstr "Бібліотека ресурсів"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
@@ -1934,7 +1927,7 @@ msgstr ""
#: editor/editor_file_system.cpp
msgid "(Re)Importing Assets"
-msgstr "Імпортування активів"
+msgstr "Імпортування ресурсів"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
@@ -2434,12 +2427,17 @@ msgid "Can't reload a scene that was never saved."
msgstr "Неможливо перезавантажити сцену, яку ніколи не зберігали."
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "Повернутися"
+msgid "Reload Saved Scene"
+msgstr "Перезавантаження збереженої сцени"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Цю дію не можна скасувати. Повернутися в будь-якому випадку?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"Зміни до поточної сцени не збережено.\n"
+"Перезавантажити збережену сцену попри це? Наслідки перезавантаження не можна "
+"буде скасувати."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2493,8 +2491,8 @@ msgstr "Повторно відкрити закриту сцену"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
-"Не вдається ввімкнути плагін addon: '%s' не вдалося проаналізувати "
-"налаштування конфігурації."
+"Не вдалося ввімкнути додаток addon: «%s» не вдалося проаналізувати "
+"налаштування."
#: editor/editor_node.cpp
msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
@@ -2730,10 +2728,6 @@ msgid "Redo"
msgstr "Повернути"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "Повернути сцену"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "Різні проєктні або сценографічні інструменти."
@@ -3126,7 +3120,7 @@ msgstr "Відкрити редактор скриптів"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
-msgstr "Відкрити бібліотеку активів"
+msgstr "Відкрити бібліотеку ресурсів"
#: editor/editor_node.cpp
msgid "Open the next Editor"
@@ -3381,6 +3375,12 @@ msgstr "Не вдалося запустити скрипт:"
msgid "Did you forget the '_run' method?"
msgstr "Ви забули метод '_run'?"
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Утримуйте натиснутою Ctrl, щоб заокруглити до цілих. Утримуйте натиснутою "
+"Shift, щоб зміни були точнішими."
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Виберіть вузол(вузли) для імпорту"
@@ -3977,6 +3977,10 @@ msgid "Error running post-import script:"
msgstr "Помилка запуску після імпорту скрипту:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr "Повернули об'єкт, що походить від Node, у методі «post_import()»?"
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Збереження..."
@@ -4016,8 +4020,8 @@ msgstr "Зміна типу імпортованого файла потребу
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
-"Увага: ісують об'єкти, які використовують цей ресурс, — вони можуть "
-"припинити завантажуватися належним чином."
+"УВАГА: існують об'єкти, що використовують цей ресурс та можуть припинити "
+"завантажуватися належним чином."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -4958,7 +4962,7 @@ msgstr "Помилка перевірки хешування sha256"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr "Помилка завантаження активу:"
+msgstr "Помилка завантаження ресурсу:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading (%s / %s)..."
@@ -4994,7 +4998,7 @@ msgstr "Помилка завантаження"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr "Завантаження цього активу вже виконується!"
+msgstr "Завантаження цього ресурсу вже виконується!"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Recently Updated"
@@ -5083,7 +5087,7 @@ msgstr "Завантаження…"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr "ZIP файл активів"
+msgstr "ZIP файл ресурсів"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -6933,12 +6937,12 @@ msgstr ""
"«%s»."
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "Рядок"
+msgid "[Ignore]"
+msgstr "[Ігнорувати]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(ігнорувати)"
+msgid "Line"
+msgstr "Рядок"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7414,6 +7418,20 @@ msgid "XForm Dialog"
msgstr "Вікно XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Клацніть для перемикання між станами видимості.\n"
+"\n"
+"Відкрите око: Gizmo є видимим.\n"
+"Закрите око: Gizmo приховано.\n"
+"Напівзакрите око: Gizmo є також видимим крізь непрозорі поверхні («рентген»)."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Приліпити вузли до підлоги"
@@ -9835,8 +9853,9 @@ msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
-"Не вдалося запустити проєкт: слід імпортувати вміст.\n"
-"Будь ласка, змініть проєкт так, щоб увімкнути початкове імпортування."
+"Не вдалося запустити проєкт: слід імпортувати ресурси.\n"
+"Будь ласка, відкрийте проєкт на редагування, щоб запустити початкове "
+"імпортування."
#: editor/project_manager.cpp
msgid "Are you sure to run %d projects at once?"
@@ -9928,8 +9947,8 @@ msgid ""
"You currently don't have any projects.\n"
"Would you like to explore official example projects in the Asset Library?"
msgstr ""
-"Зараз проєктів немає.\n"
-"Хочете вивчити проєкти офіційних прикладів з бібліотеки даних?"
+"Наразі у вас немає проєктів.\n"
+"Бажаєте переглянути офіційні приклади проєктів з бібліотеки ресурсів?"
#: editor/project_manager.cpp
msgid ""
@@ -10508,8 +10527,8 @@ msgid "Instance Child Scene"
msgstr "Створити екземпляр дочірньої сцени"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "Вилучити скрипт"
+msgid "Detach Script"
+msgstr "Від'єднати скрипт"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10674,6 +10693,16 @@ msgid "Open Documentation"
msgstr "Відкрити документацію"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+"Не вдалося долучити скрипт: не зареєстровано жодної мови.\n"
+"Ймовірно, причиною є те, що цей редактор було зібрано із вимкненими модулями "
+"усіх мов."
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Додати дочірній вузол"
@@ -10722,12 +10751,12 @@ msgstr ""
"кореневого вузла не існує."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr "Долучити новий або наявний скрипт до позначеного вузла."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr "Вилучити скрипт для позначеного вузла."
+msgid "Detach the script from the selected node."
+msgstr "Від'єднати скрипт від позначеного вузла."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10858,6 +10887,10 @@ msgid "A directory with the same name exists."
msgstr "Каталог із такою назвою вже існує."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Файл не існує."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "Некоректний суфікс."
@@ -10898,6 +10931,10 @@ msgid "File exists, it will be reused."
msgstr "Файл вже існує, його буде використано повторно."
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Неправильний шлях."
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "Некоректна назва класу."
@@ -11948,6 +11985,11 @@ msgstr ""
"ключів."
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"У шаблоні експортування неправильно налаштовано сховище ключів випуску."
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
"Нетипове збирання потребує коректного шляху до SDK для Android у параметрах "
@@ -11977,6 +12019,42 @@ msgstr "Некоректна назва пакунка:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"Некоректний модуль «GodotPaymentV3» включено до параметрів проєкту «android/"
+"modules» (змінено у Godot 3.2.2).\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+"Щоб можна було користуватися додатками, слід позначити пункт "
+"«Використовувати нетипову збірку»."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"«.Степені свободи» працюють, лише якщо «Режим Xr» має значення «Oculus "
+"Mobile VR»."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"«Стеженням за руками» можна скористатися, лише якщо «Режим Xr» дорівнює "
+"«Oculus Mobile VR»."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"«Врахуванням фокуса» можна скористатися, лише якщо «Режим Xr» дорівнює "
+"«Oculus Mobile VR»."
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12772,6 +12850,21 @@ msgstr "Змінні величини можна пов'язувати лише
msgid "Constants cannot be modified."
msgstr "Сталі не можна змінювати."
+#~ msgid "Not in resource path."
+#~ msgstr "Не в ресурсному шляху."
+
+#~ msgid "Revert"
+#~ msgstr "Повернутися"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Цю дію не можна скасувати. Повернутися в будь-якому випадку?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "Повернути сцену"
+
+#~ msgid "Clear Script"
+#~ msgstr "Вилучити скрипт"
+
#~ msgid "Issue Tracker"
#~ msgstr "Відстеження помилок"
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index 432a8d1137..10558ad98e 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -829,7 +829,6 @@ msgstr ".تمام کا انتخاب"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1437,18 +1436,9 @@ msgstr ""
msgid "Rearrange Autoloads"
msgstr ""
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr ""
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr ""
-
#: editor/editor_autoload_settings.cpp
-#, fuzzy
-msgid "Not in resource path."
-msgstr ".یہ ریسورس فائل پر مبنی نہی ہے"
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2390,11 +2380,14 @@ msgid "Can't reload a scene that was never saved."
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "سب سکریپشن بنائیں"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2664,10 +2657,6 @@ msgid "Redo"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3282,6 +3271,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr ""
@@ -3882,6 +3875,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr ""
@@ -6829,11 +6826,11 @@ msgid ""
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
+msgid "[Ignore]"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
+msgid "Line"
msgstr ""
#: editor/plugins/script_text_editor.cpp
@@ -7312,6 +7309,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10312,7 +10318,7 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
-msgid "Clear Script"
+msgid "Detach Script"
msgstr "سب سکریپشن بنائیں"
#: editor/scene_tree_dock.cpp
@@ -10475,6 +10481,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10523,11 +10536,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -10651,6 +10664,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr ""
@@ -10692,6 +10709,10 @@ msgid "File exists, it will be reused."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr ""
@@ -11755,6 +11776,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11778,6 +11803,32 @@ msgstr ""
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12420,6 +12471,14 @@ msgid "Constants cannot be modified."
msgstr ""
#, fuzzy
+#~ msgid "Not in resource path."
+#~ msgstr ".یہ ریسورس فائل پر مبنی نہی ہے"
+
+#, fuzzy
+#~ msgid "Clear Script"
+#~ msgstr "سب سکریپشن بنائیں"
+
+#, fuzzy
#~ msgid "Class Description"
#~ msgstr "سب سکریپشن بنائیں"
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index a52a3dedf3..fe846d5e08 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -846,7 +846,6 @@ msgstr "Không thể kết nối tín hiệu"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1463,17 +1462,8 @@ msgstr "Mở"
msgid "Rearrange Autoloads"
msgstr "Sắp xếp lại Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "Đường dẫn sai."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "Tệp không tồn tại."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
+msgid "Can't add autoload:"
msgstr ""
#: editor/editor_autoload_settings.cpp
@@ -2434,12 +2424,14 @@ msgstr "Không thể nạp một cảnh mà chưa lưu bao giờ."
#: editor/editor_node.cpp
#, fuzzy
-msgid "Revert"
-msgstr "Trở lại"
+msgid "Reload Saved Scene"
+msgstr "Lưu Cảnh"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "Hành động này không thể hoàn tác. Trở lại luôn?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2719,10 +2711,6 @@ msgid "Redo"
msgstr "Làm lại"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3349,6 +3337,10 @@ msgstr ""
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "Chọn Nút để Nhập"
@@ -3949,6 +3941,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "Đang lưu ..."
@@ -6919,15 +6915,15 @@ msgstr ""
"Không có phương thức kết nối '%s' của tín hiệu '%s' từ nút '%s' đến nút '%s'."
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "Dòng:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "Thêm Hàm"
@@ -7408,6 +7404,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "Snap các nút đến Floor"
@@ -10439,8 +10444,9 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+#, fuzzy
+msgid "Detach Script"
+msgstr "Đính kèm Script"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10603,6 +10609,13 @@ msgid "Open Documentation"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "Thêm nút con"
@@ -10651,11 +10664,13 @@ msgstr ""
"Tệp tin cảnh giống như một nút. Tạo một cảnh kế thừa nếu nó không có nút gốc."
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "Đính kèm một tệp lệnh cho nút đã chọn."
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "Xoá tệp lệnh khỏi nút đã chọn."
#: editor/scene_tree_dock.cpp
@@ -10788,6 +10803,10 @@ msgid "A directory with the same name exists."
msgstr "Đã có một file hoặc folder trùng tên."
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "Tệp không tồn tại."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "Phải sử dụng extension có hiệu lực"
@@ -10832,6 +10851,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "Đường dẫn sai."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "Kích thước font không hợp lệ."
@@ -11896,6 +11920,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -11920,6 +11948,32 @@ msgstr "Kích thước font không hợp lệ."
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12574,6 +12628,13 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Không thể chỉnh sửa hằng số."
+#, fuzzy
+#~ msgid "Revert"
+#~ msgstr "Trở lại"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "Hành động này không thể hoàn tác. Trở lại luôn?"
+
#~ msgid "Issue Tracker"
#~ msgstr "Theo dõi vấn đề"
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index 538e017a5d..5dc2b5948f 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -60,12 +60,16 @@
# silentbird <silentbird520@outlook.com>, 2019.
# Haoyu Qiu <timothyqiu32@gmail.com>, 2019, 2020.
# Revan Ji <jiruifancr@gmail.com>, 2020.
+# nieyuanhong <15625988003@163.com>, 2020.
+# binotaliu <binota@protonmail.ch>, 2020.
+# BinotaLIU <binota@protonmail.ch>, 2020.
+# Tim Bao <honiebao@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2020-05-01 11:42+0000\n"
-"Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: Tim Bao <honiebao@gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -73,7 +77,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0.2\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -82,25 +86,25 @@ msgstr "convert()的参数类型无效,请使用TYPE_*常量。"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "预期为长度为1的字符串(一个字符)。"
+msgstr "仅需要长度为1的字符串(1字符)。"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "解码的字节不足,或格式无效。"
+msgstr "没有足够的字节来解码,或格式无效。"
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr "表达式中的输入 %i 无效(未传递)"
+msgstr "表达式中包含得%i无效(未传递)"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self 无法使用,因为实例为空(未传递)"
+msgstr "实例为null(未传递),无法传递自身self"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr "操作符 %s 的操作数 %s 和 %s 无效。"
+msgstr "操作符 %s ,%s 和 %s 的操作数无效。"
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
@@ -108,15 +112,15 @@ msgstr "将 %s 类型作为 %s 基础类型的索引无效"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr "将“%s”作为 %s 基础类型的具名索引无效"
+msgstr "将 '%s' 作为 %s 基础类型的具名索引无效"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "构造“%s”的参数无效"
+msgstr "构造 '%s' 的参数无效"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr "调用“%s”时:"
+msgstr "在调用'%s'时:"
#: core/ustring.cpp
msgid "B"
@@ -881,7 +885,6 @@ msgstr "无法连接信号"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1489,17 +1492,9 @@ msgstr "启用"
msgid "Rearrange Autoloads"
msgstr "重排序Autoload"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "Invalid path."
-msgstr "路径无效。"
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "文件不存在。"
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "不在资源路径下。"
+msgid "Can't add autoload:"
+msgstr "无法加载autoload:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1874,7 +1869,7 @@ msgstr "切换模式"
#: editor/editor_file_dialog.cpp
msgid "Focus Path"
-msgstr "设置路径焦点"
+msgstr "聚焦路径"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Up"
@@ -2435,12 +2430,14 @@ msgid "Can't reload a scene that was never saved."
msgstr "无法重新加载未保存的场景。"
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "恢复"
+msgid "Reload Saved Scene"
+msgstr "重载已保存场景"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "此操作无法撤销,是否继续?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2715,10 +2712,6 @@ msgid "Redo"
msgstr "重做"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "恢复场景"
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr "其他项目或全场景工具。"
@@ -3345,6 +3338,11 @@ msgstr "无法执行脚本:"
msgid "Did you forget the '_run' method?"
msgstr "您是否遗漏了_run()方法?"
+#: editor/editor_spin_slider.cpp
+#, fuzzy
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr "按住Ctrl键放置一个Getter节点。按住Shift键放置一个通用签名。"
+
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
msgstr "选择要导入的节点"
@@ -3933,6 +3931,10 @@ msgid "Error running post-import script:"
msgstr "后处理脚本运行发生错误:"
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "保存中..."
@@ -6319,7 +6321,9 @@ msgstr "同步骨骼"
msgid ""
"No texture in this polygon.\n"
"Set a texture to be able to edit UV."
-msgstr "此多边形没有贴图,请先为它设置贴图后再尝试编辑UV。"
+msgstr ""
+"此多边形没有贴图。\n"
+"请先为它设置贴图后再尝试编辑UV。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
@@ -6840,12 +6844,13 @@ msgid ""
msgstr "未找到方法“%s”(连接于信号“%s”、来自节点“%s”、目标节点“%s”)。"
#: editor/plugins/script_text_editor.cpp
-msgid "Line"
-msgstr "行"
+#, fuzzy
+msgid "[Ignore]"
+msgstr "(忽略)"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(忽略)"
+msgid "Line"
+msgstr "行"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -7318,6 +7323,15 @@ msgid "XForm Dialog"
msgstr "XForm对话框"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr "将节点吸附至地面"
@@ -8174,7 +8188,7 @@ msgid ""
"Drag handles to edit Rect.\n"
"Click on another Tile to edit it."
msgstr ""
-"拖拽手柄以编辑举行。\n"
+"拖拽手柄以编辑矩形。\n"
"点击另一个图块进行编辑。"
#: editor/plugins/tile_set_editor_plugin.cpp
@@ -8336,7 +8350,7 @@ msgstr "没有提供提交消息"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "No files added to stage"
-msgstr "没有文件添加到舞台"
+msgstr "没有文件被添加到暂存区"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Commit"
@@ -8384,11 +8398,11 @@ msgstr "类型更改"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Stage Selected"
-msgstr "舞台选定"
+msgstr "将选定放入暂存区"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Stage All"
-msgstr "所有舞台"
+msgstr "暂存全部"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Add a commit message"
@@ -8632,7 +8646,7 @@ msgstr "返回NaN和标量参数之间比较的布尔结果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Less Than (<)"
-msgstr "小于 (*)"
+msgstr "小于 (<)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Less Than or Equal (<=)"
@@ -8640,7 +8654,7 @@ msgstr "小于或等于(<=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Not Equal (!=)"
-msgstr "不等于(!=)"
+msgstr "不等于(!=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -8650,7 +8664,7 @@ msgstr "如果提供的布尔值是true或false,则返回关联的向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns an associated scalar if the provided boolean value is true or false."
-msgstr "如果提供的布尔值是true或false,则返回关联的向量。"
+msgstr "如果提供的布尔值是true或false,则返回关联的标量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the boolean result of the comparison between two parameters."
@@ -8953,7 +8967,7 @@ msgstr "执行立方体纹理查找。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Perform the texture lookup."
-msgstr "执行立方体纹理查找。"
+msgstr "执行纹理查找。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Cubic texture uniform lookup."
@@ -8981,9 +8995,11 @@ msgid ""
"whose number of rows is the number of components in 'c' and whose number of "
"columns is the number of components in 'r'."
msgstr ""
-"计算一对矢量的外部乘积。 OuterProduct 将第一个参数\"c\"视为列矢量(包含一列的"
-"矩阵),将第二个参数\"r\"视为行矢量(具有一行的矩阵),并执行线性代数矩阵乘以"
-"\"c = r\",生成行数为\"c\"中的组件,其列数是\"r\"中的组件数。"
+"计算一对矢量的外积。\n"
+"\n"
+"OuterProduct 将第一个参数\"c\"视为列矢量(包含一列的矩阵),将第二个参数\"r"
+"\"视为行矢量(具有一行的矩阵),并执行线性代数矩阵乘以\"c * r\",生成行数为"
+"\"c\"中的组件,其列数是\"r\"中的组件数。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Composes transform from four vectors."
@@ -9101,9 +9117,10 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
-"平滑步函数(矢量(边缘0)、矢量(边缘1)、矢量(x))。 如果\"x\"小于"
-"\"edge0\",则返回 0.0;如果\"x\"大于\"edge1\",则返回 0.0。否则,返回值将使用"
-"赫密特多项式在 0.0 和 1.0 之间插值。"
+"SmoothStep 函数(矢量(edge0)、矢量(edge1)、矢量(x))。 \n"
+"\n"
+"如果\"x\"小于\"edge0\",则返回 0.0;如果\"x\"大于\"edge1\",则返回 0.0。否则,"
+"返回值将使用赫密特多项式在 0.0 和 1.0 之间插值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9708,7 +9725,9 @@ msgstr ""
msgid ""
"Language changed.\n"
"The interface will update after restarting the editor or project manager."
-msgstr "语言已更改。 重新启动编辑器或项目管理器后,界面将更新。"
+msgstr ""
+"语言已更改。\n"
+"界面将在重新启动编辑器或项目管理器后更新。"
#: editor/project_manager.cpp
msgid ""
@@ -9916,7 +9935,7 @@ msgstr "滚轮向下滚动。"
#: editor/project_settings_editor.cpp
msgid "Add Global Property"
-msgstr "添加Getter属性"
+msgstr "添加全局属性"
#: editor/project_settings_editor.cpp
msgid "Select a setting item first!"
@@ -10310,7 +10329,7 @@ msgstr "场景运行设置"
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
-msgstr "没有选中节点来添加实例。"
+msgstr "没有可实例化场景的父节点。"
#: editor/scene_tree_dock.cpp
msgid "Error loading scene from %s"
@@ -10335,8 +10354,9 @@ msgid "Instance Child Scene"
msgstr "实例化子场景"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr "清除脚本"
+#, fuzzy
+msgid "Detach Script"
+msgstr "添加脚本"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10494,6 +10514,13 @@ msgid "Open Documentation"
msgstr "打开文档"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr "添加子节点"
@@ -10540,11 +10567,13 @@ msgid ""
msgstr "实例化场景文件为一个节点,如果没有根节点则创建一个继承自该文件的场景。"
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+#, fuzzy
+msgid "Attach a new or existing script to the selected node."
msgstr "为选中节点创建或设置脚本。"
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+#, fuzzy
+msgid "Detach the script from the selected node."
msgstr "清除选中节点的脚本。"
#: editor/scene_tree_dock.cpp
@@ -10676,6 +10705,10 @@ msgid "A directory with the same name exists."
msgstr "存在同名目录。"
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "文件不存在。"
+
+#: editor/script_create_dialog.cpp
msgid "Invalid extension."
msgstr "扩展名无效。"
@@ -10716,6 +10749,10 @@ msgid "File exists, it will be reused."
msgstr "文件存在,将被重用。"
#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "路径无效。"
+
+#: editor/script_create_dialog.cpp
msgid "Invalid class name."
msgstr "无效的类别名称。"
@@ -10729,7 +10766,7 @@ msgstr "脚本路径/名称有效。"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
-msgstr "允许:a-z,a-z,0-9,u和。"
+msgstr "允许:a-z,a-z,0-9,_ 和 ."
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)."
@@ -10979,19 +11016,19 @@ msgstr "改变方框大小"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Radius"
-msgstr "修改胶囊体半径"
+msgstr "修改椭圆形半径"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Height"
-msgstr "修改胶囊体高度"
+msgstr "修改椭圆形高度"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Radius"
-msgstr "修改胶囊体半径"
+msgstr "修改圆柱形半径"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Height"
-msgstr "修改胶囊体高度"
+msgstr "修改圆柱形高度"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Ray Shape Length"
@@ -11003,7 +11040,7 @@ msgstr "改变圆柱体半径"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Height"
-msgstr "修改胶囊体高度"
+msgstr "修改圆柱体高度"
#: modules/csg/csg_gizmos.cpp
msgid "Change Torus Inner Radius"
@@ -11696,7 +11733,7 @@ msgstr "搜索可视化脚本节点"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Get %s"
-msgstr "得到 %s"
+msgstr "获取 %s"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Set %s"
@@ -11743,6 +11780,11 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "未在编辑器设置或预设中配置调试密钥库。"
#: platform/android/export/export.cpp
+#, fuzzy
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr "未在编辑器设置或预设中配置调试密钥库。"
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr "自定义构建需要在“编辑器设置”中使用有效的Android SDK路径。"
@@ -11766,6 +11808,32 @@ msgstr "无效的包名称:"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12384,15 +12452,15 @@ msgid ""
"children placement behavior.\n"
"If you don't intend to add a script, use a plain Control node instead."
msgstr ""
-"除非脚本配置其子代放置行为,否则容器本身没有任何作用。 如果您不想添加脚本,请"
-"改用普通的Control节点。"
+"除非脚本配置其子代放置行为,否则容器本身没有任何作用。\n"
+"如果您不想添加脚本,请改用普通的Control节点。"
#: scene/gui/control.cpp
msgid ""
"The Hint Tooltip won't be displayed as the control's Mouse Filter is set to "
"\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."
msgstr ""
-"由于该控件的 Mouse Filter 设置为 \"Ignore\" 因此它的 Hint Tooltip 将不会展"
+"由于该控件的 Mouse Filter 设置为 \"Ignore\" 因此它的 Hint Tooltip 将不会展"
"示。将 Mouse Filter 设置为 \"Stop\" 或 \"Pass\" 可修正此问题。"
#: scene/gui/dialogs.cpp
@@ -12422,8 +12490,9 @@ msgid ""
"Use a container as child (VBox, HBox, etc.), or a Control and set the custom "
"minimum size manually."
msgstr ""
-"ScrollContainer旨在与单个子控件一起使用。 使用容器作为子容器(VBox,HBox等)"
-"或控件,并手动设置自定义最小尺寸。"
+"ScrollContainer旨在与单个子控件一起使用。\n"
+"子节点应该是单个容器(VBox、HBox等)或者使用单个控件并手动设置其自定义最小尺"
+"寸。"
#: scene/gui/tree.cpp
msgid "(Other)"
@@ -12478,6 +12547,21 @@ msgstr "变量只能在顶点函数中指定。"
msgid "Constants cannot be modified."
msgstr "不允许修改常量。"
+#~ msgid "Not in resource path."
+#~ msgstr "不在资源路径下。"
+
+#~ msgid "Revert"
+#~ msgstr "恢复"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "此操作无法撤销,是否继续?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "恢复场景"
+
+#~ msgid "Clear Script"
+#~ msgstr "清除脚本"
+
#~ msgid "Issue Tracker"
#~ msgstr "问题跟踪器"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 770b4d38f2..4832307ce5 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -873,7 +873,6 @@ msgstr "無法連接訊號"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1513,19 +1512,9 @@ msgstr "啟用"
msgid "Rearrange Autoloads"
msgstr "重新排例Autoloads"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "有效的路徑"
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "檔案不存在."
-
#: editor/editor_autoload_settings.cpp
-#, fuzzy
-msgid "Not in resource path."
-msgstr "不在資源路徑。"
+msgid "Can't add autoload:"
+msgstr ""
#: editor/editor_autoload_settings.cpp
#, fuzzy
@@ -2505,11 +2494,14 @@ msgid "Can't reload a scene that was never saved."
msgstr "不能重新載入從未儲存的場景。"
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr ""
+#, fuzzy
+msgid "Reload Saved Scene"
+msgstr "儲存場景"
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
#: editor/editor_node.cpp
@@ -2805,10 +2797,6 @@ msgid "Redo"
msgstr "重製"
#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
msgstr ""
@@ -3455,6 +3443,10 @@ msgstr "不能執行腳本:"
msgid "Did you forget the '_run' method?"
msgstr ""
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+
#: editor/editor_sub_scene.cpp
#, fuzzy
msgid "Select Node(s) to Import"
@@ -4100,6 +4092,10 @@ msgid "Error running post-import script:"
msgstr ""
#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
msgstr "儲存中..."
@@ -7160,15 +7156,15 @@ msgid ""
msgstr "由 '%s' 連到 '%s'"
#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Line"
msgstr "行:"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr ""
-
-#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Go to Function"
msgstr "行為"
@@ -7666,6 +7662,15 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
msgstr ""
@@ -10765,8 +10770,8 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
-msgid "Clear Script"
-msgstr "下一個腳本"
+msgid "Detach Script"
+msgstr "腳本"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10938,6 +10943,13 @@ msgid "Open Documentation"
msgstr "開啓最近的"
#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
msgstr ""
@@ -10989,11 +11001,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
+msgid "Attach a new or existing script to the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
+msgid "Detach the script from the selected node."
msgstr ""
#: editor/scene_tree_dock.cpp
@@ -11122,6 +11134,10 @@ msgid "A directory with the same name exists."
msgstr ""
#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "檔案不存在."
+
+#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Invalid extension."
msgstr "無效副檔名"
@@ -11169,6 +11185,11 @@ msgstr "檔案已存在, 要覆蓋嗎?"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Invalid path."
+msgstr "有效的路徑"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid class name."
msgstr "無效名稱"
@@ -12263,6 +12284,10 @@ msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+
+#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
msgstr ""
@@ -12287,6 +12312,32 @@ msgstr "無效名稱"
#: platform/android/export/export.cpp
msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
@@ -12948,6 +12999,14 @@ msgid "Constants cannot be modified."
msgstr ""
#, fuzzy
+#~ msgid "Not in resource path."
+#~ msgstr "不在資源路徑。"
+
+#, fuzzy
+#~ msgid "Clear Script"
+#~ msgstr "下一個腳本"
+
+#, fuzzy
#~ msgid "Replaced %d occurrence(s)."
#~ msgstr "取代了 %d 個。"
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index 6b3651b5f6..22051058ad 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -14,18 +14,22 @@
# ken l <macauhome@gmail.com>, 2018.
# Eric K <eric900601@gmail.com>, 2019.
# cnieFIT <dtotncq@gmail.com>, 2019.
-# Bluesir Bruce <a5566740293@gmail.com>, 2019.
+# Bluesir Bruce <a5566740293@gmail.com>, 2019, 2020.
# leela <53352@protonmail.com>, 2019.
# Kenneth Lo <closer.tw@gmail.com>, 2019.
# SIYU FU <1002492607@qq.com>, 2019.
# 鄭惟中 <biglionlion06@gmail.com>, 2020.
# Alexander Wang <zxcvb22217@gmail.com>, 2020.
+# binotaliu <binota@protonmail.ch>, 2020.
+# Allen H. <w84miracle@gmail.com>, 2020.
+# BinotaLIU <binota@protonmail.ch>, 2020.
+# BinotaLIU <me@binota.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-03-01 19:57+0000\n"
-"Last-Translator: Alexander Wang <zxcvb22217@gmail.com>\n"
+"PO-Revision-Date: 2020-06-15 01:48+0000\n"
+"Last-Translator: BinotaLIU <me@binota.org>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hant/>\n"
"Language: zh_TW\n"
@@ -33,58 +37,58 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.0-dev\n"
+"X-Generator: Weblate 4.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr "Convert()函數所收到的參數錯誤,請用 TYPE_* 常數。"
+msgstr "convert() 函式收到了無效的引數,請使用 TYPE_* 常數。"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "應為一個長度是1(一個字元)的字串。"
+msgstr "應為一個長度為 1(一個字元)的字串。"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "輸入的解碼字節不足、或為無效格式。"
+msgstr "欲解碼的位元組不足或格式無效。"
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr "運算式中的輸入 %i 無效 (未傳遞)"
+msgstr "運算式中的輸入 %i 無效 (未傳遞)"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "因該實例(instance)為空,self 無法被使用"
+msgstr "該實體爲 null,無法使用 self"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr "此數值無法被 %s、%s 和与%s 運算。"
+msgstr "該運算元無法由運算子 %s、%s、與 %s 運算。"
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
-msgstr "無效的內存地址類型 %s,基礎型式 %s"
+msgstr "在型別 %s 、基礎類型 %s 上存取了無效的索引"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr "基本類型 %s 的命名索引 '%s' 無效"
+msgstr "命名索引「%s」對基礎型別 %s 無效"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "無效參數類型: '%s'"
+msgstr "用了無效的引數來建構「%s」"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr "調用“%s”時:"
+msgstr "呼叫「%s」時:"
#: core/ustring.cpp
msgid "B"
-msgstr "Byte"
+msgstr "B"
#: core/ustring.cpp
msgid "KiB"
-msgstr "基布"
+msgstr "KiB"
#: core/ustring.cpp
msgid "MiB"
@@ -92,23 +96,23 @@ msgstr "MiB"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "GiB"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "TiB"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "PiB"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "EiB"
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr "釋放"
+msgstr "不受限"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
@@ -124,90 +128,84 @@ msgstr "時間:"
#: editor/animation_bezier_editor.cpp
msgid "Value:"
-msgstr "數值:"
+msgstr "數值:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "在此插入畫格"
+msgstr "在此插入關鍵畫格"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
-msgstr "複製所選畫格"
+msgstr "重複所選關鍵畫格"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr "刪除所選畫格"
+msgstr "刪除所選關鍵畫格"
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
-msgstr "添加貝塞爾點"
+msgstr "新增貝茲曲線控制點"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
-msgstr "移動Bezier點"
+msgstr "移動貝茲曲線控制點"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr "複製關鍵畫格"
+msgstr "重複動畫關鍵畫格"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Delete Keys"
-msgstr "刪除關鍵畫格"
+msgstr "刪除動畫關鍵畫格"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr "變更關鍵畫格的時間"
+msgstr "更改動畫關鍵畫格時間"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "變更轉場效果"
+msgstr "更改動畫轉場效果"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr "變更動畫變換"
+msgstr "更改動畫變換"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Value"
-msgstr "變更關鍵畫格的數值"
+msgstr "更改動畫關鍵畫格數值"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
-msgstr "更改回調"
+msgstr "更改動畫呼叫"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Time"
-msgstr "變更關鍵畫格的時間"
+msgstr "更改多個動畫的關鍵畫格時間"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transition"
-msgstr "變更轉場效果"
+msgstr "更改多個動畫的轉場效果"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transform"
-msgstr "變更動畫變換"
+msgstr "更改多個動畫的變換"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Value"
-msgstr "變更關鍵畫格的數值"
+msgstr "更改多個動畫的關鍵畫格數值"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Call"
-msgstr "更改回調"
+msgstr "更改多個動畫的回調"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Length"
-msgstr "變更動畫長度"
+msgstr "更改動畫長度"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr "變更動畫循環"
+msgstr "更改動畫循環"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -219,11 +217,11 @@ msgstr "3D 變換軌道"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr "調用方法軌道"
+msgstr "呼叫方法軌道"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr "貝塞爾曲線軌跡"
+msgstr "貝茲曲線軌道"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
@@ -234,50 +232,45 @@ msgid "Animation Playback Track"
msgstr "動畫回放軌道"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (frames)"
-msgstr "動畫長度(秒)"
+msgstr "動畫長度(幀)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (seconds)"
msgstr "動畫長度(秒)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track"
-msgstr "添加動畫軌"
+msgstr "新增動畫軌"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Looping"
-msgstr "動畫空間。"
+msgstr "重複動畫"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
-msgstr "函數:"
+msgstr "函式:"
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
-msgstr "音訊剪輯:"
+msgstr "音訊片段:"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
-msgstr "動畫剪輯:"
+msgstr "動畫片段:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Track Path"
-msgstr "調整陣列資料"
+msgstr "調整軌道路徑"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
-msgstr "打開/關閉此軌道."
+msgstr "打開/關閉此軌道。"
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr "更新模式 (如何設置此屬性)"
+msgstr "更新模式(屬性設定方法)"
#: editor/animation_track_editor.cpp
msgid "Interpolation Mode"
@@ -285,22 +278,19 @@ msgstr "插值模式"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr "循環包裹模式(從循環開始插入結束)"
+msgstr "無縫循環模式(從循環開始插入結束)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Remove this track."
-msgstr "移除選擇的動畫軌。"
+msgstr "移除該動畫軌。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s): "
-msgstr "步驟 :"
+msgstr "時間(秒) : "
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Toggle Track Enabled"
-msgstr "啟用"
+msgstr "啟用/禁用軌道"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -316,7 +306,7 @@ msgstr "觸發器"
#: editor/animation_track_editor.cpp
msgid "Capture"
-msgstr "捕獲"
+msgstr "截圖"
#: editor/animation_track_editor.cpp
msgid "Nearest"
@@ -333,40 +323,36 @@ msgstr "立方體"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
-msgstr "Clamp式內插循環"
+msgstr "Clamp 式內插循環"
#: editor/animation_track_editor.cpp
msgid "Wrap Loop Interp"
-msgstr "Wrap式內插循環"
+msgstr "Wrap 式內插循環"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr "插入畫格"
+msgstr "插入關鍵畫格"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Duplicate Key(s)"
-msgstr "複製動畫關鍵畫格"
+msgstr "重複關鍵畫格"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Delete Key(s)"
-msgstr "刪除動畫關鍵畫格"
+msgstr "刪除關鍵畫格"
#: editor/animation_track_editor.cpp
msgid "Change Animation Update Mode"
-msgstr "變更動畫更新模式"
+msgstr "更改動畫更新模式"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Interpolation Mode"
-msgstr "變更動畫內插模式"
+msgstr "更改動畫插值模式"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Loop Mode"
-msgstr "變更動畫循環模式"
+msgstr "更改動畫循環模式"
#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
@@ -374,11 +360,11 @@ msgstr "刪除動畫軌"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr "為 %s 新增動畫軌並插入畫格?"
+msgstr "確定要為 %s 建立動畫軌並插入關鍵畫格嗎?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
-msgstr "新增 %d 個動畫軌並插入畫格?"
+msgstr "確定要建立 %d 個動畫軌並插入畫格嗎?"
#: editor/animation_track_editor.cpp editor/create_dialog.cpp
#: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp
@@ -390,7 +376,7 @@ msgstr "新增 %d 個動畫軌並插入畫格?"
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Create"
-msgstr "新增"
+msgstr "建立"
#: editor/animation_track_editor.cpp
msgid "Anim Insert"
@@ -398,11 +384,11 @@ msgstr "插入動畫"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
-msgstr "AnimationPlayer不能被自己所啟動,必須由其他player啟動。"
+msgstr "AnimationPlayer 不能播放自己,只可播放其他 Player。"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
-msgstr "新增/插入動畫"
+msgstr "新增/插入動畫"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Track & Key"
@@ -413,18 +399,16 @@ msgid "Anim Insert Key"
msgstr "新增關鍵畫格"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Step"
-msgstr "變更動畫長度"
+msgstr "更改動畫步長"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Rearrange Tracks"
-msgstr "重新排列 Autoload"
+msgstr "重新排列軌道"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr "Transform軌只能添加在spatial為主的節點。"
+msgstr "變形軌只能套用至 Spatial 節點。"
#: editor/animation_track_editor.cpp
msgid ""
@@ -440,80 +424,74 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr "動畫軌跡只能指向 AnimationPlayer 節點."
+msgstr "動畫軌只能指向 AnimationPlayer 節點。"
#: editor/animation_track_editor.cpp
msgid "An animation player can't animate itself, only other players."
-msgstr ""
+msgstr "動畫 Player 無法播放自己,只能播放其他 Player。"
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr "無法添加沒有根目錄的新曲目"
+msgstr "沒有根節點時無法新增軌道"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
-msgstr "此軌不能用於Bezier(子屬性不適合)"
+msgstr "對於貝茲曲線無效的軌道(非適用之子屬性)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Bezier Track"
-msgstr "添加動畫軌"
+msgstr "新增貝茲曲線軌"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
-msgstr "軌道路徑無效, 因此無法添加鍵。"
+msgstr "無效的軌道路徑,無法新增關鍵畫格。"
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr "軌道不是空間類型, 不能插入鍵"
+msgstr "非 Spatial 類型之軌道,無法插入關鍵畫格"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Transform Track Key"
-msgstr "動畫新增軌跡與按鍵"
+msgstr "新增變形軌關鍵畫格"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track Key"
-msgstr "添加動畫軌"
+msgstr "添加軌道關鍵畫格"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
-msgstr "跟蹤路徑無效, 因此無法添加方法鍵。"
+msgstr "無效的軌道路徑,無法新增方法關鍵畫格。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Method Track Key"
-msgstr "動畫新增軌跡與按鍵"
+msgstr "新增方法軌道關鍵畫格"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
-msgstr "在對象中找不到方法: "
+msgstr "在物件中找不到方法: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
-msgstr "移動關鍵畫格"
+msgstr "移動動畫關鍵畫格"
#: editor/animation_track_editor.cpp
msgid "Clipboard is empty"
-msgstr "剪貼板為空"
+msgstr "空白剪貼板"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Paste Tracks"
-msgstr "貼上參數"
+msgstr "貼上關鍵畫格"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
-msgstr "縮尺鍵"
+msgstr "動畫縮放關鍵影格"
#: editor/animation_track_editor.cpp
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
-msgstr "這個選項不適用於貝塞爾編輯,因為它只是一個單軌。"
+msgstr "該選項不適用於編輯貝茲曲線,其僅有單一軌道。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid ""
"This animation belongs to an imported scene, so changes to imported tracks "
"will not be saved.\n"
@@ -525,22 +503,19 @@ msgid ""
"Alternatively, use an import preset that imports animations to separate "
"files."
msgstr ""
-"這個動畫存在於匯入的場景中,因此對匯入軌所做的變更不會被儲存。\n"
+"這個動畫是由外部匯入之場景提供,套用於匯入軌道的修改將不會被保存。\n"
"\n"
-"若是要開啟「加入客制軌」的功能,請在場景的匯入設定中將「動畫 -> 存放」設定"
-"為\n"
-"「檔案」,開啟「動畫 -> 保存客制軌」,然後重新入匯入。\n"
-"或者,你可以在匯入時,將動畫資料匯入單獨的檔案之中。"
+"若要開啟「加入客制軌」的功能,請在場景在匯入設定中將「動畫 -> 儲存」設定為\n"
+"「檔案」,並啟用「動畫 -> 保存客制軌」,然後重新匯入。\n"
+"或者也可使用會將動畫匯入獨立檔案的匯入 Preset。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Warning: Editing imported animation"
msgstr "警告:正在編輯匯入的動畫"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select an AnimationPlayer node to create and edit animations."
-msgstr "從場景樹中選擇一個 AnimationPlayer 來編輯動畫。"
+msgstr "選擇 AnimationPlayer 節點以建立並編輯動畫。"
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
@@ -548,26 +523,23 @@ msgstr "僅顯示樹中所選節點的軌跡。"
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
-msgstr "按節點對軌跡分組或將其顯示為普通清單。"
+msgstr "依節點分組軌跡或將其顯示為普通清單。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Snap:"
-msgstr "步驟 :"
+msgstr "吸附:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation step value."
-msgstr "動畫空間。"
+msgstr "動畫步進值。"
#: editor/animation_track_editor.cpp
msgid "Seconds"
msgstr "秒"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "FPS"
-msgstr "每秒張數"
+msgstr "FPS"
#: editor/animation_track_editor.cpp editor/editor_properties.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -580,14 +552,12 @@ msgid "Edit"
msgstr "編輯"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation properties."
-msgstr "動畫空間。"
+msgstr "動畫屬性。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Copy Tracks"
-msgstr "複製參數"
+msgstr "複製軌道"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
@@ -595,34 +565,31 @@ msgstr "縮放所選"
#: editor/animation_track_editor.cpp
msgid "Scale From Cursor"
-msgstr "由游標縮放"
+msgstr "以游標縮放"
#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr "複製所選"
+msgstr "重複所選"
#: editor/animation_track_editor.cpp
msgid "Duplicate Transposed"
-msgstr "複製並轉置"
+msgstr "轉置並重複"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Delete Selection"
-msgstr "複製所選"
+msgstr "刪除所選"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Next Step"
-msgstr "往下一步"
+msgstr "跳至下一步"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Previous Step"
-msgstr "往上一步"
+msgstr "跳至上一步"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
-msgstr "動畫最佳化"
+msgstr "最佳化動畫"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation"
@@ -634,23 +601,23 @@ msgstr "選擇要設定動畫的節點:"
#: editor/animation_track_editor.cpp
msgid "Use Bezier Curves"
-msgstr "使用貝塞爾曲線"
+msgstr "使用貝茲曲線"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
-msgstr "動畫最佳化"
+msgstr "最佳化動畫工具"
#: editor/animation_track_editor.cpp
msgid "Max. Linear Error:"
-msgstr "最大線性錯誤:"
+msgstr "最大線性錯誤:"
#: editor/animation_track_editor.cpp
msgid "Max. Angular Error:"
-msgstr "最大角度錯誤:"
+msgstr "最大角度錯誤:"
#: editor/animation_track_editor.cpp
msgid "Max Optimizable Angle:"
-msgstr "最大可優化角度:"
+msgstr "最大可最佳化角度:"
#: editor/animation_track_editor.cpp
msgid "Optimize"
@@ -662,7 +629,7 @@ msgstr "移除無效的關鍵畫格"
#: editor/animation_track_editor.cpp
msgid "Remove unresolved and empty tracks"
-msgstr "刪除未處理的空白軌道"
+msgstr "刪除未處理與空白的軌道"
#: editor/animation_track_editor.cpp
msgid "Clean-up all animations"
@@ -678,12 +645,11 @@ msgstr "清除"
#: editor/animation_track_editor.cpp
msgid "Scale Ratio:"
-msgstr "縮放比例:"
+msgstr "縮放比例:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select Tracks to Copy"
-msgstr "選擇要複製的軌道:"
+msgstr "選擇軌道以複製"
#: editor/animation_track_editor.cpp editor/editor_log.cpp
#: editor/editor_properties.cpp
@@ -695,22 +661,20 @@ msgid "Copy"
msgstr "複製"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select All/None"
-msgstr "選擇模式"
+msgstr "選擇全部/取消選擇"
#: editor/animation_track_editor_plugins.cpp
-#, fuzzy
msgid "Add Audio Track Clip"
-msgstr "添加動畫軌"
+msgstr "新增音訊軌片段"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip Start Offset"
-msgstr "更改音訊軌道剪輯起始偏移"
+msgstr "更改音訊軌片段起始偏移"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip End Offset"
-msgstr "更改音訊曲目剪輯結束偏移"
+msgstr "更改音訊軌片段結束偏移"
#: editor/array_property_edit.cpp
msgid "Resize Array"
@@ -718,42 +682,39 @@ msgstr "調整陣列大小"
#: editor/array_property_edit.cpp
msgid "Change Array Value Type"
-msgstr "調整陣列資料型態"
+msgstr "更改陣列資料型別"
#: editor/array_property_edit.cpp
msgid "Change Array Value"
-msgstr "調整陣列資料"
+msgstr "更改陣列資料"
#: editor/code_editor.cpp
msgid "Go to Line"
-msgstr "前往第...行"
+msgstr "跳至第 ... 行"
#: editor/code_editor.cpp
msgid "Line Number:"
-msgstr "行號:"
+msgstr "行號:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "替換…"
+msgstr "已取代了 %d 件。"
#: editor/code_editor.cpp editor/editor_help.cpp
-#, fuzzy
msgid "%d match."
-msgstr "找到 %d 件符合結果。"
+msgstr "%d 件相符合的結果。"
#: editor/code_editor.cpp editor/editor_help.cpp
-#, fuzzy
msgid "%d matches."
-msgstr "找到 %d 件符合結果。"
+msgstr "%d 件相符合的結果。"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
-msgstr "符合大小寫"
+msgstr "區分大小寫"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Whole Words"
-msgstr "符合完整單字"
+msgstr "搜尋完整單字"
#: editor/code_editor.cpp editor/rename_dialog.cpp
msgid "Replace"
@@ -765,7 +726,7 @@ msgstr "取代全部"
#: editor/code_editor.cpp
msgid "Selection Only"
-msgstr "僅選擇區域"
+msgstr "僅搜尋所選區域"
#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/text_editor.cpp
@@ -774,7 +735,7 @@ msgstr "標準"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
-msgstr "\"切換腳本\" 面板"
+msgstr "開啟/關閉腳本面板"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
@@ -801,35 +762,30 @@ msgid "Line and column numbers."
msgstr "行號和列號。"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Method in target node must be specified."
-msgstr "必須指定對目標節點的行為!"
+msgstr "必須指定目標節點的方法。"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid ""
"Target method not found. Specify a valid method or attach a script to the "
"target node."
-msgstr "找不到目標方法!請指定有效方法、或將腳本附加至目標節點上。"
+msgstr "找不到目標方法!請指定一個有效的方法、或將腳本附加至目標節點上。"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect to Node:"
-msgstr "連接到節點:"
+msgstr "連接至節點:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect to Script:"
-msgstr "無法連接到主機:"
+msgstr "連接至腳本:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "From Signal:"
-msgstr "訊號:"
+msgstr "自訊號:"
#: editor/connections_dialog.cpp
msgid "Scene does not contain any script."
-msgstr "場景中沒有任何的腳本。"
+msgstr "場景中無任何的腳本。"
#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
@@ -850,39 +806,36 @@ msgstr "移除"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
-msgstr "新增額外呼叫參數:"
+msgstr "新增額外呼叫引數:"
#: editor/connections_dialog.cpp
msgid "Extra Call Arguments:"
-msgstr "額外呼叫參數:"
+msgstr "額外呼叫引數:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Receiver Method:"
-msgstr "過濾檔案..."
+msgstr "Receiver 方法:"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Advanced"
-msgstr "進階設定"
+msgstr "進階"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Deferred"
msgstr "延遲"
#: editor/connections_dialog.cpp
msgid ""
"Defers the signal, storing it in a queue and only firing it at idle time."
-msgstr "延後送出訊號,將訊號暫存至佇列中,等到閒置時再送出。"
+msgstr "延後送出訊號,將其存放於佇列中並待閒置時再送出。"
#: editor/connections_dialog.cpp
msgid "Oneshot"
-msgstr "一次性"
+msgstr "單次"
#: editor/connections_dialog.cpp
msgid "Disconnects the signal after its first emission."
-msgstr "第一次送出訊號後即中斷連接。"
+msgstr "首次發送訊號後中斷連接。"
#: editor/connections_dialog.cpp
msgid "Cannot connect signal"
@@ -892,7 +845,6 @@ msgstr "無法連接訊號"
#: editor/export_template_manager.cpp editor/groups_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -913,15 +865,15 @@ msgstr "訊號:"
#: editor/connections_dialog.cpp
msgid "Connect '%s' to '%s'"
-msgstr "將 '%s' 連接到 '%s'"
+msgstr "將「%s」連接至「%s」"
#: editor/connections_dialog.cpp
msgid "Disconnect '%s' from '%s'"
-msgstr "將 '%s' 從 '%s' 中斷連接"
+msgstr "將「%s」自「%s」斷開"
#: editor/connections_dialog.cpp
msgid "Disconnect all from signal: '%s'"
-msgstr "中斷所有來自 '%s' 的訊號連接"
+msgstr "中斷所有來自「%s」的訊號"
#: editor/connections_dialog.cpp
msgid "Connect..."
@@ -930,7 +882,7 @@ msgstr "連接..."
#: editor/connections_dialog.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Disconnect"
-msgstr "斷線"
+msgstr "斷開訊號連接"
#: editor/connections_dialog.cpp
msgid "Connect a Signal to a Method"
@@ -942,7 +894,7 @@ msgstr "編輯連接內容:"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
-msgstr "確定要删除所有來自 \"%s\" 的訊號連接嗎?"
+msgstr "確定要删除所有來自訊號「%s」的連接嗎?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
@@ -954,7 +906,7 @@ msgstr "確定要刪除所有來自此訊號的連接嗎?"
#: editor/connections_dialog.cpp
msgid "Disconnect All"
-msgstr "中斷所有連接"
+msgstr "中斷全部"
#: editor/connections_dialog.cpp
msgid "Edit..."
@@ -962,40 +914,40 @@ msgstr "編輯…"
#: editor/connections_dialog.cpp
msgid "Go To Method"
-msgstr "前往方法"
+msgstr "跳至方法"
#: editor/create_dialog.cpp
msgid "Change %s Type"
-msgstr "變更 %s 種類"
+msgstr "更改 %s 型別"
#: editor/create_dialog.cpp editor/project_settings_editor.cpp
msgid "Change"
-msgstr "更換"
+msgstr "更改"
#: editor/create_dialog.cpp
msgid "Create New %s"
-msgstr "新增 %s"
+msgstr "建立新的 %s"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
msgid "Favorites:"
-msgstr "我的最愛:"
+msgstr "我的最愛:"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
msgid "Recent:"
-msgstr "最近存取:"
+msgstr "最近存取:"
#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
#: editor/property_selector.cpp editor/quick_open.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
-msgstr "搜尋:"
+msgstr "搜尋:"
#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
#: editor/property_selector.cpp editor/quick_open.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
-msgstr "符合條件:"
+msgstr "符合條件:"
#: editor/create_dialog.cpp editor/editor_plugin_settings.cpp
#: editor/plugin_config_dialog.cpp
@@ -1003,37 +955,36 @@ msgstr "符合條件:"
#: editor/plugins/visual_shader_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Description:"
-msgstr "描述:"
+msgstr "描述:"
#: editor/dependency_editor.cpp
msgid "Search Replacement For:"
-msgstr "尋找取代目標:"
+msgstr "尋找取代目標:"
#: editor/dependency_editor.cpp
msgid "Dependencies For:"
-msgstr "相依於:"
+msgstr "相依於:"
#: editor/dependency_editor.cpp
msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will only take effect when reloaded."
msgstr ""
-"場景 '%s' 正在編譯中。\n"
-"需重新載入才能使變更生效。"
+"場景「%s」正在編輯中。\n"
+"變更會在重新載入時套用。"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Resource '%s' is in use.\n"
"Changes will only take effect when reloaded."
msgstr ""
-"'%s' 資源正在使用中。\n"
+"資源「%s」正在使用中。\n"
"變更會在重新載入時套用。"
#: editor/dependency_editor.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Dependencies"
-msgstr "相依"
+msgstr "相依性"
#: editor/dependency_editor.cpp
msgid "Resource"
@@ -1046,7 +997,7 @@ msgstr "路徑"
#: editor/dependency_editor.cpp
msgid "Dependencies:"
-msgstr "相依:"
+msgstr "相依於:"
#: editor/dependency_editor.cpp
msgid "Fix Broken"
@@ -1058,7 +1009,7 @@ msgstr "相依性編輯器"
#: editor/dependency_editor.cpp
msgid "Search Replacement Resource:"
-msgstr "搜尋替代資源:"
+msgstr "搜尋並取代資源:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
@@ -1072,12 +1023,11 @@ msgstr "開啟"
#: editor/dependency_editor.cpp
msgid "Owners Of:"
-msgstr "擁有者:"
+msgstr "擁有者:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Remove selected files from the project? (Can't be restored)"
-msgstr "此動作無法復原, 確定要從專案中刪除所選的檔案?"
+msgstr "確定要將所選檔案自專案中移除嗎?(無法復原)"
#: editor/dependency_editor.cpp
msgid ""
@@ -1085,21 +1035,20 @@ msgid ""
"work.\n"
"Remove them anyway? (no undo)"
msgstr ""
-"刪除這些檔案可能造成其他資源無法正常運作\n"
-"此動作無法復原, 確定要刪除嗎?"
+"有其他資源需要正在刪除的檔案以正常運作。\n"
+"依然要移除嗎?(無法復原)"
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
-msgstr "無法移除:"
+msgstr "無法移除:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
-msgstr "載入時發生錯誤:"
+msgstr "載入時發生錯誤:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Load failed due to missing dependencies:"
-msgstr "場景缺少了某些資源以至於無法載入"
+msgstr "由於缺乏下列相依性內容而無法載入:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Open Anyway"
@@ -1107,7 +1056,7 @@ msgstr "強制開啟"
#: editor/dependency_editor.cpp
msgid "Which action should be taken?"
-msgstr "該執行什麼操作呢?"
+msgstr "該執行什麼操作?"
#: editor/dependency_editor.cpp
msgid "Fix Dependencies"
@@ -1115,20 +1064,19 @@ msgstr "修復相依性"
#: editor/dependency_editor.cpp
msgid "Errors loading!"
-msgstr "載入錯誤!"
+msgstr "載入錯誤!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr "確定要永久刪除 %d 個物件 ? (無法復原)"
+msgstr "是否要永久刪除「%d」個項目?(無法復原!)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Show Dependencies"
-msgstr "相依"
+msgstr "顯示相依性"
#: editor/dependency_editor.cpp
msgid "Orphan Resource Explorer"
-msgstr "孤立資料管理器"
+msgstr "孤立資源瀏覽器"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
@@ -1144,21 +1092,19 @@ msgstr "擁有"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
-msgstr "沒有明定擁有者的資源:"
+msgstr "沒有明確從屬關係的資源:"
#: editor/dictionary_property_edit.cpp
-#, fuzzy
msgid "Change Dictionary Key"
-msgstr "改變字典 key"
+msgstr "改變字典鍵"
#: editor/dictionary_property_edit.cpp
-#, fuzzy
msgid "Change Dictionary Value"
-msgstr "改變字典 value"
+msgstr "改變字典值"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
-msgstr "Godot 社群感謝你!"
+msgstr "Godot 社群感謝你!"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
@@ -1170,11 +1116,11 @@ msgstr "專案創始人"
#: editor/editor_about.cpp
msgid "Lead Developer"
-msgstr "主開發者"
+msgstr "主要開發者"
#: editor/editor_about.cpp
msgid "Project Manager "
-msgstr "專案管理人 "
+msgstr "專案管理員 "
#: editor/editor_about.cpp
msgid "Developers"
@@ -1214,23 +1160,21 @@ msgstr "捐贈者"
#: editor/editor_about.cpp
msgid "License"
-msgstr "授權"
+msgstr "授權條款"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Third-party Licenses"
msgstr "第三方授權條款"
#: editor/editor_about.cpp
-#, fuzzy
msgid ""
"Godot Engine relies on a number of third-party free and open source "
"libraries, all compatible with the terms of its MIT license. The following "
"is an exhaustive list of all such third-party components with their "
"respective copyright statements and license terms."
msgstr ""
-"Godot Engine 依賴著許多與 MIT 授權條款相容、自由開源的第三方函式庫。以下是這"
-"些第三方元件的完整列表,附有它們各自的著作權宣示與授權條款。"
+"Godot Engine 依賴數個自由且開放原始碼的第三方函式庫,所有函式庫皆相容於 MIT "
+"授權條款。以下是這些第三方元件的完整列表於其各自之著作權宣告與授權條款。"
#: editor/editor_about.cpp
msgid "All Components"
@@ -1242,17 +1186,15 @@ msgstr "元件"
#: editor/editor_about.cpp
msgid "Licenses"
-msgstr "授權"
+msgstr "授權條款"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file, not in ZIP format."
-msgstr "開啟套件檔案出錯,非 zip 格式。"
+msgstr "無法開啟套件檔案,非 ZIP 格式。"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (Already Exists)"
-msgstr "Autoload「%s」已經存在!"
+msgstr "%s(已經存在)"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -1260,27 +1202,24 @@ msgstr "正在解壓縮素材"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "The following files failed extraction from package:"
-msgstr "提取以下檔案失敗:"
+msgstr "自套件中取得下列檔案失敗:"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "And %s more files."
-msgstr "還有 %d 個檔案"
+msgstr "與其他 %d 個檔案。"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Package installed successfully!"
-msgstr "套件安裝成功!"
+msgstr "套件安裝成功!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr "成功!"
+msgstr "成功!"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Package Contents:"
-msgstr "內容:"
+msgstr "套件內容:"
#: editor/editor_asset_installer.cpp editor/editor_node.cpp
msgid "Install"
@@ -1292,7 +1231,7 @@ msgstr "套件安裝"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
-msgstr "喇叭"
+msgstr "揚聲器"
#: editor/editor_audio_buses.cpp
msgid "Add Effect"
@@ -1300,34 +1239,31 @@ msgstr "新增效果"
#: editor/editor_audio_buses.cpp
msgid "Rename Audio Bus"
-msgstr "重新命名 Audio Bus"
+msgstr "重新命名音訊 Bus"
#: editor/editor_audio_buses.cpp
msgid "Change Audio Bus Volume"
-msgstr "變更 Audio Bus 音量"
+msgstr "更改音訊 Bus 音量"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Solo"
-msgstr "切換 Audio Bus 的 Solo"
+msgstr "切換音訊 Bus 的 Solo"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Mute"
-msgstr "切換 Audio Bus 的 Mute"
+msgstr "靜音/取消靜音音訊 Bus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Bypass Effects"
-msgstr "切換 Audio Bus 忽略效果"
+msgstr "忽略/取消忽略音訊 Bus 效果"
#: editor/editor_audio_buses.cpp
msgid "Select Audio Bus Send"
-msgstr "選擇 Audio Bus 輸出地點"
+msgstr "選擇 Bus 輸出地點"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus Effect"
-msgstr "新增 Audio Bus 效果"
+msgstr "新增音效 Bus 效果"
#: editor/editor_audio_buses.cpp
msgid "Move Bus Effect"
@@ -1338,12 +1274,10 @@ msgid "Delete Bus Effect"
msgstr "刪除 Bus 效果"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Drag & drop to rearrange."
-msgstr "Audio Bus。拖放以重新排列。"
+msgstr "拖放以重新排列。"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Solo"
msgstr "Solo"
@@ -1352,9 +1286,8 @@ msgid "Mute"
msgstr "靜音"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bypass"
-msgstr "忽略效果 (Bypass)"
+msgstr "忽略效果"
#: editor/editor_audio_buses.cpp
msgid "Bus options"
@@ -1363,7 +1296,7 @@ msgstr "Bus 選項"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Duplicate"
-msgstr "製作複本"
+msgstr "重複"
#: editor/editor_audio_buses.cpp
msgid "Reset Volume"
@@ -1375,23 +1308,23 @@ msgstr "刪除效果"
#: editor/editor_audio_buses.cpp
msgid "Audio"
-msgstr "聲音"
+msgstr "音訊"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus"
-msgstr "新增 Audio Bus"
+msgstr "新增音訊 Bus"
#: editor/editor_audio_buses.cpp
msgid "Master bus can't be deleted!"
-msgstr "Master Bus 不能被刪除!"
+msgstr "Master Bus 不可刪除!"
#: editor/editor_audio_buses.cpp
msgid "Delete Audio Bus"
-msgstr "刪除 Audio Bus"
+msgstr "刪除音訊 Bus"
#: editor/editor_audio_buses.cpp
msgid "Duplicate Audio Bus"
-msgstr "製作 Audio Bus 的複本"
+msgstr "重複音訊 Bus"
#: editor/editor_audio_buses.cpp
msgid "Reset Bus Volume"
@@ -1399,46 +1332,43 @@ msgstr "重設 Bus 音量"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
-msgstr "移動 Audio Bus"
+msgstr "移動音訊 Bus"
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As..."
-msgstr "另存 Audio Bus 配置為..."
+msgstr "另存音訊 Bus 配置為..."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Location for New Layout..."
msgstr "新配置的位置..."
#: editor/editor_audio_buses.cpp
msgid "Open Audio Bus Layout"
-msgstr "開啟 Audio Bus 配置"
+msgstr "開啟音訊 Bus 配置"
#: editor/editor_audio_buses.cpp
msgid "There is no '%s' file."
-msgstr "'%s' 這個檔案不存在。"
+msgstr "檔案「%s」不存在。"
#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
msgid "Layout"
-msgstr "佈局"
+msgstr "畫面配置"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
-msgstr "檔案格式不正確,不是 Audio Bus 配置檔。"
+msgstr "無效的檔案,或該檔案不是音訊 Bus 配置檔。"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Error saving file: %s"
-msgstr "儲存資源錯誤!"
+msgstr "無法保存檔案:%s"
#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "新增 Bus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Add a new Audio Bus to this layout."
-msgstr "另存 Audio Bus 配置為..."
+msgstr "新增一個新的音訊 Bus 至該配置。"
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1456,11 +1386,11 @@ msgstr "另存新檔"
#: editor/editor_audio_buses.cpp
msgid "Save this Bus Layout to a file."
-msgstr "儲存目前的 Bus 配置到檔案裡。"
+msgstr "將該 Bus 配置保存至檔案。"
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
msgid "Load Default"
-msgstr "載入預設值"
+msgstr "載入預設"
#: editor/editor_audio_buses.cpp
msgid "Load the default Bus Layout."
@@ -1472,52 +1402,45 @@ msgstr "建立新的 Bus 配置。"
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
-msgstr "不能使用的名稱。"
+msgstr "無效的名稱。"
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
-msgstr "合法字元:"
+msgstr "可使用的字元:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing engine class name."
-msgstr "不正確的名字。名字不能與現有的 engine class 名衝突。"
+msgstr "不可與現存的引擎類別名稱衝突。"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing built-in type name."
-msgstr "無效名稱.不能與現有的內置類型名稱沖突."
+msgstr "不可與內建的列表名稱衝突。"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing global constant name."
-msgstr "無效名稱.不能跟已經存在的全局常量名稱重複."
+msgstr "不可與現存的全域常數名稱衝突。"
#: editor/editor_autoload_settings.cpp
msgid "Keyword cannot be used as an autoload name."
-msgstr "無法使用關鍵字當作自動載入的名稱。"
+msgstr "關鍵字無法作為 Autoload 名稱。"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Autoload '%s' already exists!"
-msgstr "Autoload「%s」已經存在!"
+msgstr "Autoload「%s」已經存在!"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Rename Autoload"
msgstr "重新命名 Autoload"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Toggle AutoLoad Globals"
-msgstr "切換 AutoLoad 的全域變數"
+msgstr "觸發全域 AutoLoad"
#: editor/editor_autoload_settings.cpp
msgid "Move Autoload"
msgstr "移動 Autoload"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Remove Autoload"
msgstr "刪除 Autoload"
@@ -1526,38 +1449,27 @@ msgid "Enable"
msgstr "啟用"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Rearrange Autoloads"
msgstr "重新排列 Autoload"
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-#, fuzzy
-msgid "Invalid path."
-msgstr "無效的路徑."
-
-#: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp
-msgid "File does not exist."
-msgstr "檔案不存在."
-
#: editor/editor_autoload_settings.cpp
-msgid "Not in resource path."
-msgstr "不在資源路徑中。"
+msgid "Can't add autoload:"
+msgstr "無法新增 Autoload:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Add AutoLoad"
-msgstr "新增 AutoLoad"
+msgstr "新增 Autoload"
#: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp
#: editor/editor_plugin_settings.cpp
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp
msgid "Path:"
-msgstr "路徑:"
+msgstr "路徑:"
#: editor/editor_autoload_settings.cpp
msgid "Node Name:"
-msgstr "節點名稱:"
+msgstr "節點名稱:"
#: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp
#: editor/editor_profiler.cpp editor/project_manager.cpp
@@ -1567,7 +1479,7 @@ msgstr "名稱"
#: editor/editor_autoload_settings.cpp
msgid "Singleton"
-msgstr "單例"
+msgstr "單例 (Singleton)"
#: editor/editor_data.cpp editor/inspector_dock.cpp
msgid "Paste Params"
@@ -1583,21 +1495,19 @@ msgstr "正在儲存變更..."
#: editor/editor_data.cpp
msgid "Updating scene..."
-msgstr "場景更新中…"
+msgstr "正在更新場景…"
#: editor/editor_data.cpp editor/editor_properties.cpp
-#, fuzzy
msgid "[empty]"
-msgstr "(空)"
+msgstr "[空]"
#: editor/editor_data.cpp
msgid "[unsaved]"
-msgstr "(未儲存)"
+msgstr "[未保存]"
#: editor/editor_dir_dialog.cpp
-#, fuzzy
msgid "Please select a base directory first."
-msgstr "請先選擇一個基底的資料夾"
+msgstr "請先選擇一個基礎的資料夾。"
#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
@@ -1607,19 +1517,19 @@ msgstr "選擇資料夾"
#: editor/filesystem_dock.cpp editor/project_manager.cpp
#: scene/gui/file_dialog.cpp
msgid "Create Folder"
-msgstr "新增資料夾"
+msgstr "建立資料夾"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp
#: modules/visual_script/visual_script_editor.cpp scene/gui/file_dialog.cpp
msgid "Name:"
-msgstr "名稱:"
+msgstr "名稱:"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp
msgid "Could not create folder."
-msgstr "無法新增資料夾."
+msgstr "無法新增資料夾。"
#: editor/editor_dir_dialog.cpp
msgid "Choose"
@@ -1627,181 +1537,158 @@ msgstr "選擇"
#: editor/editor_export.cpp
msgid "Storing File:"
-msgstr "儲存檔案:"
+msgstr "儲存檔案:"
#: editor/editor_export.cpp
msgid "No export template found at the expected path:"
-msgstr "在預期的路徑中找不到匯入模板:"
+msgstr "在預期的路徑中找不到匯出樣板:"
#: editor/editor_export.cpp
msgid "Packing"
-msgstr "包裝中"
+msgstr "正在打包"
#: editor/editor_export.cpp
msgid ""
"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
"Etc' in Project Settings."
msgstr ""
-"使用 GLES2 時,目標平台要求使用 'ETC' 材質壓縮。請在「專案設定」中開啟「匯入 "
-"Etc」。"
+"目標平台上的 GLES2 必須使用「ETC」紋理壓縮。請在專案設定中啟用「匯入 ETC」。"
#: editor/editor_export.cpp
msgid ""
"Target platform requires 'ETC2' texture compression for GLES3. Enable "
"'Import Etc 2' in Project Settings."
msgstr ""
-"使用 GLES3 時,目標平台要求使用 'ETC2' 材質壓縮。請在「專案設定」中開啟「匯"
-"入 Etc 2」。"
+"目標平台上的 GLES3 必須使用「ETC2」紋理壓縮。請在專案設定中啟用「匯入 "
+"ETC2」。"
#: editor/editor_export.cpp
-#, fuzzy
msgid ""
"Target platform requires 'ETC' texture compression for the driver fallback "
"to GLES2.\n"
"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
"Enabled'."
msgstr ""
-"使用「回退至 GLES2」的驅動器時,目標平台要求使用 'ETC' 貼圖壓縮。\n"
-"請在「專案設定」中開啟「匯入 Etc」,或是關閉「開啟驅動器回退」選項。"
+"目標平台上的 GLES2 回退驅動器功能必須使用「ETC」紋理壓縮。\n"
+"請在專案設定中啟用「匯入 ETC」或是禁用「啟用驅動器回退」。"
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
-msgstr "找不到自定義調試範本。"
+msgstr "找不到自定義偵錯樣板。"
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
-msgstr "找不到自定義發佈範本。"
+msgstr "找不到自定義釋出樣板。"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
-msgstr "找不到範本檔案:"
+msgstr "找不到樣板檔案:"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
-msgstr "匯出為 32 位元執行檔時,內嵌的 PCK 大小不得超過 4 GB。"
+msgstr "匯出 32 位元檔時,內嵌的 PCK 大小不得超過 4 GB。"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "3D Editor"
-msgstr "編輯器"
+msgstr "3D 編輯器"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Script Editor"
-msgstr "開啟腳本編輯器"
+msgstr "腳本編輯器"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Asset Library"
-msgstr "開啟素材倉庫"
+msgstr "素材庫"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
-msgstr "正在編譯場景樹"
+msgstr "正在編輯場景樹"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Import Dock"
-msgstr "導入"
+msgstr "匯入 Dock"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Node Dock"
-msgstr "節點名稱:"
+msgstr "節點 Dock"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "FileSystem and Import Docks"
-msgstr "文件系統"
+msgstr "檔案系統與匯入 Dock"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Erase profile '%s'? (no undo)"
-msgstr "取代全部"
+msgstr "確定要清除 Profile「%s」嗎?(無法復原)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Profile must be a valid filename and must not contain '.'"
-msgstr "Profile 必須為有效的檔名,而且其中不得包含 '.' 字元。"
+msgstr "Profile 必須為一個有效的檔案名稱,並且不包含「.」"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Profile with this name already exists."
-msgstr "具有此名稱的檔或資料夾已存在。"
+msgstr "已有相同名稱的 Profile 存在。"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(Editor Disabled, Properties Disabled)"
-msgstr "(編譯已關閉,屬性已關閉)"
+msgstr "(已禁用編輯器,已禁用屬性)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(Properties Disabled)"
-msgstr "僅屬性"
+msgstr "(已禁用屬性)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(Editor Disabled)"
-msgstr "已停用"
+msgstr "(已禁用編輯器)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Options:"
-msgstr "描述:"
+msgstr "類別選項:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Enable Contextual Editor"
-msgstr "開啟下一個編輯器"
+msgstr "啟用上下文編輯器"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Enabled Properties:"
-msgstr "效能:"
+msgstr "啟用屬性:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Enabled Features:"
-msgstr "功能"
+msgstr "啟用功能:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Enabled Classes:"
-msgstr "搜尋 Class"
+msgstr "啟用類別:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
-msgstr "檔案 '%s' 的內容格式錯誤,中止匯入。"
+msgstr "檔案「%s」的格式無效,已中止匯入。"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid ""
"Profile '%s' already exists. Remove it first before importing, import "
"aborted."
-msgstr "Profile '%s' 已經存在。在匯入的前請先移除。中止匯入。"
+msgstr "Profile「%s」已經存在。匯入前請先將其移除。已中止匯入。"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Error saving profile to path: '%s'."
-msgstr "載入場景時發生錯誤"
+msgstr "保存 Profile 至路徑「%s」時發生錯誤。"
#: editor/editor_feature_profile.cpp
msgid "Unset"
msgstr "未設定"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Current Profile:"
-msgstr "當前版本:"
+msgstr "目前版本:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Make Current"
-msgstr "當前:"
+msgstr "設為目前的"
#: editor/editor_feature_profile.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -1812,51 +1699,43 @@ msgstr "新增"
#: editor/editor_feature_profile.cpp editor/editor_node.cpp
#: editor/project_manager.cpp
msgid "Import"
-msgstr "導入"
+msgstr "匯入"
#: editor/editor_feature_profile.cpp editor/project_export.cpp
msgid "Export"
-msgstr "輸出"
+msgstr "匯出"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Available Profiles:"
-msgstr "效能:"
+msgstr "可用的 Profile:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Options"
-msgstr "描述:"
+msgstr "類別選項"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "New profile name:"
-msgstr "新名稱:"
+msgstr "新增 Profile 名稱:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Erase Profile"
-msgstr "擦除磚塊地圖"
+msgstr "清除 Profile"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Godot Feature Profile"
-msgstr "管理輸出模板"
+msgstr "Godot 功能 Profile"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Import Profile(s)"
-msgstr "已導入的項目"
+msgstr "匯入 Profile"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Export Profile"
-msgstr "輸出專案"
+msgstr "匯出 Profile"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Manage Editor Feature Profiles"
-msgstr "管理輸出模板"
+msgstr "管理編輯器功能 Profile"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select Current Folder"
@@ -1864,10 +1743,9 @@ msgstr "選擇目前的資料夾"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File Exists, Overwrite?"
-msgstr "檔案已經存在, 要覆寫嗎?"
+msgstr "檔案已存在,是否覆蓋?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Select This Folder"
msgstr "選擇此資料夾"
@@ -1876,15 +1754,13 @@ msgid "Copy Path"
msgstr "複製路徑"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open in File Manager"
-msgstr "在檔案管理員內顯示"
+msgstr "在檔案總管中開啟"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Show in File Manager"
-msgstr "在檔案管理員內顯示"
+msgstr "在檔案總管中顯示"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "New Folder..."
@@ -1897,11 +1773,11 @@ msgstr "重新整理"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Recognized"
-msgstr "可認得全部"
+msgstr "支援的類型"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Files (*)"
-msgstr "所有類型檔案"
+msgstr "所有類型的檔案 (*)"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Open a File"
@@ -1924,32 +1800,31 @@ msgstr "開啟檔案或資料夾"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp scene/gui/file_dialog.cpp
msgid "Save"
-msgstr "儲存"
+msgstr "保存"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Save a File"
-msgstr "儲存檔案"
+msgstr "保存檔案"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
-msgstr "往後"
+msgstr "上一頁"
#: editor/editor_file_dialog.cpp
msgid "Go Forward"
-msgstr "往前"
+msgstr "下一頁"
#: editor/editor_file_dialog.cpp
msgid "Go Up"
-msgstr "往上"
+msgstr "上一層"
#: editor/editor_file_dialog.cpp
msgid "Toggle Hidden Files"
-msgstr "切換顯示隱藏檔案"
+msgstr "顯示/隱藏隱藏檔案"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Toggle Favorite"
-msgstr "切換最愛"
+msgstr "新增/取消我的最愛"
#: editor/editor_file_dialog.cpp
msgid "Toggle Mode"
@@ -1961,214 +1836,191 @@ msgstr "聚焦路徑"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Up"
-msgstr "向上移動收藏"
+msgstr "向上移動我的最愛"
#: editor/editor_file_dialog.cpp
msgid "Move Favorite Down"
-msgstr "向下移動收藏"
+msgstr "向下移動我的最愛"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to previous folder."
-msgstr "無法新增資料夾"
+msgstr "前往上一個資料夾。"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to next folder."
-msgstr "無法新增資料夾"
+msgstr "前往下一個資料夾。"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder."
-msgstr "無法新增資料夾"
+msgstr "前往上層資料夾。"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Refresh files."
-msgstr "搜尋 Class"
+msgstr "重新整理檔案。"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "(Un)favorite current folder."
-msgstr "無法新增資料夾"
+msgstr "將目前的資料夾新增或移除我的最愛。"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Toggle the visibility of hidden files."
-msgstr "切換顯示隱藏檔案"
+msgstr "顯示/取消顯示隱藏檔案。"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails."
-msgstr "以縮略圖網格形式查看項目。"
+msgstr "以網格縮圖方式顯示項目。"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a list."
-msgstr "以清單形式查看項目。"
+msgstr "以清單方式顯示項目。"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
-msgstr "資料夾 & 檔案:"
+msgstr "資料夾與檔案:"
#: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp
#: editor/plugins/style_box_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Preview:"
-msgstr "預覽:"
+msgstr "預覽:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File:"
-msgstr "檔案:"
+msgstr "檔案:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Must use a valid extension."
msgstr "必須使用有效的副檔名。"
#: editor/editor_file_system.cpp
msgid "ScanSources"
-msgstr "掃描源"
+msgstr "掃描原始檔"
#: editor/editor_file_system.cpp
msgid ""
"There are multiple importers for different types pointing to file %s, import "
"aborted"
-msgstr "因為有多個不同種類importer指向檔案 %s,導入失敗"
+msgstr "由於多個匯入器以不同的型別指向檔案 %s,已中止匯入"
#: editor/editor_file_system.cpp
msgid "(Re)Importing Assets"
-msgstr "(重新)載入素材"
+msgstr "(重新)匯入素材"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Top"
-msgstr "上面"
+msgstr "上"
#: editor/editor_help.cpp
msgid "Class:"
-msgstr "Class:"
+msgstr "類別:"
#: editor/editor_help.cpp editor/scene_tree_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Inherits:"
-msgstr "繼承:"
+msgstr "繼承:"
#: editor/editor_help.cpp
msgid "Inherited by:"
-msgstr "繼承:"
+msgstr "被繼承:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "描述:"
+msgstr "說明"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Online Tutorials"
-msgstr "線上教學:"
+msgstr "線上教學"
#: editor/editor_help.cpp
msgid "Properties"
-msgstr "性質"
+msgstr "屬性"
#: editor/editor_help.cpp
-#, fuzzy
msgid "override:"
-msgstr "覆蓋"
+msgstr "複寫:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "default:"
-msgstr "預設"
+msgstr "預設:"
#: editor/editor_help.cpp
msgid "Methods"
msgstr "方法"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Theme Properties"
-msgstr "過濾檔案..."
+msgstr "主題屬性"
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr "枚舉"
+msgstr "列舉類型"
#: editor/editor_help.cpp
msgid "Constants"
-msgstr "定數"
+msgstr "常數"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Property Descriptions"
-msgstr "Property 說明:"
+msgstr "屬性說明"
#: editor/editor_help.cpp
-#, fuzzy
msgid "(value)"
-msgstr "數值"
+msgstr "(數值)"
#: editor/editor_help.cpp
msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"目前沒有這個 property 的說明。請幫我們[color=$color][url=$url]貢獻[/url][/"
-"color]一個!"
+"該屬性目前無說明。請幫助我們[color=$color][url=$url]貢獻一個[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Method Descriptions"
-msgstr "Method 說明:"
+msgstr "方法說明"
#: editor/editor_help.cpp
msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"目前沒有這個 method 的說明。請幫我們[color=$color][url=$url]貢獻[/url][/"
-"color]一個!"
+"該方法目前沒有說明。請幫我們[color=$color][url=$url]貢獻一個[/url][/color]!"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
msgid "Search Help"
-msgstr "搜尋幫助"
+msgstr "搜尋說明"
#: editor/editor_help_search.cpp
msgid "Case Sensitive"
msgstr "區分大小寫"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Show Hierarchy"
-msgstr "顯示輔助線"
+msgstr "以樹狀顯示"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Display All"
-msgstr "取代全部"
+msgstr "全部顯示"
#: editor/editor_help_search.cpp
msgid "Classes Only"
-msgstr "僅限類"
+msgstr "僅限類別"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Methods Only"
-msgstr "方法"
+msgstr "僅限方法"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Signals Only"
-msgstr "信號"
+msgstr "僅限信號"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Constants Only"
-msgstr "定數"
+msgstr "僅限常數"
#: editor/editor_help_search.cpp
msgid "Properties Only"
-msgstr "僅屬性"
+msgstr "僅限屬性"
#: editor/editor_help_search.cpp
msgid "Theme Properties Only"
@@ -2176,36 +2028,31 @@ msgstr "僅限主題屬性"
#: editor/editor_help_search.cpp
msgid "Member Type"
-msgstr "成員類型"
+msgstr "成員型別"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Class"
-msgstr "Class:"
+msgstr "類別"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Method"
msgstr "方法"
#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Signal"
-msgstr "信號"
+msgstr "訊號"
#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
-msgstr "固定"
+msgstr "常數"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Property"
-msgstr "屬性:"
+msgstr "屬性"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Theme Property"
-msgstr "過濾檔案..."
+msgstr "主題屬性"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
@@ -2213,21 +2060,19 @@ msgstr "屬性:"
#: editor/editor_inspector.cpp
msgid "Set"
-msgstr "集合"
+msgstr "設定"
#: editor/editor_inspector.cpp
-#, fuzzy
msgid "Set Multiple:"
-msgstr "複數設定:"
+msgstr "設定多個:"
#: editor/editor_log.cpp
msgid "Output:"
-msgstr "輸出:"
+msgstr "輸出:"
#: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Copy Selection"
-msgstr "複製選擇"
+msgstr "複製所選"
#: editor/editor_log.cpp editor/editor_network_profiler.cpp
#: editor/editor_profiler.cpp editor/editor_properties.cpp
@@ -2240,9 +2085,8 @@ msgid "Clear"
msgstr "清除"
#: editor/editor_log.cpp
-#, fuzzy
msgid "Clear Output"
-msgstr "輸出:"
+msgstr "清除輸出"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: editor/editor_profiler.cpp
@@ -2255,39 +2099,36 @@ msgid "Start"
msgstr "開始"
#: editor/editor_network_profiler.cpp
-#, fuzzy
msgid "%s/s"
-msgstr "%s/s"
+msgstr "%s/秒"
#: editor/editor_network_profiler.cpp
-#, fuzzy
msgid "Down"
-msgstr "下載"
+msgstr "下行"
#: editor/editor_network_profiler.cpp
msgid "Up"
-msgstr "上"
+msgstr "上行"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
-#, fuzzy
msgid "Node"
msgstr "節點"
#: editor/editor_network_profiler.cpp
msgid "Incoming RPC"
-msgstr "進來的Rpc"
+msgstr "連入 RPC"
#: editor/editor_network_profiler.cpp
msgid "Incoming RSET"
-msgstr "進來的Rset"
+msgstr "連入 RSET"
#: editor/editor_network_profiler.cpp
msgid "Outgoing RPC"
-msgstr "出去的 RPC"
+msgstr "連出 RPC"
#: editor/editor_network_profiler.cpp
msgid "Outgoing RSET"
-msgstr "出去的 RSET"
+msgstr "連出 RSET"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "New Window"
@@ -2295,96 +2136,92 @@ msgstr "新視窗"
#: editor/editor_node.cpp
msgid "Imported resources can't be saved."
-msgstr "無法保存導入的資源。"
+msgstr "匯入的資源無法保存。"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
msgid "OK"
-msgstr "確定"
+msgstr "好"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Error saving resource!"
-msgstr "儲存資源錯誤!"
+msgstr "保存資源錯誤!"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This resource can't be saved because it does not belong to the edited scene. "
"Make it unique first."
-msgstr "無法儲存此資源,因為它不屬於已編輯的場景。請先讓它成為唯一。"
+msgstr "由於該資源不屬於已編輯的場景,無法保存該資源。請先確保其獨立。"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "另存資源為..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open file for writing:"
-msgstr "無法以寫入模式開啟檔案:"
+msgstr "無法開啟欲寫入的檔案:"
#: editor/editor_node.cpp
msgid "Requested file format unknown:"
-msgstr "要求了不明的檔案格式:"
+msgstr "要求的檔案格式未知:"
#: editor/editor_node.cpp
msgid "Error while saving."
-msgstr "儲存中發生了錯誤。"
+msgstr "保存時發生錯誤。"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr "無法打開“%s”。檔案可能已被移動或删除。"
+msgstr "無法開啟「%s」。該檔案可能已被移動或刪除。"
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
-msgstr "分析 \"%s\" 時發生錯誤。"
+msgstr "無法解析「%s」。"
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr "意料外的檔案結尾 (EOF) '%s'。"
+msgstr "未預期的檔案結尾 (EOF)「%s」。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "缺失 '%s' 或它的依存。"
+msgstr "缺少「%s」或其相依性。"
#: editor/editor_node.cpp
msgid "Error while loading '%s'."
-msgstr "載入 \"%s\" 時發生錯誤。"
+msgstr "載入「%s」時發生錯誤。"
#: editor/editor_node.cpp
msgid "Saving Scene"
-msgstr "正在儲存場景"
+msgstr "正在保存場景"
#: editor/editor_node.cpp
msgid "Analyzing"
-msgstr "分析中"
+msgstr "正在分析"
#: editor/editor_node.cpp
msgid "Creating Thumbnail"
msgstr "正在建立縮圖"
#: editor/editor_node.cpp
-#, fuzzy
msgid "This operation can't be done without a tree root."
-msgstr "此操作無法復原, 確定要還原嗎?"
+msgstr "無樹狀根目錄無法進行此操作。"
#: editor/editor_node.cpp
msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
-"偵測到此場景中有循環實例化引入現象,因此無法儲存。\n"
+"該場景有循環性實體化問題,無法保存。\n"
"請先解決此問題後再試一次。"
#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances or inheritance) couldn't "
"be satisfied."
-msgstr "無法儲存此場景。可能有不完整的依存關係(實例化或是繼承上的)。"
+msgstr "無法保存場景。可能是由於相依性(實體或繼承)無法滿足。"
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "Can't overwrite scene that is still open!"
-msgstr "無法覆寫仍處於開啟狀態的場景!"
+msgstr "無法複寫開啟中的場景!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
@@ -2392,31 +2229,31 @@ msgstr "無法加載要合併的網格庫!"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
-msgstr "保存MeshLibrary時出錯!"
+msgstr "保存網格庫時出錯!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
-msgstr "無法加載Tileset進行合併!"
+msgstr "無法加載要合併的圖塊集!"
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
-msgstr "保存tileset時出錯!"
+msgstr "保存保存圖塊集時發生錯誤!"
#: editor/editor_node.cpp
msgid "Error trying to save layout!"
-msgstr "嘗試保存佈局時出錯!"
+msgstr "嘗試保存配置時出錯!"
#: editor/editor_node.cpp
msgid "Default editor layout overridden."
-msgstr "覆蓋默認編輯器佈局。"
+msgstr "已覆蓋預設的編輯器配置。"
#: editor/editor_node.cpp
msgid "Layout name not found!"
-msgstr "找不到佈局名稱!"
+msgstr "找不到配置名稱!"
#: editor/editor_node.cpp
msgid "Restored default layout to base settings."
-msgstr "已將默認佈局還原為基本設定。"
+msgstr "已將預設配置還原至基本設定。"
#: editor/editor_node.cpp
msgid ""
@@ -2424,24 +2261,22 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
-"此資源屬於匯入的場景,因此不可編輯。\n"
-"請閱讀與匯入場景相關的文件,以便更加瞭解工作流程。"
+"該資源屬於已匯入的場景,因此不可編輯。 \n"
+"請閱讀有關匯入場景的說明文件以更瞭解該流程。"
#: editor/editor_node.cpp
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it won't be kept when saving the current scene."
msgstr ""
-"此資源屬於被實例化或被繼承的場景。\n"
-"儲存場景時,此資源的變更不會被保存。"
+"此資源屬於已被實例化或被繼承的場景。\n"
+"儲存目前場景時,套用的改動將不會被保存。"
#: editor/editor_node.cpp
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
-msgstr ""
-"這個資源是匯入進來的,因此無法編譯。請修改匯入控制面板上的設定,再重新匯入一"
-"次。"
+msgstr "該資源自外部匯入,無法編輯。請在匯入面板中修改設定並重新匯入。"
#: editor/editor_node.cpp
msgid ""
@@ -2450,31 +2285,30 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
-"此場景是匯入進來的,因此變更不會被保存。\n"
-"需經過實例化或是繼承,才能變更其內容。\n"
-"請閱讀與匯入場景相關的文件,以便更加瞭解工作流程。"
+"該場景自外部匯入,因此做出的改動將不會保存。\n"
+"實例化或繼承後將可對其做出修改。\n"
+"請閱讀與匯入相關的說明文件以更加瞭解該工作流程。"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This is a remote object, so changes to it won't be kept.\n"
"Please read the documentation relevant to debugging to better understand "
"this workflow."
msgstr ""
-"此資源屬於已導入的場景, 因此不可編輯。\n"
-"請閱讀與導入場景相關的文檔, 以便更好地瞭解此工作流。"
+"該資源自外部匯入,因此做出的改動將不會保存。\n"
+"請閱讀有關偵錯的說明文件以更瞭解該流程。"
#: editor/editor_node.cpp
msgid "There is no defined scene to run."
-msgstr "沒有已定義的場景可運行。"
+msgstr "沒有已定義的場景可執行。"
#: editor/editor_node.cpp
msgid "Current scene was never saved, please save it prior to running."
-msgstr "目前的場景從未被儲存,在運行場景前請先存檔。"
+msgstr "目前的場景從未被保存,請先保存以執行。"
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
-msgstr "無法啟動子進程!"
+msgstr "無法啟動子處理程序!"
#: editor/editor_node.cpp editor/filesystem_dock.cpp
msgid "Open Scene"
@@ -2485,9 +2319,8 @@ msgid "Open Base Scene"
msgstr "開啟基本場景"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Quick Open..."
-msgstr "快速開啟場景..."
+msgstr "快速開啟..."
#: editor/editor_node.cpp
msgid "Quick Open Scene..."
@@ -2495,24 +2328,23 @@ msgstr "快速開啟場景…"
#: editor/editor_node.cpp
msgid "Quick Open Script..."
-msgstr "快速打開腳本…"
+msgstr "快速開啟腳本…"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save & Close"
-msgstr "另存新檔"
+msgstr "保存並關閉"
#: editor/editor_node.cpp
msgid "Save changes to '%s' before closing?"
-msgstr "關閉前是否保存對“%s”的更改?"
+msgstr "關閉前是否保存對「%s」的更改?"
#: editor/editor_node.cpp
msgid "Saved %s modified resource(s)."
-msgstr "已保存%s個已修改的資源。"
+msgstr "已保存 %s 個已修改的資源。"
#: editor/editor_node.cpp
msgid "A root node is required to save the scene."
-msgstr "儲存場景需要根節點。"
+msgstr "保存場景需要根節點。"
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2520,7 +2352,7 @@ msgstr "另存場景為…"
#: editor/editor_node.cpp
msgid "No"
-msgstr "不是"
+msgstr "否"
#: editor/editor_node.cpp
msgid "Yes"
@@ -2528,44 +2360,47 @@ msgstr "是"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
-msgstr "此場景從未被儲存。執行前先存檔?"
+msgstr "此場景從未被保存。是否要在執行前先保存?"
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "This operation can't be done without a scene."
-msgstr "這項操作必須要有場景存在。"
+msgstr "該操作必須要有場景才可完成。"
#: editor/editor_node.cpp
msgid "Export Mesh Library"
-msgstr "導出網格庫"
+msgstr "匯出網格庫"
#: editor/editor_node.cpp
msgid "This operation can't be done without a root node."
-msgstr "在設置根節點(root node)前,無法完成該指定操作。"
+msgstr "該操作必須要有跟節點才可完成。"
#: editor/editor_node.cpp
msgid "Export Tile Set"
-msgstr "導出磁貼集"
+msgstr "匯出 Tile Set"
#: editor/editor_node.cpp
msgid "This operation can't be done without a selected node."
-msgstr "在設置著節點(selected node)前,無法完成該指定操作。"
+msgstr "該操作必須要有已選擇的節點才可完成。"
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
-msgstr "目前的場景尚未儲存。還是要開啟嗎?"
+msgstr "目前的場景尚未保存。仍然要開啟嗎?"
#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
-msgstr "無法重新載入從未存檔的場景。"
+msgstr "無法重新載入從未保存過的場景。"
#: editor/editor_node.cpp
-msgid "Revert"
-msgstr "還原"
+msgid "Reload Saved Scene"
+msgstr "重新載入已保存的場景"
#: editor/editor_node.cpp
-#, fuzzy
-msgid "This action cannot be undone. Revert anyway?"
-msgstr "此操作無法被, 確定要還原嗎?"
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"目前的場景有未保存的改動。\n"
+"仍然要重新載入場景嗎?這個操作將無法復原。"
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2581,25 +2416,27 @@ msgstr "要結束編輯器嗎?"
#: editor/editor_node.cpp
msgid "Open Project Manager?"
-msgstr "要開啟專案管理嗎?"
+msgstr "要開啟專案管理員嗎?"
#: editor/editor_node.cpp
msgid "Save & Quit"
-msgstr "儲存並離開"
+msgstr "保存並退出"
#: editor/editor_node.cpp
msgid "Save changes to the following scene(s) before quitting?"
-msgstr "退出程式前,要儲存以下修改過的場景嗎?"
+msgstr "退出前要先保存下列場景嗎?"
#: editor/editor_node.cpp
msgid "Save changes the following scene(s) before opening Project Manager?"
-msgstr "開啟專案管理前,要儲存以下修改過的場景嗎?"
+msgstr "開啟專案管理員前要先保存以下場景嗎?"
#: editor/editor_node.cpp
msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
-msgstr "不推薦此選項。被強制重新整理的情形,可能是因程式錯誤導致。請回報。"
+msgstr ""
+"該選項已停止維護。遇到需要強制重新整理的狀況現在已被視為程式錯誤。請回報該問"
+"題。"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
@@ -2610,56 +2447,55 @@ msgid "Close Scene"
msgstr "關閉場景"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reopen Closed Scene"
-msgstr "關閉場景"
+msgstr "重新開啟已關閉的場景"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
-msgstr "無法在: \"%s\" 上啟動擴充功能,設定解析失敗。"
+msgstr "無法在「%s」上啟用擴充功能,解析組態設定失敗。"
#: editor/editor_node.cpp
msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
-msgstr "在插件目錄 'res://addons/%s' 中,找不到腳本。"
+msgstr "無法在擴充功能「res://addons/%s」中無法找到腳本欄位。"
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s'."
-msgstr "無法從 '%s' 中順利讀取腳本。"
+msgstr "無法自路徑「%s」載入擴充腳本。"
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' There seems to be an error in "
"the code, please check the syntax."
-msgstr "無法從 '%s' 中順利讀取腳本。可能出自編碼錯誤,請檢察語法是否正確。"
+msgstr "無法從路徑「%s」載入擴充腳本。看樣子是程式碼中有錯誤,請檢查語法。"
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
-msgstr "無法從 '%s' 中順利讀取腳本。基本類型 的腳本並不屬於 編輯類插件。"
+msgstr "無法自路徑「%s」載入擴充腳本,基礎型別不是 EditorPlugin。"
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
-msgstr "無法從 '%s' 中順利讀取腳本。此腳本並不處於工具模式下。"
+msgstr "無法自路徑載入擴充腳本「%s」,腳本不在工具模式下。"
#: editor/editor_node.cpp
msgid ""
"Scene '%s' was automatically imported, so it can't be modified.\n"
"To make changes to it, a new inherited scene can be created."
msgstr ""
-"場景 '%s' 為自動匯入的,不能被修改。\n"
-"若要進行更改,請建立新的繼承的場景。"
+"「%s」為自動匯入的場景,將無法修改。\n"
+"若要對其進行改動,可建立新繼承場景。"
#: editor/editor_node.cpp
msgid ""
"Error loading scene, it must be inside the project path. Use 'Import' to "
"open the scene, then save it inside the project path."
msgstr ""
-"讀取場景時發生錯誤,場景必須放置於專案資料夾中。請用「導入」開啟該場景後,再"
-"儲存於專案資料夾。"
+"載入場景時發生錯誤,場景必須置於專案路徑內。請使用「匯入」來開啟該場景,並將"
+"其保存於專案路徑內。"
#: editor/editor_node.cpp
msgid "Scene '%s' has broken dependencies:"
-msgstr "場景 '%s' 的依存關係已被破壞:"
+msgstr "場景「%s」的相依性損壞:"
#: editor/editor_node.cpp
msgid "Clear Recent Scenes"
@@ -2672,7 +2508,7 @@ msgid ""
"category."
msgstr ""
"尚未定義主場景。要選擇一個場景嗎?\n"
-"你之後可以在「應用程式」分類中的「專案設定」變更這設定。"
+"稍後可在「應用程式」分類中的「專案設定」修改。"
#: editor/editor_node.cpp
msgid ""
@@ -2680,8 +2516,8 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"選擇場景'%s'不存在,選擇另一個場景?\n"
-"你之後可以在「應用程式」分類中的「專案設定」變更這設定。"
+"所選的場景「%s」不存在,是否要選擇一個有效的場景?\n"
+"稍後可在「應用程式」分類中的「專案設定」中修改。"
#: editor/editor_node.cpp
msgid ""
@@ -2689,16 +2525,16 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"選擇的場景'%s'不是一個場景檔案,要選擇另一個場景嗎?\n"
-"你之後可以在「應用程式」分類中的「專案設定」變更這設定。"
+"所選的場景「%s」不是場景檔案,是否要選擇另一個有效的場景?\n"
+"稍後可在「應用程式」分類中的「專案設定」中修改。"
#: editor/editor_node.cpp
msgid "Save Layout"
-msgstr "儲存佈局"
+msgstr "儲存配置"
#: editor/editor_node.cpp
msgid "Delete Layout"
-msgstr "刪除佈局"
+msgstr "刪除配置"
#: editor/editor_node.cpp editor/import_dock.cpp
#: editor/script_create_dialog.cpp
@@ -2712,29 +2548,27 @@ msgstr "在檔案系統中顯示"
#: editor/editor_node.cpp
msgid "Play This Scene"
-msgstr "運行此場景"
+msgstr "執行此場景"
#: editor/editor_node.cpp
msgid "Close Tab"
msgstr "關閉分頁"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Undo Close Tab"
-msgstr "關閉分頁"
+msgstr "取消關閉分頁"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Close Other Tabs"
-msgstr "關閉其他選項卡"
+msgstr "關閉其他分頁"
#: editor/editor_node.cpp
msgid "Close Tabs to the Right"
-msgstr "關閉右方所有的分頁"
+msgstr "關閉右側分頁"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Close All Tabs"
-msgstr "全部關閉"
+msgstr "全部所有分頁"
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
@@ -2742,12 +2576,11 @@ msgstr "切換場景分頁"
#: editor/editor_node.cpp
msgid "%d more files or folders"
-msgstr "還有 %d 個檔案/資料夾"
+msgstr "還有 %d 個檔案/資料夾"
#: editor/editor_node.cpp
-#, fuzzy
msgid "%d more folders"
-msgstr "還有 %d 個檔案"
+msgstr "還有 %d 個資料夾"
#: editor/editor_node.cpp
msgid "%d more files"
@@ -2755,33 +2588,31 @@ msgstr "還有 %d 個檔案"
#: editor/editor_node.cpp
msgid "Dock Position"
-msgstr "版面位置"
+msgstr "Dock 位置"
#: editor/editor_node.cpp
msgid "Distraction Free Mode"
-msgstr "無干擾模式"
+msgstr "專注模式"
#: editor/editor_node.cpp
msgid "Toggle distraction-free mode."
-msgstr "切換為無干擾模式。"
+msgstr "切換/取消專注模式。"
#: editor/editor_node.cpp
msgid "Add a new scene."
msgstr "新增場景。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Scene"
msgstr "場景"
#: editor/editor_node.cpp
msgid "Go to previously opened scene."
-msgstr "前往上次開啟的場景。"
+msgstr "跳至上一個開啟的場景。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Copy Text"
-msgstr "複製路徑"
+msgstr "複製文字"
#: editor/editor_node.cpp
msgid "Next tab"
@@ -2805,7 +2636,7 @@ msgstr "新場景"
#: editor/editor_node.cpp
msgid "New Inherited Scene..."
-msgstr "從現有場景中建立…"
+msgstr "新增繼承場景…"
#: editor/editor_node.cpp
msgid "Open Scene..."
@@ -2817,12 +2648,11 @@ msgstr "最近開啟的場景"
#: editor/editor_node.cpp
msgid "Save Scene"
-msgstr "儲存場景"
+msgstr "保存場景"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save All Scenes"
-msgstr "儲存全部場景"
+msgstr "保存所有場景"
#: editor/editor_node.cpp
msgid "Convert To..."
@@ -2830,29 +2660,25 @@ msgstr "轉換成…"
#: editor/editor_node.cpp
msgid "MeshLibrary..."
-msgstr "網狀資料庫(MeshLibrary)…"
+msgstr "網格庫…"
#: editor/editor_node.cpp
msgid "TileSet..."
-msgstr "區塊素材…"
+msgstr "圖塊集…"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Undo"
-msgstr "還原"
+msgstr "復原"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Redo"
-msgstr "重作"
-
-#: editor/editor_node.cpp
-msgid "Revert Scene"
-msgstr "恢復場景"
+msgstr "取消復原"
#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
-msgstr "其他專案或全螢幕工具。"
+msgstr "其他專案或全場景共通工具。"
#: editor/editor_node.cpp editor/project_manager.cpp
#: editor/script_create_dialog.cpp
@@ -2860,44 +2686,40 @@ msgid "Project"
msgstr "專案"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project Settings..."
-msgstr "專案設定"
+msgstr "專案設定..."
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Version Control"
-msgstr "版本:"
+msgstr "版本控制"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Set Up Version Control"
-msgstr ""
+msgstr "設定版本控制"
#: editor/editor_node.cpp
msgid "Shut Down Version Control"
-msgstr ""
+msgstr "終止版本控制"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Export..."
-msgstr "輸出"
+msgstr "匯出..."
#: editor/editor_node.cpp
msgid "Install Android Build Template..."
-msgstr ""
+msgstr "安裝 Android 建構樣板..."
#: editor/editor_node.cpp
msgid "Open Project Data Folder"
-msgstr "開啟專案資料夾"
+msgstr "開啟專案資料目錄"
#: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp
msgid "Tools"
msgstr "工具"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Orphan Resource Explorer..."
-msgstr "孤立資料管理器"
+msgstr "孤立資源瀏覽器..."
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -2910,17 +2732,18 @@ msgstr "偵錯"
#: editor/editor_node.cpp
msgid "Deploy with Remote Debug"
-msgstr "使用遠端偵錯"
+msgstr "部署並啟用遠端偵錯"
#: editor/editor_node.cpp
msgid ""
"When exporting or deploying, the resulting executable will attempt to "
"connect to the IP of this computer in order to be debugged."
-msgstr "當輸出或發布專案後,可執行文件(exe)將會嘗試連結本機IP,以進行偵錯。"
+msgstr ""
+"匯出或部署時,輸出的可執行檔將會嘗試連接到這台電腦的 IP 位置以進行除錯。"
#: editor/editor_node.cpp
msgid "Small Deploy with Network FS"
-msgstr "小型部屬 & 網路文件系統(NFS)"
+msgstr "使用網路檔案系統進行小型部署"
#: editor/editor_node.cpp
msgid ""
@@ -2931,34 +2754,34 @@ msgid ""
"On Android, deploy will use the USB cable for faster performance. This "
"option speeds up testing for games with a large footprint."
msgstr ""
-"啟用此選項後,在輸出/發布項目時,執行檔會壓縮至最小。\n"
-"至於文件系統,則以網路與編輯器的連結來供給。\n"
-"在Android平台,透過USB發布能獲得更快的效率。\n"
-"此選項用於加速遊戲(尤其是檔案繁多)的測試。"
+"當該選項啟用後,匯出或部署將會產生最小化的可執行檔。\n"
+"檔案系統將由這個編輯器在網路上提供。\n"
+"Android 平台上,部署需要使用 USB 線以獲得更快速的效能。該選項對於大型遊戲能加"
+"速測試。"
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr "碰撞區域的顯示"
+msgstr "顯示碰撞區域"
#: editor/editor_node.cpp
msgid ""
"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the "
"running game if this option is turned on."
-msgstr "啟用此選項後,碰撞區域/射線節點 將會於遊戲中顯示。"
+msgstr "該選項開啟後,執行遊戲時將可看見碰撞區域與(2D 或 3D 的)射線節點。"
#: editor/editor_node.cpp
msgid "Visible Navigation"
-msgstr "導航的顯示"
+msgstr "顯示導航"
#: editor/editor_node.cpp
msgid ""
"Navigation meshes and polygons will be visible on the running game if this "
"option is turned on."
-msgstr "啟用此選項後,導航所用的網線/多邊形 將會於遊戲中顯示。"
+msgstr "該選項開啟後,執行遊戲時將可看見導航網格 (mesh) 與多邊形。"
#: editor/editor_node.cpp
msgid "Sync Scene Changes"
-msgstr "同步場景的變更"
+msgstr "同步場景改動"
#: editor/editor_node.cpp
msgid ""
@@ -2967,12 +2790,12 @@ msgid ""
"When used remotely on a device, this is more efficient with network "
"filesystem."
msgstr ""
-"啟用此選項後,編輯器中的所有修改,都會立即反映於運行中的遊戲。\n"
-"在遠端裝置測試時,配合網路文件系統(NFS)使用能更提高效率。"
+"開啟該選項後,編輯器中對該場景的所有改動都將被套用至執行中的遊戲。\n"
+"若在遠端裝置上使用,可使用網路檔案系統 NFS 以獲得最佳效能。"
#: editor/editor_node.cpp
msgid "Sync Script Changes"
-msgstr "同步腳本的變更"
+msgstr "同步腳本改動"
#: editor/editor_node.cpp
msgid ""
@@ -2981,66 +2804,60 @@ msgid ""
"When used remotely on a device, this is more efficient with network "
"filesystem."
msgstr ""
-"啟用此選項後,腳本的所有修改,都會立即反映於運行中的遊戲。\n"
-"在遠端裝置測試時,配合網路文件系統(NFS)使用能更提高效率。"
+"當開啟該選項後,保存的腳本都將在執行中的遊戲重新載入。\n"
+"若在遠端裝置上使用,可使用網路檔案系統 NFS 以獲得最佳效能。"
#: editor/editor_node.cpp editor/script_create_dialog.cpp
msgid "Editor"
msgstr "編輯器"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor Settings..."
-msgstr "編輯器設定"
+msgstr "編輯器設定..."
#: editor/editor_node.cpp
msgid "Editor Layout"
-msgstr "編輯器佈局"
+msgstr "編輯器配置"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Take Screenshot"
-msgstr "儲存場景"
+msgstr "螢幕截圖"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Screenshots are stored in the Editor Data/Settings Folder."
-msgstr "開啟 編輯器數據/設定 資料夾"
+msgstr "截圖將被儲存於編輯器資料或編輯器設定資料夾內。"
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr "全螢幕顯示"
+msgstr "開啟/取消全螢幕顯示"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Toggle System Console"
-msgstr "切換模式"
+msgstr "開啟/關閉系統主控台"
#: editor/editor_node.cpp
msgid "Open Editor Data/Settings Folder"
-msgstr "開啟 編輯器數據/設定 資料夾"
+msgstr "開啟「編輯器資料/編輯器設定」資料夾"
#: editor/editor_node.cpp
msgid "Open Editor Data Folder"
-msgstr "開啟 編輯器數據 資料夾"
+msgstr "開啟編輯器資料目錄"
#: editor/editor_node.cpp
msgid "Open Editor Settings Folder"
-msgstr "開啟 編輯器設定 資料夾"
+msgstr "開啟編輯器設定目錄"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Editor Features..."
-msgstr "管理輸出模板"
+msgstr "管理編輯器功能..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Export Templates..."
-msgstr "管理輸出模板"
+msgstr "管理匯出樣板..."
#: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp
msgid "Help"
-msgstr "幫助"
+msgstr "說明"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -3054,24 +2871,23 @@ msgstr "搜尋"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Online Docs"
-msgstr "線上文件"
+msgstr "線上說明文件"
#: editor/editor_node.cpp
msgid "Q&A"
msgstr "Q&A"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Report a Bug"
-msgstr "重新導入"
+msgstr "回報錯誤"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
-msgstr ""
+msgstr "傳送說明文件回饋"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
-msgstr "社區"
+msgstr "社群"
#: editor/editor_node.cpp
msgid "About"
@@ -3079,15 +2895,15 @@ msgstr "關於"
#: editor/editor_node.cpp
msgid "Play the project."
-msgstr "運行此專案。"
+msgstr "執行該專案。"
#: editor/editor_node.cpp
msgid "Play"
-msgstr "運行"
+msgstr "執行"
#: editor/editor_node.cpp
msgid "Pause the scene execution for debugging."
-msgstr ""
+msgstr "暫停該場景以進行除錯。"
#: editor/editor_node.cpp
msgid "Pause Scene"
@@ -3095,56 +2911,52 @@ msgstr "暫停場景"
#: editor/editor_node.cpp
msgid "Stop the scene."
-msgstr "停止此場景."
+msgstr "停止場景。"
#: editor/editor_node.cpp
msgid "Play the edited scene."
-msgstr "運行編輯過的場景。"
+msgstr "執行已編輯的場景。"
#: editor/editor_node.cpp
msgid "Play Scene"
-msgstr "運行場景"
+msgstr "執行場景"
#: editor/editor_node.cpp
msgid "Play custom scene"
-msgstr "運行自定義場景"
+msgstr "執行自定義場景"
#: editor/editor_node.cpp
msgid "Play Custom Scene"
-msgstr "運行自定義場景"
+msgstr "執行自定義場景"
#: editor/editor_node.cpp
msgid "Changing the video driver requires restarting the editor."
-msgstr "在更動顯示驅動後,必須重新開啟編輯器。"
+msgstr "更改視訊驅動程式需要重新啟動編輯器。"
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
msgid "Save & Restart"
-msgstr "儲存並重啟"
+msgstr "保存並重新啟動"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Spins when the editor window redraws."
-msgstr "在重新繪製(repaint)編輯器視窗時,來個旋轉!"
+msgstr "編輯器視窗重新繪製時旋轉。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update Continuously"
-msgstr "連續"
+msgstr "持續更新"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update When Changed"
-msgstr "有更動時自動更新"
+msgstr "更改時更新"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Hide Update Spinner"
-msgstr "禁止自動更新"
+msgstr "隱藏更新旋轉圖"
#: editor/editor_node.cpp
msgid "FileSystem"
-msgstr "文件系統"
+msgstr "檔案系統"
#: editor/editor_node.cpp
msgid "Inspector"
@@ -3156,20 +2968,19 @@ msgstr "展開底部面板"
#: editor/editor_node.cpp
msgid "Output"
-msgstr "輸出(output)"
+msgstr "輸出"
#: editor/editor_node.cpp
msgid "Don't Save"
-msgstr "不要儲存"
+msgstr "不保存"
#: editor/editor_node.cpp
msgid "Android build template is missing, please install relevant templates."
-msgstr ""
+msgstr "缺少 Android 建構樣板,請先安裝對應的樣板。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Manage Templates"
-msgstr "管理輸出模板"
+msgstr "管理樣板"
#: editor/editor_node.cpp
msgid ""
@@ -3181,6 +2992,12 @@ msgid ""
"the \"Use Custom Build\" option should be enabled in the Android export "
"preset."
msgstr ""
+"將通過在「res://android/build」中安裝原始樣板以為該項目設定自定 Android 建構"
+"樣板。\n"
+"輸出時可以套用修改並建構自定 APK(如新增模組、修改 AndroidManifest.xml …"
+"等)。\n"
+"請注意,若要使用自定建構而非使用預先建構好的 APK,請啟用 Android 匯出 Preset "
+"中的「使用自定建構」選項。"
#: editor/editor_node.cpp
msgid ""
@@ -3189,35 +3006,36 @@ msgid ""
"Remove the \"res://android/build\" directory manually before attempting this "
"operation again."
msgstr ""
+"該專案中已安裝 Android 建構樣板,將不會覆蓋。\n"
+"若要再次執行此操作,請先手動移除「res://android/build」目錄。"
#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
-msgstr "導入模板(透過ZIP檔案)"
+msgstr "自 ZIP 檔匯入樣板"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Template Package"
-msgstr "導出範本管理器"
+msgstr "樣板包"
#: editor/editor_node.cpp
msgid "Export Library"
-msgstr "輸出函式庫"
+msgstr "匯出函式庫"
#: editor/editor_node.cpp
msgid "Merge With Existing"
-msgstr "與現有函式庫合併"
+msgstr "與現有的合併"
#: editor/editor_node.cpp
msgid "Open & Run a Script"
-msgstr "開啟並運行腳本"
+msgstr "開啟並執行腳本"
#: editor/editor_node.cpp
msgid "New Inherited"
-msgstr "從現有場景中建立"
+msgstr "新增繼承"
#: editor/editor_node.cpp
msgid "Load Errors"
-msgstr "讀取時出現錯誤"
+msgstr "載入錯誤"
#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Select"
@@ -3225,11 +3043,11 @@ msgstr "選擇"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
-msgstr "開啟2D編輯器"
+msgstr "開啟 2D 編輯器"
#: editor/editor_node.cpp
msgid "Open 3D Editor"
-msgstr "開啟3D編輯器"
+msgstr "開啟 3D 編輯器"
#: editor/editor_node.cpp
msgid "Open Script Editor"
@@ -3237,7 +3055,7 @@ msgstr "開啟腳本編輯器"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
-msgstr "開啟素材倉庫"
+msgstr "開啟素材庫"
#: editor/editor_node.cpp
msgid "Open the next Editor"
@@ -3248,35 +3066,32 @@ msgid "Open the previous Editor"
msgstr "開啟上一個編輯器"
#: editor/editor_node.h
-#, fuzzy
msgid "Warning!"
-msgstr "警告"
+msgstr "警告!"
#: editor/editor_path.cpp
-#, fuzzy
msgid "No sub-resources found."
-msgstr "未指定表面源。"
+msgstr "未找到子資源。"
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
-msgstr "創建網格預覽"
+msgstr "建立網格預覽"
#: editor/editor_plugin.cpp
msgid "Thumbnail..."
msgstr "縮圖…"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Main Script:"
-msgstr "開啟最近存取"
+msgstr "主腳本:"
#: editor/editor_plugin_settings.cpp
msgid "Edit Plugin"
-msgstr "編輯擴充功能"
+msgstr "編輯外掛"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
-msgstr "已安裝的擴充功能:"
+msgstr "已安裝的外掛:"
#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
msgid "Update"
@@ -3301,11 +3116,11 @@ msgstr "編輯:"
#: editor/editor_profiler.cpp
msgid "Measure:"
-msgstr "措施:"
+msgstr "測量:"
#: editor/editor_profiler.cpp
msgid "Frame Time (sec)"
-msgstr "幀時間 (秒)"
+msgstr "影格長度 (秒)"
#: editor/editor_profiler.cpp
msgid "Average Time (sec)"
@@ -3313,19 +3128,19 @@ msgstr "平均時間 (秒)"
#: editor/editor_profiler.cpp
msgid "Frame %"
-msgstr "幀%"
+msgstr "影格 %"
#: editor/editor_profiler.cpp
msgid "Physics Frame %"
-msgstr "物理幀%"
+msgstr "物理影格 %"
#: editor/editor_profiler.cpp
msgid "Inclusive"
-msgstr "包容"
+msgstr "全部"
#: editor/editor_profiler.cpp
msgid "Self"
-msgstr "自身"
+msgstr "僅自己"
#: editor/editor_profiler.cpp
msgid "Frame #:"
@@ -3337,24 +3152,23 @@ msgstr "時間"
#: editor/editor_profiler.cpp
msgid "Calls"
-msgstr "調用"
+msgstr "呼叫"
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Edit Text:"
-msgstr "編輯主題…"
+msgstr "編輯文字:"
#: editor/editor_properties.cpp editor/script_create_dialog.cpp
msgid "On"
-msgstr "啟用"
+msgstr "開啟"
#: editor/editor_properties.cpp
msgid "Layer"
-msgstr "層"
+msgstr "圖層"
#: editor/editor_properties.cpp
msgid "Bit %d, value %d"
-msgstr "位 %d, 值 %d"
+msgstr "位 %d,值 %d"
#: editor/editor_properties.cpp
msgid "[Empty]"
@@ -3365,21 +3179,22 @@ msgid "Assign..."
msgstr "指派..."
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr "無效的路徑"
+msgstr "無效的 RID"
#: editor/editor_properties.cpp
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
-msgstr "所選資源(%s)與此内容(%s)所需的任何類型都不匹配。"
+msgstr "所選的資源(%s)並不符合任該屬性(%s)的任何型別。"
#: editor/editor_properties.cpp
msgid ""
"Can't create a ViewportTexture on resources saved as a file.\n"
"Resource needs to belong to a scene."
msgstr ""
+"無法為要保存為檔案的資源建立檢視區紋理 (ViewportTexture)。\n"
+"資源必須屬於一個場景。"
#: editor/editor_properties.cpp
msgid ""
@@ -3388,27 +3203,28 @@ msgid ""
"Please switch on the 'local to scene' property on it (and all resources "
"containing it up to a node)."
msgstr ""
+"無法為該資源建立檢視區紋理 (ViewportTexture),因其未設定對應的本地場景。\n"
+"請開啟其(與其至節點的所有資源)的「本地化場景」屬性。"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Pick a Viewport"
-msgstr "選擇一個視口"
+msgstr "選擇檢視區"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "New Script"
-msgstr "新建腳本"
+msgstr "新增腳本"
#: editor/editor_properties.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Extend Script"
-msgstr "開啟最近存取"
+msgstr "擴充腳本"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "New %s"
-msgstr "新建 %s"
+msgstr "新增 %s"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Make Unique"
-msgstr "轉換為獨立資源"
+msgstr "獨立化"
#: editor/editor_properties.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3422,24 +3238,23 @@ msgstr "轉換為獨立資源"
#: editor/plugins/tile_map_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Paste"
-msgstr "粘貼"
+msgstr "貼上"
#: editor/editor_properties.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert To %s"
-msgstr "轉換成..."
+msgstr "轉換成 %s"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Selected node is not a Viewport!"
-msgstr "選定的節點不是視口!"
+msgstr "所選節點不是檢視區 (Viewport)!"
#: editor/editor_properties_array_dict.cpp
msgid "Size: "
-msgstr "尺寸: "
+msgstr "大小: "
#: editor/editor_properties_array_dict.cpp
msgid "Page: "
-msgstr "页: "
+msgstr "頁: "
#: editor/editor_properties_array_dict.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -3448,50 +3263,55 @@ msgstr "移除項目"
#: editor/editor_properties_array_dict.cpp
msgid "New Key:"
-msgstr "新建帧:"
+msgstr "新增鍵值:"
#: editor/editor_properties_array_dict.cpp
-#, fuzzy
msgid "New Value:"
-msgstr "數值"
+msgstr "新增數值:"
#: editor/editor_properties_array_dict.cpp
msgid "Add Key/Value Pair"
-msgstr ""
+msgstr "新增鍵/值配對"
#: editor/editor_run_native.cpp
msgid ""
"No runnable export preset found for this platform.\n"
"Please add a runnable preset in the export menu."
msgstr ""
+"該平台沒有可執行的匯出 Preset。\n"
+"請在匯出選單中新增一個可執行的 Preset。"
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
-msgstr "將您的邏輯寫在_run()方法中。"
+msgstr "在 _run() 方法中填寫邏輯。"
#: editor/editor_run_script.cpp
msgid "There is an edited scene already."
-msgstr "已經有一個正在編輯的場景。"
+msgstr "已有一個已編輯的場景。"
#: editor/editor_run_script.cpp
msgid "Couldn't instance script:"
-msgstr "無法實例腳本:"
+msgstr "無法實體化腳本:"
#: editor/editor_run_script.cpp
msgid "Did you forget the 'tool' keyword?"
-msgstr "您是否遺漏了 'tool' 关键字?"
+msgstr "是否遺漏「tool」關鍵字?"
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
-msgstr "無法運行腳本:"
+msgstr "無法執行腳本:"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
-msgstr "您是否遺漏了 '_run' 方法?"
+msgstr "是否遺漏了「_run」方法?"
+
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr "按住 Ctrl 以取整數。按住 Shift 以使用更精確的改動。"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
-msgstr "選擇要導入的節點"
+msgstr "選擇要匯入的節點"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
msgid "Browse"
@@ -3499,24 +3319,23 @@ msgstr "瀏覽"
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
-msgstr "場景路徑:"
+msgstr "場景路徑:"
#: editor/editor_sub_scene.cpp
msgid "Import From Node:"
-msgstr "從節點導入:"
+msgstr "自節點中匯入:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Redownload"
msgstr "重新下載"
#: editor/export_template_manager.cpp
msgid "Uninstall"
-msgstr "卸載"
+msgstr "取消安裝"
#: editor/export_template_manager.cpp
msgid "(Installed)"
-msgstr "(已安裝)"
+msgstr "(已安裝)"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3525,73 +3344,71 @@ msgstr "下載"
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
-msgstr ""
+msgstr "開發建構 (Development Build) 下無法使用官方匯出樣板。"
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr "(缺少)"
+msgstr "(遺失)"
#: editor/export_template_manager.cpp
msgid "(Current)"
-msgstr "(當前)"
+msgstr "(目前)"
#: editor/export_template_manager.cpp
msgid "Retrieving mirrors, please wait..."
-msgstr "正在檢索鏡像,請稍候…"
+msgstr "正在取得鏡像,請稍後..."
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
-msgstr "是否删除版本為“%s”的範本?"
+msgstr "是否刪除樣板版本「%s」?"
#: editor/export_template_manager.cpp
msgid "Can't open export templates zip."
-msgstr "無法打開zip導出範本。"
+msgstr "無法開啟匯出樣板 ZIP 檔。"
#: editor/export_template_manager.cpp
msgid "Invalid version.txt format inside templates: %s."
-msgstr "範本文件: %s 中的 version.txt 無效."
+msgstr "樣板 %s 中的 version.txt 格式無效。"
#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
-msgstr "範本中沒有找到version.txt文件。"
+msgstr "樣板中未找到 version.txt。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for templates:"
-msgstr "載入場景時發生錯誤"
+msgstr "為樣板建立路徑時發生錯誤:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
-msgstr "正在解壓導出範本"
+msgstr "正在解壓縮匯出樣板"
#: editor/export_template_manager.cpp
msgid "Importing:"
-msgstr "導入:"
+msgstr "正在匯入:"
#: editor/export_template_manager.cpp
msgid "Error getting the list of mirrors."
-msgstr ""
+msgstr "取得鏡像列表時發生錯誤。"
#: editor/export_template_manager.cpp
msgid "Error parsing JSON of mirror list. Please report this issue!"
-msgstr ""
+msgstr "解析鏡像列表的 JSON 時發生錯誤。請回報此問題!"
#: editor/export_template_manager.cpp
msgid ""
"No download links found for this version. Direct download is only available "
"for official releases."
-msgstr "沒有找到這個版本的下載鏈接. 直接下載適用于正式版本."
+msgstr "為找到該版本的下載鏈接。直接下載僅適用於正式版本。"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr "無法解析."
+msgstr "無法解析。"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "連接..."
+msgstr "無法連線。"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3600,11 +3417,11 @@ msgstr "沒有回應。"
#: editor/export_template_manager.cpp
msgid "Request Failed."
-msgstr "請求失敗."
+msgstr "請求失敗。"
#: editor/export_template_manager.cpp
msgid "Redirect Loop."
-msgstr "重新定向循環."
+msgstr "重新導向循環。"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3616,35 +3433,32 @@ msgid "Download Complete."
msgstr "下載完成。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cannot remove temporary file:"
-msgstr "無法將主題保存到檔案:"
+msgstr "無法移除臨時檔案:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid ""
"Templates installation failed.\n"
"The problematic templates archives can be found at '%s'."
-msgstr "範本安裝失敗。有問題的範本存檔可以在 \"%s\" 中找到。"
+msgstr ""
+"未找到樣板安裝。\n"
+"有問題的樣板檔案存放於「%s」。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error requesting URL:"
-msgstr "載入場景時發生錯誤"
+msgstr "請求 URL 時發生錯誤:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to Mirror..."
-msgstr "連接..."
+msgstr "正在連線到鏡像..."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Disconnected"
-msgstr "斷線"
+msgstr "已斷開連線"
#: editor/export_template_manager.cpp
msgid "Resolving"
-msgstr "解析中"
+msgstr "正在解析"
#: editor/export_template_manager.cpp
msgid "Can't Resolve"
@@ -3652,19 +3466,16 @@ msgstr "無法解析"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting..."
-msgstr "連接..."
+msgstr "正在連線..."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't Connect"
-msgstr "連接..."
+msgstr "無法連線"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connected"
-msgstr "連接..."
+msgstr "已連線"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3672,242 +3483,217 @@ msgid "Requesting..."
msgstr "正在請求…"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Downloading"
-msgstr "載入時發生錯誤:"
+msgstr "正在下載"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connection Error"
-msgstr "連接..."
+msgstr "連線錯誤"
#: editor/export_template_manager.cpp
msgid "SSL Handshake Error"
-msgstr "SSL握手錯誤"
+msgstr "SSL 交握錯誤"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uncompressing Android Build Sources"
-msgstr "正在解壓縮素材"
+msgstr "正在解壓縮 Android 建構來源"
#: editor/export_template_manager.cpp
msgid "Current Version:"
-msgstr "當前版本:"
+msgstr "目前版本:"
#: editor/export_template_manager.cpp
msgid "Installed Versions:"
-msgstr "已安裝版本:"
+msgstr "已安裝版本:"
#: editor/export_template_manager.cpp
msgid "Install From File"
-msgstr "從檔案中安裝"
+msgstr "自檔案安裝"
#: editor/export_template_manager.cpp
msgid "Remove Template"
-msgstr "移除範本"
+msgstr "移除樣板"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select Template File"
-msgstr "選擇範本檔案"
+msgstr "選擇樣板檔案"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Godot Export Templates"
-msgstr "管理輸出模板"
+msgstr "Godot 匯出樣板"
#: editor/export_template_manager.cpp
msgid "Export Template Manager"
-msgstr "導出範本管理器"
+msgstr "匯出樣板管理員"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download Templates"
-msgstr "載入場景時發生錯誤"
+msgstr "下載樣板"
#: editor/export_template_manager.cpp
msgid "Select mirror from list: (Shift+Click: Open in Browser)"
-msgstr "從清單中選擇鏡像: (Shift + 單擊: 在瀏覽器中打開)"
+msgstr "自列表中選擇鏡像:(Shift+點擊:在瀏覽器中開啟)"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Favorites"
-msgstr "我的最愛:"
+msgstr "我的最愛"
#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
-msgstr ""
+msgstr "狀態:檔案匯入失敗。請修正檔案並手動重新匯入。"
#: editor/filesystem_dock.cpp
msgid "Cannot move/rename resources root."
-msgstr "無法移動/重命名資源根目錄。"
+msgstr "無法移動/重新命名根資源。"
#: editor/filesystem_dock.cpp
msgid "Cannot move a folder into itself."
-msgstr "無法將資料夾移動到其自身。"
+msgstr "無法移動資料夾至該資料夾自己。"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:"
-msgstr "載入時發生錯誤:"
+msgstr "移動時發生錯誤:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error duplicating:"
-msgstr "載入時發生錯誤:"
+msgstr "複製時發生錯誤:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:"
-msgstr "場景缺少了某些資源以至於無法載入"
+msgstr "無法更新相依性:"
#: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp
msgid "No name provided."
msgstr "未提供名稱。"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Provided name contains invalid characters."
-msgstr "提供的名稱包含無效字元"
+msgstr "提供的名稱包含了無效的字元。"
#: editor/filesystem_dock.cpp
msgid "A file or folder with this name already exists."
-msgstr "具有此名稱的檔或資料夾已存在。"
+msgstr "已有相同名稱的檔案或資料夾存在。"
#: editor/filesystem_dock.cpp
msgid "Name contains invalid characters."
-msgstr "名稱包含無效字元。"
+msgstr "名稱包含了無效的字元。"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "載入時發生錯誤:"
+msgstr "重新命名檔案:"
#: editor/filesystem_dock.cpp
msgid "Renaming folder:"
-msgstr "重命名資料夾:"
+msgstr "重新命名資料夾:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicating file:"
-msgstr "載入時發生錯誤:"
+msgstr "複製檔案:"
#: editor/filesystem_dock.cpp
msgid "Duplicating folder:"
-msgstr "複製資料夾:"
+msgstr "複製資料夾:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Inherited Scene"
-msgstr "從現有場景中建立…"
+msgstr "新增繼承場景"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Set As Main Scene"
-msgstr "選取主要場景"
+msgstr "設為主場景"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open Scenes"
msgstr "開啟場景"
#: editor/filesystem_dock.cpp
msgid "Instance"
-msgstr "實例"
+msgstr "實體"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Add to Favorites"
-msgstr "我的最愛:"
+msgstr "新增到我的最愛"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Remove from Favorites"
-msgstr "移除"
+msgstr "自我的最愛中移除"
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies..."
-msgstr "編輯依賴項…"
+msgstr "編輯相依性..."
#: editor/filesystem_dock.cpp
msgid "View Owners..."
-msgstr "查看所有者…"
+msgstr "檢視擁有者..."
#: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Rename..."
-msgstr "重命名…"
+msgstr "重新命名..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Duplicate..."
-msgstr "複製動畫關鍵畫格"
+msgstr "重複..."
#: editor/filesystem_dock.cpp
msgid "Move To..."
-msgstr "移動到..。"
+msgstr "移動至..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Scene..."
-msgstr "新場景"
+msgstr "新增場景..."
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Script..."
-msgstr "新增資料夾..."
+msgstr "新增腳本..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Resource..."
-msgstr "另存資源為..."
+msgstr "新增資源..."
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
msgid "Expand All"
-msgstr "展開所有"
+msgstr "展開全部"
#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Collapse All"
-msgstr "取代全部"
+msgstr "收合全部"
#: editor/filesystem_dock.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/project_manager.cpp editor/rename_dialog.cpp
#: editor/scene_tree_dock.cpp
msgid "Rename"
-msgstr "重命名"
+msgstr "重新命名"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Previous Folder/File"
-msgstr "上個分頁"
+msgstr "上一個資料夾/檔案"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Next Folder/File"
-msgstr "新增資料夾"
+msgstr "下一個資料夾/檔案"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
msgstr "重新掃描檔案系統"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Toggle Split Mode"
-msgstr "切換模式"
+msgstr "開啟/關閉分割模式"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Search files"
-msgstr "搜尋 Class"
+msgstr "搜尋檔案"
#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
-msgstr "正在掃描檔, 請稍候..。"
+msgstr ""
+"正在掃描檔案,\n"
+"請稍後..."
#: editor/filesystem_dock.cpp
msgid "Move"
@@ -3915,290 +3701,270 @@ msgstr "移動"
#: editor/filesystem_dock.cpp
msgid "There is already file or folder with the same name in this location."
-msgstr "此位置已存在同名的檔案或資料夾。"
+msgstr "該位置已有相同名稱的檔案或資料夾。"
#: editor/filesystem_dock.cpp
msgid "Overwrite"
-msgstr "覆蓋"
+msgstr "複寫"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Create Scene"
-msgstr "從場景創建"
+msgstr "建立場景"
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
-msgstr "創建腳本"
+msgstr "建立腳本"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Find in Files"
-msgstr "還有 %d 個檔案"
+msgstr "在檔案中搜尋"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Find:"
-msgstr "尋找"
+msgstr "搜尋:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Folder:"
-msgstr "新增資料夾"
+msgstr "資料夾:"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Filters:"
-msgstr "過濾器:"
+msgstr "篩選:"
#: editor/find_in_files.cpp
msgid ""
"Include the files with the following extensions. Add or remove them in "
"ProjectSettings."
-msgstr ""
+msgstr "包含有下列副檔名的檔案。可在專案設定中新增或移除。"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find..."
-msgstr "尋找..."
+msgstr "搜尋..."
#: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp
msgid "Replace..."
-msgstr "替換…"
+msgstr "取代..."
#: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp
msgid "Cancel"
msgstr "取消"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Find: "
-msgstr "尋找"
+msgstr "搜尋: "
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace: "
-msgstr "取代"
+msgstr "取代: "
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace all (no undo)"
-msgstr "取代全部"
+msgstr "全部取代(無法復原)"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Searching..."
-msgstr "搜尋"
+msgstr "正在搜尋..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Search complete"
-msgstr "搜尋詞彙"
+msgstr "搜尋完成"
#: editor/groups_editor.cpp
msgid "Add to Group"
-msgstr "添加到組"
+msgstr "新增到群組"
#: editor/groups_editor.cpp
msgid "Remove from Group"
-msgstr "從群組移除"
+msgstr "自群組中移除"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group name already exists."
-msgstr "Autoload「%s」已經存在!"
+msgstr "群組名稱已存在。"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Invalid group name."
-msgstr "不能使用的名稱。"
+msgstr "無效的群組名稱。"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Rename Group"
-msgstr "管理組"
+msgstr "重新命名群組"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Delete Group"
-msgstr "刪除佈局"
+msgstr "刪除群組"
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
-msgstr "組"
+msgstr "群組"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Nodes Not in Group"
-msgstr "不在組中的節點"
+msgstr "節點不在群組中"
#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Filter nodes"
-msgstr "過濾檔案..."
+msgstr "篩選節點"
#: editor/groups_editor.cpp
msgid "Nodes in Group"
-msgstr "組中的節點"
+msgstr "群組中的節點"
#: editor/groups_editor.cpp
msgid "Empty groups will be automatically removed."
-msgstr ""
+msgstr "空群組將被自動移除。"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group Editor"
-msgstr "開啟腳本編輯器"
+msgstr "群組編輯器"
#: editor/groups_editor.cpp
msgid "Manage Groups"
-msgstr "管理組"
+msgstr "管理群組"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import as Single Scene"
-msgstr "更新場景"
+msgstr "匯入為單一場景"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Animations"
-msgstr "使用單獨的動畫一同導入"
+msgstr "與動畫分別匯入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
-msgstr "使用單獨的材 一同導入"
+msgstr "與素材分別匯入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects"
-msgstr "使用單獨的物件導入"
+msgstr "與物件單獨匯入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials"
-msgstr "使用單獨的對象+材質導入"
+msgstr "與物件 + 素材分別匯入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Animations"
-msgstr "使用單獨的對象+動畫導入"
+msgstr "與物件 + 動畫分別匯入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials+Animations"
-msgstr "使用單獨的材質+動畫導入"
+msgstr "與素材 + 動畫分別匯入"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials+Animations"
-msgstr "使用單獨的對象+材質+動畫導入"
+msgstr "與物件 + 素材 + 動畫分別匯入"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
-msgstr "作為多個場景導入"
+msgstr "匯入為多個場景"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes+Materials"
-msgstr "導入為多個場景+材質"
+msgstr "匯入為多個場景 + 素材"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Import Scene"
-msgstr "導入場景"
+msgstr "匯入場景"
#: editor/import/resource_importer_scene.cpp
msgid "Importing Scene..."
-msgstr "正在導入場景…"
+msgstr "正在匯入場景..."
#: editor/import/resource_importer_scene.cpp
msgid "Generating Lightmaps"
-msgstr "生成光照圖"
+msgstr "正在產生光照圖"
#: editor/import/resource_importer_scene.cpp
msgid "Generating for Mesh: "
-msgstr "為網格生成: "
+msgstr "正在產生網格: "
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
-msgstr "正在運行自定義腳本…"
+msgstr "正在執行自定腳本..."
#: editor/import/resource_importer_scene.cpp
msgid "Couldn't load post-import script:"
-msgstr "無法加載導入後腳本:"
+msgstr "無法載入匯入後腳本:"
#: editor/import/resource_importer_scene.cpp
msgid "Invalid/broken script for post-import (check console):"
-msgstr "導入後腳本無效/已損壞(檢查控制台):"
+msgstr "匯入後腳本無效或損毀(請檢查主控台):"
#: editor/import/resource_importer_scene.cpp
msgid "Error running post-import script:"
-msgstr "運行導入後腳本時出錯:"
+msgstr "執行匯入後腳本時發生錯誤:"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr "是否有在 `post_import()` 方法內回傳 Node 衍生之物件?"
#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
-msgstr "儲存中……"
+msgstr "正在保存..."
#: editor/import_dock.cpp
-#, fuzzy
msgid "%d Files"
-msgstr " 資料夾"
+msgstr "%d 個檔案"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr "設定為“%s”的預設值"
+msgstr "設為「%s」的預設"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr "清除“%s”的預設值"
+msgstr "清除「%s」的預設"
#: editor/import_dock.cpp
msgid "Import As:"
-msgstr "導入為:"
+msgstr "匯入為:"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Preset"
-msgstr "預設"
+msgstr "Preset"
#: editor/import_dock.cpp
msgid "Reimport"
-msgstr "重新導入"
+msgstr "重新匯入"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Save Scenes, Re-Import, and Restart"
-msgstr "保存場景,重新導入並重新啟動"
+msgstr "保存場景、重新匯入、並重新啟動"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
-msgstr ""
+msgstr "修改匯入檔案的型別需要重新啟動編輯器。"
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
-msgstr ""
+msgstr "警告:有素材使用該資源,將會無法正確加載。"
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
-msgstr "載入資源失敗。"
+msgstr "加載資源失敗。"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Expand All Properties"
msgstr "展開所有屬性"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Collapse All Properties"
-msgstr "展開所有屬性"
+msgstr "收合所有屬性"
#: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
msgid "Save As..."
-msgstr "另存為..。"
+msgstr "另存為..."
#: editor/inspector_dock.cpp
msgid "Copy Params"
msgstr "複製參數"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource Clipboard"
-msgstr "資源路徑"
+msgstr "編輯資源剪貼簿"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
@@ -4206,78 +3972,75 @@ msgstr "複製資源"
#: editor/inspector_dock.cpp
msgid "Make Built-In"
-msgstr "內置"
+msgstr "轉為內建"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
-msgstr "使子資源唯一"
+msgstr "獨立化子資源"
#: editor/inspector_dock.cpp
msgid "Open in Help"
-msgstr "在幫助界面中開啟"
+msgstr "在說明中開啟"
#: editor/inspector_dock.cpp
msgid "Create a new resource in memory and edit it."
-msgstr "在記憶體中創建一個新資源並對其進行編輯。"
+msgstr "在記憶體中建立一個新的資源名編輯。"
#: editor/inspector_dock.cpp
msgid "Load an existing resource from disk and edit it."
-msgstr "從磁片加載現有資源並對其進行編輯。"
+msgstr "從磁碟中載入現有的資源並編輯。"
#: editor/inspector_dock.cpp
msgid "Save the currently edited resource."
-msgstr "保存當前編輯的資源。"
+msgstr "保存目前編輯的資源。"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
-msgstr "轉到歷史記錄中以前編輯的對象。"
+msgstr "在歷史記錄中跳至上一個編輯的物件。"
#: editor/inspector_dock.cpp
msgid "Go to the next edited object in history."
-msgstr "轉到歷史記錄中的下一個編輯對象。"
+msgstr "在歷史記錄中跳至下一個編輯的物件。"
#: editor/inspector_dock.cpp
msgid "History of recently edited objects."
-msgstr "最近編輯對象的歷史記錄。"
+msgstr "最近編輯的物件歷史記錄。"
#: editor/inspector_dock.cpp
msgid "Object properties."
-msgstr "對象内容。"
+msgstr "物件屬性。"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Filter properties"
-msgstr "過濾檔案..."
+msgstr "過濾屬性"
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
-msgstr "更改可能會丟失!"
+msgstr "改動可能會遺失!"
#: editor/multi_node_edit.cpp
msgid "MultiNode Set"
-msgstr "多節點集"
+msgstr "多節點組"
#: editor/node_dock.cpp
-#, fuzzy
msgid "Select a single node to edit its signals and groups."
-msgstr "選擇要編輯訊號和組的節點。"
+msgstr "選擇單一節點以編輯其訊號與群組。"
#: editor/plugin_config_dialog.cpp
msgid "Edit a Plugin"
-msgstr "編輯挿件"
+msgstr "編輯外掛"
#: editor/plugin_config_dialog.cpp
-#, fuzzy
msgid "Create a Plugin"
-msgstr "新增"
+msgstr "建立外掛"
#: editor/plugin_config_dialog.cpp
msgid "Plugin Name:"
-msgstr "挿件名稱:"
+msgstr "外掛名稱:"
#: editor/plugin_config_dialog.cpp
msgid "Subfolder:"
-msgstr "子資料夾:"
+msgstr "子資料夾:"
#: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp
msgid "Language:"
@@ -4293,16 +4056,14 @@ msgstr "現在啟動?"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon"
-msgstr "新增資料夾"
+msgstr "新增多邊形"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Create points."
-msgstr "刪除"
+msgstr "建立頂點。"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid ""
@@ -4310,30 +4071,30 @@ msgid ""
"LMB: Move Point\n"
"RMB: Erase Point"
msgstr ""
+"編輯頂點。\n"
+"左鍵點擊:移動頂點\n"
+"右鍵點擊:刪除頂點"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
-#, fuzzy
msgid "Erase points."
-msgstr "所有的選擇"
+msgstr "移除頂點。"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Edit Polygon"
-msgstr "新增資料夾"
+msgstr "編輯多邊形"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Insert Point"
-msgstr "插入點"
+msgstr "插入頂點"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Edit Polygon (Remove Point)"
-msgstr "編輯多邊形 (刪除點)"
+msgstr "編輯多邊形(移除頂點)"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Remove Polygon And Point"
-msgstr "移除"
+msgstr "移除多邊形與頂點"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4341,56 +4102,51 @@ msgstr "移除"
#: editor/plugins/animation_state_machine_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Animation"
-msgstr "添加動畫"
+msgstr "新增動畫"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Load..."
-msgstr "載入"
+msgstr "載入..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Move Node Point"
-msgstr "移除"
+msgstr "移動節點頂點"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Change BlendSpace1D Limits"
-msgstr "更改 BlendSpace1D 限制"
+msgstr "修改混合空間 1D 限制"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Change BlendSpace1D Labels"
-msgstr "更改Blendspace1d標籤"
+msgstr "修改混合空間 1D 標籤"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
-msgstr "無法使用此類型的節點。只允許根節點。"
+msgstr "無法使用該類型的節點。僅允許根節點。"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Node Point"
-msgstr "移除"
+msgstr "新增節點頂點"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Animation Point"
-msgstr "動畫空間。"
+msgstr "新增動畫頂點"
#: editor/plugins/animation_blend_space_1d_editor.cpp
-#, fuzzy
msgid "Remove BlendSpace1D Point"
-msgstr "移除"
+msgstr "移除混合空間 1D 頂點"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Move BlendSpace1D Node Point"
-msgstr "移動 BlendSpace1D 節點點"
+msgstr "移動混合空間 1D 節點頂點"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4400,23 +4156,23 @@ msgid ""
"AnimationTree is inactive.\n"
"Activate to enable playback, check node warnings if activation fails."
msgstr ""
-"動畫樹處於非活動狀態。\n"
-"激活以啟用播放, 如果啟動失敗, 請檢查節點警告。"
+"動畫樹未啟用。\n"
+"請先啟用以播放,若啟用失敗請檢查節點警告訊息。"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Set the blending position within the space"
-msgstr "設置空間內的混合位置"
+msgstr "在此空間中設定混合位置"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Select and move points, create points with RMB."
-msgstr ""
+msgstr "選擇與移動頂點,使用滑鼠右鍵建立頂點。"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
msgid "Enable snap and show grid."
-msgstr "啟用捕捉並顯示網格。"
+msgstr "啟用吸附並顯示網格。"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4426,69 +4182,63 @@ msgstr "點"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Open Editor"
-msgstr "相依性編輯器"
+msgstr "開啟編輯器"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Open Animation Node"
-msgstr "最佳化動畫"
+msgstr "開啟動畫節點"
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Triangle already exists."
-msgstr "Autoload「%s」已經存在!"
+msgstr "已存在三角形。"
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Add Triangle"
-msgstr "添加動畫軌"
+msgstr "新增三角形"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Change BlendSpace2D Limits"
-msgstr "更改Blendspace2d限制"
+msgstr "修改混合空間 2D 限制"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Change BlendSpace2D Labels"
-msgstr "更改Blendspace2d標籤"
+msgstr "修改混合空間 2D 標籤"
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Remove BlendSpace2D Point"
-msgstr "移除"
+msgstr "移除混合空間 2D 頂點"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Remove BlendSpace2D Triangle"
-msgstr "删除Blendspace2d三角形"
+msgstr "移除混合空間 2D 三角形"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
-msgstr "Blendspace2d不屬於AnimationTree節點。"
+msgstr "混合空間 2D 不屬於任何動畫樹節點。"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "No triangles exist, so no blending can take place."
-msgstr "不存在三角形, 因此不能進行混合。"
+msgstr "無三角形,將不會進行混合。"
#: editor/plugins/animation_blend_space_2d_editor.cpp
-#, fuzzy
msgid "Toggle Auto Triangles"
-msgstr "切換最愛"
+msgstr "開啟/取消自動三角形"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
-msgstr "通過連接點創建三角形。"
+msgstr "通過連接頂點來建立三角形。"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Erase points and triangles."
-msgstr "删除點和三角形。"
+msgstr "刪除頂點與三角形。"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Generate blend triangles automatically (instead of manually)"
-msgstr "自動生成混合三角形 (而不是手動生成)"
+msgstr "自動產生混合三角形(而非手動)"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -4496,131 +4246,116 @@ msgid "Blend:"
msgstr "混合:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed"
-msgstr "正在儲存變更..."
+msgstr "已更改參數"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#, fuzzy
msgid "Edit Filters"
-msgstr "過濾檔案..."
+msgstr "編輯篩選"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Output node can't be added to the blend tree."
-msgstr "無法將輸出節點添加到混合樹中。"
+msgstr "輸出節點無法被新增到混合樹。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Add Node to BlendTree"
-msgstr "將節點添加到BlendTree"
+msgstr "新增節點至混合樹"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Node Moved"
-msgstr "節點名稱:"
+msgstr "已移動節點"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
-msgstr "無法連接,埠可能正在使用,或者連接可能無效。"
+msgstr "無法連線,該連接埠可能已被佔用或連線無效。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Nodes Connected"
-msgstr "連接..."
+msgstr "已連接節點"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Nodes Disconnected"
-msgstr "斷線"
+msgstr "已斷開節點連接"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Set Animation"
-msgstr "動畫最佳化"
+msgstr "設定動畫"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Delete Node"
-msgstr "刪除"
+msgstr "刪除節點"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
-msgstr ""
+msgstr "刪除節點"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Filter On/Off"
-msgstr "切換最愛"
+msgstr "開啟/關閉過濾"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Change Filter"
-msgstr "變更鏡頭尺寸"
+msgstr "更改過濾"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
-msgstr "沒有設定動畫播放機,囙此無法檢索曲目名稱。"
+msgstr "未設定動畫播放器,無法取得軌道名稱。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Player path set is invalid, so unable to retrieve track names."
-msgstr ""
+msgstr "播放器位置無效,無法取得軌道名稱。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/root_motion_editor_plugin.cpp
msgid ""
"Animation player has no valid root node path, so unable to retrieve track "
"names."
-msgstr ""
+msgstr "動畫播放器的根節點位置無效,無法取得軌道名稱。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Anim Clips"
-msgstr "動畫剪輯:"
+msgstr "動畫片段"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Audio Clips"
-msgstr "音訊剪輯:"
+msgstr "音訊片段"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Functions"
-msgstr "函數:"
+msgstr "函式"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Node Renamed"
-msgstr "節點名稱:"
+msgstr "已重新命名節點"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
-msgstr "添加節點..。"
+msgstr "新增節點..."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/root_motion_editor_plugin.cpp
-#, fuzzy
msgid "Edit Filtered Tracks:"
-msgstr "過濾檔案..."
+msgstr "編輯已篩選的軌道:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Enable Filtering"
msgstr "啟用篩選"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Toggle Autoplay"
-msgstr "切換自動播放"
+msgstr "開啟/關閉自動播放"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Animation Name:"
-msgstr "新動畫名稱:"
+msgstr "新增動畫名稱:"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Anim"
@@ -4628,12 +4363,12 @@ msgstr "新增動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Change Animation Name:"
-msgstr "更改動畫名稱:"
+msgstr "更改動畫名稱:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Delete Animation?"
-msgstr "刪除動畫?"
+msgstr "是否刪除動畫?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -4641,27 +4376,25 @@ msgid "Remove Animation"
msgstr "移除動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Invalid animation name!"
-msgstr "不能使用的名稱。"
+msgstr "無效的動畫名稱!"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Animation name already exists!"
-msgstr "Autoload「%s」已經存在!"
+msgstr "動畫名稱已存在!"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Rename Animation"
-msgstr "重命名動畫"
+msgstr "重新命名動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Next Changed"
-msgstr "混合下一個更改"
+msgstr "混合下一個改動"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Change Blend Time"
-msgstr "更改混合時間"
+msgstr "修改混合時間"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Load Animation"
@@ -4669,49 +4402,47 @@ msgstr "載入動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Duplicate Animation"
-msgstr "複製動畫"
+msgstr "重複動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "No animation to copy!"
-msgstr "動畫空間。"
+msgstr "無動畫可複製!"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "No animation resource on clipboard!"
-msgstr "在資源路徑中找不到"
+msgstr "剪貼簿中沒有動畫資源!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pasted Animation"
-msgstr "粘貼的動畫"
+msgstr "已貼上的動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Paste Animation"
-msgstr "粘貼動畫"
+msgstr "貼上動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation to edit!"
-msgstr "沒有要編輯的動畫!"
+msgstr "無動畫可編輯!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from current pos. (A)"
-msgstr "從當前位置向後播放所選動畫。(A)"
+msgstr "自目前位置開始倒放所選的動畫。 (A)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from end. (Shift+A)"
-msgstr "從結尾向後播放選定的動畫。(Shift+a)"
+msgstr "自結尾倒放所選動畫。(Shift+A)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Stop animation playback. (S)"
-msgstr "停止動畫回放。(S)"
+msgstr "停止播放動畫。(S)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation from start. (Shift+D)"
-msgstr "從頭開始播放選取中的動畫。(Shift+D)"
+msgstr "從頭播放所選動畫。(Shift+D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation from current pos. (D)"
-msgstr "從當前位置播放選定的動畫。(D)"
+msgstr "自目前位置開始播放所選動畫。(D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation position (in seconds)."
@@ -4719,7 +4450,7 @@ msgstr "動畫位置(秒)。"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Scale animation playback globally for the node."
-msgstr "在全域範圍內縮放節點的動畫播放。"
+msgstr "為節點全域縮放動畫播放。"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Tools"
@@ -4730,40 +4461,36 @@ msgid "Animation"
msgstr "動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Edit Transitions..."
-msgstr "轉場動畫"
+msgstr "編輯轉場..."
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Open in Inspector"
-msgstr "開啟資料夾"
+msgstr "在屬性面板中開啟"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Display list of animations in player."
-msgstr "在播放機中顯示動畫清單。"
+msgstr "在播放器中顯示動畫列表。"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Autoplay on Load"
-msgstr "載入后自動播放"
+msgstr "載入後自動播放"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Enable Onion Skinning"
-msgstr "啟用洋葱皮"
+msgstr "啟用洋蔥皮化 (Onion Skinning)"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Onion Skinning Options"
-msgstr "洋葱皮"
+msgstr "洋蔥皮化選項"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Directions"
-msgstr "描述:"
+msgstr "方向"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Past"
-msgstr "跳過"
+msgstr "過去"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Future"
@@ -4775,39 +4502,39 @@ msgstr "深度"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "1 step"
-msgstr "1步"
+msgstr "1 步"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "2 steps"
-msgstr "2步"
+msgstr "2 步"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "3 steps"
-msgstr "3步"
+msgstr "3 步"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Differences Only"
-msgstr "僅差異"
+msgstr "僅顯示差異"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Force White Modulate"
-msgstr "強制白色調節"
+msgstr "強制使用白色調整"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Include Gizmos (3D)"
-msgstr "包括3D控制器"
+msgstr "包含 Gizmo (3D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pin AnimationPlayer"
-msgstr ""
+msgstr "固定動畫播放器"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Create New Animation"
-msgstr "創建新動畫"
+msgstr "建立新動畫"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Name:"
-msgstr "動畫名稱:"
+msgstr "動畫名稱:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
@@ -4818,35 +4545,32 @@ msgstr "錯誤!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Times:"
-msgstr "混合時間:"
+msgstr "混合時間:"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Next (Auto Queue):"
-msgstr "下一個(自動隊列):"
+msgstr "下一個(自動佇列):"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Cross-Animation Blend Times"
msgstr "跨動畫混合時間"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Move Node"
msgstr "移動節點"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition exists!"
-msgstr "轉場: "
+msgstr "轉場已存在!"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Add Transition"
-msgstr "添加轉換"
+msgstr "新增轉場"
#: editor/plugins/animation_state_machine_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node"
-msgstr "添加節點"
+msgstr "新增節點"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
@@ -4862,7 +4586,7 @@ msgstr "同步"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "At End"
-msgstr "在末尾"
+msgstr "在結尾"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Travel"
@@ -4870,26 +4594,23 @@ msgstr "行程"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Start and end nodes are needed for a sub-transition."
-msgstr ""
+msgstr "子轉場必須要有開始與結束節點。"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "No playback resource set at path: %s."
-msgstr "在資源路徑中找不到"
+msgstr "路徑 %s 中沒有可播放的資源。"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Node Removed"
msgstr "已刪除節點"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition Removed"
-msgstr "已刪除轉換"
+msgstr "已刪除轉場"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Set Start Node (Autoplay)"
-msgstr ""
+msgstr "設定開始節點(自動播放)"
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -4897,38 +4618,37 @@ msgid ""
"RMB to add new nodes.\n"
"Shift+LMB to create connections."
msgstr ""
+"選擇與移動節點。\n"
+"右鍵點擊以新增節點。\n"
+"Shift+左鍵點擊以建立連接。"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Create new nodes."
-msgstr "新增 %s"
+msgstr "建立新節點。"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Connect nodes."
-msgstr "連接..."
+msgstr "連接節點。"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Remove selected node or transition."
-msgstr "移除選擇的動畫軌。"
+msgstr "移除所選的節點或轉場。"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Toggle autoplay this animation on start, restart or seek to zero."
-msgstr ""
+msgstr "開啟/關閉該動畫在開始、重新啟動或尋覓至 0 時的自動播放。"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Set the end animation. This is useful for sub-transitions."
-msgstr ""
+msgstr "設定結尾動畫。對於子轉場很有用。"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Transition: "
-msgstr "轉場: "
+msgstr "轉場: "
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Play Mode:"
-msgstr "平移模式"
+msgstr "播放模式:"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -4937,16 +4657,16 @@ msgstr "動畫樹"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "New name:"
-msgstr "新名稱:"
+msgstr "新名稱:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
-msgstr "縮放:"
+msgstr "縮放:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Fade In (s):"
-msgstr "淡入(秒):"
+msgstr "淡入(秒):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Fade Out (s):"
@@ -4954,23 +4674,23 @@ msgstr "淡出(秒):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend"
-msgstr "混合"
+msgstr "混合 (Blend)"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Mix"
-msgstr "混合"
+msgstr "混合 (Mix)"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Auto Restart:"
-msgstr "自動重新開始:"
+msgstr "自動重新開始:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Restart (s):"
-msgstr "重新開始(秒):"
+msgstr "重新開始(秒):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Random Restart (s):"
-msgstr "隨機重新開始(秒):"
+msgstr "隨機重新開始(秒):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Start!"
@@ -4983,45 +4703,45 @@ msgstr "數量:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend 0:"
-msgstr "混合 0:"
+msgstr "混合 0:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend 1:"
-msgstr "混合 1:"
+msgstr "混合 1:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "X-Fade Time (s):"
-msgstr ""
+msgstr "交叉淡化 (X-Fade) 時間(秒):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Current:"
-msgstr "當前:"
+msgstr "目前:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Input"
-msgstr "添加輸入"
+msgstr "新增輸入"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Clear Auto-Advance"
-msgstr "清除Auto-Advance"
+msgstr "清除自動 Advance"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Set Auto-Advance"
-msgstr "設定自動前進"
+msgstr "設定自動 Advance"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Delete Input"
-msgstr "刪除輸入事件"
+msgstr "刪除輸入"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Animation tree is valid."
-msgstr "動畫樹有效。"
+msgstr "有效動畫樹。"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Animation tree is invalid."
-msgstr "動畫樹無效。"
+msgstr "無效的動畫樹。"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Animation Node"
@@ -5037,23 +4757,23 @@ msgstr "混合節點"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend2 Node"
-msgstr "混合2 節點"
+msgstr "混合 2 節點"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend3 Node"
-msgstr "混合3 節點"
+msgstr "混合 3 節點"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend4 Node"
-msgstr "混合4 節點"
+msgstr "混合 4 節點"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeScale Node"
-msgstr "時間尺度節點"
+msgstr "時間縮放節點"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeSeek Node"
-msgstr "時間搜索節點"
+msgstr "時間尋覓節點"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Transition Node"
@@ -5061,123 +4781,115 @@ msgstr "轉場節點"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Import Animations..."
-msgstr "導入動畫…"
+msgstr "匯入動畫…"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Node Filters"
-msgstr "編輯節點篩選"
+msgstr "編輯節點過濾"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Filters..."
-msgstr "篩選…"
+msgstr "過濾..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
msgstr "內容:"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "查看檔案"
+msgstr "檢視檔案"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr "連接錯誤, 請重試。"
+msgstr "連線錯誤,請重試。"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect to host:"
-msgstr "無法連接到主機:"
+msgstr "無法連線至主機:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr "主機沒有響應:"
+msgstr "主機沒有回應:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr "無法解析主機名稱:"
+msgstr "無法解析主機名稱:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, return code:"
-msgstr "請求失敗, 返回代碼:"
+msgstr "請求失敗,回傳代碼:"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed."
-msgstr "請求失敗."
+msgstr "請求失敗。"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Cannot save response to:"
-msgstr "無法將主題保存到檔案:"
+msgstr "無法保存回覆至:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Write error."
-msgstr ""
+msgstr "寫入錯誤。"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr "請求失敗, 重定向次數太多"
+msgstr "請求失敗,過多重新導向"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Redirect loop."
-msgstr "重新定向循環."
+msgstr "重新導向循環。"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, timeout"
-msgstr "請求失敗, 返回代碼:"
+msgstr "請求失敗,逾時"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Timeout."
-msgstr "時間"
+msgstr "逾時。"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "下載雜湊錯誤,檔案可能被篡改。"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr "預期:"
+msgstr "預計:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr "獲得:"
+msgstr "獲得:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr "sha256哈希值檢查失敗"
+msgstr "SHA-256 雜湊檢查失敗"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr "資源下載錯誤:"
+msgstr "素材下載錯誤:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading (%s / %s)..."
msgstr "正在下載 (%s / %s)…"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Downloading..."
-msgstr "正在下載……"
+msgstr "正在下載..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Resolving..."
-msgstr "解析中…"
+msgstr "正在解析..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Error making request"
-msgstr "請求時發生錯誤"
+msgstr "建立請求時發生錯誤"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr "空閒"
+msgstr "待命"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Install..."
-msgstr "安裝"
+msgstr "安裝..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Retry"
@@ -5189,46 +4901,43 @@ msgstr "下載錯誤"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr "此資源文檔正在下載中!"
+msgstr "該素材已在下載中!"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Recently Updated"
-msgstr ""
+msgstr "最近更新"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Least Recently Updated"
-msgstr ""
+msgstr "最近更新(倒序)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Name (A-Z)"
-msgstr ""
+msgstr "名稱(A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Name (Z-A)"
-msgstr ""
+msgstr "名稱(Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (A-Z)"
-msgstr "授權"
+msgstr "授權(A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (Z-A)"
-msgstr "授權"
+msgstr "授權(Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "First"
-msgstr "第一項"
+msgstr "首頁"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Previous"
-msgstr "上個分頁"
+msgstr "上一頁"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Next"
-msgstr "下一個"
+msgstr "下一頁"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Last"
@@ -5240,35 +4949,32 @@ msgstr "全部"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No results for \"%s\"."
-msgstr ""
+msgstr "無「%s」相關的結果。"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Import..."
-msgstr "導入"
+msgstr "匯入..."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Plugins..."
-msgstr "挿件"
+msgstr "外掛..."
#: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp
msgid "Sort:"
-msgstr "排序:"
+msgstr "排序:"
#: editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_settings_editor.cpp
msgid "Category:"
-msgstr "類別:"
+msgstr "分類:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Site:"
-msgstr "地址:"
+msgstr "網站:"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Support"
-msgstr "支持…"
+msgstr "支援"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Official"
@@ -5279,13 +4985,12 @@ msgid "Testing"
msgstr "測試"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Loading..."
-msgstr "載入"
+msgstr "正在載入..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr "ZIP資源包"
+msgstr "素材 ZIP 檔"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5293,21 +4998,23 @@ msgid ""
"Save your scene (for images to be saved in the same dir), or pick a save "
"path from the BakedLightmap properties."
msgstr ""
+"無法判斷光照圖的保存路徑。\n"
+"請將場景保存(圖片將保存於相同資料夾),或是在 BackedLightmap 屬性內選擇一個"
+"保存路徑。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
-msgstr "沒有可供渲染的Meshes,請確保Mesh包含UV2通道並且勾選'Bake Light'選項"
+msgstr "沒有可 Bake 的網格。請確保網格包含 UV2 通道並已開啟「Bake 光照」旗標。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
-msgstr "創建光圖圖像失敗, 請確保路徑是可寫的。"
+msgstr "建立光照圖失敗,請確保該路徑可寫入。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
-msgstr "渲染光圖"
+msgstr "Bake 光照圖"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp
@@ -5316,81 +5023,71 @@ msgstr "預覽"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap"
-msgstr "配置吸附"
+msgstr "設定吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Offset:"
-msgstr "網格偏移量:"
+msgstr "網格偏移量:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Step:"
-msgstr "網格大小:"
+msgstr "網格大小:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Primary Line Every:"
-msgstr ""
+msgstr "主要線條間隔:"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "steps"
-msgstr "2步"
+msgstr "步長"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
-msgstr "旋轉偏移量:"
+msgstr "旋轉偏移量:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Step:"
-msgstr "旋轉步驟:"
+msgstr "旋轉步長:"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Scale Step:"
-msgstr "縮放:"
+msgstr "縮放步長:"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move Vertical Guide"
-msgstr "垂直移動尺標"
+msgstr "移動垂直參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Vertical Guide"
-msgstr "創建新的垂直尺標"
+msgstr "建立垂直參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Remove Vertical Guide"
-msgstr "刪除垂直尺標"
+msgstr "移除垂直參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move Horizontal Guide"
-msgstr "移動水平尺標"
+msgstr "移動水平參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Horizontal Guide"
-msgstr "創建新的水平尺標"
+msgstr "建立水平參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Remove Horizontal Guide"
-msgstr "移除水平尺標"
+msgstr "移除水平參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Horizontal and Vertical Guides"
-msgstr "創建新的水平和垂直尺標"
+msgstr "建立水平與垂直參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move pivot"
-msgstr "移動樞軸"
+msgstr "移動軸心"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotate CanvasItem"
-msgstr "旋轉CanvasItem"
+msgstr "旋轉畫布項目"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move anchor"
@@ -5398,112 +5095,99 @@ msgstr "移動錨點"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Resize CanvasItem"
-msgstr "調整CanvasItem的大小"
+msgstr "調整畫布項目大小"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale CanvasItem"
-msgstr "縮放CanvasItem"
+msgstr "縮放畫布項目"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move CanvasItem"
-msgstr "移動CanvasItem"
+msgstr "移動畫布項目"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
-msgstr "容器的子級的錨定值和頁邊距值被其父級覆蓋。"
+msgstr "容器子項目的錨點與外邊距 (margin) 值被其母項目複寫。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Presets for the anchors and margins values of a Control node."
-msgstr ""
+msgstr "控制節點的錨點與外邊距的 Preset。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"When active, moving Control nodes changes their anchors instead of their "
"margins."
-msgstr ""
+msgstr "啟用時,移動控制節點將修改錨點而非外邊距。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Top Left"
-msgstr "左"
+msgstr "左上"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Top Right"
-msgstr "右"
+msgstr "右上"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Bottom Right"
-msgstr "向右旋轉"
+msgstr "右下"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Bottom Left"
-msgstr "底部視圖"
+msgstr "左下"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Left"
-msgstr "向左縮進"
+msgstr "中左"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Top"
-msgstr "居中選擇"
+msgstr "中上"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Right"
-msgstr "向右縮進"
+msgstr "中右"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Bottom"
-msgstr "底部"
+msgstr "中下"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center"
-msgstr ""
+msgstr "中央"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Left Wide"
-msgstr "左視圖"
+msgstr "左延長"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Top Wide"
-msgstr "俯視圖"
+msgstr "上延長"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Right Wide"
-msgstr "右視圖"
+msgstr "右延長"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Bottom Wide"
-msgstr "底部視圖"
+msgstr "下延長"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "VCenter Wide"
-msgstr ""
+msgstr "垂直中央延長"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "HCenter Wide"
-msgstr ""
+msgstr "水平中央延長"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Full Rect"
-msgstr ""
+msgstr "全矩形"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Keep Ratio"
-msgstr "縮放比例:"
+msgstr "保持比例"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
@@ -5511,11 +5195,11 @@ msgstr "僅限錨點"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors and Margins"
-msgstr "改變錨點和邊距"
+msgstr "修改錨點與外邊距"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
-msgstr "改變錨點"
+msgstr "修改錨點"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5523,6 +5207,8 @@ msgid ""
"Game Camera Override\n"
"Overrides game camera with editor viewport camera."
msgstr ""
+"遊戲相機覆蓋\n"
+"以檢視區相機取代遊戲相機。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5530,69 +5216,64 @@ msgid ""
"Game Camera Override\n"
"No game instance running."
msgstr ""
+"遊戲相機覆蓋\n"
+"無正在執行的遊戲實體。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Lock Selected"
-msgstr "工具選擇"
+msgstr "鎖定所選"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Unlock Selected"
-msgstr "工具選擇"
+msgstr "取消鎖定所選"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Group Selected"
-msgstr "複製選擇"
+msgstr "為所選的項目建立群組"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Ungroup Selected"
-msgstr "複製選擇"
+msgstr "移除所選項目的群組"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Paste Pose"
-msgstr "粘貼姿勢"
+msgstr "貼上姿勢"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Guides"
-msgstr "清除姿勢"
+msgstr "清除參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Custom Bone(s) from Node(s)"
-msgstr "從節點製作自定義骨骼"
+msgstr "子節點建立自定骨骼"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Bones"
-msgstr "清除姿勢"
+msgstr "清除骨骼"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Make IK Chain"
-msgstr "製作IK鏈"
+msgstr "建立 IK 鏈"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear IK Chain"
-msgstr "清除IK鏈"
+msgstr "清除 IK 鏈"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Warning: Children of a container get their position and size determined only "
"by their parent."
-msgstr "警告:容器的子級只能由其父級確定其位置和大小。"
+msgstr "警告:容器的子項目的位置與大小有其母項目決定。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Reset"
-msgstr "重置縮放"
+msgstr "重設縮放"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5601,19 +5282,19 @@ msgstr "選擇模式"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
-msgstr "拖動: 旋轉"
+msgstr "拖移:旋轉"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Alt+Drag: Move"
-msgstr "Alt+Drag:移動"
+msgstr "Alt+拖移:移動"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)."
-msgstr "按 \"v\" 更改樞軸, \"Shift + v\" 以拖動樞軸 (移動時)。"
+msgstr "按「v」以修改樞紐,「Shift+v」以移動樞紐(移動時)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Alt+RMB: Depth list selection"
-msgstr "Alt+滑鼠右鍵:顯示鼠標點擊位置下所有的節點清單"
+msgstr "Alt+滑鼠右鍵:展開所選清單"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5627,7 +5308,6 @@ msgstr "旋轉模式"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale Mode"
msgstr "縮放模式"
@@ -5636,129 +5316,112 @@ msgstr "縮放模式"
msgid ""
"Show a list of all objects at the position clicked\n"
"(same as Alt+RMB in select mode)."
-msgstr "在按一下的位置顯示所有物件的清單 (在選擇模式下與 Alt + RMB 相同)。"
+msgstr ""
+"顯示該點擊位置所有物件的列表\n"
+"(同選擇模式中的 Alt+滑鼠右鍵)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Click to change object's rotation pivot."
-msgstr "點擊以更改物件的旋轉樞軸。"
+msgstr "點擊以更改物件的旋轉樞紐。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Pan Mode"
msgstr "平移模式"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Ruler Mode"
-msgstr "縮放模式"
+msgstr "尺規模式"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle smart snapping."
-msgstr "切換吸附。"
+msgstr "開啟/關閉智慧型吸附。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Smart Snap"
-msgstr "使用吸附"
+msgstr "使用智慧型吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle grid snapping."
-msgstr "切換吸附。"
+msgstr "開啟/關閉網格吸附。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Grid Snap"
-msgstr "網格吸附"
+msgstr "使用網格吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snapping Options"
msgstr "吸附選項"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Rotation Snap"
msgstr "使用旋轉吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Scale Snap"
-msgstr "使用吸附"
+msgstr "使用縮放吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap Relative"
msgstr "相對吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Pixel Snap"
msgstr "使用像素吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Smart Snapping"
-msgstr "智慧吸附"
+msgstr "智慧型吸附"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Configure Snap..."
-msgstr "配置吸附…"
+msgstr "設定吸附..."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Parent"
-msgstr "吸附到父級節點"
+msgstr "吸附至母級"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Node Anchor"
-msgstr "吸附到節點的錨點"
+msgstr "吸附至節點錨點"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Node Sides"
-msgstr "捕捉到節點邊"
+msgstr "吸附至節點側邊"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Node Center"
-msgstr "吸附到節點的中心"
+msgstr "吸附至節點中央"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Other Nodes"
-msgstr "吸附到其他的節點"
+msgstr "吸附至其他節點"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Guides"
-msgstr "吸附到尺標"
+msgstr "吸附至參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
-msgstr "將所選物件鎖定到中心 (無法移動)。"
+msgstr "在其位置上鎖定所選物件(無法移動)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Unlock the selected object (can be moved)."
-msgstr "解鎖所選物件 (可以移動)。"
+msgstr "解鎖所選物件(可移動)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Makes sure the object's children are not selectable."
-msgstr "確保對象的子級不可選。"
+msgstr "確保物件的子級項目無法被選擇。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Restores the object's children's ability to be selected."
-msgstr "恢復對象的子級選擇能力。"
+msgstr "恢復讓物件的子級項目可選擇。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Skeleton Options"
msgstr "骨架選項"
@@ -5768,7 +5431,7 @@ msgstr "顯示骨骼"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Make Custom Bone(s) from Node(s)"
-msgstr "從節點製作自定義骨骼"
+msgstr "自節點建立自定骨骼"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear Custom Bones"
@@ -5777,16 +5440,15 @@ msgstr "清除自定義骨骼"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View"
-msgstr "視圖"
+msgstr "檢視"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Always Show Grid"
-msgstr "顯示網格"
+msgstr "永遠顯示網格"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Helpers"
-msgstr "顯示輔助線"
+msgstr "顯示輔助資訊"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Rulers"
@@ -5794,7 +5456,7 @@ msgstr "顯示尺規"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Guides"
-msgstr "顯示引導"
+msgstr "顯示參考線"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Origin"
@@ -5802,40 +5464,39 @@ msgstr "顯示原點"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Viewport"
-msgstr "顯示視口"
+msgstr "顯示檢視區"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Group And Lock Icons"
-msgstr "顯示組和鎖定圖標"
+msgstr "顯示群組與鎖定圖示"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
-msgstr "居中選擇"
+msgstr "置中所選"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Frame Selection"
-msgstr "幀選擇"
+msgstr "完整顯示所選"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
-msgstr ""
+msgstr "預覽畫布比例"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Translation mask for inserting keys."
-msgstr ""
+msgstr "轉換遮罩以插入關鍵影格。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation mask for inserting keys."
-msgstr ""
+msgstr "旋轉遮罩以插入關鍵影格。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale mask for inserting keys."
-msgstr ""
+msgstr "縮放遮罩以插入關鍵影格。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Insert keys (based on mask)."
-msgstr "插入幀 (現有軌道)"
+msgstr "(基於遮罩)插入關鍵影格。"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -5844,20 +5505,21 @@ msgid ""
"Keys are only added to existing tracks, no new tracks will be created.\n"
"Keys must be inserted manually for the first time."
msgstr ""
+"檔物件被轉換、旋轉、或(基於遮罩)縮放時自動插入關鍵影格。\n"
+"關鍵影格只會被新增至現存的軌道,將不會建立新的軌道。\n"
+"第一次必須先手動插入關鍵影格。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Auto Insert Key"
-msgstr "新增關鍵畫格"
+msgstr "自動插入關鍵影格"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Animation Key and Pose Options"
-msgstr "動畫長度(秒)"
+msgstr "動畫關鍵影格與姿勢選項"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key (Existing Tracks)"
-msgstr "插入幀 (現有軌道)"
+msgstr "插入關鍵影格(在現有軌道)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Copy Pose"
@@ -5869,53 +5531,53 @@ msgstr "清除姿勢"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
-msgstr "將網格步數乘以2"
+msgstr "將網格步數乘以 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Divide grid step by 2"
-msgstr "將網格步數除以2"
+msgstr "將網格步數除以 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Pan View"
-msgstr "後視圖"
+msgstr "平移檢視"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
-msgstr "添加 %s"
+msgstr "新增 %"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Adding %s..."
-msgstr "添加 %s…"
+msgstr "正在新增 %s…"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Cannot instantiate multiple nodes without root."
-msgstr "無法具現化沒有根的多個節點。"
+msgstr "沒有根節點無法實體化多個節點。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Create Node"
-msgstr "創建節點"
+msgstr "建立節點"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Error instancing scene from %s"
-msgstr "%s 中的具現化場景出錯"
+msgstr "自 %s 實體化場景時發生錯誤"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Default Type"
-msgstr "更改預設類型"
+msgstr "更改預設型別"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
"Drag & drop + Alt : Change node type"
msgstr ""
+"拖放 + Shift:新增同級節點\n"
+"拖放 + Alt:修改節點型別"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Polygon3D"
-msgstr "創建3D多邊形"
+msgstr "建立多邊形 3D"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Edit Poly"
@@ -5923,29 +5585,28 @@ msgstr "編輯多邊形"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Edit Poly (Remove Point)"
-msgstr "編輯多邊形 (刪除頂點)"
+msgstr "編輯多邊形(移除頂點)"
#: editor/plugins/collision_shape_2d_editor_plugin.cpp
msgid "Set Handle"
-msgstr "設置控制程序"
+msgstr "設定處理程式"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
-msgstr ""
+msgstr "載入發射遮罩"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Restart"
-msgstr "重新開始(秒):"
+msgstr "重新啟動"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Clear Emission Mask"
-msgstr ""
+msgstr "清除發射遮罩"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5956,141 +5617,131 @@ msgstr "粒子"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
-msgstr ""
+msgstr "已產生的頂點數量:"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Mask"
-msgstr ""
+msgstr "發射遮罩"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Solid Pixels"
-msgstr "擴展(像素): "
+msgstr "實體像素"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Border Pixels"
-msgstr ""
+msgstr "邊界像素"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Directed Border Pixels"
-msgstr "資料夾 & 檔案:"
+msgstr "有向邊界像素"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Capture from Pixel"
-msgstr ""
+msgstr "自像素中捕捉"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Colors"
-msgstr ""
+msgstr "發射色彩"
#: editor/plugins/cpu_particles_editor_plugin.cpp
msgid "CPUParticles"
-msgstr "CPU粒子"
+msgstr "CPUParticles"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Mesh"
-msgstr "從網格創建發射點"
+msgstr "自網格建立發射點"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Node"
-msgstr "從節點創建發射點"
+msgstr "自節點建立發射點"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Flat 0"
-msgstr "平面0"
+msgstr "Flat 0"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Flat 1"
-msgstr "平面1"
+msgstr "Flat 1"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
msgid "Ease In"
-msgstr ""
+msgstr "緩入"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
msgid "Ease Out"
-msgstr ""
+msgstr "緩出"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
-msgstr "平滑步長"
+msgstr "平滑插值"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Modify Curve Point"
-msgstr "修改曲線點"
+msgstr "修改曲線控制點"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Modify Curve Tangent"
-msgstr "修改曲線切角"
+msgstr "修改曲線切線"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Load Curve Preset"
-msgstr "加載曲線預設"
+msgstr "加載曲線 Preset"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Add Point"
-msgstr "添加點"
+msgstr "新增控制點"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Point"
-msgstr "刪除點"
+msgstr "移除控制點"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Left Linear"
msgstr "左線性"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Right Linear"
msgstr "右線性"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Load Preset"
-msgstr "載入預設"
+msgstr "載入 Preset"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Curve Point"
-msgstr "刪除曲線點"
+msgstr "移除曲線控制點"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Toggle Curve Linear Tangent"
-msgstr "切換曲線直線切線"
+msgstr "開啟/關閉曲線線性切線"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Hold Shift to edit tangents individually"
-msgstr "按住 Shift 鍵可單獨編輯切線"
+msgstr "按住 Shift 鍵以單獨編輯切線"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Right click to add point"
-msgstr ""
+msgstr "右鍵點擊以新增控制點"
#: editor/plugins/gi_probe_editor_plugin.cpp
msgid "Bake GI Probe"
-msgstr "渲染 GI Probe"
+msgstr "Bake GI 探針"
#: editor/plugins/gradient_editor_plugin.cpp
msgid "Gradient Edited"
-msgstr "漸變編輯"
+msgstr "漸層編輯"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
-msgstr "項目 %d"
+msgstr "第 %d 項"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Items"
@@ -6098,100 +5749,95 @@ msgstr "項目"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item List Editor"
-msgstr "項目清單編輯器"
+msgstr "項目列表編輯器"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
msgid "Create Occluder Polygon"
-msgstr "創建遮光多邊形"
+msgstr "建立遮光多邊形"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh is empty!"
-msgstr "網格是空的!"
+msgstr "空網格!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "無法新增資料夾."
+msgstr "無法建立三角網格碰撞形狀。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
-msgstr ""
+msgstr "建立靜態三角網格形體"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
-msgstr "這對場景根目錄不起作用!"
+msgstr "無法用於場景根節點!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Trimesh Static Shape"
-msgstr "創建凸形靜態體"
+msgstr "建立三角網格靜態形狀"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "無法為該場景根節點建立單一凸碰撞形狀。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "無法建立單一凸碰撞形狀。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "創建凸面形狀"
+msgstr "建立單一凸面形狀"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "無法為場景根節點建立多個凸碰撞形狀。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "無法新增資料夾."
+msgstr "無法建立任何碰撞形狀。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "創建凸面形狀"
+msgstr "建立多個凸面形狀"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
-msgstr "創建導航網格"
+msgstr "建立導航網格"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Contained Mesh is not of type ArrayMesh."
-msgstr "包含的網格不是ArrayMesh類型。"
+msgstr "包含的網格的型別不是陣列網格 (ArrayMesh)。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr ""
+msgstr "UV 展開失敗,該網格可能並非流形?"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "No mesh to debug."
-msgstr "沒有要調試的網格。"
+msgstr "沒有可除錯的網格。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Model has no UV in this layer"
-msgstr ""
+msgstr "模型在該圖層上無 UV"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
-msgstr "網格實例缺少網格!"
+msgstr "網格實體 (MeshInstance) 缺乏網格!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh has not surface to create outlines from!"
-msgstr "網格沒有表面來創建輪廓!"
+msgstr "網格未包含可建立輪廓的表面!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
-msgstr ""
+msgstr "網格的原始類型不是 PRIMITIVE_TRIANGLES!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
-msgstr ""
+msgstr "無法建立輪廓!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline"
-msgstr "創建輪廓"
+msgstr "建立輪廓"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh"
@@ -6199,7 +5845,7 @@ msgstr "網格"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Body"
-msgstr ""
+msgstr "建立三角網格靜態形體"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6207,42 +5853,48 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"建立靜態形體 (StaticBody) 並自動指派一個基於多邊形的碰撞形體。\n"
+"對於碰撞偵測,這是最精確(但最慢)的選項。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
-msgstr ""
+msgstr "建立三角網格碰撞同級"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"建立基於多邊形的碰撞形狀。\n"
+"對於碰撞偵測,這是最精確(但最慢)的選項。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Collision Sibling"
-msgstr "創建碰撞多邊形"
+msgstr "建立單一凸面碰撞同級"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"建立單一凸面碰撞形狀。\n"
+"對於碰撞偵測,這是最快(但最不精確)的選項。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "創建碰撞多邊形"
+msgstr "建立碰撞多邊形同級"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"建立基於多邊形的碰撞區域。\n"
+"這是效能位於上面兩個方法中間的選項。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
-msgstr "創建輪廓網格…"
+msgstr "建立輪廓網格..."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6251,24 +5903,24 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"建立靜態輪廓網格。輪廓網格的法線會自動翻轉。\n"
+"當無法使用 SpatialMetarial 的 Grow 屬性時可以使用這個。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "View UV1"
-msgstr "過濾檔案..."
+msgstr "檢視 UV1"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "View UV2"
-msgstr "過濾檔案..."
+msgstr "檢視 UV2"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Unwrap UV2 for Lightmap/AO"
-msgstr ""
+msgstr "為光照圖/AO 打開 UV2"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh"
-msgstr "創建輪廓網格"
+msgstr "建立輪廓網格"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Outline Size:"
@@ -6276,100 +5928,100 @@ msgstr "輪廓尺寸:"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Channel Debug"
-msgstr ""
+msgstr "UV 通道偵錯"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Remove item %d?"
-msgstr "删除項目%d?"
+msgstr "是否移除項目 %d?"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid ""
"Update from existing scene?:\n"
"%s"
-msgstr "從場景更新"
+msgstr ""
+"自現有場景中更新?\n"
+"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Mesh Library"
-msgstr "網狀資料庫(MeshLibrary)…"
+msgstr "網格庫 (Mesh Library)"
#: editor/plugins/mesh_library_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Item"
-msgstr "添加項目"
+msgstr "新增項目"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Remove Selected Item"
-msgstr "删除所選項"
+msgstr "移除所選項目"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Import from Scene"
-msgstr "從場景導入"
+msgstr "自場景匯入"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Update from Scene"
-msgstr "從場景更新"
+msgstr "自場景更新"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
-msgstr "未指定網格源(節點中沒有多網格集)。"
+msgstr "未指定網格來源(且節點中沒有多網格集 (MultiMesh Set))。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and MultiMesh contains no Mesh)."
-msgstr ""
+msgstr "未指定網格來源(且多網格 (MultiMesh) 未包含網格 (Mesh))。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (invalid path)."
-msgstr "網格源無效(路徑無效)。"
+msgstr "網格來源無效(無效的路徑)。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (not a MeshInstance)."
-msgstr "網格源無效 (不是網格實例)。"
+msgstr "網格來源無效(不是網格實體 (MeshInstance))。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (contains no Mesh resource)."
-msgstr "網格源無效(不包含網格資源)。"
+msgstr "網格來源無效(未包含網格 (Mesh) 資源)。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No surface source specified."
-msgstr "未指定表面源。"
+msgstr "未指定表面來源。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (invalid path)."
-msgstr "表面源無效(路徑無效)。"
+msgstr "表面來源無效(無效的路徑)。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (no geometry)."
-msgstr "表面源無效(沒有幾何圖形)。"
+msgstr "表面來源無效(無幾何)。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (no faces)."
-msgstr "表面源無效(沒有面)。"
+msgstr "表面來源無效(無面)。"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Source Mesh:"
-msgstr "選擇源網格:"
+msgstr "選擇來源網格:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Target Surface:"
-msgstr "選擇目標曲面:"
+msgstr "選擇目標網格:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate Surface"
-msgstr "填充曲面"
+msgstr "填充表面"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate MultiMesh"
-msgstr "填充多網格"
+msgstr "填充多網格 (MultiMesh)"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Target Surface:"
-msgstr "目標表面:"
+msgstr "目標表面:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Source Mesh:"
-msgstr "源網格:"
+msgstr "來源網格:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "X-Axis"
@@ -6385,7 +6037,7 @@ msgstr "Z 軸"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh Up Axis:"
-msgstr ""
+msgstr "網格上軸:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Rotation:"
@@ -6397,7 +6049,7 @@ msgstr "隨機傾斜:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Scale:"
-msgstr "隨機縮放:"
+msgstr "隨機縮放:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate"
@@ -6406,69 +6058,65 @@ msgstr "填充"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Navigation Polygon"
-msgstr "創建導航多邊形"
+msgstr "建立導航多邊形"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles"
-msgstr "轉換成..."
+msgstr "轉換為 CPUParticles"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generating Visibility Rect"
-msgstr "生成可見性矩形"
+msgstr "正在產生矩形可見性"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr "生成可見性矩形"
+msgstr "產生矩形可見性"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
-msgstr ""
+msgstr "僅限指向粒子材料的處理材料 (ParticlesMaterial Process Material)"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generation Time (sec):"
-msgstr "生成時間 (秒):"
+msgstr "產生時間(秒):"
#: editor/plugins/particles_editor_plugin.cpp
msgid "The geometry's faces don't contain any area."
-msgstr ""
+msgstr "幾何體的面未包含任何區域。"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "The geometry doesn't contain any faces."
-msgstr "節點不包含幾何圖形 (面)。"
+msgstr "幾何體未包含任何面。"
#: editor/plugins/particles_editor_plugin.cpp
msgid "\"%s\" doesn't inherit from Spatial."
-msgstr ""
+msgstr "「%s」非自 Spatial 繼承。"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "\"%s\" doesn't contain geometry."
-msgstr "節點不包含幾何圖形。"
+msgstr "「%s」未包含幾何體。"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "\"%s\" doesn't contain face geometry."
-msgstr "節點不包含幾何圖形。"
+msgstr "「%s」未包含面幾何體。"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emitter"
-msgstr "創建發射器"
+msgstr "建立發射器"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Points:"
-msgstr "排放點:"
+msgstr "發射點:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points"
-msgstr "表面點"
+msgstr "表面頂點"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points+Normal (Directed)"
-msgstr "表面點 + 法線 (定向)"
+msgstr "表面點 + 法線(有向)"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Volume"
@@ -6476,330 +6124,320 @@ msgstr "體積"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Source: "
-msgstr "排放源: "
+msgstr "發射源: "
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
-msgstr "需要“顆粒資料”類型的處理器資料。"
+msgstr "需要「粒子材料 (ParticlesMaterial)」型別的處理器材料。"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generating AABB"
-msgstr "生成 AABB"
+msgstr "正在產生 AABB"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
-msgstr "生成可見性AABB"
+msgstr "產生可見性 AABB"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate AABB"
-msgstr "生成 AABB"
+msgstr "產生 AABB"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
-msgstr "從曲線中删除點"
+msgstr "自曲線中刪除控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Out-Control from Curve"
-msgstr ""
+msgstr "自曲線移除外控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove In-Control from Curve"
-msgstr ""
+msgstr "自曲線移除內控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Add Point to Curve"
-msgstr ""
+msgstr "新增控制點至曲線"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Split Curve"
-msgstr "編輯節點曲線"
+msgstr "拆分控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move Point in Curve"
-msgstr ""
+msgstr "移動控制點至曲線"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move In-Control in Curve"
-msgstr ""
+msgstr "移動曲線的內控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move Out-Control in Curve"
-msgstr ""
+msgstr "移動曲線的外控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Select Points"
-msgstr ""
+msgstr "選擇控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Shift+Drag: Select Control Points"
-msgstr ""
+msgstr "Shift+拖移:選擇控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Click: Add Point"
-msgstr ""
+msgstr "點擊:新增控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Left Click: Split Segment (in curve)"
-msgstr ""
+msgstr "左鍵點擊:(在曲線內)拆分線段"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Right Click: Delete Point"
-msgstr ""
+msgstr "右鍵點擊:刪除控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Select Control Points (Shift+Drag)"
-msgstr ""
+msgstr "選擇控制點(Shift+拖移)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Add Point (in empty space)"
-msgstr ""
+msgstr "新增控制點(在空白處)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Delete Point"
-msgstr ""
+msgstr "刪除控制點"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Close Curve"
-msgstr ""
+msgstr "關閉曲線"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp editor/plugins/theme_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_export.cpp
msgid "Options"
-msgstr ""
+msgstr "選項"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Mirror Handle Angles"
-msgstr ""
+msgstr "鏡像手柄角度"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Mirror Handle Lengths"
-msgstr ""
+msgstr "鏡像手柄長度"
#: editor/plugins/path_editor_plugin.cpp
msgid "Curve Point #"
-msgstr ""
+msgstr "曲線控制點 #"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Point Position"
-msgstr "移除"
+msgstr "設定曲線控制點的位置"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve In Position"
-msgstr "移除"
+msgstr "設定曲線的內控制點位置"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Out Position"
-msgstr "移除"
+msgstr "設定曲線的外控制點位置"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Path"
-msgstr ""
+msgstr "拆分路徑"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove Path Point"
-msgstr ""
+msgstr "移除路徑控制點"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove Out-Control Point"
-msgstr ""
+msgstr "移除外控制點"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove In-Control Point"
-msgstr ""
+msgstr "移除內控制點"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Segment (in curve)"
-msgstr ""
+msgstr "拆分線段(在曲線中)"
#: editor/plugins/physical_bone_plugin.cpp
-#, fuzzy
msgid "Move Joint"
-msgstr "移除"
+msgstr "移動關節"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
"The skeleton property of the Polygon2D does not point to a Skeleton2D node"
-msgstr ""
+msgstr "多邊形 2D (Polygon2D) 的骨架屬性未指向骨架 2D (Skeleton2D) 節點"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Sync Bones"
-msgstr ""
+msgstr "同步骨骼"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
"No texture in this polygon.\n"
"Set a texture to be able to edit UV."
msgstr ""
+"該多邊形沒有紋理貼圖。\n"
+"請先設定紋理以編輯 UV。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
-msgstr ""
+msgstr "建立 UV Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
"Polygon 2D has internal vertices, so it can no longer be edited in the "
"viewport."
-msgstr ""
+msgstr "多邊形 2D 有內部頂點,將無法在檢視區編輯。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
-msgstr ""
+msgstr "建立多邊形與 UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Internal Vertex"
-msgstr ""
+msgstr "建立內部頂點"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Remove Internal Vertex"
-msgstr ""
+msgstr "移除內部頂點"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Invalid Polygon (need 3 different vertices)"
-msgstr ""
+msgstr "無效的多邊形(需要三個不同的頂點)"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Add Custom Polygon"
-msgstr "新增資料夾"
+msgstr "新增自定多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Polygon"
-msgstr "移除"
+msgstr "移除自定多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
-msgstr ""
+msgstr "轉換 UV Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Transform Polygon"
-msgstr "新增資料夾"
+msgstr "轉換多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Paint Bone Weights"
-msgstr ""
+msgstr "描繪骨骼權重"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Open Polygon 2D UV editor."
-msgstr ""
+msgstr "開啟多邊形 2D UV 編輯器。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon 2D UV Editor"
-msgstr ""
+msgstr "多邊形 2D UV 編輯器"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "UV"
-msgstr ""
+msgstr "UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Points"
-msgstr "移除"
+msgstr "點"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Polygons"
-msgstr "新增資料夾"
+msgstr "多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Bones"
-msgstr ""
+msgstr "骨骼"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Move Points"
-msgstr "移除"
+msgstr "移動點"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Ctrl: Rotate"
-msgstr ""
+msgstr "Ctrl:旋轉"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Shift: Move All"
-msgstr ""
+msgstr "Shift:移動全部"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Shift+Ctrl: Scale"
-msgstr ""
+msgstr "Shift+Ctrl:縮放"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Move Polygon"
-msgstr ""
+msgstr "移動多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Rotate Polygon"
-msgstr ""
+msgstr "旋轉多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Scale Polygon"
-msgstr ""
+msgstr "縮放多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create a custom polygon. Enables custom polygon rendering."
-msgstr ""
+msgstr "建立自定多邊形。啟用自定多邊形算圖。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
"Remove a custom polygon. If none remain, custom polygon rendering is "
"disabled."
-msgstr ""
+msgstr "移除自定多邊形。若無剩餘多邊形,將禁用自定多邊形算圖。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Paint weights with specified intensity."
-msgstr ""
+msgstr "以指定的強度來繪製權重。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Unpaint weights with specified intensity."
-msgstr ""
+msgstr "以指定的強度來取消繪製權重。"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Radius:"
-msgstr ""
+msgstr "半徑:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon->UV"
-msgstr ""
+msgstr "多邊形 -> UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "UV->Polygon"
-msgstr ""
+msgstr "UV -> 多邊形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Clear UV"
-msgstr ""
+msgstr "清除 UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Grid Settings"
-msgstr "專案設定"
+msgstr "網格設定"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Snap"
-msgstr ""
+msgstr "吸附"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Enable Snap"
-msgstr ""
+msgstr "啟用吸附"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid"
-msgstr ""
+msgstr "網格"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Show Grid"
@@ -6807,48 +6445,48 @@ msgstr "顯示網格"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Configure Grid:"
-msgstr ""
+msgstr "設定網格:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Offset X:"
-msgstr ""
+msgstr "網格 X 偏移:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Offset Y:"
-msgstr ""
+msgstr "網格 Y 偏移:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Step X:"
-msgstr ""
+msgstr "網格 X 步進值:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Step Y:"
-msgstr ""
+msgstr "網格 Y 步進值:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Sync Bones to Polygon"
-msgstr ""
+msgstr "同步骨骼到多邊形"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
-msgstr ""
+msgstr "錯誤:無法載入資源!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Add Resource"
-msgstr ""
+msgstr "新增資源"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Rename Resource"
-msgstr ""
+msgstr "重新命名資源"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Delete Resource"
-msgstr ""
+msgstr "刪除資源"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Resource clipboard is empty!"
-msgstr ""
+msgstr "資源剪貼板為空!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Paste Resource"
@@ -6857,119 +6495,108 @@ msgstr "貼上資源"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_editor.cpp
msgid "Instance:"
-msgstr ""
+msgstr "實體:"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Type:"
-msgstr ""
+msgstr "型別:"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
msgid "Open in Editor"
-msgstr ""
+msgstr "在編輯器中開啟"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Load Resource"
-msgstr ""
+msgstr "載入資源"
#: editor/plugins/resource_preloader_editor_plugin.cpp
-#, fuzzy
msgid "ResourcePreloader"
-msgstr "資源路徑"
+msgstr "資源預加載 (ResourcePreloader)"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
-msgstr ""
+msgstr "動畫樹 (AnimationTree) 未設定至動畫播放器 (AnimationPlayer) 的路徑"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "Path to AnimationPlayer is invalid"
-msgstr ""
+msgstr "至 AnimationPlayer 的路徑無效"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Files"
-msgstr ""
+msgstr "清除最近的檔案"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Close and save changes?"
-msgstr "沒有儲存的變更都會遺失, 確定要關閉?"
+msgstr "關閉並保存修改嗎?"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error writing TextFile:"
-msgstr "載入場景時發生錯誤"
+msgstr "寫入文字檔案 (TextFile) 時發生錯誤:"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Could not load file at:"
-msgstr "無法新增資料夾"
+msgstr "無法載入檔案於:"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error saving file!"
-msgstr "儲存資源錯誤!"
+msgstr "保存檔案時發生錯誤!"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error while saving theme."
-msgstr "儲存中發生了錯誤。"
+msgstr "保存主題時發生錯誤。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error Saving"
-msgstr "保存錯誤"
+msgstr "保存時發生錯誤"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error importing theme."
-msgstr "導入主題時出錯。"
+msgstr "保存匯入的主題時發生錯誤。"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Importing"
-msgstr "載入時發生錯誤:"
+msgstr "匯入時發生錯誤"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Text File..."
-msgstr "新增資料夾..."
+msgstr "新增文字檔案..."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open File"
msgstr "開啟檔案"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Save File As..."
-msgstr "另存場景為..."
+msgstr "另存檔案為..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Can't obtain the script for running."
-msgstr ""
+msgstr "無法取得要執行的腳本。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Script failed reloading, check console for errors."
-msgstr ""
+msgstr "腳本重新載入失敗,請檢查主控台以確認錯誤。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Script is not in tool mode, will not be able to run."
-msgstr ""
+msgstr "腳本不在工具模式下,無法執行。"
#: editor/plugins/script_editor_plugin.cpp
msgid ""
"To run this script, it must inherit EditorScript and be set to tool mode."
-msgstr ""
+msgstr "欲執行該腳本,其必須繼承自編輯器腳本 (EditorScript) 並設為工具模式。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme"
-msgstr "導入主題"
+msgstr "匯入主題"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
-msgstr "保存主題時出錯"
+msgstr "保存主題時發生錯誤"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving"
@@ -6977,41 +6604,37 @@ msgstr "保存錯誤"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme As..."
-msgstr "將主題另存為..。"
+msgstr "保存主題為..."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "%s Class Reference"
-msgstr " 類引用"
+msgstr "%s 類別參照"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Next"
-msgstr "查找下一個"
+msgstr "尋找下一個"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Previous"
-msgstr "查找上一個"
+msgstr "尋找上一個"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Filter scripts"
-msgstr "過濾檔案..."
+msgstr "過濾腳本"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle alphabetical sorting of the method list."
-msgstr ""
+msgstr "開啟/關閉按照字母順序排列方法列表。"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Filter methods"
-msgstr "過濾檔案..."
+msgstr "過濾方法"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Sort"
-msgstr "排序:"
+msgstr "排序"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
@@ -7038,14 +6661,12 @@ msgid "File"
msgstr "檔案"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open..."
msgstr "開啟…"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Reopen Closed Script"
-msgstr "開啟最近存取"
+msgstr "重新打開關閉的腳本"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
@@ -7053,20 +6674,19 @@ msgstr "全部保存"
#: editor/plugins/script_editor_plugin.cpp
msgid "Soft Reload Script"
-msgstr "軟重新加載腳本"
+msgstr "軟重新載入腳本"
#: editor/plugins/script_editor_plugin.cpp
msgid "Copy Script Path"
msgstr "複製腳本路徑"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "History Previous"
-msgstr "上個分頁"
+msgstr "上一個歷史記錄"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Next"
-msgstr ""
+msgstr "下一個歷史記錄"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -7074,9 +6694,8 @@ msgid "Theme"
msgstr "主題"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Import Theme..."
-msgstr "導入主題..。"
+msgstr "匯入主題..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload Theme"
@@ -7092,11 +6711,11 @@ msgstr "全部關閉"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close Docs"
-msgstr "關閉檔案"
+msgstr "關閉說明文件"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
msgid "Run"
-msgstr "運行"
+msgstr "執行"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Into"
@@ -7104,11 +6723,11 @@ msgstr "步入"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
-msgstr "跨過"
+msgstr "步過"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
-msgstr "跳過"
+msgstr "中斷"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_editor_debugger.cpp
@@ -7117,39 +6736,39 @@ msgstr "繼續"
#: editor/plugins/script_editor_plugin.cpp
msgid "Keep Debugger Open"
-msgstr "保持調試器打開"
+msgstr "保持開啟除錯工具"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Debug with External Editor"
-msgstr "使用外部編輯器進行調試"
+msgstr "使用外部編輯器進行除錯"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation."
-msgstr "打開 Godot 線上文檔"
+msgstr "打開 Godot 線上說明文件。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the reference documentation."
-msgstr "搜索參考文檔。"
+msgstr "搜尋參照文件。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to previous edited document."
-msgstr "轉到上一個編輯的檔案。"
+msgstr "跳至上一個編輯的文件。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to next edited document."
-msgstr "轉到下一個編輯的檔案。"
+msgstr "跳至下一個編輯的文件。"
#: editor/plugins/script_editor_plugin.cpp
msgid "Discard"
-msgstr "棄置"
+msgstr "放棄"
#: editor/plugins/script_editor_plugin.cpp
msgid ""
"The following files are newer on disk.\n"
"What action should be taken?:"
msgstr ""
+"磁碟中的下列檔案已更新。\n"
+"要執行什麼?:"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -7163,73 +6782,65 @@ msgstr "重新保存"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
-msgstr "調試器"
+msgstr "除錯工具"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Search Results"
msgstr "搜尋結果"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Scripts"
-msgstr "清除最近開啟的場景"
+msgstr "清除最近開啟的腳本"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Connections to method:"
-msgstr "連接到節點:"
+msgstr "連接至方法:"
#: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Source"
-msgstr "資源"
+msgstr "來源"
#: editor/plugins/script_text_editor.cpp
msgid "Target"
-msgstr ""
+msgstr "目標"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid ""
"Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."
-msgstr "將 '%s' 從 '%s' 中斷連接"
+msgstr "找不到方法「%s」(自訊號「%s」),節點「%s」至「%s」的連接已中斷。"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
-msgid "Line"
-msgstr "行:"
+msgid "[Ignore]"
+msgstr "[忽略]"
#: editor/plugins/script_text_editor.cpp
-msgid "(ignore)"
-msgstr "(忽略)"
+msgid "Line"
+msgstr "行"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Function"
-msgstr "轉到函數"
+msgstr "跳至函式"
#: editor/plugins/script_text_editor.cpp
msgid "Only resources from filesystem can be dropped."
-msgstr "只能拖拽檔案系統中的資源。"
+msgstr "只可拖移來自檔案系統的資源。"
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't drop nodes because script '%s' is not used in this scene."
-msgstr ""
+msgstr "無法防止節點,由於腳本「%s」並未在該場景中使用。"
#: editor/plugins/script_text_editor.cpp
msgid "Lookup Symbol"
-msgstr "查找符號"
+msgstr "搜尋符號"
#: editor/plugins/script_text_editor.cpp
msgid "Pick Color"
msgstr "選擇顏色"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
-#, fuzzy
msgid "Convert Case"
-msgstr "轉換成..."
+msgstr "轉換大小寫"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Uppercase"
@@ -7250,53 +6861,50 @@ msgstr "高亮顯示語法"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
msgid "Go To"
-msgstr ""
+msgstr "跳至"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
msgid "Bookmarks"
-msgstr ""
+msgstr "書籤"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Breakpoints"
-msgstr "刪除"
+msgstr "中斷點"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
msgid "Cut"
-msgstr "剪切"
+msgstr "剪下"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
msgid "Select All"
-msgstr "選擇全部"
+msgstr "全部選擇"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Delete Line"
msgstr "删除行"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
-msgstr "向左縮進"
+msgstr "向左縮排"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Right"
-msgstr "向右縮進"
+msgstr "向右縮排"
#: editor/plugins/script_text_editor.cpp
msgid "Toggle Comment"
-msgstr "切換注釋"
+msgstr "展開/收起註解"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Fold/Unfold Line"
-msgstr "前往第...行"
+msgstr "展開/收起行"
#: editor/plugins/script_text_editor.cpp
msgid "Fold All Lines"
-msgstr "折疊所有行"
+msgstr "收起所有行"
#: editor/plugins/script_text_editor.cpp
msgid "Unfold All Lines"
@@ -7304,97 +6912,88 @@ msgstr "展開所有行"
#: editor/plugins/script_text_editor.cpp
msgid "Clone Down"
-msgstr "拷貝到下一行"
+msgstr "複製到下一行"
#: editor/plugins/script_text_editor.cpp
msgid "Complete Symbol"
-msgstr ""
+msgstr "補全符號"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Evaluate Selection"
-msgstr "縮放所選"
+msgstr "取值所選內容"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
-msgstr ""
+msgstr "移除後方空白字元"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert Indent to Spaces"
-msgstr "轉換成..."
+msgstr "轉換縮排為空白"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert Indent to Tabs"
-msgstr "轉換成..."
+msgstr "轉換縮排為 Tab"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
-msgstr "自動縮進"
+msgstr "自動縮排"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Find in Files..."
-msgstr "在檔中查找..。"
+msgstr "在檔案中搜尋..."
#: editor/plugins/script_text_editor.cpp
msgid "Contextual Help"
-msgstr ""
+msgstr "上下文說明"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Toggle Bookmark"
-msgstr "切換自由觀察模式"
+msgstr "新增/移除書籤"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Next Bookmark"
-msgstr "轉到下一個中斷點"
+msgstr "跳至下一個書籤"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Previous Bookmark"
-msgstr "轉到上一個中斷點"
+msgstr "跳至上一個書籤"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Remove All Bookmarks"
-msgstr "删除所有項目"
+msgstr "刪除所有書籤"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function..."
-msgstr "轉到函數…"
+msgstr "跳至函式..."
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Line..."
-msgstr "前往第...行"
+msgstr "跳至第...行"
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Toggle Breakpoint"
-msgstr "設置中斷點"
+msgstr "設定/移除中斷點"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr "刪除所有中斷點"
+msgstr "移除所有中斷點"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Next Breakpoint"
-msgstr "轉到下一個中斷點"
+msgstr "跳至下一個中斷點"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Previous Breakpoint"
-msgstr "轉到上一個中斷點"
+msgstr "跳至上一個中斷點"
#: editor/plugins/shader_editor_plugin.cpp
msgid ""
"This shader has been modified on on disk.\n"
"What action should be taken?"
msgstr ""
+"磁碟上該著色器已被修改。\n"
+"該執行什麼?"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
@@ -7402,45 +7001,43 @@ msgstr "著色器"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "This skeleton has no bones, create some children Bone2D nodes."
-msgstr "此骨架沒有骨骼綁定,請創建一些 Bone2d 骨骼子節點。"
+msgstr "此骨架未包含骨骼,請建立一些子骨骼 2D (Bone2D) 節點。"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Create Rest Pose from Bones"
-msgstr "從骨骼創建休息姿勢"
+msgstr "自骨骼建立放鬆姿勢"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Set Rest Pose to Bones"
-msgstr "將休息姿勢設置為骨骼"
+msgstr "設定放鬆姿勢至骨骼"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
-msgstr "2D骨骼節點"
+msgstr "骨架2D (Sekeleton2D)"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Make Rest Pose (From Bones)"
-msgstr "創建休息姿勢 (從骨骼)"
+msgstr "製作放鬆姿勢(自骨骼)"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Set Bones to Rest Pose"
-msgstr "將骨骼設定為靜止姿勢"
+msgstr "設定骨骼為放鬆姿勢"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
-msgstr "創建物理骨骼"
+msgstr "建立物理骨骼"
#: editor/plugins/skeleton_editor_plugin.cpp
-#, fuzzy
msgid "Skeleton"
msgstr "骨架"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical skeleton"
-msgstr "創建物理骨架"
+msgstr "建立物理骨架"
#: editor/plugins/skeleton_ik_editor_plugin.cpp
-#, fuzzy
msgid "Play IK"
-msgstr "播放 IK"
+msgstr "執行 IK"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orthogonal"
@@ -7452,15 +7049,15 @@ msgstr "透視"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
-msgstr ""
+msgstr "已中止變換。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "X-Axis Transform."
-msgstr "X軸變換。"
+msgstr "X 軸變換。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Y-Axis Transform."
-msgstr "Y軸變換。"
+msgstr "Y 軸變換。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Z-Axis Transform."
@@ -7468,7 +7065,7 @@ msgstr "Z 軸變換。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Plane Transform."
-msgstr "查看平面轉換。"
+msgstr "檢視平面轉換。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7476,7 +7073,7 @@ msgstr "縮放: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translating: "
-msgstr "翻譯: "
+msgstr "移動: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -7484,15 +7081,15 @@ msgstr "旋轉 %s 度。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Keying is disabled (no key inserted)."
-msgstr ""
+msgstr "鍵已被禁用(未插入鍵)。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Animation Key Inserted."
-msgstr ""
+msgstr "已插入動畫鍵。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Pitch"
-msgstr ""
+msgstr "仰角"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw"
@@ -7516,7 +7113,7 @@ msgstr "表面變更"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
-msgstr "繪製調用"
+msgstr "繪製呼叫"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Vertices"
@@ -7528,7 +7125,7 @@ msgstr "俯視圖。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View."
-msgstr "底視圖。"
+msgstr "仰視圖。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom"
@@ -7567,35 +7164,32 @@ msgid "Rear"
msgstr "後"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Align Transform with View"
-msgstr "與視圖對齊"
+msgstr "將變換與視圖對齊"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Align Rotation with View"
-msgstr "將所選內容與視圖對齊"
+msgstr "將旋轉與視圖對齊"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
-msgstr ""
+msgstr "無母節點可用來實體化子節點。"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "This operation requires a single selected node."
msgstr "此操作需要單個選定的節點。"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Auto Orthogonal Enabled"
-msgstr "正交"
+msgstr "已啟用自動正交"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
-msgstr "鎖定視圖旋轉"
+msgstr "鎖定視角旋轉"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Normal"
-msgstr ""
+msgstr "顯示法線"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Wireframe"
@@ -7611,41 +7205,39 @@ msgstr "顯示無陰影"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Environment"
-msgstr "查看環境"
+msgstr "檢視環境"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Gizmos"
-msgstr "查看 Gizmos"
+msgstr "檢視 Gizmo"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
-msgstr "查看資訊"
+msgstr "檢視資訊"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View FPS"
-msgstr "查看FPS"
+msgstr "檢視 FPS"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Half Resolution"
-msgstr "半分辯率"
+msgstr "半解析度"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr "音訊監聽器"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Enable Doppler"
-msgstr "啟用篩選"
+msgstr "啟用都卜勒效應"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Cinematic Preview"
-msgstr "影片預覽"
+msgstr "效果預覽"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Not available when using the GLES2 renderer."
-msgstr ""
+msgstr "使用 GLES2 算圖器時無法使用。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Left"
@@ -7661,7 +7253,7 @@ msgstr "自由視圖 前"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Backwards"
-msgstr "自由視圖 后"
+msgstr "自由視圖 後"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Up"
@@ -7673,12 +7265,11 @@ msgstr "自由視圖 下"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Speed Modifier"
-msgstr "自由視圖速度調節"
+msgstr "加速自由視圖速度"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Slow Modifier"
-msgstr "自由視圖速度調節"
+msgstr "放慢自由視圖速度"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -7688,19 +7279,35 @@ msgstr "視圖旋轉已鎖定"
msgid ""
"Note: The FPS value displayed is the editor's framerate.\n"
"It cannot be used as a reliable indication of in-game performance."
-msgstr "注意: 顯示的FPS值是編輯器的幀率。 它不能用于表現遊戲內的實際性能"
+msgstr ""
+"注意:顯示的 FPS 值時編輯器的畫面速率。\n"
+"無法實際反映為遊戲中的效能。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
-msgstr "XForm對話框"
+msgstr "XForm 對話框"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"點擊以切換視覺狀態。\n"
+"\n"
+"眼鏡圖示:Gizmo 可見。\n"
+"眼鏡圖示:Gizmo 隱藏。\n"
+"半開眼鏡:Gizmo 也可以通過 Opaque Surface(「X-Ray - X光」)可見。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
-msgstr "將節點捕捉到地面"
+msgstr "吸附節點至地面"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Couldn't find a solid floor to snap the selection to."
-msgstr ""
+msgstr "找不到可吸附所選項目的堅固地板 (Solid Floor)。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -7708,11 +7315,13 @@ msgid ""
"Alt+Drag: Move\n"
"Alt+RMB: Depth list selection"
msgstr ""
+"拖移:旋轉\n"
+"Alt+拖移:移動\n"
+"Alt+右鍵點擊:展開選擇列表"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Use Local Space"
-msgstr "本地空間模式(%s)"
+msgstr "使用本機空間"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Snap"
@@ -7720,7 +7329,7 @@ msgstr "使用吸附"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
-msgstr "底部視圖"
+msgstr "仰視圖"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View"
@@ -7743,25 +7352,24 @@ msgid "Right View"
msgstr "右視圖"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Switch Perspective/Orthogonal View"
-msgstr "切換 投影/正交 視圖"
+msgstr "切換投影或正交視圖"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Insert Animation Key"
-msgstr "插入動畫幀"
+msgstr "插入動畫關鍵影格"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Origin"
-msgstr ""
+msgstr "聚焦原點"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Selection"
-msgstr ""
+msgstr "聚焦所選"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Toggle Freelook"
-msgstr "切換自由觀察模式"
+msgstr "開啟/關閉自由視圖"
#: editor/plugins/spatial_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -7769,41 +7377,40 @@ msgid "Transform"
msgstr "變換"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Object to Floor"
-msgstr "將對象吸附到地板"
+msgstr "吸附物件至地板"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
-msgstr "轉換對話框..。"
+msgstr "變換對話框..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "1 Viewport"
-msgstr "1個視口"
+msgstr "1 個檢視區"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports"
-msgstr "2個視口"
+msgstr "2 個檢視區"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports (Alt)"
-msgstr "2個視口 (Alt)"
+msgstr "2 個檢視區(替代)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports"
-msgstr "3個視口"
+msgstr "3 個檢視區"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports (Alt)"
-msgstr "3個視口 (Alt)"
+msgstr "3 個檢視區(替代)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "4 Viewports"
-msgstr "4個視口"
+msgstr "4 個檢視區"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Gizmos"
-msgstr ""
+msgstr "Gizmo"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Origin"
@@ -7815,9 +7422,8 @@ msgstr "顯示網格"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Settings..."
-msgstr "設定"
+msgstr "設定..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Settings"
@@ -7825,7 +7431,7 @@ msgstr "吸附設定"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate Snap:"
-msgstr "移動吸附"
+msgstr "移動吸附:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
@@ -7833,11 +7439,11 @@ msgstr "旋轉吸附(度):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
-msgstr "縮放吸附 (%):"
+msgstr "縮放吸附(%):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Viewport Settings"
-msgstr "視區設定"
+msgstr "檢視區設定"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective FOV (deg.):"
@@ -7845,27 +7451,27 @@ msgstr "透視視角(度):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Near:"
-msgstr "查看Z-Near:"
+msgstr "檢視 Z-Near:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Far:"
-msgstr "查看 Z-Far:"
+msgstr "檢視 Z-Far:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Change"
-msgstr ""
+msgstr "修改變換"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate:"
-msgstr ""
+msgstr "移動:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate (deg.):"
-msgstr "旋轉 (度):"
+msgstr "旋轉(度):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale (ratio):"
-msgstr "縮放(比例):"
+msgstr "縮放(比例):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Type"
@@ -7873,186 +7479,163 @@ msgstr "轉換類型"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Pre"
-msgstr "前"
+msgstr "前置"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Post"
-msgstr "發佈"
+msgstr "後置"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Nameless gizmo"
-msgstr "未命名的gizmo"
+msgstr "未命名的 Gizmo"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Create Mesh2D"
-msgstr "創建2D網格"
+msgstr "建立網格 2D (Mesh2D)"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Mesh2D Preview"
-msgstr "創建網格預覽"
+msgstr "建立網格 2D (Mesh2D) 預覽"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon2D"
-msgstr "創建3D多邊形"
+msgstr "建立多邊形 2D (Polygon2D)"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Polygon2D Preview"
-msgstr ""
+msgstr "預覽多邊形 2D (Polygon2D)"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Create CollisionPolygon2D"
-msgstr "創建碰撞多邊形"
+msgstr "建立碰撞多邊形 2D (CollisionPolygon2D)"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "CollisionPolygon2D Preview"
-msgstr "創建碰撞多邊形"
+msgstr "碰撞多邊形 2D (CollisionPolygon2D) 預覽"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Create LightOccluder2D"
-msgstr "創建遮光多邊形"
+msgstr "建立遮光 2D (LightOccluder2D)"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "LightOccluder2D Preview"
-msgstr "創建遮光多邊形"
+msgstr "遮光 2D (LightOccluder2D) 預覽"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite is empty!"
-msgstr "Sprite 是空的!"
+msgstr "Sprite 為空!"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Can't convert a sprite using animation frames to mesh."
-msgstr ""
+msgstr "無法使用動畫影格將 Sprite 轉換為網格。"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't replace by mesh."
-msgstr "無效的幾何圖形,無法用網格替換。"
+msgstr "無效的幾何圖形,無法以網格取代。"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to Mesh2D"
-msgstr "轉換為2D網格"
+msgstr "轉換為網格 2D (Mesh2D)"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Invalid geometry, can't create polygon."
-msgstr "無效的幾何圖形,無法用網格替換。"
+msgstr "無效的幾何圖形,無法建立多邊形。"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to Polygon2D"
-msgstr "轉換為2D網格"
+msgstr "轉換為多邊形 2D (Polygon2D)"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Invalid geometry, can't create collision polygon."
-msgstr "無效的幾何圖形,無法用網格替換。"
+msgstr "無效的幾何圖形,無法建立碰撞多邊形。"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Create CollisionPolygon2D Sibling"
-msgstr "創建碰撞多邊形"
+msgstr "建立碰撞多邊形 2D (CollisionPolygon2D) 同級"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Invalid geometry, can't create light occluder."
-msgstr "無效的幾何圖形,無法用網格替換。"
+msgstr "無效的幾何圖形,無法建立遮光。"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Create LightOccluder2D Sibling"
-msgstr "創建遮光多邊形"
+msgstr "建立遮光 2D (LightOccluder2D) 同級"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite"
-msgstr ""
+msgstr "Sprite"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Simplification: "
msgstr "簡化: "
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Shrink (Pixels): "
-msgstr "擴展(像素): "
+msgstr "收縮(像素): "
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Grow (Pixels): "
-msgstr "擴展(像素): "
+msgstr "擴展(像素): "
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Update Preview"
msgstr "更新預覽"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Settings:"
msgstr "設定:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "No Frames Selected"
-msgstr "幀選擇"
+msgstr "未選擇影格"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Add %d Frame(s)"
-msgstr "添加幀"
+msgstr "新增 %d 個影格"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Frame"
-msgstr "添加幀"
+msgstr "新增幀"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Unable to load images"
-msgstr "載入資源失敗。"
+msgstr "無法載入圖片"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "ERROR: Couldn't load frame resource!"
-msgstr "錯誤:無法加載幀資源!"
+msgstr "錯誤:無法載入影格資源!"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Resource clipboard is empty or not a texture!"
-msgstr "資源剪貼板為空或不是紋理!"
+msgstr "資源剪貼簿為空或非紋理貼圖!"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Paste Frame"
-msgstr "粘貼幀"
+msgstr "貼上影格"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Empty"
-msgstr "添加空白幀"
+msgstr "新增空白"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
-msgstr "更改動畫fps"
+msgstr "更改動畫 FPS"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "(empty)"
msgstr "(空)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move Frame"
-msgstr "粘貼幀"
+msgstr "貼上影格"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Animations:"
msgstr "動畫:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "New Animation"
-msgstr "新動畫"
+msgstr "新增動畫"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -8063,75 +7646,68 @@ msgid "Loop"
msgstr "循環"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Animation Frames:"
msgstr "動畫幀:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Add a Texture from File"
-msgstr "將紋理添加到磁貼集。"
+msgstr "自檔案新增紋理"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Frames from a Sprite Sheet"
-msgstr ""
+msgstr "自 Sprite 表新增影格"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
-msgstr "插入空白幀(之前)"
+msgstr "在前面插入空白"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (After)"
-msgstr "插入空白幀(之后)"
+msgstr "在後面插入空白"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Move (Before)"
-msgstr "移動(以前)"
+msgstr "向前移動"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Move (After)"
-msgstr "移動(之後)"
+msgstr "向後移動"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Select Frames"
-msgstr "選擇模式"
+msgstr "選擇影格"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Horizontal:"
-msgstr "水平翻轉"
+msgstr "水平:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Vertical:"
-msgstr "頂點"
+msgstr "垂直:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Select/Clear All Frames"
-msgstr "選擇全部"
+msgstr "選擇/清除所有影格"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Create Frames from Sprite Sheet"
-msgstr "從場景創建"
+msgstr "自 Sprite 表建立幀"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "SpriteFrames"
-msgstr ""
+msgstr "SpriteFrames(Sprite 影格)"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Set Region Rect"
-msgstr "設置紋理區域"
+msgstr "設定區域矩形 (Region Rect)"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Set Margin"
-msgstr "設置邊距"
+msgstr "設置外邊距"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
-msgstr "吸附模式:"
+msgstr "吸附模式:"
#: editor/plugins/texture_region_editor_plugin.cpp
#: scene/resources/visual_shader.cpp
@@ -8148,11 +7724,11 @@ msgstr "網格吸附"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Auto Slice"
-msgstr "自動剪切"
+msgstr "自動剪裁"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Offset:"
-msgstr ""
+msgstr "偏移:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Step:"
@@ -8160,76 +7736,71 @@ msgstr "步驟:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Sep.:"
-msgstr ""
+msgstr "分隔線:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "TextureRegion"
-msgstr ""
+msgstr "紋理區域 (TextureRegion)"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All Items"
-msgstr "添加所有項目"
+msgstr "新增所有項目"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All"
-msgstr "全部添加"
+msgstr "新增全部"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
-msgstr "删除所有項目"
+msgstr "移除所有項目"
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Remove All"
-msgstr "全部删除"
+msgstr "移除全部"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Theme"
-msgstr "編輯主題…"
+msgstr "編輯主題"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme editing menu."
-msgstr "主題編輯菜單。"
+msgstr "主題編輯選單。"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
-msgstr "添加類項"
+msgstr "新增類別項目"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
-msgstr "删除類項"
+msgstr "刪除類別項目"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create Empty Template"
-msgstr ""
+msgstr "建立空白樣板"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create Empty Editor Template"
-msgstr ""
+msgstr "建立空白編輯器樣板"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create From Current Editor Theme"
-msgstr "從當前編輯器主題模板創建"
+msgstr "自目前編輯器主題建立"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Button"
-msgstr "切換自動播放"
+msgstr "開啟/關閉按鈕"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Disabled Button"
-msgstr "已停用"
+msgstr "已停用的按鈕"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Item"
msgstr "項目"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Disabled Item"
-msgstr "已停用"
+msgstr "已停用的項目"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Check Item"
@@ -8241,29 +7812,27 @@ msgstr "已檢查的項目"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Radio Item"
-msgstr "單選項目"
+msgstr "單選項"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Checked Radio Item"
-msgstr "選中的單選項目"
+msgstr "已選中的單選項"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Named Sep."
-msgstr ""
+msgstr "帶名稱的分隔線"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Submenu"
-msgstr ""
+msgstr "子選單"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Subitem 1"
-msgstr "項目"
+msgstr "子項目 1"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Subitem 2"
-msgstr "項目"
+msgstr "子項目 2"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Has"
@@ -8274,9 +7843,8 @@ msgid "Many"
msgstr "許多"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Disabled LineEdit"
-msgstr "已停用"
+msgstr "已停用的行編輯"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 1"
@@ -8291,13 +7859,12 @@ msgid "Tab 3"
msgstr "標籤 3"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editable Item"
-msgstr "編輯主題…"
+msgstr "可編輯的項目"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Subtree"
-msgstr ""
+msgstr "子樹"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Has,Many,Options"
@@ -8305,12 +7872,12 @@ msgstr "有, 許多, 選項"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Data Type:"
-msgstr "數據類型:"
+msgstr "資料類型:"
#: editor/plugins/theme_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Icon"
-msgstr "圖標"
+msgstr "圖示"
#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp
msgid "Style"
@@ -8325,27 +7892,25 @@ msgid "Color"
msgstr "顏色"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme File"
-msgstr "主題"
+msgstr "主題檔"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
-msgstr "擦除選中"
+msgstr "清除所選"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Fix Invalid Tiles"
-msgstr "修復無效的磁貼"
+msgstr "修正無效的圖塊"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cut Selection"
-msgstr "切割選擇"
+msgstr "剪下所選"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
-msgstr "繪製磚塊地圖"
+msgstr "繪製圖塊地圖"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Line Draw"
@@ -8353,111 +7918,103 @@ msgstr "線性繪製"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rectangle Paint"
-msgstr "繪製矩形"
+msgstr "矩形繪製"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Bucket Fill"
-msgstr "油漆桶填充"
+msgstr "油漆桶填滿"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
-msgstr "擦除磚塊地圖"
+msgstr "清除圖塊地圖"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Find Tile"
-msgstr "查找磁貼"
+msgstr "搜尋圖塊"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Transpose"
-msgstr "轉置"
+msgstr "切換行列(縱橫)顯示"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Disable Autotile"
-msgstr ""
+msgstr "禁用自動圖塊"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Enable Priority"
-msgstr "編輯磁貼優先級"
+msgstr "啟用優先級"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Filter tiles"
-msgstr "篩選檔案..."
+msgstr "過濾圖塊"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Give a TileSet resource to this TileMap to use its tiles."
-msgstr ""
+msgstr "為圖塊地圖設定圖塊集資源以使用其圖塊。"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint Tile"
-msgstr "繪製磁貼"
+msgstr "繪製圖塊"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid ""
"Shift+LMB: Line Draw\n"
"Shift+Ctrl+LMB: Rectangle Paint"
msgstr ""
+"Shift+左鍵:直線繪製\n"
+"Shift+Ctrl+左鍵:矩形繪圖"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
-msgstr "選擇磁貼"
+msgstr "選擇圖塊"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Rotate Left"
msgstr "向左旋轉"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Rotate Right"
msgstr "向右旋轉"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Flip Horizontally"
msgstr "水平翻轉"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Flip Vertically"
msgstr "垂直翻轉"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Clear Transform"
msgstr "清除變換"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Add Texture(s) to TileSet."
-msgstr "將紋理添加到磁貼集。"
+msgstr "新增紋理至圖塊集。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove selected Texture from TileSet."
-msgstr "從磁貼集中刪除選定的紋理。"
+msgstr "自圖塊集移除所選的紋理。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from Scene"
-msgstr "從場景創建"
+msgstr "自場景建立"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from Scene"
-msgstr "從場景合併"
+msgstr "自場景合併"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "New Single Tile"
-msgstr ""
+msgstr "新增單一圖塊"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "New Autotile"
-msgstr "過濾檔案..."
+msgstr "新增自動圖塊"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "New Atlas"
-msgstr "新建 %s"
+msgstr "新增合集"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Next Coordinate"
@@ -8465,188 +8022,172 @@ msgstr "下一個座標"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Select the next shape, subtile, or Tile."
-msgstr "選擇下一個形狀、子磁貼或磁貼。"
+msgstr "選擇下一個形狀、子圖塊、或圖塊。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Previous Coordinate"
msgstr "上一個座標"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Select the previous shape, subtile, or Tile."
-msgstr "選擇上一個形狀、子磁貼或磁貼。"
+msgstr "選擇前一個形狀、子圖塊、或圖塊。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Region"
-msgstr "旋轉模式"
+msgstr "區域"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Collision"
-msgstr "插值模式"
+msgstr "碰撞"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occlusion"
-msgstr "編輯遮擋多邊形"
+msgstr "遮擋"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation"
-msgstr "創建導航網格"
+msgstr "導航"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Bitmask"
-msgstr "旋轉模式"
+msgstr "遮罩"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Priority"
-msgstr "導出模式:"
+msgstr "優先級"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Z Index"
-msgstr "平移模式"
+msgstr "Z 索引"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Region Mode"
-msgstr "旋轉模式"
+msgstr "區域模式"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Collision Mode"
-msgstr "插值模式"
+msgstr "碰撞模式"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occlusion Mode"
-msgstr "編輯遮擋多邊形"
+msgstr "遮擋模式"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Mode"
-msgstr "創建導航網格"
+msgstr "導航模式"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Bitmask Mode"
-msgstr "旋轉模式"
+msgstr "優先模式"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Priority Mode"
-msgstr "導出模式:"
+msgstr "優先模式"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Icon Mode"
-msgstr "平移模式"
+msgstr "圖示模式"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Z Index Mode"
-msgstr "平移模式"
+msgstr "Z 索引模式"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
-msgstr "複製位掩碼。"
+msgstr "複製位元遮罩。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Paste bitmask."
-msgstr "貼上參數"
+msgstr "貼上位元遮罩。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Erase bitmask."
-msgstr "擦除位掩碼."
+msgstr "清除位元遮罩。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create a new rectangle."
-msgstr "創建新矩形。"
+msgstr "建立新矩形。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create a new polygon."
-msgstr "創建新多邊形。"
+msgstr "建立新多邊形。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Keep polygon inside region Rect."
-msgstr "將多邊形保留在區域內。"
+msgstr "保持多邊形在區域矩形 (Rect) 內。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Enable snap and show grid (configurable via the Inspector)."
-msgstr "啟用吸附和顯示網格 (可通過屬性面板配置)。"
+msgstr "啟用吸附與顯示網格(可通過屬性面板設定)。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Display Tile Names (Hold Alt Key)"
-msgstr "顯示磁貼名稱 (按住 ALT 鍵)"
+msgstr "顯示圖塊名稱(按住 Alt 鍵)"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
"Add or select a texture on the left panel to edit the tiles bound to it."
-msgstr ""
+msgstr "在左側面板新增或選擇紋理以編輯與其綁定的圖塊。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected texture? This will remove all tiles which use it."
-msgstr "刪除選定的紋理?這將刪除使用它的所有磁貼。"
+msgstr "是否刪除所選紋理?將一併移除所有使用其之圖塊。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "You haven't selected a texture to remove."
-msgstr "您尚未選擇要刪除的紋理。"
+msgstr "尚未選擇欲移除之紋理。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from scene? This will overwrite all current tiles."
-msgstr "從場景創建?這將覆蓋所有當前磁貼。"
+msgstr "要自場景建立嗎?將複寫目前的圖塊。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from scene?"
-msgstr "確定合併場景?"
+msgstr "要自場景合併嗎?"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Texture"
-msgstr "刪除紋理"
+msgstr "移除紋理"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "%s file(s) were not added because was already on the list."
-msgstr ""
+msgstr "由於有 %s 個檔案已在列表上,未被新增。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
"Drag handles to edit Rect.\n"
"Click on another Tile to edit it."
msgstr ""
+"拖移手柄以編輯矩形 (Rect)。\n"
+"點擊其他圖塊以進行編輯。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Delete selected Rect."
-msgstr "删除所選的Rect。"
+msgstr "删除所選的矩形 (Rect)。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid ""
"Select current edited sub-tile.\n"
"Click on another Tile to edit it."
-msgstr "新增資料夾"
+msgstr ""
+"選擇目前編輯的子圖塊。\n"
+"點擊另一個圖塊以進行編輯。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Delete polygon."
msgstr "刪除多邊形。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid ""
"LMB: Set bit on.\n"
"RMB: Set bit off.\n"
"Shift+LMB: Set wildcard bit.\n"
"Click on another Tile to edit it."
-msgstr "新增資料夾"
+msgstr ""
+"左鍵點擊:開啟位元。\n"
+"右鍵點擊:關閉位元。\n"
+"Shift+左鍵點擊:設定通配位元。\n"
+"點擊另一個圖塊以進行編輯。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -8654,59 +8195,60 @@ msgid ""
"bindings.\n"
"Click on another Tile to edit it."
msgstr ""
+"選擇欲作為圖示使用的子圖塊,亦將用於無效的自動圖塊綁定上。\n"
+"點擊另一個圖塊以進行編輯。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
"Select sub-tile to change its priority.\n"
"Click on another Tile to edit it."
msgstr ""
+"選擇子圖塊以更改其優先級。\n"
+"點擊另一個圖塊以進行編輯。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid ""
"Select sub-tile to change its z index.\n"
"Click on another Tile to edit it."
-msgstr "新增資料夾"
+msgstr ""
+"選擇子圖塊以修改其 Z 索引。\n"
+"點擊另一個圖塊以進行編輯。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Region"
-msgstr "設置磁貼區域"
+msgstr "選擇圖塊區域"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Tile"
-msgstr "創建磁貼"
+msgstr "建立圖塊"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Icon"
-msgstr "設定磁貼圖標"
+msgstr "設定磁貼圖示"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Bitmask"
-msgstr "編輯磁貼位掩碼"
+msgstr "編輯圖塊位元遮罩"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Collision Polygon"
msgstr "編輯碰撞多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Occlusion Polygon"
msgstr "編輯遮擋多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Navigation Polygon"
-msgstr "新增資料夾"
+msgstr "編輯導航多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Paste Tile Bitmask"
-msgstr "粘貼磁貼位掩碼"
+msgstr "貼上圖塊位元遮罩"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Clear Tile Bitmask"
-msgstr "清除磁貼位掩碼"
+msgstr "清除圖塊位元遮罩"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Make Polygon Concave"
@@ -8718,12 +8260,11 @@ msgstr "使多邊形凸起"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
-msgstr "移除磁貼"
+msgstr "移除圖塊"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Collision Polygon"
-msgstr "刪除碰撞多邊形"
+msgstr "移除碰撞多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Occlusion Polygon"
@@ -8735,255 +8276,227 @@ msgstr "刪除導航多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Priority"
-msgstr "編輯磁貼優先級"
+msgstr "編輯圖塊優先級"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Z Index"
-msgstr ""
+msgstr "編輯圖塊 Z 索引"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Make Convex"
-msgstr "使多邊形凸起"
+msgstr "製作凸多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Make Concave"
-msgstr "使多邊形塌陷"
+msgstr "製作凹多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Collision Polygon"
-msgstr "創建碰撞多邊形"
+msgstr "建立碰撞多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Occlusion Polygon"
-msgstr "創建遮擋多邊形"
+msgstr "建立遮擋多邊形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "This property can't be changed."
-msgstr "無法更改此屬性。"
+msgstr "該屬性無法修改。"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "TileSet"
-msgstr ""
+msgstr "圖塊集"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "No VCS addons are available."
-msgstr ""
+msgstr "無可用的版本控制 (VCS) 擴充功能。"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
-msgstr ""
+msgstr "錯誤"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "No commit message was provided"
-msgstr ""
+msgstr "未提供提交訊息"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "No files added to stage"
-msgstr ""
+msgstr "預存區無檔案"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Commit"
-msgstr "社區"
+msgstr "提交"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "VCS Addon is not initialized"
-msgstr ""
+msgstr "VCS 擴充功能尚未初始化"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control System"
-msgstr ""
+msgstr "版本控制系統 (VCS)"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Initialize"
-msgstr "首字母大寫"
+msgstr "初始化"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Staging area"
-msgstr ""
+msgstr "預存區"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Detect new changes"
-msgstr "創建新矩形。"
+msgstr "偵測新改動"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Changes"
-msgstr "更換"
+msgstr "改動"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Modified"
-msgstr ""
+msgstr "已修改"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Renamed"
-msgstr "重命名"
+msgstr "重新命名"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Deleted"
-msgstr "刪除"
+msgstr "已刪除"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Typechange"
-msgstr "更換"
+msgstr "格式更改"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Stage Selected"
-msgstr "縮放所選"
+msgstr "預存所選"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Stage All"
-msgstr "全部保存"
+msgstr "預存全部"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Add a commit message"
-msgstr ""
+msgstr "新增一個提交訊息"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Commit Changes"
-msgstr "同步腳本的變更"
+msgstr "提交改動"
#: editor/plugins/version_control_editor_plugin.cpp
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Status"
-msgstr ""
+msgstr "狀態"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "View file diffs before committing them to the latest version"
-msgstr ""
+msgstr "在提交至最新版本前檢視檔案的差異"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "No file diff is active"
-msgstr ""
+msgstr "無有效的檔案差異"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Detect changes in file diff"
-msgstr ""
+msgstr "在檔案差異中偵測改動"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(GLES3 only)"
-msgstr ""
+msgstr "(僅限 GLES3)"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Add Output"
-msgstr "添加輸入"
+msgstr "新增輸出"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar"
-msgstr "縮放:"
+msgstr "純量 Scalar"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Vector"
-msgstr "屬性面板"
+msgstr "向量 Vector"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Boolean"
-msgstr ""
+msgstr "布林 Boolean"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Sampler"
-msgstr ""
+msgstr "採樣 Sampler"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Add input port"
-msgstr "添加輸入"
+msgstr "新增輸入埠口"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add output port"
-msgstr ""
+msgstr "新增輸出埠口"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Change input port type"
-msgstr "更改預設類型"
+msgstr "修改輸入埠口類型"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Change output port type"
-msgstr "更改預設類型"
+msgstr "修改輸出埠口類型"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Change input port name"
-msgstr "更改動畫名稱:"
+msgstr "修改輸入埠口名稱"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Change output port name"
-msgstr ""
+msgstr "修改輸出埠口名稱"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Remove input port"
-msgstr "刪除點"
+msgstr "移除輸入埠口"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Remove output port"
-msgstr "刪除點"
+msgstr "移除輸出埠口"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Set expression"
-msgstr "設置磁貼區域"
+msgstr "設定表示式"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Resize VisualShader node"
-msgstr "視覺化著色器"
+msgstr "調整視覺著色器 (VisualShader) 節點大小"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Uniform Name"
-msgstr "設置統一名稱"
+msgstr "設定均勻名稱"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Input Default Port"
-msgstr "設置輸入預設端口"
+msgstr "設定輸入預設埠口"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node to Visual Shader"
-msgstr "將節點添加到可視化著色器"
+msgstr "將節點新增至視覺著色器"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Duplicate Nodes"
-msgstr "複製節點"
+msgstr "重複節點"
#: editor/plugins/visual_shader_editor_plugin.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Paste Nodes"
-msgstr ""
+msgstr "貼上節點"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Delete Nodes"
-msgstr "刪除"
+msgstr "刪除節點"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Input Type Changed"
-msgstr "視覺著色器輸入類型已更改"
+msgstr "已修改視覺著色器輸入類型"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "頂點"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Fragment"
msgstr "片段"
@@ -8992,380 +8505,368 @@ msgid "Light"
msgstr "燈光"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Show resulted shader code."
-msgstr "創建節點"
+msgstr "顯示產生的著色器程式碼。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Create Shader Node"
-msgstr "創建節點"
+msgstr "建立著色器節點"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color function."
-msgstr "轉到函數"
+msgstr "顏色函式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color operator."
-msgstr ""
+msgstr "色彩運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Grayscale function."
-msgstr "建立函式"
+msgstr "灰階函式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Converts HSV vector to RGB equivalent."
-msgstr ""
+msgstr "將 HSV 向量轉為同等之 RGB。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Converts RGB vector to HSV equivalent."
-msgstr ""
+msgstr "將 RGB 向量轉為同等至 HSV。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Sepia function."
-msgstr "建立函式"
+msgstr "深褐函式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Burn operator."
-msgstr ""
+msgstr "加深 (Burn) 運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Darken operator."
-msgstr ""
+msgstr "暗化運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Difference operator."
-msgstr "僅差異"
+msgstr "差異運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Dodge operator."
-msgstr ""
+msgstr "加亮 (Dodge) 運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "HardLight operator."
-msgstr "縮放(比例):"
+msgstr "強光 (HardLight) 運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Lighten operator."
-msgstr ""
+msgstr "亮化運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Overlay operator."
-msgstr ""
+msgstr "疊加運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Screen operator."
-msgstr ""
+msgstr "濾色運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "SoftLight operator."
-msgstr ""
+msgstr "柔光運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color constant."
-msgstr "固定"
+msgstr "色彩常數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color uniform."
-msgstr "清除變換"
+msgstr "色彩均勻。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the boolean result of the %s comparison between two parameters."
-msgstr ""
+msgstr "回傳兩個參數間 %s 比較的布林結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Equal (==)"
-msgstr ""
+msgstr "等於 (==)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Greater Than (>)"
-msgstr ""
+msgstr "大於 (>)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Greater Than or Equal (>=)"
-msgstr ""
+msgstr "大於等於 (>=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns an associated vector if the provided scalars are equal, greater or "
"less."
-msgstr ""
+msgstr "若提供的純量相等、大於、或小於,則回傳相關的向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns the boolean result of the comparison between INF and a scalar "
"parameter."
-msgstr ""
+msgstr "回傳在 INF 與純量參數間比較的布林結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns the boolean result of the comparison between NaN and a scalar "
"parameter."
-msgstr ""
+msgstr "回傳在 NaN 與純量參數間比較的布林結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Less Than (<)"
-msgstr ""
+msgstr "小於 (<)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Less Than or Equal (<=)"
-msgstr ""
+msgstr "小於等於 (<=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Not Equal (!=)"
-msgstr ""
+msgstr "不等於 (!=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns an associated vector if the provided boolean value is true or false."
-msgstr ""
+msgstr "若提供的布林值為 true 或 false,則回傳相關的向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns an associated scalar if the provided boolean value is true or false."
-msgstr ""
+msgstr "若提供的布林值為 true 或 false,則回傳相關的純量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the boolean result of the comparison between two parameters."
-msgstr ""
+msgstr "回傳兩個參數間比較的布林結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns the boolean result of the comparison between INF (or NaN) and a "
"scalar parameter."
-msgstr ""
+msgstr "回傳 INF(或 NaN)與一個純量間比較的布林結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Boolean constant."
-msgstr ""
+msgstr "布林常數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Boolean uniform."
-msgstr ""
+msgstr "布林均勻。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for all shader modes."
-msgstr ""
+msgstr "所有的著色器模式的「%s」輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Input parameter."
-msgstr "吸附到父級節點"
+msgstr "輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for vertex and fragment shader modes."
-msgstr ""
+msgstr "頂點與片段模式的「%s」輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for fragment and light shader modes."
-msgstr ""
+msgstr "片段與燈光著色器模式的「%s」輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for fragment shader mode."
-msgstr ""
+msgstr "片段著色器模式的「%s」輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for light shader mode."
-msgstr ""
+msgstr "燈光著色器模式的「%s」輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for vertex shader mode."
-msgstr ""
+msgstr "頂點著色器的「%s」輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for vertex and fragment shader mode."
-msgstr ""
+msgstr "頂點或片段著色器的「%s」輸入參數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar function."
-msgstr "縮放所選"
+msgstr "純量函式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar operator."
-msgstr "縮放(比例):"
+msgstr "純量運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "E constant (2.718282). Represents the base of the natural logarithm."
-msgstr ""
+msgstr "E 常數(2.718282)。表示自然對數的底數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Epsilon constant (0.00001). Smallest possible scalar number."
-msgstr ""
+msgstr "ε (eplison) 常數 (0.00001)。最小可用的純量數字。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Phi constant (1.618034). Golden ratio."
-msgstr ""
+msgstr "Φ(Phi) 常數 (1.618034)。黃金比例。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Pi/4 constant (0.785398) or 45 degrees."
-msgstr ""
+msgstr "π (Pi)/4 常數 (0.785398) 或 45 度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Pi/2 constant (1.570796) or 90 degrees."
-msgstr ""
+msgstr "π (Pi)/2 常數 (1.570796) 或 95 度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Pi constant (3.141593) or 180 degrees."
-msgstr ""
+msgstr "π (Pi) 常數 (3.141593) 或 180 度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Tau constant (6.283185) or 360 degrees."
-msgstr ""
+msgstr "τ 常數 (6.283185) 或 360 度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Sqrt2 constant (1.414214). Square root of 2."
-msgstr ""
+msgstr "Sqrt2 常數 (1.414214)。2 的平方根。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the absolute value of the parameter."
-msgstr ""
+msgstr "回傳參數的絕對值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the arc-cosine of the parameter."
-msgstr ""
+msgstr "回傳參數的反餘弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the inverse hyperbolic cosine of the parameter."
-msgstr ""
+msgstr "回傳參數的反雙曲餘弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the arc-sine of the parameter."
-msgstr ""
+msgstr "回傳參數的反正弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the inverse hyperbolic sine of the parameter."
-msgstr ""
+msgstr "回傳參數的反雙曲正弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the arc-tangent of the parameter."
-msgstr ""
+msgstr "回傳參數的反正切值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the arc-tangent of the parameters."
-msgstr ""
+msgstr "回傳參數的反正切值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the inverse hyperbolic tangent of the parameter."
-msgstr ""
+msgstr "回傳參數的反雙曲正切值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Finds the nearest integer that is greater than or equal to the parameter."
-msgstr ""
+msgstr "尋找大於或等於該參數最近的整數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Constrains a value to lie between two further values."
-msgstr ""
+msgstr "將值限制欲兩個值之間。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the cosine of the parameter."
-msgstr ""
+msgstr "回傳參數的餘弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the hyperbolic cosine of the parameter."
-msgstr ""
+msgstr "回傳參數的雙曲餘弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Converts a quantity in radians to degrees."
-msgstr ""
+msgstr "將弧度轉換為度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Base-e Exponential."
-msgstr ""
+msgstr "e 為底數的指數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Base-2 Exponential."
-msgstr ""
+msgstr "2 為底數的指數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Finds the nearest integer less than or equal to the parameter."
-msgstr ""
+msgstr "尋找小於或等於參數最近的整數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Computes the fractional part of the argument."
-msgstr ""
+msgstr "計算引數的小數部分。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the inverse of the square root of the parameter."
-msgstr ""
+msgstr "回傳參數的平方根的倒數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Natural logarithm."
-msgstr ""
+msgstr "自然對數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Base-2 logarithm."
-msgstr ""
+msgstr "2 為底數的對數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the greater of two values."
-msgstr ""
+msgstr "回傳兩個值中較大的值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the lesser of two values."
-msgstr ""
+msgstr "回傳兩個值中較小的值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Linear interpolation between two scalars."
-msgstr ""
+msgstr "在兩個純量間做線性插值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the opposite value of the parameter."
-msgstr ""
+msgstr "回傳參數的相反值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "1.0 - scalar"
-msgstr ""
+msgstr "1.0 - 純量"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns the value of the first parameter raised to the power of the second."
-msgstr ""
+msgstr "回傳第一個參數的第二個參數冪次的值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Converts a quantity in degrees to radians."
-msgstr ""
+msgstr "將度數轉換為弧度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "1.0 / scalar"
-msgstr ""
+msgstr "1.0 / 純量"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Finds the nearest integer to the parameter."
-msgstr ""
+msgstr "尋找參數最近的整數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Finds the nearest even integer to the parameter."
-msgstr ""
+msgstr "尋找參數最近的整數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Clamps the value between 0.0 and 1.0."
-msgstr ""
+msgstr "將數值限制在 0.0 與 1.0 之間。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Extracts the sign of the parameter."
-msgstr ""
+msgstr "抽取參數的號(正號/負號)。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the sine of the parameter."
-msgstr ""
+msgstr "回傳參數的正弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the hyperbolic sine of the parameter."
-msgstr ""
+msgstr "回傳參數的雙曲正弦值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the square root of the parameter."
-msgstr ""
+msgstr "回傳參數的平方根。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9375,6 +8876,10 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"SmoothStep 函式( scalar(edge0),scalar(edge1),scalar(x) )。\n"
+"\n"
+"若「x」小於「edge0」則回傳 0.0,若 x 大於「edge1」則回傳 1.0。其餘值則回傳在 "
+"0.0 與 1.0 之間使用厄米多項式進行插值的結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9382,72 +8887,73 @@ msgid ""
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Step 函式( scalar(edge), scalar(x) )。\n"
+"\n"
+"若「x」小於「edge」則回傳 0.0,否則回傳 1.0。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the tangent of the parameter."
-msgstr ""
+msgstr "回傳參數的正切值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the hyperbolic tangent of the parameter."
-msgstr ""
+msgstr "回傳參數的雙曲正切值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Finds the truncated value of the parameter."
-msgstr ""
+msgstr "尋找參數的截斷值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Adds scalar to scalar."
-msgstr ""
+msgstr "將純量新增至純量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Divides scalar by scalar."
-msgstr ""
+msgstr "以純量除以純量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Multiplies scalar by scalar."
-msgstr ""
+msgstr "以純量乘以純量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the remainder of the two scalars."
-msgstr ""
+msgstr "回傳兩個純量相除的餘數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Subtracts scalar from scalar."
-msgstr ""
+msgstr "以純量減去純量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Scalar constant."
-msgstr ""
+msgstr "純量常數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar uniform."
-msgstr "清除變換"
+msgstr "純量均勻。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Perform the cubic texture lookup."
-msgstr ""
+msgstr "進行立方體紋理搜尋。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Perform the texture lookup."
-msgstr ""
+msgstr "進行紋理搜尋。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Cubic texture uniform lookup."
-msgstr ""
+msgstr "立方體紋理均勻搜尋。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "2D texture uniform lookup."
-msgstr ""
+msgstr "2D 紋理均勻搜尋。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "2D texture uniform lookup with triplanar."
-msgstr ""
+msgstr "以三平面進行 2D 紋理均勻尋找。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform function."
-msgstr "轉換對話框..。"
+msgstr "轉換函式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9459,73 +8965,75 @@ msgid ""
"whose number of rows is the number of components in 'c' and whose number of "
"columns is the number of components in 'r'."
msgstr ""
+"計算一對向量的外積。\n"
+"\n"
+"OuterProduct 將第一個參數「c」視為列向量(由一個列的矩陣),第二個參數「r」視"
+"為行向量(由一個行的矩陣),並依線性代數矩陣乘以「c * r」,產生一個矩陣其行數"
+"為「c」中的組件,列數為「r」的組件。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Composes transform from four vectors."
-msgstr ""
+msgstr "由四個向量構成變換。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Decomposes transform to four vectors."
-msgstr ""
+msgstr "由四個向量分解變換。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the determinant of a transform."
-msgstr ""
+msgstr "計算變換的行列式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the inverse of a transform."
-msgstr ""
+msgstr "計算變換的逆矩陣。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the transpose of a transform."
-msgstr ""
+msgstr "計算一個變換的轉置。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Multiplies transform by transform."
-msgstr ""
+msgstr "變換乘以變換。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Multiplies vector by transform."
-msgstr ""
+msgstr "向量乘以變換。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform constant."
-msgstr "新增資料夾"
+msgstr "變換常數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform uniform."
-msgstr "轉換對話框..。"
+msgstr "變換均勻。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Vector function."
-msgstr "轉到函數…"
+msgstr "向量函式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector operator."
-msgstr ""
+msgstr "向量運算子。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Composes vector from three scalars."
-msgstr ""
+msgstr "由三個純量組成向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Decomposes vector to three scalars."
-msgstr ""
+msgstr "將一個向量拆解為三個純量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the cross product of two vectors."
-msgstr ""
+msgstr "計算兩個向量的外積。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the distance between two points."
-msgstr ""
+msgstr "回傳兩個點間的距離。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the dot product of two vectors."
-msgstr ""
+msgstr "計算兩個向量的內積。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9534,40 +9042,43 @@ msgid ""
"incident vector, and Nref, the reference vector. If the dot product of I and "
"Nref is smaller than zero the return value is N. Otherwise -N is returned."
msgstr ""
+"回傳一個與參照向量指向相同方向的向量。該函式由三個向量參數:N,方向向量;I,"
+"入射向量,以及 Nref,參照向量。若 I 與 Nref 的內積小於 0,則回傳值為 N。否則"
+"將回傳 -N。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the length of a vector."
-msgstr ""
+msgstr "計算向量的長度。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Linear interpolation between two vectors."
-msgstr ""
+msgstr "在兩個向量間做線性插值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Linear interpolation between two vectors using scalar."
-msgstr ""
+msgstr "使用純量在兩個向量間做線性插值。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Calculates the normalize product of vector."
-msgstr ""
+msgstr "計算向量的正規化積。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "1.0 - vector"
-msgstr ""
+msgstr "1.0 - 向量"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "1.0 / vector"
-msgstr ""
+msgstr "1.0 / 向量"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns the vector that points in the direction of reflection ( a : incident "
"vector, b : normal vector )."
-msgstr ""
+msgstr "回傳指向反射方向的向量(a:入射向量,b:法向量)。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the vector that points in the direction of refraction."
-msgstr ""
+msgstr "回傳指向折射方向的向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9577,6 +9088,10 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"SmoothStep 函式( vector(edge0), vector(edge1), vector(x) ).\n"
+"\n"
+"若「x」小於「edge0」則回傳 0.0,若「x」大於「edge1」則回傳 1.0。其餘值則回傳"
+"在 0.0 與 1.0 之間使用厄米多項式進行插值的結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9586,6 +9101,10 @@ msgid ""
"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
"using Hermite polynomials."
msgstr ""
+"SmoothStep 函式( scalar(edge0), scalar(edge1), vector(x) ).\n"
+"\n"
+"若「x」小於「edge0」則回傳 0.0,若「x」大於「edge1」則回傳 1.0。其餘值則回傳"
+"在 0.0 與 1.0 之間使用厄米多項式進行插值的結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9593,6 +9112,9 @@ msgid ""
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Step 函式( vector(edge), vector(x) ).\n"
+"\n"
+"若「x」小於「edge」則回傳 0.0,否則回傳 1.0。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9600,34 +9122,37 @@ msgid ""
"\n"
"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
msgstr ""
+"Step 函式( scalar(edge), vector(x) ).\n"
+"\n"
+"若「x」小於「edge」則回傳 1.0,否則回傳 1.0。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Adds vector to vector."
-msgstr ""
+msgstr "將向量加上向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Divides vector by vector."
-msgstr ""
+msgstr "以向量除以向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Multiplies vector by vector."
-msgstr ""
+msgstr "以向量乘以向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the remainder of the two vectors."
-msgstr ""
+msgstr "回傳兩個向量相除的餘數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Subtracts vector from vector."
-msgstr ""
+msgstr "將向量減去向量。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector constant."
-msgstr ""
+msgstr "向量常數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector uniform."
-msgstr ""
+msgstr "向量均勻。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9635,12 +9160,14 @@ msgid ""
"output ports. This is a direct injection of code into the vertex/fragment/"
"light function, do not use it to write the function declarations inside."
msgstr ""
+"自定 Godot 著色器語言表示式,使用自定數量的輸入與輸出埠口。這是通過直接插向頂"
+"點/片段/光照函式插入程式碼來實現的,請勿在其中聲明函式。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"Returns falloff based on the dot product of surface normal and view "
"direction of camera (pass associated inputs to it)."
-msgstr ""
+msgstr "依據表面法線與相機檢視方向的內積來回傳下降率(將其相關輸入傳入)。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9649,90 +9176,92 @@ msgid ""
"it later in the Expressions. You can also declare varyings, uniforms and "
"constants."
msgstr ""
+"自定 Godot 著色器語言表示式,將被放入最終的著色器頂部。可以放入數個函數聲明在"
+"裡面,並於稍後在表示式中呼叫。也可以聲明 Varying、Uniform 與常數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Scalar derivative function."
-msgstr ""
+msgstr "(限片段/光照模式)純量導函數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Vector derivative function."
-msgstr ""
+msgstr "(限片段/光照模式)向量導函數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'x' using local "
"differencing."
-msgstr ""
+msgstr "(限片段/光照模式)(向量)以使用局部差分的「x」進行導數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'x' using local "
"differencing."
-msgstr ""
+msgstr "(限片段/光照模式)(純量)以使用局部差分的「x」進行導數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'y' using local "
"differencing."
-msgstr ""
+msgstr "(限片段/光照模式)(向量)以使用局部差分的「y」進行導數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'y' using local "
"differencing."
-msgstr ""
+msgstr "(限片段/光照模式)(純量)以使用局部差分的「y」進行導數。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and "
"'y'."
-msgstr ""
+msgstr "(限片段/光照模式)(向量)加總「x」與「y」進行絕對導數的結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and "
"'y'."
-msgstr ""
+msgstr "(限片段/光照模式)(純量)加總「x」與「y」進行絕對導數的結果。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "VisualShader"
-msgstr "視覺化著色器"
+msgstr "視覺著色器 (VisualShader)"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Edit Visual Property"
-msgstr "編輯可視屬性"
+msgstr "編輯視覺屬性"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Mode Changed"
-msgstr "視覺著色器模式已更改"
+msgstr "已修改視覺著色器模式"
#: editor/project_export.cpp
msgid "Runnable"
-msgstr "可運行的"
+msgstr "可執行"
#: editor/project_export.cpp
-#, fuzzy
msgid "Add initial export..."
-msgstr "添加輸入"
+msgstr "新增初始匯出..."
#: editor/project_export.cpp
msgid "Add previous patches..."
-msgstr ""
+msgstr "新增上回修正檔..."
#: editor/project_export.cpp
msgid "Delete patch '%s' from list?"
-msgstr ""
+msgstr "是否要自列表中刪除「%s」修正檔?"
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
-msgstr "是否删除預設“%s”?"
+msgstr "確定要刪除 Preset「%s」?"
#: editor/project_export.cpp
msgid ""
"Failed to export the project for platform '%s'.\n"
"Export templates seem to be missing or invalid."
msgstr ""
+"為平台「%s」匯出專案失敗。\n"
+"匯出樣板似乎已遺失或無效。"
#: editor/project_export.cpp
msgid ""
@@ -9740,40 +9269,44 @@ msgid ""
"This might be due to a configuration issue in the export preset or your "
"export settings."
msgstr ""
+"為平台「%s」匯出專案失敗。\n"
+"可能使由於匯出 Preset 或匯出設定中的組態設定有問題導致。"
#: editor/project_export.cpp
msgid "Release"
-msgstr "釋放"
+msgstr "釋出"
#: editor/project_export.cpp
msgid "Exporting All"
-msgstr "全部導出"
+msgstr "全部匯出"
#: editor/project_export.cpp
msgid "The given export path doesn't exist:"
-msgstr "給定的導出路徑不存在:"
+msgstr "給定的匯出路徑不存在:"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing/corrupted:"
-msgstr "無此平臺的導出範本:"
+msgstr "該平台的匯出範本遺失/損毀:"
#: editor/project_export.cpp
msgid "Presets"
-msgstr "預設"
+msgstr "Preset"
#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add..."
-msgstr "添加…"
+msgstr "新增…"
#: editor/project_export.cpp
msgid ""
"If checked, the preset will be available for use in one-click deploy.\n"
"Only one preset per platform may be marked as runnable."
msgstr ""
+"若選中,則 Preset 將可使用一鍵部署。\n"
+"每個平台只可將一個 Preset 設為可執行。"
#: editor/project_export.cpp
msgid "Export Path"
-msgstr "導出路徑"
+msgstr "匯出路徑"
#: editor/project_export.cpp
msgid "Resources"
@@ -9781,48 +9314,51 @@ msgstr "資源"
#: editor/project_export.cpp
msgid "Export all resources in the project"
-msgstr "導出項目中的所有資源"
+msgstr "匯出專案內所有資源"
#: editor/project_export.cpp
msgid "Export selected scenes (and dependencies)"
-msgstr "導出選定的場景 (和依賴項)"
+msgstr "匯出所選場景(與其所有相依性)"
#: editor/project_export.cpp
msgid "Export selected resources (and dependencies)"
-msgstr "導出選定的資源 (和依賴項)"
+msgstr "匯出所選資源(與其所有相依性)"
#: editor/project_export.cpp
msgid "Export Mode:"
-msgstr "導出模式:"
+msgstr "匯出模式:"
#: editor/project_export.cpp
msgid "Resources to export:"
-msgstr "要輸出的資源:"
+msgstr "匯出的資源:"
#: editor/project_export.cpp
msgid ""
"Filters to export non-resource files/folders\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
+"過濾非資源的檔案/資料夾以匯出\n"
+"(以半形逗號區分,如: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid ""
"Filters to exclude files/folders from project\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
+"過濾以在專案內排除檔案/資料夾\n"
+"(以半形逗號區分,如: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid "Patches"
-msgstr "補丁"
+msgstr "修正檔"
#: editor/project_export.cpp
msgid "Make Patch"
-msgstr "製作補丁"
+msgstr "製作修正檔"
#: editor/project_export.cpp
-#, fuzzy
msgid "Pack File"
-msgstr " 資料夾"
+msgstr "打包檔案"
#: editor/project_export.cpp
msgid "Features"
@@ -9830,25 +9366,23 @@ msgstr "功能"
#: editor/project_export.cpp
msgid "Custom (comma-separated):"
-msgstr "自訂 (逗號分隔):"
+msgstr "自訂(以逗號分隔):"
#: editor/project_export.cpp
-#, fuzzy
msgid "Feature List:"
-msgstr "功能清單:"
+msgstr "功能清單:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Script"
msgstr "腳本"
#: editor/project_export.cpp
msgid "Script Export Mode:"
-msgstr "腳本導出模式:"
+msgstr "腳本匯出模式:"
#: editor/project_export.cpp
msgid "Text"
-msgstr "文本"
+msgstr "純文字"
#: editor/project_export.cpp
msgid "Compiled"
@@ -9856,173 +9390,162 @@ msgstr "編譯"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
-msgstr "加密 (使用以下密碼)"
+msgstr "加密(使用以下密鑰)"
#: editor/project_export.cpp
msgid "Invalid Encryption Key (must be 64 characters long)"
-msgstr "不正確加密金鑰 (長度必須為64個字元)"
+msgstr "無效的加密密鑰(長度需為 64 個字元)"
#: editor/project_export.cpp
msgid "Script Encryption Key (256-bits as hex):"
-msgstr "腳本加密金鑰 (256位十六進位碼):"
+msgstr "腳本加密密鑰(256 位元的 16 進位):"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
-msgstr "導出 PCK/ZIP"
+msgstr "匯出 PCK/ZIP"
#: editor/project_export.cpp
msgid "Export Project"
-msgstr "輸出專案"
+msgstr "匯出專案"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export mode?"
-msgstr "導出模式:"
+msgstr "匯出模式?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All"
-msgstr "全部導出"
+msgstr "全部匯出"
#: editor/project_export.cpp editor/project_manager.cpp
-#, fuzzy
msgid "ZIP File"
-msgstr " 資料夾"
+msgstr "ZIP 檔案"
#: editor/project_export.cpp
msgid "Godot Game Pack"
-msgstr ""
+msgstr "Godot 遊戲包"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
-msgstr "缺少此平臺的導出範本:"
+msgstr "缺少匯出該平台用的樣板:"
#: editor/project_export.cpp
msgid "Manage Export Templates"
-msgstr "管理輸出模板"
+msgstr "管理匯出樣板"
#: editor/project_export.cpp
msgid "Export With Debug"
-msgstr "導出為調試"
+msgstr "以偵錯模式匯出"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "路徑不存在."
+msgstr "指定的路徑不存在。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "開啟套件檔案出錯,非 zip 格式。"
+msgstr "開啟套件檔案時發生錯誤(非 ZIP 格式)。"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr "“.zip”項目檔案無效,不包含“project.godot”檔案。"
+msgstr "無效的「.zip」專案檔;未包含「project.godot」檔案。"
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "請選擇一個空資料夾。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "請選擇“project.godot”或“.zip”檔案。"
+msgstr "請選擇一個「project.godot」或「.zip」檔案。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "目錄已包含一個godot項目。"
+msgstr "該目錄已經包含了一個 Godot 專案。"
#: editor/project_manager.cpp
msgid "New Game Project"
-msgstr "新遊戲項目"
+msgstr "新遊戲專案"
#: editor/project_manager.cpp
msgid "Imported Project"
-msgstr "已導入的項目"
+msgstr "已匯入的項目"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid Project Name."
-msgstr "項目名稱無效。"
+msgstr "無效的專案名。"
#: editor/project_manager.cpp
msgid "Couldn't create folder."
-msgstr "無法新增資料夾."
+msgstr "無法建立資料夾。"
#: editor/project_manager.cpp
msgid "There is already a folder in this path with the specified name."
-msgstr "此路徑中已存在具有指定名稱的資料夾。"
+msgstr "該路徑下已有相同名稱的資料夾。"
#: editor/project_manager.cpp
msgid "It would be a good idea to name your project."
-msgstr "給你的項目命名是個好主意。"
+msgstr "最好幫你的專案起個名字。"
#: editor/project_manager.cpp
msgid "Invalid project path (changed anything?)."
-msgstr "不正確項目路徑 (更改了任何內容?)。"
+msgstr "不正確的專案路徑(有修改了什麼嗎?)。"
#: editor/project_manager.cpp
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "無法在項目路徑中加載project.godot(錯誤%d)。它可能遺失或損壞。"
+msgstr "無法自專案路徑內載入 project.godot(錯誤 %d)。檔案可能遺失或損毀。"
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
-msgstr "無法在項目路徑中編輯project.godot。"
+msgstr "無法在專案路徑中編輯 project.godot。"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
-msgstr "無法在項目路徑中創建project.godot。"
+msgstr "無法在項目路徑中建立 project.godot。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Rename Project"
-msgstr "重命名項目"
+msgstr "重新命名項目"
#: editor/project_manager.cpp
msgid "Import Existing Project"
-msgstr "導入現有項目"
+msgstr "匯入現有專案"
#: editor/project_manager.cpp
msgid "Import & Edit"
-msgstr "導入與編輯"
+msgstr "匯入並編輯"
#: editor/project_manager.cpp
msgid "Create New Project"
-msgstr "創建新項目"
+msgstr "建立新專案"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create & Edit"
-msgstr "創建和編輯"
+msgstr "建立並編輯"
#: editor/project_manager.cpp
msgid "Install Project:"
-msgstr "安裝項目:"
+msgstr "安裝專案:"
#: editor/project_manager.cpp
msgid "Install & Edit"
-msgstr "安裝和編輯"
+msgstr "安裝並編輯"
#: editor/project_manager.cpp
msgid "Project Name:"
-msgstr "項目名稱:"
+msgstr "專案名稱:"
#: editor/project_manager.cpp
msgid "Project Path:"
-msgstr "項目路徑:"
+msgstr "專案路徑:"
#: editor/project_manager.cpp
msgid "Project Installation Path:"
-msgstr "項目安裝路徑:"
+msgstr "專案安裝路徑:"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr "渲染器:"
+msgstr "算圖器:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
@@ -10035,6 +9558,10 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"更好的視覺品質\n"
+"所有功能可用\n"
+"與舊硬體不相容\n"
+"不推薦用於網頁遊戲"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
@@ -10047,34 +9574,36 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"較低的視覺品質\n"
+"有些功能不可用\n"
+"在大多數硬體上可用\n"
+"推薦用於網頁遊戲"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
-msgstr "渲染器可以然後更改, 但場景可能需要調整。"
+msgstr "稍後仍可更改算圖器,但可能需要對場景進行調整。"
#: editor/project_manager.cpp
msgid "Unnamed Project"
-msgstr "未命名項目"
+msgstr "未命名專案"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Missing Project"
-msgstr "導入現有項目"
+msgstr "遺失專案"
#: editor/project_manager.cpp
msgid "Error: Project is missing on the filesystem."
-msgstr ""
+msgstr "錯誤:專案在檔案系統上遺失。"
#: editor/project_manager.cpp
msgid "Can't open project at '%s'."
-msgstr "無法打開位於'%s'的項目。"
+msgstr "無法在「%s」中打開專案。"
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
-msgstr "您確定要打開多個項目嗎?"
+msgstr "確定要打開多個專案嗎?"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"The following project settings file does not specify the version of Godot "
"through which it was created.\n"
@@ -10086,15 +9615,14 @@ msgid ""
"Warning: You won't be able to open the project with previous versions of the "
"engine anymore."
msgstr ""
-"以下項目設定檔案未指定通過其創建的Godot的版本。\n"
+"下列專案設定檔未指定建立其之 Godot 版本。\n"
"\n"
"%s\n"
"\n"
-"如果繼續打開它, 它將被轉換為 Godot 的當前配置檔案格式。 \n"
-"警告: 您將無法再使用以前版本的引擎打開項目。"
+"若您繼續開啟,會將其轉換為目前 Godot 版本的組態設定檔案格式。\n"
+"警告:您將不再可使用過往版本的引擎開啟該專案。"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
@@ -10105,18 +9633,18 @@ msgid ""
"Warning: You won't be able to open the project with previous versions of the "
"engine anymore."
msgstr ""
-"以下項目設置檔案是由較舊的引擎版本生成的, 需要為此版本進行轉換:\n"
+"下列專案設定檔時由較舊版本的引擎所產生,且需要將其轉換為目前的版本:\n"
"\n"
"%s\n"
"\n"
-"是否要將其轉換?\n"
-"警告: 您將無法再使用以前版本的引擎打開專案。"
+"要進行轉換嗎?\n"
+"警告:您將不再可使用過往版本的引擎開啟該專案。"
#: editor/project_manager.cpp
msgid ""
"The project settings were created by a newer engine version, whose settings "
"are not compatible with this version."
-msgstr "此項目設置是由較新的引擎版本創建的, 其設置與此版本不相容。"
+msgstr "該專案設定是由新版本的引擎所建立,其設定無法相容於這個版本。"
#: editor/project_manager.cpp
msgid ""
@@ -10124,57 +9652,66 @@ msgid ""
"Please edit the project and set the main scene in the Project Settings under "
"the \"Application\" category."
msgstr ""
+"無法執行專案:未定義主場景。\n"
+"請編輯專案並在「應用程式」分類中的專案設定內設定主場景。"
#: editor/project_manager.cpp
msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
+"無法執行專案:需要匯入素材\n"
+"請編輯專案以觸發初始匯入。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Are you sure to run %d projects at once?"
-msgstr "您確定要運行多個項目嗎?"
+msgstr "確定要一次執行 %d 個專案?"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Remove %d projects from the list?\n"
"The project folders' contents won't be modified."
-msgstr "是否從清單中删除項目?(資料夾內容將不被修改)"
+msgstr ""
+"確定要自清單中移除 %d 個專案嗎?\n"
+"專案資料夾的內容不會被修改。"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Remove this project from the list?\n"
"The project folder's contents won't be modified."
-msgstr "是否從清單中删除項目?(資料夾內容將不被修改)"
+msgstr ""
+"確定要自列表移除該專案嗎?\n"
+"專案資料夾的內容不會被修改。"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Remove all missing projects from the list?\n"
"The project folders' contents won't be modified."
-msgstr "是否從清單中删除項目?(資料夾內容將不被修改)"
+msgstr ""
+"確定自清單移除所有遺失的專案嗎?\n"
+"專案資料夾的內容不會被修改。"
#: editor/project_manager.cpp
msgid ""
"Language changed.\n"
"The interface will update after restarting the editor or project manager."
msgstr ""
+"語言已更改。\n"
+"界面將會在重新啟動編輯器或專案管理員後更新。"
#: editor/project_manager.cpp
msgid ""
"Are you sure to scan %s folders for existing Godot projects?\n"
"This could take a while."
msgstr ""
+"確定要為現存的 Godot 專案掃描 %s 資料夾嗎?\n"
+"這可能需要一段時間。"
#: editor/project_manager.cpp
msgid "Project Manager"
-msgstr ""
+msgstr "專案管理員"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Projects"
msgstr "專案"
@@ -10188,35 +9725,35 @@ msgstr "掃描"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
-msgstr "選擇一個資料夾來掃描"
+msgstr "選擇資料夾以進行掃描"
#: editor/project_manager.cpp
msgid "New Project"
-msgstr ""
+msgstr "新增專案"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Missing"
-msgstr "刪除點"
+msgstr "刪除遺失"
#: editor/project_manager.cpp
msgid "Templates"
-msgstr "模板"
+msgstr "樣板"
#: editor/project_manager.cpp
msgid "Restart Now"
-msgstr ""
+msgstr "立即重新啟動"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't run project"
-msgstr "連接..."
+msgstr "無法執行專案"
#: editor/project_manager.cpp
msgid ""
"You currently don't have any projects.\n"
"Would you like to explore official example projects in the Asset Library?"
msgstr ""
+"目前沒有任何專案。\n"
+"要在素材庫中瀏覽官方範例專案嗎?"
#: editor/project_manager.cpp
msgid ""
@@ -10224,237 +9761,232 @@ msgid ""
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
+"搜尋框可以用來依據名稱與路徑中的最後一部分來過濾專案。\n"
+"若要以名稱與完整路徑來過濾專案,搜尋內容應該至少包含一個「/」字元。"
#: editor/project_settings_editor.cpp
msgid "Key "
-msgstr ""
+msgstr "鍵 "
#: editor/project_settings_editor.cpp
msgid "Joy Button"
-msgstr ""
+msgstr "控制器按鈕"
#: editor/project_settings_editor.cpp
msgid "Joy Axis"
-msgstr ""
+msgstr "控制器類比軸"
#: editor/project_settings_editor.cpp
msgid "Mouse Button"
-msgstr ""
+msgstr "滑鼠按鈕"
#: editor/project_settings_editor.cpp
msgid ""
"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'"
-msgstr ""
+msgstr "無效的操作名稱。不能為空或包含「/」、「:」、「=」、「\\」或「\"」"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "An action with the name '%s' already exists."
-msgstr "Autoload「%s」已經存在!"
+msgstr "已有名稱「%s」的操作。"
#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
-msgstr ""
+msgstr "重新命名輸入操作事件"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Change Action deadzone"
-msgstr "改變字典 value"
+msgstr "修改操作盲區"
#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
-msgstr ""
+msgstr "新增輸入操作事件"
#: editor/project_settings_editor.cpp
msgid "All Devices"
-msgstr ""
+msgstr "所有裝置"
#: editor/project_settings_editor.cpp
msgid "Device"
-msgstr ""
+msgstr "裝置"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key..."
-msgstr ""
+msgstr "請按下按鍵..."
#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
-msgstr ""
+msgstr "滑鼠按鍵索引:"
#: editor/project_settings_editor.cpp
msgid "Left Button"
-msgstr ""
+msgstr "左鍵"
#: editor/project_settings_editor.cpp
msgid "Right Button"
-msgstr ""
+msgstr "右鍵"
#: editor/project_settings_editor.cpp
msgid "Middle Button"
-msgstr ""
+msgstr "中鍵"
#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
-msgstr ""
+msgstr "滾輪向上按鍵"
#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
-msgstr ""
+msgstr "滾輪向下按鍵"
#: editor/project_settings_editor.cpp
msgid "Wheel Left Button"
-msgstr ""
+msgstr "滾輪向左按鍵"
#: editor/project_settings_editor.cpp
msgid "Wheel Right Button"
-msgstr ""
+msgstr "滾輪向右按鍵"
#: editor/project_settings_editor.cpp
msgid "X Button 1"
-msgstr ""
+msgstr "X 按鍵 1"
#: editor/project_settings_editor.cpp
msgid "X Button 2"
-msgstr ""
+msgstr "X 按鍵 2"
#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
-msgstr ""
+msgstr "控制器類比搖桿索引:"
#: editor/project_settings_editor.cpp
msgid "Axis"
-msgstr ""
+msgstr "類比軸"
#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
-msgstr ""
+msgstr "控制器按鈕索引:"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Erase Input Action"
-msgstr "所有的選擇"
+msgstr "清除輸入操作"
#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
-msgstr ""
+msgstr "清除輸入操作事件"
#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr ""
+msgstr "新增事件"
#: editor/project_settings_editor.cpp
msgid "Button"
-msgstr ""
+msgstr "Button(按鈕)"
#: editor/project_settings_editor.cpp
msgid "Left Button."
-msgstr ""
+msgstr "左鍵。"
#: editor/project_settings_editor.cpp
msgid "Right Button."
-msgstr ""
+msgstr "右鍵。"
#: editor/project_settings_editor.cpp
msgid "Middle Button."
-msgstr ""
+msgstr "中鍵。"
#: editor/project_settings_editor.cpp
msgid "Wheel Up."
-msgstr ""
+msgstr "滾輪向上。"
#: editor/project_settings_editor.cpp
msgid "Wheel Down."
-msgstr ""
+msgstr "滾輪向下。"
#: editor/project_settings_editor.cpp
msgid "Add Global Property"
-msgstr ""
+msgstr "新增全域屬性"
#: editor/project_settings_editor.cpp
msgid "Select a setting item first!"
-msgstr ""
+msgstr "請先選擇一個設定項目!"
#: editor/project_settings_editor.cpp
msgid "No property '%s' exists."
-msgstr ""
+msgstr "屬性「%s」不存在。"
#: editor/project_settings_editor.cpp
msgid "Setting '%s' is internal, and it can't be deleted."
-msgstr ""
+msgstr "「%s」為內部設定,無法刪除。"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Delete Item"
-msgstr "刪除"
+msgstr "刪除項目"
#: editor/project_settings_editor.cpp
msgid ""
"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'."
-msgstr ""
+msgstr "無效的操作名稱。不能為空或包含「/」、「:」、「=」、「\\」或「\"」。"
#: editor/project_settings_editor.cpp
msgid "Add Input Action"
-msgstr ""
+msgstr "新增輸入操作"
#: editor/project_settings_editor.cpp
msgid "Error saving settings."
-msgstr ""
+msgstr "保存設定時發生錯誤。"
#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
-msgstr ""
+msgstr "設定保存成功。"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Moved Input Action Event"
-msgstr "所有的選擇"
+msgstr "移動輸入操作事件"
#: editor/project_settings_editor.cpp
msgid "Override for Feature"
-msgstr ""
+msgstr "複寫功能"
#: editor/project_settings_editor.cpp
msgid "Add Translation"
-msgstr ""
+msgstr "新增翻譯"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
-msgstr ""
+msgstr "移除翻譯"
#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
-msgstr ""
+msgstr "新增重映射路徑"
#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
-msgstr ""
+msgstr "資源重映射新增重映射"
#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
-msgstr ""
+msgstr "更改資源重映射語言"
#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
-msgstr ""
+msgstr "移除資源重映射"
#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
-msgstr ""
+msgstr "移除資源重映射選項"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Changed Locale Filter"
-msgstr "變更鏡頭尺寸"
+msgstr "更改區域過濾"
#: editor/project_settings_editor.cpp
msgid "Changed Locale Filter Mode"
-msgstr ""
+msgstr "更改區域過濾模式"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Project Settings (project.godot)"
-msgstr "專案設定"
+msgstr "專案設定 (project.godot)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
@@ -10462,929 +9994,893 @@ msgstr "一般"
#: editor/project_settings_editor.cpp
msgid "Override For..."
-msgstr ""
+msgstr "複寫..."
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "The editor must be restarted for changes to take effect."
-msgstr ""
+msgstr "必須重新啟動編輯器才會使改動生效。"
#: editor/project_settings_editor.cpp
msgid "Input Map"
-msgstr ""
+msgstr "輸入映射"
#: editor/project_settings_editor.cpp
msgid "Action:"
-msgstr ""
+msgstr "操作:"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Action"
-msgstr "所有的選擇"
+msgstr "操作"
#: editor/project_settings_editor.cpp
msgid "Deadzone"
-msgstr ""
+msgstr "盲區"
#: editor/project_settings_editor.cpp
msgid "Device:"
-msgstr ""
+msgstr "設備:"
#: editor/project_settings_editor.cpp
msgid "Index:"
-msgstr ""
+msgstr "索引:"
#: editor/project_settings_editor.cpp
msgid "Localization"
-msgstr ""
+msgstr "本地化"
#: editor/project_settings_editor.cpp
msgid "Translations"
-msgstr ""
+msgstr "翻譯"
#: editor/project_settings_editor.cpp
msgid "Translations:"
-msgstr ""
+msgstr "翻譯:"
#: editor/project_settings_editor.cpp
msgid "Remaps"
-msgstr ""
+msgstr "重映射"
#: editor/project_settings_editor.cpp
msgid "Resources:"
-msgstr ""
+msgstr "資源:"
#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
-msgstr ""
+msgstr "依語言重映射:"
#: editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "語言"
#: editor/project_settings_editor.cpp
msgid "Locales Filter"
-msgstr ""
+msgstr "語言過濾"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Show All Locales"
-msgstr "顯示骨骼"
+msgstr "顯示所有語言"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Show Selected Locales Only"
-msgstr "僅選擇區域"
+msgstr "僅顯示選定的語言"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Filter mode:"
-msgstr "過濾檔案..."
+msgstr "過濾模式:"
#: editor/project_settings_editor.cpp
msgid "Locales:"
-msgstr ""
+msgstr "語言:"
#: editor/project_settings_editor.cpp
msgid "AutoLoad"
-msgstr ""
+msgstr "Autoload"
#: editor/project_settings_editor.cpp
msgid "Plugins"
-msgstr "挿件"
+msgstr "外掛"
#: editor/property_editor.cpp
msgid "Preset..."
-msgstr "預設。。。"
+msgstr "Preset..."
#: editor/property_editor.cpp
msgid "Zero"
-msgstr ""
+msgstr "無"
#: editor/property_editor.cpp
msgid "Easing In-Out"
-msgstr ""
+msgstr "緩入緩出"
#: editor/property_editor.cpp
msgid "Easing Out-In"
-msgstr ""
+msgstr "緩入緩出(反向)"
#: editor/property_editor.cpp
msgid "File..."
-msgstr ""
+msgstr "檔案..."
#: editor/property_editor.cpp
msgid "Dir..."
-msgstr ""
+msgstr "資料夾..."
#: editor/property_editor.cpp
msgid "Assign"
-msgstr ""
+msgstr "指派"
#: editor/property_editor.cpp
msgid "Select Node"
-msgstr ""
+msgstr "選擇節點"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
-msgstr ""
+msgstr "載入檔案時發生錯誤:非資源!"
#: editor/property_editor.cpp
msgid "Pick a Node"
-msgstr ""
+msgstr "選擇一個節點"
#: editor/property_editor.cpp
msgid "Bit %d, val %d."
-msgstr ""
+msgstr "位元 %d,值 %d。"
#: editor/property_selector.cpp
msgid "Select Property"
-msgstr ""
+msgstr "選擇屬性"
#: editor/property_selector.cpp
msgid "Select Virtual Method"
-msgstr ""
+msgstr "選擇虛擬方法"
#: editor/property_selector.cpp
msgid "Select Method"
-msgstr ""
+msgstr "選擇方法"
#: editor/rename_dialog.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Batch Rename"
-msgstr "符合大小寫"
+msgstr "批次重新命名"
#: editor/rename_dialog.cpp
msgid "Prefix"
-msgstr ""
+msgstr "前置"
#: editor/rename_dialog.cpp
msgid "Suffix"
-msgstr ""
+msgstr "後置"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "設置磁貼區域"
+msgstr "使用正規表示式"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Advanced Options"
-msgstr "吸附選項"
+msgstr "進階選項"
#: editor/rename_dialog.cpp
msgid "Substitute"
-msgstr ""
+msgstr "取代"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Node name"
-msgstr "節點名稱:"
+msgstr "節點名稱"
#: editor/rename_dialog.cpp
msgid "Node's parent name, if available"
-msgstr ""
+msgstr "節點的母級節點名(若有的話)"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Node type"
-msgstr "節點名稱:"
+msgstr "節點型別"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Current scene name"
-msgstr "目前的場景尚未存檔, 依然要開啟嗎?"
+msgstr "目前場景名稱"
#: editor/rename_dialog.cpp
msgid "Root node name"
-msgstr ""
+msgstr "根節點名稱"
#: editor/rename_dialog.cpp
msgid ""
"Sequential integer counter.\n"
"Compare counter options."
msgstr ""
+"序列整數計數器。\n"
+"比較計數器選項。"
#: editor/rename_dialog.cpp
msgid "Per-level Counter"
-msgstr ""
+msgstr "各級別分別計數器"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
-msgstr ""
+msgstr "若啟用則計數器將依據每組子節點重新啟動"
#: editor/rename_dialog.cpp
msgid "Initial value for the counter"
-msgstr ""
+msgstr "計數器起始值"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Step"
-msgstr "步驟 :"
+msgstr "步長"
#: editor/rename_dialog.cpp
msgid "Amount by which counter is incremented for each node"
-msgstr ""
+msgstr "各節點的計數器的增加量"
#: editor/rename_dialog.cpp
msgid "Padding"
-msgstr ""
+msgstr "填充"
#: editor/rename_dialog.cpp
msgid ""
"Minimum number of digits for the counter.\n"
"Missing digits are padded with leading zeros."
msgstr ""
+"計數器的最小位數。\n"
+"缺少的位數會以前置 0 填充。"
#: editor/rename_dialog.cpp
msgid "Post-Process"
-msgstr ""
+msgstr "後處理"
#: editor/rename_dialog.cpp
msgid "Keep"
-msgstr ""
+msgstr "保持"
#: editor/rename_dialog.cpp
msgid "PascalCase to snake_case"
-msgstr ""
+msgstr "將大駝峰法 (PascalCase) 轉為底線 (snake_case)"
#: editor/rename_dialog.cpp
msgid "snake_case to PascalCase"
-msgstr ""
+msgstr "將底線 (snake_case) 轉為駝峰法 (PascalCase)"
#: editor/rename_dialog.cpp
msgid "Case"
-msgstr ""
+msgstr "大小寫"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "To Lowercase"
-msgstr "轉換成..."
+msgstr "轉為小寫"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "To Uppercase"
-msgstr "轉換成..."
+msgstr "轉為大寫"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Reset"
-msgstr "重設縮放大小"
+msgstr "重設"
#: editor/rename_dialog.cpp
msgid "Regular Expression Error"
-msgstr ""
+msgstr "正規表示式錯誤"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "合法字元:"
+msgstr "位於字元 %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
-msgstr ""
+msgstr "重設母節點"
#: editor/reparent_dialog.cpp
msgid "Reparent Location (Select new Parent):"
-msgstr ""
+msgstr "重設母位置(選擇新的母節點):"
#: editor/reparent_dialog.cpp
msgid "Keep Global Transform"
-msgstr ""
+msgstr "保持全域變換"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent"
-msgstr ""
+msgstr "重設母節點"
#: editor/run_settings_dialog.cpp
msgid "Run Mode:"
-msgstr ""
+msgstr "執行模式:"
#: editor/run_settings_dialog.cpp
msgid "Current Scene"
-msgstr ""
+msgstr "目前場景"
#: editor/run_settings_dialog.cpp
msgid "Main Scene"
-msgstr ""
+msgstr "主場景"
#: editor/run_settings_dialog.cpp
msgid "Main Scene Arguments:"
-msgstr ""
+msgstr "主場景引數:"
#: editor/run_settings_dialog.cpp
msgid "Scene Run Settings"
-msgstr ""
+msgstr "場景執行設定"
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
-msgstr ""
+msgstr "無可實體化場景的母節點。"
#: editor/scene_tree_dock.cpp
msgid "Error loading scene from %s"
-msgstr ""
+msgstr "自 %s 中載入場景時發生錯誤"
#: editor/scene_tree_dock.cpp
msgid ""
"Cannot instance the scene '%s' because the current scene exists within one "
"of its nodes."
-msgstr ""
+msgstr "無法實體化場景「%s」,由於其已存在於其一子節點中。"
#: editor/scene_tree_dock.cpp
msgid "Instance Scene(s)"
-msgstr ""
+msgstr "實體化場景"
#: editor/scene_tree_dock.cpp
msgid "Replace with Branch Scene"
-msgstr ""
+msgstr "取代分支場景"
#: editor/scene_tree_dock.cpp
msgid "Instance Child Scene"
-msgstr ""
+msgstr "實體化子場景"
#: editor/scene_tree_dock.cpp
-msgid "Clear Script"
-msgstr ""
+msgid "Detach Script"
+msgstr "取消附加腳本"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
-msgstr ""
+msgstr "此操作無法在樹狀根執行。"
#: editor/scene_tree_dock.cpp
msgid "Move Node In Parent"
-msgstr ""
+msgstr "移動節點至其母節點"
#: editor/scene_tree_dock.cpp
msgid "Move Nodes In Parent"
-msgstr ""
+msgstr "移動節點至母節點"
#: editor/scene_tree_dock.cpp
msgid "Duplicate Node(s)"
-msgstr ""
+msgstr "重複節點"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
-msgstr ""
+msgstr "無法重新設定繼承場景節點的母節點,節點的順序無法更改。"
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
-msgstr ""
+msgstr "節點必須屬於已編輯的場景才能轉為根節點。"
#: editor/scene_tree_dock.cpp
msgid "Instantiated scenes can't become root"
-msgstr ""
+msgstr "實體化的場景無法轉為根節點"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Make node as Root"
-msgstr "儲存場景"
+msgstr "將節點設為根節點"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete %d nodes?"
-msgstr "刪除"
+msgstr "刪除 %d 個節點?"
#: editor/scene_tree_dock.cpp
msgid "Delete the root node \"%s\"?"
-msgstr ""
+msgstr "確定要刪除根節點「%s」嗎?"
#: editor/scene_tree_dock.cpp
msgid "Delete node \"%s\" and its children?"
-msgstr ""
+msgstr "確定要刪除節點「%s」與其子節點嗎?"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete node \"%s\"?"
-msgstr "刪除"
+msgstr "確定要刪除節點「%s」嗎?"
#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
-msgstr ""
+msgstr "無法在根節點執行此操作。"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on instanced scenes."
-msgstr ""
+msgstr "該操作無法在已實體化場景中執行。"
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
-msgstr ""
+msgstr "另存新場景為..."
#: editor/scene_tree_dock.cpp
msgid ""
"Disabling \"editable_instance\" will cause all properties of the node to be "
"reverted to their default."
-msgstr ""
+msgstr "禁用「editable_instance」將導致節點的所有屬性都被還原為其預設值。"
#: editor/scene_tree_dock.cpp
msgid ""
"Enabling \"Load As Placeholder\" will disable \"Editable Children\" and "
"cause all properties of the node to be reverted to their default."
msgstr ""
+"啟用「載入為佔位」將禁用「可編輯子節點」並導致其所有節點都被還原為其預設值。"
#: editor/scene_tree_dock.cpp
msgid "Make Local"
-msgstr ""
+msgstr "轉為本地"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "New Scene Root"
-msgstr "儲存場景"
+msgstr "新場景根"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Create Root Node:"
-msgstr "新增資料夾"
+msgstr "建立根節點:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "2D Scene"
-msgstr "場景"
+msgstr "2D 場景"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "3D Scene"
-msgstr "場景"
+msgstr "3D 場景"
#: editor/scene_tree_dock.cpp
msgid "User Interface"
-msgstr ""
+msgstr "使用者界面"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Other Node"
-msgstr "刪除"
+msgstr "其他節點"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr ""
+msgstr "無法對外部場景的節點進行操作!"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes the current scene inherits from!"
-msgstr ""
+msgstr "無法對目前場景繼承來源的節點進行操作!"
#: editor/scene_tree_dock.cpp
msgid "Attach Script"
-msgstr ""
+msgstr "附加腳本"
#: editor/scene_tree_dock.cpp
msgid "Remove Node(s)"
-msgstr ""
+msgstr "移除節點"
#: editor/scene_tree_dock.cpp
msgid "Change type of node(s)"
-msgstr ""
+msgstr "更改節點的型別"
#: editor/scene_tree_dock.cpp
msgid ""
"Couldn't save new scene. Likely dependencies (instances) couldn't be "
"satisfied."
-msgstr ""
+msgstr "無法保存新場景。很可能由於無法滿足其依賴性(實體)。"
#: editor/scene_tree_dock.cpp
msgid "Error saving scene."
-msgstr ""
+msgstr "保存場景時發生錯誤。"
#: editor/scene_tree_dock.cpp
msgid "Error duplicating scene to save it."
-msgstr ""
+msgstr "複製場景以進行保存時發生錯誤。"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources"
-msgstr "複製資源"
+msgstr "子資源"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
-msgstr ""
+msgstr "清除繼承"
#: editor/scene_tree_dock.cpp
msgid "Editable Children"
-msgstr ""
+msgstr "可編輯子節點"
#: editor/scene_tree_dock.cpp
msgid "Load As Placeholder"
-msgstr ""
+msgstr "載入為佔位"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Open Documentation"
-msgstr "開啟最近存取"
+msgstr "開啟說明文件"
#: editor/scene_tree_dock.cpp
-msgid "Add Child Node"
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
msgstr ""
+"無法附加腳本:未註冊任何語言。\n"
+"有可能是由於編輯器在建構時未啟用任何語言模組。"
+
+#: editor/scene_tree_dock.cpp
+msgid "Add Child Node"
+msgstr "新增子節點"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Expand/Collapse All"
-msgstr "取代全部"
+msgstr "展開/收合全部"
#: editor/scene_tree_dock.cpp
msgid "Change Type"
-msgstr ""
+msgstr "更改型別"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Reparent to New Node"
-msgstr "新增 %s"
+msgstr "重新設定母節點為新節點"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Make Scene Root"
-msgstr "儲存場景"
+msgstr "設為場景根節點"
#: editor/scene_tree_dock.cpp
msgid "Merge From Scene"
-msgstr ""
+msgstr "合併自場景"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
msgid "Save Branch as Scene"
-msgstr ""
+msgstr "保存分支為場景"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
msgid "Copy Node Path"
-msgstr ""
+msgstr "複製節點路徑"
#: editor/scene_tree_dock.cpp
msgid "Delete (No Confirm)"
-msgstr ""
+msgstr "刪除(無確認)"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Add/Create a New Node."
-msgstr "新增 %s"
+msgstr "新增/建立新節點。"
#: editor/scene_tree_dock.cpp
msgid ""
"Instance a scene file as a Node. Creates an inherited scene if no root node "
"exists."
-msgstr ""
+msgstr "將場景檔案實體化為節點。若無根節點則建立一個繼承場景。"
#: editor/scene_tree_dock.cpp
-msgid "Attach a new or existing script for the selected node."
-msgstr ""
+msgid "Attach a new or existing script to the selected node."
+msgstr "附加新的或已存在之腳本至所選節點。"
#: editor/scene_tree_dock.cpp
-msgid "Clear a script for the selected node."
-msgstr ""
+msgid "Detach the script from the selected node."
+msgstr "自所選節點取消附加腳本。"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Remote"
-msgstr "移除"
+msgstr "遠端"
#: editor/scene_tree_dock.cpp
msgid "Local"
-msgstr ""
+msgstr "本機"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
+msgstr "確定要清除繼承嗎?(無法復原!)"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visible"
-msgstr "切換顯示隱藏檔案"
+msgstr "切換可見/隱藏"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Unlock Node"
-msgstr "單項節點"
+msgstr "解鎖節點"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Button Group"
-msgstr "添加到組"
+msgstr "按鍵分組"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "(Connecting From)"
-msgstr "連接..."
+msgstr "(連接自)"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "節點組態設定警告:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has %s connection(s) and %s group(s).\n"
"Click to show signals dock."
msgstr ""
+"節點有 %s 連接與 %s 分組。\n"
+"點擊以顯示訊號 Dock。"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has %s connection(s).\n"
"Click to show signals dock."
msgstr ""
+"節點有 %s 連接。\n"
+"點擊以顯示訊號 Dock。"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in %s group(s).\n"
"Click to show groups dock."
msgstr ""
+"節點位於 %s 個群組中。\n"
+"點擊以顯示群組 Dock。"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open Script:"
-msgstr "開啟最近存取"
+msgstr "開啟腳本:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock it."
msgstr ""
+"節點已鎖定。\n"
+"點擊以解鎖。"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable."
msgstr ""
+"子節點不可選擇。\n"
+"點擊以令其可被選擇。"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visibility"
-msgstr ""
+msgstr "切換可見/隱藏"
#: editor/scene_tree_editor.cpp
msgid ""
"AnimationPlayer is pinned.\n"
"Click to unpin."
msgstr ""
+"已固定動畫播放器 (AnimationPlayer)。\n"
+"點擊以取消固定。"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
-msgstr ""
+msgstr "無效的節點名稱,名稱不可包含下列字元:"
#: editor/scene_tree_editor.cpp
msgid "Rename Node"
-msgstr ""
+msgstr "重新命名節點"
#: editor/scene_tree_editor.cpp
msgid "Scene Tree (Nodes):"
-msgstr "場景樹 (節點):"
+msgstr "場景樹(節點):"
#: editor/scene_tree_editor.cpp
msgid "Node Configuration Warning!"
-msgstr ""
+msgstr "節點組態設定警告!"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
-msgstr ""
+msgstr "選擇一個節點"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Path is empty."
-msgstr "網格是空的!"
+msgstr "路徑為空。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Filename is empty."
-msgstr "Sprite 是空的!"
+msgstr "檔案名稱為空。"
#: editor/script_create_dialog.cpp
msgid "Path is not local."
-msgstr ""
+msgstr "路徑不在本機。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid base path."
-msgstr "無效的路徑."
+msgstr "無效的基礎路徑。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "A directory with the same name exists."
-msgstr "具有此名稱的檔或資料夾已存在。"
+msgstr "已有資料夾具有相同名稱。"
+
+#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "檔案不存在。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid extension."
-msgstr "必須使用有效的副檔名。"
+msgstr "無效的副檔名。"
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen."
-msgstr ""
+msgstr "選擇了錯誤的副檔名。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Error loading template '%s'"
-msgstr "載入場景時發生錯誤"
+msgstr "載入樣板「%s」時發生錯誤"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Error - Could not create script in filesystem."
-msgstr "無法新增資料夾"
+msgstr "錯誤 - 無法在檔案系統中建立腳本。"
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
-msgstr ""
+msgstr "自 %s 載入腳本時發生錯誤"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Overrides"
-msgstr "覆蓋"
+msgstr "複寫"
#: editor/script_create_dialog.cpp
msgid "N/A"
-msgstr ""
+msgstr "N/A"
#: editor/script_create_dialog.cpp
msgid "Open Script / Choose Location"
-msgstr ""
+msgstr "開啟腳本/選擇位置"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Open Script"
-msgstr "開啟最近存取"
+msgstr "開啟腳本"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "File exists, it will be reused."
-msgstr "檔案已經存在, 要覆寫嗎?"
+msgstr "檔案已存在,將被重複使用。"
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "無效的路徑。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid class name."
-msgstr "不能使用的名稱。"
+msgstr "無效的類型名稱。"
#: editor/script_create_dialog.cpp
msgid "Invalid inherited parent name or path."
-msgstr ""
+msgstr "繼承母的名稱或路徑無效。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "動畫樹有效。"
+msgstr "可用的腳本路徑/名稱。"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
-msgstr ""
+msgstr "可使用:a-z、A-Z、0-9、_ 以及 ."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in script (into scene file)."
-msgstr "操作場景文件。"
+msgstr "內建腳本(到場景檔案中)。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Will create a new script file."
-msgstr "創建新矩形。"
+msgstr "將建立一個新的腳本檔案。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Will load an existing script file."
-msgstr "讀取現存的 Bus 配置。"
+msgstr "將讀取一個現存的腳本檔案。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script file already exists."
-msgstr "Autoload「%s」已經存在!"
+msgstr "腳本檔案已存在。"
#: editor/script_create_dialog.cpp
msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
-msgstr ""
+msgstr "注意:內置腳本有些限制,且無法使用外部編輯器來編輯。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name:"
-msgstr "Class:"
+msgstr "類別名稱:"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template:"
-msgstr "移除範本"
+msgstr "樣板:"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script:"
-msgstr "開啟最近存取"
+msgstr "內建腳本:"
#: editor/script_create_dialog.cpp
msgid "Attach Node Script"
-msgstr ""
+msgstr "附加節點腳本"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Remote "
-msgstr "移除"
+msgstr "遠端 "
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
-msgstr ""
+msgstr "位元組:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Warning:"
-msgstr "警告"
+msgstr "警告:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Error:"
-msgstr "錯誤!"
+msgstr "錯誤:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "C++ Error"
-msgstr "連接..."
+msgstr "C++ 錯誤"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "C++ Error:"
-msgstr "連接..."
+msgstr "C++ 錯誤:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "C++ Source"
-msgstr "資源"
+msgstr "C++ 原始檔"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Source:"
-msgstr "資源"
+msgstr "原始檔:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "C++ Source:"
-msgstr "資源"
+msgstr "C++ 原始檔:"
#: editor/script_editor_debugger.cpp
msgid "Stack Trace"
-msgstr ""
+msgstr "堆疊回溯"
#: editor/script_editor_debugger.cpp
msgid "Errors"
-msgstr ""
+msgstr "錯誤"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Child process connected."
-msgstr "斷線"
+msgstr "已連線至子處理程序。"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Copy Error"
-msgstr "連接..."
+msgstr "複製錯誤"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "影片記憶體"
+msgstr "視訊記憶體"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Skip Breakpoints"
-msgstr "刪除"
+msgstr "跳過中斷點"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
-msgstr ""
+msgstr "偵查前一個實體"
#: editor/script_editor_debugger.cpp
msgid "Inspect Next Instance"
-msgstr ""
+msgstr "偵查下一個實體"
#: editor/script_editor_debugger.cpp
msgid "Stack Frames"
-msgstr ""
+msgstr "堆疊框"
#: editor/script_editor_debugger.cpp
msgid "Profiler"
-msgstr ""
+msgstr "分析工具"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Network Profiler"
-msgstr "輸出專案"
+msgstr "網路分析工具"
#: editor/script_editor_debugger.cpp
msgid "Monitor"
-msgstr ""
+msgstr "檢視程式"
#: editor/script_editor_debugger.cpp
msgid "Value"
msgstr "數值"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Monitors"
-msgstr "監看畫面"
+msgstr "監視程式"
#: editor/script_editor_debugger.cpp
msgid "Pick one or more items from the list to display the graph."
-msgstr ""
+msgstr "子列表中選擇一個或多個項目以顯示圖表。"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "List of Video Memory Usage by Resource:"
-msgstr "影片記憶體使用容量列表(依資源別):"
+msgstr "依據資源列出視訊記憶體佔用:"
#: editor/script_editor_debugger.cpp
msgid "Total:"
msgstr "總計:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "輸出專案"
+msgstr "匯出列表至 CSV 檔案"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -11392,11 +10888,11 @@ msgstr "資源路徑"
#: editor/script_editor_debugger.cpp
msgid "Type"
-msgstr "類型"
+msgstr "型別"
#: editor/script_editor_debugger.cpp
msgid "Format"
-msgstr ""
+msgstr "格式"
#: editor/script_editor_debugger.cpp
msgid "Usage"
@@ -11407,41 +10903,36 @@ msgid "Misc"
msgstr "雜項"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Clicked Control:"
-msgstr "點擊控制:"
+msgstr "已點擊的 Control:"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Clicked Control Type:"
-msgstr "點擊控制類型:"
+msgstr "已點擊的 Control 型別:"
#: editor/script_editor_debugger.cpp
msgid "Live Edit Root:"
-msgstr ""
+msgstr "即時編輯根節點:"
#: editor/script_editor_debugger.cpp
msgid "Set From Tree"
-msgstr ""
+msgstr "自場景樹中設定"
#: editor/script_editor_debugger.cpp
msgid "Export measures as CSV"
-msgstr ""
+msgstr "匯出測量資料為 CSV"
#: editor/settings_config_dialog.cpp
-#, fuzzy
msgid "Erase Shortcut"
-msgstr "捷徑"
+msgstr "清除快捷鍵"
#: editor/settings_config_dialog.cpp
-#, fuzzy
msgid "Restore Shortcut"
-msgstr "捷徑"
+msgstr "重設快捷鍵"
#: editor/settings_config_dialog.cpp
-#, fuzzy
msgid "Change Shortcut"
-msgstr "捷徑"
+msgstr "更改快捷鍵"
#: editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -11449,892 +10940,880 @@ msgstr "編輯器設定"
#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
-msgstr "捷徑"
+msgstr "快捷鍵"
#: editor/settings_config_dialog.cpp
msgid "Binding"
-msgstr ""
+msgstr "綁定"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Light Radius"
-msgstr "變更光源半徑"
+msgstr "更改光照半徑"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
-msgstr ""
+msgstr "更改音訊串流播放器 3D (AudioStreamPlayer3D) 發射角"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
-msgstr "變更鏡頭視野(FOV)"
+msgstr "更改相機視角"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera Size"
-msgstr "變更鏡頭尺寸"
+msgstr "更改相機尺寸"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
-msgstr ""
+msgstr "更改通知器 AABB"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "更改粒子 AABB"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Change Probe Extents"
-msgstr "變更框型範圍"
+msgstr "更改探針範圍"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Sphere Shape Radius"
-msgstr "變更球型半徑"
+msgstr "更改球形半徑"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Box Shape Extents"
-msgstr "變更框型範圍"
+msgstr "更改框形範圍"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Radius"
-msgstr "變更楕圓體半徑"
+msgstr "更改楕圓形半徑"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Height"
-msgstr "變更楕圓體高度"
+msgstr "更改楕圓形高度"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Change Cylinder Shape Radius"
-msgstr "變更楕圓體半徑"
+msgstr "更改圓柱形半徑"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Change Cylinder Shape Height"
-msgstr "變更楕圓體高度"
+msgstr "更改圓柱形高度"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Ray Shape Length"
-msgstr ""
+msgstr "更改射線形長度"
#: modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "Change Cylinder Radius"
-msgstr "變更光源半徑"
+msgstr "更改圓柱體半徑"
#: modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "Change Cylinder Height"
-msgstr "變更楕圓體高度"
+msgstr "更改圓柱體高度"
#: modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "Change Torus Inner Radius"
-msgstr "變更球型半徑"
+msgstr "更改環面內半徑"
#: modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "Change Torus Outer Radius"
-msgstr "變更光源半徑"
+msgstr "更改環面外半徑"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Select the dynamic library for this entry"
-msgstr ""
+msgstr "選擇該項目使用的動態函式庫"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Select dependencies of the library for this entry"
-msgstr ""
+msgstr "選擇該項目的函式庫相依性"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "Remove current entry"
-msgstr "移除"
+msgstr "移除目前的項目"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Double click to create a new entry"
-msgstr ""
+msgstr "點兩下以建立新項目"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Platform:"
-msgstr ""
+msgstr "平台:"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Platform"
-msgstr ""
+msgstr "平台"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Dynamic Library"
-msgstr ""
+msgstr "動態函式庫"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Add an architecture entry"
-msgstr ""
+msgstr "新增一個架構項目"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "GDNativeLibrary"
-msgstr ""
+msgstr "GDNative 函式庫"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Enabled GDNative Singleton"
-msgstr ""
+msgstr "啟用 GDNative 單例"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Disabled GDNative Singleton"
-msgstr "禁止自動更新"
+msgstr "禁用 GDNative 單例"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Library"
-msgstr ""
+msgstr "函式庫"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Libraries: "
-msgstr ""
+msgstr "函式庫: "
#: modules/gdnative/register_types.cpp
msgid "GDNative"
-msgstr ""
+msgstr "GDNative"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Step argument is zero!"
-msgstr "step引數為0!"
+msgstr "Step 引數為 0!"
#: modules/gdscript/gdscript_functions.cpp
msgid "Not a script with an instance"
-msgstr "非為單一事件腳本"
+msgstr "腳本沒有實體"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Not based on a script"
-msgstr "未依據腳本"
+msgstr "非基於腳本"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Not based on a resource file"
-msgstr "未依據資源檔案"
+msgstr "非基於資源檔案"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Invalid instance dictionary format (missing @path)"
-msgstr "無效的事件詞典格式(遺失 @path)"
+msgstr "無效的實體字典格式(缺少 @path)"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Invalid instance dictionary format (can't load script at @path)"
-msgstr "無效的事件詞典格式(無法載入腳本 @path)"
+msgstr "無效的實體字典格式(無法自 @path 載入腳本)"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Invalid instance dictionary format (invalid script at @path)"
-msgstr "無效的事件詞典格式(無效的腳本 @path)"
+msgstr "無效的實體字典格式(位於 @path 的腳本無效)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary (invalid subclasses)"
-msgstr ""
+msgstr "無效的實體字典(無效的子類型)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Object can't provide a length."
-msgstr ""
+msgstr "物件無法提供長度。"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "下個分頁"
+msgstr "下一個平面"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "上個分頁"
+msgstr "上一個平面"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "平面:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
-msgstr ""
+msgstr "下一個地板"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Floor"
-msgstr "上個分頁"
+msgstr "上一個地板"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Floor:"
-msgstr ""
+msgstr "地板:"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Delete Selection"
-msgstr "複製所選"
+msgstr "網格地圖刪除所選範圍"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Fill Selection"
-msgstr "複製所選"
+msgstr "網格地圖填充所選範圍"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Paste Selection"
-msgstr "複製所選"
+msgstr "網格地圖貼上所選範圍"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Paint"
-msgstr "專案設定"
+msgstr "網格地圖繪圖"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
-msgstr ""
+msgstr "網格地圖"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Snap View"
-msgstr ""
+msgstr "吸附檢視"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clip Disabled"
-msgstr "已停用"
+msgstr "剪裁已禁用"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Above"
-msgstr ""
+msgstr "剪裁上方"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Below"
-msgstr ""
+msgstr "剪裁下方"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit X Axis"
-msgstr ""
+msgstr "編輯 X 軸"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Y Axis"
-msgstr ""
+msgstr "編輯 Y 軸"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Z Axis"
-msgstr ""
+msgstr "編輯 Z 軸"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate X"
-msgstr ""
+msgstr "以遊標沿 X 軸旋轉"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate Y"
-msgstr ""
+msgstr "以遊標沿 Y 軸旋轉"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate Z"
-msgstr ""
+msgstr "以遊標沿 Z 軸旋轉"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Back Rotate X"
-msgstr ""
+msgstr "以遊標沿 X 軸反向旋轉"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Back Rotate Y"
-msgstr ""
+msgstr "以遊標沿 Y 軸反向旋轉"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Back Rotate Z"
-msgstr ""
+msgstr "以遊標沿 Z 軸反向旋轉"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Clear Rotation"
-msgstr ""
+msgstr "清除遊標旋轉"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Paste Selects"
-msgstr "擦除選中"
+msgstr "貼上所選"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clear Selection"
-msgstr "所有的選擇"
+msgstr "清除所選"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Fill Selection"
-msgstr "所有的選擇"
+msgstr "填充所選"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Settings"
-msgstr "專案設定"
+msgstr "網格地圖設定"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Pick Distance:"
-msgstr ""
+msgstr "選擇距離:"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Filter meshes"
-msgstr "過濾檔案..."
+msgstr "過濾網格"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
-msgstr ""
+msgstr "提供網格庫資源予該網格地圖以使用其網格。"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
-msgstr ""
+msgstr "類別名稱不能為保留關鍵字"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
-msgstr ""
+msgstr "內部異常堆疊回溯結束"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Bake NavMesh"
-msgstr "渲染NavMesh"
+msgstr "Bake 導航網格 (NavMesh)"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
-msgstr ""
+msgstr "清除導航網格 (Navigation Mesh)。"
#: modules/recast/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
-msgstr ""
+msgstr "正在設定組態..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Calculating grid size..."
-msgstr ""
+msgstr "正在計算網格大小..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating heightfield..."
-msgstr ""
+msgstr "正在建立 Heightfield..."
#: modules/recast/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Marking walkable triangles..."
-msgstr "正在儲存變更..."
+msgstr "正在標記可移動的三角形..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
-msgstr ""
+msgstr "正在建構緊湊 Heightfield..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Eroding walkable area..."
-msgstr ""
+msgstr "正在建立可移動區域..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Partitioning..."
-msgstr ""
+msgstr "正在分割..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating contours..."
-msgstr ""
+msgstr "正在建立輪廓..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating polymesh..."
-msgstr ""
+msgstr "正在建立多邊形網格 (Polymesh)..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Converting to native navigation mesh..."
-msgstr ""
+msgstr "正在轉換為原生導航網格 (Native Navigation Mesh)..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr ""
+msgstr "導航網格 (Navigation Mesh) 產生器設定:"
#: modules/recast/navigation_mesh_generator.cpp
msgid "Parsing Geometry..."
-msgstr ""
+msgstr "正在解析多邊形..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr ""
+msgstr "完成!"
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
"properly!"
-msgstr ""
+msgstr "節點在無工作記憶體的情況下被產生。請閱讀說明文件以瞭解如何正確產生!"
#: modules/visual_script/visual_script.cpp
msgid ""
"Node yielded, but did not return a function state in the first working "
"memory."
-msgstr ""
+msgstr "已產生節點,但未在最初的工作記憶體內回傳函式狀態。"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid ""
"Return value must be assigned to first element of node working memory! Fix "
"your node please."
-msgstr "回傳值需被指定為運算記憶體節點的第一要素!請修正該節點。"
+msgstr "回傳值需被指定為運算記憶體節點的第一個元素!請修正該節點。"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Node returned an invalid sequence output: "
-msgstr "節點回傳一個無效的連續輸出: "
+msgstr "節點回傳了一個無效的連續輸出: "
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
-msgstr ""
+msgstr "發現了連續位元 (Sequance Bit) 但並非在堆疊中的節點,請回報該錯誤!"
#: modules/visual_script/visual_script.cpp
msgid "Stack overflow with stack depth: "
-msgstr ""
+msgstr "堆疊深度的堆疊溢出: "
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
-msgstr ""
+msgstr "更改訊號引數"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Argument Type"
-msgstr ""
+msgstr "更改引數型別"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Argument name"
-msgstr ""
+msgstr "更改引數名稱"
#: modules/visual_script/visual_script_editor.cpp
msgid "Set Variable Default Value"
-msgstr ""
+msgstr "設定變數預設值"
#: modules/visual_script/visual_script_editor.cpp
msgid "Set Variable Type"
-msgstr ""
+msgstr "設定變數型別"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Input Port"
-msgstr "添加輸入"
+msgstr "新增輸入埠口"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Output Port"
-msgstr "添加輸入"
+msgstr "新增輸出埠口"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Override an existing built-in function."
-msgstr "無效名稱.不能與現有的內置類型名稱沖突."
+msgstr "複寫一個現有的內建函式。"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new function."
-msgstr "創建新矩形。"
+msgstr "建立新函式。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Variables:"
-msgstr ""
+msgstr "變數:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new variable."
-msgstr "創建新矩形。"
+msgstr "建立新變數。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Signals:"
-msgstr "訊號:"
+msgstr "訊號:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new signal."
-msgstr "創建新多邊形。"
+msgstr "建立一個新的訊號。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Name is not a valid identifier:"
-msgstr ""
+msgstr "名稱不是一個有效的識別符:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Name already in use by another func/var/signal:"
-msgstr ""
+msgstr "名稱已被用於另一個函式/變數/信號:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Function"
-msgstr ""
+msgstr "重新命名函式"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Variable"
-msgstr ""
+msgstr "重新命名變數"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Signal"
-msgstr ""
+msgstr "重新命名訊號"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Function"
-msgstr ""
+msgstr "新增函式"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Delete input port"
-msgstr "刪除點"
+msgstr "刪除輸入埠口"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Variable"
-msgstr ""
+msgstr "新增變數"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Signal"
-msgstr ""
+msgstr "新增訊號"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Remove Input Port"
-msgstr "刪除點"
+msgstr "移除輸入埠口"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Remove Output Port"
-msgstr "刪除點"
+msgstr "移除輸出埠口"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
-msgstr ""
+msgstr "更改表示式"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
-msgstr ""
+msgstr "更改視覺腳本 (VisualScript) 節點"
#: modules/visual_script/visual_script_editor.cpp
msgid "Duplicate VisualScript Nodes"
-msgstr ""
+msgstr "重複視覺腳本 (VisualScript) 節點"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
+"按住 %s 以拖移 Getter 節點。按住 Shift 以拖移一個通用的簽章 (Signature)。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
+"按住 Ctrl 以拖移 Getter 節點。按住 Shift 以拖移一個通用的簽名 (Signature)。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a simple reference to the node."
-msgstr ""
+msgstr "按住 %s 以拖移一個簡單參照 (Simple Reference) 至該節點。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a simple reference to the node."
-msgstr ""
+msgstr "按住 Ctrl 以拖移一個簡單參照 (Simple Reference) 至該節點。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Variable Setter."
-msgstr ""
+msgstr "按住 %s 以拖移一個變數 Setter 節點。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a Variable Setter."
-msgstr ""
+msgstr "按住 Ctrl 以拖動一個變數 Setter 節點。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Preload Node"
-msgstr ""
+msgstr "新增餘載 (Preload) 節點"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
-msgstr ""
+msgstr "自樹中新增節點"
#: modules/visual_script/visual_script_editor.cpp
msgid ""
"Can't drop properties because script '%s' is not used in this scene.\n"
"Drop holding 'Shift' to just copy the signature."
msgstr ""
+"由於「%s」未在該場景內使用,無法拖移屬性。\n"
+"按住「Shift」拖移以複製簽名 (Signature)。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Getter Property"
-msgstr ""
+msgstr "新增 Getter 屬性"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Setter Property"
-msgstr ""
+msgstr "新增 Setter 屬性"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Base Type"
-msgstr "變更鏡頭尺寸"
+msgstr "更改基礎型別"
#: modules/visual_script/visual_script_editor.cpp
msgid "Move Node(s)"
-msgstr ""
+msgstr "移動節點"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Node"
-msgstr ""
+msgstr "移除視覺腳本 (VisualScript) 節點"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Connect Nodes"
-msgstr "連接..."
+msgstr "連接節點"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Disconnect Nodes"
-msgstr "連接..."
+msgstr "斷開節點連接"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Connect Node Data"
-msgstr "連接..."
+msgstr "連接節點資料"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Connect Node Sequence"
-msgstr "連接..."
+msgstr "連接節點序列"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
-msgstr ""
+msgstr "腳本已有函式「%s」"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Input Value"
-msgstr ""
+msgstr "更改輸入值"
#: modules/visual_script/visual_script_editor.cpp
msgid "Resize Comment"
-msgstr ""
+msgstr "調整註解尺寸"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
-msgstr ""
+msgstr "無法複製函式節點。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Clipboard is empty!"
-msgstr ""
+msgstr "剪貼簿為空!"
#: modules/visual_script/visual_script_editor.cpp
msgid "Paste VisualScript Nodes"
-msgstr ""
+msgstr "貼上視覺腳本 (VisualScript) 節點"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function with a function node."
-msgstr ""
+msgstr "無法通過函式節點建立函式。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function of nodes from nodes of multiple functions."
-msgstr ""
+msgstr "無法自多個函式節點建立函式節點。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Select at least one node with sequence port."
-msgstr ""
+msgstr "選擇至少一個有序列埠口的節點。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Try to only have one sequence input in selection."
-msgstr ""
+msgstr "請只選擇一個序列輸入。"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create Function"
-msgstr "創建輪廓"
+msgstr "建立函式"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Function"
-msgstr ""
+msgstr "移除函式"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Variable"
-msgstr ""
+msgstr "移除變數"
#: modules/visual_script/visual_script_editor.cpp
msgid "Editing Variable:"
-msgstr ""
+msgstr "編輯變數:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Signal"
-msgstr ""
+msgstr "移除訊號"
#: modules/visual_script/visual_script_editor.cpp
msgid "Editing Signal:"
-msgstr ""
+msgstr "編輯訊號:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Make Tool:"
-msgstr ""
+msgstr "製作工具:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Members:"
-msgstr ""
+msgstr "成員:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Base Type:"
-msgstr "變更鏡頭尺寸"
+msgstr "更改基本型別:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Nodes..."
-msgstr "添加節點..。"
+msgstr "新增節點..."
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Function..."
-msgstr "轉到函數…"
+msgstr "新增函式…"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "function_name"
-msgstr "函數:"
+msgstr "function_name"
#: modules/visual_script/visual_script_editor.cpp
msgid "Select or create a function to edit its graph."
-msgstr ""
+msgstr "選擇或建立一個函式以編輯其圖表。"
#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
-msgstr ""
+msgstr "刪除所選"
#: modules/visual_script/visual_script_editor.cpp
msgid "Find Node Type"
-msgstr ""
+msgstr "尋找節點型別"
#: modules/visual_script/visual_script_editor.cpp
msgid "Copy Nodes"
-msgstr ""
+msgstr "複製節點"
#: modules/visual_script/visual_script_editor.cpp
msgid "Cut Nodes"
-msgstr ""
+msgstr "剪下節點"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Make Function"
-msgstr "函數:"
+msgstr "產生函式"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Refresh Graph"
-msgstr "重新整理"
+msgstr "重新整理圖表"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Edit Member"
-msgstr "過濾檔案..."
+msgstr "編輯成員"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable: "
-msgstr ""
+msgstr "輸入型別非可迭代型別: "
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid"
-msgstr ""
+msgstr "迭代器已不可用"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid: "
-msgstr ""
+msgstr "迭代器已不可用: "
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name."
-msgstr ""
+msgstr "無效的索引屬性名稱。"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Base object is not a Node!"
-msgstr ""
+msgstr "基礎物件不是一個節點!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Path does not lead Node!"
-msgstr ""
+msgstr "路徑未指向節點!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
-msgstr ""
+msgstr "無效的索引屬性名稱「%s」,於節點「%s」。"
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
-msgstr ""
+msgstr ": 無效的引數型別 : "
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid arguments: "
-msgstr ""
+msgstr ": 無效的引數 : "
#: modules/visual_script/visual_script_nodes.cpp
msgid "VariableGet not found in script: "
-msgstr ""
+msgstr "腳本中未找到 VariableGet(取得變數): "
#: modules/visual_script/visual_script_nodes.cpp
msgid "VariableSet not found in script: "
-msgstr ""
+msgstr "腳本中未找到 VariableSet(設定變數): "
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
-msgstr ""
+msgstr "自定節點沒有 _step() 方法,無法產生圖表。"
#: modules/visual_script/visual_script_nodes.cpp
msgid ""
"Invalid return value from _step(), must be integer (seq out), or string "
"(error)."
-msgstr ""
+msgstr "_step() 的回傳值無效,必須為整數 (Seq Out) 或字串 (Error)。"
#: modules/visual_script/visual_script_property_selector.cpp
-#, fuzzy
msgid "Search VisualScript"
-msgstr "搜尋幫助"
+msgstr "搜尋視覺腳本 (VisualScript)"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Get %s"
-msgstr ""
+msgstr "取得 %s"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Set %s"
-msgstr ""
+msgstr "設定 %s"
#: platform/android/export/export.cpp
msgid "Package name is missing."
-msgstr ""
+msgstr "缺少套件名稱。"
#: platform/android/export/export.cpp
msgid "Package segments must be of non-zero length."
-msgstr ""
+msgstr "套件片段 (Segment) 的長度不可為 0。"
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
-msgstr ""
+msgstr "Android 應用程式套件名稱不可使用字元「%s」。"
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
-msgstr ""
+msgstr "套件片段 (Segment) 的第一個字元不可為數字。"
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
-msgstr ""
+msgstr "套件片段 (Segment) 的第一個字元不可為「%s」。"
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
-msgstr ""
+msgstr "套件必須至少有一個「.」分隔字元。"
#: platform/android/export/export.cpp
msgid "Select device from the list"
-msgstr "從清單中選擇設備"
+msgstr "自清單中選擇裝置"
#: platform/android/export/export.cpp
msgid "ADB executable not configured in the Editor Settings."
-msgstr ""
+msgstr "尚未於編輯器設定中設定 ADB 可執行檔。"
#: platform/android/export/export.cpp
msgid "OpenJDK jarsigner not configured in the Editor Settings."
-msgstr ""
+msgstr "尚未於編輯器設定中設定 OpenJDK Jarsigner。"
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
-msgstr ""
+msgstr "尚未於編輯器設定或 Preset 中設定除錯鑰匙圈 (Keystore)。"
+
+#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr "釋出 Keystore 中不正確之組態設定至匯出 Preset。"
#: platform/android/export/export.cpp
msgid "Custom build requires a valid Android SDK path in Editor Settings."
-msgstr ""
+msgstr "自定建構需要有在編輯器設定中設定一個有效的 Android SDK 位置。"
#: platform/android/export/export.cpp
msgid "Invalid Android SDK path for custom build in Editor Settings."
-msgstr ""
+msgstr "編輯器設定中用於自定義設定之 Android SDK 路徑無效。"
#: platform/android/export/export.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
-msgstr ""
+msgstr "尚未於專案中安裝 Android 建構樣板。請先於專案目錄中進行安裝。"
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
-msgstr ""
+msgstr "無效的 APK Expansion 公鑰。"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid package name:"
-msgstr "不能使用的名稱。"
+msgstr "無效的套件名稱:"
+
+#: platform/android/export/export.cpp
+msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+"「andoird/modules」專案設定中包含了無效的「GodotPaymentV3」模組(更改於 "
+"Godot 3.2.2)。\n"
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr "「使用自定建構」必須啟用以使用本外掛。"
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+"「Degrees Of Freedom」(自由角度)僅可在「Xr Mode」(XR 模式)設為「Oculus "
+"Mobile VR」時可用。"
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"「Hand Tracking」(手部追蹤)僅可在「Xr Mode」(XR 模式)設為「Oculus Mobile "
+"VR」時可用。"
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+"「Focus Awareness」(提高關注度)僅可在「Xr Mode」(XR 模式)設為「Oculus "
+"Mobile VR」時可用。"
#: platform/android/export/export.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
+"嘗試自自定建構樣板進行建構,但無版本資訊可用。請自「專案」選單中重新安裝。"
#: platform/android/export/export.cpp
msgid ""
@@ -12343,155 +11822,150 @@ msgid ""
" Godot Version: %s\n"
"Please reinstall Android build template from 'Project' menu."
msgstr ""
+"Android 建構版本不符合:\n"
+" 已安裝的樣板:%s\n"
+" Godot 版本:%s\n"
+"請自「專案」目錄中重新安裝 Android 建構樣板。"
#: platform/android/export/export.cpp
msgid "Building Android Project (gradle)"
-msgstr ""
+msgstr "建構 Android 專案(Gradle)"
#: platform/android/export/export.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
+"建構 Android 專案失敗,請檢查輸出以確認錯誤。\n"
+"也可以瀏覽 docs.godotengine.org 以瀏覽 Android 建構說明文件。"
#: platform/android/export/export.cpp
msgid "No build apk generated at: "
-msgstr ""
+msgstr "無建構 APK 產生於: "
#: platform/iphone/export/export.cpp
msgid "Identifier is missing."
-msgstr ""
+msgstr "缺少識別符。"
#: platform/iphone/export/export.cpp
msgid "The character '%s' is not allowed in Identifier."
-msgstr ""
+msgstr "字元「%s」不可用於識別符中。"
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
-msgstr ""
+msgstr "尚未設定 App Store Team ID - 無法設定專案。"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Invalid Identifier:"
-msgstr "無效的字體大小。"
+msgstr "無效的識別符:"
#: platform/iphone/export/export.cpp
msgid "Required icon is not specified in the preset."
-msgstr ""
+msgstr "必須在 Preset 中指定必填圖示。"
#: platform/javascript/export/export.cpp
msgid "Stop HTTP Server"
-msgstr ""
+msgstr "停止 HTTP 伺服器"
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
-msgstr ""
+msgstr "在瀏覽器中執行"
#: platform/javascript/export/export.cpp
msgid "Run exported HTML in the system's default browser."
-msgstr ""
+msgstr "在系統的預設瀏覽器中執行已匯出的 HTML。"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file:"
-msgstr "無法新增資料夾"
+msgstr "無法寫入檔案:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export:"
-msgstr "無法新增資料夾"
+msgstr "無法開啟樣板以輸出:"
#: platform/javascript/export/export.cpp
msgid "Invalid export template:"
-msgstr ""
+msgstr "無效的輸出樣板:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read custom HTML shell:"
-msgstr "無法新增資料夾"
+msgstr "無法讀取自定 HTML Shell:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read boot splash image file:"
-msgstr "無法新增資料夾"
+msgstr "無法讀取啟動畫面圖檔:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Using default boot splash image."
-msgstr "無法新增資料夾"
+msgstr "使用預設啟動畫面圖檔。"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid package short name."
-msgstr "不能使用的名稱。"
+msgstr "無效的套件段名稱。"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid package unique name."
-msgstr "不能使用的名稱。"
+msgstr "無效的套件唯一名稱。"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid package publisher display name."
-msgstr "不能使用的名稱。"
+msgstr "無效的套件發佈者顯示名稱。"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid product GUID."
-msgstr "不能使用的名稱。"
+msgstr "無效的產品 GUID。"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid publisher GUID."
-msgstr "無效的路徑"
+msgstr "無效的發佈者 GUID。"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid background color."
-msgstr "不能使用的名稱。"
+msgstr "無效的背景顏色。"
#: platform/uwp/export/export.cpp
msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
+msgstr "無效的商店 LOGO 圖片尺寸(需為 50x50)。"
#: platform/uwp/export/export.cpp
msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
+msgstr "無效的矩形 44x44 LOGO 圖片尺寸(需為 44x44)。"
#: platform/uwp/export/export.cpp
msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
+msgstr "無效的矩形 71x71 LOGO 圖片尺寸(需為 71x71)。"
#: platform/uwp/export/export.cpp
msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
+msgstr "無效的矩形 150x150 LOGO 圖片尺寸(需為 150x150)。"
#: platform/uwp/export/export.cpp
msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
+msgstr "無效的矩形 310x310 LOGO 圖片尺寸(需為 310x310)。"
#: platform/uwp/export/export.cpp
msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
+msgstr "無效的寬 310x150 LOGO 圖片尺寸(需為 310x150)。"
#: platform/uwp/export/export.cpp
msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
+msgstr "無效的啟動畫面圖片尺寸(應為 620x300)。"
#: scene/2d/animated_sprite.cpp
-#, fuzzy
msgid ""
"A SpriteFrames resource must be created or set in the \"Frames\" property in "
"order for AnimatedSprite to display frames."
-msgstr "SpriteFrames資源必須在Frames屬性中被創建或設置才能夠顯示動畫格。"
+msgstr ""
+"必須先為「Frames」屬性建立或設定 SpriteFrames 資源以令 AnimatedSprite 顯示影"
+"格。"
#: scene/2d/canvas_modulate.cpp
msgid ""
"Only one visible CanvasModulate is allowed per scene (or set of instanced "
"scenes). The first created one will work, while the rest will be ignored."
msgstr ""
-"每個場景中僅允許一個可見的CanvasModulate,只有第一個CanvasModulate會有作用,"
-"其餘的將被忽略。"
+"每個場景(或實體化的場景集)中僅允許一個可見的 CanvasModulate。只有第一個建立"
+"的 CanvasModulate 有用,其餘的將被忽略。"
#: scene/2d/collision_object_2d.cpp
msgid ""
@@ -12499,6 +11973,9 @@ msgid ""
"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
"define its shape."
msgstr ""
+"該節點無形狀,故無法與其他物件碰撞或互動。\n"
+"請考慮新增一個 CollisionShape2D 或 CollisionPolygon2D 為其子節點以定義其形"
+"狀。"
#: scene/2d/collision_polygon_2d.cpp
msgid ""
@@ -12506,12 +11983,13 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionPolygon2D只能為CollisionObject2D衍生的節點提供碰撞形狀資訊,請將其使"
-"用於Area2D、StaticBody2D、RigidBody2D、KinematicBody2D這類的節點下。"
+"CollisionPolygon2D 只能為 CollisionObject2D 衍生的節點提供碰撞形狀資訊。請僅"
+"於 Area2D、StaticBody2D、RigidBody2D、KinematicBody2D…等節點下作為子節點使"
+"用。"
#: scene/2d/collision_polygon_2d.cpp
msgid "An empty CollisionPolygon2D has no effect on collision."
-msgstr "空白的CollisionPolygon2D不起碰撞偵測的作用。"
+msgstr "空白的 CollisionPolygon2D 不會產生任何碰撞效果。"
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -12519,54 +11997,59 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionShape2D只能為CollisionObject2D衍生的節點提供碰撞形狀資訊,請將其使用"
-"於Area2D、StaticBody2D、RigidBody2D、KinematicBody2D這類的節點下。"
+"CollisionShape2D 只能為 CollisionObject2D 衍生的節點提供碰撞形狀資訊。請僅於 "
+"Area2D、StaticBody2D、RigidBody2D、KinematicBody2D…等節點下作為子節點使用以提"
+"供形狀。"
#: scene/2d/collision_shape_2d.cpp
msgid ""
"A shape must be provided for CollisionShape2D to function. Please create a "
"shape resource for it!"
-msgstr "CollisionShape2D必須被賦予形狀才能運作,請為它建立個形狀吧!"
+msgstr "CollisionShape2D 必須被賦予形狀才能運作。請先建立形狀!"
#: scene/2d/cpu_particles_2d.cpp
msgid ""
"CPUParticles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
msgstr ""
+"CPUParticles2D 動畫需要使用有啟用「Particles Animation(粒子動畫)」的 "
+"CanvasItemMaterial。"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid ""
"A texture with the shape of the light must be supplied to the \"Texture\" "
"property."
-msgstr "光照形狀的材質必須被賦與在材質的屬性中。"
+msgstr "有光照形狀的紋理必須提供「紋理」屬性。"
#: scene/2d/light_occluder_2d.cpp
msgid ""
"An occluder polygon must be set (or drawn) for this occluder to take effect."
-msgstr "此遮光體必須被建立或設置遮蔽形狀才能發揮遮蔽作用。"
+msgstr "該遮光體必須要有設定(或繪製)遮光體形狀才會有作用。"
#: scene/2d/light_occluder_2d.cpp
-#, fuzzy
msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
-msgstr "此遮光體沒有被賦予形狀,請繪製一個吧!"
+msgstr "遮光體無遮光體多邊形。請先繪製一個多邊形。"
#: scene/2d/navigation_polygon.cpp
msgid ""
"A NavigationPolygon resource must be set or created for this node to work. "
"Please set a property or draw a polygon."
msgstr ""
+"必須先在該節點上設定或建立 NavigationPolygon 才可以使用。請設定一個屬性或繪製"
+"多邊形。"
#: scene/2d/navigation_polygon.cpp
msgid ""
"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
"node. It only provides navigation data."
msgstr ""
+"NavigationPolygonInstance 必須是 Navigation2D 節點的子級或次子級。其僅提供導"
+"航資料。"
#: scene/2d/parallax_layer.cpp
msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
-msgstr ""
+msgstr "ParallaxLayer 節點僅在當其被設為 ParallaxBackground 的子節點時有效。"
#: scene/2d/particles_2d.cpp
msgid ""
@@ -12574,22 +12057,24 @@ msgid ""
"Use the CPUParticles2D node instead. You can use the \"Convert to "
"CPUParticles\" option for this purpose."
msgstr ""
+"GLES2 視訊驅動程式目前不支援基於 GPU 的粒子。\n"
+"請改為使用 CPUParticles2D 節點。你可以使用「轉換為 CPUParticles」選項。"
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
-msgstr ""
+msgstr "尚未指定要處理粒子的材料,故未產生任何行為。"
#: scene/2d/particles_2d.cpp
msgid ""
"Particles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
-msgstr ""
+msgstr "Particles2D 動畫需要使用開啟了「粒子動畫」的 CanvasItemMaterial。"
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
-msgstr ""
+msgstr "PathFollow2D 僅在其為 Path2D 的子節點時有效。"
#: scene/2d/physics_body_2d.cpp
msgid ""
@@ -12597,91 +12082,94 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
+"(在 Character 或 Rigid Mode 下)更改 RigidBody2D 的大小將會在執行時被物理引"
+"擎複寫。\n"
+"請改為修改其子節點的碰撞形狀之大小。"
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
-msgstr ""
+msgstr "路徑屬性必須指向一個有效的 Node2D 才可用。"
#: scene/2d/skeleton_2d.cpp
msgid "This Bone2D chain should end at a Skeleton2D node."
-msgstr ""
+msgstr "該 Bone2D 鏈必須以 Skeleton2D 節點結尾。"
#: scene/2d/skeleton_2d.cpp
msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node."
-msgstr ""
+msgstr "Bone2D 僅在其為 Skeleton2D 或另一個 Bone2D 的子節點時有效。"
#: scene/2d/skeleton_2d.cpp
msgid ""
"This bone lacks a proper REST pose. Go to the Skeleton2D node and set one."
-msgstr ""
+msgstr "該骨骼缺少適當的 REST 姿勢。請跳至 Skeleton2D 節點並進行設定。"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid ""
"TileMap with Use Parent on needs a parent CollisionObject2D to give shapes "
"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
"KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionShape2D只能為CollisionObject2D衍生的節點提供碰撞形狀資訊,請將其使用"
-"於Area2D、StaticBody2D、RigidBody2D、KinematicBody2D這類的節點下。"
+"CollisionShape2D 只能為 CollisionObject2D 衍生的節點提供碰撞形狀資訊。請將其"
+"設為 Area2D、StaticBody2D、RigidBody2D、KinematicBody2D… 的子節點以賦予其形"
+"狀。"
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
"VisibilityEnabler2D works best when used with the edited scene root directly "
"as parent."
-msgstr ""
+msgstr "VisibilityEnabler2D 在直接作為已編輯場景的根節點的母級節點時效果最佳。"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRCamera must have an ARVROrigin node as its parent."
-msgstr ""
+msgstr "ARVRCamera 必須有 ARVROrigin 節點作為母節點。"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRController must have an ARVROrigin node as its parent."
-msgstr ""
+msgstr "ARVRController 必須有 ARVROrigin 節點作為母節點。"
#: scene/3d/arvr_nodes.cpp
msgid ""
"The controller ID must not be 0 or this controller won't be bound to an "
"actual controller."
-msgstr ""
+msgstr "控制器 ID 不可為 0,否則該控制器將不會綁定至實際的控制器。"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
-msgstr ""
+msgstr "ARVRAnchor 必須有 ARVROrigin 節點作為母節點。"
#: scene/3d/arvr_nodes.cpp
msgid ""
"The anchor ID must not be 0 or this anchor won't be bound to an actual "
"anchor."
-msgstr ""
+msgstr "錨點 ID 不可為 0,否則該錨點將不會被綁定至實際的錨點。"
#: scene/3d/arvr_nodes.cpp
msgid "ARVROrigin requires an ARVRCamera child node."
-msgstr ""
+msgstr "ARVROrigin 必須有一個 ARVRCamera 子節點。"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(剩餘時間:%d:%02d 秒)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
-msgstr ""
+msgstr "正在繪製網格: "
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Lights:"
-msgstr ""
+msgstr "正在繪製光照:"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
msgid "Finishing Plot"
-msgstr ""
+msgstr "繪製完成"
#: scene/3d/baked_lightmap.cpp
msgid "Lighting Meshes: "
-msgstr ""
+msgstr "正在照明網格: "
#: scene/3d/collision_object.cpp
msgid ""
@@ -12689,6 +12177,8 @@ msgid ""
"Consider adding a CollisionShape or CollisionPolygon as a child to define "
"its shape."
msgstr ""
+"該節點沒有形狀,故無法與其他物件碰撞或互動。\n"
+"請考慮新增一個 CollisionShape 或 CollisionPolygon 作為其子節點以定義其形狀。"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -12696,10 +12186,12 @@ msgid ""
"CollisionObject derived node. Please only use it as a child of Area, "
"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
msgstr ""
+"CollisionPolygon 只能為 CollisionObject 衍生的節點提供碰撞形狀資訊。請僅於 "
+"Area、StaticBody、RigidBody、KinematicBody…等節點下作為子節點使用。"
#: scene/3d/collision_polygon.cpp
msgid "An empty CollisionPolygon has no effect on collision."
-msgstr ""
+msgstr "空白的 CollisionPolygon 節點將不會產生碰撞效果。"
#: scene/3d/collision_shape.cpp
msgid ""
@@ -12707,58 +12199,65 @@ msgid ""
"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
"KinematicBody, etc. to give them a shape."
msgstr ""
+"CollisionShape 只能為 CollisionObject 衍生的節點提供碰撞形狀資訊。請僅於 "
+"Area、StaticBody、RigidBody、KinematicBody…等節點下作為子節點使用。"
#: scene/3d/collision_shape.cpp
-#, fuzzy
msgid ""
"A shape must be provided for CollisionShape to function. Please create a "
"shape resource for it."
-msgstr "CollisionShape2D必須被賦予形狀才能運作,請為它建立個形狀吧!"
+msgstr "CollisionShape 必須被賦予形狀才能運作。請先建立形狀。"
#: scene/3d/collision_shape.cpp
msgid ""
"Plane shapes don't work well and will be removed in future versions. Please "
"don't use them."
-msgstr ""
+msgstr "平面形狀的運作不太正常,且將在未來的版本移除。請勿使用。"
#: scene/3d/collision_shape.cpp
msgid ""
"ConcavePolygonShape doesn't support RigidBody in another mode than static."
-msgstr ""
+msgstr "ConcavePolygonShape 不支援靜態模式以外的 RigidBody。"
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
-msgstr ""
+msgstr "由於尚未指定網格,未顯示任何東西。"
#: scene/3d/cpu_particles.cpp
msgid ""
"CPUParticles animation requires the usage of a SpatialMaterial whose "
"Billboard Mode is set to \"Particle Billboard\"."
msgstr ""
+"CPUParticles 動畫需要使用 Billboard Mode 為「Particle Billboard」的 "
+"SpatialMaterial。"
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
-msgstr ""
+msgstr "正在繪製網格"
#: scene/3d/gi_probe.cpp
msgid ""
"GIProbes are not supported by the GLES2 video driver.\n"
"Use a BakedLightmap instead."
msgstr ""
+"GLES2 視訊驅動程式不支援 GIProbs。\n"
+"請改為使用 BakedLightmap。"
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
-msgstr ""
+msgstr "角度大於 90 度的 SpotLight 無法投射出陰影。"
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
-msgstr ""
+msgstr "必須先為該節點建立 NavigationMesh 資源才可運作。"
#: scene/3d/navigation_mesh.cpp
msgid ""
"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
"It only provides navigation data."
msgstr ""
+"NavigationMeshInstance 必須為 Navigation 節點的子節點或次級子節點。其僅提供導"
+"航資料。"
#: scene/3d/particles.cpp
msgid ""
@@ -12766,27 +12265,33 @@ msgid ""
"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
"\" option for this purpose."
msgstr ""
+"GLES2 視訊驅動程式不支援基於 GPU 的粒子。\n"
+"請改為使用 CPUParticles 節點。為此您可以使用「轉換為 CPUParticles」選項。"
#: scene/3d/particles.cpp
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
-msgstr ""
+msgstr "由於網格尚未被指派至描繪路徑(Draw Pass),未顯示任何東西。"
#: scene/3d/particles.cpp
msgid ""
"Particles animation requires the usage of a SpatialMaterial whose Billboard "
"Mode is set to \"Particle Billboard\"."
msgstr ""
+"粒子動畫需要使用 Billboard Mode 設定為「Particle Billboard」的 "
+"SpatialMaterial。"
#: scene/3d/path.cpp
msgid "PathFollow only works when set as a child of a Path node."
-msgstr ""
+msgstr "PathFollow 僅在其為 Path 節點的子節點時才可運作。"
#: scene/3d/path.cpp
msgid ""
"PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its "
"parent Path's Curve resource."
msgstr ""
+"PathFollow 的 ROTATION_ORIENTED 需要在其母節點 Path 的 Curve 資源內啟用「上向"
+"量 (Up Vector)」。"
#: scene/3d/physics_body.cpp
msgid ""
@@ -12794,16 +12299,20 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
+"(在 Character 或 Rigid Mode 下)更改 RigidBody 的大小將會在執行時被物理引擎"
+"複寫。\n"
+"請改為修改其子節點的碰撞形狀之大小。"
#: scene/3d/remote_transform.cpp
msgid ""
"The \"Remote Path\" property must point to a valid Spatial or Spatial-"
"derived node to work."
msgstr ""
+"「遠端路徑」屬性必須指向一個有效的 Spatial 或 Spatial 衍生之節點才可運作。"
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
-msgstr ""
+msgstr "該形體在設定網格前都將被忽略。"
#: scene/3d/soft_body.cpp
msgid ""
@@ -12811,81 +12320,85 @@ msgid ""
"running.\n"
"Change the size in children collision shapes instead."
msgstr ""
+"更改 SoftBody 的大小將會在執行時被物理引擎複寫。\n"
+"請改為修改其子節點的碰撞形狀之大小。"
#: scene/3d/sprite_3d.cpp
-#, fuzzy
msgid ""
"A SpriteFrames resource must be created or set in the \"Frames\" property in "
"order for AnimatedSprite3D to display frames."
-msgstr "SpriteFrames資源必須在Frames屬性中被創建或設置才能夠顯示動畫格。"
+msgstr ""
+"必須先為「Frames」屬性建立或設定 SpriteFrames 資源以令 AnimatedSprite3D 顯示"
+"影格。"
#: scene/3d/vehicle_body.cpp
msgid ""
"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
"it as a child of a VehicleBody."
msgstr ""
+"VehicleWheel 旨在為 VehicleBody 提供 Wheel System。請將其作為 VehicleBody 的"
+"子節點。"
#: scene/3d/world_environment.cpp
msgid ""
"WorldEnvironment requires its \"Environment\" property to contain an "
"Environment to have a visible effect."
msgstr ""
+"必須先將 WorldEnvironment 之「Environment」屬性設為包含 Environment 才可產生"
+"視覺效果。"
#: scene/3d/world_environment.cpp
msgid ""
"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
+msgstr "每個場景(或實體化場景集)僅可有一個 WorldEnvironment。"
#: scene/3d/world_environment.cpp
msgid ""
"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
"this environment's Background Mode to Canvas (for 2D scenes)."
msgstr ""
+"已忽略該 WorldEnvironment。請(為 3D 場景)新增一個相機或(為 2D 場景)設定環"
+"境之背景模式 (Background Mode) 為畫布 (Canvas)。"
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
-msgstr ""
+msgstr "於 BlendTree 節點「%s」上未找到動畫:「%s」"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Animation not found: '%s'"
-msgstr "動畫長度 (秒)。"
+msgstr "未找到動畫:「%s」"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
-msgstr ""
+msgstr "於節點「%s」內動畫無效:「%s」。"
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Invalid animation: '%s'."
-msgstr "無效的字體大小。"
+msgstr "無效的動畫:「%s」。"
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Nothing connected to input '%s' of node '%s'."
-msgstr "將 '%s' 從 '%s' 中斷連接"
+msgstr "節點「%s」的輸入「%s」未有任何連接。"
#: scene/animation/animation_tree.cpp
msgid "No root AnimationNode for the graph is set."
-msgstr ""
+msgstr "尚未為圖表設定根 AnimationNode。"
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Path to an AnimationPlayer node containing animations is not set."
-msgstr "從場景樹中選擇一個 AnimationPlayer 來編輯動畫。"
+msgstr "尚未設定一個連接包含動畫且連接至 AnimationPlayer 節點的路徑。"
#: scene/animation/animation_tree.cpp
msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node."
-msgstr ""
+msgstr "連接至 AnimationPlayer 的路徑並未連接至 AnimationPlayer 節點。"
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "The AnimationPlayer root node is not a valid node."
-msgstr "動畫樹無效。"
+msgstr "AnimationPlayer 的根節點並非有效節點。"
#: scene/animation/animation_tree_player.cpp
msgid "This node has been deprecated. Use AnimationTree instead."
-msgstr ""
+msgstr "該節點已停止維護,請改為使用 AnimationTree。"
#: scene/gui/color_picker.cpp
msgid ""
@@ -12893,28 +12406,29 @@ msgid ""
"LMB: Set color\n"
"RMB: Remove preset"
msgstr ""
+"色彩: #%s\n"
+"左鍵點擊:設定色彩\n"
+"右鍵點擊:刪除 Preset"
#: scene/gui/color_picker.cpp
msgid "Pick a color from the editor window."
-msgstr ""
+msgstr "請自編輯器視窗選擇一個顏色。"
#: scene/gui/color_picker.cpp
msgid "HSV"
-msgstr ""
+msgstr "HSV"
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "Raw"
-msgstr "偏航"
+msgstr "原始"
#: scene/gui/color_picker.cpp
msgid "Switch between hexadecimal and code values."
-msgstr ""
+msgstr "在 16 進位與代碼值之間切換。"
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "Add current color as a preset."
-msgstr "將目前顏色設為預設"
+msgstr "將目前的顏色加入 Preset。"
#: scene/gui/container.cpp
msgid ""
@@ -12922,16 +12436,21 @@ msgid ""
"children placement behavior.\n"
"If you don't intend to add a script, use a plain Control node instead."
msgstr ""
+"除非有腳本設定了 Container 子節點佔位行為 (Placement Behavior),其本身將無作"
+"用。\n"
+"若您未計劃新增腳本,請改為使用普通的 Control 節點。"
#: scene/gui/control.cpp
msgid ""
"The Hint Tooltip won't be displayed as the control's Mouse Filter is set to "
"\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."
msgstr ""
+"由於設定的滑鼠篩選 (Mouse Filter) 設定為「忽略 (Ignore)」,將不會顯示提示 "
+"Tooltip 。要解決該問題,請將滑鼠篩選設為「停止 (Stop)」或「通過 (Pass)」。"
#: scene/gui/dialogs.cpp
msgid "Alert!"
-msgstr "警告!"
+msgstr "警告!"
#: scene/gui/dialogs.cpp
msgid "Please Confirm..."
@@ -12943,10 +12462,12 @@ msgid ""
"functions. Making them visible for editing is fine, but they will hide upon "
"running."
msgstr ""
+"彈出視窗預設會隱藏,除非呼叫 popup() 或任何一個 popup*() 函式。可以將其設為可"
+"見來進行編輯,但在執行的時候會隱藏。"
#: scene/gui/range.cpp
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
-msgstr ""
+msgstr "若啟用「表示式編輯」,則「最小值」必須大於 0。"
#: scene/gui/scroll_container.cpp
msgid ""
@@ -12954,18 +12475,19 @@ msgid ""
"Use a container as child (VBox, HBox, etc.), or a Control and set the custom "
"minimum size manually."
msgstr ""
+"ScrollContainer 旨在於單一子控制配合使用。\n"
+"使用容器作為子節點(VBox、HBox…等),或是使用 Control 並手動設定其自定最小"
+"值。"
#: scene/gui/tree.cpp
msgid "(Other)"
-msgstr "(其它)"
+msgstr "(其它)"
#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Settings (Rendering -> "
"Environment -> Default Environment) could not be loaded."
-msgstr ""
-"在專案設定中的預設環境(Rendering -> Environment -> Default Environment)不能被"
-"載入"
+msgstr "無法載入專案設定中指定的預設環境(算圖 -> 環境 -> 預設環境)。"
#: scene/main/viewport.cpp
msgid ""
@@ -12974,41 +12496,56 @@ msgid ""
"obtain a size. Otherwise, make it a RenderTarget and assign its internal "
"texture to some node for display."
msgstr ""
+"該 Viewport 尚未被設定為算圖目標。若你想直接將其內容顯示於畫面上,請將其設為 "
+"Control 的子節點以讓其取得大小。否則請將其設為 RenderTarget 並指派其內部紋理"
+"為其他節點以顯示。"
#: scene/main/viewport.cpp
msgid "Viewport size must be greater than 0 to render anything."
-msgstr ""
+msgstr "Viewport 大小必須大於 0 才可進行算圖。"
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Invalid source for preview."
-msgstr "無效的字體大小。"
+msgstr "無效的預覽來源。"
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Invalid source for shader."
-msgstr "無效的字體大小。"
+msgstr "無效的著色器來源。"
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Invalid comparison function for that type."
-msgstr "無效的字體大小。"
+msgstr "該型別的比較函式無效。"
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
-msgstr ""
+msgstr "指派至函式。"
#: servers/visual/shader_language.cpp
msgid "Assignment to uniform."
-msgstr ""
+msgstr "指派至均勻。"
#: servers/visual/shader_language.cpp
msgid "Varyings can only be assigned in vertex function."
-msgstr ""
+msgstr "Varying 變數只可在頂點函式中指派。"
#: servers/visual/shader_language.cpp
msgid "Constants cannot be modified."
-msgstr ""
+msgstr "不可修改常數。"
+
+#~ msgid "Not in resource path."
+#~ msgstr "不在資源路徑中。"
+
+#~ msgid "Revert"
+#~ msgstr "還原"
+
+#~ msgid "This action cannot be undone. Revert anyway?"
+#~ msgstr "該操作無法還原。依然要還原嗎?"
+
+#~ msgid "Revert Scene"
+#~ msgstr "恢復場景"
+
+#~ msgid "Clear Script"
+#~ msgstr "清除腳本"
#, fuzzy
#~ msgid "Issue Tracker"