Skip to content

Instantly share code, notes, and snippets.

View MichaelGatesDev's full-sized avatar
🐧

Michael Gates MichaelGatesDev

🐧
View GitHub Profile
@MichaelGatesDev
MichaelGatesDev / combine-videos-mp4.ps1
Created September 24, 2024 19:53
Combine all MP4 files in the current directory using FFMPEG
# Set the working directory to the script's location
Set-Location -Path $PSScriptRoot
# Initialize an empty string to store the concatenated file list
$fileList = ""
# Define the path to files.txt
$filesTxtPath = "$PSScriptRoot\files.txt"
# Define the output file path
@MichaelGatesDev
MichaelGatesDev / remove_dupes.py
Created August 10, 2021 01:55
Remap & Remove Duplicate Materials + Textures in Blender
import bpy
# credit to https://blender.stackexchange.com/questions/75790/how-to-merge-around-300-duplicate-materials/229803#229803
# remove duplicate materials
def remove_duped_materials():
mats = bpy.data.materials
for mat in mats:
(original, _, ext) = mat.name.rpartition(".")
@MichaelGatesDev
MichaelGatesDev / export_each_action_with_rig_as_fbx.py
Created June 13, 2021 21:05
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 = bpy.data.filepath
directory = os.path.dirname(filepath)
all_action_names = [a.name for a in bpy.data.actions]
def remove_all_actions_except(ignored):
@MichaelGatesDev
MichaelGatesDev / convert.bat
Last active June 13, 2021 21:07
Convert all files in the current directory to MP3 via FFMPEG
for %%f in (*.flac) do ffmpeg -i "%%f" -acodec libmp3lame -ab 312k "%%~nf.mp3"
@MichaelGatesDev
MichaelGatesDev / script.bat
Created December 29, 2016 13:23
Converts *.m4a to *.mp3 in the current folder (FFMPEG)
for %%f in (*.*) do ffmpeg -i "%%f" -acodec libmp3lame -ab 312k "%%f.mp3"