summaryrefslogtreecommitdiff
path: root/core/object.cpp
AgeCommit message (Collapse)Author
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-08-25Merge pull request #16927 from neikeq/rework-refcount-notifyJuan Linietsky
Notify instance binding data api of refcount increment/decrement
2018-08-24Add print_verbose to print to stdout only in verbose modeRémi Verschelde
Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
2018-08-23Notify instance binding data api of refcount increment/decrementIgnacio Etcheverry
2018-08-20Crash fixes for material and animtreeJuan Linietsky
2018-08-20Massive rewrite to AnimationTree. Many APIs changed in order to:Juan Linietsky
-Reuse resources -Expose properties in AnimationTree
2018-08-14Merge pull request #20583 from neikeq/issue-15371Rémi Verschelde
Fix case where exported properties value is lost
2018-07-29Ensure one shot signals are not disconnected while edited, closes #7776Juan Linietsky
2018-07-29Fix case where exported properties value is lostIgnacio Etcheverry
Fixes exported property modified values lost when creating a placeholder script instance with a failed script compilation - Object set/get will call PlaceHolderScriptInstance's new fallback set/get methods as a last resort. This way, placeholder script instances can keep the values for storage or until the script is compiled successfuly. - Script::can_instance() will only return true if a real script instance can be created. Otherwise, in the case of placeholder script instances, it will return false. - Object::set_script(script) is now in charge of requesting the creation of placeholder script instances. It's no longer Script::instance_create(owner)'s duty. - PlaceHolderScriptInstance has a new method set_build_failed(bool) to determine whether it should call into its script methods or not. - Fixed a few problems during reloading of C# scripts.
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-18Several improvements to editor inspector usability and styleJuan Linietsky
2018-05-29Fix return type of _get() virtual methodGeorge Marques
2018-05-07Add is_instance_valid() method to GDScript, ending more than a decade of pain.Juan Linietsky
2018-01-12Bind many more properties to scriptsBojidar Marinov
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-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-25Made Vector::ptrw explicit for writing, compiler was sometimes using the ↵Juan Linietsky
wrong function, leading to unnecesary copy on writes and reduced performance.
2017-11-24Fix a crash in get_static_property_type_indexedBojidar Marinov
Fixes #13243
2017-11-21Allow for getting/setting indexed properties of objects using get/set_indexedBojidar Marinov
Performance is around the same as using pure set() through GDScript.
2017-09-21Fixed a bunch of typos, including an error code.Ross Hadden
2017-09-14Moved class_name and return_val to initializer listWilson E. Alvarez
2017-08-29DocData and type hints fixesIgnacio Etcheverry
- 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-27Dead code tells no talesRémi Verschelde
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-27Fix double single quotes in `connect` error printPoommetee Ketson
2017-08-24Convert Object::cast_to() to the static versionHein-Pieter van Braam
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-23Changed MethodBind API to request information from methods. It's much claner ↵Juan Linietsky
now. Also changed PropertyInfo to include informatino about class names.
2017-08-20ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry
2017-08-18Rename localization method to `tr` againRémi Verschelde
Partial revert of #10380 based on contributor ~~bullying~~ feedback.
2017-08-17Rename `XL_MESSAGE` aka `tr` to `localize`Rémi Verschelde
Also renames `set_message_translation` to `set_message_localization` for consistency.
2017-08-11Merge pull request #9987 from Rubonnek/move-members-to-initilization-listRémi Verschelde
Moved member variables from constructor to initialization list
2017-08-10Fixes method definitions with extra number of argumentsIgnacio Etcheverry
2017-08-10Removes type information from vararg method bindsIgnacio Etcheverry
2017-08-10Removes type information from method bindsIgnacio Etcheverry
2017-08-10Adds missing type information to virtual method bindsIgnacio Etcheverry
2017-08-08Moved member variables from constructor to initialization listWilson E. Alvarez
2017-08-07Makes all Godot API's methods Lower CaseIndah Sylvia
2017-08-06Fix is_class check typo in ObjectDB::cleanupRuslan Mustakov
2017-08-05Made bool constructor explicit in Variant to avoid bugs, fixes #7843Juan Linietsky
2017-07-22function to add script and instance at once, as needed by neikeqJuan Linietsky
2017-07-18_get return type fixRamesh Ravone
2017-07-16Added a simpler/faster way to bind script languages instance wrappers to GodotJuan Linietsky
2017-07-16Bindings: Fix Object::get_meta return type.Andreas Haas
The method was shown as void in the docs.
2017-06-27Merge pull request #9195 from kubecz3k/obj-incoming-connectionsRémi Verschelde
Ability to get a list of signals that are targeting given object
2017-06-25-Added folding to property editor, persistent on objects it editsJuan Linietsky
-Some changes to tree to support this properly
2017-06-15Ability to get a list of signals that are targeting objectJakub Grzesik
2017-06-09-Restored multithread capability to VisualServerJuan Linietsky
-Restored resource previews!
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-13fixed ClassDB inconsistenciesKarroffel
fixes #7960