mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
ls and reverseLs
This commit is contained in:
parent
1f96f60e2b
commit
47fd8335df
@ -25,8 +25,7 @@
|
||||
#pragma warning (disable : 4231)
|
||||
#endif
|
||||
|
||||
#include <dtoolbase.h>
|
||||
|
||||
#include "dtoolbase.h"
|
||||
#include "notifyCategoryProxy.h"
|
||||
|
||||
NotifyCategoryDecl(dconfig, EXPCL_DTOOLCONFIG, EXPTP_DTOOLCONFIG);
|
||||
|
@ -373,6 +373,33 @@ ls(ostream &out, int indent_level) const {
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodePath::reverse_ls
|
||||
// Access: Published
|
||||
// Description: Lists the hierarchy at and above the referenced node.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void NodePath::
|
||||
reverse_ls() const {
|
||||
reverse_ls(nout);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodePath::reverse_ls
|
||||
// Access: Published
|
||||
// Description: Lists the hierarchy at and above the referenced node.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int NodePath::
|
||||
reverse_ls(ostream &out, int indent_level) const {
|
||||
if (is_empty()) {
|
||||
out << "(empty)\n";
|
||||
return 0;
|
||||
} else if (has_parent()) {
|
||||
indent_level = get_parent().reverse_ls(out, indent_level);
|
||||
}
|
||||
node()->write(out, indent_level);
|
||||
return indent_level + 2;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodePath::get_state
|
||||
// Access: Published
|
||||
|
@ -216,6 +216,8 @@ PUBLISHED:
|
||||
|
||||
INLINE void ls() const;
|
||||
INLINE void ls(ostream &out, int indent_level = 0) const;
|
||||
INLINE void reverse_ls() const;
|
||||
INLINE int reverse_ls(ostream &out, int indent_level = 0) const;
|
||||
|
||||
|
||||
// Aggregate transform and state information.
|
||||
|
Loading…
x
Reference in New Issue
Block a user