Skip to content

Instantly share code, notes, and snippets.

@BigRoy
BigRoy / usd_list_layer_edits_editor.py
Last active February 27, 2024 23:16
Quick and dirty "List USD Layer Edits" to allow removal of Sdf.PrimSpec, Sdf.PropertySpec, Sdf.AttributeSpec, Sdf.RelationshipSpec through a Python Qt interface
from PySide2 import QtCore, QtWidgets, QtGui
from pxr import Usd, Tf, Sdf
# See: https://github.com/PixarAnimationStudios/OpenUSD/blob/release/pxr/usd/sdf/fileIO_Common.cpp#L879-L892
SPECIFIER_LABEL = {
Sdf.SpecifierDef: "def",
Sdf.SpecifierOver: "over",
Sdf.SpecifierClass: "abstract"
}
@BigRoy
BigRoy / usdviewport_qt.py
Last active October 26, 2024 16:32
Example of how to embed a simple USD viewport in Qt application
"""
MIT License
Copyright (c) 2019 Roy Nieterau
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@Bluscream
Bluscream / obs_twitch_chat.css
Last active October 4, 2024 07:05
Twitch chat transparent popout for OBS
/*
Twitch chat browsersource CSS for OBS
Original by twitch.tv/starvingpoet modified by github.com/Bluscream
Just set the URL as either one of
- https://www.twitch.tv/%%TWITCHCHANNEL%%/chat?popout=true
- https://www.twitch.tv/popout/%%TWITCHCHANNEL%%/chat
- https://www.twitch.tv/embed/%%TWITCHCHANNEL%%/chat?parent=localhost
And paste this entire file into the CSS box or paste direct import css like
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@JohnOnSoftware
JohnOnSoftware / XGenForArnold.cpp
Last active February 22, 2024 09:45
Core code to support XGen Interactive Grooming in Arnold
MFnDagNode fnDagNode(m_dagPath);
// Apply the render overrides
static const MString sApplyRenderOverrideCmd = "xgmSplineApplyRenderOverride ";
MGlobal::executeCommand(sApplyRenderOverrideCmd + fnDagNode.partialPathName());
// Stream out the spline data
std::string data;
MPlug outPlug = fnDagNode.findPlug("outRenderData");
MObject outObj = outPlug.asMObject();
@alecthomas
alecthomas / Notifications.hh
Created November 19, 2014 22:53
EntityX system for replacing all builtin events
#pragma once
#include <vector>
#include <entityx/Entity.h>
#include <entityx/System.h>
namespace entityx {
struct Notification : public Component<Notification> {
EntityManager::ComponentMask components_added, components_removed;