示例#1
0
 def getRenderInfo(self):
     sga = SceneGraphAnalyzer()
     sga.addNode(self.scene.scene.node())
     
     ls = LineStream()
     sga.write(ls)
     desc = []
     while ls.isTextAvailable():
         desc.append(ls.getLine())
     desc = '\n'.join(desc)
     return desc
    def doAnalyzeScene(self):
        render.analyze()

        ls = LineStream()
        sga = SceneGraphAnalyzer()
        sga.addNode(render.node())
        sga.write(ls)
        text = ""
        while ls.isTextAvailable():
            text += ls.getLine() + "\n"
        self.acceptOnce('analyzedone', self.__handleAnalyzeDone)
        self.analyzeDlg = GlobalDialog(message=text,
                                       style=Ok,
                                       doneEvent='analyzedone',
                                       text_scale=0.05)
        self.analyzeDlg.show()
示例#3
0
def analyze(self):
    """
        Analyzes the geometry below this node and reports the
        number of vertices, triangles, etc.  This is the same
        information reported by the bam-info program.
        """
    from panda3d.core import SceneGraphAnalyzer
    sga = SceneGraphAnalyzer()
    sga.addNode(self.node())
    if sga.getNumLodNodes() == 0:
        print(sga)
    else:
        print("At highest LOD:")
        sga2 = SceneGraphAnalyzer()
        sga2.setLodMode(sga2.LMHighest)
        sga2.addNode(self.node())
        print(sga2)

        print("\nAt lowest LOD:")
        sga2.clear()
        sga2.setLodMode(sga2.LMLowest)
        sga2.addNode(self.node())
        print(sga2)

        print("\nAll nodes:")
        print(sga)
示例#4
0
def analyze(self):
        """
        Analyzes the geometry below this node and reports the
        number of vertices, triangles, etc.  This is the same
        information reported by the bam-info program.
        """
        from panda3d.core import SceneGraphAnalyzer
        sga = SceneGraphAnalyzer()
        sga.addNode(self.node())
        if sga.getNumLodNodes() == 0:
                print(sga)
        else:
                print("At highest LOD:")
                sga2 = SceneGraphAnalyzer()
                sga2.setLodMode(sga2.LMHighest)
                sga2.addNode(self.node())
                print(sga2)

                print("\nAt lowest LOD:")
                sga2.clear()
                sga2.setLodMode(sga2.LMLowest)
                sga2.addNode(self.node())
                print(sga2)

                print("\nAll nodes:")
                print(sga)
def analyze(self):
    from panda3d.core import SceneGraphAnalyzer
    sga = SceneGraphAnalyzer()
    sga.addNode(self.node())
    if sga.getNumLodNodes() == 0:
        print sga
    else:
        print 'At highest LOD:'
        sga2 = SceneGraphAnalyzer()
        sga2.setLodMode(sga2.LMHighest)
        sga2.addNode(self.node())
        print sga2
        print '\nAt lowest LOD:'
        sga2.clear()
        sga2.setLodMode(sga2.LMLowest)
        sga2.addNode(self.node())
        print sga2
        print '\nAll nodes:'
        print sga