예제 #1
0
    def __init__(self):
        super(MainWindow,self).__init__()

        self.resize(500, 40)
        self.setWindowTitle("Key Frame View")



        self.keyPanel = KeyFramePanel(None)

        dataModel = DataModel(dataContainer = DemoData(50),prefetchSize = 0)
        transModel = TransformModel()
        transModel.setModel(dataModel)

        dataModel.setPos(2)

        self.keyPanel.keyView.setTransformModel(transModel)

        k = KeyFrameList()
        k.addItem(KeyFrame(0.4))
        # k.addItem(KeyFrame(0.9))



        self.keyPanel.keyView.setKeyListModel(k)


        self.setCentralWidget(self.keyPanel)

        self.setStyleSheet("background-color:black;")
예제 #2
0
 def load_from_JSON(self,fName):
     with open(fName,"r") as f:
         try:
             newKeyList = KeyFrameList._from_JSON(f.read())
             self.keyView.setKeyListModel(newKeyList)
         except:
             print "not a valid keyframe json file: %s"%fName