Ensure that uncomplye6 and black are installed. use conda, venv or just pip install to user..
pip install --user black uncompyle6cd| CC=gcc | |
| all: src/shim.c | |
| $(CC) -shared -fPIC -o shim.so src/shim.c -ldl |
| import enum | |
| import time | |
| import textwrap | |
| import qtawesome | |
| from PySide2 import QtCore, QtWidgets, QtGui | |
| __ICONS = {} |
| """ | |
| This example shows how to capture a screenshot of a specific area of the screen. | |
| Warning: This has not been tested with multiple monitors. | |
| Example: | |
| to capture the entire the current screen:: | |
| from PySide2 import QtCore, QtWidgets |
| """ | |
| A very basic example of a image annotation tool using a QWidget as a viewport. | |
| This implements | |
| - Viewport panning | |
| - Viewport zooming (maintaing Point Of Interest) | |
| - Basic draggable handles / gizmos | |
| """ | |
| from PySide6 import QtCore, QtGui, QtWidgets |
| """ | |
| Rob Fletcher 2025 | |
| This is an attempt to make a poor man's version of Katana's look files. | |
| We record any shader assignments on the descendants of a given group, each location is recorded as a relative path along | |
| with the shading engine that is assigned to it. | |
| Encoding: |
| """ | |
| A minimal example of MVC in PySide utilising a ThreadPollExecutor to offload work to a thread. | |
| """ | |
| import time | |
| from PySide2 import QtGui, QtWidgets, QtCore | |
| from concurrent.futures import ThreadPoolExecutor | |
| """ | |
| This is a cobbled together "copy paste" abomination which finds the bounding box of one image inside another. | |
| Useful for matching compositions. | |
| """ | |
| import numpy as np | |
| import cv2 as cv | |
| import matplotlib.pyplot as plt |
| import tank | |
| import os | |
| auth = tank.authentication.ShotgunAuthenticator() | |
| user = auth.get_user() | |
| sg = user.create_sg_connection() | |
| playlist_ids = [23024] |
| from PySide6 import QtWidgets | |
| """ | |
| This is a simple "trick" that uses "scaled integer arithmatic" to internally represent floating point values as integers. | |
| Using this coversion it makes it extremely simple to use the standard interger slider to work on floating point numbers. | |
| given a spinner with 2 decimal places. | |
| rounded = round(1.1111, 2) |