Esempio n. 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)

        transModel.setValueScale(0,200)
        dataModel.setPos(2)
        self.keyPanel.connect_to_transform(transModel)


        k = KeyFrameList()
        k.addItem(KeyFrame(0.1))
        k.addItem(KeyFrame(0.9))

        # k = KeyFrameList._from_JSON(open("test.json").read())

        # print k

        # self.keyPanel.setModel(k)

        self.keyPanel.load_from_JSON("test.json")

        self.setCentralWidget(self.keyPanel)

        self.setStyleSheet("background-color:black;")
Esempio n. 2
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;")