Commit graph

862 commits

Author SHA1 Message Date
Rémi Verschelde 6efd777fae Merge pull request #10976 from saltares/issue-907
Fixes setting visibility on GridMap, issue #907
2017-09-06 11:49:35 +02:00
David Saltares f43a0ef327 Setting visibility on GridMap now works. Closes #907.
Basically, `GridMap` wasn't reacting to the
`NOTIFICATION_VISIBILITY_CHANGED` event. This reacts to such events and
walks over the set of `Octants` and all of their `MultiMeshInstances` to
set their visibility on the `VisualServer`.
2017-09-05 22:44:19 +01:00
Ruslan Mustakov 269203a022 Provide NativeScript properties in definition order 2017-09-05 12:45:23 +07:00
Juan Linietsky 89e090edef Fix ETC2 import for luminance/lumalpha textures, fixes #10421 2017-09-04 18:45:41 -03:00
Saracen 92e77d5ff2 Recast integration. 2017-09-04 21:41:57 +01:00
Rémi Verschelde e979e50b7d Merge pull request #10921 from karroffel/gdnative-MERGE-EVERYTHING
[GDNative] merge of NativeScript and GDNative, new GDNative singletons
2017-09-04 21:51:07 +02:00
Rémi Verschelde b5d2d0a9a5 Merge pull request #10939 from neikeq/fix-overridden-external-editors
Fixes language overridden external editors
2017-09-04 08:12:29 +02:00
Rémi Verschelde 7040a390ad Merge pull request #10937 from djrm/pr_fix_typo
Fix. resizeable -> resizable.
2017-09-04 07:37:59 +02:00
Ignacio Etcheverry 52a7be4eef Fixes language overridden external editors 2017-09-03 21:23:36 +02:00
Daniel J. Ramirez d6b664f671 Fix. resizeable -> resizable.
(not actually a typo, but the rest of the API uses resizable)
2017-09-03 13:12:52 -05:00
Juan Linietsky adde89e8b1 -Added an optimization so physics shapes are configured later, speeds up grid map loading and editing 2017-09-03 14:54:15 -03:00
Karroffel 54a9c1ee43 [GDNative] added singleton GDNativeLibraries
A GDNativeLibrary now has a field "gdnative_singleton" which can be
used to let the `godot_gdnative_singleton` procedure be executed on
Godot's startup. In future this can be used to register new
scripting languages or resource importer types.
2017-09-03 16:56:00 +02:00
Karroffel 7878329e6f merged gdnative and nativescript module 2017-09-03 15:28:43 +02:00
Poommetee Ketson 459f526119 Fix typos 'a' and 'an' 2017-09-02 21:19:06 +07:00
Hein-Pieter van Braam 7df28d1799 Fix missing pragma push
I forgot to pragma push the ignored warning in #10877 this adds the
missing ones.
2017-09-02 11:03:27 +02: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
Rémi Verschelde dac150108a Merge pull request #10846 from hpvb/fix-sign-compare
Fix signed and unsigned comparisons
2017-09-01 21:52:55 +02:00
Rémi Verschelde 69ac4cbb37 Merge pull request #10854 from MednauN/ogg-fix
Fix crash when destroying AudioStreamPlaybackOGGVorbis
2017-09-01 21:51:48 +02:00
Rémi Verschelde 90a944e856 Merge pull request #10865 from neikeq/woah
etc: Append -std=gnu++11 to CCFLAGS instead of CXXFLAGS

[ci skip]
2017-09-01 21:25:05 +02:00
Ignacio Etcheverry 2f79c84ff5 etc: Append -std=gnu++11 to CCFLAGS instead of CXXFLAGS
This way it can override the -std flags passed to scons.
2017-09-01 18:51:50 +02:00
Juan Linietsky 8f30c52a37 Removed ontop property, added a material rendering priority system. Fixes #9935, closes #10135 2017-09-01 13:01:08 -03:00
Poommetee Ketson ed606ded52 Fix files header 2017-09-01 21:07:55 +07:00
Evgeny Zuev 46f003c445 Fix crash when destroying AudioStreamPlaybackOGGVorbis 2017-09-01 17:49:22 +07:00
Rémi Verschelde 7c76e0c8c3 Merge pull request #10853 from leezh/pcre_html5_fix
Disabled PCRE-JIT in HTML5. Fixes #10834

