Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Creating a host integration" documentation #13

Open
BigRoy opened this issue Dec 31, 2019 · 2 comments
Open

Add "Creating a host integration" documentation #13

BigRoy opened this issue Dec 31, 2019 · 2 comments

Comments

@BigRoy
Copy link
Contributor

BigRoy commented Dec 31, 2019

Issue

It would be good to add to the documentation what the bare requirements are for creating an Avalon integration with a new host. The Maya, Houdini, Fusion and Nuke integrations currently in master already serve as a reference. However, having documentation ready would be perfect for newcomers.

There are currently quite a lot of Integration issues open, e.g. for Blender, Krita, Cinema4D, Unreal Engine and Clarisse. These would be easier for anyone to get quickly up and running once documentation aids them along the way.

Add basic explanation

It should describe what is expected for an integration:

  • Get Python and Qt running and communication in the Host.
  • Create avalon/{host} module and expose its API implementation.
  • Add the install() and uninstall() for the host.
  • Set up the Work Files API for the Work Files tool.
  • Add Avalon menu entries where possible to allow easy access to the tools

Add example on how to test the integration as one builds it.

Additionally it'd be good to show some examples on how to "test" the implementation as you build it. Especially explaining that it's crucial to trigger the avalon.api.install(avalon.{host}) code. For example for host "maya"

from avalon import api
import avalon.maya

# Install avalon with maya host
api.install(avalon.maya)

# Now you have initialized Avalon
# And you should be able to access the database
# Let's try to print the current project
from avalon import io
project = io.find_one({"type": "project"})
print(project)

# Then see if you can run any of the Qt tools
import avalon.tools.loader
avalon.tools.loader.show()

Add simple details on how to test Qt in the host when tools don't work

Add a simple Qt example like that one could try to test Qt with in the host.

from avalon.vendor.Qt import QtWidgets

app = QtWidgets.QApplication([])
button = QtWidgets.QPushButton("Hello world")
button.show()
app.exec_()

If that doesn't work due to errors with Qt then make sure to give it a go with the specific Python Qt implementation you installed, e.g. from PySide2 import QtWidgets or alike.

Add link to documentation on how to get Pyblish integration ready

For Publishing avalon uses Pyblish. As such it would be good to clarify that and describe how one might initiate the "connection" with Pyblish, especially Pyblish QML and what's needed for that.

Additionally it would be good to include examples on how one could test the integration using pyblish.util.publish so they could prototype even without the UI.

@mottosso
Copy link
Contributor

Good idea.

As the docs are for a Python developer, maybe it could also include boilerplate for upcoming/wanted integrations, like Blender and Unreal.

I made something like this for Nuke initially, maybe something like that could be done for those.

@ddesmond
Copy link

Great resource! thanks @mottosso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants