Skip to content

Instantly share code, notes, and snippets.

View BigRoy's full-sized avatar

Roy Nieterau BigRoy

View GitHub Profile
@BigRoy
BigRoy / ayon_docker_notes.md
Last active October 26, 2024 08:45
Ayon docker, install, setup and management notes

Note these are not any official notes - just random scribbles

Bootstrap

Running bootstrap wont give you the latest dev versions, only whats been released on the bootstrap server by the ynput team.

Updating it from time to time is a good way to see what progress has been made in terms of addons etc. It shouldnt remove old addon version, only add the new ones. That way you can still use older addons should you need. You would need to create a new bundle to accommodate that.

@BigRoy
BigRoy / usd_get_registered_prim_type_schemas.py
Created November 19, 2023 22:59
Get all registered prim types to create by a nice plug-in grouping
from pxr import Usd, Plug, Tf
from collections import defaultdict
NICE_NAMES = {
"usdGeom": "Geometry",
"usdLux": "Lighting",
"mayaUsd_Schemas": "Maya Reference",
"usdMedia": "Media",
"usdRender": "Render",
"usdRi": "RenderMan",
@BigRoy
BigRoy / usd_sdf_move_prim_spec.py
Last active September 20, 2024 10:46
USD API move prim spec including repathing relationships and connections to it and its children in a single Sdf Layer
from pxr import Sdf, Usd
LIST_ATTRS = ['addedItems', 'appendedItems', 'deletedItems', 'explicitItems',
'orderedItems', 'prependedItems']
def repath_properties(layer, old_path, new_path):
"""Re-path property relationship targets and attribute connections.
This will replace any relationship or connections from old path
@mcoliver
mcoliver / migratecinesync.py
Created January 18, 2023 01:33
migrate cinesync v4 to v5
import uuid
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
# Download cinesync v4 list by saving the html at https://www.cinesync.com/dashboard
# cat cineSync.html | grep c-callout__heading | grep -o -P '(?<=\>).*(?=\<)' | sort | uniq | grep '@' > useraccounts.txt
# Run this script once and sign in to set your cinesync login credentials
# send an email to the list to have them reset their password @ https://5.cinesync.com/auth/password_reset/
@BigRoy
BigRoy / pyblish_debug_stepper.py
Last active September 6, 2024 17:41
Pyblish debug stepper - pauses between each plug-in process and shows the Context + Instances with their data at that point in time
import pprint
import inspect
import html
import copy
import pyblish.api
from Qt import QtWidgets, QtCore, QtGui
TAB = 4* "&nbsp;"
@zachlewis
zachlewis / package.py
Last active February 14, 2022 03:25
alternate python rez package
name = "python"
version = "3.8.6"
authors = [
"Guido van Rossum"
]
description = \
"""
@BigRoy
BigRoy / avalon_cgwire_qtazu_link.py
Last active February 27, 2024 23:21
Example API for linking CG-Wire with Avalon with Qtazu
@Muream
Muream / bake_to_opm.py
Last active November 11, 2024 11:58
This script bakes the transformation of a node to its offset parent matrix which then acts as its rest matrix. Only works with maya 2020 and up.
import maya.api.OpenMaya as om
import maya.cmds as cmds
TRANSFORM_NODETYPES = ["transform", "joint"]
def has_non_default_locked_attributes(node):
locked_attributes = []
for attribute in ["translate", "rotate", "scale", "jointOrient"]:
default_value = 1 if attribute == "scale" else 0
for axis in "XYZ":
@tokejepsen
tokejepsen / otio_to_ffmpeg.py
Last active November 24, 2020 08:48
OTIO to FFMPEG
import subprocess
import sys
import os
import json
import shutil
import requests
import opentimelineio as otio
@davidlatwe
davidlatwe / plugins.py
Created September 1, 2019 10:17
Maya scene modification aware via Pyblish
"""Implement scene modification awareness
By tracking Maya's undo queue, if there are any undo command that is not
a simple select after collecting completed, consider this scene has been
modified and require to reset Pyblish.
"""
import collections