Addon for MARI

Right now i am not able to find ayon addon for mari, so i don’t believe it has been created yet,

are there any plans to create an addon for MARI ?

So far we’ve found little interest among clients and the community for a Mari integration - as such, it’s low on our list of priorities. Most new integrations over time either have come from requests by clients on Ynput support or from community contributions.

In short, there are no active plans - but those can change based on requests.

What’s your most needed features in a Mari integration?


I did the start of an integration some while back where I had it launch Mari, and had the AYON menu integrated - but I didn’t spend too much time on it due to essentially hearing no-one actively still using Mari or requesting an integration in a way that made sense to support it out of the box.

I know we personally want source file management most importantly. It’s pretty annoying as-is. But obviously similar integration to Substance Designer would be great (import assets, export texture files). Just haven’t gotten around to it.

Until Substance Designer gets any closer to being a Mari replacement, gotta keep on with it.

Do you have a repo you wouldn’t mind us forking? @BigRoy

I believe it’d be great to a have a very simple versioning for additional applications (which do not have an integration addon yet).

Similar topic was mentioned on forums in:


Anyways, feel free make a request for mari on https://feedback.ayon.app/

1 Like

I’ve just pushed whatever draft I had - but it’s far from usable but happy to help where I can.

Let me know how far you get. Should at least allow you to launch Mari and have the AYON menu ready-to-go. But e.g. saving/loading workfiles needs more work (see TODOs in the ayon-mari codebase) to support Mari on how it operates with this local database. We may need to ‘export/import’ to the workdir path instead?

I haven’t looked much into loading yet - I did have some pseucodode “export” logic for textures, but nothing that I pushed since it very mundane. Along the lines of:

import os

from ayon_core.pipeline import publish

import pyblish.api
import mari


class ExportImageSet(publish.Extractor):
    """Export Image Set

    See:
        C:\Program Files\Mari7.5v1\Bundle\Media\Scripts\Mari\examples\export_dialog.py
        C:\Program Files\Mari7.5v1\Bundle\Media\Scripts\Mari\examples\c_api_channel_export.py

    For colorspace details see:
        C:\Program Files\Mari7.5v1\Bundle\Media\Scripts\Mari\examples\colorspace.py

    """

    label = "Export Image Set"
    order = pyblish.api.ExtractorOrder
    families = ["texture"]
    hosts = ["mari"]

    def process(self, instance):
        obj = mari.geo.current()
        image_set = obj.imageSet(image_set_name)

        # TODO:
        chan_name: str = ""
        staging_dir: str = self.staging_dir(instance)

        if image_set.isAnimated():
            self.log.warning(
                "Animated export is currently not supported."
                " Default keyframe(s) will be exported only."
            )

        if image_set.isPtex():
            # Export Ptex
            ptex_channel = mari.Ptex(image_set)
            filename: str = f"{obj.name()}_{chan_name}.ptx"
            path: str = os.path.join(staging_dir, filename)
            ptex_channel.exportToPtexFile(path, True, True, True, True, True)

        else:
            ext = "png"
            # Save out UVs
            for uv in image_set.uvIndices():
                filename: str = f"{obj.name()}_{chan_name}_{uv+1}uv.{ext}"
                path: str = os.path.join(staging_dir, filename)
                image_set.image(uv).saveAs(path)

Anyway @keithmanlove, good luck! Looking forward to your PRs. And of course would be great if @sraka is able to test along the way too.

As said before, so far I’ve seen little interest among Ynput clients and hence it’ll keep being pushed back in our backlog.

2 Likes

Thanks @BigRoy , would test it soon.

1 Like

@BigRoy I’ve been avoiding this part long enough… Mari workfiles. There are the .mra archives which have their own annoyances, as well as the projects and session folders (which of course are folders). Are there any other examples of folder workfiles? Could a zip or some other standard archive work as a workfile?

Interested on which route seems the least AYON anti-pattern as possible to you…