summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r--scene/main/node.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 11b400d4a9..bea6e75aef 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2085,6 +2085,15 @@ bool Node::is_owned_by_parent() const {
return data.parent_owned;
}
+void Node::set_display_folded(bool p_folded) {
+ data.display_folded=p_folded;
+}
+
+bool Node::is_displayed_folded() const {
+
+ return data.display_folded;
+}
+
void Node::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_add_child_below_node","node:Node","child_node:Node","legible_unique_name"),&Node::add_child_below_node,DEFVAL(false));
@@ -2140,6 +2149,8 @@ void Node::_bind_methods() {
ObjectTypeDB::bind_method(_MD("can_process"),&Node::can_process);
ObjectTypeDB::bind_method(_MD("print_stray_nodes"),&Node::_print_stray_nodes);
ObjectTypeDB::bind_method(_MD("get_position_in_parent"),&Node::get_position_in_parent);
+ ObjectTypeDB::bind_method(_MD("set_display_folded","fold"),&Node::set_display_folded);
+ ObjectTypeDB::bind_method(_MD("is_displayed_folded"),&Node::is_displayed_folded);
ObjectTypeDB::bind_method(_MD("get_tree:SceneTree"),&Node::get_tree);
@@ -2194,6 +2205,7 @@ void Node::_bind_methods() {
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/input" ), _SCS("set_process_input"),_SCS("is_processing_input" ) );
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/unhandled_input" ), _SCS("set_process_unhandled_input"),_SCS("is_processing_unhandled_input" ) );
ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "process/pause_mode",PROPERTY_HINT_ENUM,"Inherit,Stop,Process" ), _SCS("set_pause_mode"),_SCS("get_pause_mode" ) );
+ ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "editor/display_folded",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR ), _SCS("set_display_folded"),_SCS("is_displayed_folded" ) );
BIND_VMETHOD( MethodInfo("_process",PropertyInfo(Variant::REAL,"delta")) );
BIND_VMETHOD( MethodInfo("_fixed_process",PropertyInfo(Variant::REAL,"delta")) );
@@ -2231,6 +2243,7 @@ Node::Node() {
data.in_constructor=true;
data.viewport=NULL;
data.use_placeholder=false;
+ data.display_folded=false;
}
Node::~Node() {
@@ -2240,6 +2253,7 @@ Node::~Node() {
data.owned.clear();
data.children.clear();
+
ERR_FAIL_COND(data.parent);
ERR_FAIL_COND(data.children.size());