godot/core/object
reduz b7c41f9ba1 Add ability to export Node pointers as NodePaths
This PR implements:
* A new hint: PROPERTY_HINT_NODE_TYPE for variant type OBJECT, which can take specific node types as hint string.
* The editor will show it as a node path, but will set it as a pointer to a node from the current scene if you select a path.
* When scene is saved, the node path is saved, then restored as a pointer.

NOTE: This is a proof of concept and this approach will most likely not work. The reason if that, if the node referenced is deleted, then when trying to edit this the node will become invalid.

Potential workarounds: Since this uses the Variant API, it should obtain the pointer from the Variant object ID. Yet, this would either only really work in GDScript or it would need to be implemented with workarounds in every language.
Alternative ways to make this work: Nodes could export an additional property with a node path (like for which_node, it could be which_node_path).
Another alternative: Path editing could happen as a hidden metadata (ignoring the pointer).
2022-06-25 15:50:15 +02:00
..
callable_method_pointer.cpp Clean up Hash Functions 2022-06-20 12:54:19 +02:00
callable_method_pointer.h Add callable_mp_static 2022-05-22 15:36:34 +02:00
class_db.cpp Clean up Hash Functions 2022-06-20 12:54:19 +02:00
class_db.h Make enum/constant binds 64-bit. 2022-06-17 16:36:26 +03:00
make_virtuals.py Fix typos with codespell 2022-03-31 14:07:29 +02:00
message_queue.cpp Replace most uses of Map by HashMap 2022-05-16 10:37:48 +02:00
message_queue.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
method_bind.cpp Clean up Hash Functions 2022-06-20 12:54:19 +02:00
method_bind.h Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
object_id.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
object.cpp Allow autocompletion of "noslider" in export_range 2022-06-19 17:11:49 +02:00
object.h Add ability to export Node pointers as NodePaths 2022-06-25 15:50:15 +02:00
ref_counted.cpp Remove RES and REF typedefs in favor of spelled out Ref<> 2022-05-03 01:43:50 +02:00
ref_counted.h Remove RES and REF typedefs in favor of spelled out Ref<> 2022-05-03 01:43:50 +02:00
script_language_extension.cpp Fix signal completion in GDScript editor 2022-05-12 16:10:48 +03:00
script_language_extension.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
script_language.cpp Add a new HashSet template 2022-05-20 22:40:38 +02:00
script_language.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
SCsub Implement native extension system 2021-06-25 17:32:45 -03:00
undo_redo.cpp Make vararg method bind no return and return 2022-03-30 11:43:12 +02:00
undo_redo.h Make vararg method bind no return and return 2022-03-30 11:43:12 +02:00