summaryrefslogtreecommitdiff
path: root/modules/gdnative/nativescript/nativescript.cpp
AgeCommit message (Collapse)Author
2019-05-20Merge pull request #27886 from LeonardMeagher2/obj_to_stringRémi Verschelde
Allow overriding how scripted objects are converted to strings
2019-05-18NULL global_tag for non exposed classesRameshRavone
2019-05-15Fix indexing failure in NativeScriptLanguage::unregister_binding_functions.Frank Secilia
binding_functions.size() and an instance's binding_data.size() can get out of sync. They sync up when an instance's bindings are requested. When binding functions are registered after creating an instance's bindings, the instance's bindings are out of sync until requested again. If they're never requested, they're never synced. unregister_binding_functions indexes into binding_data, but only checks that its safe to index into binding_functions. When they're out of sync, indexing fails. This revision checks that it's safe to index into binding_data.
2019-05-03Allow overriding how scripted objects are converted to stringsLeonard Meagher
solves #26796 - ADD `String to_string()` method to Object which can be overriden by `String _to_string()` in scripts - ADD `String to_string(r_valid)` method to ScriptInstance to allow langauges to control how scripted objects are converted to strings - IMPLEMENT to_string for GDScriptInstance, VisualScriptInstance, and NativeScriptInstance - ADD Documentation about `Object.to_string` and `Object._to_string` - Changed `Variant::operator String` to use `obj->to_string()`
2019-03-22[GDNative] fix NativeScript leak in editorthomas.herzog
2019-03-22[GDNative] remove spam at editor unfocus when using NativeScriptthomas.herzog
2019-03-09[GDNative] fix crash at shutdown when using singleton libraries and NativeScriptkarroffel
When a singleton library was exposing NativeScript functionality, the NativeScriptLanguage would attempt to terminate the library at shutdown. Since the GDNative module itself handles singleton libraries, it closes all singleton libraries at shutdown as well. This double free could cause a crash, since the library referenced would no longer be alive.
2019-02-26Fix "No loader found for resource: res://" spam when NativeScript ↵Eric Rybicki
script_class_name is not empty. fixes #26275
2019-02-12Scene: Ensure classes match their header filenameRémi Verschelde
Also drop some unused files. Renamed: - `scene/2d/navigation2d.h` -> `navigation_2d.h` - `scene/2d/screen_button.h` -> `touch_screen_button.h` - `scene/3d/scenario_fx.h` -> `world_environment.h` - `scene/audio/audio_player.h` -> `audio_stream_player.h` - `scene/resources/bit_mask.h` -> `bit_map.h` - `scene/resources/color_ramp.h` -> `gradient.h` - `scene/resources/shape_line_2d.h` -> `line_shape_2d.h` - `scene/resources/scene_format_text.h` -> `resource_format_text.h` - `scene/resources/sky_box.h` -> `sky.h` Dropped: - `scene/resources/bounds.h`
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-27Allow signal connecting even if script is invalid (only when compiled with ↵Juan Linietsky
tools), fixes #17070
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-10-22Fixes crash when loading *.escn resources with gdnative #20141Maarten Heremans
The issue is that ResourceFormatLoaderText is a singleton. It was created in a faulty way in ResourceFormatLoaderNativeScript::load It was created on the stack, which caused the static singleton pointer to be overwritten. This causes then segmentation faults if the singleton is used later on. IMO singleton creation needs to made safer to avoid other similar issues in the future.
2018-10-04Fix warnings about non-static data member initializers in nativescriptRémi Verschelde
Fixes the following GCC/Clang warnings: ``` modules/gdnative/nativescript/nativescript.h:280:37: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 modules/gdnative/nativescript/nativescript.h:281:37: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 modules/gdnative/nativescript/nativescript.h:283:42: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 modules/gdnative/nativescript/nativescript.h:285:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 modules/gdnative/nativescript/nativescript.h:287:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 modules/gdnative/nativescript/nativescript.h:290:45: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 modules/gdnative/nativescript/nativescript.h:291:44: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 ```
2018-09-15Clearly deprecate sync too in favor of remotesync.Fabio Alessandrelli
NOTE: This changes the RPC_MODE_* enum values. Games should be re-exported. GDNative rebuilt.
2018-09-15Rename slave keyword to puppetFabio Alessandrelli
The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-04Fix invalid deref in NativeScript script classesWill Nations
2018-08-30[NativeScript] implement refcount instance binding funcsThomas Herzog
2018-08-22Implemented profiling functions for NativeScriptMarcelo Fernandez
2018-08-15Add NativeScript support for script classes.willnationsdev
2018-08-10Added system for GDScript warningsGeorge Marques
- Count and panel per script. - Ability to disable warnings per script using special comments. - Ability to disable warnings globally using Project Settings. - Option to treat enabled warnings as errors.
2018-07-27Fixed nativescript getter and setter logicBastiaan Olij
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
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-25Fix possible crash at NativeScript::get_base_scriptMarcelo Fernandez
2018-07-20Add editor highlight for type-safe linesGeorge Marques
The line number is hightlighted to indicate that the line contains only type-safe code.
2018-07-02Add a new notification to detect crashes on native scriptsMarcelo Fernandez
2018-05-29New sync keywords in GDScript, NativeScript, MonoFabio Alessandrelli
2018-05-29Refactor RPCMode enum and checksFabio Alessandrelli
2018-05-29Revert "RPCMode refactor, more sync modes"Max Hilbrunner
2018-05-26New sync keywords in GDScript, NativeScript, MonoFabio Alessandrelli
2018-05-26Refactor RPCMode enum and checksFabio Alessandrelli
2018-04-11Fix NativeScript property listsheepandshepherd
2018-04-05[NativeScript] added global type tag systemkarroffel
2018-03-31[GDNative] fixed issue with library unloading orderkarroffel
2018-03-02NativeScript: Fix initialization in wrong scopeRémi Verschelde
Regression from d702d7b335c0c9305e75131770c0ea739b70d813 which broke javascript build.
2018-02-28Fix various valgrind reported uninitialized variable usesHein-Pieter van Braam
2018-02-09add initial NativeScript 1.1 extensionkarroffel
This commit adds new functionality to NativeScript, namely: - ability to set and get documentation for classes, methods, signals and properties - ability to set names and type information to method arguments - ability to set and get type tags for nativescripts - ability to register instance binding data management functions - ability to use instance binding data
2018-01-18[GDNative] fix NativeScript false negative errorkarroffel
2018-01-18[GDNative] fix #15723karroffel
2018-01-14[GDNative] fix two crashes with NativeScriptkarroffel
2018-01-14[GDNative] fix editor crash with NativeScriptkarroffel
2018-01-06[GDNative] fix reloading of non-reloadable librarieskarroffel
2018-01-06[GDNative] added reload propertykarroffel
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
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-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-11-03[GDNative] removed anchorsKarroffel
2017-11-03[GDNative] use feature tags, added load once optionKarroffel
2017-10-25Removes Script::get_node_type()Jerome67000
used before GDScript, with squirrel apparently