godot/scene
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
..
2d Fix editor-only visibility for lights 2022-06-23 08:19:18 +02:00
3d Fix editor-only visibility for lights 2022-06-23 08:19:18 +02:00
animation Merge pull request #61885 from TokageItLab/fix-method-seek 2022-06-23 10:07:45 +02:00
audio Use suffixes for units in nodes and resources 2022-05-19 14:34:27 -05:00
debugger Add a new HashSet template 2022-05-20 22:40:38 +02:00
gui Improve TileSet editor and add more suffixes 2022-06-20 15:28:19 -05:00
main Fix editor-only visibility for lights 2022-06-23 08:19:18 +02:00
multiplayer Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
resources Add ability to export Node pointers as NodePaths 2022-06-25 15:50:15 +02:00
property_utils.cpp Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
property_utils.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
register_scene_types.cpp Add dedicated macros for property name extraction 2022-05-19 14:08:47 +08:00
register_scene_types.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
scene_string_names.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
scene_string_names.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
SCsub [Net] New replication interface, spawner and synchronizer nodes. 2022-02-04 14:56:30 +01:00