Commit graph

3793 commits

Author SHA1 Message Date
Rémi Verschelde 91d6fa817e
Merge pull request #15967 from Gamblify/AudioRecordingModule
Audio Recording from godot
2018-07-26 15:37:19 +02:00
Ian 1bb13e95a8 context menu improvements 2018-07-26 08:58:35 -04:00
Gustav Lund adb43b6976 AudioStreamSample can now be saved to a WAV file
8 and 16 bit sample saving has been implemented.
2018-07-26 14:14:39 +02:00
Gustav Lund cd2070c684 Audio Recording module
Implements an Audio bus effect that outputs the audio from the bus into a wav file

Now channels audio recording into an AudioStreamSample instead of saving to wav
2018-07-26 14:14:29 +02:00
Rémi Verschelde 391e46830f doc: Sync classref with current source
Fix various missing arguments in bindings.
2018-07-26 11:56:21 +02:00
Rémi Verschelde 5c8919aac6
Merge pull request #18955 from tagcup/fix_set_scale
Removed incorrect Basis::set_scale().
2018-07-26 10:37:03 +02:00
Rémi Verschelde 39168f125e
Merge pull request #19464 from bojidar-bg/19448-fix-subproperty-handling
Fix bug in animationplayer editor not using subproperties properly
2018-07-26 10:31:05 +02:00
JFonS 0052ee70d2 Added keep scale flag to billboard materials 2018-07-26 09:34:12 +02:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Max Hilbrunner 46985ae075
Merge pull request #20440 from Chaosus/fixtexturecrash
Fix game crash when you pass invalid or null parameter to ImageTexture.set_data
2018-07-25 12:00:49 +02:00
Chaosus bde962dbdd Fix crash when you pass invalid parameter to ImageTexture.set_data 2018-07-25 12:23:34 +03:00
Rémi Verschelde f778bd8e69
Merge pull request #20404 from TigerCaldwell/master
Ensured consistency between RigidBody, PhysicsDirectBodyState, PhysicsServers and their 2D counterparts
2018-07-25 08:25:34 +02:00
Rémi Verschelde f8e8ac2c66
Merge pull request #20133 from ibrahn/fix-tree-uninit-branch
fixed a branch on uninitialised data in gui/tree
2018-07-25 01:18:39 +02:00
Rémi Verschelde 3ecb25a283
Merge pull request #19726 from guilhermefelipecgs/feature_add_menu_hover
Opens the menu with the same parent on mouse focus
2018-07-25 01:05:37 +02:00
Guilherme Felipe d1f5deabd8 Opens the menu with the same parent on mouse focus 2018-07-24 19:59:40 -03:00
Juan Linietsky 2e67fc57e6
Merge pull request #18867 from fire/better_vx_us_rebase_02
Improve VisualScript UX
2018-07-24 18:02:10 -03:00
K. S. Ernest (iFire) Lee 85670726fd Improve VisualScript UX
* Prototype faster function call ux.
* Work on general search ux.
* Able to create nodes from search.
* Show class for variables but not methods.
* Get actions search working.
* Descriptions now show for both methods and properties.
* Enable zooming on mouse wheel up and down.
* Make the drag trigger on right mouse button.
* Search now shows for action visual script nodes.
* Able to search visual node names.
* Search works better.
* Change zooming scale to hide artifacts better.
* Remove zoom changes
* Select from base should check properties too like the other functions.
* Seq_connect flag is needed to set sequence lines correctly.
* Remove comment
* Code cleanup with function names and arguments.
* Use brief description for search descriptions.
* Clean and fix bug with input nodes connecting with sequence lines.
* Add a warning and fix some edge conditions with sequence into data lines and vice versa.
* Don't search functions when pulling from a sequence node.
* Don't show actions when pulling from a data line.
* Set set and get properties.
* Convert visual script operators to the correct type
* Create a function preset finds only functions.
* Singletons can now find functions.
* Add shift-a for generic search.
* Add brief descriptions for Visual Script nodes.
* Search boxes can now filter names.
* Add bigger hit zones to node connect.
* For the drop zones, make all the rect2 areas the same size.
* Function names in visual script node should be lower case so that search works better.
* Use the convention of capitalize() for set, set, visual script nodes and methods.
* Make search more general. Ignore "_" and make case-insensitive. Also made the search window smaller and remove extra info from search
* Make type_cast use the connecting node's type and remove use of found variable.
* Fix case where you call an instance's call function where it becomes an invalid call.
* Make get_visual_node_names use a set of filters, move action creations and fix bug with sequence node connections.
* Make the window bigger.
* Make connect_data and connect_seq more robust.
* Add icons to search items.
* Add vs constructors in shift-a menu.
* Operators, builtins and constructors show type name. Fix several problems with port connections.
* In shift-a mode search everything.
* Code cleanup
* Work on autocompleting the type.
  * Use type guess in action creation.
  * Check if type hint string exists in object variables when generating the visual script search.
  * Add the hint to SceneTree.
  * Add original type detection.
  * Make type casting great again. This puts the type casted base type as the data output type string hint.
  * Pass the type in a VisualScriptFunctionCall too.
  * Set the base type correctly in VisualScriptFunctionGet and VisualScriptFunctionSet using hint string.
  * Make sure the instance is passed in VisualScriptPropertySet.
  * Restore search on the node's type.
