Esempio n. 1
0
 def newLayer(self):
     layer = canvaslayers.ComboCanvasLayer()
     canvas = self.gfxwindow.oofcanvas
     # The names of the layers here must correspond to the
     # targetnames used in meshinfo.py.  "Face" and "Segment"
     # aren't use there currently (4/2012) but may be added later,
     # so they're included here (but not tested!).
     layer.addSublayer(
         "Element",
         canvaslayers.SimpleWireframeCellLayer(canvas, True,
                                               "ElementMeshInfo"))
     # layer.addSublayer(
     #     "Face",
     #     canvaslayers.SimpleWireframeCellLayer(canvas, True,
     #                                           "FaceMeshInfo"))
     # layer.addSublayer(
     #     "Segment",
     #     canvaslayers.SimpleWireframeCellLayer(canvas, False,
     #                                           "SegmentMeshInfo"))
     layer.addSublayer(
         "Node", canvaslayers.SimplePointCellLayer(canvas, "NodeMeshInfo"))
     self.tbcallbacks = [
         switchboard.requestCallbackMain((self.gfxwindow, "query Mesh"),
                                         self.queryCB),
         switchboard.requestCallbackMain((self.gfxwindow, "peek Mesh"),
                                         self.peekCB),
         switchboard.requestCallbackMain("mesh data changed",
                                         self.meshDataChangedCB)
     ]
     return layer
Esempio n. 2
0
 def newLayer(self):
     layer = canvaslayers.ComboCanvasLayer()
     canvas = self.gfxwindow.oofcanvas
     # The names of the layers here must correspond to the
     # targetnames used in skeletoninfo.py.
     layer.addSublayer(
         "Element",
         canvaslayers.SimpleWireframeCellLayer(canvas, True,
                                               "ElementSkelInfo"))
     if config.dimension() == 3:
         layer.addSublayer(
             "Face",
             canvaslayers.SimpleWireframeCellLayer(canvas, True,
                                                   "FaceSkelInfo"))
     layer.addSublayer(
         "Segment",
         canvaslayers.SimpleWireframeCellLayer(canvas, False,
                                               "SegmentSkelInfo"))
     layer.addSublayer(
         "Node", canvaslayers.SimplePointCellLayer(canvas, "NodeSkelInfo"))
     assert not self.tbcallbacks
     self.tbcallbacks = [
         switchboard.requestCallbackMain((self.gfxwindow, "query Skeleton"),
                                         self.queryCB),
         switchboard.requestCallbackMain((self.gfxwindow, "peek Skeleton"),
                                         self.peekCB)
     ]
     return layer
Esempio n. 3
0
 def newLayer(self):
     self.movenodeToolbox = self.gfxwindow.getToolboxByName("Move_Nodes")
     self.tbcallbacks = [
         switchboard.requestCallbackMain(
             ("node selected", self.movenodeToolbox), self.nodeSelectedCB)
     ]
     return canvaslayers.SimplePointCellLayer(self.gfxwindow.oofcanvas,
                                              "MoveNode")
Esempio n. 4
0
 def newLayer(self):
     self.setupSignals()
     return canvaslayers.SimplePointCellLayer(self.gfxwindow.oofcanvas,
                                              "SkeletonSelectedNode")
Esempio n. 5
0
 def newLayer(self):
     self.tbcallbacks.append(
         switchboard.requestCallbackMain("new pinned nodes",
                                         self.pinnednodeschangedCB))
     return canvaslayers.SimplePointCellLayer(self.gfxwindow.oofcanvas,
                                              "PinnedNodes")