Exemple #1
0
def setup(console=False, port=None):
    """Setup integration

    Registers Pyblish for Maya plug-ins and appends an item to the File-menu

    Attributes:
        preload (bool): Preload the current GUI
        console (bool): Display console with GUI

    """

    if not os.name == "nt":
        return pyblish_integration.echo("Sorry, integration only"
                                        "supported on Windows.")

    def threaded_wrapper(func, *args, **kwargs):
        return nuke.executeInMainThreadWithResult(func, args, kwargs)

    pyblish_integration.register_python_executable(where("python"))
    pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
    pyblish_integration.setup(console=console, port=port)

    register_plugins()
    register_host()
    add_to_filemenu()

    pyblish_integration.echo("pyblish: Integration loaded..")
Exemple #2
0
def setup(console=False, port=None):
    """Setup integration

    Registers Pyblish for Maya plug-ins and appends an item to the File-menu

    Attributes:
        console (bool): Display console with GUI
        port (int, optional): Port from which to start looking for an
            available port to connect with Pyblish QML, default
            provided by Pyblish Integration.

    """

    if self._has_been_setup:
        teardown()

    if self._has_integration:

        def threaded_wrapper(func, *args, **kwargs):
            return utils.executeInMainThreadWithResult(func, *args, **kwargs)

        pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
        pyblish_integration.setup(console=console, port=port)

    register_plugins()
    add_to_filemenu()
    register_host()

    self._has_been_setup = True
    sys.stdout.write("pyblish: Integration loaded..")
Exemple #3
0
def setup(console=False, port=None):
    """Setup integration

    Registers Pyblish for Maya plug-ins and appends an item to the File-menu

    Attributes:
        console (bool): Display console with GUI
        port (int, optional): Port from which to start looking for an
            available port to connect with Pyblish QML, default
            provided by Pyblish Integration.

    """

    if self._has_been_setup:
        teardown()

    if self._has_integration:
        def threaded_wrapper(func, *args, **kwargs):
            return utils.executeInMainThreadWithResult(func, *args, **kwargs)

        pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
        pyblish_integration.setup(console=console, port=port)

    register_plugins()
    add_to_filemenu()
    register_host()

    self._has_been_setup = True
    sys.stdout.write("pyblish: Integration loaded..")
Exemple #4
0
def setup(console=False, port=None):
    """Setup integration

    Registers Pyblish for Maya plug-ins and appends an item to the File-menu

    Attributes:
        preload (bool): Preload the current GUI
        console (bool): Display console with GUI

    """

    if not os.name == "nt":
        return pyblish_integration.echo("Sorry, integration only"
                                        "supported on Windows.")

    def threaded_wrapper(func, *args, **kwargs):
        return nuke.executeInMainThreadWithResult(func, args, kwargs)

    pyblish_integration.register_python_executable(where("python"))
    pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
    pyblish_integration.setup(console=console, port=port)

    register_plugins()
    register_host()
    add_to_filemenu()

    pyblish_integration.echo("pyblish: Integration loaded..")
Exemple #5
0
def setup(console=False):
    """Setup integration
    Registers Pyblish for Hiero plug-ins and appends an item to the File-menu
    Attributes:
        console (bool): Display console with GUI
    """
    def threaded_wrapper(func, *args, **kwargs):
        return hiero.core.executeInMainThreadWithResult(func, *args, **kwargs)

    pyblish_integration.register_python_executable(where("python"))
    pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
    pyblish_integration.setup(console)

    register_plugins()
    add_to_filemenu()
    register_host()

    pyblish_integration.echo("pyblish: Integration loaded..")
Exemple #6
0
def setup(console=False):
    """Setup integration

    Registers Pyblish for Maya plug-ins and appends an item to the File-menu

    Attributes:
        preload (bool): Preload the current GUI
        console (bool): Display console with GUI

    """

    pyblish_integration.setup(console)

    register_plugins()
    add_to_filemenu()
    register_host()

    pyblish_integration.echo("pyblish: Integration loaded..")
Exemple #7
0
def setup(console=False):
    """Setup integration
    Registers Pyblish for Hiero plug-ins and appends an item to the File-menu
    Attributes:
        console (bool): Display console with GUI
    """

    def threaded_wrapper(func, *args, **kwargs):
        return hiero.core.executeInMainThreadWithResult(func, *args, **kwargs)

    pyblish_integration.register_python_executable(where("python"))
    pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
    pyblish_integration.setup(console)

    register_plugins()
    add_to_filemenu()
    register_host()

    pyblish_integration.echo("pyblish: Integration loaded..")
Exemple #8
0
def setup(console=False, port=None):
    """Setup integration

    Registers Pyblish for Maya plug-ins and appends an item to the File-menu

    Attributes:
        preload (bool): Preload the current GUI
        console (bool): Display console with GUI

    """
    def threaded_wrapper(func, *args, **kwargs):
        return hdefereval.executeInMainThreadWithResult(func, *args, **kwargs)

    pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
    pyblish_integration.setup(console=console, port=port)

    register_host()
    register_plugins()

    pyblish_integration.echo("pyblish: Integration loaded..")
Exemple #9
0
def setup(console=False):
    """Setup integration

    Registers Pyblish for Maya plug-ins and appends an item to the File-menu

    Attributes:
        preload (bool): Preload the current GUI
        console (bool): Display console with GUI

    """

    def threaded_wrapper(func, *args, **kwargs):
        return utils.executeInMainThreadWithResult(func, *args, **kwargs)

    pyblish_integration.register_dispatch_wrapper(threaded_wrapper)
    pyblish_integration.setup(console)

    register_plugins()
    add_to_filemenu()

    pyblish_integration.echo("pyblish: Integration loaded..")