Skip to content

Instantly share code, notes, and snippets.

View MustafaJafar's full-sized avatar
🧙
Wizard

Mustafa Jafar MustafaJafar

🧙
Wizard
View GitHub Profile
@MustafaJafar
MustafaJafar / __init__.py
Created November 14, 2024 21:48
AYON addon endpoint to serve coffee!
from typing import Type
from ayon_server.api.dependencies import CurrentUser
from ayon_server.addons import BaseServerAddon
from ayon_server.settings import BaseSettingsModel
# I've installed `art` module locally to my addon server code to a relative direcory called Lib
# pip install art --target=E:\Ynput\addons-test\my_addon\server\Libs
# Then, I've just created a package regulary and it included the Libs directory.
from .Libs.art import art
@MustafaJafar
MustafaJafar / name_convention_fix_script_maya.py
Created August 21, 2024 07:38
name_convention_fix_script.py
""" name convention fix script for Maya.
I used this script as a fix action for the following pyblish plugin in AYON: validate_transform_naming_suffix.py
plugin link:
https://github.com/ynput/ayon-maya/blob/develop/client/ayon_maya/plugins/publish/validate_transform_naming_suffix.py
"""
from collections import (defaultdict , OrderedDict )
import maya.mel as mel
import maya.cmds as cmds
objs_dic = defaultdict( list )
"""
Each publish record has only one product type but can include multiple representations.
e.g. a 'model' product type can include ('.abc', '.fbx', '.bgeo') representations.
which are the same data but saved in different formats.
Some Notes about Houdini dynamic creator:
Dynamic creator is accessed via code only.
Dynamic creator computes the representations on instance creation.
'CreateRuntimeInstance.create' expects some data to exist in order to compute the representations.
@MustafaJafar
MustafaJafar / !Upload addons via ayon api
Last active October 3, 2024 08:27
Upload addon zips automatically using ayon-python-api
!Upload addons via ayon api
@MustafaJafar
MustafaJafar / ayon-rest-api-tutorial.ipynb
Last active April 4, 2025 01:45
AYON REST API Tutorial
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.