Skip to content

Instantly share code, notes, and snippets.

View LichiMan's full-sized avatar

Miguel González Viñé LichiMan

View GitHub Profile
@LichiMan
LichiMan / python_package.py
Created October 7, 2025 10:34 — forked from zachlewis/python_package.py
rez packages: uv and python
name = "python"
version = "3.13.1"
authors = ["Guido van Rossum"]
description = "The Python programming language"
private_build_requires = ['uv-0.7.13+<1']
from arnold import *
import GafferArnold
import ctypes
import imath
import Gaffer
def convert_parameters( gaffer_shader, node ):
node_name = AiNodeGetName( node )
entry = AiNodeGetNodeEntry( node )
@LichiMan
LichiMan / avalon_compare_alembic_hierarchy_diferences.py
Created July 30, 2019 14:43 — forked from BigRoy/avalon_compare_alembic_hierarchy_diferences.py
An example gist that shows how to compare different the hierarchy paths between published Alembic files and print out the differences. This is a more elaborate example of a prototype I wrote here: https://github.com/getavalon/core/issues/101#issuecomment-516337513
from avalon import api
from avalon import io
import alembic.Abc
def get_alembic_paths(filename):
"""Return all full hierarchy paths from alembic file"""
# Normalize alembic path
path = os.path.normpath(filename)
@LichiMan
LichiMan / alembic_get_inclusive_matrix.py
Created July 30, 2019 14:43 — forked from BigRoy/alembic_get_inclusive_matrix.py
Example using Alembic python api to get the full inclusive matrix for objects in the .abc file.
import alembic.Abc
from alembic.AbcGeom import IXform
kWrapExisting = alembic.Abc.WrapExistingFlag.kWrapExisting
def get_matrix(obj):
if not IXform.matches(obj.getHeader()):
raise TypeError("Object is not an xform: {0}".format(obj))
@LichiMan
LichiMan / alembic_has_any_shapes.py
Created July 30, 2019 14:43 — forked from BigRoy/alembic_has_any_shapes.py
Python script using Alembic api to detect whether an .abc file contains any shapes.
import alembic
def any_shapes_in_alembic(filename):
"""Return object ids from the Alembic hierarchy
Reads an Alembic archive hierarchy and retrieves the
value from the id properties on the objects.
Arguments:
filename (str): Full path to Alembic archive to read.