* Remove dependencies from graph_edit.
* Remove dependencies from property_selector and name the class visual_script_property_selector.
* Extract hot zones into a function.
* Move hot_zones constants into default theme.
* Bigger capture zones.
* Clean messy port_grab_distance variables.
* Remove RMB functionality.
* Remove memory leak on showing visual script descriptions.
* Read the port_grab_distance constants on enter tree and theme changed.
2018-07-24 13:59:28 -07:00
Rémi Verschelde 62f2a8aadb
Merge pull request #20252 from RandomShaper/fix-canvas-search
Fix CanvasItem's search for a CanvasLayer
2018-07-24 22:45:24 +02:00
Rémi Verschelde fda6b78bae
Merge pull request #18806 from Calinou/bilinear-textureprogress
Add support for bilinear bars in TextureProgress
2018-07-24 22:31:24 +02:00
Max Hilbrunner b92c432313
Merge pull request #19225 from Paulb23/open_all_files_in_script_editor
Open all files in script editor
2018-07-24 21:52:11 +02:00
Rémi Verschelde 15c6adcd5b
Merge pull request #19781 from razcore-art/fix-tween
Fix and make Tween node less confusing
2018-07-24 21:24:38 +02:00
Tiger Caldwell 40c7716586 Modified RigidBody, PhysicsDirectBodyState, PhysicsServer, and their respective 2D counterparts to be more consistent and to include more useful methods.
RigidBody:
- Added add_central_force
- Added add_force
- Added add_torque
- Added apply_central_impulse

RigidBody2D:
- Added add_central_force
- Added add_torque
- Added apply_central_impulse
- Added apply_torque_impulse

PhysicsDirectBodyState:
- Added apply_central_impulse

Physics2DDirectBodyState:
- Added add_central_force
- Added add_force
- Added add_torque
- Added apply_central_impulse
- Added apply_impulse
- Added apply_torque_impulse

PhysicsServer:
- Added body_add_force
- Added body_add_torque
- Added body_add_central_force
- Added body_apply_central_impulse

Physics2DServer:
- Added body_add_torque
- Added body_add_central_force
- Added body_apply_central_impulse
- Added body_apply_torque_impulse

Also fixed some small bugs along the way
2018-07-24 05:00:56 -04:00
Rémi Verschelde bfe52fc30a
Merge pull request #20391 from YeldhamDev/expose_tileset_modulate
Expose 'modulate' set/get in TileSet resource
2018-07-24 09:59:23 +02:00
Wilson E. Alvarez a22e746bc3 Removed unnecessary assignments 2018-07-24 09:51:03 +02:00
Michael Alexsander Silva Dias dc0c75ce68 Expose 'modulate' set/get in TileSet resource 2018-07-23 18:35:52 -03:00
Juan Linietsky dc976cac57
Merge pull request #12678 from AndreaCatania/soft
Soft body
2018-07-23 16:04:32 -03:00
AndreaCatania 17ebbfb56d Implemented Soft body
- Soft Body Physics node
- Soft Body Rendering
- Soft body Editor
- Soft body importer
2018-07-23 20:50:23 +02:00
Juan Linietsky ec85fd554b Fix issues with CPUParticles and related conversion from Particles. Closes #20126 2018-07-23 12:28:50 -03:00
Juan Linietsky 1ad20dc2f1
Merge pull request #12403 from AndreaCatania/phymat
Physics material
2018-07-23 07:37:03 -03:00
Juan Linietsky 172f652dc0
Merge pull request #19888 from AndreaCatania/pry
Implemented proceses priority
2018-07-23 07:21:38 -03:00
Andrea Catania 51dfa10ac7 Implemented proceses priority 2018-07-23 12:19:38 +02:00
Pieter-Jan Briers b2c797c584 Defer TileMap::update_dirty_quadrants once again.
This fixes #20323.

