AYON monthly beginner’s topic - March‘24

Welcome to our Monthly beginner’s thread. This forum topic is used to capture all beginner questions (and answers) in one place. We start a new one every month on 1st of the month and lock the previous one.

We if you feel your question deserves it’s own topic in one of the existing categories, then by all means go for it and create on. We’ll also try our best to split out any interesting questions to their own topics when they warrant a bigger conversations.

So go ahead and ask to your heart’s content.

Hey! I’m testing out the Ayon-Kitsu addon, to see if it could fit our current workflow needs or what would need to change to make everyone happy on our end.

And I feel a little lost with the “Publish plugins” settings for the Kitsu addon.

I assume “Set status on note” will just create a note with a specified status. That status being defined by “Note shortname”. But I’m not sure I understand what exactly “Status change conditions” do and how they affect the status during publish.

We have a complicated review process. Once a task is complete, it is sent through a chain of reviewers specific to the type of task. We keep track of this through a bunch of custom “Waiting for Approval” statuses on kitsu. (I’m open for better solutions, this was something set in place before I arrived).

This means once a task is being published, I’d at least need to assign a specific status based off task type. I was hoping this is what “Status change conditions” could help me with.

TL;DR - What does “Status change conditions” settings do in kitsu plugin?

Heya all!
Brand new to this stuff and I am trying to spearhead getting a pipeline platform up and running at my studio. I have followed this guide (AYON Beta Testing - Minimal step by step guide) to get an Ayon server running, created a project with an asset (with tasks assigned). The problem is, folder don’t seem to be created. Thus a few questions:

  1. Is there some way to “push” the heirachy out or am I just missing something? The volume is mounted in the docker so I dont think that’s the issue.
  2. in the Core settings, what is the “Project folder structure” for? Is this created when the project folder is created and so how does it know to put assets in the assets folder, and shots in the shots folder etc.
  3. Does this have to do with the STUDIO_SW global in the studio settings, not sure what this is…
  4. Are there some “best practices” for setting up workflows so that they fit nicely within Ayon

Apologies for the unfocussed post.

Cheers,
Stephen

Righty! Solved some aspects of it. Biggest things to note are that folder are dynamically created but this only occures once a task is opened in a DCC (Please correct me if I am wrong). Now, in order to have DDC’s available to open through the launcher a few things must be set up, making sure to save after each step.

  1. Firstly, each DCC has to have a variant with the correct executable location in Studio Settings > Studio Settings > Applications > [DCC].
  2. Then, you can select each variant in the project’s Anantomy in Project Setting > Anatomy > Attributes > Application. This can also be changed in the default project anatomy in Studio settings so it carries across to future new projects.

This should hopefuly mean that once you open up Launcher and select a task you can open it in your desired DCC and thus create a folder structure! This does make me question what the Project Folder structure does in the core settings though…

As you have mentioned later, They are created dynamically when they are needed.

As far as I know,
On project creation, you can apply anatomy preset… (found in studio settings)

After project creation, you can copy paste anatomy among projects.
image

As far as I know, it doesn’t work yet.

As far as I know, STUDIO_SW is an example for setting a global environment variable.

That’s correct as you have mentioned Let me just add some screenshots for reference.

  1. [Studio Settings] Set your applications and their variants in ayon+settings://applications/applications e.g. Here’s my Houdini variants.
    Note: you’d need to restart your server afterwards.

  2. [Project Settings] ayon+anatomy://{your-project-name}/attributes/applications

1 Like

Thanks a lot Mustafa! Much better laid out.

1 Like

Dependancy Package: ayon_2401161802_windows.zip
Maya Addon: 0.1.9 (With python 2 toggled on, another package breaks if it is off unsuprisingly)
OS: Windows 10

Hey all,
Apologies I’m back but this time with a question regarding Python. When opening Maya through Ayon I get the following error:

File “C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\maya\api\exitstack.py”, line 18, in
from contextlib import ExitStack # noqa
ImportError: cannot import name ExitStack

I have looked into it but not found any concrete reason and my understanding of python packages isnt good enough to sleuth this one out.

Cheers,
Stephen

Edit: I have tried changing the Maya and Openpype addons to the versions that come with the Dependancy Package and the later versions to no avail. Bypassing the import just causes a similar issue in lib.py in the same folder.

Hello Stephen,
Thanks for reaching out.

As far as I know,

Dependency packages are compatible to the list of add-ons for which they were created.
I’m not sure if Dependency packages store that list yet.

contextlib is a built-in module therefore it should exist in Maya by default and no need to be included in the dependency package.

So, I think your issue is using an old Maya version.

Maybe @tokestuartjepsen can tell us about the lowest supported Maya version.

Have a good day :wink:
Mustafa

1 Like

Correct, contextlib.ExitStack is added in Python 3 making this incompatible with Python 2. And likely thus Maya 2020 and below will fail. I believe Maya 2022 is Py3+