[ci skip]
2017-09-01 12:46:41 +02:00
Zher Huei Lee 566c0f675a Disabled PCRE-JIT in HTML5. Fixes #10834 2017-09-01 18:33:04 +08:00
Hein-Pieter van Braam f9467ec1ea Fix signed and unsigned comparisons
The first in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-01 08:13:12 +02:00
Emmanuel Leblond 6151adfe8c
Correct GDnative's godot_string_find_last method name 2017-08-31 23:24:26 +02:00
Rémi Verschelde 6f762ad709 Merge pull request #10422 from endragor/gdnative-android
Make GDNative work on Android
2017-08-31 13:51:10 +02:00
Rémi Verschelde 0cee288c11 Merge pull request #10148 from leezh/pcre2
Replacement of internal RegEx with PCRE2
2017-08-31 11:56:19 +02:00
Rémi Verschelde f00760b22c Merge pull request #10382 from toger5/dark_icons
Light Theme
2017-08-31 11:47:18 +02:00
toger5 aa8feff8c1 Implement color conversion for dark SVG icons 2017-08-30 21:20:02 +02:00
Ruslan Mustakov 5ccdeccb6e Make GDNative work on Android
The changes include work done to ensure that GDNative apps and Nim
integration specifically can run on Android. The changes have been
tested on our WIP game, which uses godot-nim and depends on several
third-party .so libs, and Platformer demo to ensure nothing got broken.

 - .so libraries are exported to lib/ folder in .apk, instead of assets/,
   because that's where Android expects them to be and it resolves the
   library name into "lib/<ABI>/<name>", where <ABI> is the ABI matching
   the current device. So we establish the convention that Android .so
   files in the project must be located in the folder corresponding to
   the ABI they were compiled for.

 - Godot callbacks (event handlers) are now called from the same thread
   from which Main::iteration is called. It is also what Godot now
   considers to be the main thread, because Main::setup is also called
   from there. This makes threading on Android more consistent with
   other platforms, making the code that depends on Thread::get_main_id
   more portable (GDNative has such code).

 - Sizes of GDNative API types have been fixed to work on 32-bit
   platforms.
2017-08-30 18:14:19 +07:00
Hein-Pieter van Braam ec63438231 Remove 10778 related methods from GDNative
After #10778 master didn't build any longer with GDNative. This removes
the methods removed in that PR from the GDNative bindings for Basis
also.
2017-08-30 12:54:59 +02:00
Rémi Verschelde fd7ad7d80a Merge pull request #10750 from Rubonnek/fix-duplicate-script-changed-signal
Renamed 'script_changed' signal in the script editor plugin to 'edited_script_changed'
2017-08-30 12:46:00 +02:00
Rémi Verschelde e59b1212da Merge pull request #10776 from hpvb/fix-10758
Disable -ffast-math for etc2comp
2017-08-30 12:44:16 +02:00
Hein-Pieter van Braam d44414c711 Disable -ffast-math for etc2comp
Apparently -ffast-math generates incorrect code with recent versions of
GCC and Clang. The manual page for GCC warns about this possibility.

In my tests it doesn't actually appear to be measurably slower in this
case, and this is used in a batch process so it seems safe to disable
this.

This fixes #10758 and fixes #10070
2017-08-30 11:51:24 +02:00
Ruslan Mustakov 415f7da025 Fix GDNative API generator after changes to MethodBind 2017-08-30 10:45:10 +07:00
Ruslan Mustakov bbb4ee90ce Add enums in GDNative API generator 2017-08-30 10:38:58 +07:00
Juan Linietsky 9c3bddfac2 Merge pull request #10745 from neikeq/fix-docdata-and-stuff
DocData and virtual method type hints fixes
2017-08-29 20:11:07 -03:00
Ignacio Etcheverry 8bd92a96a4 Makes built-in vararg methods actual vararg methods
- Removes hardcoded parameters from built-in vararg methods and adds METHOD_FLAG_VARARG to them.
- Makes EditorHelp display built-in vararg methods correctly.
2017-08-29 19:40:28 +02:00
Ignacio Etcheverry c16d00591b DocData and type hints fixes
- Makes vararg methods automatically use PROPERTY_USAGE_NIL_IS_VARIANT on return types
- Completely removes the ":type" suffix for method names. Virtual methods must use the MethodInfo constructors that takes Variant::Type or PropertyHint as the first parameter for the return type (with CLASS_INFO as a helper to get the PropertyInfo). Parameters must use PROPERTY_HINT_RESOURCE_TYPE and hint string.
- PROPERTY_USAGE_NIL_IS_VARIANT is no longer needed for parameters, because parameters cannot be void.
- Adds missing PROPERTY_USAGE_NIL_IS_VARIANT to virtual and built-in methods that return Variant.
2017-08-29 19:40:21 +02:00
Wilson E. Alvarez a400a65c8a Renamed 'script_changed' signal in the script editor plugin to 'edited_script_changed' 2017-08-29 10:24:10 -04:00
Juan Linietsky a2027cfa49 -Fixes to how collada generates tangents (use SurfaceTool), closes #9562
-Fix to gridmap cell size (wrong property type)
2017-08-29 08:48:39 -03:00
Juan Linietsky 8fce79aaee -Some fixes to code completion.
-Fix getter in code completion being displayed when it shouldn't
-Clean up preview generation for editors and exposed it as editor plugin
2017-08-28 00:04:24 -03:00
Rémi Verschelde 6ef7783abb Merge pull request #10662 from hoelzl/python3-v3
Make build scripts Python 3 compatible
2017-08-28 00:05:15 +02:00
Juan Linietsky d23f323cde -Moved script run to editor, removed from project
-fixed to code completion
-fix shader crash bug reported by tagcup
2017-08-27 19:04:19 -03:00
Hein-Pieter van Braam 8064fbb174 Fix a crash in gdscript callbacks
This fixes a crash running the 'goltorus' project.
2017-08-27 23:49:13 +02:00
Matthias Hoelzl b6e1e47e3a Make build scripts Python3 compatible
- The Windows, UWP, Android (on Windows) and Linux builds are
  tested with Scons 3.0 alpha using Python 3.
