David Rose před 22 roky
rodič
revize
1fee5c727e

+ 12 - 0
panda/src/pgraph/nodePathCollection.cxx

@@ -366,6 +366,18 @@ unstash() {
   }
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: NodePathCollection::detach
+//       Access: Published
+//  Description: Detaches all NodePaths in the collection.
+////////////////////////////////////////////////////////////////////
+void NodePathCollection::
+detach() {
+  for (int i = 0; i < get_num_paths(); i++) {
+    get_path(i).detach_node();
+  }
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: NodePathCollection::output
 //       Access: Published

+ 1 - 0
panda/src/pgraph/nodePathCollection.h

@@ -62,6 +62,7 @@ PUBLISHED:
   void hide();
   void stash();
   void unstash();
+  void detach();
 
   void output(ostream &out) const;
   void write(ostream &out, int indent_level = 0) const;