diff options
172 files changed, 2072 insertions, 2023 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 060a270426..c7202cabb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,726 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [3.2] - YYYY-MM-DD + +### Added + +- Support for [pseudo-3D depth in 2D](https://godotengine.org/article/godot-32-will-get-pseudo-3d-support-2d-engine). +- Support for importing 3D scenes using Assimp. + - Many formats are supported, including FBX. +- [Support for generating audio procedurally and analyzing audio spectrums.](https://godotengine.org/article/godot-32-will-get-new-audio-features) +- WebRTC support. + - Includes support for the high-level multiplayer API. + - Supports NAT traversal using STUN or TURN. +- Support for automatically building Android templates before exporting. + - This makes 3rd-party SDK integration easier. +- Support for [texture atlases in 2D](https://godotengine.org/article/atlas-support-returns-godot-3-2). +- Major improvements to the visual shader system. ([News post 1](https://godotengine.org/article/major-update-for-visual-shader-in-godot-3-2), [News post 2](https://godotengine.org/article/major-update-visual-shaders-godot-3-2-part-2)) + - Redesigned visual shader editor with drag-and-drop capability. + - Textures can be dragged from the FileSystem dock to be added as nodes. + - Most functions available in GLSL are now exposed. + - Many constants such as `Pi` or `Tau` can now be used directly. + - Support for boolean uniforms and sampler inputs. + - New Sampler port type. + - New conditional nodes. + - New Expression node, allowing shader code to be written in visual shaders. + - Support for plugins (custom nodes). + - Custom nodes can be drag-and-dropped from the FileSystem dock. + - Ability to copy and paste nodes. + - Ability to delete multiple nodes at once by pressing <kbd>Delete</kbd>. + - The node creation menu is now displayed when dragging a connection to an empty space on the graph. + - GLES3-only functions are now distinguished from others in the creation dialog. + - Ability to preview the code generated by the visual shader. + - Ability to convert visual shaders to text-based shaders. + - See the [complete list of new functions](https://github.com/godotengine/godot/pull/26164). +- Improved visual scripting. + - Visual scripting now uses an unified graph where all functions are represented. + - Nodes can now be edited directly in the graph. + - Support for fuzzy searching. + - The `tool` mode can now be enabled in visual scripts. + - New Deconstruct node to deconstruct a complex value into a scalar value. + - Miscellaneous UI improvements. +- Support for enabling/disabling parts of the editor or specific nodes. + - This is helpful for education, or when working with artists to help prevent inadvertent changes. +- Language server for GDScript. + - This can be used to get better integration with external editors. +- Version control integration in the editor. + - This integration is VCS-agnostic (GDNative plugins provide specific VCS support). +- Improved GridMap editor. + - The copied mesh is now displayed during pasting. + - The duplication/paste indicator is now rotated correctly around the pivot point. + - Ability to cancel paste and selection by pressing <kbd>Escape</kbd>. + - Erasing is now done using <kbd>RMB</kbd> instead of <kbd>Shift + RMB</kbd>. + - Freelook can still be accessed by pressing <kbd>Shift + F</kbd>. +- Improved MeshLibrary generation. + - When appending to an existing MeshLibrary, previews are now only generated for newly-added or modified meshes. + - Tweaked the previews' camera angle and light directions for better results. + - Materials assigned to the MeshInstance instead of the Mesh are now exported to the MeshLibrary. + - This is useful when exporting meshes from an imported scene (such as glTF), as it allows materials to persist across re-imports. +- [Improved Control anchor and margin workflow.](https://github.com/godotengine/godot/pull/27559) +- [Network profiler.](https://github.com/godotengine/godot/pull/31870) +- Improved NavigationMesh generation. + - GridMaps can now be used to bake navigation meshes. + - EditorNavigationMeshGenerator can now be used in `tool` scripts. + - Support for generating navigation meshes from static colliders. + - When using static colliders as a geometry source, a layer mask can be specified to ignore certain colliders. + - The generator no longer relies on the global transform, making it possible to generate navmeshes on nodes that are not in the scene tree. + - Navigation gizmos are now updated after every new bake. +- Support for skinning in 3D skeletons. +- CameraServer singleton to retrieve images from mobile cameras or webcams as textures. +- A crosshair is now displayed when using freelook in the 3D editor. +- Project camera override button at the top of the 2D and 3D editors. + - When enabled, the editor viewport's camera will be replicated in the running project. +- RichTextLabel can now be extended with real-time effects and custom BBCodes. + - Effects are implemented using the ItemFX resource. +- `[img=<width>x<height>]` tag to resize an image displayed in a RichTextLabel. + - If `<width>` or `<height>` is 0, the image will be adjusted to keep its original aspect. +- Revamped node connection dialog for improved ease of use. +- The Signals dock now displays a signal's description in a tooltip when hovering it. +- Input actions can now be reordered by dragging them. +- Animation frames can now be reordered by dragging them. +- Ruler tool to measure distances and angles in the 2D editor. +- "Clear Guides" menu option in the 2D editor to remove all guides. +- The 2D editor grid now displays a "primary" line every 8 lines for easier measurements. + - This value can be adjusted in the Configure Snap dialog. +- Projects can now have a description set in the Project Settings. + - This description is displayed as a tooltip when hovering the project in the Project Manager. +- All Variant types can now be added as project settings using the editor (instead of just `bool`, `int`, `float` and `String`). +- Pressing <kbd>Ctrl + F</kbd> now focuses the search field in the Project Settings and Editor Settings. +- Quick Open dialog (<kbd>Shift + Alt + O</kbd>) to open any resource in the project. + - Unlike the existing dialogs, it's not limited to scenes or scripts. +- Ability to convert a Sprite to a Mesh2D, Polygon2D, CollisionPolygon2D or LightOccluder2D. +- MultiMeshInstance2D node for using MultiMesh in 2D. +- PointMesh primitive. + - Drawn as a rectangle with a constant size on screen, which is cheaper compared to using triangle-based billboards. +- 2D polygon boolean operations and Delaunay triangulation are now available in the Geometry singleton. +- [New convex decomposition](https://godotengine.org/article/godot-3-2-adds-support-convex-decomposition) using the [V-HACD](https://github.com/kmammou/v-hacd) library. + - Can decompose meshes into multiple convex shapes for increased accuracy. +- Support for grouping nodes in the 3D editor. +- "Slow" modifier in freelook (accessed by holding <kbd>Alt</kbd>). +- The 2D editor panning limits can now be disabled in the Editor Settings. +- "Undo Close Tab" option in the scene tabs context menu. +- The editor is now capped to 20 FPS when the window is unfocused. + - This decreases CPU/GPU usage if something causes the editor to redraw continuously (such as particles). +- The editor's FPS cap can now be adjusted in the Editor Settings (both when focused and unfocused). +- Version information is now displayed at the bottom of the editor. + - This is intended to make the Godot version easily visible in video tutorials. +- Support for constants in the shader language. +- Support for local and varying arrays in the shader language. +- Support for `switch` statements in the shader language. +- Support for `do {...} while (...)` loops in the shader language. + - Unlike `while`, the expression in the `do` block will always be run at least once. +- Support for hexadecimal number literals in the shader language. +- Ported several GLES3 shader functions such as `round()` to GLES2. +- `SHADOW_VEC` shader parameter to alter 2D shadow computations in custom shaders. +- Filter search box in the remote scene tree dock. +- Ability to expand/collapse nodes recursively in the scene tree dock by holding <kbd>Shift</kbd> and clicking on a folding arrow. +- Support for depth of field, glow and BCS in the GLES2 renderer. +- MSAA support in the GLES2 renderer. +- Ability to render viewports directly to the screen in the GLES2 renderer. + - This can be faster on low-end devices, but it comes at a convenience cost. +- Project settings to set the maximum number of lights and reflections in the GLES3 renderer. + - Decreasing these values can lead to faster shader compilations, resulting in lower loading times. +- Heightmap collision shape for efficient terrain collisions. +- AStar2D class, making A* use easier in 2D. +- Disabled collision shapes can now be added directly, without having to disable them manually after one step. +- Context menu options to close other scene tabs, scene tabs to the right, or all scene tabs. +- The audio bus volumes can now be snapped by holding <kbd>Ctrl</kbd> while dragging the slider. +- Hovering an audio bus' volume slider now displays its volume in a tooltip. +- Values in the Gradient and Curve editors can now be snapped by holding <kbd>Ctrl</kbd>. + - Precise snapping can be obtained by holding <kbd>Shift</kbd> as well. +- Support for snapping when scaling nodes in the 2D editor. +- Precise snapping in the 3D editor when holding <kbd>Shift</kbd>. +- "Align Rotation with View" in the 3D editor. + - Unlike "Align Transform with View", only the selected node's rotation will be modified. + - "Align Selection with View" has been renamed to "Align Transform with View". +- All 3D gizmos now make use of snapping if enabled. +- CSG shapes are now highlighted with a translucent overlay when selected. + - Shapes in Union mode will use a blue overlay color by default. + - Shapes in Subtraction mode will use an orange overlay color by default. + - Shapes in Intersection mode will use a white overlay color. +- Ability to move a vertex along a single axis when holding <kbd>Shift</kbd> in polygon editors. +- Support for binary literals in GDScript (e.g. `0b101010` for `42`). +- AutoLoads can now be used as a type in GDScript. +- Ability to define script templates on a per-project basis. + - Template files should be placed into a `script_templates/` directory in the project and have an extension that matches the language (`.gd` for GDScript, `.cs` for C#). + - The path to the script templates directory can be changed in the Project Settings. +- Ability to limit the minimum and maximum window size using `OS.set_min_window_size()` and `OS.set_max_window_size()`. +- `Node.process_priority` property to set or get a node's processing priority. + - This was previously only available as `Node.set_process_priority()` (without an associated getter). +- `Node.editor_description` property for documentation purposes. + - When hovering a node with a description in the scene tree dock, the description will be displayed in a tooltip. +- `Button.keep_pressed_outside` property to keep a button pressed when moving the pointer outside while pressed. +- `Button.expand_icon` property to make a button's icon expand/shrink with the button's size. +- `Popup.set_as_minsize()` method to shrink a popup to its minimum size. +- `Tree.get_icon_modulate()` and `Tree.set_icon_modulate()` methods to change an icon's color in a Tree. +- `Tree.call_recursive()` method to call a method on a TreeItem and its children recursively. +- `Light.use_gi_probe` property to exclude specific lights from GIProbe computations. +- TranslationServer method `get_loaded_locales()` to retrieve the list of languages with a translation loaded. +- `FRUSTUM` 3D camera mode to create tilted frustums for mirror or portal effects. +- `Camera.project_position()` now accepts an optional `depth` parameter. +- `CanvasItem.draw_rect()` now has `width` and `antialiased` properties to match `draw_line()`'s functionality. +- `Engine.get_idle_frames()` and `Engine.get_physics_frames()` to get the number of idle and physics frame iterations since the project started. + - Unlike `Engine.get_frames_drawn()`, `Engine.get_idle_frames()` will be incremented even if the render loop is disabled. +- `Engine.get_physics_interpolation_fraction()` to get the fraction through the current physics tick at the time of the current frame. + - This can be used to implement fixed timestep interpolation. +- Support for shadow-to-opacity in 3D to render shadows in augmented reality contexts. +- Ability to change a Position2D gizmo's size. +- New Vector2 and Vector3 methods: + - `move_toward()` to retrieve a vector moved towards another by a specified number of units. + - `direction_to()` to retrieve a normalized vector pointing from a vector to another. + - This is a shorter alternative to `(b - a).normalized()`. +- AStar functions `set_point_disabled()` and `is_point_disabled()` to selectively disable points. +- Tween now emits a `tween_all_completed` signal when all tweens are completed. +- `Input.get_current_cursor_shape()` to retrieve the current cursor shape. +- `InputEventAction` now has a `strength` property to simulate analog inputs. +- `String.repeat()` method to repeat a string several times and return it. +- `String.count()` method to count the number of occurrences of a substring in a string. +- `String.humanize_size()` method to display a file size as an human-readable string. +- `String.strip_escapes()` to strip non-printable escape characters from a string, including tabulations and newlines (but not spaces). +- `String.sha1_text()` and `String.sha1_buffer()` methods to return a string's SHA-1 hash. +- Line2D `clear_points()` method to clear all points. +- Line2D now has a "Width Curve" property to make its width vary at different points. +- `assert()` now accepts an optional second parameter to display a custom message when the assertion fails. +- `posmod()` built-in GDScript function that behaves like `fposmod()`, but returns an integer value. +- `smoothstep()` built-in GDScript function for smooth easing of values. +- `lerp_angle()` built-in GDScript function to interpolate between two angles. +- `ord()` built-in GDScript function to return the Unicode code point of an 1-character string. +- `PoolByteArray.hex_encode()` method to get a string of hexadecimal numbers. +- `Font.get_wordwrap_string_size()` method to return the rectangle size needed to draw a word-wrapped text. +- `Camera.get_camera_rid()` method to retrieve a Camera's RID. +- `Array.slice()` method to duplicate a subset of an Array and return it. +- The GraphEdit box selection colors can now be changed by tweaking the `selection_fill` and `selection_stroke` theme items. +- Toggleable HSV mode for ColorPicker. +- ColorPicker properties to toggle the visibility and editability of presets. +- The default ColorPicker mode (RGB, HSV, RAW) can now be changed in the Editor Settings. +- ColorPicker now displays an indicator to denote "overbright" colors (which can't be displayed as-is in the preview). +- Hovering a Color property in the editor inspector now displays a tooltip with the exact values. +- `Color.transparent` constant (equivalent to `Color(1, 1, 1, 0)`). +- `KinematicBody.get_floor_normal()` and `KinematicBody2D.get_floor_normal()` to retrieve the collided floor's normal. +- `VehicleWheel.get_rpm()` method to retrieve a vehicle wheel's rotations per minute. +- Per-wheel throttle, brake and steering in VehicleBody. +- `GeometryInstance.set_custom_aabb()` to set a custom bounding box (used for view frustum culling). +- `FuncRef.call_funcv()` to call a FuncRef with an array containing arguments. + - In contrast to `FuncRef.call_func()`, only a single array argument is expected. +- `Mesh.get_aabb()` is now exposed to scripting. +- `PhysicalBone.apply_impulse()` and `PhysicalBone.apply_central_impulse()` methods to push ragdolls around. +- `ProjectSettings.load_resource_pack()` now features an optional `replace_files` argument (defaulting to `true`), which controls whether the loaded resource pack can override existing files in the virtual filesystem. +- `SpinBox.apply()` method to evaluate and apply the expression in the SpinBox's value immediately. +- `ConfigFile.erase_section_key()` method to remove a single key from a ConfigFile. +- `OS.execute()` now returns the process' exit code when blocking mode is enabled. +- `OS.is_window_focused()` method that returns `true` if the window is currently focused. + - Tracking the focus state manually using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT` is no longer needed to achieve this. +- `OS.low_processor_mode_sleep_usec` is now exposed as a property. + - This makes it possible to change its value at runtime, rather than just defining it once in the Project Settings. +- `SceneTree.quit()` now accepts an optional argument with an exit code. + - If set to a value greater than or equal to 0, it will override the `OS.exit_code` property. +- `VisualServer.get_video_adapter_name()` and `VisualServer.get_video_adapter_vendor()` methods to retreive the user's graphics card model and vendor. +- `VisualServer.multimesh_create()` is now exposed to scripting. +- Ability to override how scripted objects are converted to strings by defining a `_to_string()` method. +- Export hints for 2D and 3D physics/render layers. +- Editor plugins can now add new tabs to the Project Settings. +- Standalone ternary expression warning in GDScript. +- Variable shadowing warning in GDScript. + - Will be displayed if: + - a block variable shadows a member variable, + - a subclass variable shadows a member variable, + - a function argument shadows a member variable. +- Script reflection methods are now exposed to GDScript. + - See `Script.get_script_property_list()`, `Script.get_script_method_list()`, `Script.get_script_signal_list()`, `Script.get_script_constant_map()` and `Script.get_property_default_value()`. +- `randfn(mean, deviation)` method to generate random numbers following a normal Gaussian distribution. +- Ability to read the standard error stream when using `OS.execute()` (disabled by default). +- Option to disable boot splash filtering (nearest-neighbor interpolation). +- The GridMap editor now offers a search field and size slider. +- DynamicFont resources now have a thumbnail in the editor. +- Minimap in the script editor. +- Bookmarks in the script editor for easier code navigation. +- Filter search box for the script list and member list. +- Singletons and `class_name`-declared classes are now highlighted with a separate color in the script editor. +- The editor help now displays class properties' default and overridden values. +- The script editor's Find in Files dialog can now search in user-defined file types (`editor/search_in_file_extensions` in the Project Settings). +- The script editor search now displays the number of matches. +- The script editor search now selects the current match for easier replacing. +- "Evaluate Expression" contextual option in the script editor. + - This option evaluates the selected expression and replaces it (e.g. `2 + 2` becomes `4`). +- Autocompletion support for `change_scene()`. +- Ability to skip breakpoints while debugging. +- Drag-and-drop support in the TileSet editor. +- Ability to attach scripts to nodes by dragging a name from the script list to a node in the scene tree. +- Icons are now displayed next to code completion items, making their type easier to distinguish. +- "Ignore" flag to ignore specific tiles when autotiling in the TileMap editor. +- Keyboard shortcuts to rotate tiles in the TileMap editor. + - Default shortcuts are <kbd>A</kbd> (rotate left), <kbd>S</kbd> (rotate right), <kbd>X</kbd> (flip horizontally), <kbd>Y</kbd> (flip vertically). +- Ability to keep a node's local transform when reparenting it by holding <kbd>Shift</kbd>. +- Basis constants `IDENTITY`, `FLIP_X`, `FLIP_Y`, `FLIP_Z`. +- Ability to create sprite frames in AnimatedSprite from a sprite sheet. +- `frame_coords` property in Sprite and Sprite3D to set/get the coordinates of the frame to display from the sprite sheet. +- `billboard` property in Sprite3D. +- Reimplemented support for editing multiple keys at once in the animation editor. +- Support for FPS snapping in the Animation editor. +- Autokeying in the Animation editor. + - Keyframes will be created automatically when translating, rotating or scaling nodes if a track exists already. + - Keys must be inserted manually for the first time. +- AnimationNodeBlendTreeEditor improvements. + - Ability to exclude multiple selected nodes at once. + - Context menu to add new nodes (activated by right-clicking). +- The AnimationPlayer Call Method mode is now configurable. + - Method calls can be "deferred" or "immediate", "deferred" being the default. +- OccluderPolygon2D is now draggable in the editor. +- The tooltip position offset is now configurable. +- The default cursor used when hovering RichTextLabels can now be changed. +- "Dialog Autowrap" property in AcceptDialog to wrap the label's text automatically. +- The 2D editor's panning shortcut can now be changed. +- The shortcuts to quit the editor can now be changed. +- Support for emission masks in CPUParticles2D. +- `direction` property in CPUParticles and ParticlesMaterial. +- `lifetime_randomness` property in CPUParticles and ParticlesMaterial. +- CPUParticles now uses a different gizmo icon to distinguish them from Particles. +- "Restart" button to restart particle emission in the editor. +- AnimatedSprites' animations can now be played backwards. +- TextureRects can now have their texture flipped horizontally or vertically. +- StyleBoxFlat shadows can now have an offset. +- StyleBoxFlat now computes UV coordinates for its `canvas_item` vertices, which can be used in custom shaders. +- Profiler data can now be exported to a CSV file. +- The 2D polygon editor now displays vertex numbers when hovering vertices. +- RectangleShapes now have a third handle to drag both axes at once. +- Global class resources are now displayed in the Resource property inspector. +- Double-clicking an easing property in the inspector will now make the editor display a numeric field. + - This makes it easier to enter precise values for properties such as light attenuation. +- `interface/editor/default_float_step` editor setting to configure floating-point values' default step in the Inspector. +- Audio buses are now stylized to look like boxes that can be dragged. +- The default audio bus layout file path can now be changed in the Project Settings. +- The LineEdit and TextEdit controls now display their contextual menu when pressing the <kbd>Menu</kbd> key. +- `shortcut_keys_enabled` and `selecting_enabled` LineEdit and TextEdit properties to disable keyboard shortcuts and selecting text. +- The LineEdit "disabled" font color can now be changed. +- The TextEdit "readonly" font color can now be changed. +- LineEdit can now have its `right_icon` set in scripts. +- The `nine_patch_stretch` TextureProgress property now enables stretching when using a radial fill mode. +- Support for loading and saving encrypted files in ConfigFile. +- `get_path()` and `get_path_absolute()` are now implemented in FileAccessEncrypted. +- "Disabled" attenuation model for AudioStreamPlayer3D, making the sound not fade with distance while keeping it positional. +- AudioEffectPitchShift's FFT size and oversampling are now adjustable. +- TextEdit's tab drawing and folding is now exposed to GDScript. +- Orphan node monitor in the Performance singleton. + - Counts the number of nodes that were created but aren't instanced in the scene tree. +- Ability to change eye height in VR. +- CSV files can now be imported as non-translation files. +- Scene resources such as materials can now be imported as `.tres` files. +- Support for importing 1-bit, 4-bit and 8-bit BMP files. + - Size dimensions must be a multiple of 8 for 1-bit images and 2 for 4-bit images. +- `use_lld=yes` flag to link with [LLD](https://lld.llvm.org/) on Linux when compiling with Clang. + - This results in faster iteration times when developing Godot itself or modules. +- `use_thinlto=yes` flag to link with [ThinLTO](https://clang.llvm.org/docs/ThinLTO.html) when using Clang. +- Multicast support in PacketPeerUDP. +- `NetworkedMultiplayerEnet.server_relay` property to disable server relaying. + - This can be used to increase security when building a fully-authoritative server. +- Automatic timeout for TCP connections (defaults to 30 seconds, can be changed in the Project Settings). +- `HTTPRequest.timeout` property (defaults to 0, which is disabled). +- `HTTPRequest.download_chunk_size` property. + - This value can be adjusted to reduce the allocation overhead and file writes when downloading large files. + - The default value was increased for faster downloads (4 KB → 64 KB). +- WebSocket improvements. + - Support for SSL in WebSocketServer. + - WebSocketClient can now use custom SSL certificates (except on HTML5). + - WebSocketClient can now define custom headers. +- The editor now features a built-in Web server for testing HTML5 projects. +- Button to remove all missing projects in the Project Manager. +- Reimplemented support for embedding project data in the PCK file. +- Ability to take editor screenshots by pressing <kbd>Ctrl + F12</kbd>. +- Editor plugins can now set the current active editor as well as toggle the distraction-free mode. +- **Android:** [Support for adaptive icons.](https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_android.html#providing-launcher-icons) + - All icon densities are now generated automatically by the exporter. + - Only 3 images now need to be supplied to support all icon formats and densities (legacy icon, adaptive foreground, adaptive background). +- **Android:** Support for the Oculus Mobile SDK. +- **Android:** Support for requesting permissions at runtime. +- **Android:** `NOTIFICATION_APP_PAUSED` and `NOTIFICATION_APP_RESUMED` notifications are now emitted when the app is paused and resumed. +- **Android:** Support for pen input devices. +- **Android/iOS:** Support for vibrating the device. +- [**HTML5:** Partial clipboard support.](https://github.com/godotengine/godot/pull/29298) +- **iOS:** Support for [ARKit](https://developer.apple.com/augmented-reality/). +- **iOS:** `OS.get_model_name()` now returns a value with the device name. +- **iOS:** The Home indicator is now hidden by default to avoid being in the way of the running project. + - It can be restored in the Project Settings. +- **Windows:** Ability to toggle the console window in the Editor Settings. +- **Windows:** Project setting to enable Vsync using the compositor (DWM), disabled by default. + - On some hardware, this may fix stuttering issues when running a project in windowed mode. +- **Windows:** Support for code signing using `signtool` on Windows and `osslsigncode` on other platforms. +- **Windows:** Support for using Clang and ThinLTO when compiling using MinGW. +- **Windows/macOS:** `OS.set_native_icon()` method to set an `.ico` or `.icns` window/taskbar icon at runtime. +- **Windows/macOS/X11:** Support for graphic tablet pen pressure and tilt in InputEventMouseMotion. +- **macOS:** LineEdit now supports keyboard shortcuts commonly available on macOS. +- **macOS:** Multiple instances of the editor can now be opened at once. +- **macOS:** Recent and favorite projects are now listed in the project manager dock menu. +- **macOS:** The list of open scenes is now displayed in the editor dock menu. +- **macOS:** Support for modifying global and dock menus. +- **macOS:** Improved support for code signing when exporting projects. +- **macOS:** Support for defining camera and microphone usage descriptions when exporting a project. +- **macOS/X11:** [A zsh completion file for the editor is now available.](https://github.com/godotengine/godot/blob/master/misc/dist/shell/_godot.zsh-completion) +- **X11:** The instance PID is now set as the `_NET_WM_PID` window attribute, so that external programs can easily access it. +- **Mono:** Support for exporting to Android and HTML5. +- **Mono:** Support for using Rider as an external editor. +- **Mono:** Support for attaching external profilers like dotTrace using the `MONO_ENV_OPTIONS` environment variable. +- **Mono:** New DynamicGodotObject class to access dynamic properties from scripts written in GDScript. +- **Mono:** Support for resource type hints in exported arrays. +- **Mono:** New `mono/unhandled_exception_policy` project setting to keep running after an unhandled exception. +- [**Mono:** New Godot constants to conditionally react to system variables at compile-time.](https://github.com/godotengine/godot/pull/28786) +- **Mono:** Support for Visual Studio 2019's MSBuild. + +### Changed + +- Tween and Timer now display an error message if they are started without being added to the scene tree first. +- Tweaked Timer's wait time property hint to allow values with 3 decimals and above 4096. +- Functions called from a signal can no longer disconnect the node from the signal they're connected to (unless using `call_deferred()`). +- Tabs and space indentation can no longer be mixed in the same GDScript file. + - Each file must now use only tabs or spaces for indentation (not both). +- The "Trim" and "Normalize" WAV import options are now disabled by default. + - This makes the default behavior more consistent with Ogg import. +- Ogg samples now have an icon in the editor, like WAV samples. +- Camera2D drag margins are now disabled by default. + - If porting a project from Godot 3.1 where drag margins were used, these must be enabled manually again. +- `Camera.project_position()` now requires a second `depth` argument to determine the distance of the point from the camera. + - To get the old behavior back, pass the Camera's `near` property value as the second argument. +- `Skeleton.set_bone_global_pose()` was replaced by `Skeleton.set_bone_global_pose_override()`. +- UDP broadcasting is now disabled by default and must be enabled by calling `set_broadcast_enabled(true)` on the PacketPeerUDP instance. +- The editor and project manager now open slightly faster. +- Improved the Project Manager user interface. + - New, simpler design with more space available for the project list. + - Improved reporting of missing projects. + - The search field is now focused when starting the Project Manager if there is at least one project in the list. + - The search field now searches in both the project name and path. + - If the search term contains a `/`, the whole path will be used to match the search them. Otherwise, only the last path component will be searched in. +- Refactored the Project Manager to be more efficient, especially with large project lists. +- Images in the Project Manager and Asset Library are now resized with Lanczos filtering for a smoother appearance. +- The editor now uses the font hinting algorithm that best matches the OS' default. + - Hinting is set to "None" on macOS, and set to "Light" on Windows and Linux. + - This can be changed in the Editor Settings. +- The editor window dimming when a popup appears is now less intense (60% → 50%). + - The animation was also removed as it made the editor feel sluggish at lower FPS. +- Several editor menus have been reorganized for consistency and conciseness. +- Undo/Redo now supports more actions throughout the editor. +- Increased the height of the ItemList editor popup. + - This makes it easier to edit large amounts of items. +- Opening a folder in FileDialog will now scroll back to the top. +- Folder icons in FileDialog can now be displayed with a different color using the `folder_icon_modulate` constant, making them easier to distinguish from files. + - Folder icons in editor file dialogs are now tinted with the accent color. +- Improved colors in the light editor theme for better readability and consistency. +- Improved A* performance significantly by using a binary heap and OAHashMap. +- Tweaked the AABB transform algorithm to be ~1.2 times faster. +- Optimized the variant reference function, making complex scripts slightly faster. +- Disabled high-quality voxel cone tracing by default. + - This makes GIProbe much faster out of the box, at the cost of less realistic reflections. +- Lowered the default maximum directional shadow distance (200 → 100). + - This makes directional shadow rendering consistent between the editor and running project when using the default Camera node settings. +- Tweaked the default depth fog maximum distance to be independent of the Camera's `far` value (0..100). + - This makes fog display consistent between the editor and a running project. +- Tweaked the default height fog values to be more logical (0..100 → 10..0). + - This means height fog will be drawn from top-to-bottom, instead of being drawn from bottom-to-top. +- Significantly improved SSAO performance by using a lower sample count. + - SSAO now uses 3×3 blurring by default, resulting in less visible noise patterns. +- When "Keep 3D Linear" is enabled, colors are no longer clamped to [0, 1] when using Linear tonemapping. + - This allows rendering HDR values in floating-point texture targets for further processing or saving HDR data into files. +- The lightmap baker now calculates lightmap sizes dynamically based on surface area. +- Improved 3D KinematicBody performance and reliability. +- Orbiting in the 3D editor can now be done while holding <kbd>Alt</kbd>, for better compatibility with graphics tablets. +- Keys and actions are now released when the window loses focus. +- Tweens can now have a duration of 0. +- Particles and CPUParticles' Sphere emission shape now uses an uniform density sphere. +- `Viewport.size_override_stretch` is now exposed as a property (rather than just setter/getter methods). +- One-click deploy to Android now requires just one click if only one device is connected. +- The Project Manager will now infer a project name from the project path if the name was left to the default value. +- The WebSockets implementation now uses the smaller [wslay](https://tatsuhiro-t.github.io/wslay/) library instead of libwebsockets. +- Box selections in the editor now use a subtle outline for better visibility. +- Most 2D lines are now antialiased in the editor. +- CheckButtons now use a simpler design in the editor. +- Messages originating from the editor are now faded in the editor log. + - This makes messages printed by the project stand out more. +- Folding arrows in the editor inspector are now displayed at the left for consistency with other foldable elements. +- Hovering or dragging guides in the 2D editor will now turn the cursor into a "resizing" shape. +- The editor update spinner is now hidden by default. + - It can be enabled again in the Editor Settings. +- The "Update Always" option is now editor-wide instead of being project-specific. +- ColorPicker, OptionButton and MenuButton now use toggle mode, making them appear pressed when clicked. +- The ColorPicker preview was moved below the picker area to be closer to the sliders. +- Increased the Light2D height range from -100..100 to -2048..2048. + - Lower and higher values can be entered manually too. +- Decreased the `rotation_degrees` range in various nodes to -360..360 to be easier to adjust using the slider. + - Lower and higher values can still be entered manually, which is useful for animation purposes. +- The default RichTextLabel color is now `#ffffff`, matching the default Label color for better consistency. +- Label's `visible_characters` property now takes spaces into account to be consistent with RichTextLabel. +- SpinBoxes now calculate the entered value using the Expression class. + - For example, writing `2 + 2` in a SpinBox then pressing Enter will result in `4`. +- Saved resources no longer contain dependency indices and metadata such as node folding, resulting in more VCS-friendly files. +- The script editor's line length guideline is now enabled by default. +- The script editor state (such as breakpoints or the current line) is now preserved across editor sessions. +- The script editor's "Auto Brace Complete" setting is now enabled by default. +- The scripts panel toggle button is now located at the bottom-left of the script editor (instead of the File menu). +- Editor plugins can now be enabled without having an init script defined. +- Custom nodes added by plugins now have a translucent script icon in the scene tree dock. +- `EditorInterface.get_current_path()` to get the full path currently displayed in the FileSystem dock in an editor plugin. +- Copy constructors are now allowed for built-in types in GDScript. + - This allows constructs such as `Vector2(Vector2(12, 34))`, which may be useful to simplify code in some cases. +- `weakref(null)` is now allowed in GDScript. + - This makes checking for a valid reference more concise, as `if my_ref.get_ref()` is now sufficient (no need for `if my_ref and my_ref.get_ref()`). +- The number of signal connections and groups is now displayed in a tooltip when hovering the associated buttons in the scene tree dock. +- The right mouse button can now be used to pan in the 2D editor. + - This is to improve usability when using a touchpad. + - The middle mouse button can still be used to pan in the 2D editor. +- Zooming is now allowed while panning in the 2D editor. +- When the "Scroll To Pan" editor setting is enabled, the 2D editor can now be zoomed in by holding <kbd>Ctrl</kbd> and scrolling the mouse wheel. +- Zoom percentages in the 2D editor are now relative to the editor scale if the editor scale is higher than 100%. +- The 2D editor now displays the current zoom percentage. + - The zoom percentage can be clicked to reset the zoom level to 100%. +- Improved sorting options in the Asset Library. +- Images now load faster in the Asset Library. +- A loading placeholder is now displayed while icons are loading in the Asset Library. +- Images failing to load in the Asset Library display a "broken file" icon. +- Improved the Asset Library page loading transitions. +- Tweaked the Asset Library detail page layout for better readability. +- Audio mixer faders now use a non-linear algorithm to better fit human hearing. +- Tooltips now appear faster when hovering elements in the editor (0.7 seconds → 0.5 seconds). +- Increased the low-processor usage mode's default maximum refresh rate (125 FPS → 144 FPS). + - This makes the editor feel slightly smoother on 144 Hz displays. +- Tree scrolling when dragging now uses a larger drag margin, making drag-and-drop more convenient. +- Holding <kbd>Ctrl</kbd> now toggles snapping in GraphEdit. +- Improved the timeline's appearance in the animation editor. +- Improved snapping in the animation editor. + - Snapping can be toggled temporarily by holding the <kbd>Ctrl</kbd> key. + - Snapping can be made more precise by holding the <kbd>Shift</kbd> key. + - Timeline snapping is now toggled by the Snap setting (like when moving keyframes). +- Keyframes are now easier to select in the animation editor. +- Selected keyframes now appear slightly larger in the animation editor. +- Boolean and color keyframe icons are now aligned to other keyframes in the animation editor. +- The Animation editor's line widths are now resized to match the editor scale. +- BPTC compression is now available for all HDR image formats. +- `Image.save_exr()` to save an image in EXR format, which supports high bit depths. +- Improved path and polygon editors. + - New handle icons for path and polygon points. + - Smooth path point and curve tangents now use different icons to be distinguished from sharp points. + - Tangent lines are now gray in the Path2D and Path editors. + - Path2D lines are now antialiased. +- Increased the TileSet and polygon UV editor's maximum zoom levels (400% → 1600%). +- Decreased the maximum allowed StyleBoxFlat corner detail (128 → 20). + - This prevents slowness and glitches caused by using overly detailed corners. +- 3D collision shapes and RayCasts are now drawn in gray when disabled. +- Improved RayCast2D and one-way collision drawing. + - Disabled RayCast2Ds are now displayed in gray. + - One-way collision arrows are now orange by default, making them easier to distinguish them from RayCast2Ds. + - Tweaked RayCast2D and one-way collision line shapes to look more like arrows. +- Improved rendering in the curve editor. + - The grid is now rendered correctly when using a light theme. + - The main line and edge line colors have been swapped for better visibility. + - Tangent line widths are now resized to match the editor scale. +- Improved rendering in the performance monitor. + - Dark colors are now used on light backgrounds for better visibility. + - Graph lines are now thinner and opaque. + - Graph line widths are now resized to match the editor scale. + - Rounded values now display trailing zeroes to make their precision clearer. +- Some TileMap editor options were moved to the toolbar. +- The TileMap editor now displays coordinate information in the 2D viewport's bottom-left corner. + - This fixes the TileMap editor width changing when hovering tiles in a small window. +- Brackets are now only inserted when necessary when autocompleting methods in the script editor. +- Improved dialogs when saving or removing an editor layout. +- Whitespace-only selections no longer cause the script editor to highlight all occurrences. +- Saving a script will now add a newline at the end of file if none was present already. +- Reorganized sections in the editor help to be in a more logical order. +- The editor help now uses horizontal margins if the screen is wide enough. + - This makes sure lines keep a reasonable length for better readability. +- Increased line spacing in the editor help and asset library descriptions. +- The editor help now displays bold text using a bold font (instead of using a monospace font). +- The editor help now displays code using a slightly different color to be easier to distinguish. +- The editor help now displays types after parameter names to follow the GDScript static typing syntax. +- Editor help is now accessed using <kbd>Shift + F1</kbd>, for consistency with other applications. + - Contextural help is now accessed using <kbd>Alt + F1</kbd> to accommodate for this change. +- The script editor's Find in Files dialog is now always available, even when no script is opened. +- Pressing <kbd>Shift + Enter</kbd> in the script editor Find dialog will now go to the previous match. +- Improved the node deletion confirmation message. + - If there is only one node to delete, its name is displayed in the message. + - If there is more than one node to delete, the number of nodes to delete is displayed. +- Improved the "Snap Object to Floor" functionality in the 3D editor. + - An error message is now displayed if no nodes could be snapped. + - Increased the maximum snapping height (10 → 20). + - Increased the maximum snapping tolerance (0.1 → 0.2). +- 2D/3D selections, rotations and selected texts are now highlighted with the editor theme's accent color. +- 3D light gizmos are now tinted using the light's color, making navigation easier while using the unshaded display mode. +- Improved the 3D light and AudioStreamPlayer3D gizmos to better represent their depth in the 3D world. +- Tweaked the 3D manipulator gizmo's colors for better visibility. +- Tweaked the 2D and 3D axis colors for consistency with gizmo colors. +- Increased the default 3D manipulator gizmo opacity (0.2 → 0.4). +- The multiline text editor popup dialog's width is now capped on large displays. + - This prevents lines from becoming very long, which could hamper text readability. +- Non-printable escape characters are now stripped when pasting text into a LineEdit. +- The TextEdit caret color now matches the default font color, making it easier to see. +- Empty exported NodePath properties now return `null` instead of `self`. +- Built-in scripts are no longer allowed to use `class_name` as it wasn't working properly. +- The second parameter of `substr()` is now optional and defaults to `-1`. +- More editor actions can now have shortcuts assigned (such as Revert Scene or Export). +- The project export path may now be written in a relative path. + - Directories will be created recursively if the target directory doesn't exist. +- Items in the FileSystem dock can now be deselected by clicking empty space. +- "Set as Main Scene" context option for scenes in the FileSystem dock. +- The unused class variable GDScript warning is now disabled by default due to false positives. +- Warning-ignore comments now allow whitespace after the `#` character. +- Improved error reporting in the Particles emission point creation dialog. +- The number of warnings and errors that can be received in the remote debugger is now capped per second rather than per frame. + - The default limit is 100 errors and 100 warnings per second, making it possible for the script editor to report up to 100 warnings before having messages hidden. +- UTF-8 characters are now supported in input action names. +- All platforms now use the `custom_template` property in each export preset to store the path to the custom export template (instead of `custom_package` for some platforms). +- Tween methods' `trans_type` and `ease_type` arguments are now optional, defaulting to `TRANS_LINEAR` and `EASE_IN_OUT` respectively. +- `PCKPacker.pck_start()` and `PCKPacker.flush()`'s `alignment` and `verbose` arguments (respectively) are now optional, defaulting to `0` and `false`. +- Exported PCK files now contain the Godot patch version in their header. + - This can be used by external tools to detect the Godot version more accurately. +- Exporting a project PCK or ZIP from the command line must now be done with the new `--export-pack` command-line argument. + - This was done to remove the ambiguity when exporting a project to macOS from the command line. +- Updated FreeType to 2.10, which changes how font metrics are calculated. + - This may affect the appearance of some Controls, see [this issue](https://github.com/godotengine/godot/issues/28335) for details. +- The SCons build system now automatically detects the host platform. + - `platform=<platform>` is no longer required when compiling for the host platform. + - `platform=list` can be used to list the supported target platforms. +- **Windows:** Drive letters in file paths are now capitalized. +- **macOS:** <kbd>Control + H</kbd> and <kbd>Control + D</kbd> in TextEdit now delete the character at the left and right of the cursor (respectively). +- **macOS:** <kbd>Command + Left</kbd> in TextEdit now moves the cursor to the first non-whitespace character. +- **macOS:** Non-resizable windows are now allowed to enter fullscreen mode. +- **macOS:** The editor's title bar now uses dark mode on Mojave. +- **X11:** `OS.set_window_postion()` now takes window decorations into account. + +### Removed + +- Unused Panel `panelf` and `panelnc` styles. +- thekla_atlas dependency, as light baking now relies on [xatlas](https://github.com/jpcy/xatlas) for UV unwrapping. +- Rating icons in the Asset Library, as this feature isn't implemented in the backend. +- Some editor languages are no longer available due to missing support for RTL and text shaping in Godot: + - Affected languages are Arabic, Bengali, Persian, Hebrew, Hindi, Malayalam, Sinhalese, Tamil, Telugu and Urdu. + - These languages will be re-added once Godot supports RTL and text shaping. +- **Android:** ARMv6 support. +- **iOS:** ARMv7 support. + - ARMv7 export templates can still be compiled from source to support the iPhone 5 and older. + +### Fixed + +- The Project Manager now remembers the sorting option that was previously set. +- The editor and project manager now have a minimum window size defined. + - This prevents controls from overlapping each other by resizing the window to a very small size. +- Fixed radiance map generation, resulting in improved 3D performance and visual quality. +- Fixed issues with PBR environment mapping. + - Materials should now look closer to what they look like in Substance Designer/Painter. +- Depth of field now affects transparent objects. +- Radiance is now generated when using a clear color sky. +- Contact shadows no longer display when shadow casting is disabled. +- Larger data types can now be constructed by swizzling in the shader language. + - For instance, `vec2 test2 = vec2(0.0, 1.0); vec3 test3 = test2.xxx;` now works as in GLSL. +- The `AMBIENT_LIGHT_DISABLED` and `SHADOWS_DISABLED` flags now work when using the GLES2 renderer. +- The Keep background mode now works when using the GLES2 renderer. +- Several fixes to the GLES2 renderer: + - Fixed transparency order. + - Fixed vertex lighting being too bright. + - Fixed occasional light flickering. + - Fixed shadows cast from transparent materials. + - Fog is no longer computed on unshaded materials. + - This matches the GLES3 renderer's behavior. + - GLES2 shader uniforms now use `highp` precision by default. + - This prevents linking issues on some Android devices. + - Negative OmniLights and SpotLights now work as expected. + - The 3D editor's View Information pane now displays statistics correctly when using the GLES2 renderer. +- Textures compressed with ETC now support transparency by falling back to RGBA4444 or LA8. +- Alternate display modes are now marked as disabled in the editor when using the GLES2 renderer, as these are only supported when using GLES3. +- Fixed several inconsistencies between Particles and CPUParticles. +- Fixed particles scale randomization. +- Particles are now set to emit correctly when restarting. +- CheckBox and CheckButton now use the `check_vadjust` custom constant to adjust the icon Y position as intended. +- Fixed various issues with tab-related icons. +- Fixed issues in WebM colorspace corrections, resulting in better color output. +- CSG is now taken into account when generating navigation meshes. +- Curve2D and Curve3D interpolated values now behave as expected. +- Numeric slider grabbers in the editor inspector now update when scrolling using the mouse wheel. +- Scene modifications are no longer lost when renaming a file in the FileSystem dock. +- "Show in FileSystem" now clears the current search, so that the selected item can be seen immediately. +- LineEdit and TextEdit's context menus no longer display editing options if they are read-only. +- SpinBox mouse events are now correctly triggered by its LineEdit part. +- Per-word navigation in LineEdit and TextEdit now handles UTF-8 characters correctly. +- LineEdit placeholders, Tabs' names and WindowDialog titles now react correctly to translation changes. +- Fixed UI navigation when using gamepad analog sticks. +- Buttons' state is now reset when they exit the scene tree. + - This prevents them from lingering in a "hovered" or "pressed" state. +- Tooltips now disappear when hiding the node they belong to. +- Encoded packet flags are no longer sent in the ENet multiplayer protocol, as ENet itself already sends that data. + - This saves 4 bytes per packet. +- Audio trimming is now less aggressive, cutting at -50 dB instead of -30 dB. +- Audio trimming now has a small fade-out period, preventing audible pops. +- Audio mix rate and output latency settings are now consistently applied on all platforms. +- Fixed multichannel panning for AudioStreamPlayer3D. +- Opening a recent built-in script will now load the associated scene automtaically since doing so is required to edit the script. +- Declaring a class with `class_name` that has the same name as a singleton will now display a clearer error message. +- `script` is no longer allowed as a member variable name in GDScript, as that conflicts with the internal `script` property used by Object. +- Assigning a variable with a function index will no longer evaluate the function twice. + - For instance, doing `a[function()] += 1` will no longer evaluate `function()` twice. + - If the function has side effects, this may change the resulting program behavior. +- GDScript type checks are now enabled in release export templates. +- The Label font shadow now draws the font outline as well (if the base font has one). +- `Font.draw_char()` now draws the font outline as well (if the base font has one). +- The editor no longer redraws continuously when selecting a Control in a Container. +- Added some missing feature tags to the Project Settings "Override For..." menu. +- The `low_processor_mode_sleep_usec` project setting no longer affects the editor. +- Typed arrays and dictionaries no longer have their values shared across instances. +- `self` and object types can now be indexed as a dictionary again (like in Godot 3.0 and prior). +- Fixed `to_lower()` conversion with Cyrillic characters. +- The Find in Files replace dialog now allows empty replacement texts. +- The bottom panel no longer disappears when opening the theme editor on small displays. +- The script editor's color picker now changes only one color if multiple colors are present on the same line. +- The script editor's line length guideline is now drawn behind text. +- The script editor's line length guideline is now drawn at the correct position when font hinting is disabled. +- The script editor now automatically indents a line if the previous one ends with `[` or `(`. + - This makes it possible to wrap arrays or function declarations/calls without pressing <kbd>Tab</kbd> every line. +- Fixed autocompletion in the script editor. + - The script editor can now autocomplete enum values. + - The script editor can now autocomplete node paths starting with `$"` or `$'`. +- Custom script editor templates can now use type hints. +- Shift operators with a number not between 0 and 63 (inclusive) will now result in a compile-time error in GDScript. +- Warnings no longer count towards the "Too many errors!" message. +- AnimationTrackEdit now displays invalid value keys again (as it did in 3.0). +- Fixed the display of function/audio/animation tracks in the blend tree animation filter. +- The editor shortcuts menu no longer displays all unassigned shortcuts when searching for a substring of "None". +- The editor's performance monitor now displays memory/file sizes larger than 2 GB correctly. +- The editor debugger now displays keyboard shortcuts when hovering the "Step Into", "Step Over", "Break" and "Continue" buttons. +- The editor debugger now always handles connections. + - Subsequent connections will be dropped immediately to avoid locking. +- Large rotation offset/snap values no longer appear to be cut off in the Configure Snap dialog. +- Documentation tooltips in the editor now wrap to multiple lines correctly. +- Locked 3D nodes are no longer selectable in the 3D viewport, matching the 2D editor's behavior. +- All 3D gizmos now notify changes correctly, which means the inspector now displays up-to-date properties after using them. +- The 3D manipulator gizmo's size is now capped at low viewport heights, preventing it from outgrowing the viewport's bounds. +- The editor filesystem now refreshes on file changes if the project is located on an exFAT filesystem. +- Fixed many cases of colors not changing correctly when switching the editor from a dark theme to a light theme (or vice versa) without restarting. +- The Show in File Manager context menu option now works with files marked as favorite. +- The random number generator's seed is now properly set up. +- Antialiased and rounded StyleBoxFlat corners now handle different border widths correctly. +- The StyleBox preview now accounts for shadows and content margins. + - This fixes the preview going out of bounds in the inspector. +- Text resources no longer contain an extraneous line break at the end of file. +- Transform's `FLIP_Y` and `FLIP_Z` constants now work as expected. +- Fixed importing BMP images. +- The positional command-line argument is now only considered to be a scene path if it ends with `.scn`, `.tscn` or `.escn`. + - This makes it possible to parse command-line arguments in a standard fashion (`--foo bar` now works, not just `--foo=bar`). + - This also makes it possible to use file associations or drag-and-drop and have the positional argument parsed by the project. +- The `--audio-driver` and `--video-driver` command-line arguments are now validated; an error message will be printed if an invalid value is passed. +- The `--check-only` command-line argument now returns a non-zero exit code if an invalid script is passed using `--script`. +- Exporting a project via the command-line now returns a non-zero exit code if an error occurred during exporting. +- Console output is no longer colored when standard output isn't a TTY. + - This prevents Godot from writing ANSI escape codes when redirecting standard output or standard error to a file. +- **Android:** Gamepads are now correctly detected when the application starts. +- **Android:** Fix some keyboards being detected as gamepads and not working as a result. +- **Android:** The editor now detects if the device is connected using wireless `adb` and will debug using Wi-Fi in this case. +- **HTML5:** Fixed the pointer position on hiDPI displays. +- **HTML5:** `OS.get_system_time_msec()` now returns the correct value like on other platforms. +- **iOS:** On iOS 11 or later, gestures near screen edges are now handled by Godot instead of the OS. +- **Windows:** Line endings are now converted to CRLF when setting clipboard content. +- **Windows:** Getting the path to the Downloads directory using `OS.get_system_dir()` now works correctly. + - This fixes line endings being invisible when pasting into other applications. +- **macOS:** `OS.get_real_window_size()` and `OS.set_window_size()` are now handled correctly on hiDPI displays. +- **X11:** `OS.get_window_position()` now returns absolute coordinates. +- **X11:** Fixed audio playing on the wrong speakers when using PulseAudio on 5.1 setups. +- **X11:** `OS.set_window_maximized()` now gives up after 0.5 seconds. + - This makes the editor no longer freeze on startup when using fvwm. + ## [3.1] - 2019-03-13 ### Added @@ -396,5 +1116,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - HTML5 export using asm.js. - Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly. -[Unreleased]: https://github.com/godotengine/godot/compare/3.0-stable...HEAD +[Unreleased]: https://github.com/godotengine/godot/compare/3.2-stable...HEAD +[3.2]: https://github.com/godotengine/godot/compare/3.1-stable...3.2-stable +[3.1]: https://github.com/godotengine/godot/compare/3.0-stable...3.1-stable [3.0]: https://github.com/godotengine/godot/compare/2.1-stable...3.0-stable diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 68650019a2..95f433607c 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2773,8 +2773,9 @@ _Thread::_Thread() { _Thread::~_Thread() { - ERR_FAIL_COND_MSG(active, "Reference to a Thread object object was lost while the thread is still running..."); + ERR_FAIL_COND_MSG(active, "Reference to a Thread object was lost while the thread is still running..."); } + ///////////////////////////////////// PoolStringArray _ClassDB::get_class_list() const { diff --git a/core/image.cpp b/core/image.cpp index 672f850a1f..18d0653bae 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -2027,8 +2027,7 @@ Rect2 Image::get_used_rect() const { for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { - bool opaque = get_pixel(i, j).a > 0.99; - if (!opaque) + if (!(get_pixel(i, j).a > 0)) continue; if (i > maxx) maxx = i; diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 2708cb8c01..381ac4c0bb 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -111,6 +111,7 @@ void MultiplayerAPI::poll() { Error err = network_peer->get_packet(&packet, len); if (err != OK) { ERR_PRINT("Error getting packet!"); + break; // Something is wrong! } rpc_sender_id = sender; diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index ae0520df6e..9e53d773ba 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -37,7 +37,8 @@ PacketPeer::PacketPeer() : last_get_error(OK), - allow_object_decoding(false) { + allow_object_decoding(false), + encode_buffer_max_size(8 * 1024 * 1024) { } void PacketPeer::set_allow_object_decoding(bool p_enable) { @@ -50,6 +51,19 @@ bool PacketPeer::is_object_decoding_allowed() const { return allow_object_decoding; } +void PacketPeer::set_encode_buffer_max_size(int p_max_size) { + + ERR_FAIL_COND_MSG(p_max_size < 1024, "Max encode buffer must be at least 1024 bytes"); + ERR_FAIL_COND_MSG(p_max_size > 256 * 1024 * 1024, "Max encode buffer cannot exceed 256 MiB"); + encode_buffer_max_size = next_power_of_2(p_max_size); + encode_buffer.resize(0); +} + +int PacketPeer::get_encode_buffer_max_size() const { + + return encode_buffer_max_size; +} + Error PacketPeer::get_packet_buffer(PoolVector<uint8_t> &r_buffer) { const uint8_t *buffer; @@ -100,12 +114,18 @@ Error PacketPeer::put_var(const Variant &p_packet, bool p_full_objects) { if (len == 0) return OK; - uint8_t *buf = (uint8_t *)alloca(len); - ERR_FAIL_COND_V_MSG(!buf, ERR_OUT_OF_MEMORY, "Out of memory."); - err = encode_variant(p_packet, buf, len, p_full_objects || allow_object_decoding); + ERR_FAIL_COND_V_MSG(len > encode_buffer_max_size, ERR_OUT_OF_MEMORY, "Failed to encode variant, encode size is bigger then encode_buffer_max_size. Consider raising it via 'set_encode_buffer_max_size'."); + + if (unlikely(encode_buffer.size() < len)) { + encode_buffer.resize(0); // Avoid realloc + encode_buffer.resize(next_power_of_2(len)); + } + + PoolVector<uint8_t>::Write w = encode_buffer.write(); + err = encode_variant(p_packet, w.ptr(), len, p_full_objects || allow_object_decoding); ERR_FAIL_COND_V_MSG(err != OK, err, "Error when trying to encode Variant."); - return put_packet(buf, len); + return put_packet(w.ptr(), len); } Variant PacketPeer::_bnd_get_var(bool p_allow_objects) { @@ -142,7 +162,10 @@ void PacketPeer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_allow_object_decoding", "enable"), &PacketPeer::set_allow_object_decoding); ClassDB::bind_method(D_METHOD("is_object_decoding_allowed"), &PacketPeer::is_object_decoding_allowed); + ClassDB::bind_method(D_METHOD("get_encode_buffer_max_size"), &PacketPeer::get_encode_buffer_max_size); + ClassDB::bind_method(D_METHOD("set_encode_buffer_max_size", "max_size"), &PacketPeer::set_encode_buffer_max_size); + ADD_PROPERTY(PropertyInfo(Variant::INT, "encode_buffer_max_size"), "set_encode_buffer_max_size", "get_encode_buffer_max_size"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed"); }; diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h index f1870e8ef1..2b13f2e952 100644 --- a/core/io/packet_peer.h +++ b/core/io/packet_peer.h @@ -51,6 +51,9 @@ class PacketPeer : public Reference { bool allow_object_decoding; + int encode_buffer_max_size; + PoolVector<uint8_t> encode_buffer; + public: virtual int get_available_packet_count() const = 0; virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) = 0; ///< buffer is GONE after next get_packet @@ -69,6 +72,9 @@ public: void set_allow_object_decoding(bool p_enable); bool is_object_decoding_allowed() const; + void set_encode_buffer_max_size(int p_max_size); + int get_encode_buffer_max_size() const; + PacketPeer(); ~PacketPeer() {} }; diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index 8bc73103e9..fb83f0ac90 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -63,6 +63,10 @@ void PCKPacker::_bind_methods() { Error PCKPacker::pck_start(const String &p_file, int p_alignment) { + if (file != NULL) { + memdelete(file); + } + file = FileAccess::open(p_file, FileAccess::WRITE); ERR_FAIL_COND_V_MSG(!file, ERR_CANT_CREATE, "Can't open file to write: " + String(p_file) + "."); diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index 53e7da91a7..bd450dd84f 100644 --- a/core/io/xml_parser.cpp +++ b/core/io/xml_parser.cpp @@ -471,6 +471,10 @@ Error XMLParser::open_buffer(const Vector<uint8_t> &p_buffer) { ERR_FAIL_COND_V(p_buffer.size() == 0, ERR_INVALID_DATA); + if (data) { + memdelete_arr(data); + } + length = p_buffer.size(); data = memnew_arr(char, length + 1); copymem(data, p_buffer.ptr(), length); @@ -489,6 +493,10 @@ Error XMLParser::open(const String &p_path) { length = file->get_len(); ERR_FAIL_COND_V(length < 1, ERR_FILE_CORRUPT); + if (data) { + memdelete_arr(data); + } + data = memnew_arr(char, length + 1); file->get_buffer((uint8_t *)data, length); data[length] = 0; diff --git a/core/io/zip_io.cpp b/core/io/zip_io.cpp index 582b7c906b..40e902d874 100644 --- a/core/io/zip_io.cpp +++ b/core/io/zip_io.cpp @@ -97,6 +97,7 @@ int zipio_close(voidpf opaque, voidpf stream) { FileAccess *&f = *(FileAccess **)opaque; if (f) { f->close(); + memdelete(f); f = NULL; } return 0; diff --git a/core/object.cpp b/core/object.cpp index 21666a334c..21a3b2cc6c 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1213,9 +1213,9 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int MessageQueue::get_singleton()->push_call(target->get_instance_id(), c.method, args, argc, true); } else { Variant::CallError ce; - s->lock++; + _emitting = true; target->call(c.method, args, argc, ce); - s->lock--; + _emitting = false; if (ce.error != Variant::CallError::CALL_OK) { #ifdef DEBUG_ENABLED @@ -1920,6 +1920,7 @@ Object::Object() { _instance_id = ObjectDB::add_instance(this); _can_translate = true; _is_queued_for_deletion = false; + _emitting = false; instance_binding_count = 0; memset(_script_instance_bindings, 0, sizeof(void *) * MAX_SCRIPT_INSTANCE_BINDINGS); script_instance = NULL; @@ -1942,15 +1943,15 @@ Object::~Object() { const StringName *S = NULL; + if (_emitting) { + //@todo this may need to actually reach the debugger prioritarily somehow because it may crash before + ERR_PRINTS("Object " + to_string() + " was freed or unreferenced while a signal is being emitted from it. Try connecting to the signal using 'CONNECT_DEFERRED' flag, or use queue_free() to free the object (if this object is a Node) to avoid this error and potential crashes."); + } + while ((S = signal_map.next(NULL))) { Signal *s = &signal_map[*S]; - if (s->lock > 0) { - //@todo this may need to actually reach the debugger prioritarily somehow because it may crash before - ERR_PRINTS("Object was freed or unreferenced while signal '" + String(*S) + "' is being emitted from it. Try connecting to the signal using 'CONNECT_DEFERRED' flag, or use queue_free() to free the object (if this object is a Node) to avoid this error and potential crashes."); - } - //brute force disconnect for performance int slot_count = s->slot_map.size(); const VMap<Signal::Target, Signal::Slot>::Pair *slot_list = s->slot_map.get_array(); diff --git a/core/object.h b/core/object.h index ad1865da7b..865c155764 100644 --- a/core/object.h +++ b/core/object.h @@ -465,8 +465,7 @@ private: MethodInfo user; VMap<Target, Slot> slot_map; - int lock; - Signal() { lock = 0; } + Signal() {} }; HashMap<StringName, Signal> signal_map; @@ -481,6 +480,7 @@ private: bool _predelete(); void _postinitialize(); bool _can_translate; + bool _emitting; #ifdef TOOLS_ENABLED bool _edited; uint32_t _edited_version; diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index e84e265983..a131f1f8c8 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -42,8 +42,13 @@ <member name="JSON" type="JSON" setter="" getter=""> The [JSON] singleton. </member> + <member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter=""> + The [JavaClassWrapper] singleton. + [b]Note:[/b] Only implemented on Android. + </member> <member name="JavaScript" type="JavaScript" setter="" getter=""> The [JavaScript] singleton. + [b]Note:[/b] Only implemented on HTML5. </member> <member name="Marshalls" type="Reference" setter="" getter=""> The [Marshalls] singleton. diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 2d3ceebed5..71e78500af 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -32,25 +32,26 @@ Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code]. </description> </method> - <method name="capture_get_device_list"> - <return type="Array"> + <method name="capture_get_device"> + <return type="String"> </return> <description> - Returns the names of all audio input devices detected on the system. + Name of the current device for audio input (see [method capture_get_device_list]). </description> </method> - <method name="capture_start"> - <return type="int" enum="Error"> + <method name="capture_get_device_list"> + <return type="Array"> </return> <description> - Attempts to start recording from the audio driver's capture device. On success, the return value is [constant OK]. + Returns the names of all audio input devices detected on the system. </description> </method> - <method name="capture_stop"> - <return type="int" enum="Error"> + <method name="capture_set_device"> + <return type="void"> </return> + <argument index="0" name="name" type="String"> + </argument> <description> - Attempts to stop recording from the audio driver's capture device. On success, the return value is [constant OK]. </description> </method> <method name="generate_bus_layout" qualifiers="const"> @@ -159,32 +160,11 @@ Returns the volume of the bus at index [code]bus_idx[/code] in dB. </description> </method> - <method name="get_capture_buffer"> - <return type="PoolIntArray"> - </return> - <description> - Returns an [PoolIntArray] containing audio frames from the capture device. - </description> - </method> - <method name="get_capture_position"> - <return type="int"> - </return> - <description> - Returns the write position of the capture device buffer. - </description> - </method> - <method name="get_capture_size"> - <return type="int"> - </return> - <description> - Returns the size of the capture device buffer. - </description> - </method> <method name="get_device_list"> <return type="Array"> </return> <description> - Returns the names of all audio output devices detected on the system. + Returns the names of all audio devices detected on the system. </description> </method> <method name="get_mix_rate" qualifiers="const"> @@ -409,9 +389,6 @@ <member name="bus_count" type="int" setter="set_bus_count" getter="get_bus_count" default="1"> Number of available audio buses. </member> - <member name="capture_device" type="String" setter="capture_set_device" getter="capture_get_device" default=""""> - Name of the current device for audio input (see [method capture_get_device_list]). - </member> <member name="device" type="String" setter="set_device" getter="get_device" default=""Default""> Name of the current device for audio output (see [method get_device_list]). </member> @@ -420,14 +397,6 @@ </member> </members> <signals> - <signal name="audio_mix_callback"> - <description> - </description> - </signal> - <signal name="audio_update_callback"> - <description> - </description> - </signal> <signal name="bus_layout_changed"> <description> Emitted when the [AudioBusLayout] changes. diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index dac00051a9..0a376278f8 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -361,7 +361,7 @@ Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> - Represents the size of the [enum EmissionShape] enum. + Represents the size of the [enum EmissionShape] enum. </constant> </constants> </class> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 7cb6b1b754..d37c4cc76f 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -4,16 +4,61 @@ Dictionary type. </brief_description> <description> - Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. + Dictionary type. Associative container which contains values referenced by unique keys. Dictionary are composed of pairs of keys (which must be unique) and values. You can define a dictionary by placing a comma separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. Erasing elements while iterating over them [b]is not supported[/b]. Creating a dictionary: [codeblock] - var d = {4: 5, "A key": "A value", 28: [1, 2, 3]} + var my_dir = {} # Creates an empty dictionary. + var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} + var my_dir = { + key1: value1, + key2: value2, + key3: value3, + } + [/codeblock] + You can access values of a dictionary by referencing appropriate key in above example [code]points_dir["White"][/code] would return value of 50. + [codeblock] + export(String, "White", "Yellow", "Orange") var my_color + var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} + + func _ready(): + var points = points_dir[my_color] + [/codeblock] + In the above code [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code]. + Dictionaries can contain more complex data: + [codeblock] + my_dir = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key. [/codeblock] To add a key to an existing dictionary, access it like an existing key and assign to it: [codeblock] - d[4] = "hello" # Add integer 4 as a key and assign the String "hello" as its value. - d["Godot"] = 3.01 # Add String "Godot" as a key and assign the value 3.01 to it. + var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} + var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. + [/codeblock] + Finally, dictionaries can contain different types of keys and values in the same dictionary: + [codeblock] + var my_dir = {"String Key": 5, 4: [1, 2, 3], 7: "Hello"} # This is a valid dictionary. + [/codeblock] + [b]Note:[/b] Unlike [Array]s you can't compare dictionaries directly: + [codeblock] + array1 = [1, 2, 3] + array2 = [1, 2, 3] + + func compare_arrays(): + print(array1 == array2) # Will print true. + + dir1 = {"a": 1, "b": 2, "c": 3} + dir2 = {"a": 1, "b": 2, "c": 3} + + func compare_dictionaries(): + print(dir1 == dir2) # Will NOT print true. + [/codeblock] + You need to first calculate the dictionary's hash with [method hash] before you can compare them: + [codeblock] + dir1 = {"a": 1, "b": 2, "c": 3} + dir2 = {"a": 1, "b": 2, "c": 3} + + func compare_dictionaries(): + print(dir1.hash() == dir2.hash()) # Will print true. [/codeblock] </description> <tutorials> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 8fda9c20a5..1729d20e54 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GraphNode" inherits="Container" category="Core" version="3.2"> <brief_description> - A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. + A GraphNode is a container with potentially several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. </brief_description> <description> - A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. - To add a slot to GraphNode, add any [Control]-derived child node to it. + A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes refered to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any [Control]-derived child node to it. + After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further. + In the Inspector you can enable (show) or disable (hide) slots. By default all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections. </description> <tutorials> </tutorials> @@ -192,14 +193,14 @@ </member> <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false"> If [code]true[/code], the user can resize the GraphNode. - [b]Note:[/b] Dragging the handle will only trigger the [signal resize_request] signal, the GraphNode needs to be resized manually. + [b]Note:[/b] Dragging the handle will only emit the [signal resize_request] signal, the GraphNode needs to be resized manually. </member> <member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false"> If [code]true[/code], the GraphNode is selected. </member> <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" default="false"> If [code]true[/code], the close button will be visible. - [b]Note:[/b] Pressing it will only trigger the [signal close_request] signal, the GraphNode needs to be removed manually. + [b]Note:[/b] Pressing it will only emit the [signal close_request] signal, the GraphNode needs to be removed manually. </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> The text displayed in the GraphNode's title bar. diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 612b9ed3f5..8e16d4cb7d 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -285,7 +285,7 @@ <return type="Rect2"> </return> <description> - Returns a [Rect2] enclosing the visible portion of the image. + Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. </description> </method> <method name="get_width" qualifiers="const"> diff --git a/doc/classes/JavaClass.xml b/doc/classes/JavaClass.xml new file mode 100644 index 0000000000..c56f3cd481 --- /dev/null +++ b/doc/classes/JavaClass.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JavaClass" inherits="Reference" category="Core" version="3.2"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml new file mode 100644 index 0000000000..f027ddb975 --- /dev/null +++ b/doc/classes/JavaClassWrapper.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JavaClassWrapper" inherits="Object" category="Core" version="3.2"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="wrap"> + <return type="JavaClass"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml index 46e4176e9f..b193847e92 100644 --- a/doc/classes/KinematicCollision.xml +++ b/doc/classes/KinematicCollision.xml @@ -37,7 +37,7 @@ The colliding body's shape's normal at the point of collision. </member> <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3( 0, 0, 0 )"> - The point of collision. + The point of collision, in global coordinates. </member> <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3( 0, 0, 0 )"> The moving object's remaining movement vector. diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index 4c9337f82d..8860c05d40 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -37,7 +37,7 @@ The colliding body's shape's normal at the point of collision. </member> <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2( 0, 0 )"> - The point of collision. + The point of collision, in global coordinates. </member> <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2( 0, 0 )"> The moving object's remaining movement vector. diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index f584c5207a..7a620ead3b 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -12,8 +12,12 @@ </methods> <members> <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass"> + Sets the [Material] to be used for the next pass. This renders the object again using a different material. + [b]Note:[/b] only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial". </member> <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> + Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. + [b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are sorted based on depth, while transparent objects are sorted from back to front (subject to priority). </member> </members> <constants> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index d52bf4e3bb..e8c1980dd9 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -67,6 +67,10 @@ If [code]true[/code], the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var]. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> + <member name="encode_buffer_max_size" type="int" setter="set_encode_buffer_max_size" getter="get_encode_buffer_max_size" default="8388608"> + Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations. + The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [code]encode_buffer_max_size[/code], the method will error out with [constant ERR_OUT_OF_MEMORY]. + </member> </members> <constants> </constants> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 221214409f..c5a67d5d95 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -468,31 +468,31 @@ <member name="gui/timers/text_edit_idle_detect_sec" type="float" setter="" getter="" default="3"> Timer for detecting idle in the editor (in seconds). </member> - <member name="input/ui_accept" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null), Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null), Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_accept" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_cancel" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_cancel" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_down" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_down" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_end" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_end" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_focus_next" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_focus_next" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_focus_prev" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_focus_prev" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_home" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777229,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_home" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_left" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_left" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_page_down" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777236,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_page_down" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_page_up" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777235,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_page_up" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_right" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_right" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_select" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_select" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_up" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_up" type="Dictionary" setter="" getter=""> </member> <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true"> If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen. @@ -893,8 +893,6 @@ <member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles. </member> - <member name="script" type="Script" setter="" getter=""> - </member> </members> <constants> </constants> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index be9509fda5..673248a3b1 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -4,10 +4,11 @@ A custom shader program. </brief_description> <description> - This class allows you to define a custom shader program that can be used for various materials to render objects. + This class allows you to define a custom shader program that can be used by a [ShaderMaterial]. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/shading/your_first_shader/what_are_shaders.html</link> </tutorials> <methods> <method name="get_default_texture_param" qualifiers="const"> @@ -16,6 +17,8 @@ <argument index="0" name="param" type="String"> </argument> <description> + Returns the texture that is set as default for the specified parameter. + [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> <method name="get_mode" qualifiers="const"> @@ -31,6 +34,8 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the shader has this param defined as a uniform in its code. + [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> <method name="set_default_texture_param"> @@ -41,19 +46,25 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial]. + [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> </methods> <members> <member name="code" type="String" setter="set_code" getter="get_code" default=""""> + Returns the shader's code as the user has written it, not the full generated code used internally. </member> </members> <constants> <constant name="MODE_SPATIAL" value="0" enum="Mode"> + Mode used to draw all 3D objects. </constant> <constant name="MODE_CANVAS_ITEM" value="1" enum="Mode"> + Mode used to draw all 2D objects. </constant> <constant name="MODE_PARTICLES" value="2" enum="Mode"> + Mode used to calculate particle information on a per-particle basis. Not used for drawing. </constant> </constants> </class> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 0f39b703ca..f2742a5453 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -45,7 +45,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Changes the value set for this material of a uniform in the shader. + Changes the value set for this material of a uniform in the shader. [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> </methods> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index df315d7430..912161a5ae 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -16,6 +16,7 @@ <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature"> </argument> <description> + Returns [code]true[/code], if the specifed [enum Feature] is enabled. </description> </method> <method name="get_flag" qualifiers="const"> @@ -24,6 +25,7 @@ <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags"> </argument> <description> + Returns [code]true[/code], if the specified flag is enabled. See [enum Flags] enumerator for options. </description> </method> <method name="get_texture" qualifiers="const"> @@ -32,6 +34,7 @@ <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam"> </argument> <description> + Returns the [Texture] associated with the specified [enum TextureParam]. </description> </method> <method name="set_feature"> @@ -42,6 +45,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], enables the specified [enum Feature]. Many features that are available in [SpatialMaterial]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to [code]true[/code]. </description> </method> <method name="set_flag"> @@ -52,6 +56,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], enables the specified flag. Flags are optional behaviour that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to [code]true[/code]. See [enum Flags] enumerator for options. </description> </method> <method name="set_texture"> @@ -62,6 +67,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets the [Texture] to be used by the specified [enum TextureParam]. This function is called when setting members ending in [code]*_texture[/code]. </description> </method> </methods> @@ -70,86 +76,115 @@ The material's base color. </member> <member name="albedo_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture to multiply by [member albedo_color]. Used for basic texturing of objects. </member> <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy"> The strength of the anisotropy effect. </member> <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. + If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken. </member> <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture"> + Texture that offsets the tangent map for anisotropy calculations. </member> <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], ambient occlusion is enabled. + If [code]true[/code], ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture]. </member> <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect"> + Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic. </member> <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag"> + If [code]true[/code], use [code]UV2[/code] coordinates to look up from the [member ao_texture]. </member> <member name="ao_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that defines the amount of ambient occlusion for a given point on the object. </member> <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="SpatialMaterial.TextureChannel"> + Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat"> + Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect. </member> <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the material. + If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can either by glossy or rough. </member> <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss"> + Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat. </member> <member name="clearcoat_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel. </member> <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled"> + If [code]true[/code], the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping. </member> <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also [member normal_enabled]. </member> <member name="depth_flip_binormal" type="bool" setter="set_depth_deep_parallax_flip_binormal" getter="get_depth_deep_parallax_flip_binormal"> + If [code]true[/code], direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect. </member> <member name="depth_flip_tangent" type="bool" setter="set_depth_deep_parallax_flip_tangent" getter="get_depth_deep_parallax_flip_tangent"> + If [code]true[/code], direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect. </member> <member name="depth_max_layers" type="int" setter="set_depth_deep_parallax_max_layers" getter="get_depth_deep_parallax_max_layers"> + Number of layers to use when using [member depth_deep_parallax] and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. </member> <member name="depth_min_layers" type="int" setter="set_depth_deep_parallax_min_layers" getter="get_depth_deep_parallax_min_layers"> + Number of layers to use when using [member depth_deep_parallax] and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. </member> <member name="depth_scale" type="float" setter="set_depth_scale" getter="get_depth_scale"> + Scales the depth offset effect. A higher number will create a larger depth. </member> <member name="depth_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to determine depth at a given pixel. Depth is always stored in the red channel. </member> <member name="detail_albedo" type="Texture" setter="set_texture" getter="get_texture"> + Texture that specifies the color of the detail overlay. </member> <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="SpatialMaterial.BlendMode"> + Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options. </member> <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures. </member> <member name="detail_mask" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to specify how the detail textures get blended with the base textures. </member> <member name="detail_normal" type="Texture" setter="set_texture" getter="get_texture"> + Texture that specifies the per-pixel normal of the detail overlay. </member> <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV"> + Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options. </member> <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance"> + Distance at which the object fades fully and is no longer visible. </member> <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance"> + Distance at which the object starts to fade. If the object is less than this distance away it will appear normal. </member> <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="SpatialMaterial.DistanceFadeMode" default="0"> + Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s. </member> <member name="emission" type="Color" setter="set_emission" getter="get_emission"> The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], the body emits light. + If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] or [BakedLightmap] is used and this object is used in baked lighting. </member> <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> The emitted light's strength. See [member emission_enabled]. </member> <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag"> + Use [code]UV2[/code] to read from the [member emission_texture]. </member> <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="SpatialMaterial.EmissionOperator"> + Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options. </member> <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that specifies how much surface emits light at a given point. </member> <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> + Forces a conversion of the [member albedo_texture] from sRGB space to linear space. </member> <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the object receives no ambient light. @@ -158,6 +193,7 @@ If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. </member> <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling. </member> <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the object is rendered at the same size regardless of distance. @@ -176,6 +212,7 @@ [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. </member> <member name="flags_use_shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. </member> <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. @@ -187,12 +224,14 @@ The reflectivity of the object's surface. The higher the value, the more light is reflected. </member> <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5"> - General reflectivity amount. + Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources. [b]Note:[/b] unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness]. </member> <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to specify metallic for an object. This is multiplied by [member metallic]. </member> <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel" default="0"> + Specifies the channel of the [member metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], normal mapping is enabled. @@ -201,10 +240,13 @@ The strength of the normal map's effect. </member> <member name="normal_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh]. </member> <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold"> + Threshold at which the alpha scissor will discard values. </member> <member name="params_billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member params_billboard_mode] is [constant BILLBOARD_ENABLED]. </member> <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0"> Controls how the object faces the camera. See [enum BillboardMode]. @@ -229,6 +271,7 @@ Grows object vertices in the direction of their normals. </member> <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width" default="1.0"> + Currently unimplemented in Godot. </member> <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0"> The point size in pixels. See [member flags_use_point_size]. @@ -237,6 +280,7 @@ The method for rendering the specular blob. See [enum SpecularMode]. </member> <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the shader will discard all pixels that have an alpha value less than [member params_alpha_scissor_threshold]. </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. @@ -248,9 +292,10 @@ The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. </member> <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> + Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. </member> <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false"> - If [code]true[/code], the proximity and distance fade effect is enabled. + If [code]true[/code], the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object. </member> <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object. @@ -259,15 +304,19 @@ The strength of the refraction effect. </member> <member name="refraction_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale]. </member> <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="SpatialMaterial.TextureChannel"> + Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="rim" type="float" setter="set_rim" getter="get_rim"> + Sets the strength of the rim lighting effect. </member> <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], rim effect is enabled. + If [code]true[/code], rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. </member> <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim]. </member> <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint"> The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best. @@ -276,8 +325,10 @@ Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic]. </member> <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to control the roughness per-pixel. Multiplied by [member roughness]. </member> <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel" default="0"> + Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. @@ -286,6 +337,7 @@ The strength of the subsurface scattering effect. </member> <member name="subsurf_scatter_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength]. </member> <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission"> The color used by the transmission effect. Represents the light passing through an object. @@ -294,22 +346,31 @@ If [code]true[/code], the transmission effect is enabled. </member> <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to control the transmission effect per-pixel. Added to [member transmission]. </member> <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3( 0, 0, 0 )"> + How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture. </member> <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3( 1, 1, 1 )"> + How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function. </member> <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], instead of using [code]UV[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. </member> <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" default="1.0"> + A lower number blends the texture more softly while a higher number blends the texture more sharply. </member> <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3( 0, 0, 0 )"> + How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture. </member> <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3( 1, 1, 1 )"> + How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function. </member> <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], instead of using [code]UV2[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. </member> <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" default="1.0"> + A lower number blends the texture more softly while a higher number blends the texture more sharply. </member> <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the model's vertex colors are processed as sRGB mode. @@ -320,79 +381,112 @@ </members> <constants> <constant name="TEXTURE_ALBEDO" value="0" enum="TextureParam"> + Texture specifying per-pixel color. </constant> <constant name="TEXTURE_METALLIC" value="1" enum="TextureParam"> + Texture specifying per-pixel metallic value. </constant> <constant name="TEXTURE_ROUGHNESS" value="2" enum="TextureParam"> + Texture specifying per-pixel roughness value. </constant> <constant name="TEXTURE_EMISSION" value="3" enum="TextureParam"> + Texture specifying per-pixel emission color. </constant> <constant name="TEXTURE_NORMAL" value="4" enum="TextureParam"> + Texture specifying per-pixel normal vector. </constant> <constant name="TEXTURE_RIM" value="5" enum="TextureParam"> + Texture specifying per-pixel rim value. </constant> <constant name="TEXTURE_CLEARCOAT" value="6" enum="TextureParam"> + Texture specifying per-pixel clearcoat value. </constant> <constant name="TEXTURE_FLOWMAP" value="7" enum="TextureParam"> + Texture specifying per-pixel flowmap direction for use with [member anisotropy]. </constant> <constant name="TEXTURE_AMBIENT_OCCLUSION" value="8" enum="TextureParam"> + Texture specifying per-pixel ambient occlusion value. </constant> <constant name="TEXTURE_DEPTH" value="9" enum="TextureParam"> + Texture specifying per-pixel depth. </constant> <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10" enum="TextureParam"> + Texture specifying per-pixel subsurface scattering. </constant> <constant name="TEXTURE_TRANSMISSION" value="11" enum="TextureParam"> + Texture specifying per-pixel transmission color. </constant> <constant name="TEXTURE_REFRACTION" value="12" enum="TextureParam"> + Texture specifying per-pixel refraction strength. </constant> <constant name="TEXTURE_DETAIL_MASK" value="13" enum="TextureParam"> + Texture specifying per-pixel detail mask blending value. </constant> <constant name="TEXTURE_DETAIL_ALBEDO" value="14" enum="TextureParam"> + Texture specifying per-pixel detail color. </constant> <constant name="TEXTURE_DETAIL_NORMAL" value="15" enum="TextureParam"> + Texture specifying per-pixel detail normal. </constant> <constant name="TEXTURE_MAX" value="16" enum="TextureParam"> Represents the size of the [enum TextureParam] enum. </constant> <constant name="DETAIL_UV_1" value="0" enum="DetailUV"> + Use [code]UV[/code] with the detail texture. </constant> <constant name="DETAIL_UV_2" value="1" enum="DetailUV"> + Use [code]UV2[/code] with the detail texture. </constant> <constant name="FEATURE_TRANSPARENT" value="0" enum="Feature"> + Constant for setting [member flags_transparent]. </constant> <constant name="FEATURE_EMISSION" value="1" enum="Feature"> + Constant for setting [member emission_enabled]. </constant> <constant name="FEATURE_NORMAL_MAPPING" value="2" enum="Feature"> + Constant for setting [member normal_enabled]. </constant> <constant name="FEATURE_RIM" value="3" enum="Feature"> + Constant for setting [member rim_enabled]. </constant> <constant name="FEATURE_CLEARCOAT" value="4" enum="Feature"> + Constant for setting [member clearcoat_enabled]. </constant> <constant name="FEATURE_ANISOTROPY" value="5" enum="Feature"> + Constant for setting [member anisotropy_enabled]. </constant> <constant name="FEATURE_AMBIENT_OCCLUSION" value="6" enum="Feature"> + Constant for setting [member ao_enabled]. </constant> <constant name="FEATURE_DEPTH_MAPPING" value="7" enum="Feature"> + Constant for setting [member depth_enabled]. </constant> <constant name="FEATURE_SUBSURACE_SCATTERING" value="8" enum="Feature"> + Constant for setting [member subsurf_scatter_enabled]. </constant> <constant name="FEATURE_TRANSMISSION" value="9" enum="Feature"> + Constant for setting [member transmission_enabled]. </constant> <constant name="FEATURE_REFRACTION" value="10" enum="Feature"> + Constant for setting [member refraction_enabled]. </constant> <constant name="FEATURE_DETAIL" value="11" enum="Feature"> + Constant for setting [member detail_enabled]. </constant> <constant name="FEATURE_MAX" value="12" enum="Feature"> Represents the size of the [enum Feature] enum. </constant> <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode"> - Default blend mode. + Default blend mode. The color of the object is blended over the background based on the object's alpha value. </constant> <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode"> + The color of the object is added to the background. </constant> <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode"> + The color of the object is subtracted from the background. </constant> <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode"> + The color of the object is multiplied by the background. </constant> <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0" enum="DepthDrawMode"> Default depth draw mode. Depth is drawn only for opaque objects. @@ -416,42 +510,61 @@ No culling is performed. </constant> <constant name="FLAG_UNSHADED" value="0" enum="Flags"> + No lighting is used on the object. Color comes directly from [code]ALBEDO[/code]. </constant> <constant name="FLAG_USE_VERTEX_LIGHTING" value="1" enum="Flags"> + Lighting is calculated per-vertex rather than per-pixel. This can be used to increase the speed of the shader at the cost of quality. </constant> <constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="Flags"> + Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. </constant> <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="3" enum="Flags"> + Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh. </constant> <constant name="FLAG_SRGB_VERTEX_COLOR" value="4" enum="Flags"> + Vertex color is in sRGB space and needs to be converted to linear. Only applies in the GLES3 renderer. </constant> <constant name="FLAG_USE_POINT_SIZE" value="5" enum="Flags"> + Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use [code]POINT_COORD[/code] instead of [code]UV[/code]. </constant> <constant name="FLAG_FIXED_SIZE" value="6" enum="Flags"> + Object is scaled by depth so that it always appears the same size on screen. </constant> <constant name="FLAG_BILLBOARD_KEEP_SCALE" value="7" enum="Flags"> + Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member params_billboard_mode] is [constant BILLBOARD_ENABLED]. </constant> <constant name="FLAG_UV1_USE_TRIPLANAR" value="8" enum="Flags"> + Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code]. </constant> <constant name="FLAG_UV2_USE_TRIPLANAR" value="9" enum="Flags"> + Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code]. </constant> <constant name="FLAG_AO_ON_UV2" value="11" enum="Flags"> + Use [code]UV2[/code] coordinates to look up from the [member ao_texture]. </constant> <constant name="FLAG_EMISSION_ON_UV2" value="12" enum="Flags"> + Use [code]UV2[/code] coordinates to look up from the [member emission_texture]. </constant> <constant name="FLAG_USE_ALPHA_SCISSOR" value="13" enum="Flags"> + Use alpha scissor. Set by [member params_use_alpha_scissor]. </constant> <constant name="FLAG_TRIPLANAR_USE_WORLD" value="10" enum="Flags"> + Use world coordinates in the triplanar texture lookup instead of local coordinates. </constant> <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="14" enum="Flags"> + Forces the shader to convert albedo from sRGB space to linear space. </constant> <constant name="FLAG_DONT_RECEIVE_SHADOWS" value="15" enum="Flags"> + Disables receiving shadows from other objects. </constant> <constant name="FLAG_DISABLE_AMBIENT_LIGHT" value="17" enum="Flags"> + Disables receiving ambient light. </constant> <constant name="FLAG_ENSURE_CORRECT_NORMALS" value="16" enum="Flags"> + Ensures that normals appear correct, even with non-uniform scaling. </constant> <constant name="FLAG_USE_SHADOW_TO_OPACITY" value="18" enum="Flags"> + Enables the shadow to opacity feature. </constant> <constant name="FLAG_MAX" value="19" enum="Flags"> Represents the size of the [enum Flags] enum. @@ -499,26 +612,37 @@ Used for particle systems. Enables particle animation options. </constant> <constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel"> + Used to read from the red channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_GREEN" value="1" enum="TextureChannel"> + Used to read from the green channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_BLUE" value="2" enum="TextureChannel"> + Used to read from the blue channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_ALPHA" value="3" enum="TextureChannel"> + Used to read from the alpha channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4" enum="TextureChannel"> + Currently unused. </constant> <constant name="EMISSION_OP_ADD" value="0" enum="EmissionOperator"> + Adds the emission color to the color from the emission texture. </constant> <constant name="EMISSION_OP_MULTIPLY" value="1" enum="EmissionOperator"> + Multiplies the emission color by the color from the emission texture. </constant> <constant name="DISTANCE_FADE_DISABLED" value="0" enum="DistanceFadeMode"> + Do not use distance fade. </constant> <constant name="DISTANCE_FADE_PIXEL_ALPHA" value="1" enum="DistanceFadeMode"> + Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel. </constant> <constant name="DISTANCE_FADE_PIXEL_DITHER" value="2" enum="DistanceFadeMode"> + Smoothly fades the object out based on each pixel's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA]. </constant> <constant name="DISTANCE_FADE_OBJECT_DITHER" value="3" enum="DistanceFadeMode"> + Smoothly fades the object out based on the object's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA]. </constant> </constants> </class> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 3e4b68d91d..9e8eb3314d 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -37,6 +37,7 @@ <members> <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" default="false"> If [code]true[/code], the timer will automatically start when entering the scene tree. + [b]Note:[/b] This property is automatically set to [code]false[/code] after the timer enters the scene tree and starts. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" default="false"> If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart. diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 4b07bf00ee..18fc70516e 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -149,7 +149,7 @@ class State: getter = property.get("getter") or None default_value = property.get("default") or None if default_value is not None: - default_value = escape_rst(default_value) + default_value = '``{}``'.format(default_value) overridden = property.get("override") or False property_def = PropertyDef(property_name, type_name, setter, getter, property.text, default_value, overridden) diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp index ff9d866aee..10581a460c 100644 --- a/drivers/alsamidi/midi_driver_alsamidi.cpp +++ b/drivers/alsamidi/midi_driver_alsamidi.cpp @@ -128,6 +128,7 @@ Error MIDIDriverALSAMidi::open() { snd_device_name_free_hint(hints); mutex = Mutex::create(); + exit_thread = false; thread = Thread::create(MIDIDriverALSAMidi::thread_func, this); return OK; diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index 1e97100a32..c67e90c1df 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -233,11 +233,11 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon, if (result == noErr) { for (unsigned int i = 0; i < inNumberFrames * ad->capture_channels; i++) { int32_t sample = ad->input_buf[i] << 16; - ad->capture_buffer_write(sample); + ad->input_buffer_write(sample); if (ad->capture_channels == 1) { - // In case capture device is single channel convert it to Stereo - ad->capture_buffer_write(sample); + // In case input device is single channel convert it to Stereo + ad->input_buffer_write(sample); } } } else { @@ -487,7 +487,7 @@ void AudioDriverCoreAudio::capture_finish() { Error AudioDriverCoreAudio::capture_start() { - capture_buffer_init(buffer_frames); + input_buffer_init(buffer_frames); OSStatus result = AudioOutputUnitStart(input_unit); if (result != noErr) { @@ -642,9 +642,9 @@ void AudioDriverCoreAudio::_set_device(const String &device, bool capture) { ERR_FAIL_COND(result != noErr); if (capture) { - // Reset audio capture to keep synchronisation. - capture_position = 0; - capture_size = 0; + // Reset audio input to keep synchronisation. + input_position = 0; + input_size = 0; } } } diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 6b1574bbbd..a315684ce9 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -557,15 +557,16 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance glGenTextures(1, &rpi->cubemap); glBindTexture(GL_TEXTURE_CUBE_MAP, rpi->cubemap); -#if 1 - //Mobile hardware (PowerVR specially) prefers this approach, the other one kills the game + + // Mobile hardware (PowerVR specially) prefers this approach, + // the previous approach with manual lod levels kills the game. for (int i = 0; i < 6; i++) { glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, internal_format, size, size, 0, format, type, NULL); } glGenerateMipmap(GL_TEXTURE_CUBE_MAP); - //Generate framebuffers for rendering + // Generate framebuffers for rendering for (int i = 0; i < 6; i++) { glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]); glBindTexture(GL_TEXTURE_2D, rpi->color[i]); @@ -576,34 +577,6 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance ERR_CONTINUE(status != GL_FRAMEBUFFER_COMPLETE); } -#else - int lod = 0; - - //the approach below is fatal for powervr - - // Set the initial (empty) mipmaps, all need to be set for this to work in GLES2, even if they won't be used later. - while (size >= 1) { - - for (int i = 0; i < 6; i++) { - glTexImage2D(_cube_side_enum[i], lod, internal_format, size, size, 0, format, type, NULL); - if (size == rpi->current_resolution) { - //adjust framebuffer - glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], rpi->cubemap, 0); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rpi->depth); - -#ifdef DEBUG_ENABLED - GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); - ERR_CONTINUE(status != GL_FRAMEBUFFER_COMPLETE); -#endif - } - } - - lod++; - - size >>= 1; - } -#endif glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 7980c43517..c633d17cca 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -1206,32 +1206,21 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra GLenum type = GL_UNSIGNED_BYTE; // Set the initial (empty) mipmaps -#if 1 - //Mobile hardware (PowerVR specially) prefers this approach, the other one kills the game + // Mobile hardware (PowerVR specially) prefers this approach, + // the previous approach with manual lod levels kills the game. for (int i = 0; i < 6; i++) { glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, internal_format, size, size, 0, format, type, NULL); } glGenerateMipmap(GL_TEXTURE_CUBE_MAP); - //no filters for now + + // No filters for now glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -#else - while (size >= 1) { - - for (int i = 0; i < 6; i++) { - glTexImage2D(_cube_side_enum[i], lod, internal_format, size, size, 0, format, type, NULL); - } - - lod++; - - size >>= 1; - } -#endif - //framebuffer + // Framebuffer glBindFramebuffer(GL_FRAMEBUFFER, resources.mipmap_blur_fbo); diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index ef2c318807..a24147146f 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -339,8 +339,6 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target, const Re RasterizerStorageGLES3::RenderTarget *rt = storage->render_target_owner.getornull(p_render_target); ERR_FAIL_COND(!rt); -#if 1 - Size2 win_size = OS::get_singleton()->get_window_size(); if (rt->external.fbo != 0) { glBindFramebuffer(GL_READ_FRAMEBUFFER, rt->external.fbo); @@ -350,21 +348,6 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target, const Re glReadBuffer(GL_COLOR_ATTACHMENT0); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, RasterizerStorageGLES3::system_fbo); glBlitFramebuffer(0, 0, rt->width, rt->height, p_screen_rect.position.x, win_size.height - p_screen_rect.position.y - p_screen_rect.size.height, p_screen_rect.position.x + p_screen_rect.size.width, win_size.height - p_screen_rect.position.y, GL_COLOR_BUFFER_BIT, GL_NEAREST); - -#else - canvas->canvas_begin(); - glDisable(GL_BLEND); - glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES3::system_fbo); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, rt->color); - //glBindTexture(GL_TEXTURE_2D, rt->effects.mip_maps[0].color); - glActiveTexture(GL_TEXTURE1); - glBindTexture(GL_TEXTURE_2D, storage->resources.normal_tex); - - canvas->draw_generic_textured_rect(p_screen_rect, Rect2(0, 0, 1, -1)); - glBindTexture(GL_TEXTURE_2D, 0); - canvas->canvas_end(); -#endif } void RasterizerGLES3::output_lens_distorted_to_screen(RID p_render_target, const Rect2 &p_screen_rect, float p_k1, float p_k2, const Vector2 &p_eye_center, float p_oversample) { diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 0ed2637a11..c9ee2a18ef 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1146,47 +1146,6 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m state.current_depth_draw = p_material->shader->spatial.depth_draw_mode; } -#if 0 - //blend mode - if (state.current_blend_mode!=p_material->shader->spatial.blend_mode) { - - switch(p_material->shader->spatial.blend_mode) { - - case RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_MIX: { - glBlendEquation(GL_FUNC_ADD); - if (storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) { - glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - } else { - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - - } break; - case RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_ADD: { - - glBlendEquation(GL_FUNC_ADD); - glBlendFunc(p_alpha_pass?GL_SRC_ALPHA:GL_ONE,GL_ONE); - - } break; - case RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_SUB: { - - glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); - glBlendFunc(GL_SRC_ALPHA,GL_ONE); - } break; - case RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_MUL: { - glBlendEquation(GL_FUNC_ADD); - if (storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) { - glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - } else { - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - - } break; - } - - state.current_blend_mode=p_material->shader->spatial.blend_mode; - - } -#endif //material parameters state.scene_shader.set_custom_shader(p_material->shader->custom_code_id); @@ -3007,16 +2966,6 @@ void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_c li->light_index = state.spot_light_count; copymem(&state.spot_array_tmp[li->light_index * state.ubo_light_size], &ubo_data, state.ubo_light_size); state.spot_light_count++; - -#if 0 - if (li->light_ptr->shadow_enabled) { - CameraMatrix bias; - bias.set_light_bias(); - Transform modelview=Transform(camera_transform_inverse * li->transform).inverse(); - li->shadow_projection[0] = bias * li->projection * modelview; - lights_use_shadow=true; - } -#endif } break; } diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 801763609e..712120c7f4 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -1834,7 +1834,7 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra glGenFramebuffers(1, &tmp_fb); glBindFramebuffer(GL_FRAMEBUFFER, tmp_fb); - int size = 64; + int size = 32; bool use_float = config.framebuffer_half_float_supported; @@ -1854,6 +1854,24 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, sky->irradiance, 0); + GLuint tmp_fb2; + GLuint tmp_tex; + { + //generate another one for rendering, as can't read and write from a single texarray it seems + glGenFramebuffers(1, &tmp_fb2); + glBindFramebuffer(GL_FRAMEBUFFER, tmp_fb2); + glGenTextures(1, &tmp_tex); + glBindTexture(GL_TEXTURE_2D, tmp_tex); + glTexImage2D(GL_TEXTURE_2D, 0, internal_format, p_radiance_size, 2.0 * p_radiance_size, 0, format, type, NULL); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tmp_tex, 0); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); +#ifdef DEBUG_ENABLED + GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + ERR_FAIL_COND(status != GL_FRAMEBUFFER_COMPLETE); +#endif + } + shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_DUAL_PARABOLOID, true); shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_SOURCE_PANORAMA, true); shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::COMPUTE_IRRADIANCE, true); @@ -1863,8 +1881,10 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra // level that corresponds to a panorama of 1024x512 shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_MIP_LEVEL, MAX(Math::floor(Math::log(float(texture->width)) / Math::log(2.0f)) - 10.0f, 0.0f)); + // Compute Irradiance for a large texture, specified by radiance size and then pull out a low mipmap corresponding to 32x32 + int vp_size = p_radiance_size; for (int i = 0; i < 2; i++) { - glViewport(0, i * size, size, size); + glViewport(0, i * vp_size, vp_size, vp_size); glBindVertexArray(resources.quadie_array); shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::Z_FLIP, i > 0); @@ -1872,13 +1892,32 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glBindVertexArray(0); } + glGenerateMipmap(GL_TEXTURE_2D); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, tmp_tex); + glBindFramebuffer(GL_FRAMEBUFFER, tmp_fb); shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_DUAL_PARABOLOID, false); shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_SOURCE_PANORAMA, false); shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::COMPUTE_IRRADIANCE, false); + shaders.copy.set_conditional(CopyShaderGLES3::USE_LOD, true); + shaders.copy.bind(); + shaders.copy.set_uniform(CopyShaderGLES3::MIP_LEVEL, MAX(Math::floor(Math::log(float(p_radiance_size)) / Math::log(2.0f)) - 5.0f, 0.0f)); // Mip level that corresponds to a 32x32 texture + + glViewport(0, 0, size, size * 2.0); + glBindVertexArray(resources.quadie_array); + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + glBindVertexArray(0); + + shaders.copy.set_conditional(CopyShaderGLES3::USE_LOD, false); + glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES3::system_fbo); + glActiveTexture(GL_TEXTURE0); + glBindTexture(texture->target, texture->tex_id); glDeleteFramebuffers(1, &tmp_fb); + glDeleteFramebuffers(1, &tmp_fb2); + glDeleteTextures(1, &tmp_tex); } // Now compute radiance @@ -1955,7 +1994,6 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D_ARRAY, sky->radiance); shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_ARRAY_INDEX, j - 1); //read from previous to ensure better blur - shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_RESOLUTION, float(size / 2)); } for (int i = 0; i < 2; i++) { @@ -2085,7 +2123,6 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, sky->radiance); shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_MIP_LEVEL, float(lod - 1)); //read from previous to ensure better blur - shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_RESOLUTION, float(size)); } for (int i = 0; i < 2; i++) { diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 121a7f60f4..f43943bdff 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -400,7 +400,7 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener for (int i = 0; i < max_uniforms; i++) { r_gen_code.uniforms += uniform_defines[i]; } -#if 1 + // add up int offset = 0; for (int i = 0; i < uniform_sizes.size(); i++) { @@ -420,45 +420,6 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener if (r_gen_code.uniform_total_size % 16 != 0) { //UBO sizes must be multiples of 16 r_gen_code.uniform_total_size += r_gen_code.uniform_total_size % 16; } -#else - // add up - for (int i = 0; i < uniform_sizes.size(); i++) { - - if (i > 0) { - - int align = uniform_sizes[i - 1] % uniform_alignments[i]; - if (align != 0) { - uniform_sizes[i - 1] += uniform_alignments[i] - align; - } - - uniform_sizes[i] = uniform_sizes[i] + uniform_sizes[i - 1]; - } - } - //offset - r_gen_code.uniform_offsets.resize(uniform_sizes.size()); - for (int i = 0; i < uniform_sizes.size(); i++) { - - if (i > 0) - r_gen_code.uniform_offsets[i] = uniform_sizes[i - 1]; - else - r_gen_code.uniform_offsets[i] = 0; - } - /* - for(Map<StringName,SL::ShaderNode::Uniform>::Element *E=pnode->uniforms.front();E;E=E->next()) { - - if (SL::is_sampler_type(E->get().type)) { - continue; - } - - } - -*/ - if (uniform_sizes.size()) { - r_gen_code.uniform_total_size = uniform_sizes[uniform_sizes.size() - 1]; - } else { - r_gen_code.uniform_total_size = 0; - } -#endif for (Map<StringName, SL::ShaderNode::Varying>::Element *E = pnode->varyings.front(); E; E = E->next()) { diff --git a/drivers/gles3/shaders/copy.glsl b/drivers/gles3/shaders/copy.glsl index 1952e201aa..a3cdb3a543 100644 --- a/drivers/gles3/shaders/copy.glsl +++ b/drivers/gles3/shaders/copy.glsl @@ -104,6 +104,10 @@ uniform sampler2D CbCr; //texunit:1 /* clang-format on */ +#ifdef USE_LOD +uniform float mip_level; +#endif + #if defined(USE_TEXTURE3D) || defined(USE_TEXTURE2DARRAY) uniform float layer; #endif @@ -190,8 +194,12 @@ void main() { color.gb = textureLod(CbCr, uv_interp, 0.0).rg - vec2(0.5, 0.5); color.a = 1.0; #else +#ifdef USE_LOD + vec4 color = textureLod(source, uv_interp, mip_level); +#else vec4 color = textureLod(source, uv_interp, 0.0); #endif +#endif #ifdef LINEAR_TO_SRGB // regular Linear -> SRGB conversion diff --git a/drivers/gles3/shaders/cubemap_filter.glsl b/drivers/gles3/shaders/cubemap_filter.glsl index 3f3313c3a7..e1872eb433 100644 --- a/drivers/gles3/shaders/cubemap_filter.glsl +++ b/drivers/gles3/shaders/cubemap_filter.glsl @@ -23,6 +23,7 @@ precision highp int; #ifdef USE_SOURCE_PANORAMA uniform sampler2D source_panorama; //texunit:0 +uniform float source_resolution; #endif #ifdef USE_SOURCE_DUAL_PARABOLOID_ARRAY @@ -44,7 +45,6 @@ uniform samplerCube source_cube; //texunit:0 uniform int face_id; uniform float roughness; -uniform float source_resolution; in highp vec2 uv_interp; @@ -183,12 +183,12 @@ vec2 Hammersley(uint i, uint N) { #ifdef LOW_QUALITY #define SAMPLE_COUNT 64u -#define SAMPLE_DELTA 0.05 +#define SAMPLE_DELTA 0.1 #else #define SAMPLE_COUNT 512u -#define SAMPLE_DELTA 0.01 +#define SAMPLE_DELTA 0.03 #endif @@ -332,6 +332,7 @@ void main() { if (ndotl > 0.0) { +#ifdef USE_SOURCE_PANORAMA float D = DistributionGGX(N, H, roughness); float ndoth = max(dot(N, H), 0.0); float hdotv = max(dot(H, V), 0.0); @@ -342,17 +343,14 @@ void main() { float mipLevel = roughness == 0.0 ? 0.0 : 0.5 * log2(saSample / saTexel); -#ifdef USE_SOURCE_PANORAMA sum.rgb += texturePanorama(L, source_panorama, mipLevel).rgb * ndotl; #endif #ifdef USE_SOURCE_DUAL_PARABOLOID_ARRAY - sum.rgb += textureDualParaboloidArray(L).rgb * ndotl; #endif #ifdef USE_SOURCE_DUAL_PARABOLOID - sum.rgb += textureDualParaboloid(L).rgb * ndotl; #endif diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index a330dbef77..a45ac2eb8a 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1224,35 +1224,6 @@ in highp float dp_clip; #endif -#if 0 -// need to save texture depth for this -vec3 light_transmittance(float translucency,vec3 light_vec, vec3 normal, vec3 pos, float distance) { - - float scale = 8.25 * (1.0 - translucency) / subsurface_scatter_width; - float d = scale * distance; - - /** - * Armed with the thickness, we can now calculate the color by means of the - * precalculated transmittance profile. - * (It can be precomputed into a texture, for maximum performance): - */ - float dd = -d * d; - vec3 profile = - vec3(0.233, 0.455, 0.649) * exp(dd / 0.0064) + - vec3(0.1, 0.336, 0.344) * exp(dd / 0.0484) + - vec3(0.118, 0.198, 0.0) * exp(dd / 0.187) + - vec3(0.113, 0.007, 0.007) * exp(dd / 0.567) + - vec3(0.358, 0.004, 0.0) * exp(dd / 1.99) + - vec3(0.078, 0.0, 0.0) * exp(dd / 7.41); - - /** - * Using the profile, we finally approximate the transmitted lighting from - * the back of the object: - */ - return profile * clamp(0.3 + dot(light_vec, normal),0.0,1.0); -} -#endif - void light_process_omni(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float metallic, float specular, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light, inout float alpha) { vec3 light_rel_vec = omni_lights[idx].light_pos_inv_radius.xyz - vertex; diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index 68487c7805..524f0363a1 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -229,8 +229,8 @@ Error AudioDriverPulseAudio::init_device() { samples_out.resize(pa_buffer_size); // Reset audio input to keep synchronisation. - capture_position = 0; - capture_size = 0; + input_position = 0; + input_size = 0; return OK; } @@ -465,7 +465,7 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) { size_t bytes = pa_stream_readable_size(ad->pa_rec_str); if (bytes > 0) { const void *ptr = NULL; - size_t maxbytes = ad->capture_buffer.size() * sizeof(int16_t); + size_t maxbytes = ad->input_buffer.size() * sizeof(int16_t); bytes = MIN(bytes, maxbytes); ret = pa_stream_peek(ad->pa_rec_str, &ptr, &bytes); @@ -475,11 +475,11 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) { int16_t *srcptr = (int16_t *)ptr; for (size_t i = bytes >> 1; i > 0; i--) { int32_t sample = int32_t(*srcptr++) << 16; - ad->capture_buffer_write(sample); + ad->input_buffer_write(sample); if (ad->pa_rec_map.channels == 1) { - // In case capture device is single channel convert it to Stereo - ad->capture_buffer_write(sample); + // In case input device is single channel convert it to Stereo + ad->input_buffer_write(sample); } } @@ -666,7 +666,7 @@ Error AudioDriverPulseAudio::capture_init_device() { break; default: - WARN_PRINTS("PulseAudio: Unsupported number of capture channels: " + itos(pa_rec_map.channels)); + WARN_PRINTS("PulseAudio: Unsupported number of input channels: " + itos(pa_rec_map.channels)); pa_channel_map_init_stereo(&pa_rec_map); break; } @@ -698,10 +698,10 @@ Error AudioDriverPulseAudio::capture_init_device() { ERR_FAIL_V(ERR_CANT_OPEN); } - capture_buffer_init(input_buffer_frames); + input_buffer_init(input_buffer_frames); - print_verbose("PulseAudio: detected " + itos(pa_rec_map.channels) + " capture channels"); - print_verbose("PulseAudio: capture buffer frames: " + itos(input_buffer_frames) + " calculated latency: " + itos(input_buffer_frames * 1000 / mix_rate) + "ms"); + print_verbose("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); + print_verbose("PulseAudio: input buffer frames: " + itos(input_buffer_frames) + " calculated latency: " + itos(input_buffer_frames * 1000 / mix_rate) + "ms"); return OK; } diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index 8b342fb416..9a05284aea 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -342,8 +342,8 @@ Error AudioDriverWASAPI::init_render_device(bool reinit) { // Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels) samples_in.resize(buffer_frames * channels); - capture_position = 0; - capture_size = 0; + input_position = 0; + input_size = 0; print_verbose("WASAPI: detected " + itos(channels) + " channels"); print_verbose("WASAPI: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); @@ -362,7 +362,7 @@ Error AudioDriverWASAPI::init_capture_device(bool reinit) { HRESULT hr = audio_input.audio_client->GetBufferSize(&max_frames); ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); - capture_buffer_init(max_frames); + input_buffer_init(max_frames); return OK; } @@ -715,8 +715,8 @@ void AudioDriverWASAPI::thread_func(void *p_udata) { } } - ad->capture_buffer_write(l); - ad->capture_buffer_write(r); + ad->input_buffer_write(l); + ad->input_buffer_write(r); } read_frames += num_frames_available; diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 2514663b4c..af2760e82b 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -491,26 +491,6 @@ void AnimationBezierTrackEdit::_notification(int p_what) { } draw_rect(Rect2(bs_from, bs_to - bs_from), bs); } - -#if 0 - // KEYFAMES // - - { - - float scale = timeline->get_zoom_scale(); - 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->get_moving_selection_offset(); - } - offset = offset * scale + limit; - draw_key(i, scale, int(offset), editor->is_key_selected(track, i), limit, limit_end); - } - } -#endif } } diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index f6d5312fc7..22a5298d5c 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -4838,25 +4838,6 @@ struct _AnimMoveRestore { void AnimationTrackEditor::_clear_key_edit() { if (key_edit) { - -#if 0 - // going back seems like the most comfortable thing to do, but it results - // in weird behaviors and crashes, because going back to animation editor - // triggers the editor setting up again itself - - bool go_back = false; - if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == key_edit) { - EditorNode::get_singleton()->push_item(NULL); - go_back = true; - } - - memdelete(key_edit); - key_edit = NULL; - - if (go_back) { - EditorNode::get_singleton()->get_inspector_dock()->go_back(); - } -#else //if key edit is the object being inspected, remove it first if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == key_edit || EditorNode::get_singleton()->get_inspector()->get_edited_object() == multi_key_edit) { @@ -4871,7 +4852,6 @@ void AnimationTrackEditor::_clear_key_edit() { memdelete(multi_key_edit); multi_key_edit = NULL; } -#endif } } diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index ea9bf508f1..f9f8761247 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -280,13 +280,27 @@ void DocData::generate(bool p_basic_types) { prop.overridden = inherited; bool default_value_valid = false; - Variant default_value = get_documentation_default_value(name, E->get().name, default_value_valid); + Variant default_value; - 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 (name == "ProjectSettings") { + // Special case for project settings, so that settings are not taken from the current project's settings + if (E->get().name == "script" || + ProjectSettings::get_singleton()->get_order(E->get().name) >= ProjectSettings::NO_BUILTIN_ORDER_BASE) { continue; + } + if (E->get().usage & PROPERTY_USAGE_EDITOR) { + default_value = ProjectSettings::get_singleton()->property_get_revert(E->get().name); + default_value_valid = true; + } + } else { + default_value = get_documentation_default_value(name, E->get().name, default_value_valid); + + 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) + continue; + } } if (default_value_valid && default_value.get_type() != Variant::OBJECT) { diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 365238222f..3f773c646a 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1249,7 +1249,7 @@ void EditorAudioBuses::_load_default_layout() { String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); - Ref<AudioBusLayout> state = ResourceLoader::load(layout_path); + Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", true); if (state.is_null()) { EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path)); return; @@ -1266,7 +1266,7 @@ void EditorAudioBuses::_load_default_layout() { void EditorAudioBuses::_file_dialog_callback(const String &p_string) { if (file_dialog->get_mode() == EditorFileDialog::MODE_OPEN_FILE) { - Ref<AudioBusLayout> state = ResourceLoader::load(p_string); + Ref<AudioBusLayout> state = ResourceLoader::load(p_string, "", true); if (state.is_null()) { EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); return; @@ -1404,7 +1404,7 @@ void EditorAudioBuses::open_layout(const String &p_path) { EditorNode::get_singleton()->make_bottom_panel_item_visible(this); - Ref<AudioBusLayout> state = ResourceLoader::load(p_path); + Ref<AudioBusLayout> state = ResourceLoader::load(p_path, "", true); if (state.is_null()) { EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); return; diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index d538c7c23d..f0d69f98fb 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -150,6 +150,7 @@ void EditorPath::_bind_methods() { EditorPath::EditorPath(EditorHistory *p_history) { history = p_history; + set_clip_text(true); set_text_align(ALIGN_LEFT); get_popup()->connect("about_to_show", this, "_about_to_show"); get_popup()->connect("id_pressed", this, "_id_pressed"); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 2cacc767c8..621f531687 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1218,7 +1218,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Ref<Theme> create_custom_theme(const Ref<Theme> p_theme) { Ref<Theme> theme; - String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme"); + const String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme"); if (custom_theme != "") { theme = ResourceLoader::load(custom_theme); } diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 86a4a9ef47..4ab90ad3e4 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -828,8 +828,8 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result> // If there are unsaved changes, the user will be asked on focus, // however that means either losing changes or losing replaces. - FileAccess *f = FileAccess::open(fpath, FileAccess::READ); - ERR_FAIL_COND_MSG(f == NULL, "Cannot open file from path '" + fpath + "'."); + FileAccessRef f = FileAccess::open(fpath, FileAccess::READ); + ERR_FAIL_COND_MSG(!f, "Cannot open file from path '" + fpath + "'."); String buffer; int current_line = 1; diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index cab317990e..0774d0b5dc 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -32,18 +32,15 @@ #include "core/io/resource_saver.h" #include "editor/editor_node.h" -#include "scene/resources/packed_scene.h" - #include "scene/3d/collision_shape.h" #include "scene/3d/mesh_instance.h" #include "scene/3d/navigation.h" #include "scene/3d/physics_body.h" -#include "scene/3d/portal.h" -#include "scene/3d/room_instance.h" #include "scene/3d/vehicle_body.h" #include "scene/animation/animation_player.h" #include "scene/resources/animation.h" #include "scene/resources/box_shape.h" +#include "scene/resources/packed_scene.h" #include "scene/resources/plane_shape.h" #include "scene/resources/ray_shape.h" #include "scene/resources/resource_format_text.h" diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp index 20b8b3f5cb..c53c5f330b 100644 --- a/editor/node_dock.cpp +++ b/editor/node_dock.cpp @@ -105,6 +105,7 @@ NodeDock::NodeDock() { connections_button->set_toggle_mode(true); connections_button->set_pressed(true); connections_button->set_h_size_flags(SIZE_EXPAND_FILL); + connections_button->set_clip_text(true); mode_hb->add_child(connections_button); connections_button->connect("pressed", this, "show_connections"); @@ -113,6 +114,7 @@ NodeDock::NodeDock() { groups_button->set_toggle_mode(true); groups_button->set_pressed(false); groups_button->set_h_size_flags(SIZE_EXPAND_FILL); + groups_button->set_clip_text(true); mode_hb->add_child(groups_button); groups_button->connect("pressed", this, "show_groups"); diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 28667abe77..07b87633a9 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -77,16 +77,19 @@ void PluginConfigDialog::_on_confirmed() { if (lang_name == GDScriptLanguage::get_singleton()->get_name()) { // Hard-coded GDScript template to keep usability until we use script templates. - Ref<GDScript> gdscript = memnew(GDScript); + Ref<Script> gdscript = memnew(GDScript); gdscript->set_source_code( "tool\n" "extends EditorPlugin\n" "\n" - "func _enter_tree():\n" - "\tpass\n" "\n" - "func _exit_tree():\n" - "\tpass\n"); + "func _enter_tree()%VOID_RETURN%:\n" + "%TS%pass\n" + "\n" + "\n" + "func _exit_tree()%VOID_RETURN%:\n" + "%TS%pass\n"); + GDScriptLanguage::get_singleton()->make_template("", "", gdscript); String script_path = path.plus_file(script_edit->get_text()); gdscript->set_path(script_path); ResourceSaver::save(script_path, gdscript); diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index def3f4bfec..2de224c043 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -147,7 +147,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() { node->add_child(name); node->set_slot(0, false, 0, Color(), true, 0, get_color("font_color", "Label")); name->connect("text_entered", this, "_node_renamed", varray(agnode)); - name->connect("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode)); + name->connect("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode), CONNECT_DEFERRED); base = 1; node->set_show_close_button(true); node->connect("close_request", this, "_delete_request", varray(E->get()), CONNECT_DEFERRED); diff --git a/editor/plugins/animation_tree_player_editor_plugin.cpp b/editor/plugins/animation_tree_player_editor_plugin.cpp index a85def5c6d..2b365feec5 100644 --- a/editor/plugins/animation_tree_player_editor_plugin.cpp +++ b/editor/plugins/animation_tree_player_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "core/os/input.h" #include "core/os/keyboard.h" #include "core/project_settings.h" +#include "editor/editor_scale.h" #include "scene/gui/menu_button.h" #include "scene/gui/panel.h" #include "scene/main/viewport.h" @@ -923,17 +924,18 @@ void AnimationTreePlayerEditor::_notification(int p_what) { _draw_cos_line(source, dest, col); } + const Ref<Font> f = get_font("font", "Label"); + const Point2 status_offset = Point2(5, 25) * EDSCALE + Point2(0, f->get_ascent()); + switch (anim_tree->get_last_error()) { case AnimationTreePlayer::CONNECT_OK: { - Ref<Font> f = get_font("font", "Label"); - f->draw(get_canvas_item(), Point2(5, 25 + f->get_ascent()), TTR("Animation tree is valid."), Color(0, 1, 0.6, 0.8)); + f->draw(get_canvas_item(), status_offset, TTR("Animation tree is valid."), Color(0, 1, 0.6, 0.8)); } break; default: { - Ref<Font> f = get_font("font", "Label"); - f->draw(get_canvas_item(), Point2(5, 25 + f->get_ascent()), TTR("Animation tree is invalid."), Color(1, 0.6, 0.0, 0.8)); + f->draw(get_canvas_item(), status_offset, TTR("Animation tree is invalid."), Color(1, 0.6, 0.0, 0.8)); } break; } @@ -1300,7 +1302,7 @@ AnimationTreePlayerEditor::AnimationTreePlayerEditor() { p->connect("id_pressed", this, "_add_menu_item"); play_button = memnew(Button); - play_button->set_position(Point2(25, 0)); + play_button->set_position(Point2(25, 0) * EDSCALE); play_button->set_size(Point2(25, 15)); add_child(play_button); play_button->set_toggle_mode(true); @@ -1439,7 +1441,7 @@ AnimationTreePlayerEditorPlugin::AnimationTreePlayerEditorPlugin(EditorNode *p_n editor = p_node; anim_tree_editor = memnew(AnimationTreePlayerEditor); - anim_tree_editor->set_custom_minimum_size(Size2(0, 300)); + anim_tree_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE); button = editor->add_bottom_panel_item(TTR("AnimationTree"), anim_tree_editor); button->hide(); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index bdef108ef2..4f73a5eaea 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -162,7 +162,7 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const Ref<Image> overlay = get_icon("PlayOverlay", "EditorIcons")->get_data(); Ref<Image> thumbnail = p_image->get_data(); thumbnail = thumbnail->duplicate(); - Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width() / 2) / 2, (thumbnail->get_height() - overlay->get_height() / 2) / 2); + Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2); // Overlay and thumbnail need the same format for `blend_rect` to work. thumbnail->convert(Image::FORMAT_RGBA8); @@ -435,7 +435,10 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) { String::humanize_size(download->get_body_size()))); } else { // Total file size is unknown, so it cannot be displayed. - status->set_text(TTR("Downloading...")); + progress->set_modulate(Color(0, 0, 0, 0)); + status->set_text(vformat( + TTR("Downloading...") + " (%s)", + String::humanize_size(download->get_downloaded_bytes()))); } } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 437a6722d0..f798714812 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1750,8 +1750,18 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) { Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse(); - Point2 drag_to_snapped_begin = snap_point(xform.affine_inverse().xform(current_begin) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item); - Point2 drag_to_snapped_end = snap_point(xform.affine_inverse().xform(current_end) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item); + Point2 drag_to_snapped_begin; + Point2 drag_to_snapped_end; + + // last call decides which snapping lines are drawn + if (drag_type == DRAG_LEFT || drag_type == DRAG_TOP || drag_type == DRAG_TOP_LEFT) { + drag_to_snapped_end = snap_point(xform.affine_inverse().xform(current_end) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item); + drag_to_snapped_begin = snap_point(xform.affine_inverse().xform(current_begin) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item); + } else { + drag_to_snapped_begin = snap_point(xform.affine_inverse().xform(current_begin) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item); + drag_to_snapped_end = snap_point(xform.affine_inverse().xform(current_end) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item); + } + Point2 drag_begin = xform.xform(drag_to_snapped_begin); Point2 drag_end = xform.xform(drag_to_snapped_end); @@ -4236,7 +4246,7 @@ void CanvasItemEditor::_button_zoom_minus() { } void CanvasItemEditor::_button_zoom_reset() { - _zoom_on_position(1.0 * EDSCALE, viewport_scrollable->get_size() / 2.0); + _zoom_on_position(1.0 * MAX(1, EDSCALE), viewport_scrollable->get_size() / 2.0); } void CanvasItemEditor::_button_zoom_plus() { @@ -5038,7 +5048,7 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) { if (state.has("zoom")) { // Compensate the editor scale, so that the editor scale can be changed // and the zoom level will still be the same (relative to the editor scale). - zoom = float(p_state["zoom"]) * EDSCALE; + zoom = float(p_state["zoom"]) * MAX(1, EDSCALE); _update_zoom_label(); } diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index f5ea88eeae..6757b180a3 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -474,69 +474,6 @@ void SpriteEditor::_add_as_sibling_or_child(Node *p_own_node, Node *p_new_node) p_new_node->set_owner(this->get_tree()->get_edited_scene_root()); } -#if 0 -void SpriteEditor::_create_uv_lines() { - - Ref<Mesh> sprite = node->get_sprite(); - ERR_FAIL_COND(!sprite.is_valid()); - - Set<SpriteEditorEdgeSort> edges; - uv_lines.clear(); - for (int i = 0; i < sprite->get_surface_count(); i++) { - if (sprite->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) - continue; - Array a = sprite->surface_get_arrays(i); - - PoolVector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2]; - if (uv.size() == 0) { - err_dialog->set_text(TTR("Model has no UV in this layer")); - err_dialog->popup_centered_minsize(); - return; - } - - PoolVector<Vector2>::Read r = uv.read(); - - PoolVector<int> indices = a[Mesh::ARRAY_INDEX]; - PoolVector<int>::Read ri; - - int ic; - bool use_indices; - - if (indices.size()) { - ic = indices.size(); - ri = indices.read(); - use_indices = true; - } else { - ic = uv.size(); - use_indices = false; - } - - for (int j = 0; j < ic; j += 3) { - - for (int k = 0; k < 3; k++) { - - SpriteEditorEdgeSort edge; - if (use_indices) { - edge.a = r[ri[j + k]]; - edge.b = r[ri[j + ((k + 1) % 3)]]; - } else { - edge.a = r[j + k]; - edge.b = r[j + ((k + 1) % 3)]; - } - - if (edges.has(edge)) - continue; - - uv_lines.push_back(edge.a); - uv_lines.push_back(edge.b); - edges.insert(edge); - } - } - } - - debug_uv_dialog->popup_centered_minsize(); -} -#endif void SpriteEditor::_debug_uv_draw() { Ref<Texture> tex = node->get_texture(); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index f9b1e3b43a..ce6bb4b91a 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -1010,12 +1010,12 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { zoom_hb->add_child(zoom_out); zoom_reset = memnew(ToolButton); - zoom_out->set_tooltip(TTR("Zoom Reset")); + zoom_reset->set_tooltip(TTR("Zoom Reset")); zoom_reset->connect("pressed", this, "_zoom_reset"); zoom_hb->add_child(zoom_reset); zoom_in = memnew(ToolButton); - zoom_out->set_tooltip(TTR("Zoom In")); + zoom_in->set_tooltip(TTR("Zoom In")); zoom_in->connect("pressed", this, "_zoom_in"); zoom_hb->add_child(zoom_in); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index ca3431d3ec..30e31cb530 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1313,7 +1313,9 @@ void ProjectList::create_project_item_control(int p_index) { hb->set_is_favorite(item.favorite); TextureRect *tf = memnew(TextureRect); - tf->set_texture(get_icon("DefaultProjectIcon", "EditorIcons")); + // The project icon may not be loaded by the time the control is displayed, + // so use a loading placeholder. + tf->set_texture(get_icon("ProjectIconLoading", "EditorIcons")); if (item.missing) { tf->set_modulate(Color(1, 1, 1, 0.5)); } @@ -2419,12 +2421,11 @@ ProjectManager::ProjectManager() { FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files")); set_anchors_and_margins_preset(Control::PRESET_WIDE); - set_theme(create_editor_theme()); + set_theme(create_custom_theme()); gui_base = memnew(Control); add_child(gui_base); gui_base->set_anchors_and_margins_preset(Control::PRESET_WIDE); - gui_base->set_theme(create_custom_theme()); Panel *panel = memnew(Panel); gui_base->add_child(panel); diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index ce37b9e7f6..32fcdab4c6 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -109,14 +109,8 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und const int feature_min_height = 160 * EDSCALE; - Ref<Theme> collapse_theme = create_editor_theme(); - collapse_theme->set_icon("checked", "CheckBox", collapse_theme->get_icon("GuiTreeArrowDown", "EditorIcons")); - collapse_theme->set_icon("unchecked", "CheckBox", collapse_theme->get_icon("GuiTreeArrowRight", "EditorIcons")); - - CheckBox *chk_collapse_features = memnew(CheckBox); + CheckButton *chk_collapse_features = memnew(CheckButton); chk_collapse_features->set_text(TTR("Advanced Options")); - chk_collapse_features->set_theme(collapse_theme); - chk_collapse_features->set_focus_mode(FOCUS_NONE); vbc->add_child(chk_collapse_features); tabc_features = memnew(TabContainer); diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index 89713c2579..c94b0eeab0 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -44,11 +44,9 @@ #include "scene/3d/navigation_mesh.h" #include "scene/3d/particles.h" #include "scene/3d/physics_joint.h" -#include "scene/3d/portal.h" #include "scene/3d/position_3d.h" #include "scene/3d/ray_cast.h" #include "scene/3d/reflection_probe.h" -#include "scene/3d/room_instance.h" #include "scene/3d/soft_body.h" #include "scene/3d/spring_arm.h" #include "scene/3d/sprite_3d.h" @@ -885,7 +883,7 @@ void LightSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, int p_idx, d = Math::stepify(d, SpatialEditor::get_singleton()->get_translate_snap()); } - if (d < 0) + if (d <= 0) // Equal is here for negative zero. d = 0; light->set_param(Light::PARAM_RANGE, d); @@ -1951,112 +1949,6 @@ void PhysicalBoneSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { p_gizmo->add_lines(points, material); } -// FIXME: Kept as reference for reimplementation in 3.1+ -#if 0 - -void RoomSpatialGizmo::redraw() { - - clear(); - Ref<RoomBounds> roomie = room->get_room(); - if (roomie.is_null()) - return; - PoolVector<Face3> faces = roomie->get_geometry_hint(); - - Vector<Vector3> lines; - int fc = faces.size(); - PoolVector<Face3>::Read r = faces.read(); - - Map<_EdgeKey, Vector3> edge_map; - - for (int i = 0; i < fc; i++) { - - Vector3 fn = r[i].get_plane().normal; - - for (int j = 0; j < 3; j++) { - - _EdgeKey ek; - ek.from = r[i].vertex[j].snapped(Vector3(CMP_EPSILON, CMP_EPSILON, CMP_EPSILON)); - ek.to = r[i].vertex[(j + 1) % 3].snapped(Vector3(CMP_EPSILON, CMP_EPSILON, CMP_EPSILON)); - if (ek.from < ek.to) - SWAP(ek.from, ek.to); - - Map<_EdgeKey, Vector3>::Element *E = edge_map.find(ek); - - if (E) { - - if (E->get().dot(fn) > 0.9) { - - E->get() = Vector3(); - } - - } else { - - edge_map[ek] = fn; - } - } - } - - for (Map<_EdgeKey, Vector3>::Element *E = edge_map.front(); E; E = E->next()) { - - if (E->get() != Vector3()) { - lines.push_back(E->key().from); - lines.push_back(E->key().to); - } - } - - add_lines(lines, EditorSpatialGizmos::singleton->room_material); - add_collision_segments(lines); -} - -RoomSpatialGizmo::RoomSpatialGizmo(Room *p_room) { - - set_spatial_node(p_room); - room = p_room; -} - -///// - -void PortalSpatialGizmo::redraw() { - - clear(); - - Vector<Point2> points = portal->get_shape(); - if (points.size() == 0) { - return; - } - - Vector<Vector3> lines; - - Vector3 center; - for (int i = 0; i < points.size(); i++) { - - Vector3 f; - f.x = points[i].x; - f.y = points[i].y; - Vector3 fn; - fn.x = points[(i + 1) % points.size()].x; - fn.y = points[(i + 1) % points.size()].y; - center += f; - - lines.push_back(f); - lines.push_back(fn); - } - - center /= points.size(); - lines.push_back(center); - lines.push_back(center + Vector3(0, 0, 1)); - - add_lines(lines, EditorSpatialGizmos::singleton->portal_material); - add_collision_segments(lines); -} - -PortalSpatialGizmo::PortalSpatialGizmo(Portal *p_portal) { - - set_spatial_node(p_portal); - portal = p_portal; -} - -#endif ///// RayCastSpatialGizmoPlugin::RayCastSpatialGizmoPlugin() { diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h index 1d6801a136..81b62981ac 100644 --- a/editor/spatial_editor_gizmos.h +++ b/editor/spatial_editor_gizmos.h @@ -160,19 +160,6 @@ public: PhysicalBoneSpatialGizmoPlugin(); }; -#if 0 -class PortalSpatialGizmo : public EditorSpatialGizmo { - - GDCLASS(PortalSpatialGizmo, EditorSpatialGizmo); - - Portal *portal; - -public: - void redraw(); - PortalSpatialGizmo(Portal *p_portal = NULL); -}; -#endif - class RayCastSpatialGizmoPlugin : public EditorSpatialGizmoPlugin { GDCLASS(RayCastSpatialGizmoPlugin, EditorSpatialGizmoPlugin); diff --git a/editor/translations/af.po b/editor/translations/af.po index 129fe3e6aa..9e9f07b064 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -7394,6 +7394,10 @@ 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 "" diff --git a/editor/translations/ar.po b/editor/translations/ar.po index 1fa1ceb069..8eed29764d 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -7554,6 +7554,10 @@ 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 "" diff --git a/editor/translations/bg.po b/editor/translations/bg.po index adf1218188..f5f4b0071d 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -7444,6 +7444,10 @@ 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 "Свободен Изглед Отляво" diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 6c4abed64b..eb2f1b5b22 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -7845,6 +7845,10 @@ 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 "বাম দিকে ফ্রিলুক করুন" diff --git a/editor/translations/ca.po b/editor/translations/ca.po index 047ab04858..9902c8a736 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -7433,6 +7433,10 @@ msgid "Cinematic Preview" msgstr "Previsualització Cinemàtica" #: 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 "Vista Lliure Esquerra" diff --git a/editor/translations/cs.po b/editor/translations/cs.po index 2ed1e15d3d..9c8c99d251 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -7371,6 +7371,10 @@ 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 "Volný pohled doleva" diff --git a/editor/translations/da.po b/editor/translations/da.po index 3f36d56975..1851018836 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -7549,6 +7549,10 @@ msgid "Cinematic Preview" msgstr "Opretter Maske Forhåndsvisninger" #: 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 "" diff --git a/editor/translations/de.po b/editor/translations/de.po index 0285643cde..60b086ffe6 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -52,7 +52,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-13 13:36+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+0000\n" "Last-Translator: So Wieso <sowieso@dukun.de>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" @@ -61,7 +61,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.1\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1985,9 +1985,8 @@ msgid "Inherited by:" msgstr "Vererbt an:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Beschreibung:" +msgstr "Beschreibung" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -2008,14 +2007,12 @@ msgid "Properties" msgstr "Eigenschaften" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Überschreibungen" +msgstr "Überschreibungen:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Standard" +msgstr "Standard:" #: editor/editor_help.cpp msgid "Methods" @@ -2038,9 +2035,8 @@ msgid "Property Descriptions" msgstr "Eigenschaften-Beschreibung" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Wert" +msgstr "(Wert)" #: editor/editor_help.cpp msgid "" @@ -7361,6 +7357,10 @@ msgid "Cinematic Preview" msgstr "Cinematische Vorschau" #: 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 "Freisicht Links" diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po index 1c2ef6990a..bfa4c18d1f 100644 --- a/editor/translations/de_CH.po +++ b/editor/translations/de_CH.po @@ -7384,6 +7384,10 @@ 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 "" diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index 21b718b405..5a69173c37 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -7048,6 +7048,10 @@ 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 "" diff --git a/editor/translations/el.po b/editor/translations/el.po index fd426b4614..0c1313d388 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -7338,6 +7338,10 @@ 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 "Ελεύθερο κοίταγμα αριστερά" diff --git a/editor/translations/eo.po b/editor/translations/eo.po index 032ef20e91..c2acb4613b 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -7166,6 +7166,10 @@ 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 "" diff --git a/editor/translations/es.po b/editor/translations/es.po index 52d555bef1..3e76fcf75f 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -46,7 +46,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-16 22:23+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+0000\n" "Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" @@ -55,7 +55,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.2-dev\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1982,9 +1982,8 @@ msgid "Inherited by:" msgstr "Heredada por:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Descripción:" +msgstr "Descripción" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -2005,14 +2004,12 @@ msgid "Properties" msgstr "Propiedades" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Sobreescritura" +msgstr "anulación:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Predeterminado" +msgstr "predeterminado:" #: editor/editor_help.cpp msgid "Methods" @@ -2035,9 +2032,8 @@ msgid "Property Descriptions" msgstr "Descripción de Propiedades" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Valor" +msgstr "(valor)" #: editor/editor_help.cpp msgid "" @@ -5368,7 +5364,7 @@ msgid "" "Overrides game camera with editor viewport camera." msgstr "" "Reemplazar Cámara del Juego\n" -"Reemplaza la cámara del juego con la cámara del viewport del editor." +"Reemplaza la cámara del juego por la cámara del viewport del editor." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5377,7 +5373,7 @@ msgid "" "No game instance running." msgstr "" "Reemplazar Cámara del Juego\n" -"No hay ninguna instancia de juego ejecutándose." +"No hay ninguna instancia del juego en ejecución." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -7354,6 +7350,10 @@ msgid "Cinematic Preview" msgstr "Vista Previa Cinemática" #: 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 "Vista Libre Izquierda" @@ -10100,7 +10100,7 @@ msgstr "Evento de Acción de Entrada Movido" #: editor/project_settings_editor.cpp msgid "Override for Feature" -msgstr "Sobrescribir la Característica" +msgstr "Anulación de la Característica" #: editor/project_settings_editor.cpp msgid "Add Translation" @@ -10148,7 +10148,7 @@ msgstr "General" #: editor/project_settings_editor.cpp msgid "Override For..." -msgstr "Sustituir por..." +msgstr "Anulación de..." #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "The editor must be restarted for changes to take effect." @@ -10844,7 +10844,7 @@ msgstr "Error al cargar script desde %s" #: editor/script_create_dialog.cpp msgid "Overrides" -msgstr "Sobreescritura" +msgstr "Anulaciones" #: editor/script_create_dialog.cpp msgid "N/A" @@ -11510,7 +11510,7 @@ msgstr "Añadir Puerto de Salida" #: modules/visual_script/visual_script_editor.cpp msgid "Override an existing built-in function." -msgstr "Sobrescribir una función incorporada existente." +msgstr "Anular una función integrada existente." #: modules/visual_script/visual_script_editor.cpp msgid "Create a new function." diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index 35c5c515fb..62c54c7f8c 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -7320,6 +7320,10 @@ msgid "Cinematic Preview" msgstr "Vista Previa Cinemática" #: 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 "Vista Libre A La Izquierda" diff --git a/editor/translations/et.po b/editor/translations/et.po index aab6358e01..e1fd30d97e 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -7068,6 +7068,10 @@ 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 "" diff --git a/editor/translations/eu.po b/editor/translations/eu.po index 403016ba49..7431e5407f 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -7053,6 +7053,10 @@ 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 "" diff --git a/editor/translations/fa.po b/editor/translations/fa.po index 72c8596b7f..bc5adb4ce0 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -7483,6 +7483,10 @@ 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 "" diff --git a/editor/translations/fi.po b/editor/translations/fi.po index 55729dc95f..11f8a2a611 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-16 22:24+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+0000\n" "Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/" "godot/fi/>\n" @@ -23,7 +23,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.2-dev\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1936,9 +1936,8 @@ msgid "Inherited by:" msgstr "Perivät:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Kuvaus:" +msgstr "Kuvaus" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1959,14 +1958,12 @@ msgid "Properties" msgstr "Ominaisuudet" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Ylikirjoittaa" +msgstr "ylikirjoita:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Oletus" +msgstr "oletus:" #: editor/editor_help.cpp msgid "Methods" @@ -1989,9 +1986,8 @@ msgid "Property Descriptions" msgstr "Ominaisuuksien kuvaukset" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Arvo" +msgstr "(arvo)" #: editor/editor_help.cpp msgid "" @@ -7276,6 +7272,10 @@ msgid "Cinematic Preview" msgstr "Elokuvallinen esikatselu" #: 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 "Liiku vasemmalle" diff --git a/editor/translations/fil.po b/editor/translations/fil.po index 5d069ac803..db6c34ffe8 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -7068,6 +7068,10 @@ 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 "" diff --git a/editor/translations/fr.po b/editor/translations/fr.po index 799709c4b8..010380ae58 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -7399,6 +7399,10 @@ msgid "Cinematic Preview" msgstr "Aperçu cinématographique" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Not available when using the GLES2 renderer." +msgstr "Non disponible quand le moteur de rendu GLES2 est utilisé." + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" msgstr "Vue libre gauche" diff --git a/editor/translations/ga.po b/editor/translations/ga.po index 5ae3963052..c21203046c 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -7061,6 +7061,10 @@ 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 "" diff --git a/editor/translations/he.po b/editor/translations/he.po index 592952ad3c..f316738641 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -7476,6 +7476,10 @@ 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 "" diff --git a/editor/translations/hi.po b/editor/translations/hi.po index dbdbc182ec..65b542cbfe 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -7260,6 +7260,10 @@ 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 "" diff --git a/editor/translations/hr.po b/editor/translations/hr.po index 3b477c74fb..97b2df1bc2 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -7092,6 +7092,10 @@ 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 "" diff --git a/editor/translations/hu.po b/editor/translations/hu.po index cbf3298e16..b7a1a08cad 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -7646,6 +7646,10 @@ msgid "Cinematic Preview" msgstr "Háló Előnézetek Létrehozása" #: 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 "" diff --git a/editor/translations/id.po b/editor/translations/id.po index 66847a39ac..e73d9c355d 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -7329,6 +7329,10 @@ msgid "Cinematic Preview" msgstr "Pratinjau Sinematik" #: 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 "TampilanBebas Kiri" diff --git a/editor/translations/is.po b/editor/translations/is.po index 9a70a1051c..529051be32 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -7130,6 +7130,10 @@ 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 "" diff --git a/editor/translations/it.po b/editor/translations/it.po index c025271c39..571281ead8 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -7357,6 +7357,10 @@ msgid "Cinematic Preview" msgstr "Anteprima Cinematografica" #: 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 "Vista Libera Sinistra" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index cd98aaa199..546c4c3e12 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -7301,6 +7301,10 @@ 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 "フリールック左" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index 9f3631d0d9..f19630502b 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -7289,6 +7289,10 @@ 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 "" diff --git a/editor/translations/ko.po b/editor/translations/ko.po index 5b234a28ee..8e5b32a895 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-16 22:23+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+0000\n" "Last-Translator: 송태섭 <xotjq237@gmail.com>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" @@ -28,7 +28,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 3.10.2-dev\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1934,9 +1934,8 @@ msgid "Inherited by:" msgstr "상속한 클래스:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "설명:" +msgstr "설명" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1957,14 +1956,12 @@ msgid "Properties" 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" @@ -1987,9 +1984,8 @@ msgid "Property Descriptions" msgstr "속성 설명" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "값" +msgstr "(값)" #: editor/editor_help.cpp msgid "" @@ -7237,6 +7233,10 @@ 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 "자유 시점 왼쪽으로 가기" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index 233f6a850e..5a156470d8 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -7265,6 +7265,10 @@ 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 "" diff --git a/editor/translations/lv.po b/editor/translations/lv.po index e255b6edfc..2cecc5ae11 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -7247,6 +7247,10 @@ 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 "" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index 4359913c26..e2b6df89b4 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -7046,6 +7046,10 @@ 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 "" diff --git a/editor/translations/ml.po b/editor/translations/ml.po index ed53a3535c..e7ffab4f18 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -7061,6 +7061,10 @@ 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 "" diff --git a/editor/translations/mr.po b/editor/translations/mr.po index 2094400280..a4bdd7f18a 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -7053,6 +7053,10 @@ 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 "" diff --git a/editor/translations/ms.po b/editor/translations/ms.po index b2433b0a2f..50895dcaae 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -7100,6 +7100,10 @@ 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 "" diff --git a/editor/translations/nb.po b/editor/translations/nb.po index 2768de9c40..5b57604bc9 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -7728,6 +7728,10 @@ msgid "Cinematic Preview" msgstr "Lager Forhåndsvisning av Mesh" #: 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 "" diff --git a/editor/translations/nl.po b/editor/translations/nl.po index 1b59654e9d..423d10d264 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-01-12 13:26+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+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" @@ -53,7 +53,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.1\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1230,9 +1230,8 @@ msgid "Error opening package file, not in ZIP format." msgstr "Fout bij het openen van het pakketbestand, geen zip-formaat." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (Already Exists)" -msgstr "Bestaat al" +msgstr "%s (bestaat al)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1243,9 +1242,8 @@ msgid "The following files failed extraction from package:" msgstr "De volgende bestanden konden niet worden uitgepakt:" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "And %s more files." -msgstr "nog %d bestand(en)" +msgstr "En nog %s bestand(en)." #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "Package installed successfully!" @@ -1257,9 +1255,8 @@ msgid "Success!" msgstr "Gelukt!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "Inhoud:" +msgstr "Pakketinhoud:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" @@ -1399,9 +1396,8 @@ msgid "Invalid file, not an audio bus layout." msgstr "Ongeldig bestand, geen audiobus layout." #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "Error bij het opslaan van bestand!" +msgstr "Fout bij het opslaan van bestand: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -1532,7 +1528,7 @@ msgstr "Singleton" #: editor/editor_data.cpp msgid "Updating Scene" -msgstr "Scene aan het Updaten" +msgstr "Scène aan het bijwerken" #: editor/editor_data.cpp msgid "Storing local changes..." @@ -1540,7 +1536,7 @@ msgstr "Lokale wijziging aan het opslaan..." #: editor/editor_data.cpp msgid "Updating scene..." -msgstr "Scene aan het updaten..." +msgstr "Scène aan het bijwerken..." #: editor/editor_data.cpp editor/editor_properties.cpp msgid "[empty]" @@ -1654,7 +1650,7 @@ msgstr "Asset bibliotheek" #: editor/editor_feature_profile.cpp msgid "Scene Tree Editing" -msgstr "Scene structuur bewerking" +msgstr "Scèneboombewerking" #: editor/editor_feature_profile.cpp msgid "Import Dock" @@ -1976,9 +1972,8 @@ msgid "Inherited by:" msgstr "Geërfd door:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Omschrijving:" +msgstr "Beschrijving" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1999,14 +1994,12 @@ msgid "Properties" msgstr "Eigenschappen" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Overschrijvers" +msgstr "overschreven:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Standaard" +msgstr "standaard:" #: editor/editor_help.cpp msgid "Methods" @@ -2029,9 +2022,8 @@ msgid "Property Descriptions" msgstr "Eigenschap Beschrijvingen" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Waarde" +msgstr "(waarde)" #: editor/editor_help.cpp msgid "" @@ -2220,8 +2212,8 @@ msgid "" "This resource can't be saved because it does not belong to the edited scene. " "Make it unique first." msgstr "" -"Deze hulpbron kan niet bewaard worden omdat ze geen deel uitmaakt van de " -"bewerkte scene. Maak ze eerst alleenstaand." +"Deze hulpbron kan niet opgeslagen worden omdat het niet bij de bewerkte " +"scène hoort. Maak het eerst uniek." #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." @@ -2262,7 +2254,7 @@ msgstr "Fout tijdens het laden van '%s'." #: editor/editor_node.cpp msgid "Saving Scene" -msgstr "Scene Aan Het Opslaan" +msgstr "Scène aan het opslaan" #: editor/editor_node.cpp msgid "Analyzing" @@ -2281,7 +2273,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 "" -"Deze scene kan niet opgeslagen worden vanwege een cyclische instantiëring.\n" +"Deze scène kan niet opgeslagen worden omdat er een cyclische instantiëring " +"aanwezig is.\n" "Opslaan is pas mogelijk als dit opgelost wordt." #: editor/editor_node.cpp @@ -2289,12 +2282,12 @@ msgid "" "Couldn't save scene. Likely dependencies (instances or inheritance) couldn't " "be satisfied." msgstr "" -"Kon de scene niet opslaan. Waarschijnlijk konden afhankelijkheden " +"Kon de scène niet opslaan. Waarschijnlijk konden afhankelijkheden " "(instanties of erfelijkheden) niet voldaan worden." #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" -msgstr "Kan geen scenes overschrijven die nog open zijn!" +msgstr "Kan geen scènes overschrijven die nog open zijn!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" @@ -2318,7 +2311,7 @@ msgstr "Error bij het opslaan van layout!" #: editor/editor_node.cpp msgid "Default editor layout overridden." -msgstr "Standaard editor layout overschreven." +msgstr "Standaard editorindeling overschreven." #: editor/editor_node.cpp msgid "Layout name not found!" @@ -2345,7 +2338,7 @@ msgid "" msgstr "" "Dit bestand hoort bij een scene die geïnstantieerd of overgeërfd werd.\n" "Aanpassingen zullen niet worden behouden bij het opslaan van de huidige " -"scene." +"scène." #: editor/editor_node.cpp msgid "" @@ -2365,7 +2358,7 @@ msgstr "" "Deze scene werd geïmporteerd, dus aanpassingen zullen niet worden behouden.\n" "Door het te instantiëren of over te erven kunnen er wijzigingen worden " "aangebracht.\n" -"Lees de documentatie met betrekking tot importeren van scenes om dit proces " +"Lees de documentatie met betrekking tot importeren van scènes om dit proces " "beter te begrijpen." #: editor/editor_node.cpp @@ -2380,11 +2373,11 @@ msgstr "" #: editor/editor_node.cpp msgid "There is no defined scene to run." -msgstr "Er is geen startscene gedefinieerd." +msgstr "Er is geen startscène ingesteld." #: editor/editor_node.cpp msgid "Current scene was never saved, please save it prior to running." -msgstr "De huidige scene werd nooit opgeslagen, sla ze op voor het uitvoeren." +msgstr "De huidige scène is nooit opgeslagen, sla het op voor het uitvoeren." #: editor/editor_node.cpp msgid "Could not start subprocess!" @@ -2392,11 +2385,11 @@ msgstr "Kon het subproces niet opstarten!" #: editor/editor_node.cpp editor/filesystem_dock.cpp msgid "Open Scene" -msgstr "Scene Openen" +msgstr "Scène openen" #: editor/editor_node.cpp msgid "Open Base Scene" -msgstr "Open Basisscene" +msgstr "Basisscène openen" #: editor/editor_node.cpp msgid "Quick Open..." @@ -2404,7 +2397,7 @@ msgstr "Snel Openen..." #: editor/editor_node.cpp msgid "Quick Open Scene..." -msgstr "Open Scene Snel..." +msgstr "Scène snel openen..." #: editor/editor_node.cpp msgid "Quick Open Script..." @@ -2428,7 +2421,7 @@ msgstr "Een wortelknoop is nodig om de scène op te slaan." #: editor/editor_node.cpp msgid "Save Scene As..." -msgstr "Sla Scene Op Als..." +msgstr "Scène opslaan als..." #: editor/editor_node.cpp msgid "No" @@ -2444,7 +2437,7 @@ msgstr "Deze scene is nooit opgeslagen. Sla op voor het uitvoeren?" #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "This operation can't be done without a scene." -msgstr "Deze operatie kan niet uitgevoerd worden zonder scene." +msgstr "Deze operatie kan niet uitgevoerd worden zonder scène." #: editor/editor_node.cpp msgid "Export Mesh Library" @@ -2465,11 +2458,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Current scene not saved. Open anyway?" -msgstr "De huidige scene is nog niet opgeslagen. Toch openen?" +msgstr "De huidige scène is niet opgeslagen. Toch openen?" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." -msgstr "Een scene die nooit opgeslagen is kan je niet opnieuw laden." +msgstr "Een scène die nooit opgeslagen is kan niet opnieuw laden worden." #: editor/editor_node.cpp msgid "Revert" @@ -2481,7 +2474,7 @@ msgstr "Deze actie kan niet ongedaan gemaakt worden. Toch herstellen?" #: editor/editor_node.cpp msgid "Quick Run Scene..." -msgstr "Snel Scene Uitvoeren..." +msgstr "Scène snel starten..." #: editor/editor_node.cpp msgid "Quit" @@ -2489,7 +2482,7 @@ msgstr "Afsluiten" #: editor/editor_node.cpp msgid "Exit the editor?" -msgstr "Sluit de editor af?" +msgstr "Editor afsluiten?" #: editor/editor_node.cpp msgid "Open Project Manager?" @@ -2501,8 +2494,7 @@ msgstr "Opslaan & Afsluiten" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "" -"Wil je de wijzigen aan de volgende scene(s) opslaan voor het afsluiten?" +msgstr "Wijzigen aan de volgende scène(s) opslaan voor het afsluiten?" #: editor/editor_node.cpp msgid "Save changes the following scene(s) before opening Project Manager?" @@ -2519,15 +2511,15 @@ msgstr "" #: editor/editor_node.cpp msgid "Pick a Main Scene" -msgstr "Kies een Hoofdscene" +msgstr "Kies een startscène" #: editor/editor_node.cpp msgid "Close Scene" -msgstr "Scene Sluiten" +msgstr "Scène sluiten" #: editor/editor_node.cpp msgid "Reopen Closed Scene" -msgstr "Gesloten Scène Opnieuw Openen" +msgstr "Gesloten scène heropenen" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." @@ -2583,7 +2575,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" -msgstr "De scene '%s' heeft kapotte afhankelijkheden:" +msgstr "De scène '%s' heeft verbroken afhankelijkheden:" #: editor/editor_node.cpp msgid "Clear Recent Scenes" @@ -2595,9 +2587,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"Er is nooit een hoofdscene gekozen, wil je er een selecteren?\n" -"Je kan dit later nog aanpassen in \"Projectinstellingen\" onder de categorie " -"'toepassing'." +"Er is nooit een startscène gekozen, wil je er een selecteren?\n" +"Je kan dit later nog aanpassen in Project→Projectinstellingen→Application." #: editor/editor_node.cpp msgid "" @@ -2606,8 +2597,7 @@ msgid "" "category." msgstr "" "De geselecteerde scene '%s' bestaat niet, selecteer een andere?\n" -"Je kan dit later aanpassen in \"Projectinstellingen\" onder de categorie " -"'toepassing'." +"Je kan dit later nog aanpassen in Project→Projectinstellingen→Application." #: editor/editor_node.cpp msgid "" @@ -2615,9 +2605,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"De geselecteerde scene '%s' is geen scenebestand, selecteer een andere?\n" -"Je kan dit later aanpassen in \"Projectinstellingen\" onder de categorie " -"'toepassing'." +"De geselecteerde scene '%s' is geen scènebestand, selecteer een andere?\n" +"Je kan dit later nog aanpassen in Project→Projectinstellingen→Application." #: editor/editor_node.cpp msgid "Save Layout" @@ -2663,7 +2652,7 @@ msgstr "Sluit Alle Tabbladen" #: editor/editor_node.cpp msgid "Switch Scene Tab" -msgstr "Scenetab Wisselen" +msgstr "Scènetab wisselen" #: editor/editor_node.cpp msgid "%d more files or folders" @@ -2691,7 +2680,7 @@ msgstr "Afleidingsvrije modus veranderen." #: editor/editor_node.cpp msgid "Add a new scene." -msgstr "Nieuwe scene toevoegen." +msgstr "Nieuwe scène toevoegen." #: editor/editor_node.cpp msgid "Scene" @@ -2699,7 +2688,7 @@ msgstr "Scène" #: editor/editor_node.cpp msgid "Go to previously opened scene." -msgstr "Ga naar de vorige geopende scene." +msgstr "Ga naar de eerder geopende scène." #: editor/editor_node.cpp msgid "Copy Text" @@ -2719,19 +2708,19 @@ msgstr "Bestanden Filteren..." #: editor/editor_node.cpp msgid "Operations with scene files." -msgstr "Operaties met scenebestanden." +msgstr "Operaties met scènebestanden." #: editor/editor_node.cpp msgid "New Scene" -msgstr "Nieuwe Scene" +msgstr "Nieuwe scène" #: editor/editor_node.cpp msgid "New Inherited Scene..." -msgstr "Nieuwe Geërfde Scene..." +msgstr "Nieuwe geërfde scène..." #: editor/editor_node.cpp msgid "Open Scene..." -msgstr "Scene Openen..." +msgstr "Scène openen..." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Open Recent" @@ -2739,11 +2728,11 @@ msgstr "Recente Scenes Openen" #: editor/editor_node.cpp msgid "Save Scene" -msgstr "Scene Opslaan" +msgstr "Scène opslaan" #: editor/editor_node.cpp msgid "Save All Scenes" -msgstr "Alle Scènes Opslaan" +msgstr "Alle scènes opslaan" #: editor/editor_node.cpp msgid "Convert To..." @@ -2769,7 +2758,7 @@ msgstr "Opnieuw" #: editor/editor_node.cpp msgid "Revert Scene" -msgstr "Scene Herstellen" +msgstr "Scène terugzetten" #: editor/editor_node.cpp msgid "Miscellaneous project or scene-wide tools." @@ -2883,7 +2872,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Sync Scene Changes" -msgstr "Sceneveranderingen synchroniseren" +msgstr "Scèneveranderingen synchroniseren" #: editor/editor_node.cpp msgid "" @@ -3009,11 +2998,11 @@ msgstr "Pauzeer de uitvoering van de scène voor foutopsporing." #: editor/editor_node.cpp msgid "Pause Scene" -msgstr "Pauzeer Scene" +msgstr "Scène pauzeren" #: editor/editor_node.cpp msgid "Stop the scene." -msgstr "Stop de scene." +msgstr "Scène stoppen." #: editor/editor_node.cpp msgid "Play the edited scene." @@ -3399,7 +3388,7 @@ msgstr "Schrijf je logica in de _run() methode." #: editor/editor_run_script.cpp msgid "There is an edited scene already." -msgstr "Er is al een bewerkte scene." +msgstr "Er is al een bewerkte scène." #: editor/editor_run_script.cpp msgid "Couldn't instance script:" @@ -3427,7 +3416,7 @@ msgstr "Bladeren" #: editor/editor_sub_scene.cpp msgid "Scene Path:" -msgstr "Scene Pad:" +msgstr "Scènepad:" #: editor/editor_sub_scene.cpp msgid "Import From Node:" @@ -3711,11 +3700,11 @@ msgstr "Folder dupliceren:" #: editor/filesystem_dock.cpp msgid "New Inherited Scene" -msgstr "Nieuwe overgeërfde scene" +msgstr "Nieuwe geërfde scène" #: editor/filesystem_dock.cpp msgid "Set As Main Scene" -msgstr "Instellen als hoofdscène" +msgstr "Instellen als startscène" #: editor/filesystem_dock.cpp msgid "Open Scenes" @@ -5704,7 +5693,7 @@ msgstr "Knoop maken" #: 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 "Er is iets misgegaan bij het instantiëren van scene vanaf %s" +msgstr "Fout bij het instantiëren van scène vanaf %s" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Change Default Type" @@ -5769,20 +5758,18 @@ msgstr "Emissiemasker" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Solid Pixels" -msgstr "Krimpen (Pixels): " +msgstr "Vaste pixels" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Border Pixels" -msgstr "" +msgstr "Randpixels" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Directed Border Pixels" -msgstr "Mappen & Bestanden:" +msgstr "Gerichte randpixels" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5914,7 +5901,7 @@ msgstr "Creëer een statisch convex lichaam" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" -msgstr "Dit werkt niet op scene root!" +msgstr "Dit werkt niet op scènewortel!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Static Shape" @@ -6022,7 +6009,7 @@ msgid "" "Update from existing scene?:\n" "%s" msgstr "" -"Update vanuit bestaande scène?:\n" +"Bijwerken vanuit bestaande scène?:\n" "%s" #: editor/plugins/mesh_library_editor_plugin.cpp @@ -6044,7 +6031,7 @@ msgstr "Vanuit scène importeren" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" -msgstr "Update Vanuit Scene" +msgstr "Bijwerken vanuit scène" #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." @@ -6930,7 +6917,7 @@ msgstr "Alleen bronnen uit bestandssysteem kunnen gedropt worden." #: modules/visual_script/visual_script_editor.cpp msgid "Can't drop nodes because script '%s' is not used in this scene." msgstr "" -"Kan knopen niet plaatsen, script '%s'' wordt niet in deze scène gebruikt." +"Kan knopen niet plaatsen, script '%s' wordt niet in deze scène gebruikt." #: editor/plugins/script_text_editor.cpp msgid "Lookup Symbol" @@ -7334,6 +7321,10 @@ msgid "Cinematic Preview" msgstr "Bioscoop Preview" #: 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 "Vrijekijk Links" @@ -8081,11 +8072,11 @@ msgstr "Geselecteerde Texture uit TileSet verwijderen." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from Scene" -msgstr "Creëer vanuit Scene" +msgstr "Vanuit scène maken" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Merge from Scene" -msgstr "Vervoeg vanuit Scene" +msgstr "Vanuit scène samenvoegen" #: editor/plugins/tile_set_editor_plugin.cpp msgid "New Single Tile" @@ -8226,11 +8217,11 @@ msgstr "Geen Texture geselecteerd om te verwijderen." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from scene? This will overwrite all current tiles." -msgstr "Creëer vanuit scène? Hiermee worden alle huidige tegels overschreven." +msgstr "Vanuit scène maken? Alle huidige tegels zullen worden overschreven." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Merge from scene?" -msgstr "Vervoegen vanuit scene?" +msgstr "Vanuit scène samenvoegen?" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Texture" @@ -9458,7 +9449,7 @@ msgstr "Exporteer alle bronnen in het project" #: editor/project_export.cpp msgid "Export selected scenes (and dependencies)" -msgstr "Exporteer geselecteerde scenes (en afhankelijkheden)" +msgstr "Exporteer geselecteerde scènes (en afhankelijkheden)" #: editor/project_export.cpp msgid "Export selected resources (and dependencies)" @@ -9719,7 +9710,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Renderer can be changed later, but scenes may need to be adjusted." msgstr "" -"Renderer kan later worden gewijzigd, scenes moeten dan mogelijk worden " +"Renderer kan later worden gewijzigd, scènes moeten dan mogelijk worden " "bijgesteld." #: editor/project_manager.cpp @@ -9798,9 +9789,9 @@ msgid "" "Please edit the project and set the main scene in the Project Settings under " "the \"Application\" category." msgstr "" -"Kan project niet uitvoeren: geen hoofdscène gedefinieerd.\n" -"Bewerk het project en stel de hoofdscène in bij \"Projectinstellingen\" " -"onder de categorie \"Toepassing\"." +"Kan project niet uitvoeren: geen startscène gedefinieerd.\n" +"Bewerk het project en stel de startscène in " +"Project→Projectinstellingen→Application." #: editor/project_manager.cpp msgid "" @@ -10313,7 +10304,7 @@ msgstr "Knooptype" #: editor/rename_dialog.cpp msgid "Current scene name" -msgstr "Huidige scene naam" +msgstr "Naam huidige scène" #: editor/rename_dialog.cpp msgid "Root node name" @@ -10419,23 +10410,23 @@ msgstr "Uitvoermodus:" #: editor/run_settings_dialog.cpp msgid "Current Scene" -msgstr "Huidige Scene" +msgstr "Huidige scène" #: editor/run_settings_dialog.cpp msgid "Main Scene" -msgstr "Hoofdscène" +msgstr "Startscène" #: editor/run_settings_dialog.cpp msgid "Main Scene Arguments:" -msgstr "Hoofdscene Argumenten:" +msgstr "Startscène argumenten:" #: editor/run_settings_dialog.cpp msgid "Scene Run Settings" -msgstr "Scene Uitvoerinstellingen" +msgstr "Scène uitvoerinstellingen" #: editor/scene_tree_dock.cpp msgid "No parent to instance the scenes at." -msgstr "Geen ouder om scenes mee te instantiëren." +msgstr "Geen ouder om scènes mee te instantiëren." #: editor/scene_tree_dock.cpp msgid "Error loading scene from %s" @@ -10451,15 +10442,15 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Instance Scene(s)" -msgstr "Instantie Scene(s)" +msgstr "Scène(s) instantiëren" #: editor/scene_tree_dock.cpp msgid "Replace with Branch Scene" -msgstr "Vervangen met vertakte Scene" +msgstr "Vervangen met vertakte scène" #: editor/scene_tree_dock.cpp msgid "Instance Child Scene" -msgstr "Initialiseer Kind Scene" +msgstr "Scène instantiëren" #: editor/scene_tree_dock.cpp msgid "Clear Script" @@ -10484,7 +10475,7 @@ msgstr "Dupliceer knoop/knopen" #: editor/scene_tree_dock.cpp msgid "Can't reparent nodes in inherited scenes, order of nodes can't change." msgstr "" -"Kan ouderschap van knopen in geërfde scenes niet aanpassen, volgorde van " +"Kan ouderschap van knopen in geërfde scènes niet aanpassen, volgorde van " "knopen kan niet veranderen." #: editor/scene_tree_dock.cpp @@ -10493,7 +10484,7 @@ msgstr "Knoop moet bij de bewerkte scène horen om wortelknoop te worden." #: editor/scene_tree_dock.cpp msgid "Instantiated scenes can't become root" -msgstr "Scene kan geen wortel worden" +msgstr "Geïnstantieerde scène kan geen wortel worden" #: editor/scene_tree_dock.cpp msgid "Make node as Root" @@ -10521,11 +10512,11 @@ msgstr "Kan deze operatie niet uitvoeren met de wortelknoop." #: editor/scene_tree_dock.cpp msgid "This operation can't be done on instanced scenes." -msgstr "Deze operatie kan niet worden uitgevoerd op instanced scenes." +msgstr "Deze operatie kan niet worden uitgevoerd op geïnstantieerde scènes." #: editor/scene_tree_dock.cpp msgid "Save New Scene As..." -msgstr "Nieuwe Scène Opslaan Als..." +msgstr "Nieuwe scène opslaan als..." #: editor/scene_tree_dock.cpp msgid "" @@ -10550,7 +10541,7 @@ msgstr "Maak locaal" #: editor/scene_tree_dock.cpp msgid "New Scene Root" -msgstr "Nieuwe wortel Scene" +msgstr "Nieuwe scènewortel" #: editor/scene_tree_dock.cpp msgid "Create Root Node:" @@ -10602,11 +10593,11 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Error saving scene." -msgstr "Fout bij het opslaan van de scene." +msgstr "Fout bij het opslaan van de scène." #: editor/scene_tree_dock.cpp msgid "Error duplicating scene to save it." -msgstr "Fout bij het opslaan van een gekopieerde scene." +msgstr "Fout bij het opslaan van een gekopieerde scène." #: editor/scene_tree_dock.cpp msgid "Sub-Resources" @@ -10646,15 +10637,15 @@ msgstr "Onder nieuwe knoop hangen" #: editor/scene_tree_dock.cpp msgid "Make Scene Root" -msgstr "Maak Scene wortel" +msgstr "Scènewortel instellen" #: editor/scene_tree_dock.cpp msgid "Merge From Scene" -msgstr "Samenvoegen uit scene" +msgstr "Samenvoegen uit scène" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Save Branch as Scene" -msgstr "Tak opslaan als Scene" +msgstr "Tak opslaan als scène" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" @@ -10870,7 +10861,7 @@ msgstr "Toegestaan: a-z, A-Z, 0-9 en ." #: editor/script_create_dialog.cpp msgid "Built-in script (into scene file)." -msgstr "Ingebouwd script (in scene bestand)." +msgstr "Ingebouwd script (in scènebestand)." #: editor/script_create_dialog.cpp msgid "Will create a new script file." @@ -10881,9 +10872,8 @@ msgid "Will load an existing script file." msgstr "Laad bestaand script." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Script file already exists." -msgstr "Bestaat al" +msgstr "Scriptbestand bestaat al." #: editor/script_create_dialog.cpp msgid "Class Name:" @@ -12082,7 +12072,7 @@ msgid "" "scenes). The first created one will work, while the rest will be ignored." msgstr "" "Maar één zichtbare CanvasModulate is toegestaan per scene (of set van " -"geïnstantieerde scenes). De eerst gemaakte zal werken, terwijl de rest " +"geïnstantieerde scènes). De eerst gemaakte zal werken, terwijl de rest " "genegeerd wordt." #: scene/2d/collision_object_2d.cpp @@ -12506,8 +12496,8 @@ msgstr "" msgid "" "Only one WorldEnvironment is allowed per scene (or set of instanced scenes)." msgstr "" -"Slechts één WorldEnvironment is toegestaan per scene (of set van " -"geïnstantieerde scenes)." +"Slechts één WorldEnvironment is toegestaan per scène (of verzameling van " +"geïnstantieerde scènes)." #: scene/3d/world_environment.cpp msgid "" @@ -12564,11 +12554,13 @@ msgid "" "LMB: Set color\n" "RMB: Remove preset" msgstr "" +"Kleur: #%s\n" +"LMK: Kleur instellen\n" +"RMK: Voorinstelling verwijderen" #: scene/gui/color_picker.cpp -#, fuzzy msgid "Pick a color from the editor window." -msgstr "Kies een kleur van het scherm." +msgstr "Kies een kleur uit het editorvenster." #: scene/gui/color_picker.cpp msgid "HSV" diff --git a/editor/translations/or.po b/editor/translations/or.po index 46e6a4fa48..ce0cb50f1b 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -7052,6 +7052,10 @@ 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 "" diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 3a165db4ed..fbb866b003 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -42,7 +42,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-16 22:23+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -52,7 +52,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 3.10.2-dev\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1962,9 +1962,8 @@ msgid "Inherited by:" msgstr "Dziedziczone przez:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Opis:" +msgstr "Opis" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1985,14 +1984,12 @@ msgid "Properties" msgstr "Właściwości" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Nadpisuje" +msgstr "przeciążenie:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Domyślny" +msgstr "domyślne:" #: editor/editor_help.cpp msgid "Methods" @@ -2015,9 +2012,8 @@ msgid "Property Descriptions" msgstr "Opisy właściwości" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Wartość" +msgstr "(wartość)" #: editor/editor_help.cpp msgid "" @@ -7306,6 +7302,10 @@ msgid "Cinematic Preview" msgstr "Podgląd kinowy" #: 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 "\"Wolny widok\" w lewo" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index b5855bd1a1..5ea27369e9 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -7280,6 +7280,10 @@ 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 "" diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index 407e23f94e..9bbb6be911 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -7364,6 +7364,10 @@ msgid "Cinematic Preview" msgstr "Pré-visualização Cinemática" #: 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 "Visão Livre Esquerda" diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po index ed2cd4b083..5c8f792b4f 100644 --- a/editor/translations/pt_PT.po +++ b/editor/translations/pt_PT.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-13 13:36+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+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" @@ -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 3.10.1\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1945,9 +1945,8 @@ msgid "Inherited by:" msgstr "Herdado por:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Descrição:" +msgstr "Descrição" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1968,14 +1967,12 @@ msgid "Properties" msgstr "Propriedades" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Sobrepõe" +msgstr "Sobrepõe:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Padrão" +msgstr "Padrão:" #: editor/editor_help.cpp msgid "Methods" @@ -1998,9 +1995,8 @@ msgid "Property Descriptions" msgstr "Descrições da Propriedade" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Valor" +msgstr "(valor)" #: editor/editor_help.cpp msgid "" @@ -7283,6 +7279,10 @@ msgid "Cinematic Preview" msgstr "Pré-visualização Cinemática" #: 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 "Vista livre esquerda" diff --git a/editor/translations/ro.po b/editor/translations/ro.po index 90200bbe58..a71fc3e5f1 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -9,12 +9,14 @@ # Grigore Antoniuc <grisa181@gmail.com>, 2018. # Boby Ilea <boby.ilea@gmail.com>, 2019. # EVOKZH <avip.ady@gmail.com>, 2019. +# Marincia Catalin <catalinmarincia@gmail.com>, 2020. +# Marincia Cătălin <catalinmarincia@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-11-09 22:04+0000\n" -"Last-Translator: EVOKZH <avip.ady@gmail.com>\n" +"PO-Revision-Date: 2020-01-19 13:12+0000\n" +"Last-Translator: Marincia Cătălin <catalinmarincia@gmail.com>\n" "Language-Team: Romanian <https://hosted.weblate.org/projects/godot-engine/" "godot/ro/>\n" "Language: ro\n" @@ -23,7 +25,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" -"X-Generator: Weblate 3.10-dev\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -32,7 +34,7 @@ msgstr "Argument de tip invalid pentru convert(), folosiți constante TYPE_*" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "Se așteaptă un șir de lungime 1 (un caracter)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -42,7 +44,7 @@ msgstr "Bytes insuficienti pentru decodare bytes, sau format invalid" #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" -msgstr "Intrare invalida %i in expresie" +msgstr "Intrare invalida %i (nu a fost transmisă) in expresie" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" @@ -177,19 +179,16 @@ msgid "Anim Multi Change Transform" msgstr "Anim Transformare multifuncțională" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Keyframe Value" msgstr "Anim Schimbare valoare cadre cheie" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Call" -msgstr "Anim Schimbare apelare" +msgstr "Anim executa schimbari multiple" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Length" -msgstr "Schimbă Numele Animației:" +msgstr "Schimbă Lungimea Animației" #: editor/animation_track_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -198,38 +197,35 @@ msgstr "Schimbați Bucla Animației" #: editor/animation_track_editor.cpp msgid "Property Track" -msgstr "" +msgstr "Lista De Proprietati" #: editor/animation_track_editor.cpp -#, fuzzy msgid "3D Transform Track" -msgstr "Transformare hartă UV" +msgstr "Transformare Pistei 3d" #: editor/animation_track_editor.cpp msgid "Call Method Track" -msgstr "" +msgstr "Cheama linia de metode" #: editor/animation_track_editor.cpp msgid "Bezier Curve Track" -msgstr "" +msgstr "Traseu curbă Bezier" #: editor/animation_track_editor.cpp msgid "Audio Playback Track" -msgstr "" +msgstr "Cale Audio Playback" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation Playback Track" -msgstr "Oprește rularea animației. (S)" +msgstr "Oprește rularea animației" #: editor/animation_track_editor.cpp msgid "Animation length (frames)" msgstr "Lungime Animație (în frame-uri)." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation length (seconds)" -msgstr "Lungime Animație (în secunde)." +msgstr "Lungime Animație (în secunde)" #: editor/animation_track_editor.cpp #, fuzzy @@ -237,22 +233,21 @@ msgid "Add Track" msgstr "Anim Adăugați Pistă" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation Looping" -msgstr "Zoom Animație." +msgstr "Zoom Animație" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Functions:" -msgstr "" +msgstr "Funcții:" #: editor/animation_track_editor.cpp msgid "Audio Clips:" -msgstr "" +msgstr "Secvențe Audio:" #: editor/animation_track_editor.cpp msgid "Anim Clips:" -msgstr "" +msgstr "Secvențe Anim:" #: editor/animation_track_editor.cpp #, fuzzy @@ -260,32 +255,28 @@ msgid "Change Track Path" msgstr "Schimbați Valoarea Array-ului" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Toggle this track on/off." -msgstr "Comutează modul fără distrageri." +msgstr "Comutează această pistă pornit/oprit." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" -msgstr "" +msgstr "Modul Actualizare (Cum este setată această proprietate)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Interpolation Mode" -msgstr "Nod de Animație" +msgstr "Mod Intercalare" #: 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 "Ștergeți pista selectată." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Time (s): " -msgstr "Timp X-Decolorare (s):" +msgstr "Timp (s): " #: editor/animation_track_editor.cpp #, fuzzy @@ -305,13 +296,12 @@ msgid "Trigger" msgstr "Trăgaci" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Capture" -msgstr "Viitor" +msgstr "Capturează" #: editor/animation_track_editor.cpp msgid "Nearest" -msgstr "" +msgstr "Cel mai apropiat" #: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp #: editor/property_editor.cpp @@ -320,7 +310,7 @@ msgstr "Linear" #: editor/animation_track_editor.cpp msgid "Cubic" -msgstr "" +msgstr "Cubic" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" @@ -336,29 +326,24 @@ msgid "Insert Key" msgstr "Inserează Notă" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Duplicate Key(s)" -msgstr "Anim Clonare Chei" +msgstr "Clonare Chei(s)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Delete Key(s)" -msgstr "Anim Ștergeți Cheile" +msgstr "Ștergeți Cheile" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Update Mode" -msgstr "Schimbă Numele Animației:" +msgstr "Schimbă Modul de Actualizare al Animației" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Interpolation Mode" -msgstr "Nod de Animație" +msgstr "Schimbă Modul de Intercalare al Animației" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Loop Mode" -msgstr "Schimbați Bucla Anim" +msgstr "Schimbați Bucla Animației" #: editor/animation_track_editor.cpp msgid "Remove Anim Track" @@ -390,7 +375,7 @@ msgstr "Anim Inserați" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." -msgstr "" +msgstr "AnimationPlayer nu se poate anima singur, doar alți jucători." #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -405,12 +390,10 @@ msgid "Anim Insert Key" msgstr "Anim Inserați Cheie" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Step" -msgstr "Schimbă Numele Animației:" +msgstr "Schimbă Pasul Animației" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Rearrange Tracks" msgstr "Rearanjați Autoload-urile" @@ -436,61 +419,55 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" -msgstr "" +msgstr "Nu este posibil să fie adăugată o nouă pistă fără a avea o rădăcină" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "" +msgstr "Pistă invalidă pentru Bezier(nicio sub-proprietate corespunzătoare)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Bezier Track" -msgstr "Anim Adăugați Pistă" +msgstr "Adăugați Pistă Bezier" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." -msgstr "" +msgstr "Calea pistei este invalidă, așa că nu poate fi adăugată o cheie." #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "" +msgstr "Pista nu este de tipul Spatial, nu se poate insera cheie" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Transform Track Key" -msgstr "Transformare hartă UV" +msgstr "Adăugare Cheie de Tranformare a Pistei" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Track Key" msgstr "Anim Adăugați Pistă" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "" +msgstr "Calea pistei este invalidă, așa că nu poate fi adăugată o metodă." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Method Track Key" -msgstr "Anim Inserați Pistă și Cheie" +msgstr "Inserați Pistă și Cheie" #: editor/animation_track_editor.cpp msgid "Method not found in object: " -msgstr "" +msgstr "Metoda nu a fost găsită în obiect: " #: editor/animation_track_editor.cpp msgid "Anim Move Keys" msgstr "Anim Mutați Cheie" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Clipboard is empty" -msgstr "Clip-board de resurse gol !" +msgstr "Clip-board de resurse gol" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Paste Tracks" -msgstr "Lipiţi Parametrii" +msgstr "Lipiţi Piste" #: editor/animation_track_editor.cpp msgid "Anim Scale Keys" @@ -500,6 +477,8 @@ msgstr "Anim Scalați Cheile" msgid "" "This option does not work for Bezier editing, as it's only a single track." msgstr "" +"Această opțiune nu funcționează pentru editarea Bezier, din moment ce e o " +"singură pistă." #: editor/animation_track_editor.cpp msgid "" @@ -516,7 +495,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Warning: Editing imported animation" -msgstr "" +msgstr "Avertisment: Se editează animația încărcată" #: editor/animation_track_editor.cpp #, fuzzy @@ -526,28 +505,27 @@ msgstr "Selectați un Animator din Copacul Scenă să editați animații." #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." msgstr "" +"Arată numai pistele ce aparțin nodurilor selectate în managerul de file." #: editor/animation_track_editor.cpp msgid "Group tracks by node or display them as plain list." -msgstr "" +msgstr "Grupează pistele în funcție de nod sau afișează-le ca o listă simplă." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Snap:" -msgstr "Aliniere" +msgstr "Fixare:" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation step value." -msgstr "Arborele Animației este valid." +msgstr "Pasul Animației." #: editor/animation_track_editor.cpp msgid "Seconds" -msgstr "" +msgstr "Secunde" #: editor/animation_track_editor.cpp msgid "FPS" -msgstr "" +msgstr "FPS(cadre pe secundă)" #: editor/animation_track_editor.cpp editor/editor_properties.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp @@ -560,14 +538,12 @@ msgid "Edit" msgstr "Modificare" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation properties." -msgstr "ArboreAnimație" +msgstr "Proprietăți animație." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Copy Tracks" -msgstr "Copie Parametrii" +msgstr "Copiază Piste" #: editor/animation_track_editor.cpp msgid "Scale Selection" @@ -586,17 +562,14 @@ msgid "Duplicate Transposed" msgstr "Duplicați Transpunerea" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Delete Selection" -msgstr "Centrează Selecția" +msgstr "Șterge Selecția" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Go to Next Step" msgstr "Mergeți la Pasul Următor" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Go to Previous Step" msgstr "Mergeți la Pasul Anterior" @@ -610,11 +583,11 @@ msgstr "Curățați Animația" #: editor/animation_track_editor.cpp msgid "Pick the node that will be animated:" -msgstr "" +msgstr "Alege nodul care urmează să fie animat:" #: editor/animation_track_editor.cpp msgid "Use Bezier Curves" -msgstr "" +msgstr "Folosește curbe Bezier" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" @@ -661,9 +634,8 @@ msgid "Scale Ratio:" msgstr "Proporție Scalare:" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select Tracks to Copy" -msgstr "Setează Tranziții la:" +msgstr "Selectează Pistele de Copiat" #: editor/animation_track_editor.cpp editor/editor_log.cpp #: editor/editor_properties.cpp @@ -672,12 +644,11 @@ msgstr "Setează Tranziții la:" #: 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 "Copiază" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select All/None" -msgstr "Mod Selectare" +msgstr "Selectează Tot/Nimic" #: editor/animation_track_editor_plugins.cpp #, fuzzy @@ -718,12 +689,11 @@ msgstr "Înlocuit %d potriviri." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." -msgstr "" +msgstr "%d potriviri." #: editor/code_editor.cpp editor/editor_help.cpp -#, fuzzy msgid "%d matches." -msgstr "Nici o Potrivire" +msgstr "%d potriviri." #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Match Case" @@ -748,7 +718,7 @@ msgstr "Numai Selecția" #: editor/code_editor.cpp editor/plugins/script_text_editor.cpp #: editor/plugins/text_editor.cpp msgid "Standard" -msgstr "" +msgstr "Standard" #: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp msgid "Toggle Scripts Panel" @@ -772,45 +742,39 @@ msgstr "Resetați Zoom-area" #: editor/code_editor.cpp msgid "Warnings" -msgstr "" +msgstr "Avertismente" #: editor/code_editor.cpp msgid "Line and column numbers." -msgstr "" +msgstr "Numerele liniilor și coloanelor." #: editor/connections_dialog.cpp -#, fuzzy msgid "Method in target node must be specified." -msgstr "Metoda din Nod-ul țintă trebuie specificată!" +msgstr "Metoda din nodul țintă trebuie specificată." #: editor/connections_dialog.cpp -#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." msgstr "" "Metoda țintă nu există! Specificați o metodă validă sau atașați un script la " -"Nod-ul țintă." +"nodul țintă." #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Node:" msgstr "Conectați la Nod:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Script:" -msgstr "Nu se poate conecta la gazda:" +msgstr "Conectează la Script:" #: editor/connections_dialog.cpp -#, fuzzy msgid "From Signal:" msgstr "Semnale:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Scene does not contain any script." -msgstr "Nodul nu conține geometrie." +msgstr "Scena nu conține niciun script." #: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp #: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp @@ -838,14 +802,12 @@ msgid "Extra Call Arguments:" msgstr "Extra Argumente de Chemare:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Receiver Method:" -msgstr "Proprietățile obiectului." +msgstr "Metodă Primitor:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Advanced" -msgstr "Opțiuni Snapping" +msgstr "Avansate" #: editor/connections_dialog.cpp msgid "Deferred" @@ -862,12 +824,11 @@ msgstr "Tragere unică" #: editor/connections_dialog.cpp msgid "Disconnects the signal after its first emission." -msgstr "" +msgstr "Deconectează semnalul după prima emitere." #: editor/connections_dialog.cpp -#, fuzzy msgid "Cannot connect signal" -msgstr "Conectați Semnal:" +msgstr "Nu se poate conecta semnalul" #: editor/connections_dialog.cpp editor/dependency_editor.cpp #: editor/export_template_manager.cpp editor/groups_editor.cpp @@ -889,9 +850,8 @@ msgid "Connect" msgstr "Conectați" #: editor/connections_dialog.cpp -#, fuzzy msgid "Signal:" -msgstr "Semnale:" +msgstr "Semnal:" #: editor/connections_dialog.cpp msgid "Connect '%s' to '%s'" @@ -902,7 +862,6 @@ msgid "Disconnect '%s' from '%s'" msgstr "Deconectați '%s' de la '%s'" #: editor/connections_dialog.cpp -#, fuzzy msgid "Disconnect all from signal: '%s'" msgstr "Deconectați '%s' de la '%s'" @@ -916,19 +875,16 @@ msgid "Disconnect" msgstr "Deconectați" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect a Signal to a Method" -msgstr "Conectați Semnal:" +msgstr "Conectați Semnal la o Metodă" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit Connection:" -msgstr "Eroare de Conexiune" +msgstr "Modifică Conexiunea:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Are you sure you want to remove all connections from the \"%s\" signal?" -msgstr "Ești sigur că vrei să execuți acel proiect?" +msgstr "Ești sigur că vrei să ștergi toate conexiunile de la semnalul \"%s\"?" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" @@ -936,22 +892,19 @@ msgstr "Semnale" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" -msgstr "" +msgstr "Ești sigur că vrei să ștergi toate conexiunile de la acest semnal?" #: editor/connections_dialog.cpp -#, fuzzy msgid "Disconnect All" -msgstr "Deconectați" +msgstr "Deconectați Toate" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit..." -msgstr "Modificare" +msgstr "Modificare..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go To Method" -msgstr "Metode" +msgstr "Mergi la Metodă" #: editor/create_dialog.cpp msgid "Change %s Type" @@ -1003,16 +956,14 @@ msgid "Dependencies For:" msgstr "Dependențe Pentru:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Scene '%s' is currently being edited.\n" "Changes will only take effect when reloaded." msgstr "" "Scena '%s' este în proces de editare. \n" -"Modificările nu vor avea efect dacă nu reîncărcați." +"Modificările vor avea efect doar după reîncărcare." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Resource '%s' is in use.\n" "Changes will only take effect when reloaded." @@ -1065,9 +1016,8 @@ msgid "Owners Of:" msgstr "Stăpâni La:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Remove selected files from the project? (Can't be restored)" -msgstr "Ștergeți fișierele selectate din proiect? (fără anulare)" +msgstr "Ștergeți fișierele selectate din proiect? (Acțiune ireversibilă)" #: editor/dependency_editor.cpp msgid "" @@ -1088,7 +1038,6 @@ msgid "Error loading:" msgstr "Eroare încărcând:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Load failed due to missing dependencies:" msgstr "Scena nu a putut fi încărcata deoarece are dependențe în lipsa:" @@ -1113,9 +1062,8 @@ msgid "Permanently delete %d item(s)? (No undo!)" msgstr "Ștergeți permanent %d articol(e)? (Fără anulare!)" #: editor/dependency_editor.cpp -#, fuzzy msgid "Show Dependencies" -msgstr "Dependențe" +msgstr "Arată Dependențe" #: editor/dependency_editor.cpp msgid "Orphan Resource Explorer" @@ -1206,12 +1154,10 @@ msgid "License" msgstr "Licență" #: editor/editor_about.cpp -#, fuzzy msgid "Third-party Licenses" msgstr "Licenţe Thirdparty" #: 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 " @@ -1220,8 +1166,8 @@ msgid "" msgstr "" "Motorul Godot se bazează pe un număr de biblioteci thirdparty gratis și " "opensource, toate compatibile cu termenii licenţei MIT ai lui. Mai jos este " -"o listă exhaustivă a tuturor acestor componente de thirdparty cu declaraţii " -"de autor respective şi termenii licenței." +"o listă exhaustivă a tuturor acestor componente de thirdparty cu " +"declaraţiile de autor respective şi termenii licenței." #: editor/editor_about.cpp msgid "All Components" @@ -1236,14 +1182,12 @@ msgid "Licenses" msgstr "Licențe" #: editor/editor_asset_installer.cpp editor/project_manager.cpp -#, fuzzy msgid "Error opening package file, not in ZIP format." -msgstr "Eroare la deschiderea fişierului pachet, nu este în format zip." +msgstr "Eroare la deschiderea fişierului pachet, nu este în format ZIP." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (Already Exists)" -msgstr "AutoLoad '%s' există deja!" +msgstr "%s (Există deja)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1251,17 +1195,15 @@ msgstr "Decomprimare Asset-uri" #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "The following files failed extraction from package:" -msgstr "" +msgstr "Următoarele file au eșuat extragerea din pachet:" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "And %s more files." -msgstr "%d mai multe fișiere" +msgstr "și %d alte fișiere." #: editor/editor_asset_installer.cpp editor/project_manager.cpp -#, fuzzy msgid "Package installed successfully!" -msgstr "Pachet Instalat cu Succes!" +msgstr "Pachet instalat cu succes!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1269,9 +1211,8 @@ msgid "Success!" msgstr "Succes!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "Conținut:" +msgstr "Conținutul pachetului:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" @@ -1326,7 +1267,6 @@ msgid "Delete Bus Effect" msgstr "Ștergeți Pista Efect" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Drag & drop to rearrange." msgstr "Pista Audio, Trageți și Plasați pentru a rearanja." @@ -1401,7 +1341,7 @@ msgstr "Deschide Schema Pistei Audio" #: editor/editor_audio_buses.cpp msgid "There is no '%s' file." -msgstr "" +msgstr "Nu este niciun '%s' în filă." #: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp msgid "Layout" @@ -1412,9 +1352,8 @@ msgid "Invalid file, not an audio bus layout." msgstr "Fişier nevalid, nu este o schemă de pistă audio." #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "Eroare la salvarea TileSet!" +msgstr "Eroare la salvarea filei: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -7630,6 +7569,10 @@ msgid "Cinematic Preview" msgstr "Se creează Previzualizările Mesh-ului" #: 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 "" diff --git a/editor/translations/ru.po b/editor/translations/ru.po index 7d7e5f2f74..177883732e 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -66,7 +66,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-16 22:24+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+0000\n" "Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" @@ -76,7 +76,7 @@ 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 3.10.2-dev\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1995,9 +1995,8 @@ msgid "Inherited by:" msgstr "Унаследован:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Описание:" +msgstr "Описание" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -7339,6 +7338,10 @@ 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 "Обзор налево" diff --git a/editor/translations/si.po b/editor/translations/si.po index 4b1ddaed39..a7779c0ff9 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -7103,6 +7103,10 @@ 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 "" diff --git a/editor/translations/sk.po b/editor/translations/sk.po index d399f70f14..006b0bf6a6 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -7311,6 +7311,10 @@ 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 "" diff --git a/editor/translations/sl.po b/editor/translations/sl.po index 9032c7ed35..e2659207e9 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -7601,6 +7601,10 @@ msgid "Cinematic Preview" msgstr "Ustvari Predogled Modela" #: 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 "" diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 0066dd3b26..d97ef32da2 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -7346,6 +7346,10 @@ 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 "" diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 8fdbaa81a2..a22771c9b4 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -7668,6 +7668,10 @@ 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 "Слободан поглед лево" diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index 291e70410b..8a743d0ccf 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -7144,6 +7144,10 @@ 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 "" diff --git a/editor/translations/sv.po b/editor/translations/sv.po index 6212071472..390082dd3e 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -7553,6 +7553,10 @@ 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 "" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index 94bbe2234a..d4ee4376a1 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -7105,6 +7105,10 @@ 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 "" diff --git a/editor/translations/te.po b/editor/translations/te.po index 428319aa29..cc40ba3888 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -7054,6 +7054,10 @@ 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 "" diff --git a/editor/translations/th.po b/editor/translations/th.po index 52077132ee..58c78d82a9 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -7577,6 +7577,10 @@ msgid "Cinematic Preview" msgstr "กำลังสร้างภาพตัวอย่าง Mesh" #: 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 "มุมมองอิสระ ไปซ้าย" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 9451624a4a..4a58570f66 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -7338,6 +7338,10 @@ msgid "Cinematic Preview" msgstr "Sinematik Önizleme" #: 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 "Serbestbakış Sola" diff --git a/editor/translations/uk.po b/editor/translations/uk.po index 779506a0e9..fefe38de7d 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -17,7 +17,7 @@ msgid "" msgstr "" "Project-Id-Version: Ukrainian (Godot Engine)\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-13 13:36+0000\n" +"PO-Revision-Date: 2020-01-19 11:04+0000\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/" "godot/uk/>\n" @@ -27,7 +27,7 @@ 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 3.10.1\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1950,9 +1950,8 @@ msgid "Inherited by:" msgstr "Успадковано:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Опис:" +msgstr "Опис" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1973,14 +1972,12 @@ msgid "Properties" 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" @@ -2003,9 +2000,8 @@ msgid "Property Descriptions" msgstr "Описи властивостей" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Значення" +msgstr "(значення)" #: editor/editor_help.cpp msgid "" @@ -7307,6 +7303,10 @@ 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 "Огляд ліворуч" diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index 73cfbb3650..06d553b158 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -7209,6 +7209,10 @@ 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 "" diff --git a/editor/translations/vi.po b/editor/translations/vi.po index 6024fc9d8d..e670590750 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -7307,6 +7307,10 @@ 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 "" diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index 42e78e233e..afec9c9187 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -63,7 +63,7 @@ msgid "" msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2020-01-13 13:36+0000\n" +"PO-Revision-Date: 2020-01-19 11:03+0000\n" "Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hans/>\n" @@ -72,7 +72,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 3.10.1\n" +"X-Generator: Weblate 3.10.2\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1961,9 +1961,8 @@ msgid "Inherited by:" msgstr "派生:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "描述:" +msgstr "描述" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1983,14 +1982,12 @@ msgid "Properties" 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" @@ -2013,9 +2010,8 @@ msgid "Property Descriptions" msgstr "属性说明" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "值" +msgstr "(值)" #: editor/editor_help.cpp msgid "" @@ -7211,6 +7207,10 @@ 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 "自由视图 左" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index c8f82b6421..657567e0f6 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -7614,6 +7614,10 @@ 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 "" diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index 61fcbd3f4c..429406e820 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -7592,6 +7592,10 @@ 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 "自由視圖 左" diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index 1dd75eb8a9..16a8cf8ede 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -795,12 +795,12 @@ Vector3 RigidBodyBullet::get_angular_velocity() const { void RigidBodyBullet::set_transform__bullet(const btTransform &p_global_transform) { if (mode == PhysicsServer::BODY_MODE_KINEMATIC) { - if (space) + if (space && space->get_delta_time() != 0) btBody->setLinearVelocity((p_global_transform.getOrigin() - btBody->getWorldTransform().getOrigin()) / space->get_delta_time()); // The kinematic use MotionState class godotMotionState->moveBody(p_global_transform); } else { - // Is necesasry to avoid wrong location on the rendering side on the next frame + // Is necessary to avoid wrong location on the rendering side on the next frame godotMotionState->setWorldTransform(p_global_transform); } CollisionObjectBullet::set_transform__bullet(p_global_transform); diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp index 97897870ba..c64a00a4d9 100644 --- a/modules/gdnative/pluginscript/pluginscript_instance.cpp +++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp @@ -28,11 +28,13 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#include "pluginscript_instance.h" + // Godot imports #include "core/os/os.h" #include "core/variant.h" + // PluginScript imports -#include "pluginscript_instance.h" #include "pluginscript_language.h" #include "pluginscript_script.h" @@ -89,51 +91,6 @@ Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p return var_ret; } -#if 0 // TODO: Don't rely on default implementations provided by ScriptInstance ? -void PluginScriptInstance::call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount) { - -#if 0 - PluginScript *sptr=script.ptr(); - Variant::CallError ce; - - while(sptr) { - Map<StringName,GDFunction*>::Element *E = sptr->member_functions.find(p_method); - if (E) { - E->get()->call(this,p_args,p_argcount,ce); - } - sptr = sptr->_base; - } -#endif - -} - -#if 0 -void PluginScriptInstance::_ml_call_reversed(PluginScript *sptr,const StringName& p_method,const Variant** p_args,int p_argcount) { - - if (sptr->_base) - _ml_call_reversed(sptr->_base,p_method,p_args,p_argcount); - - Variant::CallError ce; - - Map<StringName,GDFunction*>::Element *E = sptr->member_functions.find(p_method); - if (E) { - E->get()->call(this,p_args,p_argcount,ce); - } - -} -#endif - - -void PluginScriptInstance::call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount) { - -#if 0 - if (script.ptr()) { - _ml_call_reversed(script.ptr(),p_method,p_args,p_argcount); - } -#endif -} -#endif // Multilevel stuff - void PluginScriptInstance::notification(int p_notification) { _desc->notification(_data, p_notification); } diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h index d92d3ace77..dc1229a44d 100644 --- a/modules/gdnative/pluginscript/pluginscript_instance.h +++ b/modules/gdnative/pluginscript/pluginscript_instance.h @@ -33,6 +33,7 @@ // Godot imports #include "core/script_language.h" + // PluginScript imports #include <pluginscript/godot_pluginscript.h> @@ -60,13 +61,12 @@ public: virtual bool has_method(const StringName &p_method) const; virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); -#if 0 - // Rely on default implementations provided by ScriptInstance for the moment. - // Note that multilevel call could be removed in 3.0 release, so stay tuned - // (see https://godotengine.org/qa/9244/can-override-the-_ready-and-_process-functions-child-classes) - virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount); - virtual void call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount); -#endif + + // Rely on default implementations provided by ScriptInstance for the moment. + // Note that multilevel call could be removed in 3.0 release, so stay tuned + // (see https://godotengine.org/qa/9244/can-override-the-_ready-and-_process-functions-child-classes) + //virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount); + //virtual void call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount); virtual void notification(int p_notification); diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 524be480d7..452b1933eb 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1550,10 +1550,8 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a OPCODE_BREAK; } -// Enable for debugging -#if 0 +#if 0 // Enable for debugging. default: { - err_text = "Illegal opcode " + itos(_code_ptr[ip]) + " at address " + itos(ip); OPCODE_BREAK; } diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index c123d5ab08..d125da5b79 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -5408,12 +5408,12 @@ void GDScriptParser::_determine_inheritance(ClassNode *p_class, bool p_recursive ident += ("." + subclass); - if (base_script->get_subclasses().has(subclass)) { + if (find_subclass->get_subclasses().has(subclass)) { - find_subclass = base_script->get_subclasses()[subclass]; - } else if (base_script->get_constants().has(subclass)) { + find_subclass = find_subclass->get_subclasses()[subclass]; + } else if (find_subclass->get_constants().has(subclass)) { - Ref<GDScript> new_base_class = base_script->get_constants()[subclass]; + Ref<GDScript> new_base_class = find_subclass->get_constants()[subclass]; if (new_base_class.is_null()) { _set_error("Constant isn't a class: " + ident, p_class->line); return; diff --git a/modules/mono/class_db_api_json.cpp b/modules/mono/class_db_api_json.cpp index c1d6f4dccf..b04e53bd81 100644 --- a/modules/mono/class_db_api_json.cpp +++ b/modules/mono/class_db_api_json.cpp @@ -71,6 +71,13 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { while ((k = t->method_map.next(k))) { + String name = k->operator String(); + + ERR_CONTINUE(name.empty()); + + if (name[0] == '_') + continue; // Ignore non-virtual methods that start with an underscore + snames.push_back(*k); } diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 0f6b8357b8..210267e681 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -106,7 +106,7 @@ Error CSharpLanguage::execute_file(const String &p_path) { void CSharpLanguage::init() { #ifdef DEBUG_METHODS_ENABLED - if (OS::get_singleton()->get_cmdline_args().find("--class_db_to_json")) { + if (OS::get_singleton()->get_cmdline_args().find("--class-db-json")) { class_db_api_to_json("user://class_db_api.json", ClassDB::API_CORE); #ifdef TOOLS_ENABLED class_db_api_to_json("user://class_db_api_editor.json", ClassDB::API_EDITOR); diff --git a/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs b/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs index 174509dc5b..9abfda4538 100644 --- a/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs +++ b/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs @@ -81,7 +81,12 @@ namespace GodotTools } } - ScriptClassParser.ParseFileOrThrow(projectIncludeFile, out var classes); + Error parseError = ScriptClassParser.ParseFile(projectIncludeFile, out var classes, out string errorStr); + if (parseError != Error.Ok) + { + GD.PushError($"Failed to determine namespace and class for script: {projectIncludeFile}. Parse error: {errorStr ?? parseError.ToString()}"); + continue; + } string searchName = System.IO.Path.GetFileNameWithoutExtension(projectIncludeFile); diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs index 80e45b3a3c..7fb087467f 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs @@ -25,14 +25,17 @@ namespace GodotTools.Internals } [MethodImpl(MethodImplOptions.InternalCall)] - private static extern Error internal_ParseFile(string filePath, Array<Dictionary> classes); + private static extern Error internal_ParseFile(string filePath, Array<Dictionary> classes, out string errorStr); - public static void ParseFileOrThrow(string filePath, out IEnumerable<ClassDecl> classes) + public static Error ParseFile(string filePath, out IEnumerable<ClassDecl> classes, out string errorStr) { var classesArray = new Array<Dictionary>(); - var error = internal_ParseFile(filePath, classesArray); + var error = internal_ParseFile(filePath, classesArray, out errorStr); if (error != Error.Ok) - throw new Exception($"Failed to determine namespace and class for script: {filePath}. Parse error: {error}"); + { + classes = null; + return error; + } var classesList = new List<ClassDecl>(); @@ -47,6 +50,8 @@ namespace GodotTools.Internals } classes = classesList; + + return Error.Ok; } } } diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp index cfc869cd39..c8d20e80be 100644 --- a/modules/mono/editor/editor_internal_calls.cpp +++ b/modules/mono/editor/editor_internal_calls.cpp @@ -201,7 +201,9 @@ uint32_t godot_icall_BindingsGenerator_CsGlueVersion() { return CS_GLUE_VERSION; } -int32_t godot_icall_ScriptClassParser_ParseFile(MonoString *p_filepath, MonoObject *p_classes) { +int32_t godot_icall_ScriptClassParser_ParseFile(MonoString *p_filepath, MonoObject *p_classes, MonoString **r_error_str) { + *r_error_str = NULL; + String filepath = GDMonoMarshal::mono_string_to_godot(p_filepath); ScriptClassParser scp; @@ -220,6 +222,11 @@ int32_t godot_icall_ScriptClassParser_ParseFile(MonoString *p_filepath, MonoObje classDeclDict["base_count"] = classDecl.base.size(); classes.push_back(classDeclDict); } + } else { + String error_str = scp.get_error(); + if (!error_str.empty()) { + *r_error_str = GDMonoMarshal::mono_string_from_godot(error_str); + } } return err; } diff --git a/modules/mono/editor/script_class_parser.cpp b/modules/mono/editor/script_class_parser.cpp index c400479b89..8ac4df9952 100644 --- a/modules/mono/editor/script_class_parser.cpp +++ b/modules/mono/editor/script_class_parser.cpp @@ -302,8 +302,10 @@ Error ScriptClassParser::_skip_generic_type_params() { Error err = _skip_generic_type_params(); if (err) return err; - continue; - } else if (tk == TK_OP_GREATER) { + tk = get_token(); + } + + if (tk == TK_OP_GREATER) { return OK; } else if (tk != TK_COMMA) { error_str = "Unexpected token: " + get_token_name(tk); @@ -629,6 +631,85 @@ Error ScriptClassParser::parse(const String &p_code) { return OK; } +static String get_preprocessor_directive(const String &p_line, int p_from) { + CRASH_COND(p_line[p_from] != '#'); + p_from++; + int i = p_from; + while (i < p_line.length() && p_line[i] != ' ' && p_line[i] != '\t') { + i++; + } + return p_line.substr(p_from, i - p_from); +} + +static void run_dummy_preprocessor(String &r_source) { + + Vector<String> lines = r_source.split("\n", /* p_allow_empty: */ true); + + bool *include_lines = memnew_arr(bool, lines.size()); + + int if_level = -1; + Vector<bool> is_branch_being_compiled; + + for (int i = 0; i < lines.size(); i++) { + const String &line = lines[i]; + + const int line_len = line.length(); + + int j = 0; + while (j < line_len) { + if (line[j] != ' ' && line[j] != '\t') { + if (line[j] == '#') { + // First non-whitespace char of the line is '#' + include_lines[i] = false; + + String directive = get_preprocessor_directive(line, j); + + if (directive == "if") { + if_level++; + is_branch_being_compiled.push_back(if_level == 0 || is_branch_being_compiled[if_level - 1]); + } else if (directive == "elif") { + ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#elif' directive."); + is_branch_being_compiled.write[if_level] = false; + } else if (directive == "else") { + ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#else' directive."); + is_branch_being_compiled.write[if_level] = false; + } else if (directive == "endif") { + ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#endif' directive."); + is_branch_being_compiled.remove(if_level); + if_level--; + } + + break; + } else { + // First non-whitespace char of the line is not '#' + include_lines[i] = if_level == -1 || is_branch_being_compiled[if_level]; + break; + } + } + + j++; + } + + if (j == line_len) { + // Loop ended without finding a non-whitespace character. + // Either the line was empty or it only contained whitespaces. + include_lines[i] = if_level == -1 || is_branch_being_compiled[if_level]; + } + } + + r_source.clear(); + + // Custom join ignoring lines removed by the preprocessor + for (int i = 0; i < lines.size(); i++) { + if (i > 0 && include_lines[i - 1]) + r_source += '\n'; + + if (include_lines[i]) { + r_source += lines[i]; + } + } +} + Error ScriptClassParser::parse_file(const String &p_filepath) { String source; @@ -641,6 +722,8 @@ Error ScriptClassParser::parse_file(const String &p_filepath) { " Please ensure that scripts are saved in valid UTF-8 unicode." : "Failed to read file: '" + p_filepath + "'."); + run_dummy_preprocessor(source); + return parse(source); } diff --git a/modules/recast/register_types.cpp b/modules/recast/register_types.cpp index a1286c58c8..ea0ab00771 100644 --- a/modules/recast/register_types.cpp +++ b/modules/recast/register_types.cpp @@ -38,17 +38,17 @@ EditorNavigationMeshGenerator *_nav_mesh_generator = NULL; void register_recast_types() { #ifdef TOOLS_ENABLED - EditorPlugins::add_by_type<NavigationMeshEditorPlugin>(); - _nav_mesh_generator = memnew(EditorNavigationMeshGenerator); - ClassDB::APIType prev_api = ClassDB::get_current_api(); ClassDB::set_current_api(ClassDB::API_EDITOR); - ClassDB::register_class<EditorNavigationMeshGenerator>(); + EditorPlugins::add_by_type<NavigationMeshEditorPlugin>(); + _nav_mesh_generator = memnew(EditorNavigationMeshGenerator); - ClassDB::set_current_api(prev_api); + ClassDB::register_class<EditorNavigationMeshGenerator>(); Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationMeshGenerator", EditorNavigationMeshGenerator::get_singleton())); + + ClassDB::set_current_api(prev_api); #endif } diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 0a9f228b0a..86c1080182 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -2377,10 +2377,7 @@ VisualScriptEngineSingleton::TypeGuess VisualScriptEngineSingleton::guess_output return tg; } -void VisualScriptEngineSingleton::_bind_methods() { - - ClassDB::bind_method(D_METHOD("set_singleton", "name"), &VisualScriptEngineSingleton::set_singleton); - ClassDB::bind_method(D_METHOD("get_singleton"), &VisualScriptEngineSingleton::get_singleton); +void VisualScriptEngineSingleton::_validate_property(PropertyInfo &property) const { String cc; @@ -2397,7 +2394,16 @@ void VisualScriptEngineSingleton::_bind_methods() { cc += E->get().name; } - ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant", PROPERTY_HINT_ENUM, cc), "set_singleton", "get_singleton"); + property.hint = PROPERTY_HINT_ENUM; + property.hint_string = cc; +} + +void VisualScriptEngineSingleton::_bind_methods() { + + ClassDB::bind_method(D_METHOD("set_singleton", "name"), &VisualScriptEngineSingleton::set_singleton); + ClassDB::bind_method(D_METHOD("get_singleton"), &VisualScriptEngineSingleton::get_singleton); + + ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant"), "set_singleton", "get_singleton"); } VisualScriptEngineSingleton::VisualScriptEngineSingleton() { diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h index fe44af277f..0df5071491 100644 --- a/modules/visual_script/visual_script_nodes.h +++ b/modules/visual_script/visual_script_nodes.h @@ -614,6 +614,9 @@ class VisualScriptEngineSingleton : public VisualScriptNode { String singleton; +protected: + void _validate_property(PropertyInfo &property) const; + static void _bind_methods(); public: diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp index b639c635fd..27ea50b524 100644 --- a/modules/websocket/websocket_multiplayer_peer.cpp +++ b/modules/websocket/websocket_multiplayer_peer.cpp @@ -98,7 +98,7 @@ void WebSocketMultiplayerPeer::_bind_methods() { // int WebSocketMultiplayerPeer::get_available_packet_count() const { - ERR_FAIL_COND_V_MSG(!_is_multiplayer, ERR_UNCONFIGURED, "Please use get_peer(ID).get_available_packet_count to get available packet count from peers when not using the MultiplayerAPI."); + ERR_FAIL_COND_V_MSG(!_is_multiplayer, 0, "Please use get_peer(ID).get_available_packet_count to get available packet count from peers when not using the MultiplayerAPI."); return _incoming_packets.size(); } diff --git a/scene/resources/room.cpp b/platform/android/api/api.cpp index 51c4489ec3..2146c5409b 100644 --- a/scene/resources/room.cpp +++ b/platform/android/api/api.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* room.cpp */ +/* api.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,43 +28,59 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "room.h" +#include "api.h" -#include "servers/visual_server.h" +#include "core/engine.h" +#include "java_class_wrapper.h" -// FIXME: Left for reference for reimplementation using Area -#if 0 -RID RoomBounds::get_rid() const { +#if !defined(ANDROID_ENABLED) +static JavaClassWrapper *java_class_wrapper = NULL; +#endif - return area; -} +void register_android_api() { -void RoomBounds::set_geometry_hint(const PoolVector<Face3> &p_geometry_hint) { +#if !defined(ANDROID_ENABLED) + java_class_wrapper = memnew(JavaClassWrapper); // Dummy +#endif - geometry_hint = p_geometry_hint; + ClassDB::register_class<JavaClass>(); + ClassDB::register_class<JavaClassWrapper>(); + Engine::get_singleton()->add_singleton(Engine::Singleton("JavaClassWrapper", JavaClassWrapper::get_singleton())); } -PoolVector<Face3> RoomBounds::get_geometry_hint() const { +void unregister_android_api() { - return geometry_hint; +#if !defined(ANDROID_ENABLED) + memdelete(java_class_wrapper); +#endif } -void RoomBounds::_bind_methods() { +void JavaClassWrapper::_bind_methods() { + + ClassDB::bind_method(D_METHOD("wrap", "name"), &JavaClassWrapper::wrap); +} - ClassDB::bind_method(D_METHOD("set_geometry_hint", "triangles"), &RoomBounds::set_geometry_hint); - ClassDB::bind_method(D_METHOD("get_geometry_hint"), &RoomBounds::get_geometry_hint); +#if !defined(ANDROID_ENABLED) - //ADD_PROPERTY( PropertyInfo( Variant::DICTIONARY, "bounds"), "set_bounds","get_bounds") ; - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "geometry_hint"), "set_geometry_hint", "get_geometry_hint"); +Variant JavaClass::call(const StringName &, const Variant **, int, Variant::CallError &) { + return Variant(); } -RoomBounds::RoomBounds() { +JavaClass::JavaClass() { +} - area = VisualServer::get_singleton()->room_create(); +Variant JavaObject::call(const StringName &, const Variant **, int, Variant::CallError &) { + return Variant(); } -RoomBounds::~RoomBounds() { +JavaClassWrapper *JavaClassWrapper::singleton = NULL; - VisualServer::get_singleton()->free(area); +Ref<JavaClass> JavaClassWrapper::wrap(const String &) { + return Ref<JavaClass>(); } + +JavaClassWrapper::JavaClassWrapper() { + singleton = this; +} + #endif diff --git a/scene/resources/room.h b/platform/android/api/api.h index 809a9c1de8..c7296d92a7 100644 --- a/scene/resources/room.h +++ b/platform/android/api/api.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* room.h */ +/* api.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,35 +28,5 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef ROOM_BOUNDS_H -#define ROOM_BOUNDS_H - -#include "core/math/bsp_tree.h" -#include "core/resource.h" - -// FIXME: left for reference but will be removed when portals are reimplemented using Area -#if 0 - -class RoomBounds : public Resource { - - GDCLASS(RoomBounds, Resource); - RES_BASE_EXTENSION("room"); - - RID area; - PoolVector<Face3> geometry_hint; - -protected: - static void _bind_methods(); - -public: - virtual RID get_rid() const; - - void set_geometry_hint(const PoolVector<Face3> &p_geometry_hint); - PoolVector<Face3> get_geometry_hint() const; - - RoomBounds(); - ~RoomBounds(); -}; - -#endif -#endif // ROOM_H +void register_android_api(); +void unregister_android_api(); diff --git a/platform/android/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h index 8075b297b0..6c06d57ac1 100644 --- a/platform/android/java_class_wrapper.h +++ b/platform/android/api/java_class_wrapper.h @@ -32,16 +32,22 @@ #define JAVA_CLASS_WRAPPER_H #include "core/reference.h" + +#ifdef ANDROID_ENABLED #include <android/log.h> #include <jni.h> +#endif +#ifdef ANDROID_ENABLED class JavaObject; +#endif class JavaClass : public Reference { GDCLASS(JavaClass, Reference); - enum ArgumentType { +#ifdef ANDROID_ENABLED + enum ArgumentType{ ARG_TYPE_VOID, ARG_TYPE_BOOLEAN, @@ -159,6 +165,7 @@ class JavaClass : public Reference { friend class JavaClassWrapper; Map<StringName, List<MethodInfo> > methods; jclass _class; +#endif public: virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); @@ -170,22 +177,27 @@ class JavaObject : public Reference { GDCLASS(JavaObject, Reference); +#ifdef ANDROID_ENABLED Ref<JavaClass> base_class; friend class JavaClass; jobject instance; +#endif public: virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); +#ifdef ANDROID_ENABLED JavaObject(const Ref<JavaClass> &p_base, jobject *p_instance); ~JavaObject(); +#endif }; class JavaClassWrapper : public Object { GDCLASS(JavaClassWrapper, Object); +#ifdef ANDROID_ENABLED Map<String, Ref<JavaClass> > class_cache; friend class JavaClass; jclass activityClass; @@ -211,6 +223,7 @@ class JavaClassWrapper : public Object { jobject classLoader; bool _get_type_sig(JNIEnv *env, jobject obj, uint32_t &sig, String &strsig); +#endif static JavaClassWrapper *singleton; @@ -222,7 +235,11 @@ public: Ref<JavaClass> wrap(const String &p_class); +#ifdef ANDROID_ENABLED JavaClassWrapper(jobject p_activity = NULL); +#else + JavaClassWrapper(); +#endif }; #endif // JAVA_CLASS_WRAPPER_H diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp index 9e294f3f14..6e9864c803 100644 --- a/platform/android/audio_driver_opensl.cpp +++ b/platform/android/audio_driver_opensl.cpp @@ -208,8 +208,8 @@ void AudioDriverOpenSL::_record_buffer_callback(SLAndroidSimpleBufferQueueItf qu for (int i = 0; i < rec_buffer.size(); i++) { int32_t sample = rec_buffer[i] << 16; - capture_buffer_write(sample); - capture_buffer_write(sample); // call twice to convert to Stereo + input_buffer_write(sample); + input_buffer_write(sample); // call twice to convert to Stereo } SLresult res = (*recordBufferQueueItf)->Enqueue(recordBufferQueueItf, rec_buffer.ptrw(), rec_buffer.size() * sizeof(int16_t)); @@ -280,7 +280,7 @@ Error AudioDriverOpenSL::capture_init_device() { const int rec_buffer_frames = 2048; rec_buffer.resize(rec_buffer_frames); - capture_buffer_init(rec_buffer_frames); + input_buffer_init(rec_buffer_frames); res = (*recordBufferQueueItf)->Enqueue(recordBufferQueueItf, rec_buffer.ptrw(), rec_buffer.size() * sizeof(int16_t)); ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN); diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index feebea2738..fe2fd89710 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "java_class_wrapper.h" +#include "api/java_class_wrapper.h" #include "string_android.h" #include "thread_jandroid.h" @@ -546,11 +546,6 @@ JavaObject::~JavaObject() { //////////////////// -void JavaClassWrapper::_bind_methods() { - - ClassDB::bind_method(D_METHOD("wrap", "name"), &JavaClassWrapper::wrap); -} - bool JavaClassWrapper::_get_type_sig(JNIEnv *env, jobject obj, uint32_t &sig, String &strsig) { jstring name2 = (jstring)env->CallObjectMethod(obj, Class_getName); diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp index 858ff89cbc..dedb2ee114 100644 --- a/platform/android/java_godot_lib_jni.cpp +++ b/platform/android/java_godot_lib_jni.cpp @@ -33,6 +33,7 @@ #include "java_godot_wrapper.h" #include "android/asset_manager_jni.h" +#include "api/java_class_wrapper.h" #include "audio_driver_jandroid.h" #include "core/engine.h" #include "core/os/keyboard.h" @@ -40,7 +41,6 @@ #include "dir_access_jandroid.h" #include "file_access_android.h" #include "file_access_jandroid.h" -#include "java_class_wrapper.h" #include "main/input_default.h" #include "main/main.h" #include "net_socket_android.h" @@ -739,7 +739,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo } java_class_wrapper = memnew(JavaClassWrapper(godot_java->get_activity())); - Engine::get_singleton()->add_singleton(Engine::Singleton("JavaClassWrapper", java_class_wrapper)); _initialize_java_modules(); } diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp index 4144eb3499..f1bc7c4382 100644 --- a/platform/javascript/audio_driver_javascript.cpp +++ b/platform/javascript/audio_driver_javascript.cpp @@ -63,7 +63,7 @@ void AudioDriverJavaScript::mix_to_js() { void AudioDriverJavaScript::process_capture(float sample) { int32_t sample32 = int32_t(sample * 32768.f) * (1U << 16); - capture_buffer_write(sample32); + input_buffer_write(sample32); } Error AudioDriverJavaScript::init() { @@ -198,7 +198,7 @@ void AudioDriverJavaScript::finish() { Error AudioDriverJavaScript::capture_start() { - capture_buffer_init(buffer_length); + input_buffer_init(buffer_length); /* clang-format off */ EM_ASM({ @@ -245,6 +245,8 @@ Error AudioDriverJavaScript::capture_stop() { }); /* clang-format on */ + input_buffer.clear(); + return OK; } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 2f0d49e6dd..57c7b0594c 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2000,11 +2000,6 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) { if (last_is_pressed) { k->set_echo(true); } - } else { - //ignore - if (!last_is_pressed) { - return; - } } //printf("key: %x\n",k->get_scancode()); diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index c480423eca..a6da027e0a 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -346,195 +346,6 @@ void Polygon2D::_notification(int p_what) { if (total_indices.size()) { VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), total_indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID(), -1, RID(), antialiased); } - -#if 0 - //use splits - Vector<int> loop; - int sc = splits.size(); - PoolVector<int>::Read r = splits.read(); - - - print_line("has splits, amount " + itos(splits.size())); - Vector<Vector<int> > loops; - - // find a point that can be used to begin, must not be in a split, and have to the left and right the same one - // like this one -> x---o - // \ / \ . - // o---o - int base_point = -1; - { - int current_point = -1; - int base_point_prev_split = -1; - - - for (int i = 0; i < points.size(); i++) { - - //find if this point is in a split - int split_index = -1; - bool has_prev_split = false; - int min_dist_to_end = 0x7FFFFFFF; - - for (int j = 0; j < sc; j += 2) { - - int split_pos = -1; - int split_end = -1; - - if (r[j + 0] == i) { //found split in first point - split_pos = r[j + 0]; - split_end = r[j + 1]; - } else if (r[j + 1] == i) { //found split in second point - split_pos = r[j + 1]; - split_end = r[j + 0]; - } - - if (split_pos == split_end) { - continue; //either nothing found or begin == end, this not a split in either case - } - - if (j == base_point_prev_split) { - has_prev_split = true; - } - - //compute distance from split pos to split end in current traversal direction - int dist_to_end = split_end > split_pos ? split_end - split_pos : (last - split_pos + split_end); - - if (dist_to_end < min_dist_to_end) { - //always keep the valid split with the least distance to the loop - min_dist_to_end = dist_to_end; - split_index = j; - } - } - - if (split_index == -1) { - current_point = i; //no split here, we are testing this point - } else if (has_prev_split) { - base_point = current_point; // there is a split and it contains the previous visited split, success - break; - } else { - //invalidate current point and keep split - current_point = -1; - base_point_prev_split = split_index; - } - } - } - - print_line("found base point: " + itos(base_point)); - - if (base_point != -1) { - - int point = base_point; - int last = base_point; - //go through all the points, find splits - do { - - int split; - int last_dist_to_end = -1; //maximum valid distance to end - - do { - - loop.push_back(point); //push current point - - split = -1; - int end = -1; - - int max_dist_to_end = 0; - - //find if this point is in a split - for (int j = 0; j < sc; j += 2) { - - int split_pos = -1; - int split_end = -1; - - if (r[j + 0] == point) { //match first split index - split_pos = r[j + 0]; - split_end = r[j + 1]; - } else if (r[j + 1] == point) { //match second split index - split_pos = r[j + 1]; - split_end = r[j + 0]; - } - - if (split_pos == split_end) { - continue; //either nothing found or begin == end, this not a split in either case - } - - //compute distance from split pos to split end - int dist_to_end = split_end > split_pos ? split_end - split_pos : (points.size() - split_pos + split_end); - - if (last_dist_to_end != -1 && dist_to_end >= last_dist_to_end) { - //distance must be shorter than in last iteration, means we've tested this before so ignore - continue; - } else if (dist_to_end > max_dist_to_end) { - //always keep the valid point with the most distance (as long as it's valid) - max_dist_to_end = dist_to_end; - split = split_pos; - end = split_end; - } - } - - if (split != -1) { - //found a split! - int from = end; - - //add points until last is reached - while (true) { - //find if point is in a split - loop.push_back(from); - - if (from == last) { - break; - } - - from++; - if (from >= points.size()) { //wrap if reached end - from = 0; - } - - if (from == loop[0]) { - break; //end because we reached split source - } - } - - loops.push_back(loop); //done with this loop - loop.clear(); - - last_dist_to_end = max_dist_to_end; - last = end; //algorithm can safely finish in this split point - } - - } while (split != -1); - - } while (point != last); - } - - if (loop.size() >=2 ) { //points remained - //points remain - loop.push_back(last); //no splits found, use last - loops.push_back(loop); - } - - print_line("total loops: " + itos(loops.size())); - - if (loops.size()) { //loops found - Vector<int> indices; - - for (int i = 0; i < loops.size(); i++) { - Vector<int> loop = loops[i]; - Vector<Vector2> vertices; - vertices.resize(loop.size()); - for (int j = 0; j < vertices.size(); j++) { - vertices.write[j] = points[loop[j]]; - } - Vector<int> sub_indices = Geometry::triangulate_polygon(vertices); - int from = indices.size(); - indices.resize(from + sub_indices.size()); - for (int j = 0; j < sub_indices.size(); j++) { - indices.write[from + j] = loop[sub_indices[j]]; - } - } - - VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID()); - } -#endif } } break; diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp index 82293268b9..f0aaba1065 100644 --- a/scene/3d/arvr_nodes.cpp +++ b/scene/3d/arvr_nodes.cpp @@ -295,7 +295,8 @@ int ARVRController::get_joystick_id() const { ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); if (tracker == NULL) { - return 0; + // No tracker? no joystick id... (0 is our first joystick) + return -1; }; return tracker->get_joy_id(); diff --git a/scene/3d/portal.cpp b/scene/3d/portal.cpp deleted file mode 100644 index e60ca619dd..0000000000 --- a/scene/3d/portal.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/*************************************************************************/ -/* portal.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "portal.h" -#include "core/project_settings.h" -#include "scene/resources/surface_tool.h" -#include "servers/visual_server.h" - -// FIXME: This will be removed, kept as reference for new implementation -#if 0 -bool Portal::_set(const StringName &p_name, const Variant &p_value) { - - if (p_name == "shape") { - PoolVector<float> src_coords = p_value; - Vector<Point2> points; - int src_coords_size = src_coords.size(); - ERR_FAIL_COND_V(src_coords_size % 2, false); - points.resize(src_coords_size / 2); - for (int i = 0; i < points.size(); i++) { - - points[i].x = src_coords[i * 2 + 0]; - points[i].y = src_coords[i * 2 + 1]; - set_shape(points); - } - } else if (p_name == "enabled") { - set_enabled(p_value); - } else if (p_name == "disable_distance") { - set_disable_distance(p_value); - } else if (p_name == "disabled_color") { - set_disabled_color(p_value); - } else if (p_name == "connect_range") { - set_connect_range(p_value); - } else - return false; - - return true; -} - -bool Portal::_get(const StringName &p_name, Variant &r_ret) const { - - if (p_name == "shape") { - Vector<Point2> points = get_shape(); - PoolVector<float> dst_coords; - dst_coords.resize(points.size() * 2); - - for (int i = 0; i < points.size(); i++) { - - dst_coords.set(i * 2 + 0, points[i].x); - dst_coords.set(i * 2 + 1, points[i].y); - } - - r_ret = dst_coords; - } else if (p_name == "enabled") { - r_ret = is_enabled(); - } else if (p_name == "disable_distance") { - r_ret = get_disable_distance(); - } else if (p_name == "disabled_color") { - r_ret = get_disabled_color(); - } else if (p_name == "connect_range") { - r_ret = get_connect_range(); - } else - return false; - return true; -} - -void Portal::_get_property_list(List<PropertyInfo> *p_list) const { - - p_list->push_back(PropertyInfo(Variant::POOL_REAL_ARRAY, "shape")); - p_list->push_back(PropertyInfo(Variant::BOOL, "enabled")); - p_list->push_back(PropertyInfo(Variant::REAL, "disable_distance", PROPERTY_HINT_RANGE, "0,4096,0.01")); - p_list->push_back(PropertyInfo(Variant::COLOR, "disabled_color")); - p_list->push_back(PropertyInfo(Variant::REAL, "connect_range", PROPERTY_HINT_RANGE, "0.1,4096,0.01")); -} - -AABB Portal::get_aabb() const { - - return aabb; -} -PoolVector<Face3> Portal::get_faces(uint32_t p_usage_flags) const { - - if (!(p_usage_flags & FACES_ENCLOSING)) - return PoolVector<Face3>(); - - Vector<Point2> shape = get_shape(); - if (shape.size() == 0) - return PoolVector<Face3>(); - - Vector2 center; - for (int i = 0; i < shape.size(); i++) { - - center += shape[i]; - } - - PoolVector<Face3> ret; - center /= shape.size(); - - for (int i = 0; i < shape.size(); i++) { - - int n = (i + 1) % shape.size(); - - Face3 f; - f.vertex[0] = Vector3(center.x, center.y, 0); - f.vertex[1] = Vector3(shape[i].x, shape[i].y, 0); - f.vertex[2] = Vector3(shape[n].x, shape[n].y, 0); - ret.push_back(f); - } - - return ret; -} - -void Portal::set_shape(const Vector<Point2> &p_shape) { - - VisualServer::get_singleton()->portal_set_shape(portal, p_shape); - shape = p_shape; - update_gizmo(); -} - -Vector<Point2> Portal::get_shape() const { - - return shape; -} - -void Portal::set_connect_range(float p_range) { - - connect_range = p_range; - //VisualServer::get_singleton()->portal_set_connect_range(portal,p_range); -} - -float Portal::get_connect_range() const { - - return connect_range; -} - -void Portal::set_enabled(bool p_enabled) { - - enabled = p_enabled; - VisualServer::get_singleton()->portal_set_enabled(portal, enabled); -} - -bool Portal::is_enabled() const { - - return enabled; -} - -void Portal::set_disable_distance(float p_distance) { - - disable_distance = p_distance; - VisualServer::get_singleton()->portal_set_disable_distance(portal, disable_distance); -} -float Portal::get_disable_distance() const { - - return disable_distance; -} - -void Portal::set_disabled_color(const Color &p_disabled_color) { - - disabled_color = p_disabled_color; - VisualServer::get_singleton()->portal_set_disabled_color(portal, disabled_color); -} - -Color Portal::get_disabled_color() const { - - return disabled_color; -} - -void Portal::_bind_methods() { - - ClassDB::bind_method(D_METHOD("set_shape", "points"), &Portal::set_shape); - ClassDB::bind_method(D_METHOD("get_shape"), &Portal::get_shape); - - ClassDB::bind_method(D_METHOD("set_enabled", "enable"), &Portal::set_enabled); - ClassDB::bind_method(D_METHOD("is_enabled"), &Portal::is_enabled); - - ClassDB::bind_method(D_METHOD("set_disable_distance", "distance"), &Portal::set_disable_distance); - ClassDB::bind_method(D_METHOD("get_disable_distance"), &Portal::get_disable_distance); - - ClassDB::bind_method(D_METHOD("set_disabled_color", "color"), &Portal::set_disabled_color); - ClassDB::bind_method(D_METHOD("get_disabled_color"), &Portal::get_disabled_color); - - ClassDB::bind_method(D_METHOD("set_connect_range", "range"), &Portal::set_connect_range); - ClassDB::bind_method(D_METHOD("get_connect_range"), &Portal::get_connect_range); -} - -Portal::Portal() { - - portal = VisualServer::get_singleton()->portal_create(); - Vector<Point2> points; - points.push_back(Point2(-1, 1)); - points.push_back(Point2(1, 1)); - points.push_back(Point2(1, -1)); - points.push_back(Point2(-1, -1)); - set_shape(points); // default shape - - set_connect_range(0.8); - set_disable_distance(50); - set_enabled(true); - - set_base(portal); -} - -Portal::~Portal() { - - VisualServer::get_singleton()->free(portal); -} -#endif diff --git a/scene/3d/portal.h b/scene/3d/portal.h deleted file mode 100644 index 7e8b016e79..0000000000 --- a/scene/3d/portal.h +++ /dev/null @@ -1,88 +0,0 @@ -/*************************************************************************/ -/* portal.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef PORTAL_H -#define PORTAL_H - -#include "scene/3d/visual_instance.h" - -/* Portal Logic: - If a portal is placed next (very close to) a similar, opposing portal, they automatically connect, - otherwise, a portal connects to the parent room -*/ -// FIXME: This will be redone and replaced by area portals, left for reference -// since a new class with this name will have to exist and want to reuse the gizmos -#if 0 -class Portal : public VisualInstance { - - GDCLASS(Portal, VisualInstance); - - RID portal; - Vector<Point2> shape; - - bool enabled; - float disable_distance; - Color disabled_color; - float connect_range; - - AABB aabb; - -protected: - bool _set(const StringName &p_name, const Variant &p_value); - bool _get(const StringName &p_name, Variant &r_ret) const; - void _get_property_list(List<PropertyInfo> *p_list) const; - - static void _bind_methods(); - -public: - virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; - - void set_enabled(bool p_enabled); - bool is_enabled() const; - - void set_disable_distance(float p_distance); - float get_disable_distance() const; - - void set_disabled_color(const Color &p_disabled_color); - Color get_disabled_color() const; - - void set_shape(const Vector<Point2> &p_shape); - Vector<Point2> get_shape() const; - - void set_connect_range(float p_range); - float get_connect_range() const; - - Portal(); - ~Portal(); -}; - -#endif -#endif diff --git a/scene/3d/room_instance.cpp b/scene/3d/room_instance.cpp deleted file mode 100644 index 61687360a6..0000000000 --- a/scene/3d/room_instance.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/*************************************************************************/ -/* room_instance.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "room_instance.h" - -#include "servers/visual_server.h" - -// FIXME: Will be removed, kept as reference for new implementation -#if 0 -#include "core/math/geometry.h" -#include "core/project_settings.h" -#include "scene/resources/surface_tool.h" - -void Room::_notification(int p_what) { - - switch (p_what) { - case NOTIFICATION_ENTER_WORLD: { - // go find parent level - Node *parent_room = get_parent(); - level = 0; - - while (parent_room) { - - Room *r = Object::cast_to<Room>(parent_room); - if (r) { - - level = r->level + 1; - break; - } - - parent_room = parent_room->get_parent(); - } - - } break; - case NOTIFICATION_TRANSFORM_CHANGED: { - } break; - case NOTIFICATION_EXIT_WORLD: { - - } break; - } -} - -AABB Room::get_aabb() const { - - if (room.is_null()) - return AABB(); - - return AABB(); -} - -PoolVector<Face3> Room::get_faces(uint32_t p_usage_flags) const { - - return PoolVector<Face3>(); -} - -void Room::set_room(const Ref<RoomBounds> &p_room) { - - room = p_room; - update_gizmo(); - - if (room.is_valid()) { - - set_base(room->get_rid()); - } else { - set_base(RID()); - } - - if (!is_inside_tree()) - return; - - propagate_notification(NOTIFICATION_AREA_CHANGED); - update_gizmo(); -} - -Ref<RoomBounds> Room::get_room() const { - - return room; -} - -void Room::_parse_node_faces(PoolVector<Face3> &all_faces, const Node *p_node) const { - - const VisualInstance *vi = Object::cast_to<VisualInstance>(p_node); - - if (vi) { - PoolVector<Face3> faces = vi->get_faces(FACES_ENCLOSING); - - if (faces.size()) { - int old_len = all_faces.size(); - all_faces.resize(all_faces.size() + faces.size()); - int new_len = all_faces.size(); - PoolVector<Face3>::Write all_facesw = all_faces.write(); - Face3 *all_facesptr = all_facesw.ptr(); - - PoolVector<Face3>::Read facesr = faces.read(); - const Face3 *facesptr = facesr.ptr(); - - Transform tr = vi->get_relative_transform(this); - - for (int i = old_len; i < new_len; i++) { - - Face3 f = facesptr[i - old_len]; - for (int j = 0; j < 3; j++) - f.vertex[j] = tr.xform(f.vertex[j]); - all_facesptr[i] = f; - } - } - } - - for (int i = 0; i < p_node->get_child_count(); i++) { - - _parse_node_faces(all_faces, p_node->get_child(i)); - } -} - -void Room::_bounds_changed() { - - update_gizmo(); -} - -void Room::_bind_methods() { - - ClassDB::bind_method(D_METHOD("set_room", "room"), &Room::set_room); - ClassDB::bind_method(D_METHOD("get_room"), &Room::get_room); - - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "room/room", PROPERTY_HINT_RESOURCE_TYPE, "Area"), "set_room", "get_room"); -} - -Room::Room() { - - // sound_enabled=false; - - level = 0; -} - -Room::~Room() { -} -#endif diff --git a/scene/3d/room_instance.h b/scene/3d/room_instance.h deleted file mode 100644 index 071d42cff2..0000000000 --- a/scene/3d/room_instance.h +++ /dev/null @@ -1,81 +0,0 @@ -/*************************************************************************/ -/* room_instance.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef ROOM_INSTANCE_H -#define ROOM_INSTANCE_H - -#include "scene/3d/visual_instance.h" -#include "scene/resources/room.h" - -/* RoomInstance Logic: - a) Instances that belong to the room are drawn only if the room is visible (seen through portal, or player inside) - b) Instances that don't belong to any room are considered to belong to the root room (RID empty) - c) "dynamic" Instances are assigned to the rooms their AABB touch - -*/ - -// FIXME: this will be removed, left for reference -#if 0 - -class Room : public VisualInstance { - - GDCLASS(Room, VisualInstance); - -public: -private: - Ref<RoomBounds> room; - - int level; - void _parse_node_faces(PoolVector<Face3> &all_faces, const Node *p_node) const; - - void _bounds_changed(); - -protected: - void _notification(int p_what); - - static void _bind_methods(); - -public: - enum { - // used to notify portals that the room in which they are has changed. - NOTIFICATION_AREA_CHANGED = 60 - }; - - virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; - - void set_room(const Ref<RoomBounds> &p_room); - Ref<RoomBounds> get_room() const; - - Room(); - ~Room(); -}; -#endif -#endif // ROOM_INSTANCE_H diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index 9970b9350f..c1ec59d49f 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "voxel_light_baker.h" + #include "core/os/os.h" #include "core/os/threaded_array_processor.h" @@ -2118,8 +2119,7 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh } } -// Enable for debugging -#if 0 +#if 0 // Enable for debugging. { PoolVector<uint8_t> img; int ls = lightmap.size(); diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index a604fb9604..5f606ff4c5 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "animation_blend_tree.h" + #include "scene/scene_string_names.h" void AnimationNodeAnimation::set_animation(const StringName &p_name) { @@ -718,21 +719,6 @@ String AnimationNodeTransition::get_input_caption(int p_input) const { return inputs[p_input].name; } -#if 0 - Ref<AnimationNodeBlendTree> tree = get_parent(); - - if (tree.is_valid() && current >= 0) { - prev = current; - prev_xfading = xfade; - time = 0; - current = p_current; - switched = true; - _change_notify("current"); - } else { - current = p_current; - } -#endif - void AnimationNodeTransition::set_cross_fade_time(float p_fade) { xfade = p_fade; } diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 7c43d8fb14..238d6c20cc 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -459,10 +459,7 @@ void SceneTree::input_event(const Ref<InputEvent> &p_event) { } void SceneTree::init() { - - //_quit=false; initialized = true; - root->_set_tree(this); MainLoop::init(); } @@ -1285,6 +1282,14 @@ void SceneTree::_change_scene(Node *p_to) { current_scene = NULL; } + // If we're quitting, abort. + if (unlikely(_quit)) { + if (p_to) { // Prevent memory leak. + memdelete(p_to); + } + return; + } + if (p_to) { current_scene = p_to; root->add_child(p_to); @@ -1292,15 +1297,14 @@ void SceneTree::_change_scene(Node *p_to) { } Error SceneTree::change_scene(const String &p_path) { - Ref<PackedScene> new_scene = ResourceLoader::load(p_path); if (new_scene.is_null()) return ERR_CANT_OPEN; return change_scene_to(new_scene); } -Error SceneTree::change_scene_to(const Ref<PackedScene> &p_scene) { +Error SceneTree::change_scene_to(const Ref<PackedScene> &p_scene) { Node *new_scene = NULL; if (p_scene.is_valid()) { new_scene = p_scene->instance(); @@ -1310,8 +1314,8 @@ Error SceneTree::change_scene_to(const Ref<PackedScene> &p_scene) { call_deferred("_change_scene", new_scene); return OK; } -Error SceneTree::reload_current_scene() { +Error SceneTree::reload_current_scene() { ERR_FAIL_COND_V(!current_scene, ERR_UNCONFIGURED); String fname = current_scene->get_filename(); return change_scene(fname); @@ -1322,6 +1326,7 @@ void SceneTree::add_current_scene(Node *p_current) { current_scene = p_current; root->add_child(p_current); } + #ifdef DEBUG_ENABLED static void _fill_array(Node *p_node, Array &array, int p_level) { diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 09d4505458..c0c6b864a5 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -194,13 +194,11 @@ #include "scene/3d/path.h" #include "scene/3d/physics_body.h" #include "scene/3d/physics_joint.h" -#include "scene/3d/portal.h" #include "scene/3d/position_3d.h" #include "scene/3d/proximity_group.h" #include "scene/3d/ray_cast.h" #include "scene/3d/reflection_probe.h" #include "scene/3d/remote_transform.h" -#include "scene/3d/room_instance.h" #include "scene/3d/skeleton.h" #include "scene/3d/soft_body.h" #include "scene/3d/spring_arm.h" diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 8b619345d6..d19d82d252 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -130,7 +130,10 @@ Error DynamicFontAtSize::_load() { } else { FileAccess *f = FileAccess::open(font->font_path, FileAccess::READ); - ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, "Cannot open font file '" + font->font_path + "'."); + if (!f) { + FT_Done_FreeType(library); + ERR_FAIL_V_MSG(ERR_CANT_OPEN, "Cannot open font file '" + font->font_path + "'."); + } size_t len = f->get_len(); _fontdata[font->font_path] = Vector<uint8_t>(); @@ -145,7 +148,10 @@ Error DynamicFontAtSize::_load() { if (font->font_mem == NULL && font->font_path != String()) { FileAccess *f = FileAccess::open(font->font_path, FileAccess::READ); - ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, "Cannot open font file '" + font->font_path + "'."); + if (!f) { + FT_Done_FreeType(library); + ERR_FAIL_V_MSG(ERR_CANT_OPEN, "Cannot open font file '" + font->font_path + "'."); + } memset(&stream, 0, sizeof(FT_StreamRec)); stream.base = NULL; @@ -176,6 +182,7 @@ Error DynamicFontAtSize::_load() { error = FT_Open_Face(library, &fargs, 0, &face); } else { + FT_Done_FreeType(library); ERR_FAIL_V_MSG(ERR_UNCONFIGURED, "DynamicFont uninitialized."); } @@ -1011,8 +1018,8 @@ void DynamicFont::_bind_methods() { ClassDB::bind_method(D_METHOD("get_fallback_count"), &DynamicFont::get_fallback_count); ADD_GROUP("Settings", ""); - ADD_PROPERTY(PropertyInfo(Variant::INT, "size", PROPERTY_HINT_RANGE, "1,255,1"), "set_size", "get_size"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "outline_size", PROPERTY_HINT_RANGE, "0,255,1"), "set_outline_size", "get_outline_size"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "size", PROPERTY_HINT_RANGE, "1,1024,1"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "outline_size", PROPERTY_HINT_RANGE, "0,1024,1"), "set_outline_size", "get_outline_size"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "outline_color"), "set_outline_color", "get_outline_color"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_mipmaps"), "set_use_mipmaps", "get_use_mipmaps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_filter"), "set_use_filter", "get_use_filter"); diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 960919df47..19c59b3817 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -628,8 +628,8 @@ void BitmapFont::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars"); ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "-1024,1024,1"), "set_height", "get_height"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ascent", PROPERTY_HINT_RANGE, "-1024,1024,1"), "set_ascent", "get_ascent"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "1,1024,1"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "ascent", PROPERTY_HINT_RANGE, "0,1024,1"), "set_ascent", "get_ascent"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_field"), "set_distance_field_hint", "is_distance_field_hint"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "fallback", PROPERTY_HINT_RESOURCE_TYPE, "BitmapFont"), "set_fallback", "get_fallback"); } diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 37792eaaea..4d2082e3c1 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -378,6 +378,9 @@ void VisualShader::remove_node(Type p_type, int p_id) { List<Connection>::Element *N = E->next(); if (E->get().from_node == p_id || E->get().to_node == p_id) { g->connections.erase(E); + if (E->get().from_node == p_id) { + g->nodes[E->get().to_node].prev_connected_nodes.erase(p_id); + } } E = N; } @@ -399,6 +402,25 @@ bool VisualShader::is_node_connection(Type p_type, int p_from_node, int p_from_p return false; } +bool VisualShader::is_nodes_connected_relatively(const Graph *p_graph, int p_node, int p_target) const { + bool result = false; + + const VisualShader::Node &node = p_graph->nodes[p_node]; + + for (const List<int>::Element *E = node.prev_connected_nodes.front(); E; E = E->next()) { + + if (E->get() == p_target) { + return true; + } + + result = is_nodes_connected_relatively(p_graph, E->get(), p_target); + if (result) { + break; + } + } + return result; +} + bool VisualShader::can_connect_nodes(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) const { ERR_FAIL_INDEX_V(p_type, TYPE_MAX, false); @@ -433,6 +455,9 @@ bool VisualShader::can_connect_nodes(Type p_type, int p_from_node, int p_from_po } } + if (is_nodes_connected_relatively(g, p_from_node, p_to_node)) + return false; + return true; } @@ -449,6 +474,8 @@ void VisualShader::connect_nodes_forced(Type p_type, int p_from_node, int p_from c.to_node = p_to_node; c.to_port = p_to_port; g->connections.push_back(c); + g->nodes[p_to_node].prev_connected_nodes.push_back(p_from_node); + _queue_update(); } @@ -479,6 +506,7 @@ Error VisualShader::connect_nodes(Type p_type, int p_from_node, int p_from_port, c.to_node = p_to_node; c.to_port = p_to_port; g->connections.push_back(c); + g->nodes[p_to_node].prev_connected_nodes.push_back(p_from_node); _queue_update(); return OK; @@ -492,6 +520,7 @@ void VisualShader::disconnect_nodes(Type p_type, int p_from_node, int p_from_por if (E->get().from_node == p_from_node && E->get().from_port == p_from_port && E->get().to_node == p_to_node && E->get().to_port == p_to_port) { g->connections.erase(E); + g->nodes[p_to_node].prev_connected_nodes.erase(p_from_node); _queue_update(); return; } @@ -1326,6 +1355,7 @@ void VisualShader::_input_type_changed(Type p_type, int p_id) { List<Connection>::Element *N = E->next(); if (E->get().from_node == p_id) { g->connections.erase(E); + g->nodes[E->get().to_node].prev_connected_nodes.erase(p_id); } E = N; } diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h index 0a3d5f96bd..b2803d1dfb 100644 --- a/scene/resources/visual_shader.h +++ b/scene/resources/visual_shader.h @@ -65,6 +65,7 @@ private: struct Node { Ref<VisualShaderNode> node; Vector2 position; + List<int> prev_connected_nodes; }; struct Graph { @@ -135,6 +136,8 @@ public: void remove_node(Type p_type, int p_id); bool is_node_connection(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) const; + + bool is_nodes_connected_relatively(const Graph *p_graph, int p_node, int p_target) const; bool can_connect_nodes(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) const; Error connect_nodes(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port); void disconnect_nodes(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port); diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 6b286e09e9..58742c82d4 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -134,31 +134,31 @@ AudioStreamMicrophone::AudioStreamMicrophone() { void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_frames) { - AudioServer::get_singleton()->lock(); + AudioDriver::get_singleton()->lock(); - PoolVector<int32_t> capture_buffer = AudioServer::get_singleton()->get_capture_buffer(); - unsigned int capture_size = AudioServer::get_singleton()->get_capture_size(); - int mix_rate = AudioServer::get_singleton()->get_mix_rate(); - unsigned int playback_delay = MIN(((50 * mix_rate) / 1000) * 2, capture_buffer.size() >> 1); + Vector<int32_t> buf = AudioDriver::get_singleton()->get_input_buffer(); + unsigned int input_size = AudioDriver::get_singleton()->get_input_size(); + int mix_rate = AudioDriver::get_singleton()->get_mix_rate(); + unsigned int playback_delay = MIN(((50 * mix_rate) / 1000) * 2, buf.size() >> 1); #ifdef DEBUG_ENABLED - unsigned int capture_position = AudioServer::get_singleton()->get_capture_position(); + unsigned int input_position = AudioDriver::get_singleton()->get_input_position(); #endif - if (playback_delay > capture_size) { + if (playback_delay > input_size) { for (int i = 0; i < p_frames; i++) { p_buffer[i] = AudioFrame(0.0f, 0.0f); } - capture_ofs = 0; + input_ofs = 0; } else { for (int i = 0; i < p_frames; i++) { - if (capture_size > capture_ofs && (int)capture_ofs < capture_buffer.size()) { - float l = (capture_buffer[capture_ofs++] >> 16) / 32768.f; - if ((int)capture_ofs >= capture_buffer.size()) { - capture_ofs = 0; + if (input_size > input_ofs && (int)input_ofs < buf.size()) { + float l = (buf[input_ofs++] >> 16) / 32768.f; + if ((int)input_ofs >= buf.size()) { + input_ofs = 0; } - float r = (capture_buffer[capture_ofs++] >> 16) / 32768.f; - if ((int)capture_ofs >= capture_buffer.size()) { - capture_ofs = 0; + float r = (buf[input_ofs++] >> 16) / 32768.f; + if ((int)input_ofs >= buf.size()) { + input_ofs = 0; } p_buffer[i] = AudioFrame(l, r); @@ -169,12 +169,12 @@ void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_fr } #ifdef DEBUG_ENABLED - if (capture_ofs > capture_position && (int)(capture_ofs - capture_position) < (p_frames * 2)) { - print_verbose(String(get_class_name()) + " buffer underrun: capture_position=" + itos(capture_position) + " capture_ofs=" + itos(capture_ofs) + " capture_size=" + itos(capture_size)); + if (input_ofs > input_position && (int)(input_ofs - input_position) < (p_frames * 2)) { + print_verbose(String(get_class_name()) + " buffer underrun: input_position=" + itos(input_position) + " input_ofs=" + itos(input_ofs) + " input_size=" + itos(input_size)); } #endif - AudioServer::get_singleton()->unlock(); + AudioDriver::get_singleton()->unlock(); } void AudioStreamPlaybackMicrophone::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) { @@ -196,9 +196,9 @@ void AudioStreamPlaybackMicrophone::start(float p_from_pos) { return; } - capture_ofs = 0; + input_ofs = 0; - if (AudioServer::get_singleton()->capture_start() == OK) { + if (AudioDriver::get_singleton()->capture_start() == OK) { active = true; _begin_resample(); } @@ -206,7 +206,7 @@ void AudioStreamPlaybackMicrophone::start(float p_from_pos) { void AudioStreamPlaybackMicrophone::stop() { if (active) { - AudioServer::get_singleton()->capture_stop(); + AudioDriver::get_singleton()->capture_stop(); active = false; } } diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h index 58775c3d94..6d62eabec1 100644 --- a/servers/audio/audio_stream.h +++ b/servers/audio/audio_stream.h @@ -123,7 +123,7 @@ class AudioStreamPlaybackMicrophone : public AudioStreamPlaybackResampled { friend class AudioStreamMicrophone; bool active; - unsigned int capture_ofs; + unsigned int input_ofs; Ref<AudioStreamMicrophone> microphone; diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index ccb406bf9a..6ce07fb7b8 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -85,26 +85,26 @@ double AudioDriver::get_time_to_next_mix() const { return mix_buffer - total; } -void AudioDriver::capture_buffer_init(int driver_buffer_frames) { +void AudioDriver::input_buffer_init(int driver_buffer_frames) { - const int capture_buffer_channels = 2; - capture_buffer.resize(driver_buffer_frames * capture_buffer_channels * 4); - capture_position = 0; - capture_size = 0; + const int input_buffer_channels = 2; + input_buffer.resize(driver_buffer_frames * input_buffer_channels * 4); + input_position = 0; + input_size = 0; } -void AudioDriver::capture_buffer_write(int32_t sample) { +void AudioDriver::input_buffer_write(int32_t sample) { - if ((int)capture_position < capture_buffer.size()) { - capture_buffer.write()[capture_position++] = sample; - if ((int)capture_position >= capture_buffer.size()) { - capture_position = 0; + if ((int)input_position < input_buffer.size()) { + input_buffer.write[input_position++] = sample; + if ((int)input_position >= input_buffer.size()) { + input_position = 0; } - if ((int)capture_size < capture_buffer.size()) { - capture_size++; + if ((int)input_size < input_buffer.size()) { + input_size++; } } else { - WARN_PRINTS("capture_buffer_write: Invalid capture_position=" + itos(capture_position) + " capture_buffer.size()=" + itos(capture_buffer.size())); + WARN_PRINTS("input_buffer_write: Invalid input_position=" + itos(input_position) + " input_buffer.size()=" + itos(input_buffer.size())); } } @@ -154,8 +154,8 @@ AudioDriver::AudioDriver() { _last_mix_time = 0; _last_mix_frames = 0; - capture_position = 0; - capture_size = 0; + input_position = 0; + input_size = 0; #ifdef DEBUG_ENABLED prof_time = 0; @@ -338,8 +338,6 @@ void AudioServer::_mix_step() { E->get().callback(E->get().userdata); } - emit_signal("audio_mix_callback"); - for (int i = buses.size() - 1; i >= 0; i--) { //go bus by bus Bus *bus = buses[i]; @@ -1059,8 +1057,6 @@ void AudioServer::update() { E->get().callback(E->get().userdata); } - - emit_signal("audio_update_callback"); } void AudioServer::load_default_bus_layout() { @@ -1079,7 +1075,6 @@ void AudioServer::finish() { for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) { AudioDriverManager::get_driver(i)->finish(); - AudioDriverManager::get_driver(i)->clear_capture_buffer(); } for (int i = 0; i < buses.size(); i++) { @@ -1307,14 +1302,6 @@ void AudioServer::set_device(String device) { AudioDriver::get_singleton()->set_device(device); } -Error AudioServer::capture_start() { - return AudioDriver::get_singleton()->capture_start(); -} - -Error AudioServer::capture_stop() { - return AudioDriver::get_singleton()->capture_stop(); -} - Array AudioServer::capture_get_device_list() { return AudioDriver::get_singleton()->capture_get_device_list(); @@ -1330,18 +1317,6 @@ void AudioServer::capture_set_device(const String &p_name) { AudioDriver::get_singleton()->capture_set_device(p_name); } -PoolVector<int32_t> AudioServer::get_capture_buffer() { - return AudioDriver::get_singleton()->get_capture_buffer(); -} - -unsigned int AudioServer::get_capture_position() { - return AudioDriver::get_singleton()->get_capture_position(); -} - -unsigned int AudioServer::get_capture_size() { - return AudioDriver::get_singleton()->get_capture_size(); -} - void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_bus_count", "amount"), &AudioServer::set_bus_count); @@ -1402,28 +1377,18 @@ void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_time_since_last_mix"), &AudioServer::get_time_since_last_mix); ClassDB::bind_method(D_METHOD("get_output_latency"), &AudioServer::get_output_latency); - ClassDB::bind_method(D_METHOD("capture_start"), &AudioServer::capture_start); - ClassDB::bind_method(D_METHOD("capture_stop"), &AudioServer::capture_stop); - ClassDB::bind_method(D_METHOD("capture_get_device_list"), &AudioServer::capture_get_device_list); ClassDB::bind_method(D_METHOD("capture_get_device"), &AudioServer::capture_get_device); ClassDB::bind_method(D_METHOD("capture_set_device", "name"), &AudioServer::capture_set_device); - ClassDB::bind_method(D_METHOD("get_capture_buffer"), &AudioServer::get_capture_buffer); - ClassDB::bind_method(D_METHOD("get_capture_position"), &AudioServer::get_capture_position); - ClassDB::bind_method(D_METHOD("get_capture_size"), &AudioServer::get_capture_size); - ClassDB::bind_method(D_METHOD("set_bus_layout", "bus_layout"), &AudioServer::set_bus_layout); ClassDB::bind_method(D_METHOD("generate_bus_layout"), &AudioServer::generate_bus_layout); ADD_PROPERTY(PropertyInfo(Variant::INT, "bus_count"), "set_bus_count", "get_bus_count"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "device"), "set_device", "get_device"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "capture_device"), "capture_set_device", "capture_get_device"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale"); ADD_SIGNAL(MethodInfo("bus_layout_changed")); - ADD_SIGNAL(MethodInfo("audio_mix_callback")); - ADD_SIGNAL(MethodInfo("audio_update_callback")); BIND_ENUM_CONSTANT(SPEAKER_MODE_STEREO); BIND_ENUM_CONSTANT(SPEAKER_SURROUND_31); diff --git a/servers/audio_server.h b/servers/audio_server.h index 8037c7feed..815200c811 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -53,14 +53,14 @@ class AudioDriver { #endif protected: - PoolVector<int32_t> capture_buffer; - unsigned int capture_position; - unsigned int capture_size; + Vector<int32_t> input_buffer; + unsigned int input_position; + unsigned int input_size; void audio_server_process(int p_frames, int32_t *p_buffer, bool p_update_mix_time = true); void update_mix_time(int p_frames); - void capture_buffer_init(int driver_buffer_frames); - void capture_buffer_write(int32_t sample); + void input_buffer_init(int driver_buffer_frames); + void input_buffer_write(int32_t sample); #ifdef DEBUG_ENABLED _FORCE_INLINE_ void start_counting_ticks() { prof_ticks = OS::get_singleton()->get_ticks_usec(); } @@ -111,11 +111,9 @@ public: SpeakerMode get_speaker_mode_by_total_channels(int p_channels) const; int get_total_channels_by_speaker_mode(SpeakerMode) const; - PoolVector<int32_t> get_capture_buffer() { return capture_buffer; } - unsigned int get_capture_position() { return capture_position; } - unsigned int get_capture_size() { return capture_size; } - - void clear_capture_buffer() { capture_buffer.resize(0); } + Vector<int32_t> get_input_buffer() { return input_buffer; } + unsigned int get_input_position() { return input_position; } + unsigned int get_input_size() { return input_size; } #ifdef DEBUG_ENABLED uint64_t get_profiling_time() const { return prof_time; } @@ -249,18 +247,6 @@ private: void _mix_step(); -#if 0 - struct AudioInBlock { - - Ref<AudioStreamSample> audio_stream; - int current_position; - bool loops; - }; - - Map<StringName, AudioInBlock *> audio_in_block_map; - Vector<AudioInBlock *> audio_in_blocks; -#endif - struct CallbackItem { AudioCallback callback; @@ -386,17 +372,10 @@ public: String get_device(); void set_device(String device); - Error capture_start(); - Error capture_stop(); - Array capture_get_device_list(); String capture_get_device(); void capture_set_device(const String &p_name); - PoolVector<int32_t> get_capture_buffer(); - unsigned int get_capture_position(); - unsigned int get_capture_size(); - AudioServer(); virtual ~AudioServer(); }; diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 3e0a28ac1d..121519be0f 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -856,6 +856,7 @@ void ShaderLanguage::clear() { completion_type = COMPLETION_NONE; completion_block = NULL; completion_function = StringName(); + completion_class = SubClassTag::TAG_GLOBAL; error_line = 0; tk_line = 1; diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 1a1e86833e..9afcfc4648 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -531,11 +531,10 @@ public: BIND2(scenario_set_fallback_environment, RID, RID) /* INSTANCING API */ - // from can be mesh, light, area and portal so far. BIND0R(RID, instance_create) - BIND2(instance_set_base, RID, RID) // from can be mesh, light, poly, area and portal so far. - BIND2(instance_set_scenario, RID, RID) // from can be mesh, light, poly, area and portal so far. + BIND2(instance_set_base, RID, RID) + BIND2(instance_set_scenario, RID, RID) BIND2(instance_set_layer_mask, RID, uint32_t) BIND2(instance_set_transform, RID, const Transform &) BIND2(instance_attach_object_instance_id, RID, ObjectID) diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index bf9db616e4..409a814b3b 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -29,10 +29,13 @@ /*************************************************************************/ #include "visual_server_scene.h" + #include "core/os/os.h" #include "visual_server_globals.h" #include "visual_server_raster.h" + #include <new> + /* CAMERA API */ RID VisualServerScene::camera_create() { @@ -314,7 +317,6 @@ void VisualServerScene::_instance_queue_update(Instance *p_instance, bool p_upda _instance_update_list.add(&p_instance->update_item); } -// from can be mesh, light, area and portal so far. RID VisualServerScene::instance_create() { Instance *instance = memnew(Instance); diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index ad74250fe4..a174d9e616 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -55,22 +55,6 @@ public: static VisualServerScene *singleton; -// FIXME: Kept as reference for future implementation -#if 0 - struct Portal { - - bool enabled; - float disable_distance; - Color disable_color; - float connect_range; - Vector<Point2> shape; - Rect2 bounds; - - - Portal() { enabled=true; disable_distance=50; disable_color=Color(); connect_range=0.8; } - }; -#endif - /* CAMERA API */ struct Camera : public RID_Data { @@ -450,11 +434,10 @@ public: RID_Owner<Instance> instance_owner; - // from can be mesh, light, area and portal so far. - virtual RID instance_create(); // from can be mesh, light, poly, area and portal so far. + virtual RID instance_create(); - virtual void instance_set_base(RID p_instance, RID p_base); // from can be mesh, light, poly, area and portal so far. - virtual void instance_set_scenario(RID p_instance, RID p_scenario); // from can be mesh, light, poly, area and portal so far. + virtual void instance_set_base(RID p_instance, RID p_base); + virtual void instance_set_scenario(RID p_instance, RID p_scenario); virtual void instance_set_layer_mask(RID p_instance, uint32_t p_mask); virtual void instance_set_transform(RID p_instance, const Transform &p_transform); virtual void instance_attach_object_instance_id(RID p_instance, ObjectID p_id); diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index b8f433d006..b1bbed24fd 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -453,11 +453,10 @@ public: FUNC2(scenario_set_fallback_environment, RID, RID) /* INSTANCING API */ - // from can be mesh, light, area and portal so far. FUNCRID(instance) - FUNC2(instance_set_base, RID, RID) // from can be mesh, light, poly, area and portal so far. - FUNC2(instance_set_scenario, RID, RID) // from can be mesh, light, poly, area and portal so far. + FUNC2(instance_set_base, RID, RID) + FUNC2(instance_set_scenario, RID, RID) FUNC2(instance_set_layer_mask, RID, uint32_t) FUNC2(instance_set_transform, RID, const Transform &) FUNC2(instance_attach_object_instance_id, RID, ObjectID) diff --git a/servers/visual_server.h b/servers/visual_server.h index 6f0659357c..e7662695a6 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -813,11 +813,10 @@ public: virtual RID instance_create2(RID p_base, RID p_scenario); - //virtual RID instance_create(RID p_base,RID p_scenario)=0; // from can be mesh, light, area and portal so far. - virtual RID instance_create() = 0; // from can be mesh, light, poly, area and portal so far. + virtual RID instance_create() = 0; - virtual void instance_set_base(RID p_instance, RID p_base) = 0; // from can be mesh, light, poly, area and portal so far. - virtual void instance_set_scenario(RID p_instance, RID p_scenario) = 0; // from can be mesh, light, poly, area and portal so far. + virtual void instance_set_base(RID p_instance, RID p_base) = 0; + virtual void instance_set_scenario(RID p_instance, RID p_scenario) = 0; virtual void instance_set_layer_mask(RID p_instance, uint32_t p_mask) = 0; virtual void instance_set_transform(RID p_instance, const Transform &p_transform) = 0; virtual void instance_attach_object_instance_id(RID p_instance, ObjectID p_id) = 0; |