Skip to content

Instantly share code, notes, and snippets.

View xDShot's full-sized avatar

xDShot

  • Digital Hell
View GitHub Profile
@xDShot
xDShot / move_calc.py
Created October 10, 2025 21:24
Gets bones move velocity
import bpy
from mathutils import Vector
def get_bone_fcurves(armature_object, bone_name):
"""
Retrieves a list of F-curves associated with a specific bone in an armature.
Args:
armature_object (bpy.types.Object): The armature object.
bone_name (str): The name of the bone.
#/bin/python
'''
pStudioHdr2.reserved[53]:
\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x00\x5A\x59\x58\x57\x56\x55\x54\x53\x52\x51\x50\x4F\x4E\x4D\x4C\x4B\x4A\x49\x48\x47\x46\x45\x44\x43\x42\x41\x00\x31\x32\x33\x34\x35\x36\x37\x38\x39\x00\x39\x38\x37\x36\x35\x34\x33\x32\x31\x00\x51\x57\x45\x52\x54\x59\x55\x49\x4F\x50\x00\x41\x53\x44\x46\x47\x48\x4A\x4B\x4C\x00\x5A\x58\x43\x56\x42\x4E\x4D\x00\x50\x59\x46\x47\x43\x52\x4C\x41\x4F\x45\x55\x49\x44\x48\x54\x4E\x53\x00\x00\x00\x49\x6E\x64\x69\x61\x00\x4A\x75\x6C\x69\x65\x74\x74\x00\x4B\x69\x6C\x6F\x00\x4C\x69\x6D\x61\x00\x4D\x69\x6B\x65\x00\x4E\x6F\x76\x00\x4F\x73\x63\x61\x72\x00\x50\x61\x70\x61\x00\x51\x62\x65\x63\x00\x52\x6F\x6D\x65\x6F\x00\x53\x69\x65\x72\x61\x00\x54\x61\x6E\x67\x6F\x00\x55\x6E\x66\x72\x6D\x00\x00\x00\x00\x00\x00\x10\x09\x08\x00\x00\x00\x00\x00\x00\x00\x00
'''
numbones = 126
numanims = 62
#/bin/bash
export PREFIX=${HOME}/cctools
pushd cctools-port/cctools
# Build for arm64
./configure \
--prefix=${PREFIX} \
--with-libtapi=${PREFIX} \
--target=aarch64-apple-darwin
#/bin/bash
export PREFIX=${HOME}/cctools
export PATH="/usr/lib/ccache/bin:$PATH"
export TAPI_VERSION=1600.0.11.8
#wget -O libtapi.tar.gz https://github.com/tpoechtrager/apple-libtapi/archive/refs/heads/${TAPI_VERSION}.tar.gz
rm -r apple-libtapi-${TAPI_VERSION}
tar xf libtapi.tar.gz
@xDShot
xDShot / yt-dlp-templates.sh
Created June 14, 2024 20:31
yt-dlp templates
# Yandex
export YA_ALBUM="Albums/%(artist)s/%(album)s (%(release_year)s)/%(track_number)02d %(artist)s - %(track)s-%(id)s.%(ext)s"
export YA_TRACK="%(artist)s - %(track)s-%(id)s.%(ext)s"
function YA_dl () {
yt-dlp --cookies-from-browser chrome -o "$1" --restrict-filenames $2
}
import bpy
obj = bpy.context.selected_objects[0]
current_action = obj.id_data.animation_data.action
current_endframe = bpy.context.scene.frame_end
current_fps = bpy.context.scene.render.fps
remap_table = {
"Activate": "ex_m1911_pullout",
"Activate_SingleArm": "ex_m1911_dw_rh_pullout",
#!/usr/bin/env python
import os
import sys
from ctypes import CDLL
from subprocess import run
os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"] = os.getenv("HOME") + "/.local/share/Steam/"
os.environ["PROTONDIR"] = os.getenv("STEAM_COMPAT_CLIENT_INSTALL_PATH") + "steamapps/common/Proton - Experimental/"
#os.environ["WINEDEBUG"] = "-all"
#os.environ["PROTON_LOG"] = "1"
@xDShot
xDShot / usbcore_use_both_schemes.conf
Created July 19, 2023 10:38
Fix Quest 2 usb MTP
#/etc/modprobe.d/usbcore_use_both_schemes.conf
options usbcore use_both_schemes=y
while read p; do echo "\$sequence $p ${p}.smd"; done < seqs.txt
@xDShot
xDShot / alyxfollower.cfg
Created June 20, 2023 19:17
Alyx follower
npc_create_equipment weapon_alyxgun; wait; npc_create npc_alyx; wait; ent_setname alyx; wait; ent_create ai_goal_follow actor alyx goal !player StartActive 1 Formation 3