#11077 is now technically re-broken,
but you can now call update_dirty_quadrants as workaround.
2018-07-22 15:26:14 +02:00
Paulb23 8ff747171f Allow opening and editing of any utf_8 file in script editor 2018-07-22 11:55:56 +01:00
Rémi Verschelde 92415365c8
Merge pull request #19264 from vnen/typed-gdscript-final
Typed GDScript
2018-07-21 23:13:51 +02:00
Juan Linietsky 2b9902db06 -Fix disable_3d flag
-Add extra flag optimize=[size,speed] to be able to prioritize size
2018-07-21 17:26:49 -03:00
George Marques 03746da73f
Add editor highlight for type-safe lines
The line number is hightlighted to indicate that the line contains only
type-safe code.
2018-07-20 21:55:18 -03:00
Juan Linietsky 336db8bcd1 -Fix tooltips in inspector, now they show as rich text. 2018-07-20 18:16:19 -03:00
Marcelo Fernandez 9b9949de39 Print an error when calling an invalid method on an Animation 2018-07-18 22:26:01 -03:00
Juan Linietsky 43dc050947 Several improvements to editor inspector usability and style 2018-07-18 19:37:41 -03:00
Pedro J. Estébanez 49d0af3c8e Fix CanvasItem search for a CanvasLayer
This fixes the situation where a `CanvasItem` descendant of a `Viewport` which in turn is a descendant of a `CanvasLayer` prefers the more outer `CanvasLayer` rather than the `Vierport`'s.

Because of that, `CanvasItem`s inside a `Viewport` inside a `CanvasLayer` were being rendered to the main `Viewport` instead of the render target of the innermost one.
2018-07-18 20:34:21 +02:00
Juan Linietsky d1550b4a9b Ability to disable scale in nodes, closes #19927 2018-07-18 13:48:09 -03:00
Rémi Verschelde 7c9f7452f4 Style: Format code with clang-format 6.0.1 2018-07-18 16:27:03 +02:00
Rémi Verschelde 13239cd4cc Export: Properly reload preset when opening dialog
Fixes #20119 where newly installed templates were not detected.

