Skip to content

Instantly share code, notes, and snippets.


Michael Gates MichaelGatesDev

View GitHub Profile
MichaelGatesDev / file.cpp
Last active Jan 24, 2022
Example of creating a local version of OnPossess for Unreal Engine 4
View file.cpp
// in game instance header file
virtual void Init() override;
void DispatchPawnControllerChange(APawn* InPawn, AController* InController);
// in game instance cpp file
void UVGameInstanceBase::Init()
MichaelGatesDev / gist:326da2b3e5fd76bf9977ad480d12caa3
Created Jan 23, 2022
Example of using RetrigerrableDelay in UE4
View gist:326da2b3e5fd76bf9977ad480d12caa3
FLatentActionInfo Info;
Info.Linkage = 0;
Info.CallbackTarget = this;
Info.ExecutionFunction = "MyFunction"; // this function must be marked with UFUNCTION() or it will not be called!
Info.UUID = GetUniqueID();
UKismetSystemLibrary::RetriggerableDelay(GetWorld(), 0.2f, Info);
MichaelGatesDev /
Created Aug 10, 2021
Remap & Remove Duplicate Materials + Textures in Blender
import bpy
# credit to
# remove duplicate materials
def remove_duped_materials():
mats =
for mat in mats:
(original, _, ext) =".")
MichaelGatesDev /
Created Jun 13, 2021
This will take each action that exists on the armature and export it with the armature with the file named as the action name. For use with Blender 2.91.
import bpy
import os
filepath =
directory = os.path.dirname(filepath)
all_action_names = [ for a in]
def remove_all_actions_except(ignored):
MichaelGatesDev / convert.bat
Last active Jun 13, 2021
Convert all files in the current directory to MP3 via FFMPEG
View convert.bat
for %%f in (*.flac) do ffmpeg -i "%%f" -acodec libmp3lame -ab 312k "%%~nf.mp3"
MichaelGatesDev / script.bat
Created Dec 29, 2016
Converts *.m4a to *.mp3 in the current folder (FFMPEG)
View script.bat
for %%f in (*.*) do ffmpeg -i "%%f" -acodec libmp3lame -ab 312k "%%f.mp3"