Skip to content

Instantly share code, notes, and snippets.

@westonweiyi
westonweiyi / bitinn.py
Created June 12, 2023 06:46 — forked from bitinn/bitinn.py
Blender keymap for busy Maya / Unity / Substance Designer users
# version: 1.0.1
# latest source: https://gist.github.com/bitinn/22f6fefe026d8d9e83468864edb8f835
import bpy
import os
def kmi_props_setattr(kmi_props, attr, value):
try:
setattr(kmi_props, attr, value)
@westonweiyi
westonweiyi / SaveRenderTextureToFile.cs
Created February 23, 2023 03:21 — forked from krzys-h/SaveRenderTextureToFile.cs
[Unity] Save RenderTexture to image file
using UnityEngine;
using UnityEditor;
public class SaveRenderTextureToFile {
[MenuItem("Assets/Save RenderTexture to file")]
public static void SaveRTToFile()
{
RenderTexture rt = Selection.activeObject as RenderTexture;
RenderTexture.active = rt;
@westonweiyi
westonweiyi / BillboardFont.shader
Last active October 11, 2022 13:52
Unity TextMeshPro Billboard / always facing camera shader ,URP version. Put this shader into 'Assets\TextMesh Pro\Shaders'.
Shader "Weston/BillboardFont" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)