Explorar o código

*** empty log message ***

Mark Mine %!s(int64=25) %!d(string=hai) anos
pai
achega
c949ed98e4
Modificáronse 1 ficheiros con 19 adicións e 0 borrados
  1. 19 0
      direct/src/extensions/Node-extensions.py

+ 19 - 0
direct/src/extensions/Node-extensions.py

@@ -0,0 +1,19 @@
+
+    """
+    Node-extensions module: contains methods to extend functionality
+    of the Node class
+    """
+
+    def isHidden(self):
+        """Determine if a node is hidden.  Just pick the first parent,
+        since this is an ambiguous question for instanced nodes"""
+        from PandaModules import *
+        rrClass = RenderRelation.getClassType()
+        if self.getNumParents(rrClass) > 0:
+            arc = self.getParent(rrClass, 0)
+            if arc.hasTransition(PruneTransition.getClassType()):
+                return 1
+            else:
+                return arc.getParent().isHidden()
+        else:
+            return 0