Commit graph

805 commits

Author SHA1 Message Date
Pedro J. Estébanez 4839e5f6d9 Take CanvasLayer transform into account for 2D physics
Fixes #18073.
2018-08-21 20:10:15 +02:00
Rémi Verschelde 968886768b Lift 1440 limit in rotation_degrees hint range
Fixes #15947.
2018-08-16 14:36:38 +02:00
volzhs 4e9795aa99 Fix not to show configuration warning on every node has script 2018-08-15 21:35:06 +09:00
Juan Linietsky 4e55835e48
Merge pull request #18096 from aaronfranke/master
[Core] Split up math_2d.h
2018-08-14 18:58:32 -03:00
Juan Linietsky ef5095720b -Deprecate ImageTexture::load
-Add warning to Image::load when loading resources
-Add script binding for get_configuration_warning
2018-08-14 16:53:20 -03:00
Aaron Franke cf136a91d6 [Core] Completely kill math_2d.h, change includes 2018-08-11 03:08:34 -05:00
Andrea Catania c1860fe88b Fixed process priority 2018-08-04 14:51:44 +02:00
Juan Linietsky 15db793ef2 Ensure process notification is received only if really enabled, fixes #7894 2018-07-29 21:20:41 -03:00
Ibrahn Sahir 1626ae6421 fixed uninitialised variable that was causing menu crash. 2018-07-28 18:09:47 +01: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
Guilherme Felipe d1f5deabd8 Opens the menu with the same parent on mouse focus 2018-07-24 19:59:40 -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
Juan Linietsky 336db8bcd1 -Fix tooltips in inspector, now they show as rich text. 2018-07-20 18:16:19 -03:00
Rémi Verschelde 7c9f7452f4 Style: Format code with clang-format 6.0.1 2018-07-18 16:27:03 +02: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
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
Marcelo Fernandez deebeb2742 Add a new notification to detect crashes on native scripts 2018-07-02 16:18:58 -03:00
Juan Linietsky 2dc738ce27 -Fixes to how hashing happened, now StringName and NodePath use default hasher, this was leading to some severe slowdown in scenarios
-Fixes to some duplication scenarios for instanced scenes
2018-07-02 15:08:35 -03:00
khairul169 8e03715a5c Fix duplicate bug 2018-06-30 17:35:51 +07:00
Juan Linietsky eeab3502d5 Changes to how node paths are selected from property, allowing setting a hint. 2018-06-27 20:50:25 -03:00
Marcelo Fernandez 8c1c7ff131 Add missing NULL checks for add_child_below_node 2018-06-19 22:47:34 -03:00
Guilherme Felipe aa53c032ed Fix regression with cursor shape 2018-06-07 15:12:59 -03:00
Juan Linietsky b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00
Fabio Alessandrelli 348725dfe0 Add option to disable automatic multiplayer poll
Automatic poll from SceneTree is enabled by default.
This allows for polling (and thus RPCs/RSETs) manually in other loops
(e.g. physics, thread, specific step) and for proper mutex protecion
when accessing the multiplayer API from threads (e.g. for sending larger
files in chunks).
2018-06-03 18:58:04 +02:00
Fabio Alessandrelli 1400f6fdc4 Refactor RPCMode enum and checks 2018-05-29 20:26:41 +02:00
Max Hilbrunner 4c69a495c9
Revert "RPCMode refactor, more sync modes" 2018-05-29 11:47:52 +02:00
Fabio Alessandrelli 9de4ffde61 Refactor RPCMode enum and checks 2018-05-26 10:43:43 +02:00
Webster Sheets 1198662b2b Revert #14753, as it is buggy and no longer necessary. 2018-05-24 16:10:25 -04:00
toger5 0e015f6023 fixed scrolling in new ispector when using trackpad pan gesture 2018-05-18 18:47:39 +02:00
Rémi Verschelde 93c4274941
Merge pull request #18928 from BastiaanOlij/fix_viewport_flags
Store flags so it isn't lost when viewport isn't setup yet
2018-05-16 15:11:20 +02:00
Bastiaan Olij 0fc4f22522 Store flags so it isn't lost when viewport isn't setup yet 2018-05-16 22:19:45 +10:00
Juan Linietsky 005b69cf6e -New inspector.
-Changed UI resizing code, gained huge amount of speed.
-Reorganized timer sync to clean up behavior (sorry forgot commit this before)

-
2018-05-15 17:14:31 -03:00
Max Hilbrunner e744d12e56
Merge pull request #18709 from Faless/multiplayer_docs
Rename multiplayer_api to multiplayer, add docs
2018-05-09 01:41:01 +02:00
Juan Linietsky d5c3fc1522
Merge pull request #15119 from poke1024/visible-subwindows
More efficient subwindow handling
2018-05-08 09:49:34 -03:00
Juan Linietsky c54ac6a15d
Merge pull request #15074 from PJB3005/17-12-26-remove_gui_focus_on_visibility_loss
Hiding a Control now fires NOTIFICATION_FOCUS_EXIT.
2018-05-08 09:40:44 -03:00
Fabio Alessandrelli 234914c42c Rename multiplayer_api to just multiplayer.
Only the class name retain the MultiplayerAPI name
2018-05-08 10:51:04 +02:00
Geequlim 56c2463f8c Fix double free for drag preview control in viewport 2018-05-08 13:52:38 +08:00
Juan Linietsky 7b85c9d0ea
Merge pull request #17295 from eon-s/instance-placeholder
Make InstancePlaceholder more flexible by allowing to instance without removing it.
2018-05-07 20:23:34 -03:00
Juan Linietsky 7b065a59fa
Merge pull request #15911 from Zephilinox/ready_signal
Add ready signal to Node
2018-05-07 17:56:10 -03:00
Juan Linietsky 38aaf78325
Merge pull request #18524 from BastiaanOlij/keep_3d_linear
Added option to viewport to keep linear color
2018-05-07 09:24:39 -03:00
Max Hilbrunner e15305721d
Merge pull request #18454 from KidRigger/working_timer
Allows setting the Timer wait_time in start method.
2018-05-07 09:37:11 +02:00
Bastiaan Olij 6f7fefa489 Added option to viewport to keep linear color 2018-05-06 19:28:09 +10:00
Rémi Verschelde b774156729
Merge pull request #18514 from neikeq/api-hash-fixes
API hash fixes
2018-05-03 14:36:32 +02:00
Rémi Verschelde 741637b966
Merge pull request #18451 from volzhs/node-name
Check invalid node name
2018-05-02 22:21:31 +02:00
volzhs 6758b6c131 Check invalid node name 2018-05-03 00:00:06 +09:00
Pedro J. Estébanez de9d40a953 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.

** Summary of changes to settings: **

- `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse`
- New setting: `input/pointing_devices/emulate_mouse_from_touch`
2018-04-30 19:03:38 +02:00
Ignacio Etcheverry 7034d48032 Fix binding some core API methods only in tools builds 2018-04-29 19:49:26 +02:00
Anish f714637e58 Allows setting the Timer wait_time in start method.
Allows shortening the two line method of Timer.set_wait_time
followed by Timer.start set wait_time as a parameter to
Timer.start. Also modifies the class documentation.

