Skip to content

Instantly share code, notes, and snippets.

View megalon's full-sized avatar

megalon megalon

View GitHub Profile
@PeterDrakeNichols
PeterDrakeNichols / unfillShape.py
Last active June 28, 2023 20:52
Krita script to change filled shape to an outline that is easily refillable. Meant to make fixing animation spacing easier with the onion skin docker.
from krita import *
#A script to cut out the center of a filled shape so that you can see spacing better with the onion skin docker.
#Go to the frame and layer you want run the script and your left with an outline that you can see properly in the onion skin
#Just fill it back up when your done with the bucket tool
##------IMPORTANT!!!!!--------## Make sure onion skin opacity is less than 95% ish
#TIP: when refilling set your bucket tool to grow by 1px ish to get rid of any artifacts
#To add it to your project just go to tools -> scripts -> ten scripts-> click the elipse next to the hot key you want
#-> navigate to the script and your done!
@dtupper
dtupper / reset_selected_verts_to_basis.py
Last active June 25, 2023 01:53
reset_selected_verts_to_basis.py
import bpy
def set_basis_shapekey(ignore_keys=[], ignore_active=False):
obj = bpy.context.active_object
if obj.type != 'MESH':
print("Active object is not a Mesh")
return
if len(obj.data.shape_keys.key_blocks) < 2:
@Spongert
Spongert / TMPro-Billboard.shader
Created July 5, 2019 12:14
Unity TextMeshPro Billboard / always facing camera shader
Shader "TextMeshPro/Distance Field-BillboardFacing"
{
// Billboarding version for TextMeshPro (tested in 2018.3), based on default Distance Field shader.
// ** Important part is to DISABLE the dynamic batching! (happens in this shader) **
// ...Took a while to figure out that one.
//
// Use as you like!
// - Almar
@mio-moto
mio-moto / greenscreen.cginc
Created October 16, 2017 09:59
Basic Chroma Keying HLSL Shader
float _Tolerance;
float _Threshold;
// Color Space Conversions can be found here:
// http://www.poynton.com/PDFs/coloureq.pdf
// http://dougkerr.net/Pumpkin/articles/CIE_XYZ.pdf
// cn -> color normalization
float cnRGB2XYZ(float val) {
if(val > 0.04045) {
return pow((val + 0.055) / 1.055, 2.4);
}
@mattatz
mattatz / LabColorspace.cginc
Created November 25, 2015 05:35
Conversion between RGB and LAB colorspace shader for Unity.
#ifndef __LAB_COLORSPACE__
#define __LAB_COLORSPACE__
/*
* Conversion between RGB and LAB colorspace.
* Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138
*/
float3 rgb2xyz( float3 c ) {
float3 tmp;
@masa795
masa795 / UnityTextures.cs
Created June 17, 2013 14:12
Unityが持っているアイコンを表示する。 Unityのバージョンによってはパスが使えなくなるかもしれないので使用時は注意。
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
//Unity 4.1.5
public class UnityTextures : EditorWindow
{
@yadyn
yadyn / SemanticVersion.cs
Created May 6, 2011 18:11
Semantic Version C# class
using System;
using System.Collections.Generic;
using System.Text;
/// <summary>
/// Represents assembly, application, or other version information,
/// compliant with the Semantic Versioning specifications.
/// </summary>
/// <remarks>
/// See http://semver.org/ for specifications.