Exemplo n.º 1
0
def showExample5():
    """
    Show two Studio Library widget instances.

    :rtype: None 
    """
    with studiolibrary.app():

        widget = studiolibrary.main(name="Example5-A", path="data")
        widget.setLocked(True)
        widget.move(100, 100)
        widget.theme().setAccentColor("rgb(250, 100, 50)")
        widget.theme().setBackgroundColor("rgb(80, 150, 120)")
        widget.show()

        widget = studiolibrary.main(name="Example5-B", path="data")
        widget.show()
Exemplo n.º 2
0
        lock=False,
        superusers=None,
        lockRegExp=None,
        unlockRegExp=None,
        dockable=True
    )

    :rtype: studiolibrarymaya.MayaLibraryWindow
    """
    import studiolibrarymaya

    studiolibrarymaya.registerItems()
    studiolibrarymaya.enableMayaClosedEvent()

    if studiolibrary.isMaya():
        import studiolibrarymaya.mayalibrarywindow
        cls = studiolibrarymaya.mayalibrarywindow.MayaLibraryWindow
    else:
        cls = studiolibrary.LibraryWindow

    libraryWindow = cls.instance(*args, **kwargs)

    return libraryWindow


if __name__ == "__main__":

    # Run the Studio Library in a QApplication instance
    with studiolibrary.app():
        main()
Exemplo n.º 3
0
def main(*args, **kwargs):
    """
    Convenience method for creating/showing a library widget instance.

    return studiolibrary.LibraryWidget.instance(
        name="",
        path="",
        show=True,
        lock=False,
        superusers=None,
        lockRegExp=None,
        unlockRegExp=None
    )

    :rtype: studiolibrary.LibraryWidget
    """
    if studiolibrary.isMaya():
        import studiolibrarymaya
        libraryWidget = studiolibrarymaya.main(*args, **kwargs)
    else:
        libraryWidget = studiolibrary.LibraryWidget.instance(*args, **kwargs)

    return libraryWidget


if __name__ == "__main__":

    # Run the Studio Library in a QApplication instance
    with studiolibrary.app():
        studiolibrary.main()