소스 검색

Merge pull request #49708 from megalobyte/editor_description_fix

Rémi Verschelde 3 년 전
부모
커밋
7b3abf17fd
2개의 변경된 파일4개의 추가작업 그리고 12개의 파일을 삭제
  1. 3 11
      doc/classes/Node.xml
  2. 1 1
      scene/main/node.cpp

+ 3 - 11
doc/classes/Node.xml

@@ -228,11 +228,6 @@
 				If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]).
 			</description>
 		</method>
-		<method name="get_editor_description" qualifiers="const">
-			<return type="String" />
-			<description>
-			</description>
-		</method>
 		<method name="get_groups" qualifiers="const">
 			<return type="Array" />
 			<description>
@@ -618,12 +613,6 @@
 				Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling.
 			</description>
 		</method>
-		<method name="set_editor_description">
-			<return type="void" />
-			<argument index="0" name="editor_description" type="String" />
-			<description>
-			</description>
-		</method>
 		<method name="set_multiplayer_authority">
 			<return type="void" />
 			<argument index="0" name="id" type="int" />
@@ -702,6 +691,9 @@
 		<member name="custom_multiplayer" type="MultiplayerAPI" setter="set_custom_multiplayer" getter="get_custom_multiplayer">
 			The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one.
 		</member>
+		<member name="editor_description" type="String" setter="set_editor_description" getter="get_editor_description" default="&quot;&quot;">
+			Add a custom description to a node.
+		</member>
 		<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
 			The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree).
 		</member>

+ 1 - 1
scene/main/node.cpp

@@ -2889,7 +2889,7 @@ void Node::_bind_methods() {
 	ADD_PROPERTY(PropertyInfo(Variant::INT, "process_priority"), "set_process_priority", "get_process_priority");
 
 	ADD_GROUP("Editor Description", "editor_");
-	ADD_PROPERTY(PropertyInfo(Variant::STRING, "editor_description", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "set_editor_description", "get_editor_description");
+	ADD_PROPERTY(PropertyInfo(Variant::STRING, "editor_description", PROPERTY_HINT_MULTILINE_TEXT), "set_editor_description", "get_editor_description");
 
 	GDVIRTUAL_BIND(_process, "delta");
 	GDVIRTUAL_BIND(_physics_process, "delta");