Bladeren bron

Rename NOTIFICATION_INSTANCED to NOTIFICATION_SCENE_INSTANTIATED

VolTer 3 jaren geleden
bovenliggende
commit
2599710793
5 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 2 2
      doc/classes/Node.xml
  2. 1 1
      doc/classes/PackedScene.xml
  3. 1 1
      scene/main/node.cpp
  4. 1 1
      scene/main/node.h
  5. 1 1
      scene/resources/packed_scene.cpp

+ 2 - 2
doc/classes/Node.xml

@@ -856,8 +856,8 @@
 		<constant name="NOTIFICATION_UNPARENTED" value="19">
 		<constant name="NOTIFICATION_UNPARENTED" value="19">
 			Notification received when a node is unparented (parent removed it from the list of children).
 			Notification received when a node is unparented (parent removed it from the list of children).
 		</constant>
 		</constant>
-		<constant name="NOTIFICATION_INSTANCED" value="20">
-			Notification received when the node is instantiated.
+		<constant name="NOTIFICATION_SCENE_INSTANTIATED" value="20">
+			Notification received by scene owner when its scene is instantiated.
 		</constant>
 		</constant>
 		<constant name="NOTIFICATION_DRAG_BEGIN" value="21">
 		<constant name="NOTIFICATION_DRAG_BEGIN" value="21">
 			Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.
 			Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.

+ 1 - 1
doc/classes/PackedScene.xml

@@ -92,7 +92,7 @@
 			<return type="Node" />
 			<return type="Node" />
 			<argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0" />
 			<argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0" />
 			<description>
 			<description>
-				Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_INSTANCED] notification on the root node.
+				Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_SCENE_INSTANTIATED] notification on the root node.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="pack">
 		<method name="pack">

+ 1 - 1
scene/main/node.cpp

@@ -2937,7 +2937,7 @@ void Node::_bind_methods() {
 	BIND_CONSTANT(NOTIFICATION_PROCESS);
 	BIND_CONSTANT(NOTIFICATION_PROCESS);
 	BIND_CONSTANT(NOTIFICATION_PARENTED);
 	BIND_CONSTANT(NOTIFICATION_PARENTED);
 	BIND_CONSTANT(NOTIFICATION_UNPARENTED);
 	BIND_CONSTANT(NOTIFICATION_UNPARENTED);
-	BIND_CONSTANT(NOTIFICATION_INSTANCED);
+	BIND_CONSTANT(NOTIFICATION_SCENE_INSTANTIATED);
 	BIND_CONSTANT(NOTIFICATION_DRAG_BEGIN);
 	BIND_CONSTANT(NOTIFICATION_DRAG_BEGIN);
 	BIND_CONSTANT(NOTIFICATION_DRAG_END);
 	BIND_CONSTANT(NOTIFICATION_DRAG_END);
 	BIND_CONSTANT(NOTIFICATION_PATH_RENAMED);
 	BIND_CONSTANT(NOTIFICATION_PATH_RENAMED);

+ 1 - 1
scene/main/node.h

@@ -259,7 +259,7 @@ public:
 		NOTIFICATION_PROCESS = 17,
 		NOTIFICATION_PROCESS = 17,
 		NOTIFICATION_PARENTED = 18,
 		NOTIFICATION_PARENTED = 18,
 		NOTIFICATION_UNPARENTED = 19,
 		NOTIFICATION_UNPARENTED = 19,
-		NOTIFICATION_INSTANCED = 20,
+		NOTIFICATION_SCENE_INSTANTIATED = 20,
 		NOTIFICATION_DRAG_BEGIN = 21,
 		NOTIFICATION_DRAG_BEGIN = 21,
 		NOTIFICATION_DRAG_END = 22,
 		NOTIFICATION_DRAG_END = 22,
 		NOTIFICATION_PATH_RENAMED = 23,
 		NOTIFICATION_PATH_RENAMED = 23,

+ 1 - 1
scene/resources/packed_scene.cpp

@@ -1742,7 +1742,7 @@ Node *PackedScene::instantiate(GenEditState p_edit_state) const {
 		s->set_scene_file_path(get_path());
 		s->set_scene_file_path(get_path());
 	}
 	}
 
 
-	s->notification(Node::NOTIFICATION_INSTANCED);
+	s->notification(Node::NOTIFICATION_SCENE_INSTANTIATED);
 
 
 	return s;
 	return s;
 }
 }