Setup Kitsu integration

Hi, I’m trying to get the kitsu integration running, but I’m having some trouble, mainly because I don’t have clear what to expect, does kitsu creates folders in my pc for all projects, does ayon creates the projects in kitsu, is the synchronization on a per project basis?, etc.
for what I understand I should open the admin>console tool in the openPype tray tool, and here I should type “sync-service -l me@domain.ext -p my_password” replaciing username and pass accordingly (which gives me a syntax error). This should syncronize all projects, are these all projects in the studio or just the ones I’m assigned to?, do I have to create folders with the same name of the projects to receive them?
I’m sure I’m overcomplicating things but maybe someone that has gone through the process can shed some light into it and this thread can make things clearer for someone that has the same problem in the future :slight_smile:

Let me breakdown your question into small parts :

1) What is kitsu used for? :

as mentioned in kitsu github
It’s used to share the progress of your productions and validate your deliveries.
So, you only upload reviews and check the status of your task manually.
It’s like posting and commenting on facebook.

2) Does kitsu create folders or manipulate project data ?

as far as I know it doesn’t however openpype/ayon can make them for you when syncing projects
as openpype/ayon asks kitsu what projects, assets, shots, tasks do we have then when kitsu replays, openpype/ayon will create your folders accordingly.

Note: You must follow OpenPype’s naming convention for this to work.

At this moment names of assets, tasks, subsets or representations can contain only letters, numbers and underscore.

3) how to synchronize projects ?

there are two ways :
- a) from outside openpype/ayon
- b) from console tool in the openPype tray tool

a) from outside :

  1. go to openpype executable folder
  2. open CMD in that directory
  3. use the same command you know, this code from docs
// sync all projects then run listen
openpype_console module kitsu sync-service -l me@domain.ext -p my_password

// sync specific projects then run listen
openpype_console module kitsu sync-service -l me@domain.ext -p my_password -prj project_name01 -prj  project_name02

// start listen only for all projects
openpype_console module kitsu sync-service -l me@domain.ext -p my_password -lo

b) from console tool

you would type as follows, this code is from kitsu integration python code

#---Get All projects-----
def get_all_projects_1() : 
    import gazu
    names = [item.get("name" , "") for item in gazu.project.all_projects()]
    return names

def get_all_projects_2() : 
    import gazu
    get_name = lambda x : x.get("name" , "")
    names =  list(map(get_name , gazu.project.all_projects()))
    return names


print(f"all projects: {get_all_projects_2()}\n")

#-----------------------------------------
import os 

login = os.environ["KITSU_LOGIN"]
password = os.environ["KITSU_PWD"]

all_projects = get_all_projects_1() # you can use it to list all the projects in kitsu

ignore_projects = []  # a list of projects you want to skip  
filter_projects = () # a tuple of projects you want to sync

print(f"ignore_projects: {ignore_projects}\n")
print(f"ignore_projects: {filter_projects}\n")

#---Sync Projects-----
from openpype.modules.kitsu.utils.update_op_with_zou import sync_all_projects
# this means sync all projects except ignore_projects 
sync_all_projects(login , password , ignore_projects = ignore_projects  )

# this means sync filter_projects only
sync_all_projects(login , password , filter_projects = filter_projects )
2 Likes

Hi Mustafa, Thank you so much for the detailed response, it was a bit late yesterday and the redaction of my message could have been much better than it was :slight_smile:

We already have an on site Kitsu Server with open ports for external access, we’ve managed to connect it to prism 2.0 which I think you’ve played with too.

Right now I’m getting familiar with the workflow in Ayon, after your thorough explanation what I’m having a bit of problem grasping is mostly related to the logistics;
-Is there an interface for the artists to sync their projects or does the admin has to do it, making one in python should be trivial enough but just to know.
-should the project be created first in Kitsu and then pulled for ayoun to create folders based on that “template” or is the workflow the other way around?

Right now I’m getting all kind of errors ( like zou Unexpected status code 400 in server response ) but at least I can list the projects and there are some that come through, I’m sure I’ll be answering some of these questins as I get more familiar with the whole app and the kitsu module in particular.

Again, thank you so much for your help, I’ll keep posting questions here to build up the knowledge base about this topic.

As far as I know the idea is basically that you run the syncing as a deamon on a server so that it’d continuously try to sync. An admin would once set that up - so that the Ayon database remains synced with Kitsu projects. Do you know, @Danell?

Syncing is intended to be Kitsu → Ayon.

It would be great to know when exactly you are getting these and how one could potentially try to reproduce that issue so at least there’s a clear report and it could be looked into if you remain stuck.

1 Like

Yeah the sync should run as a daemon at one location only. For ease I made a docker container that runs it for OpenPype: GitHub - EmberLightVFX/OpenPype-Kitsu-Sync-for-Docker: Run your Kitsu Sync on your Docker server

With the sync daemon running, when you create a new shot or task in Kitsu it will sync to OP’s database only. When you run something in OP like save a new comp file or render something that folder will be created on demand.

Idk if it has anything to do with it but from my knowledge Kitsu only works with OpenPype and not Ayon

1 Like

Hey @Danell thank you for the support!, I saw the docker repo, really cool!, I want to get kitsu to work manually and familiarize a bit more before using de docker, right now I’m getting familiar with OpenPype itself, i’m sure most errors stem from some naming problems and stuff like that but I plan to test it in a controlled environment soon and I’ll surely post what I find :slight_smile:

2 Likes