This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; |