The Maya implementation currently does have a Py2 fallback for ExitStack implemented here: ayon-core/client/ayon_core/hosts/maya/api/exitstack.py at 5628a93e3faf2a04915dee8b135d1c36c22c8f61 · ynput/ayon-core · GitHub

However, this line should actually check getattr(contextlib, "ExitStack") and not "nested" even though nested exists in Py2 instead of Py3 so would behave roughly the same? But in this case it doesn’t seem like it does because it still tries to import ExitStack from contextlib even though it doesn’t have that. What the hell? :slight_smile:

As such, the fix for that would be that fixing that getattr check.

Anyway, would be even better to know what Maya version you’re using and with what Python version.

(With python 2 toggled on, another package breaks if it is off unsuprisingly)

If your Maya is Py3 (so Maya 2022+) this toggle should be on!

Also, that toggle will eventually be removed since AYON is intended to drop support for Py2.
You might be better of finding out ‘what package breaks and why it does so’

1 Like

I am a muppet sorry, I should have included the Maya version. The python version reported by Ayon is 3.9.6

The reason I didn’t include the Maya version was because I had originally tried it with Maya 2020.4, with the Py2 toggle on (Got the exit stack error) then with the Maya 2023 with the Py2 toggle disabled and also got the exit stack error which made me think it was version agnostic and more to do with the actual check itself.

Attempting again this morning, Maya 2023 does now work (Huzzah!), so I think it is likely I wasn’t deploying the changes correctly and things that I thought I had changed hadn’t actually been deployed.

Is there a best practice when making changes to configuration to ensure they are deployed locally e.g. refreshing/restarting/logging off, etc?

Back on backwards compatibility, fixing the if statement to if getattr(contextlib, "ExitStack", None): does get it past there but I still can’t see the addon in Maya 2020. Reported errors in the maya command line are the following:

Error Code
C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\vendor\python\python_2\arrow\arrow.py:28: DeprecationWarning: Arrow will drop support for Python 2.7 and 3.5 in the upcoming v1.0.0 release. Please upgrade to Python 3.6+ to continue receiving updates for Arrow.
  DeprecationWarning,