Also fix a bug with preset deletion where it would attempt to
edit an already removed preset. For this I made it so that
ItemList::deselect_all() also resets `current` to -1, as a manual
ItemList::deselect(idx) already does.
2018-07-18 13:49:34 +02:00
Rémi Verschelde bd9b8098fe
Merge pull request #20140 from EIREXE/ambient_light_disable_shader
Add disable ambient light flag to shaders and materials
2018-07-18 10:39:20 +02:00
Rémi Verschelde 5b7ebf4d04
Merge pull request #20232 from marcelofg55/fix_enums_vs
Fix some missing BIND_ENUM_CONSTANT for visual_shader_nodes.cpp
2018-07-18 09:01:03 +02:00
Marcelo Fernandez e4db15471b Fix some missing BIND_ENUM_CONSTANT for visual_shader_nodes.cpp 2018-07-17 18:31:22 -03:00
Alex Roman 2ce1118faa Add disable ambient light flag to shaders and materials 2018-07-17 21:30:43 +02:00
volzhs adb179154a Fix Label autowrap clips text 2018-07-18 02:19:05 +09:00
Max Hilbrunner 707175eda8
Merge pull request #19044 from Mintormo/make_header_fix
Added support of Python 3 in make_header.py
2018-07-17 15:12:49 +02:00
Max Hilbrunner b64bf118f1
Merge pull request #19087 from danvalho/master
SpriteFrames: expose method to get array containing animation names
2018-07-17 14:54:06 +02:00
Rémi Verschelde f71ffa9724
Merge pull request #20146 from dodgyville/bezier_fixes_19777
fix issue with bezier tracks using incorrect duration for interpolating values
2018-07-17 14:43:47 +02:00
Juan Linietsky 13a801430b Further fixes to KinematicBody2D API, support for sync motion in moving objects 2018-07-17 08:58:04 -03:00
Rémi Verschelde 95d99cb2ac
Merge pull request #20176 from Chaosus/vs_namefixes
Several name fixes for visual shaders
2018-07-17 13:54:22 +02:00
Max Hilbrunner adec9c3168
Merge pull request #20150 from ibrahn/fix-scrollbar-atlas
fix scrollbar icons with atlas texture.
2018-07-17 12:15:22 +02:00
Max Hilbrunner 1f1b45c7ec
Merge pull request #20191 from jvdnbus/line2d-stretch
Line2D texture stretch mode
2018-07-17 12:12:29 +02:00
Juan Linietsky e1f2feec2e Changes to how snap works (I think this makes more sense now) 2018-07-16 21:30:44 -03:00
Juan Linietsky 063a22851a -Added support for raycast in KinematicBody2D
-Added support for snapping in KinematicBody2D
2018-07-16 20:04:07 -03:00
Jorn Van denbussche d7aa3e33c8 Line2D texture stretch mode
Prototype for stretching the texture across the whole line.
Fixed end cap tile mode.
2018-07-16 23:16:58 +02:00
Juan Linietsky de910f8c26 Finally figured out how to implement AnimatedTexture properly. 2018-07-16 11:43:49 -03:00
Thomas Herzog 9eb082004d
Merge pull request #20034 from Faless/master_fixes
Fix server and GDNative in master branch
2018-07-16 15:50:30 +02:00
Jorn Van denbussche 28aa9a1d6d More accurate UV round begin cap 2018-07-16 14:30:30 +02:00
Chaosus 3af81427a1 Several name fixes for visual shader 2018-07-15 17:28:06 +03:00
Overblob e6ad5e23b4 * Small hex/float/integer parsing refactoring
* Potential bug fix on hex (cannot be used atm)
* Added optional typing for floats, eg:
"1f" -> "1.0"
"1.f" -> "1.0"
"1.99f" -> "1.99"
"1." -> "1.0"
2018-07-15 14:58:23 +02:00
Juan Linietsky f6ce73f724 Visual Shaders are back. 2018-07-14 18:16:18 -03:00
Ibrahn Sahir e51a94905d fix scrollbar icons with atlas texture.
Draw scrollbar icons through their textures, rather than calling
directly to the server. Allows atlas textures to manipulate the source
rect as required.
2018-07-14 14:02:08 +01:00
Luke Miller 7298a746ce fix issue with bezier tracks using incorrect duration for interpolating values 2018-07-14 11:48:40 +10:00
Ibrahn Sahir fb32adfcf8 fixed a branch on uninitialised data in gui/tree
I don't think it was really causing any harm, but this makes things a
little more explicit and helps clean up valgrind output.
2018-07-13 14:00:10 +01:00
Max Hilbrunner cc57b62ab3
Merge pull request #20068 from Xrayez/submenu-popup-delay
Add ability to set submenu's popup delay time on mouse hovering
2018-07-12 05:27:49 +02:00
Max Hilbrunner 118d4f3115
Merge pull request #19540 from muiroc/cylinder
Cylinder resource and collision shape (bullet only)
2018-07-12 05:09:37 +02:00
Marcelo Fernandez 0c78a58b64 Fix possible bug with AudioStreamPlayer2D audio position 2018-07-10 22:57:50 -03:00
Alexander Holland bf3c81f20b fix ColorPickerButton.get_popup() 2018-07-10 15:06:36 +02:00
Max Hilbrunner 41ff975b8c
Merge pull request #20014 from Chaosus/scrollable
Added scrollable property for sliders
2018-07-10 13:31:09 +02:00
Marcelo Fernandez 087329074d Improved stream paused fade code 2018-07-09 21:58:33 -03:00
Pedro J. Estébanez ec5c96dbe1 Fix camera offsets not applied always
Specifically, project/unproject methods weren't taking them into account. Frustum computation may be affected as well.

