Skip to content

Instantly share code, notes, and snippets.

View mwnDK1402's full-sized avatar

Wagner mwnDK1402

View GitHub Profile
@Dogydogsun
Dogydogsun / xform_to_offset.py
Last active May 2, 2022 12:54
A short Maya script for transferring selected object transforms to their offset matrixes. Deletes old transforms after finishing. Useful for creating controllers when rigging.
"""
To use, paste this code into the script window in Maya. Make sure to paste it into a Python panel.
You can then mark the entire script with ctrl+a, and middle-mouse drag it onto a shelf to create a shortcut button.
Script works with multiple selections. Simply select all the objects that you want to transfer the objects transform to their
offset matrices on, and then run the script.
@author Frederik N. S. Larsen
"""
from maya.api.OpenMaya import MEulerRotation, MMatrix
@katas94
katas94 / WorldSpaceUIDocument.cs
Created October 27, 2021 19:11
Custom Unity component to create a world-space UIToolkit panel
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.EventSystems;
using UnityEngine.Rendering;
namespace Katas.Experimental
{
public class WorldSpaceUIDocument : MonoBehaviour, IPointerMoveHandler, IPointerUpHandler, IPointerDownHandler,
ISubmitHandler, ICancelHandler, IMoveHandler, IScrollHandler, ISelectHandler, IDeselectHandler, IDragHandler
@DanDiplo
DanDiplo / JS-LINQ.js
Last active October 31, 2024 12:33
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },