Commit graph

33228 commits

Author SHA1 Message Date
Rémi Verschelde
4a0dbf9acf
Merge pull request #45931 from nekomatata/cylinder-contact-points-fix
Revised cylinder contact point generation in Godot Physics
2021-02-12 23:05:17 +01:00
kobewi
36494e8526 Duplicate resources pasted to other scenes 2021-02-12 22:38:38 +01:00
PouleyKetchoupp
121030940c Fix TextEdit autoscroll with wrapped lines
Index to find the last line wrap index was off by one, which prevented the first wrapped line to trigger autoscroll.
2021-02-12 13:44:46 -07:00
Angad Kambli
892060fa47 fix minor issue in smooth step function's documentation 2021-02-13 02:12:58 +05:30
PouleyKetchoupp
100fc26f39 TextEdit respects content margin from StyleBox
Now TextEdit adjusts x & y offset according to the corresponding
StyleBox when in normal or read-only mode.

In order to handle bottom content margin, wrapped lines that are entirely outside the stylebox content area are not drawn.
2021-02-12 13:22:06 -07:00
Andrii Doroshenko (Xrayez)
1cd7a16c10 Fix sprite editor conversion tools to handle compressed textures 2021-02-12 21:42:07 +02:00
PouleyKetchoupp
6d0898bf4c Revised cylinder contact point generation
Cylinder contact points generation is adjusted to make it more stable
when standing on triangle meshes.

Point-Circle:
Switched to simpler plane projection as it's done for Point-Face contact
points. It solves some cases where discrepancies between the two points
caused the cylinder to jump.

Edge-Circle:
Same as before, the case for edge has just been moved from Face-Circle
to a specific method.

Face-Circle:
The previous method was clipping edges against the circle, and then
tried to add contact points when there wasn't enough support and failed
in some cases.
Now using a different algorithm which adds proper contact points around
the circle more consistently.
First, by clipping edges against circle segments using Face-Face
algorithm.
Second, by clipping edges against the circle plane.
2021-02-12 12:25:58 -07:00
Rémi Verschelde
45c6d3c576
Merge pull request #45923 from reduz/fix-lineedit-minimum-width
Fix LineEdit minimum width
2021-02-12 17:18:50 +01:00
reduz
28537d8c84 Fix LineEdit minimum width
-Changed theme setting name to make more sense of what it does
-Reduced amount of minimum characters, so minimum size is smaller.
2021-02-12 17:04:38 +01:00
Hugo Locurcio
d97d65b184
Increase the page size for array/dictionary editors to 20
With smaller arrays/dictionaries, this makes it possible to view all of
an array/dictionary's items on a single page.

Larger values could be used, but make switching between node selections
quite slow, especially on low-end CPUs. They could also be problematic
with complex resource inspectors for arrays/dictionaries that contain
Resources.

This closes https://github.com/godotengine/godot-proposals/issues/2058.
2021-02-12 17:03:00 +01:00
reduz
5ae9051771 Add ability to change Icon Saturation
-Allows for more theme freedom
-Allows for entirely B&W themes.
2021-02-12 12:16:37 -03:00
Rémi Verschelde
5e528f3550
Merge pull request #45922 from bruvzg/space_width
Use get_char_size(' ') to calculate space width.
2021-02-12 14:31:58 +01:00
bruvzg
6c9e608a34
Use get_char_size(' ') to calculate space width. 2021-02-12 15:06:50 +02:00
Rémi Verschelde
bc55238408
Merge pull request #45907 from reduz/improved-inspector-subresources
Improved Inspector Sub-Resource Editing
2021-02-12 13:47:54 +01:00
reduz
b9b68b755c Improved Inspector Sub-Resource Editing
-Better margins
-Colors to delimit subresources better.
2021-02-12 09:31:47 -03:00
Rémi Verschelde
d3867b2dab
Merge pull request #45785 from Calinou/project-manager-add-loading-text
Display loading text while the project manager is loading
2021-02-12 13:01:17 +01:00
Rémi Verschelde
dbddf52c12
Merge pull request #45920 from Faless/js/4.x_dpi
[HTML5] Detect screen scale and DPI.
2021-02-12 12:53:14 +01:00
Fabio Alessandrelli
6cff589b5b [HTML5] Detect screen scale and DPI.
`OS.get_screen_scale` will now return the `window.devicePixelRatio`
value, `OS.get_screen_dpi` uses CSS media queries to find approximate
DPI value for the current display.
`OS.get_screen_size` also return the actual screen size (not the CSS
pixel size).
2021-02-12 12:01:44 +01:00
Rémi Verschelde
4912258839
Merge pull request #45903 from reduz/improve-resoucre-load-cache
Improve resource load cache
2021-02-12 11:58:19 +01:00
Rémi Verschelde
44e291a250
Merge pull request #45909 from ShatReal/master
Fixed typo in PackedScene documentation
2021-02-12 11:11:23 +01:00
Rémi Verschelde
e9a25b8552
Merge pull request #45859 from Kayomn/master
Accomodate blend shape ranges of -1 to +1 for Vulkan
2021-02-12 09:26:14 +01:00
Ansraer
466cf0b466 Adjust auto scale on high res displays 2021-02-12 01:12:25 +01:00
Emily
7368bc534a fixed typo in packedscene 2021-02-11 13:22:44 -08:00
reduz
f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
hoontee
fbb1ef759c Implement CollisionPolygon3D margin 2021-02-11 11:58:37 -06:00
Rémi Verschelde
e5bb89cdd5
Merge pull request #45901 from akien-mga/scons-fix-custom_modules-is_engine
SCons: Fix Godot detection in custom modules logic
2021-02-11 18:13:23 +01:00
Rémi Verschelde
75910d1e9b
SCons: Fix Godot detection in custom modules logic
`exec()` was not a good idea as it assumes a certain type of `version.py` file
similar to Godot's own file, which is not always a reliable assumption (see
https://github.com/godotengine/godot/pull/43057#issuecomment-777632900).

