]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/scenelib.h
Merge commit 'a8f1237884e3741541e891724fbae07f8ff7d3b8' into master-merge
[xonotic/netradiant.git] / libs / scenelib.h
index e1c05d464d8ba5ee096c55f6f08c2a122db47e9e..d15ce8021bdd483c22d84a4dacbda5ba1852e9db 100644 (file)
@@ -740,6 +740,10 @@ bool parentSelected() const {
        }
        return m_parentSelected;
 }
+Instance* parent() const
+{
+       return m_parent;
+}
 };
 }
 
@@ -763,7 +767,14 @@ public:
 InstanceWalker( const Functor& functor ) : m_functor( functor ){
 }
 bool pre( const scene::Path& path, scene::Instance& instance ) const {
-       m_functor( instance );
+       //m_functor( instance );
+       //return true;
+       if ( path.top().get().visible() ) {
+               m_functor( instance );
+       }
+       else{
+               return false;
+       }
        return true;
 }
 };