-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Overhaul Node documentation #68560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul Node documentation #68560
Conversation
d3816d5 to
c49af3c
Compare
3382c5b to
a0f2513
Compare
|
Ready for review now! The remaining "TODO"'s aren't particularly pressing. |
a23646c to
ddcea02
Compare
bb6e292 to
785c61c
Compare
785c61c to
1506135
Compare
|
Rebased (once more). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, this one is on its 1-year anniversary!
I think it can be nitpicked to death endlessly just due to the large surface of the changes (and how much more could always be changed) and how core and important Node is.
I've read over it twice now, and overall it seems a great improvement over the current state. After fixing the single typo I found above and rebasing once more, I say we merge it as is, and do any further improvements iteratively.
Great work @Mickeon :) If I may, I suggest splitting changes up in the future where they touch core parts and become this large, so its easier to review and merge bite-size. Kinda hard to do for these kinda overhauls that touch everything for a doc pages, I know.
1c730a7 to
0e49f9e
Compare
0e49f9e to
b5ca06c
Compare
|
Rebased for hopefully one last time, omg. To possibly make this easier to look at, the conflicting descriptions before the rebase are the following:
|
|
Just FYI we will try to merge it as soon as we can in 4.3. It may require one more rebase if there are some conflicting changes done in the meantime, but hopefully not. |
|
Oh great heavens |
|
Thanks for your work, and your patience :) |
|
Cherry-picked for 4.2.2. |
Here we go again
Aims to close godotengine/godot-docs#2975.
Closes #72486.
Closes #76593.
Closes #82836.
Continuation of #67072, #67100, #67208, #67718, especially #67880...
Note that this PR barely touches the leading description and the virtual method's descriptions. This is intentional. These are so long, verbose and tricky, that they are worth addressing them in another PR, following this up.
Here a big list of changes. Someone reading this may take it as a future point of reference. Not just that, but some information deemed important by the maintainers could have been lost during the rewrite. Criticism is encouraged.
General
[b]Warning:[/b]over[b]Note:[/b]where appropriate.include_internalparameter's note to "(seeadd_child'sinternalparameter)".internalto the end reduces repetition.Methods
add_groupis_in_groupremove_from_groupget_groupsget_groups's example.can_processduplicatefind_childfind_childrenfind_parentget_childget_node"Fetching absolute paths only works when [...]"
I thought we were fetching nodes here?
print_tree_pretty's output.get_node_or_null"[...] but does not log an error [...]"
Log? What's a log?
get_node_and_resourceget_pathget_path_to"Both nodes must be in the same scene"
Ehhh... No. Not the "scene", the SceneTree. Let's not muddy the water.
get_physics_process_delta_timeget_process_delta_time_physics_processand_process, respectively._physics_processand_processand notification constants.get_scene_instance_load_placeholder"[...] if this is an instance load placeholder [...]"
Who's "this"?
get_treeget_viewportget_viewportis_displayed_foldedset_display_foldedis_editable_instanceset_editable_instancedisplay_foldedandeditable_instancein release builds #68612print_treeprint_tree_pretty"Prints the tree to stdout"
The heck is a "stdout"? Oh, and the tree?
print_treeexample output.remove_childremove_from_group"Removes a node from a group"
Which node and which group?
add_to_groupStrip ERR_FAIL fromNode.remove_from_group()#68564#issue-1446486267).replace_by"Replaces a node"
Which one?
"Subscriptions that pass through this node will be lost."
What?? First, what does "subscription" mean? Second, if it refers to signals, this statement is misleading anyway.
request_readyrpcrpc_configrpc_idqueue_free"Queues a node"
Which one?
set_process_inputset_process_internal_ready()will be ignored.". This was not just wrong, but also too much information.set_scene_instance_load_placeholderupdate_configuration_warningsPROPERTIES
editor_descriptionnameownerThis entire owner "mechanic" should be (as it probably is) explained more into detail in PackedScene.
process_modecan_process.process_priorityscene_file_pathunique_name_in_owner"from any node within that scene"
I'm aware that this property is mostly useful in the editor, but saying that is outstandingly misleading. The feature works so long as they share
owner.SIGNALS
child_entered_treechild_exited_tree"either because it entered on its own or because this node entered with it."
Who's "it", this node? That node? This node... it? These descriptions were a muddy mouthful.
renamedCONSTANTS
NOTIFICATION_PROCESSNOTIFICATION_PHYSICS_PROCESSNOTIFICATION_INTERNAL_PHYSICS_PROCESSNOTIFICATION_INTERNAL_PROCESS"Notification received every frame when the physics..."
Which "frame" are we talking about here?
NOTIFICATION_POST_ENTER_TREE"Notification received when the node is ready"
No. It is received right before
_ready, but the method may or may not be called.DUPLICATE_SIGNALS"Duplicate the node's signals."
Not the signals. The incoming signal connections to this node. In fact, shockingly, signals created with
add_user_signal()aren't even copied.DUPLICATE_USE_INSTANCING"An instance stays linked to the original so when the original changes, the instance changes too."
The original what? Anyway, not correct at all. Completely wrong. It's just through
PackedScene.instantiate().I recommend taking a look at the documentation by building from this PR, to read the documentation from the Editor itself. Feedback is very, very welcome.