Fixes: #18107
2018-04-27 01:17:20 +05:30
Guilherme Felipe 4f05190fb0 Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
2018-04-10 11:38:34 -03:00
Geoffrey 8362ce4769 Made print_tree_pretty() function which displays scene tree graphically 2018-04-09 15:01:37 +02:00
Juan Linietsky e9e5aa617e
Merge pull request #17227 from Faless/multiplayer_api
[RFC] MultiplayerAPI refactor
2018-04-08 11:04:16 -03:00
Juan Linietsky 4ee3f3251d
Merge pull request #17382 from bojidar-bg/13971-path-array-unsaved
Duplicate Arrays and Dictionaries when instancing scene in editor
2018-04-08 09:39:03 -03:00
Juan Linietsky 9e7cee2ceb Removed strange custom world2d in CanvasLayer, been there since always and not sure why.
Fixes #17524, fixes #17523.
2018-04-07 19:43:09 -03:00
Pedro J. Estébanez 259ed1d400 Improve popup menus usability
It seems that popups were intended to "grab" the mouse click that triggered them, but their intent was being lost. This commit does the necessary changes to let it happen and updates items that were trying to get advantage of it, because the semantics of `Control::grab_click_focus()` have changed a bit. Namely, it must be called **before** showing the modal.

This allows to popup a menu and activate an item in it in a single click-point-release cycle, instead of having to click once to open the menu and once more to pick an item.

This ability is extended even to context menus activated with the RMB (or any other mouse button, for that matter). The editor benefits from this in the context menu of the tree dock, which has been patched to opt-in for this feature.

This improves UX a bit by saving unnecessary clicks.

From now on, `PopupMenu` always grabs the click and also invalidates the first button release unless the mouse has moved (that's what `set_invalidate_click_until_motion()` was doing and now it's removed), so there is no longer the need of doing both things at every point a pop-up menu is shown.
2018-04-07 01:06:02 +02:00
Rémi Verschelde 01bb39ac3f
Merge pull request #17321 from LinkDoyle/issue_16350
Fix switching WindowDialog types leaves garbage buttons
2018-03-23 11:38:59 +01:00
Ruslan Mustakov 47747718d6 Fix oversampled font artifacts after resize
Font update after resize relies on the viewport size which was updated
after the font was already refreshed, which resulted in artifacts when
it was rendered into the actual/new viewport size.

Fixes #15173.
2018-03-19 20:44:26 +07:00
Fabio Alessandrelli c531262190
Merge pull request #16947 from Faless/ui_actions
GUI elements ui_action usage, improvements
2018-03-16 20:55:11 +01:00
Hein-Pieter van Braam 99f286e23f
Merge pull request #17264 from poke1024/fix-gesture-key-event-accepted
Fix gesture events being blocked
2018-03-15 23:13:04 +01:00
Bojidar Marinov 9f6c0c6eae
Duplicate Arrays and Dictionaries when instancing scene in editor
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate

Fixes #13971
2018-03-13 17:18:08 +02:00
Link 611c050469 Fix switching WindowDialog types leaves garbage buttons
We can distinguish between node-specific children and custom children by `child->is_owned_by_parent()`.

Fixes: #16350
2018-03-07 18:28:29 +08:00
eon-s 5e427190bc Added create_instance
Allows to create an instance from an `InstancePlaceholder` without removing the placeholder.

Deprecates `replace_by_instance`.
2018-03-05 22:57:17 -03:00
Bernhard Liebl 166c2bdea7 Fix gesture events being blocked 2018-03-04 22:19:10 +01:00
Fabio Alessandrelli 5081ced57f Use MultiplayerAPI class for high level networking
Remove networking related logic from Node and SceneTree.
SceneTree now simply relay all networking related stuff to
MultiplayerAPI for compatibility
2018-03-03 18:34:22 +01:00
Ranoller 979dccbd8d
FIX Windows enter/exit mouse notifications
Fix to this issue #17202
2018-03-03 03:42:38 +01:00
Rémi Verschelde ce7da2c7d6 Viewport: Fix missing tooltips w/ disabled physics object picking
Previously this option seemed to be the sole responsible for enabling
physics processing in Viewport, while several other features like
tooltips and debugging collision hints rely on it.

All this logic is moved to internal processing (it's incorrect to let
it be affected by users disabling physics/idle processing), and disabling
physics object picking no longer affects the internal physics processing.

Fixes #17001.
2018-03-01 16:01:10 +01:00
Hein-Pieter van Braam d702d7b335 Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
Rémi Verschelde 23ebae01dc Refactor version macros and fix related bugs
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were
several places hardcoding their own variant of the version string, potentially
with bugs (e.g. forgetting the patch number when defined).

The new logic defines:

- VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1)
- VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch',
  depending on whether the latter is defined (e.g. 3.1.4)
- VERSION_FULL_CONFIG, which contains the version status (e.g. stable)
  and the module-specific suffix (e.g. mono)
- VERSION_FULL_BUILD, same as above but with build/reference name
  (e.g. official, custom_build, mageia, etc.)
  Note: Slight change here, as the previous format had the build name
  *before* the module-specific suffix; now it's after
- VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed
  with "Godot v" for readability

Bugs fixed thanks to that:

- Export templates version matching now properly takes VERSION_PATCH
  into account by relying on VERSION_FULL_CONFIG.
- ClassDB hash no longer takes the build name into account, but limits
  itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant
  for the API hash).