- OSX and iOS should hopefully work but are not tested since
  I don't have a Mac.
- Builds using SCons 2.5 and Python 2 should not be impacted.
2017-08-27 23:05:39 +02:00
Rémi Verschelde 7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Juan Linietsky 37da8155a4 -Largely rewrote gridmap to simplify it
-Got editor working again
-Added a current-floor marker on selection
2017-08-27 16:02:00 -03:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Rémi Verschelde 3acf6857d9 nanosvg: Document in COPYRIGHT.txt and thirdparty README.md 2017-08-27 13:32:23 +02:00
Rémi Verschelde 612099e377 Merge pull request #10591 from Rubonnek/possible-null-ptr-dereference
Added/Fixed null pointer checks
2017-08-27 02:10:56 +02:00
Rémi Verschelde 3ec9e26cb4 Merge pull request #10669 from hpvb/fix-6118
Add several missing Null checks in _notification
2017-08-27 02:07:41 +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
Wilson E. Alvarez 7a07895920 Added/Fixed null pointer checks 2017-08-26 16:58:47 -04:00
Hein-Pieter van Braam 9a1d9a41eb Add several missing Null checks in _notification
This fixes #6118
2017-08-26 22:50:15 +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
Rémi Verschelde d9e94fa0c3 Fix i18n bug in GridMap string
Regression from 6134d87 causing build issue on clang.
2017-08-25 20:55:33 +02:00
Andreas Haas 6134d8741d Editor: Add some more translatable strings. 2017-08-25 18:49:45 +02:00
Rémi Verschelde 490aef9369 Merge pull request #10581 from hpvb/fix-gcc6+
Make cast_to a static member of Object.
2017-08-25 08:37:38 +02:00
Juan Linietsky b1c0e45b03 Implemented, The Amazing Zylann Hack (tm), fixes #10603 2017-08-25 00:34:32 -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
Andreas Haas f61e8695c9
GDScript: More reliable check if loading a template.
Prevents showing some useless parse errors in the console.
2017-08-24 22:08:23 +02:00
Rémi Verschelde 3ea0943f64 Fix mismatched signatures for GDScriptLanguage::complete_code 2017-08-24 12:44:51 +02:00
Juan Linietsky 36e0a72c77 -Code completion for enumerations
-Disabled GDNative and GDNativeScript so build compiles again
2017-08-24 00:06:56 -03:00
Juan Linietsky 3d1c031871 Changed MethodBind API to request information from methods. It's much claner now.
Also changed PropertyInfo to include informatino about class names.
2017-08-23 19:11:11 -03:00
Rémi Verschelde 35e9117521 Merge pull request #10563 from Hinsbart/vs_cancel_select
VisualScriptEditor: Remove Node when canceling PropertySelector.
2017-08-23 08:09:27 +02:00
Rémi Verschelde 1ad68c946e Merge pull request #10542 from karroffel/gdscript-match-index
support enums and nested constants in match statement
2017-08-23 08:05:52 +02:00
Rémi Verschelde bc3c9a3c2a Merge pull request #10555 from Rubonnek/removed-unnecessary-returns-and-breaks
Removed unnecessary returns and break statements

[ci skip]
2017-08-23 00:06:29 +02:00
Andreas Haas 927fb9d793
VisualScriptEditor: Remove Node when canceling PropertySelector. 2017-08-22 21:56:18 +02:00
Pedro J. Estébanez 00c9218b48 Fix crashes in SVG loading
Adding null terminators.
2017-08-22 19:39:13 +02:00
Wilson E. Alvarez baa94a3758 Removed unnecessary returns and break statements 2017-08-22 13:01:57 -04:00
Karroffel 57654d4b95 support enums and nested constants in match statement
The initial version of the pattern matcher in GDScript does not
allow matching on nested identifiers, only one identifiers available
in the current scope.