Also restores Python 2 support for the 3.2 branch.
2021-02-11 17:54:41 +01:00
Rémi Verschelde
68624f32b0
Merge pull request #44698 from Chaosus/shader_varying_fragment_to_light
Allow to pass varying from fragment to light shader function
2021-02-11 15:28:14 +01:00
Rémi Verschelde
5f05e5d904
Merge pull request #45882 from HenryWConklin/broken-gdnative-test
Fix broken gdnative variant test
2021-02-11 15:27:36 +01:00
Henry Conklin
6575e4c1ba Fix broken gdnative variant test 2021-02-11 07:14:28 -06:00
Yuri Roubinsky
dd0874e717 Allow passing varying from fragment to light shader function 2021-02-11 15:59:21 +03:00
Rémi Verschelde
b9863e157e
Merge pull request #45891 from Faless/js/4.x_editor_focus
[HTML5] Editor: ensure canvas focus when switching tabs.
2021-02-11 13:16:40 +01:00
Rémi Verschelde
b8fab45ddb
Merge pull request #45835 from sps1112/add-test-variant
Add Unit Tests for Variant Class
2021-02-11 13:15:49 +01:00
Rémi Verschelde
604188c411
Merge pull request #45870 from gongpha/graphedit-connection-update
Update GraphEdit when GraphNode's slot is updated
2021-02-11 13:11:50 +01:00
Fabio Alessandrelli
b148ea2a64 [HTML5] Editor: ensure canvas focus when switching tabs. 2021-02-11 13:10:18 +01:00
sps1112
f71f8c8c0b Add Unit Tests for Variant Assignment 2021-02-11 17:27:24 +05:30
Rémi Verschelde
dca3ce441a
Merge pull request #45846 from rcorre/importplugin_doc
Improve EditorImportPlugin docs.
2021-02-11 12:24:48 +01:00
MarvinFF
4c528e76e7 Fix Node::rpc_config return error
Fix StringName type checks in other `_rpc*_bind` methods.
2021-02-11 11:52:52 +01:00
Ryan Roden-Corrent
9676650f2f Clarify EditorImportPlugin.get_visible_name.
According to the docs at
https://docs.godotengine.org/en/stable/tutorials/plugins/editor/import_plugins.html#the-editorimportplugin-class

> The get_visible_name() method is responsible for returning the name of
> the type it imports and it will be shown to the user in the Import dock.
> You should choose this name as a continuation to "Import as", e.g.
> "Import as Silly Material"

I've verified Godot's behavior reflects this, so the code examples
should reflect this.

Also document propagating save error in EditorImportPlugin.

It seems that the suggested code ignores any error from
`ResourceSaver.save`, but I think we should return it.
2021-02-11 11:13:17 +01:00
Rémi Verschelde
94cba993bf
Merge pull request #45847 from vnen/gdnative-bindings
Improve GDNative API and JSON generation further
2021-02-11 11:11:29 +01:00
Rémi Verschelde
ab4c3ddf32
Merge pull request #45888 from Faless/js/4.x_xhr_fix
[HTML5] Fix HTTPClient request_raw.
2021-02-11 11:08:08 +01:00
Rémi Verschelde
b3c7e38f4d
Merge pull request #45885 from Faless/js/4.x_editor_clean_fix
[HTML5] Fix web editor "clear persistent data".
2021-02-11 10:54:03 +01:00
Rémi Verschelde
5d5ed27173
Merge pull request #45883 from Faless/js/4.x_more_handlers
[HTML5] Handle contextmenu, webglcontextlost internally.
2021-02-11 10:53:22 +01:00
Fabio Alessandrelli
75c4e2c5fa [HTML5] Fix HTTPClient request_raw.
Now send data according to the spec, properly handle null data.
Simplify JS code since we are at it.
2021-02-11 10:03:36 +01:00
Fabio Alessandrelli
7866cd5881 [HTML5] Fix web editor "clear persistent data".
Was broken after update to new persistent path "/home/web_user".
2021-02-11 08:25:19 +01:00
Fabio Alessandrelli
3366122e1a [HTML5] Handle contextmenu, webglcontextlost internally.
This way they are automatically cleaned up when the engine exits,
landing a hand to browsers garbage collectors.
2021-02-11 07:56:10 +01:00
Fabio Alessandrelli
e9e2dedb76 Sync and cleanup Rasterizer Dummy.
Code diverged too much, removing disabled code too as it's unlikely it
can be reused now.
2021-02-11 07:55:57 +01:00
Juan Linietsky
ad293a82f1
Merge pull request #45879 from reduz/remove-change-notify
Removed _change_notify(property)
2021-02-10 20:06:14 -03:00
reduz
1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Rémi Verschelde
e8f73124a7
Merge pull request #45845 from qarmin/cppcheck_scene_2
Initialize class variables with default values in scene/ [2/2]
2021-02-10 20:06:12 +01:00