Exemple #1
0
    def addAllObjects(self):
        drawObject = self.getDrawObject("COLLECTIONS")
        if not drawObject:
            return

        drawObject.getCollectionsInfo()
        for coll in drawObject.collectionInfos:

            # If the icon exists, don't re-add it
            existing = False
            for existingCollection in drawObject.children():
                if coll.id == existingCollection.collectionInfo.id:
                    existing = True
                    continue
            if existing:
                continue

            actor = vtk.vtkCollections()
            obj = CollectionInfoObject(coll, actor)
            om.addToObjectModel(obj, drawObject)
            obj.addToView(self.view)
Exemple #2
0
 def addDrawObject(self, name, msgBytes):
     actor = vtk.vtkCollections()
     obj = CollectionsObject(name, actor)
     om.addToObjectModel(obj, om.getOrCreateContainer('Collections'))
     obj.addToView(self.view)
     return obj