With the introduction of enums to GDScript that's a huge missing
feature. This commit makes the parser accept indexed constants and
variables to properly support enums.
2017-08-22 17:45:05 +02:00
Juan Linietsky 8ad7139631 readded ability to set loop offset in seconds, closes #9630 2017-08-22 11:47:24 -03:00
Rémi Verschelde df590fc2d3 Merge pull request #10340 from Rubonnek/remove-unnecessary-assignments
Removed unnecessary assignments
2017-08-22 00:58:12 +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 135027a2f6 Merge pull request #10225 from Noshyaar/map
GDScript Built-in: add inverse_lerp & range_lerp
2017-08-22 00:31:46 +02:00
Wilson E. Alvarez 738d2ab969 Removed unnecessary assignments 2017-08-21 15:15:55 -04:00
Ignacio Etcheverry 32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Daniel J. Ramirez 0c18009665 Added missing icon and svgs upscaling 2017-08-20 13:53:09 -05:00
Daniel J. Ramirez da8fecf25e Added support for SVG 2017-08-20 13:53:02 -05: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
Rémi Verschelde 5627047c32 Merge pull request #10455 from groud/control_margin_fixes
Some control fixes and removed other useless lines
2017-08-20 15:24:00 +02:00
Gilles Roudiere 06256cd778 Some control fixes and removed useless lines 2017-08-19 19:10:00 +02:00
Rémi Verschelde ce85179e5d Merge pull request #10446 from bojidar-bg/6583-fix-wait-node
Fix Condition + Wait nodes freezing the game
2017-08-19 18:00:20 +02:00
Emmanuel Leblond 00d552b1cd
[GDnative] Correct godot_string_chars_to_utf8_with_len function name 2017-08-19 17:08:33 +02:00
Bojidar Marinov 4a0b4417a3
Fix #6583, Condition + Wait nodes freezing the game
Make sure that only the first node after VS resume gets resumed
2017-08-19 17:54:32 +03:00
Zher Huei Lee e3e2f06324 Replacement of internal RegEx with PCRE2
The pattern and replacement matching behaviour has been changed purely
due to the nature of switching to a standards-compliant library.

One mistake in the previous behaviour was that named groups didn't have
a number. This has been corrected.

As names are actually just an alias of numbered groups,
RegExMatch::get_name_dict() is now get_names() and is a dict
referring to the group number it represents.

Duplicate names are enabled and the with the first matching instance
used.

Due the lack of a suitable equivalent in PCRE2, RegExMatch::expand() was
removed.
2017-08-19 19:29:14 +08:00
Ignacio Etcheverry 90b8a5b71e Removes editor_hint from SceneTree 2017-08-19 01:29:45 +02:00
Juan Linietsky cbcf40bd31 -Volume sliders, mute, solo and fx bypass are functional, closes #9021
-Fixed tree reselect, makes reselecting an audio bux FX work
2017-08-18 18:21:53 -03:00
Juan Linietsky b20952ebff Update script signals in real-time when script changes. Fixes #8980 2017-08-18 16:44:03 -03:00
Poommetee Ketson d28da86f9f GDScript Built-in: add inverse_lerp & range_lerp 2017-08-18 21:49:03 +07:00
Marcelo Fernandez eab850524e Add closest_power_of_2 func and implement mix_rate/latency on OS X 2017-08-17 19:51:13 -03:00
Rémi Verschelde b1ecaaa22b Merge pull request #10307 from Rubonnek/update-argument-names
Updated function argument names
2017-08-16 17:17:56 +02:00
Rémi Verschelde c1a43a09be Merge pull request #10356 from RandomShaper/fix-msvc-error
Add comment warning about include order
2017-08-16 17:11:59 +02:00
Pedro J. Estébanez ae2d449047 Revive inspector property evaluation
GDScript was restricted to parse only scripts beginning with __res://__ or __user://__ to avoid templates from being parsed. I've made that a bit less inclusive by allowing scripts with an empty path to be parsed too, which doesn't conflict and is needed for this to work.

Also I've removed the `this` variable of the generated script and made the relevant object to be the one the script instance refers to, so you can use `self` instead.

Now, with the shorter 3.0-style syntax, you can write things like: `self.position.x + 10`

Closes #9500.
2017-08-16 03:01:41 +02:00
Pedro J. Estébanez 2a26c5ce62 Comment include order to avoid errors
So as to not revive #10071, as suggested by @akien-mga.
2017-08-15 22:12:57 +02:00
Gilles Roudiere 0d35d4d53b Replace GUI anchor type by a float between 0 and 1 2017-08-13 21:20:13 +02:00
Wilson E. Alvarez 428f03cf06 Updated function argument names 2017-08-12 15:12:49 -04:00