*** WRN: >>> { ModulesLoader }: [ Failed to import "ayon_third_party" ] 
==============================
invalid syntax (utils.py, line 541)
==============================
Traceback (most recent call last):
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 472, in _load_ayon_addons
    mod = __import__(basename, fromlist=("",))
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\ayon_third_party_1.0.0\ayon_third_party\__init__.py", line 3, in <module>
    from .addon import ThirdPartyDistAddon
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\ayon_third_party_1.0.0\ayon_third_party\addon.py", line 5, in <module>
    from .utils import (
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\ayon_third_party_1.0.0\ayon_third_party\utils.py", line 10, in <module>
    from ayon_common import (
  File "C:\Program Files\Ynput\AYON 1.0.0\common\ayon_common\__init__.py", line 1, in <module>
    from .utils import (
  File "C:\Program Files\Ynput\AYON 1.0.0\common\ayon_common\utils.py", line 541
    f"Invalid file extension \"{ext}\"."
                                       ^
SyntaxError: invalid syntax
*** WRN: >>> { ModulesLoader }: [ Addon ayon_third_party 1.0.0 has no content to import ] 
*** WRN: >>> { GDriveHandler }: [ Import failed, imported from Python 2, operations will fail. ] 
*** WRN: >>> { ModulesLoader }: [ Failed to import "ayon_sitesync" ] 
==============================
invalid syntax (sftp.py, line 427)
==============================
Traceback (most recent call last):
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 472, in _load_ayon_addons
    mod = __import__(basename, fromlist=("",))
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\__init__.py", line 1, in <module>
    from .sync_server_module import SyncServerModule
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\sync_server_module.py", line 26, in <module>
    from .providers import lib
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\providers\lib.py", line 4, in <module>
    from .sftp import SFTPHandler
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\providers\sftp.py", line 427
    raise ValueError(f"Certificate at '{key_paths}' doesn't exist.")
                                                                  ^
SyntaxError: invalid syntax
*** WRN: >>> { ModulesLoader }: [ Addon sitesync 1.0.3 has no content to import ] 
Failed to execute userSetup.py
Traceback (most recent call last):
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\maya\startup\userSetup.py", line 11, in <module>
    install_host(host)
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\pipeline\context_tools.py", line 123, in install_host
    modules_manager = _get_modules_manager()
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\pipeline\context_tools.py", line 78, in _get_modules_manager
    _modules_manager = ModulesManager()
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 837, in __init__
    self.initialize_modules()
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\modules\base.py", line 890, in initialize_modules
    system_settings = get_system_settings()
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\lib.py", line 1136, in get_system_settings
    return get_ayon_system_settings(default_settings)
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\ayon_settings.py", line 1534, in get_ayon_system_settings
    addon_versions = _AyonSettingsCache.get_addon_versions()
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\ayon_settings.py", line 1514, in get_addon_versions
    if cls._use_bundles():
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\settings\ayon_settings.py", line 1447, in _use_bundles
    major, minor, _, _, _ = con.get_server_version_tuple()
  File "C:\Users\deadline\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\vendor\python\common\ayon_api\server_api.py", line 945, in get_server_version_tuple
    re_match = VERSION_REGEX.fullmatch(
AttributeError: '_sre.SRE_Pattern' object has no attribute 'fullmatch'

Anyhow suspect the issue is with the ayon third party module not loading properly, but this is now in the program files so the issue is probably even deeper and probs not worth fixing for older version I’d suspect.

Anyhow appreciate the help guys,
Stephen

Thanks @StephenScollay - that confirmed my hunch. Officially AYON will be dropping Py2 support, and this is likely a sign of it. It seems the AYON API is written for Py3 and is giving you an error on a regex library missing method which apparently did not exist in Py2.

So the only thing I unfortunately can tell you:

  • Maya 2020 will not work due to Py2 being end-of-life and AYON not supporting it. (@milan confirmed that on discord here)

The Py2 toggle will likely also soon be removed because support will be (or as you can see actually is already) dropped.

2 Likes

Im back baby, just wondering if anyone has a workflow for getting looks to work for rigged assets? I can assign looks to static meshes but when I try for a rigged asset with a skeleton and controls I get the following warning:

Using existing QApplication…
// openpype.hosts.maya.api.lib : Using look for the first time …
// openpype.pipeline.load.utils : Running ‘LookLoader’ on ‘tree’
// SubsetLoader : {‘attach_to_root’: True, ‘group_name’: ‘tree_lookRig_01_:_GRP’}
# File read in 0.03 seconds.
# Warning: None of the items can be added to the set

For the record I have creates two looks, one created on the static mesh from the model publish and the other on the rig publish. My rig references the model publish but I get the above error when I try to apply the model look (I presumed due to the differences in attributes as the rig model has got skin attributes). Thus I created the look on the rig itself as well as on the model group in the rig and was severly dissaopointed when these didnt work either. Is there something I am missing or do looks just not work on rigged assets?

Cheers,
Stephen

Looks were not intended for rigs AFAIK. Could you not have the shaders published with the rig? Or are you needing to switch looks on the rig?

1 Like

For what it’s worth - this should work. It’s not the usual workflow but the look assign system should be capable of assigning to anything that has a matching cbId attribute.

The pointcount doesn’t need to be the same, the uvs don’t need to be, the hierarchy or even the mesh names don’t to be the same - there are really no “requirements” there. All the look assignment does is check the scene - what is the cbId attribute on the goemetry and if it matches one that is found in the published look it will try to assign.

There’s also no need to have a look made for a rig and a look made for a model. We usually have just a lookMain that we can apply to anything, the model, the rig, the animation output of a rig, or even the fx that went on top of that - as long as the cbId matches.

It’s hard to identify here what exactly is the issue. What I’d do:

  • Check if the rigged meshes have the same cbId as the model. These are attributes on the meshes and on the transforms, both a unique cbId (they both should match with the model used for the look publish to be completely accurate and do what you want)
  • Does it work on your rig if you assign a single shader manually (e.g. a lambert)? There are some edge cases where Maya will fail to apply a look - those are usually bugs, like if it would have an existing connection to a reference node from which it lost a previous material assignment then maya will fail to assign any shader unless you break that connection. Those are edge cases and likely not what you’re hitting, but it’s always good to check “can I actually assign something myself?”

How are you assigning the Look? Are you using the Look Assigner tool? (not via the loader)

1 Like

Nah, just testing and seeing what does and doesnt work. I was wondering what happens if the rig was made before texturing, and it seemed like looks were the intended method for applying materials to models and such (I am a noobie so it is likely I am not following best or intended practices on these things). I will investigate and see about the cbId. Cheers guys

Was there an option to limit the assetName creation to a specific format.
For example i want to force that all asset and folder names are lowerCameCase not starting with a number and no special signs.

I thought i have seen this come by just, but could be a brain fart

Hi Robert !

Indeed, I would also like to force all user-entered names (project, asset, folder, task, etc…) to follow some simple rules (for us it would be uppercase).
And currently you can create assets, folders and tasks using crazy names (containing spaces, special characters, foreign accents, mix of upper and lower case, number as first character, etc…), that will later create problems when their names are used to create files and disk folders.
Project names currently have some sanity check already, so it’s better than other entities.

and while we add it :wink:
Could we create multiple assets at the same time, maybe with a comma separation Almost allready csv, i know that full csv import and export is planned for later this year.
But would be nice for in the meantime have an option to add more than 1 asset

This would be one for :superhero: @Innders I think.

And maybe he also has some thoughts on locking out certain characters for entity types as @Yul also requested, etc. But that might go a bit higher into the :supervillain: chain to @milan .

For naming sanity check, it seems part of it is already in the works :

1 Like