openpype
->ayon_core
- Loader plugins
update
method now takescontext
instead ofrepresentation
argument | ynput/ayon-core#130 - Loader plugins attribute
families
(list) ->product_types
(set) | ynput/ayon-core#191 - Creator plugins:
family
->productType
| ynput/ayon-core#113 - Refactor
OpenPypeModule
->AYONAddon
| ynput/ayon-core#22- now in
ayon_core.addon
instead ofayon_core.modules
- now in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_clip_usage(media_pool_item, project): | |
"""Return all Timeline Items in the project using the Media Pool Item. | |
Each entry in the list is a tuple of Timeline and TimelineItem so that | |
it's easy to know which Timeline the TimelineItem belongs to. | |
Arguments: | |
media_pool_item (MediaPoolItem): The Media Pool Item to search for. | |
project (Project): The resolve project the media pool item resides in. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""WARNING! Set random status for all your versions in the project.""" | |
import random | |
from ayon_core.pipeline import get_current_project_name | |
from ayon_api import get_project, get_versions | |
from ayon_api.operations import OperationsSession | |
project_name = get_current_project_name() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
path = r"C:\Users\User\Downloads\publish-report-240730-17-33.json" | |
with open(path, "r") as f: | |
data = json.load(f) | |
for plugin_data in data["plugins_data"]: | |
label = plugin_data["label"] |
When doing face assignments or other component members into a set and then query cmds.sets(my_set, query=True)
you get the members like:
pCube1.f[0:4]
Instead of
pCubeShape1.f[0:4]
For whatever reason someone thought it would be nice to make it look as if the components are on the transform instead of shape. Does anyone know a maya command to expand that to the shape?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ayon_core.pipeline import registered_host | |
from ayon_core.pipeline.create import CreateContext | |
import pyblish.api | |
family = "pointcache" | |
host = registered_host() | |
context = CreateContext(host) | |
plugins = pyblish.api.plugins_by_family(context.publish_plugins, family) | |
for plugin in plugins: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ayon_core.pipeline import get_current_project_name | |
import ayon_api | |
from ayon_api.entity_hub import EntityHub | |
project_name = get_current_project_name() | |
hub = EntityHub(project_name) | |
for folder_name in ["asset1", "asset2"]: | |
folder_entity = hub.add_new_folder( | |
folder_type="Shot", # folder type must exist in project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import difflib | |
import ayon_api | |
amount = 10 | |
for event_ in ayon_api.get_events( | |
topics={"settings.changed"}, | |
# Set more filters if needed | |
# newer_than="isoformat-date", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import logging | |
from typing import List | |
import mayaUsd.lib as mayaUsdLib | |
from pxr import Sdf | |
def log_errors(fn): | |
"""Decorator to log errors on error""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.OpenMayaUI as mui | |
import shiboken2 | |
from PySide2 import QtWidgets | |
# <-- get maya main window QMainWindow --> | |
ptr = mui.MQtUtil.mainWindow() | |
main_window = shiboken2.wrapInstance(int(ptr), QtWidgets.QMainWindow) | |
# <-- set wordWrap on script editor feedback field --> | |
cmdScrollFieldReporter = main_window.findChild(QtWidgets.QPlainTextEdit, "cmdScrollFieldReporter1") |