mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-04 07:31:16 +00:00 
			
		
		
		
	Merge pull request #68566 from Mickeon/node-print-orphans-static
Make `Node.print_orphan_nodes()` static
This commit is contained in:
		
						commit
						d7e3fce995
					
				
					 3 changed files with 2 additions and 7 deletions
				
			
		| 
						 | 
					@ -535,7 +535,7 @@
 | 
				
			||||||
				[b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]).
 | 
									[b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]).
 | 
				
			||||||
			</description>
 | 
								</description>
 | 
				
			||||||
		</method>
 | 
							</method>
 | 
				
			||||||
		<method name="print_orphan_nodes">
 | 
							<method name="print_orphan_nodes" qualifiers="static">
 | 
				
			||||||
			<return type="void" />
 | 
								<return type="void" />
 | 
				
			||||||
			<description>
 | 
								<description>
 | 
				
			||||||
				Prints all orphan nodes (nodes outside the [SceneTree]). Used for debugging.
 | 
									Prints all orphan nodes (nodes outside the [SceneTree]). Used for debugging.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2570,10 +2570,6 @@ static void _Node_debug_sn(Object *p_obj) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif // DEBUG_ENABLED
 | 
					#endif // DEBUG_ENABLED
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void Node::_print_orphan_nodes() {
 | 
					 | 
				
			||||||
	print_orphan_nodes();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void Node::print_orphan_nodes() {
 | 
					void Node::print_orphan_nodes() {
 | 
				
			||||||
#ifdef DEBUG_ENABLED
 | 
					#ifdef DEBUG_ENABLED
 | 
				
			||||||
	ObjectDB::debug_objects(_Node_debug_sn);
 | 
						ObjectDB::debug_objects(_Node_debug_sn);
 | 
				
			||||||
| 
						 | 
					@ -2745,6 +2741,7 @@ void Node::_bind_methods() {
 | 
				
			||||||
	GLOBAL_DEF("editor/node_naming/name_casing", NAME_CASING_PASCAL_CASE);
 | 
						GLOBAL_DEF("editor/node_naming/name_casing", NAME_CASING_PASCAL_CASE);
 | 
				
			||||||
	ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_casing", PropertyInfo(Variant::INT, "editor/node_naming/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"));
 | 
						ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_casing", PropertyInfo(Variant::INT, "editor/node_naming/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ClassDB::bind_static_method("Node", D_METHOD("print_orphan_nodes"), &Node::print_orphan_nodes);
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("add_sibling", "sibling", "force_readable_name"), &Node::add_sibling, DEFVAL(false));
 | 
						ClassDB::bind_method(D_METHOD("add_sibling", "sibling", "force_readable_name"), &Node::add_sibling, DEFVAL(false));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("set_name", "name"), &Node::set_name);
 | 
						ClassDB::bind_method(D_METHOD("set_name", "name"), &Node::set_name);
 | 
				
			||||||
| 
						 | 
					@ -2802,7 +2799,6 @@ void Node::_bind_methods() {
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("set_process_mode", "mode"), &Node::set_process_mode);
 | 
						ClassDB::bind_method(D_METHOD("set_process_mode", "mode"), &Node::set_process_mode);
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("get_process_mode"), &Node::get_process_mode);
 | 
						ClassDB::bind_method(D_METHOD("get_process_mode"), &Node::get_process_mode);
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("can_process"), &Node::can_process);
 | 
						ClassDB::bind_method(D_METHOD("can_process"), &Node::can_process);
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("print_orphan_nodes"), &Node::_print_orphan_nodes);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("set_display_folded", "fold"), &Node::set_display_folded);
 | 
						ClassDB::bind_method(D_METHOD("set_display_folded", "fold"), &Node::set_display_folded);
 | 
				
			||||||
	ClassDB::bind_method(D_METHOD("is_displayed_folded"), &Node::is_displayed_folded);
 | 
						ClassDB::bind_method(D_METHOD("is_displayed_folded"), &Node::is_displayed_folded);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -173,7 +173,6 @@ private:
 | 
				
			||||||
	void _propagate_ready();
 | 
						void _propagate_ready();
 | 
				
			||||||
	void _propagate_exit_tree();
 | 
						void _propagate_exit_tree();
 | 
				
			||||||
	void _propagate_after_exit_tree();
 | 
						void _propagate_after_exit_tree();
 | 
				
			||||||
	void _print_orphan_nodes();
 | 
					 | 
				
			||||||
	void _propagate_process_owner(Node *p_owner, int p_pause_notification, int p_enabled_notification);
 | 
						void _propagate_process_owner(Node *p_owner, int p_pause_notification, int p_enabled_notification);
 | 
				
			||||||
	void _propagate_groups_dirty();
 | 
						void _propagate_groups_dirty();
 | 
				
			||||||
	Array _get_node_and_resource(const NodePath &p_path);
 | 
						Array _get_node_and_resource(const NodePath &p_path);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue