summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-06-16 10:22:26 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-06-16 10:22:26 -0300
commit703004f830f39adcde9b9565f1aa49d1b10e8d27 (patch)
treeb8fd669af9dee07177ff658f0ebca83aff836598 /scene/main
parent64e83bfd1404ea593f0c79b478d196a3fcde42a8 (diff)
More 3D Work
-=-=-=-=-=- -ESM Shadow Mapping for softer and less glitchy shadows -HDR Pipeline (convert to Linear on texture import, convert to SRGB at the end) -Fix to xml parse bug
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/node.cpp13
-rw-r--r--scene/main/node.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index d4f043c538..042666988a 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1078,6 +1078,18 @@ void Node::remove_from_group(const StringName& p_identifier) {
}
+Array Node::_get_groups() const {
+
+ Array groups;
+ List<GroupInfo> gi;
+ get_groups(&gi);
+ for (List<GroupInfo>::Element *E=gi.front();E;E=E->next()) {
+ groups.push_back(E->get().name);
+ }
+
+ return groups;
+}
+
void Node::get_groups(List<GroupInfo> *p_groups) const {
const StringName *K=NULL;
@@ -1712,6 +1724,7 @@ void Node::_bind_methods() {
ObjectTypeDB::bind_method(_MD("remove_from_group","group"),&Node::remove_from_group);
ObjectTypeDB::bind_method(_MD("is_in_group","group"),&Node::is_in_group);
ObjectTypeDB::bind_method(_MD("move_child","child_node:Node","to_pos"),&Node::move_child);
+ ObjectTypeDB::bind_method(_MD("get_groups"),&Node::_get_groups);
ObjectTypeDB::bind_method(_MD("raise"),&Node::raise);
ObjectTypeDB::bind_method(_MD("set_owner","owner:Node"),&Node::set_owner);
ObjectTypeDB::bind_method(_MD("get_owner:Node"),&Node::get_owner);
diff --git a/scene/main/node.h b/scene/main/node.h
index b8981d3307..32c5d8ef38 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -125,6 +125,7 @@ private:
void _duplicate_and_reown(Node* p_new_parent, const Map<Node*,Node*>& p_reown_map) const;
Array _get_children() const;
+ Array _get_groups() const;
friend class SceneMainLoop;