- Docs XML no longer hardcode the VERSION_STATUS, this was annoying.
- Small cleanup in Windows .rc file thanks to new macros.
2018-02-23 20:15:29 +01:00
Fabio Alessandrelli 90b9449844 Properly set input as handled when closing modal 2018-02-23 13:01:28 +01:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Artem Varaksa d35e486228 Clean up some bad words from code comments 2018-02-17 16:00:39 +03:00
Zephilinox a826fb8d8b Add ready signal to Node
Closes #15889
2018-01-20 21:57:59 +00:00
Rémi Verschelde 598724c043 Remove obsolete Viewport _update_rect() code 2018-01-18 22:37:45 +01:00
Rémi Verschelde 9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Juan Linietsky a26e6c8215 Renamed tree_exited to tree_exiting. tree_exited is now used for actual out of tree notification.
Updated doc accordingly.
2018-01-12 08:29:24 -03:00
Bojidar Marinov 9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
AndreaCatania 5ac441131e Fixed crash on duplicate GIProbe baking 2018-01-11 19:50:33 +01:00
Poommetee Ketson 768fd83e61 Fix typo in new strings 2018-01-06 21:33:11 +07:00
Juan Linietsky 90d47ae23d Force button release when window focuses out, fixes #15318 and likely many other issues. 2018-01-05 15:40:08 -03:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde ffd6838704
Merge pull request #15192 from volzhs/expose-quit-on-go-back
Bind SceneTree::set_quit_on_go_back() to gdscript
2018-01-03 12:14:16 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Noshyaar 7d0212f4eb
Merge pull request #14953 from poke1024/fix-toolbar-gesture
Hide tooltip on gesture input
2018-01-01 18:53:11 +07:00
volzhs c132d873b1 Bind SceneTree::set_quit_on_go_back() to gdscript
Fix #15189
2017-12-30 21:15:17 +09:00
Bernhard Liebl 098bcf55d0 More efficient subwindow handling 2017-12-28 11:27:43 +01:00
Noshyaar ab444a8ca9
Merge pull request #14996 from neikeq/enums-mono
Mono: Make the bindings generator output enums
2017-12-27 10:29:00 +07:00
PJB3005 7f0a1c1780 Hiding a control now fires NOTIFICATION_FOCUS_EXIT.
It always removed the focus from the control, but this happened without firing the relevant notification.
2017-12-26 20:58:53 +01:00
Juan Linietsky 02e883713a
Merge pull request #14977 from volzhs/fix-crash-group
Fix crash & error at saving scene
2017-12-26 11:43:02 -03:00
Juan Linietsky 4a2eef4ad8 Removed the InputEvent ID field, which was unused and can cause bugs. 2017-12-26 09:49:31 -03:00
Noshyaar a483edbddd
Merge pull request #14899 from volzhs/render-quality-option
Respect HDR option
2017-12-25 08:36:46 +07:00
Noshyaar 1348b087e6
Merge pull request #14753 from NathanWarden/mouse_button_fix
Fixed a bug where mouse button focus breaks when using multiple buttons at once.
2017-12-25 08:33:42 +07:00
volzhs d6a88cdc41 Fix crash from move_child at saving scene 2017-12-25 01:31:13 +09:00
Ignacio Etcheverry 0a0a44da8d Mono: Make the bindings generator output enums
- Switch to PascalCase for constants names
2017-12-24 04:20:41 +01:00
Bernhard Liebl 27afa8813d Hide tooltip on gesture input 2017-12-22 19:39:23 +01:00
Juan Linietsky 1fa9aac3e4 -Make capture dependent on a cell size, not subdivision.
-Fixed a bug recently introduced when releasing mouse events and calling popups
2017-12-21 11:05:55 -03:00
volzhs 0856259d19 Respect HDR option 2017-12-21 22:49:55 +09:00
Michael Alexsander Silva Dias e3c1305027 Fixed wrong Project Settings direction on an error message. 2017-12-20 22:06:43 -02:00
Juan Linietsky feef500b39 properly send mouse released event when grabbing modal focus, fixes #14854 2017-12-20 18:03:48 -03:00
Juan Linietsky b08735f209 Make dynamic font oversampling fully dynamic. 2017-12-19 21:58:32 -03:00
Juan Linietsky fc103566e6 Added font oversampling support 2017-12-19 18:48:30 -03:00
Juan Linietsky 1eb1837d0c Should no longer crash after rebaking, may be a solution to #14795
Not sure if this is the same problem, as reported, please test.
2017-12-19 09:58:02 -03:00
Rémi Verschelde e83c502939
Merge pull request #14754 from willnationsdev/dictionary-copy
Added 'duplicate' function for Dictionary in C++ and API.
2017-12-17 23:58:59 +01:00
Will Nations f19fc83546 Dictionary::copy -> ::duplicate 2017-12-17 16:07:15 -06:00
Nathan Warden fcba654bb8 Fixed a bug where mouse button focus breaks when using multiple buttons at once. 2017-12-16 19:30:49 -05:00
Juan Linietsky 1b944cb663
Revert "Fix mouse button release not sent to gui_input if it's different from the button that gave focus" 2017-12-16 19:50:32 -03:00
Matthias Hoelzl ced1ff63a8 Improve duplication and saving of instanced scenes 2017-12-16 17:58:17 +01:00
Rémi Verschelde 9079be9e83
Merge pull request #14484 from Zylann/fix_mouse_focus_button_release
Fix mouse button release not sent to gui_input if it's different from the button that gave focus
2017-12-16 13:29:44 +01:00
Bernhard Liebl 0d826717e7 Fixes oversized tooltip labels (issue 14570) 2017-12-15 19:33:00 +01:00
Rémi Verschelde 108a36f515
Merge pull request #14604 from mhilbrunner/http-defaults
HTTP cleanup & better defaults
2017-12-15 07:53:38 +01:00
Juan Linietsky f3ad14224e -Add lightmapper
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
2017-12-14 09:01:27 -03:00
mhilbrunner 966c054fc9 HTTP cleanup & better defaults 2017-12-14 10:59:42 +01:00
Rémi Verschelde 7d735da6aa
Merge pull request #13351 from poke1024/fix12451_2
Make click on arrow properly open and close property editor modals
2017-12-10 11:58:36 +01:00
Bernhard Liebl efc3ffb816 fix certain popup close clicks with popup buttons 2017-12-10 10:55:48 +01:00
Marc Gilleron f52da158d9 Fix mouse button release not sent to gui_input if it's different from the button that gave focus 2017-12-10 02:25:39 +01:00
volzhs 0e9d31a2e6 Fix mouse position in viewport 2017-12-10 06:15:57 +09:00
Juan Linietsky dd892a327d Added some clean up in camera/viewport management. Fixes #12279, Fixes #12774 2017-12-07 12:13:20 -03:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Juan Linietsky 7459ade298 Do not cancel event if no need to cancel it. Fixes problem with GUI in 3D. 2017-12-04 17:36:28 -03:00
Juan Linietsky d438ac0aed -Implemented Proxy Textures (needed to solve the problem with ViewportTexture)
-Properly use hierarchy to initialize resources local to scene (solves problem of GUI in 3D)
2017-12-04 15:56:17 -03:00
Konstantin Zaitsev 1f0e9c13a4 Fixed crash on duplicate instanced nodes (#13432) 2017-12-01 17:57:47 +07:00
Juan Linietsky 22415e5a31
Merge pull request #12572 from RandomShaper/onion-skinning
Onion skinning
2017-11-26 15:13:35 -03:00
Pedro J. Estébanez 922cf9fbb0 Fix crash on node duplication
That happened when an instanced scene was being duplicated while it also contained nodes added to it in the scene holding the instance.

Plus:
- Add comments about the logic behind all this.
- Move the null guard to where it can protect the most, but consider it a runtime error rather that a situation we expect.

Fixes #13282.
2017-11-25 21:14:35 +01:00
Pedro J. Estébanez d0e09d84f0 Implement onion skinning for the animation editor 2017-11-25 13:25:14 +01:00
Juan Linietsky bc2e8d99e5 Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
2017-11-25 00:09:40 -03:00
Rémi Verschelde 2ea5ac17e8
Merge pull request #13159 from AndreaCatania/ray
Removed type_mask and fixed some variable name
2017-11-22 16:40:20 +01:00
Will Nations e1c907ec73 Node.duplicate(): instanced node's descendants' properties now update
w/ original's runtime values.
2017-11-21 23:04:40 -06:00
AndreaCatania d6e413bb9c Removed type_mask and fixed some variable name 2017-11-21 22:56:40 +01:00
Rémi Verschelde 613d374bc5
Merge pull request #12284 from bojidar-bg/allow-subproperty-set
Allow for getting/setting "dotted" properties of objects
2017-11-21 22:44:14 +01:00
Bojidar Marinov 0cf9597758
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
2017-11-21 20:58:21 +02:00
Rémi Verschelde 25b860ee2a
Merge pull request #13132 from Chaosus/preserve_dupsignals_flags
Preserve duplicate signal flags
2017-11-21 14:25:50 +01:00
Chaosus fc74dbabd5 Preserve duplicate signal flags 2017-11-21 11:46:19 +03:00
Bernhard Liebl 80ad8afc85 Native pan and zoom for macOS 2017-11-21 09:11:39 +01:00
Pedro J. Estébanez 5a0be858f4 Let SceneTreeDock duplicate nodes via Node::duplicate()
Helps with #11182.
2017-11-19 21:30:17 +01:00
Pedro J. Estébanez 7286966971 Remove out-of-logic assignment of instance's original scene 2017-11-19 21:30:17 +01:00
Pedro J. Estébanez 803b3934d6 Fix duplication of signals
- Partially revert 6496b53549, adding a comment about why duplications of signals must happen as a second phase.
- Add fallback logic for connections to nodes not in the duplicated hierarchy.
- Remove redundant call to `Node::_duplicate_signals()`.

Fixes #12951.
2017-11-19 15:07:05 +01:00
Ian 12b4e232b2 fix signals disconnecting on changing target node type 2017-11-13 17:44:58 -05:00
Chaosus 6496b53549 Duplicate signals fixes 2017-11-13 18:42:07 +03:00
letheed 482e07af7e Unify degree members and properties 2017-11-10 12:52:07 +01:00
letheed ab2647a0d0 Remove deprecated rotation methods 2017-11-10 09:09:30 +01:00
Juan Linietsky 79f81b77e2 -Modules can now add custom version info (added it for Mono)
-Version string takes this version info
-Ability to download templates from the interweb (listing does not work yet)
2017-11-01 23:13:27 -03:00
Poommetee Ketson 9cadb9e5f3 Bind unbound enums, rearrange some by value 2017-10-22 01:58:02 +07:00
Poommetee Ketson 9b634180aa Refactor Fixed to Physics 2017-10-21 21:28:08 +07:00
Rémi Verschelde f2f75d1f11 Merge pull request #12149 from endragor/check-input-handled
Check if input is handled before handling it
2017-10-20 22:47:31 +02:00
Rémi Verschelde 067fc88488 Merge pull request #12224 from NathanWarden/scene_tree_added_signal
Added a node_added signal to the SceneTree
2017-10-20 22:10:47 +02:00
geequlim eeacae563c Fix window display shrink can't set to float numbers 2017-10-20 12:52:18 +02:00
Nathan Warden 999ad9c0a8 Added a node_added signal to the SceneTree 2017-10-19 10:46:00 -05:00
Poommetee Ketson f9f3829bd2 Fix Viewport clear mode is bool instead of int, fixes #12202 2017-10-19 18:17:11 +07:00
Ruslan Mustakov 5da02a0d9c Check if input is handled before handling it 2017-10-16 19:13:33 +07:00
AndreaCatania 4537977d6d Renamed fixed_process to physics_process 2017-09-30 16:19:07 +02:00
Rémi Verschelde 5567cbe6ae Merge pull request #11545 from Paulb23/line_edit_caret_blink_resetting_issue_10764
Fixed caret blink and speed resetting in scenes, issue 10764

[ci skip]
2017-09-25 23:10:32 +02:00
Poommetee Ketson 0761efaf36 Merge pull request #11552 from Tetane/master
Add missing constant binding STRETCH_ASPECT_EXPAND in SceneTree
2017-09-25 19:20:52 +07:00
Tetane b3f3a91e15 Add a missing constant binding in SceenTree
Add missing constant binding "STRETCH_ASPECT_EXPAND" 
(I cannot test it because godot does not compile anymore on my pc (windows10))
2017-09-24 20:29:18 +02:00
Paulb23 8b80e97338 Fixed caret blink and speed resetting in scenes, issue 10764 2017-09-24 17:22:47 +01:00
Rémi Verschelde a1779c9044 Merge pull request #11013 from MednauN/master
Fix duplication of node with script
2017-09-21 10:53:58 +02:00
Rémi Verschelde 4820dfc570 Let queue_free() work on nodes which are not in the scene tree
In practice such nodes could directly be free()'ed, but this little change
prevents users from leaking memory by mistake.
Closes #9074.
2017-09-20 21:49:56 +02:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Evgeny Zuev 521280ec44 Fix duplication of node with script
When duplicating node with script, properties of script
weren't copied sometimes.
It happened because properties were copied in arbitrary
order, and properties of the script were setted before the
"script" property itself, i.e. while script is sill NULL.

Also, DUPLICATE_SCRIPTS flag wasn't working - script was
always copied because `_duplicate` looked for
"script/script" property while it should be just "script".

Now "script" property is being set before all others,
and "script/script" changed to
`CoreStringNames::get_singleton()->_script`.
2017-09-20 10:56:31 +07:00
Maxim Sheronov 0fffa45158 Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
Rémi Verschelde aabbd00284 Merge pull request #10908 from hpvb/fix-unused-variables
Fix unused variable warnings
2017-09-12 12:55:53 +02:00
Rémi Verschelde 0f006994d8 Merge pull request #11007 from saltares/issue-9988
Renames _add_child_below_node() to add_child_below_node(). Fixes #9988.
2017-09-12 12:04:03 +02:00
Rémi Verschelde 3941e01a57 Merge pull request #11041 from hpvb/fix-clang-format-error
Fix serveral recent new clang-format errors

[ci skip]
2017-09-12 11:16:36 +02:00
Bojidar Marinov ebee9898ca
Fix duplication of nodes resulting in shared metadata
Fixes #9547
2017-09-11 12:34:36 +03:00
Hein-Pieter van Braam b2a38854fd Fix unused variable warnings
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-08 15:03:53 +02:00
Hein-Pieter van Braam 5e18967d77 Fix serveral recent new clang-format errors 2017-09-08 00:20:16 +02:00
Juan Linietsky 1eeda0f32f Restored auto snapping of controls to pixels, fixes #10847 and probably several more issues. Made it optional in the project settings but defaults to true. 2017-09-07 11:22:07 -03:00
David Saltares 0549484c77 Renames _add_child_below_node() to add_child_below_node(). Closes #9988. 2017-09-05 22:43:28 +01:00
Hein-Pieter van Braam 9c63ab99f0 Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-02 01:59:26 +02:00
Poommetee Ketson ed606ded52 Fix files header 2017-09-01 21:07:55 +07:00
Juan Linietsky 5653477a30 Exposed new ClearMode function to Viewport clases, closes #9995 2017-08-31 11:15:10 -03:00
Juan Linietsky 4d4c1dfc1b Do not error flood if removing default environment. Closes #9945 2017-08-31 08:56:15 -03:00
Rémi Verschelde 7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Poommetee Ketson 87917e769f Viewport: fix 'size' binding from Rect2 to Vector2 2017-08-27 12:03:19 +07:00
Rémi Verschelde 6e7f0190ee Merge pull request #10579 from quinnyo/rpc-sender-id
Method to get ID of RPC calling peer
2017-08-27 02:11:30 +02:00
Hein-Pieter van Braam 3e25cf9e05 Add two missing Null checks
These Null checks were removed in #10581 but actually changed the
logic of the functions in this case.

This fixes #10654
2017-08-26 23:40:45 +02:00
Rémi Verschelde 3c5ce736e6 Node: Add debug info to add_child reparenting check
Use it to remove buggy add_child in EditorAudioBus
2017-08-26 18:14:42 +02:00
Juan Linietsky 1894157c9f -Massive clean up to gizmos
-Make sure handles are always visible (on top)
-Fixed instanced scene selection (should work properly now)
-Added interpolated camera
-Customizable gizmo colors in editor settings
2017-08-26 00:47:28 -03:00
Hein-Pieter van Braam cacced7e50 Convert Object::cast_to() to the static version
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.

This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.

It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
Quinn Schwab 7c802837a3 add SceneTree method to get ID of rpc calling peer 2017-08-23 18:43:25 +10:00
Marcelo Fernandez 1b6c9f7076 Add missing NULL check for the new show_about() call 2017-08-22 14:21:18 -03:00
Rémi Verschelde b3ff7ca62e Fix build after merge of #10254 2017-08-22 01:16:33 +02:00
Rémi Verschelde 13f879587d Merge pull request #10254 from marcelofg55/master
Added notification const NOTIFICATION_WM_ABOUT
2017-08-22 00:56:31 +02:00
Juan Linietsky 2cc8309249 Merge pull request #10351 from neikeq/enums-are-for-the-weak
ClassDB: Provide the enum name of integer constants
2017-08-21 19:56:08 -03:00
Rémi Verschelde d37bd15cb9 Merge pull request #10443 from karroffel/propagate_call
add "propagate_call" method to Node
2017-08-21 23:21:47 +02:00
Wilson E. Alvarez 0017e21521 Fixed segfault when hovering over scene tree elements and showing tooltips. 2017-08-20 22:28:07 -04:00
Ignacio Etcheverry 32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Juan Linietsky 541fdffc0a Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
2017-08-20 12:55:46 -03:00
Karroffel 390f7def39 add "propagate_call" method to Node
It is possible to propagate a notification down the Node tree by
using `propagate_notification`, but there was no such method for
doing the same but with method calls.

This commit adds the `propagate_call` method, which calls a method
on a node and all child nodes. An optional paramter `parent_first`
determines whether the parent node gets called before or after the
children have been visited. It defaults to false, so the parent
gets called last.
2017-08-19 15:22:37 +02:00
Juan Linietsky bf1f83ed29 Small fix that makes overal UI (including dragging spliiters) much, much faster.
Flushing messages meant that for every event, UI was reaccomodating everything. This is relly slow.
Messages will have to happen sometime later, during iteration most likely.
I still can't fix the overall code editor slowness on Mesa+Radeon, I suspect it's a driver issue.
2017-08-18 23:01:27 -03:00
Ignacio Etcheverry 90b8a5b71e Removes editor_hint from SceneTree 2017-08-19 01:29:45 +02:00
Marcelo Fernandez aae29c7a0e Added notification const NOTIFICATION_WM_ABOUT 2017-08-17 11:28:45 -03:00
TwistedTwigleg 00f6c85928 Synchronize parameter names in definition and declaration
Fixes #10244.
2017-08-16 17:22:23 +02:00
Pedro J. Estébanez 213ad45ccf Allow zero-padded serial naming
Thereby, the editor will acknowledge node namings such as _Thing003_ so that a duplicate, for instance, will be named _Thing004_, instead of _Thing4_, that was the case formerly.

Closes #7758.
2017-08-16 03:26:47 +02:00
kubecz3k 129ebca41d Merge pull request #9889 from groud/control_enhancements
Control node enhancements
2017-08-15 22:55:49 +02:00
Juan Linietsky 860816f3d3 Fix debug materials, closes #8607 2017-08-15 17:21:05 -03:00
Juan Linietsky fdc2cdef0b Ensure nothing is found outside modal stack, but keep logic going. Fixes #7622 2017-08-15 07:32:15 -03:00
Gilles Roudiere 0d35d4d53b Replace GUI anchor type by a float between 0 and 1 2017-08-13 21:20:13 +02:00
Rémi Verschelde 23f6d3fa69 Merge pull request #10198 from jjay/f/stretch_aspect_expand
Add "expand" option for stretch aspect, no more black bars
2017-08-11 15:55:22 +02:00
Ignacio Etcheverry 78619a5866 Fixes method definitions with extra number of arguments 2017-08-10 07:17:51 +02:00
Ignacio Etcheverry 2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Yakov Borevich b2ca500545 Add expand stretch/ascpect - no more black bars 2017-08-09 12:26:33 +03:00
Juan Linietsky 2a6cdfaf91 -Fixed BoneAttachment delay, closes #3966
-Fixed skeleton crash, probably fixes other issues
2017-08-07 22:18:12 -03:00
Thomas Herzog 5ada918d9f Merge pull request #10136 from MednauN/master
Add handling of touch events in _gui_input_event
2017-08-07 22:23:30 +02:00
Rémi Verschelde 3121b3a4f4 Merge pull request #10141 from ISylvox/lower_case_godot_api
Makes all Godot API's Methods lower_case
2017-08-07 14:59:39 +02:00
Indah Sylvia 5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
Rémi Verschelde a2cedd81d4 Merge pull request #9394 from supagu/sync-rpc-fix
Queue RPC packet before calling method locally to ensure correct RPC …
2017-08-07 11:01:26 +02:00
Evgeny Zuev 60230675d9 Add handling of touch events in _gui_input_event
Fixes #10039
2017-08-07 15:14:50 +07:00
Juan Linietsky cfe4b30941 renamed node path, closes #5691 2017-08-05 09:13:59 -03:00
Rémi Verschelde 62464839ad Merge pull request #8567 from BastiaanOlij/ar_vr_server
AR/VR base classes and position tracker support
2017-07-31 13:29:18 +02:00
Rémi Verschelde 76005a8e75 Style: Apply clang-format on all files
Thus fixing some invalid changes that had still made it to the master branch.
2017-07-30 22:53:40 +02:00
BastiaanOlij d2ba2d0873 Adding base classes and structures for ARVR support
Added ArVrScriptInterface

Added ARVRCamera, ARVRController and ARVROrigin helper objects
2017-07-28 10:39:15 +10:00
Pedro J. Estébanez 6c1b7fd899 Fix Node::move_child() crash if moving to the end plus one
Fixes #9820.
2017-07-25 05:20:30 +02:00
Rémi Verschelde 374cffaa11 Merge pull request #9764 from Noshyaar/pr-fix2
Add object type hint for docs
2017-07-24 08:07:32 +02:00
Poommetee Ketson 2777f81d29 Add object type hint for docs 2017-07-23 18:57:03 +07:00
Juan Linietsky 772485cdb3 Several changes to better run in mobile. 2017-07-22 14:08:17 -03:00
Juan Linietsky 25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
Poommetee Ketson 49c7620326 Add object type hint for docs 2017-07-19 02:03:34 +07:00
Juan Linietsky bbada82f80 -Reorganized all properties of project settings (Sorry, Again).
(Lot's of bloat accumulated, so it was time for clean up.)
-Made EditorSettings and ProjectSettings search more useful (search in sections too)
2017-07-17 22:18:58 -03:00
Juan Linietsky 5e361ba2ea Script editor usability fixes 2017-07-15 09:35:29 -03:00
Pedro J. Estébanez c061044d78 Fix picking list flood while mouse capture enabled
Fixes #9575.
2017-07-10 17:48:57 +02:00
Juan Linietsky e63c64e256 Clean up normalmapping, make sure tangents are imported correctly. 2017-07-03 10:45:34 -03:00
Juan Linietsky db3b05d289 Reworked translation system
-Label and Button reload translation on the fly
-Resources are loaded and reload depending on locale
2017-06-28 17:01:35 -03:00
Rémi Verschelde 9e54e1f34f Merge pull request #7947 from RandomShaper/fix-vis-notifier-2d
Fix VisibilityNotifier2D viewport offset issue
2017-06-28 12:25:08 +02:00
Juan Linietsky 3ce046ee0c -Fixed SCREEN_TEXTURE and other related 2D shader parameters.
-Fixded BackBuffercopy object
2017-06-26 22:58:46 -03:00
Fabian Mathews 0f0e2240ba Queue RPC packet before calling method locally to ensure correct RPC packet order 2017-06-26 19:13:54 +09:30
Juan Linietsky 0cac32910a -Restored support for Canvas BG mode on Environment
-Improved ease of use of WorldEnvironment (no longer extends Spatial)
-2D editor viewport can now work in HDR!
2017-06-24 08:58:27 -03:00
Juan Linietsky b19225bfce -Fix freezes caused by etccomp2, closes #9183
-Normalmaps are now detected and imported as RGTC, both in S3TC and ETC2, this improves their quality.
2017-06-16 21:49:37 -03:00
Juan Linietsky 42b2d52c88 Properly adjust the visible editor rect and make limits respected, closes #8328 2017-06-12 16:19:12 -03:00
Juan Linietsky 4d50c7ad8c Restored multiple viewport function, as well as view modes. 2017-06-11 15:52:03 -03:00
Juan Linietsky 612ab8fcdb -Restored multithread capability to VisualServer
-Restored resource previews!
2017-06-09 00:24:18 -03:00
Juan Linietsky 5bf810b5db -Added proper access to depth texture from shader
-Split Mesh into Mesh (abstrat class) and ArrayMesh, to allow to proper mesh primitives, as well as streamable meshes in the future.
2017-06-07 18:20:04 -03:00
alexholly a3c90b0293 renamed all Rect2.pos to Rect2.position 2017-06-04 02:09:17 +02:00
Andreas Haas 9bc5348961
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
2017-06-03 11:26:39 +02:00
Juan Linietsky bb20f230ad -Added .hdr format support
-Added default environment editor setting
-Added environment created by default in new projects
-Removed default light and ambient from spatial editor, to make the editor more PBR compliant
2017-05-28 21:48:05 -03:00
Juan Linietsky 5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Juan Linietsky 98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
Fabio Alessandrelli a5ce7a98cb Fix bug in pause mode propagation
Pause mode was not correctly propagating effectively stopping
immediately when the mode was not PAUSE_MODE_INHERIT.
2017-05-06 02:37:17 +02:00
volzhs de4267fc99 Fix auto_accept_quit option to work
auto_accept_quit value is set first properly with GLOBAL_DEF("application/auto_accept_quit", true) in main.cpp
after that it's reset to true in SceneTree:init() whatever value was.
2017-04-25 20:05:22 +09:00
Rémi Verschelde 99529fb80d Move VERSION_MKSTRING logic to version.h
Fixes a bug where the VERSION_PATCH define is not yet in scope if
typedefs.h is included before version.h at compilation time.

(cherry picked from commit 3b687c5474)
2017-04-20 12:14:34 +02:00
Sergey Pusnei 8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Juan Linietsky 1c480698ce -Fixed crash with splash screen on windows
-properly show editor without having to resize window on windows
2017-04-09 20:40:48 -03:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde b81d5f4687 Merge pull request #8308 from RandomShaper/optimize-out-debug-n-non-tools
Optimize-out some debug and/or non-tools methods
2017-04-07 22:22:54 +02:00
Rémi Verschelde 12b84eb9f4 Merge pull request #8304 from RandomShaper/reset-folded-on-reset-edit-children
Reset display folded for an instanced scene if editable children is toggled off
2017-04-07 19:12:42 +02:00
Pedro J. Estébanez 665bf52948 Optimize-out some debug and/or non-tools methods
Collisions and nav debug are conditionally compiled depending on DEBUG_ENABLED
is_editor_hint() and is_node_being_edited() are compiled only with TOOLS_ENABLED
Every affected method is implemented in the header in case its macro is not present (the getters just returning false and the setters having an empty body) so the compiler can inline and finally no-op-out them as likely as possible.
is_node_being_edited() already showed a similar optimization effort and has been adapted to this change.
Furthermore, and as a consequence, -debugcol and -debugnav will not work on non-debug (strict release) builds.
This can bring a little bit of runtime performance on release and non-tooled builds (less code, so less cycles to spend and maybe more cache friendly).
2017-04-07 16:35:55 +02:00
Pedro J. Estébanez 4b85ddabda Reset display folded for an instanced scene if editable children is toggled off
This avoids the display folded flag needlessly getting into the scene file (potentially forever) and also gives more visual feedback if the user re-enables editable children so it will display unfolded at first.
2017-04-07 15:48:07 +02:00
Juan Linietsky 74808ac4d9 New particle system, mostly working, some small features missing. 2017-04-06 23:49:27 -03:00
Rémi Verschelde 5b5a825c7f Fixer looping timer accumulation in _process
Follow-up to #8251.
2017-04-05 08:22:41 +02:00
Nikhil Shagrithaya ea4fbee8f2 previous value of time_left is added to wait_time before assigning to time_left 2017-04-04 00:37:42 +05:30
Rémi Verschelde 9f85befbfd Merge pull request #8048 from ficoos/was_input_handled
Add the option to check if input was handled
2017-04-03 13:48:57 +02:00
Andreas Haas 1d3c9c448d
Viewport: Fix undefined behaviour found by llvm sanitizer.
When godot was running as the project manager, it tried to call a method on a null pointer (get_tree()->get_edited_scene_root()).
This is undefined behaviour and caused a crash when compiled with sanitizing enabled.
2017-04-02 09:46:51 +02:00
Saggi Mizrahi 245ace6e2e Add the option to check if input was handled
When working with a viewport you should call Viewport.input() to pass
the input, but if the input was unhandled you might also want to call
Viewport.unhandled_input() so that objects in the sub-scene can handle
the event. This adds a way to check if the input was handled so that you
know whether you should call Viewport.unhandled_input() or not.

Signed-off-by: Saggi Mizrahi <saggi@mizrahi.cc>
2017-03-31 17:56:32 +03:00
Rémi Verschelde c6ba3bf9d5 Merge pull request #8203 from RandomShaper/add-missing-bind
Add missing binding for DUPLICATE_USE_INSTANCING
2017-03-30 07:37:46 +02:00
Pedro J. Estébanez c2165bb1a5 Add missing binding for DUPLICATE_USE_INSTANCING 2017-03-30 00:38:06 +02:00
Rémi Verschelde c25246d158 Merge pull request #8010 from AlexHolly/Timer-is_time_left
added Timer is_time_left()
2017-03-24 22:48:01 +01:00
Rémi Verschelde debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
AlexHolly 636963b11d is_active to is_paused
rm doc
2017-03-19 22:29:20 +01:00
Rémi Verschelde 14c01dfea7 Merge pull request #8037 from RandomShaper/remove-warning
Remove warning on owner re-assignment
2017-03-18 10:49:06 +01:00
Rémi Verschelde 5b6900ed9b Merge pull request #8014 from AlexHolly/fix-remove-and-skip
fix remove_and_skip()
2017-03-18 10:32:14 +01:00
Pedro J. Estébanez e3b4b7fa98 Remove warning on owner re-assignment 2017-03-15 12:28:57 +01:00
AlexHolly 3f78f1f17d fix remove_and_skip() 2017-03-12 18:50:43 +01:00
Ignacio Etcheverry d210ac66ef Fix connection errors when replacing node
- Avoid connecting the signals to nonexistent methods
- Preserve only persistent connections
2017-03-11 20:21:04 +01:00
Pedro J. Estébanez 640d8aa458 Fix VisibilityNotifier2D reapplication of viewport offset 2017-03-06 02:28:58 +01:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Karol Walasek 29908d32ba Added a SceneTree.has_network_peer, closes #7922 2017-03-04 11:35:44 +01:00
Rémi Verschelde 539b9e09e4 Merge pull request #7856 from RandomShaper/add-duplicate-flags
Add more options to Node.duplicate()
2017-02-26 20:24:17 +01:00
Juan Linietsky de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Pedro J. Estébanez 4e22b6acd7 Add more options to Node.duplicate()
to decide whether signals, groups and/or scripts should be set in the copied nodes or not; it's default value makes the method include everything, as usual
2017-02-20 20:05:01 +01:00
Andreas Haas 4de29f9c7a
SceneTreeTimer: Ability to set pause mode
Adds an additional flag to SceneTree::create_timer() that tells it whether or not to process when the game is paused.
Defaults to false in order to not break existing functionality.
2017-02-15 08:02:08 +01:00
Hein-Pieter van Braam 411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Hein-Pieter van Braam 0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
Rémi Verschelde 70b9aa379d Merge pull request #7581 from Faless/v6_wild_bind
TCP/UDP listen bind to address and bugfixes
2017-02-12 23:31:40 +01:00
Juan Linietsky 3b019bf644 Ability to delete, drag and drop audio buses! 2017-01-23 23:12:41 -03:00
Fabio Alessandrelli 88a56ba783 Remove set_ip_type from network classes (no longer needed)
- TCP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `connect` -> resolve using best protocol (UNSPEC), socket from address type

- UDP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
    (to change socket type you must first call `close` it)
2017-01-23 20:18:22 +01:00
Juan Linietsky 0aa7242624 WIP new AudioServer, with buses, effects, etc. 2017-01-21 19:01:00 -03:00
Rémi Verschelde f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00
Rémi Verschelde 3890256fc5 Style: Cleanups, added headers, renamed files
Made sure files in core/ and tools/ have a proper Godot license header
when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h}
to rect3.{cpp,h} and class_db.{cpp,h} respectively.

Also added a proper header to core/io/base64.{c,h} after clarifying
the licensing with the original author (public domain).
2017-01-16 08:04:23 +01:00
Juan Linietsky b400c69cd4 Oops! Audio engine has vanished :D 2017-01-15 16:07:51 -03:00
Juan Linietsky 5dde810aa5 no more errors related to missing GlobalConfig::Get (or so I hope) 2017-01-14 21:57:22 -03:00
Juan Linietsky dcb95ec147 removed duplicated functions in class hierarchy that were bound more than once
added a check to detect this case in the future
2017-01-14 11:10:42 -03:00
Rémi Verschelde 93ab45b6b5 Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
2017-01-14 14:52:23 +01:00
Juan Linietsky d093cc8bf8 Renamed call_group to call_group_flags, made call_group without flags the default 2017-01-14 10:03:53 -03:00
Juan Linietsky 6e88b1096a Vector2.get_aspect() renamed to Vector2.aspect() to keep consistent method naming 2017-01-13 20:00:43 -03:00
Rémi Verschelde b191ea8f02 Node name casing: fix mistake from previous commit 2017-01-13 22:43:39 +01:00
Rémi Verschelde f19fd7a4c1 Reenable node name case setting + code cleanups
The method _generate_serial_child_name is indeed called relatively often
in editor mode, but that commented out code chunk hardly adds to its
slowness (and with the default setting, not at all).

Also did various related code cleanups and simplifications.
2017-01-13 22:38:43 +01:00
Juan Linietsky e53c247cb1 Created new Engine singleton, and moved engine related OS functions to it. 2017-01-13 12:51:14 -03:00
Juan Linietsky 04c749a1f0 New API for visibility in both CanvasItem and Spatial
visible (property) - access set_visible(bool) is_visible()
is_visible_in_tree() - true when visible and parents visible
show() hide() - for convenience
2017-01-13 10:45:50 -03:00
Juan Linietsky a2903fc51d Must now register with set_transform_notify() to get NOTIFICATION_TRANSFORM_CHANGED 2017-01-12 20:35:46 -03:00
Ray Koopa a971186c26 Project setting to control node name casing
(cherry picked from commit 87fd54b2f1)
2017-01-12 20:47:25 +01:00
Juan Linietsky 83cb84753f Renamed most signals so they refer to:
-An action being requested to the user in present tense: (ie, draw, gui_input, etc)
-A notification that an action happened, in past tense (ie, area_entered, modal_closed, etc).
2017-01-12 00:51:08 -03:00
Juan Linietsky b7d69c2444 Added a BACK notification besides QUIT, so they go in separate channels. 2017-01-11 16:42:31 -03:00
Juan Linietsky bc26f90581 Type renames:
Matrix32 -> Transform2D
	Matrix3 -> Basis
	AABB -> Rect3
	RawArray -> PoolByteArray
	IntArray -> PoolIntArray
	FloatArray -> PoolFloatArray
	Vector2Array -> PoolVector2Array
	Vector3Array -> PoolVector3Array
	ColorArray -> PoolColorArray
2017-01-11 00:52:51 -03:00
Juan Linietsky f3f4a11cfb - _ready() callback only happens once now, if you want to receive it again, use request_ready()
- C++ Nodes mostly do an internal process callback, so it does not conflict with users willing to use their own process callbacks
- callbacks such as _input, _process, _fixed_process _unhandled_input, _unhandled_key_input do not requiere calling a function to enable them. They are enabled automatically if found on the script.
2017-01-10 18:04:33 -03:00
Juan Linietsky a503f8aadc Groundbreaking!! Godot resources can now be flagged to be local to the scene being edited!
This means that each time this scene is instanced, the resource will be unique!
As such, thanks to this, the following features were implemented:
-ButtonGroup is no longer a control, it's now a resource local to the scene
-ViewportTexture can be created from the editor and set to any object, making ViewportSprite and other kind of nodes obsolete!
2017-01-10 01:07:03 -03:00
Juan Linietsky 1f8451001d -Translation text will change automatically for in-game buttons, labels, poups when translation is changed.
-Added a NOTIFICATION_TRANSLATION_CHANGED for controls that need custom code
-Sorry, editor will not update automatically because it uses a different translatio method.
2017-01-09 16:43:44 -03:00
Juan Linietsky e9bb65db81 -All types have editable script now in properties
-Changed clip to a property in Control which can be set by the user
2017-01-09 15:50:59 -03:00
Juan Linietsky 94ee7798ce -removed stop mouse and ignore mouse from control, which were confusing, replaced by mouse filter 2017-01-08 19:54:19 -03:00
Juan Linietsky 547a57777b renamed joystick to joypad everywhere around source code! 2017-01-08 17:06:33 -03:00
Juan Linietsky 920947f297 renamed _input_event for GUI events to _gui_input, so it's more differentiated than generalized _input 2017-01-08 16:28:12 -03:00
Juan Linietsky 2ab83e1abb Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
Juan Linietsky 0f7af4ea51 -Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-05 09:16:00 -03:00
Juan Linietsky b085c40edf -Conversion of most properties to a simpler syntax, easier to use by script
-Modified help to display properties

GDScript can still not make use of them, though.
2017-01-04 01:16:14 -03:00
Juan Linietsky 3fae505128 Begin modifying properties to make them more friendly to script and doc. 2017-01-03 00:38:16 -03:00
Juan Linietsky 118eed485e ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
2017-01-02 23:03:46 -03:00
Rémi Verschelde 3f3f5a5359 Merge remote-tracking branch 'origin/gles3' into gles3-on-master
Various merge conflicts have been fixed manually and some mistakes
might have been made - time will tell :)
2017-01-02 21:52:26 +01:00
Rémi Verschelde 0b2771bd65 Merge pull request #7271 from Faless/ipv6_cleanup
Fixes and improvementes for IPv6 implementation.
2017-01-02 15:51:45 +01:00
Juan Linietsky c2a217c350 WIP particle system
Ability to enable and change MSAA settings
Ability to change VCT quality
Ability to enable/disable HDR rendering
2017-01-01 22:16:52 -03:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
Juan Linietsky 3adb42e217 Fixed many more bugs reported by Valgrind 2016-12-23 08:47:16 -03:00
Juan Linietsky f9603d8236 can bake for omni and spotlight
store normal when baking
2016-12-22 10:00:15 -03:00
Fabio Alessandrelli d194e1c48e Expose HTTP classes' set_ip_type to scripting 2016-12-13 11:09:37 +01:00
Fabio Alessandrelli a77a0118f6 Allow setting ip_type for TCP/UDP and HTTP classes 2016-12-09 18:24:59 +01:00
Rémi Verschelde 440c37fbd9 Revert "Do not emit NOTIFICATION_READY more than once (breaking change)"
This reverts commit b6eab006db.