This commit considers them for the camera matrix at all times.
2018-07-09 21:07:15 +02:00
Andrii Doroshenko (Xrayez) e3b77b24ac Add ability to set submenu's popup delay time on mouse hovering
This allows to set delay time for the submenu to popup. Setting
this value low can increase responsiveness. If the popup menu is added
as a child of another (acting as a submenu), it will inherit the delay
time of the parent menu item.
2018-07-09 18:37:41 +03:00
Fabio Alessandrelli d4465fce43 Fix some enum export in new Animation editor. 2018-07-08 10:24:21 +02:00
Juan Linietsky ea47359408 Add option to convert Particles to CPUParticles 2018-07-07 09:04:22 -03:00
Chaosus dbd5afc498 Added scrollable property to Sliders 2018-07-07 13:48:34 +03:00
Juan Linietsky 7dcaabaf19 Support for CPU based particles, which aids compatibility with OpenGL ES 2.0 2018-07-06 20:21:42 -03:00
Max Hilbrunner 9f82368d40
Merge pull request #19475 from YeldhamDev/animplayer_cosmetic
Minor changes to the AnimationPlayer editor
2018-07-05 04:25:04 +02:00
Max Hilbrunner c488a74e0c
Merge pull request #19498 from guilhermefelipecgs/fix_regression
Fix "find and replace" initializing with wrong size
2018-07-05 04:23:18 +02:00
Max Hilbrunner ed61bdd2ae
Merge pull request #19646 from chanon/fix-audiostream-cant-set-null-stream
Fix can't set AudioStreamPlayer stream to null
2018-07-05 04:16:47 +02:00
Max Hilbrunner 16f1a77319
Merge pull request #19735 from Paulb23/text_offset_issue_15688
Fixed text drawing too high in TextEdit, issue 15688
2018-07-05 04:04:39 +02:00
Max Hilbrunner 43748f67be
Merge pull request #19351 from guilhermefelipecgs/fix_reversed_text
Fixes to the new inspector
2018-07-05 03:50:31 +02:00
Max Hilbrunner e3c8ac43c6
Merge pull request #19187 from Zirak/editor-autocomplete-quote
Editor autocomplete won't insert unnecessary quotes
2018-07-05 02:33:33 +02:00
Max Hilbrunner edc63a2f60
Merge pull request #18028 from gabrii/18026
Fix #18026. Expose TextEdit::set_draw_breakpoint_gutter.
2018-07-05 02:30:18 +02:00
Guilherme Felipe 709948aa5a Fixes to the new inspector
- Fix inspector dock not updating tree for main resource;
- Fixes the inspector input text reverted during typing;
- Add method bind for "refresh" used by MultiNodeEdit;
2018-07-04 20:08:45 -03:00
Max Hilbrunner a8a318161b
Merge pull request #19015 from toger5/fixed_scrolling_with_trackpad_in_new_inspector
fixed scrolling in new ispector when using trackpad pan gesture
2018-07-05 00:22:06 +02:00
Max Hilbrunner 9986b64b76
Merge pull request #19960 from groud/fix_control_size
Fixes control nodes size not updated when outside the tree
2018-07-04 23:32:29 +02:00
Max Hilbrunner 293a96c22d
Merge pull request #19947 from GagaPete/html5-http-fix
Fix CORS problems due to added headers on JS target
2018-07-04 22:37:47 +02:00
groud 560deda207 Fixes control nodes size not updated when outside the tree 2018-07-04 15:14:42 +02:00
Rémi Verschelde 3724f1562b
Merge pull request #19782 from Calinou/fix-control-pixel-snap-rounding
Fix control pixel snap rounding using floor() instead of round()
2018-07-04 15:11:08 +02:00
Rémi Verschelde 92bfde531c
Merge pull request #19786 from JFonS/correct_normal_scaling
Add render mode to ensure correct normals when using non-uniform scaling
2018-07-04 15:09:59 +02:00
GagaPete 8a4dccc4ce Fix CORS problems due to added headers on JS target
Before this change, missing User-Agent and Accept headers were automatically
added on all platforms. Setting the User-Agent header forces the browser to
do a CORS preflight (see 1) which fails if the HTTP endpoint is not
configured appropriate. It's not neccesary to set either header as the
browser sets them and so this commit disables that functionality on the JS
target.

1: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests
2018-07-04 01:56:44 +02:00
Juan Linietsky 085483e885 -Fix fullscreen on Windows with a HiDPI monitor but a non-HiDPI project
-Replaced some viewport size calls to screen size, since viewport size should be deprecated at this point..
2018-07-03 18:53:27 -03:00
Max Hilbrunner 465edbd2bc
Merge pull request #19853 from khairul169/duplicate_bug
Fix duplicate method on instanced node generates duplicated children.
2018-07-03 18:48:45 +02:00
Max Hilbrunner 2017119a3d
Merge pull request #19919 from marcelofg55/notif_crash
Add a new notification to detect crashes on native scripts
2018-07-03 18:42:49 +02:00
Max Hilbrunner fbff1804d2
Merge pull request #17438 from Deluvi/get-word-pos-quote-fix
get_word_at_pos considers simple and double quotes
2018-07-03 18:28:47 +02:00
Max Hilbrunner b21c1f64cd
Merge pull request #18634 from groud/fix_control_child_of_node2d
Fixes the bad calculation of margin & anchors when child of Node2D
2018-07-03 18:06:15 +02:00
Max Hilbrunner 6d0ade54c0
Merge pull request #19205 from marcelofg55/audio_stream_pause
Pause AudioStreamPlayer when SceneTree pauses
2018-07-03 17:23:53 +02:00