masqu3rad3 / tik_manager4

Tik Manager is a Python-based Pipeline and Project Management platform designed for VFX and Animation Projects.
GNU General Public License v3.0
95 stars 7 forks source link

I'm wondering if I can add a custom DCC. #130

Open 4drawing95 opened 4 months ago

4drawing95 commented 4 months ago

Hi. I'm creating and modifying a custom pipeline tool based on the modern tik_manager 4, and what I want to do is customize my own DCCs, although I'm sure there will be many more in the future. I'm currently thinking of attaching tik_manager 4 to unreal and vaguely thinking that it would work well enough to attach standalone to unreal and use the data that standalone returns as the data that unreal needs. Can you tell me if this is a possibility or where I should start?

masqu3rad3 commented 4 months ago

Hi, thank you for the interest.

Yes, it is definitely possible to add additional DCC's to Tik Manager4. There isn't currently a guide for it at the moment, but essentially any new additional DCCs need to be packed inside the tik_manager4/dcc folder.

The added DCC needs to be explicitly defined in tik_manager4\dcc\__init__.py

new DCC must also have a main.py module and the class in it must inherit the MainCore class from tik_manager4\dcc\main_core.py module.

You can take a look at the existing DCC modules and investigate how it works. Essentially the MainCore class includes the required core functions and we are overriding them in each individual DCC main class.

Once there is a working structure which allows you to do the basic functions and interaction with Tik Manager, extractors, ingestors and validators can be added (as many as required). There is a guide section in documentation for how to write extractors, validators and ingestors. I am currently working on a major update on ingestor mechanism. The method might slightly change but the core will remain the same.

That being said, I must add Unreal would be a bit trickier to implement due to its vastly different working mechanism. It might require a bit off going off-track or even some updates on core functions. But I believe it is fairly possible.

4drawing95 commented 3 months ago

Thanks for the answer. First of all, as a pipeline developer, I would like to be able to attach tik manager to new tools when they are released without difficulty and the process should be simple. That's why I aimed to separate standalone first. Currently, standalone doesn't return any information about the asset when I click on it. But if the standalone returns just a few pieces of information that are essential to me, it's easy to create a function that takes that and imports it into Unreal or another piece of software. So I'd like to modify the standalone itself to make it more universal. The problem is that I didn't create it, so it's taking me a while to find where the different configurations of the standalone are. I'd like to modify the standalone in a non-destructive way if possible, so do you have any advice?

masqu3rad3 commented 3 months ago

Hi again, I think that would be a valid approach. Since UE has a different approach than most of the DCCs I currently integrated, a different approach will be very much acceptable.

I would suggest just duplicate the 'standalone' folder and rename anything you see as 'standalone' to 'unreal' The only additional thing you need to do is to go to the tik_manager4\dcc\__init__.py and add the new 'fake' unreal dcc initialization parameters. Simply you can add "unreal": [".*"] to the EXTENSION_DICT and another elif statement for unreal:

elif NAME == "trigger":
    from tik_manager4.dcc.trigger.main import Dcc

Than, you can launch the unreal integration you just configured (which is currently identical to the standalone):

from tik_manager4.ui import main
main.launch("unreal")

This is pretty much standard for all other DCCs as well.

Now you can do whatever you want in your unreal folders without breaking standalone.

If you fork the project and version control your work on a branch in your forked repo that would be fantastic as in case you would like to contribute to the project, you can simply make a pull request from your branch and everyone can have the chance to use it or improve it further.