Skip to content

Instantly share code, notes, and snippets.

View joshpinto6's full-sized avatar
👋
Contributing to Open-Source

Joshpinto6 joshpinto6

👋
Contributing to Open-Source
View GitHub Profile
@GK-GreyGhost
GK-GreyGhost / MixamoPacker.gd
Created November 18, 2022 03:31
extracts animations from downloaded mixamo fbx files and puts them into one AnimationPlayer
extends AnimationPlayer
tool
#put all your downloaded fbx files from mixamo into scenes
export(Array,PackedScene) var scenes = []
func process_file(packed:PackedScene):
var scene = packed.instance()
var ap2:AnimationPlayer = scene.get_node('RootNode/AnimationPlayer')
for anim in ap2.get_animation_list():
@GK-GreyGhost
GK-GreyGhost / screenshot.gd
Created October 7, 2022 03:14
Create a folder in the format year-month-day and save the screenshot
func screenshot():
var img = get_viewport().get_texture().get_data()
img.flip_y()
var dir:Directory = Directory.new()
var now = OS.get_date()
var folder:String = 'user://screenshots/%s-%s-%s' % [now.year,now.month,now.day]
dir.make_dir_recursive(folder)
img.save_png(folder+'/%d.png' % OS.get_unix_time())
@deakcor
deakcor / cropping_texture.shader
Created January 8, 2021 12:55
Cropping shader for Godot Engine
/**
* Crop a texture.
* License: CC0
* https://creativecommons.org/publicdomain/zero/1.0/
*/
shader_type canvas_item;
uniform float crop_left:hint_range(0.0,1.0,0.01) = 0.0;
uniform float crop_right:hint_range(0.0,1.0,0.01) = 0.5;
uniform float crop_top:hint_range(0.0,1.0,0.01) = 0.0;
@deakcor
deakcor / color_replacement.shader
Created January 8, 2021 12:45
Color replacement shader for Godot Engine
/**
* Replace a color by another one.
* License: CC0
* https://creativecommons.org/publicdomain/zero/1.0/
*/
shader_type canvas_item;
uniform vec4 remove_color: hint_color;