New publisher integration for Blender host

Greetings!

As discussed on the discord server, I’m going to start working on implementing the new publisher in Blender host, as I think it would be a great improvement over the previous one. As suggested by @milan I’m creating this post so we can keep track of the progress, help and suggestions made in the process. Hopefully this can help when other hosts switch to the new publisher as well.

So far I opened the new publisher by switching the method called in the LaunchPublisher class in openpype/hosts/blender/api/ops.py from host_tools.show_publish() to host_tools.show_publisher()

I noticed the following issues so far that I will need to address:

  • There is not list of publishable instances before pressing the play or validate button, as collectors are only run after pressing either of these buttons. This implies you can’t toggle which instance you want to publish or not, and there is no way to know what will be published before proceeding with the publish.
  • Optional plugins cannot be toggled.
  • I saw a disabled plugin listed in my plugins.

I will dig into what has been done on Maya side (Maya PR #4388) and see what I can do :grinning:

2 Likes


Hello! I managed to have blender creators displayed in the Create panel, but when I launch the publisher from blender I can’t interact with anything on this panel. All the buttons are grayed out and can’t be interacted with, except for the publish related buttons at the bottom and selecting other tabs. I don’t have any error in the console except about a creator that fails to import (it’s part of an addon we use and it’s not compatible with this branch as it relies on code that hasn’t been merged yet in the develop branch).

Does anyone has an idea what could cause that?

Hmm, I guess blender is one of last host integrations that don’t use HostBase (and it’s interfaces IWorkfileHost, ILoadHost, IPublishHost) for host integration. Publisher requires that.

The host integration should be a class that is registered as host (instead of api module). The registration in blender is in openpype/hosts/blender/blender_addon/startup/init.py. Look at other hosts how they make their classes. The class can re-use existing functions so it won’t break backwards compatibility.

class BlenderHost(
    HostBase, IWorkfileHost, ILoadHost, IPublishHost
):
    name = "blender"

    def install(self):
        install()

    def get_containers(self):
        return ls()


def ls():
    ...


def install():
    ...

Sorry for the late response, I’ve been dealing with personal stuff lately. I tried your suggestion and it worked! Progress :smile:

Hello :slightly_smiling_face:

Are there news about the new Publisher in Blender host ?

Currently I see this one :

Greetings,

I have made progress on this feature, but it is still a work in progress. In its current state I can open the new publisher (the create button opens the create page and the publish button opens the publish page), instances can be created, and fetched when reopening the publisher. Optional publish plugins can be toggled, but I still have issues to fix before the full publish sequence works as intended.

It is not yet part of the develop branch, therefore it is normal that you still have the legacy pyblish window.

Thanks very much for your time ! :slightly_smiling_face:

Hi everyone, any update about the new Publisher? Just curious about the current status, I am currently testing Blender features while still running the old publisher. Thank you!

Hi! I didn’t have much time for this feature lately, so beside a few bugfixes it still is very much a work in progress.

1 Like

Thanks so much @Sharkitty for the initial work.

I’ve just spend a few hours just now looking into cleaning up some things and fixing issues that I hit with it and opened a PR so others will hopefully test it too. The PR is here: Blender: Refactor to new publisher by BigRoy · Pull Request #5910 · ynput/OpenPype · GitHub

@Yul @spmhickstein You are very welcomed to give it a go if you can!

2 Likes

The PR has been merged and this is now available in the latest develop branch. Thanks all!

2 Likes

Thank you everyone from Ynteam as well. This was a great effort and it is much appreciated.