Ejemplo n.º 1
0
def main():
    """main function that's render when the script is render as a standalone script."""
    app = QtWidgets.QApplication(sys.argv)
    from bfx.data.ple.assets import Version
    v = Version.get(id=128875)
    window = TreeWidget(v)
    window.show()

    sys.exit(app.exec_())
Ejemplo n.º 2
0
def main():
    """main function that's render when the script is render as a standalone script."""

    app = QtWidgets.QApplication(sys.argv)
    os.environ[ENV.entity_id] = str(315715)
    os.environ[ENV.task_path] = 'test_guzy'

    dialog = FileDialog()
    # dialog.setDirectory("/show/CWT/seq/sc002/shot/sc002_0050/task/plate/workspace/BP/sc002_0050_plate_bp_v001/output/exr/2048x1152")
    # dialog.setNameFilter("Images (*.png *.exr *.jpg);;Text files (*.txt);;XML files (*.xml)")
    # dialog.setSidebarPaths(['/sw/PLE/workspace/guzy/', '/sw/PLE/workspace/chencheng/'])
    dialog.setViewMode(FileDialog.List)
    result = dialog.exec_()
    if result == FileDialog.Accepted:
        print dialog.selected_files
Ejemplo n.º 3
0
def main():
    """main function that's render when the script is render as a standalone script."""
    app = QtWidgets.QApplication(sys.argv)
    from bfx.data.ple.assets import Version
    # v = Version.get(id=834342)
    # v = Version.get(id=818022)
    # v = Version.get(id=606882)  # cc_bundle
    # v = Version.get(id=579564)
    # v = Version.get(id=659547)
    v = Version.get(id=898056)
    window = VersionGraph(combine_version=True)
    window.set_populate_depth(1)
    window.set_orientation(0)
    window.show()
    window.show_version(v)

    sys.exit(app.exec_())
Ejemplo n.º 4
0
        self.version_user_name = self.version_user.name
        self.user_icon.set_user(self.version_user)

        link_color_red, link_color_green, link_color_blue = get_link_color(
            self.text_color)
        self.user_label.setText("""
        <a href="{url}"><font color=#{color}>Version</font></a> by {version_user}
        """.format(
            url=self.version_object.url,
            color='%02x%02x%02x' %
            (link_color_red, link_color_green, link_color_blue),
            version_user=self.version_user_name,
        ))
        self.user_time_label.setText(
            self.version_date.strftime('%Y-%m-%d %H:%M:%S'))
        self.version_description_edit.setText(self.version_description)
        self.version_description_edit.set_size()

    def open_link(self, url):
        webbrowser.open(str(url))


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    note = Note.get(id=164253)
    window = NoteWidget(note=note, attachments=note.attachments)
    window.show()
    window.resize(500, 400)
    sys.exit(app.exec_())
Ejemplo n.º 5
0
def main(args):
    app = QtWidgets.QApplication(args)
    model = Model()
    window = MainWindow(model)
    window.show()
    sys.exit(app.exec_())