Skip to content

Instantly share code, notes, and snippets.

View Psyda's full-sized avatar

Saita Psyda

View GitHub Profile
@Psyda
Psyda / StarcraftTranslator.GS
Last active December 31, 2023 11:12
Starcraft Map GPT4 Korean Translator - Google Sheets AppScript
// Get the script properties
var scriptProperties = PropertiesService.getScriptProperties();
// Retrieve the value for a specific property
const SECRET_KEY = scriptProperties.getProperty('SECRET_KEY');
const assistantID = scriptProperties.getProperty('assistantID');
//const inputPrompt = "<6>악마 <6>점프뒷차기!";
function StarcraftTranslator(inputPrompt) {
@Psyda
Psyda / BigGreasyCursor.py
Created May 14, 2023 08:51
Enables a custom larger cursor when in Grease Pencil as the 'Dot' cursor is too small on some displays.
# I put a lot of effort into making this, so if you'd like to show your appreciation
# you can donate to me through PayPal at the link below: https://paypal.me/mintyfresh <3
bl_info = {
"name": "GPencil Cursor",
"author": "psyda",
"version": (1, 0),
"blender": (2, 93, 0),
"location": "View3D > AddonMenu > Tool > GPencil Cursor",
"description": "Custom cursor in GPencil Draw mode. For the blind, average-sized monitor users, and those with cursor commitment issues!",
@Psyda
Psyda / Blender KB3D PNG to JPG_and_Folder.py
Created February 17, 2023 11:02
Renames file extension paths from PNG to JPG. Also Tells the file to search for a folder called "Renamemetopackname" instead of the normal 4k folder.
import bpy
for img in bpy.data.images:
img.filepath = img.filepath.replace('.png', '.jpg')
img.name = img.name.replace('.png', '.jpg')
img.filepath = img.filepath.replace('4k', 'Renamemetopackname') #Rename that to whatever you renamed the 4k folder to. ie. CyberDistrict
img.name = img.name.replace('4k', 'Renamemetopackname') #Rename that to whatever you renamed the 4k folder to. ie. CyberDistrict
img.reload()
print("Done! Save your blend file!")
@Psyda
Psyda / Blender KB3D PNG to JPG Reference Fixer.py
Created September 26, 2022 20:38
This script changes every reference to an image in a Blend file from .png to .jpg. Useful for linking to compressed images
import bpy
for img in bpy.data.images:
img.filepath = img.filepath.replace('.png', '.jpg')
img.name = img.name.replace('.png', '.jpg')
img.reload()
print("Done! Save your blend file!")
#When it's finished make sure everything looks correct and save the blend file with a new name ie > Save-As "Packname_jpg.blend"
@Psyda
Psyda / Blender KB3D Collection Maker.py
Last active January 15, 2024 14:33
Moves all empty objects into collections named after them for easy importing into Blender's Asset Library
# Open your KB3D Pack. Make sure the textures are loaded and everything works as intended. This script assumes the Scene is named KB3D_"TitleCasePackName"-Native. It should be that by default.
# Create a new folder in your Asset Library Folder for Blender. (Edit>Preferences>FilePaths>AssetLibraries). I recommend a setup like this
# (D:/BlenderAssetLibraries/KB3D/CyberDistricts/Cyberdistricts.blend)
# Where "CyberDistricts" would be the AssetLibrary.
# Open the script in Blender by going to the Text Editor and clicking "Open" to locate the file, or paste it from the Gist.
# Run the script by clicking the "Run Script" button in the Text Editor or pressing Alt+P.
# The script will create new collections for each type of asset in your scene and move the assets into these collections. It will also generate a unique ID for the asset pack and each asset in the pack.
# The script will then update the asset catalog file to include the new asset pack and each asset in the pack.
# Once the script is finished, you can s