This commit broke compatibility in an undesired way, as outlined in
https://github.com/godotengine/godot/issues/3290#issuecomment-263388003
2016-11-30 00:08:01 +01:00
Rémi Verschelde 35e754db59 Merge pull request #7138 from bojidar-bg/ready_guard
Do not enter _ready twice
2016-11-28 15:19:50 +01:00
Juan Linietsky 943d27f46d Instancing is working! (hooray) 2016-11-22 01:26:56 -03:00
Juan Linietsky c39d2b3f42 working reflection probes!! 2016-11-19 13:23:37 -03:00
Ariel Manzur b3616089fa adding get_stored_values method
changed order name

(cherry picked from commit dbca4ee3fe)
2016-11-18 21:55:21 +01:00
Bojidar Marinov b6eab006db
Do not emit NOTIFICATION_READY more than once (breaking change)
Currently, there is no notification with the old behaviour, so probably breaks all cpp code relying on that notification as well.
2016-11-17 18:46:45 +02:00
Bojidar Marinov 184173a9b9
Guard agains duplicate calling of _ready when instanced in _enter_tree
Fixes #6005
2016-11-17 18:10:53 +02:00
khairul169 6a7aebdf6c Uncomment debug properties of HTTP Request 2016-11-14 09:27:10 +07:00
Juan Linietsky cacf9ebb7f all light types and shadows are working, pending a lot of clean-up 2016-11-09 23:55:06 -03:00
Ignacio Etcheverry d76f622c92 Merge pull request #7022 from neikeq/pr-issue-7013
Keep groups when replacing nodes
2016-11-06 02:00:21 +01:00
Ignacio Etcheverry 305956bf70 Keep groups when replacing nodes 2016-11-03 00:19:32 +01:00
Rémi Verschelde d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
Juan Linietsky 53d8f2b1ec PBR more or less working, still working on bringing gizmos back 2016-10-27 11:50:26 -03:00
Rémi Verschelde fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00
Pedro J. Estébanez 84c525ba1b Revise serial naming behavior 2016-10-10 13:11:32 +02:00
Rémi Verschelde e0e21984d8 Merge pull request #6747 from RandomShaper/unify-serial-naming
Make node serial naming per-project and universal
2016-10-09 14:55:53 +02:00
Pedro J. Estébanez 9b2e2935d0 Refactor node naming APIs used by editor
Make 'name_num_separator' a project setting
Make all node operations separator-aware
2016-10-08 21:49:16 +02:00
Mateusz Adamczyk 8671836b76 Added simple check to viewport, if matrix32 is invesile (https://github.com/godotengine/godot/issues/6296). 2016-10-08 12:33:10 +02:00
Juan Linietsky cf5778e51a -Added ViewportContainer, this is the only way to make viewports show up in GUI now
-2D editing now seems to work
-Added some functions and refactoring to Viewport
2016-10-05 01:26:35 -03:00
Juan Linietsky 22d83bc9f6 Begining of GLES3 renderer:
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
2016-10-03 21:35:16 +02:00
anneomcl aa5ade834c Fix for #6158. Converting Vector2 to Size2 for scaling functions. 2016-09-19 23:31:45 -07:00
Juan Linietsky a4156f1f0a Added a few functions to make 2D split screen easier. 2016-09-14 15:55:14 -03:00
Fabio Alessandrelli 97cf3eba56 Restore viewport set_world_2d functionality 2016-09-14 15:18:00 +02:00
Juan Linietsky b16f41a10a Fix Viewport.get_mouse_pos() for specific situations, closes #1885 2016-09-10 13:29:07 -03:00
Juan Linietsky 8835882d23 Merge pull request #6355 from Kazuo256/http-request-methods
Add http method and request data parameters to HTTPRequest::request
2016-09-10 11:48:07 -03:00
Juan Linietsky 828e1c092f Renamed the bind_native functions to bind_vararg, should make it show the documentation more clearly and also make it easier to bind to C# 2016-09-07 19:39:57 -03:00
Kazuo256 c53e5c555a Add http method and request data parameters
For HTTPRequest::request
2016-09-05 13:38:00 -03:00
Juan Linietsky cbbcf72703 -High Level protocol optimization (should be smaller)
-Ability to set compression to ENet packets (check API)
-Fixed small bug in StringDB that lead to duplicate empty strings
-Added a new class, StreamPeerBuffer, useful to create your own tightly packed data
2016-08-22 01:19:24 -03:00
Juan Linietsky 2b7aa98d2d Changed API to use sequenced packets for UDP (drop old) 2016-08-19 22:54:53 -03:00
Juan Linietsky 2fa693273c Many fixes to networking, demo should work now 2016-08-19 18:44:09 -03:00
Juan Linietsky 1add52b55e Brand new networked multiplayer 2016-08-19 16:48:41 -03:00
Juan Linietsky 3db36684b1 Added high level networked multiplayer to Godot.
It's complete, but absolutely and completely untested, undocumented and NSFW.
Have fun :-)
2016-08-14 18:49:50 -03:00
Juan Linietsky 3d7c10e9ce Added an easy API to yield to a specific time by doing:
yield( get_tree().create_timer(5.0), "timeout" )
2016-08-06 21:39:50 -03:00
Andreas Haas 4755fe5576
UI navigation via JOYSTICK_MOTION.
Previously, you could assign joystick axis events to "ui_*" actions but they had no effect.
See https://godotengine.org/qa/6232
2016-07-30 12:39:16 +02:00
Juan Linietsky ab93fd1af9 Add thread support to HTTPRequest, changed assetlib to use it. 2016-07-24 16:09:43 -03:00
Juan Linietsky 62cdfeaf58 Merge pull request #5881 from neikeq/pr-fix-propagation
Viewport: Replace obsolete "windows" group calls
2016-07-24 12:37:59 -03:00