Skip to content

Instantly share code, notes, and snippets.

View L0Lock's full-sized avatar
🦆
Ducking arround

Lauloque L0Lock

🦆
Ducking arround
View GitHub Profile
@L0Lock
L0Lock / autoexec.cfg
Created March 26, 2024 10:53
STAR WARS Jedi Knight II - Jedi Outcast -- autoexec.cfg file to put in game location/GameData/base/
# quality tweaks
seta r_allowExtensions "0"
seta r_ext_compress_textures "0"
seta r_ext_compress_lightmaps "0"
seta cl_mouseAccel "0"
seta r_ext_compiled_vertex_array "0"
seta r_picmip "0"
seta r_detailtextures "1"
seta r_texturebits "32"
seta r_texturebitslm "0"
@L0Lock
L0Lock / blenderCommunityKeyboard.user.js
Created January 2, 2024 23:38
kbd formatting function for blender.community
// ==UserScript==
// @name Keyboard formatting for Blender.Community
// @description Adds the ability to quickly insert keyboard formatting tags in Blender.Community posts and comments
// @include https://blender.community/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @version 7.0.1
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
@L0Lock
L0Lock / maya_save_icon.py
Created July 7, 2023 16:55
Maya saves any icon you want
from pymel.core import *
import os
import maya.api.OpenMaya as om
def main():
###### USER CUSTOMIZATION ######
ICONS_ITEMS = "play_regularrrrr.png"
OUTPUT_DIRECTORY = "C:/temp/icons/"
# Don't forget the closing slash!
###### ###### ###### ######
@L0Lock
L0Lock / yt-dlp_album_download.txt
Created January 26, 2023 16:54
example of how to download an album that has been compiled into a single Youtube video wich chapters
yt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 320k --split-chapters -o "chapter:%userprofile%/Downloads/YT-DLP/Gjallarhorn/Rimfaxe (2006)/1- %(section_title)s.%(ext)s" https://www.youtube.com/watch?v=ncZ-NtsVQNU
The result file names will be "1-01 - Chapter Name.mp3"
I add a "1" in front as the volume number, but you do you.
section_title (string): Title of the chapter
section_number (numeric): Number of the chapter within the file
section_start (numeric): Start time of the chapter in seconds
section_end (numeric): End time of the chapter in seconds
@L0Lock
L0Lock / Maya_edit_shelfButton_self.py
Created January 19, 2023 19:52
This example script shows how to edit a shelf button. It cycles through the buttons of the current shown shelf, finds one by its name, and changes its icon label. I use it on a shelf button so that it edits itself on click.
import maya.cmds as cmds
import maya.mel as mel
import maya.api.OpenMaya as om
def buttonSwitch():
gShelfTopLevel = mel.eval("global string $gShelfTopLevel; $temp = $gShelfTopLevel;")
currentShelf = cmds.tabLayout(gShelfTopLevel, q=True, st=True)
buttons = cmds.shelfLayout(currentShelf, q=True, ca=True)
targetButton = 'ButtonName' # name, not icon label
@L0Lock
L0Lock / blender_true_fullscreen_viewport.py
Created January 15, 2023 03:14
True Fullscreen Viewport for Blender (not working)
import bpy
from bpy.props import (BoolProperty,
PointerProperty,
)
from bpy.types import (Panel,
Operator,
AddonPreferences,
PropertyGroup,
)
@L0Lock
L0Lock / overlay.py
Last active October 28, 2022 07:59
Overlays drag-n-dropped files at the center of a given file (line 24) using ffmpeg
import sys, subprocess, time, os, shutil
# FFMPEG_PATH = "./ffmpeg/ffmpeg"
# text formatting
class cmdUtils:
Purple = '\033[95m'
Blue = '\033[94m'
Cyan = '\033[96m'
Green = '\033[92m'
@L0Lock
L0Lock / Blender Addon.sublime-build
Last active June 9, 2023 06:40
Sublime Text build environment for Blender Addons
{
"cmd": "build_addon.py",
"working_dir": "$project_path",
"windows" : {
"shell": true
}
}
import tkinter as tk
### Vars
counting = False
hours, minutes, seconds = 0, 0, 0
totalWorktime, overtime = 0, 0
### Funcs
def start():
# ***************************************************
# README
# ***************************************************
# ***************************************************
# Select objects and execute to toggle Holdout
import pymel.core as pm #IMPORT PYMEL MODULE
#method
def SetHoldout():