Skip to content

Instantly share code, notes, and snippets.

View Cariaga's full-sized avatar
🌎
Working from home

a Cariaga

🌎
Working from home
View GitHub Profile
@Cariaga
Cariaga / 1) ( better than other one) Unreal merge seperate LOD files disable nanite set up collsion (uses individual LOD as referance)
Last active August 26, 2025 07:43
1) ( better than other one) Unreal merge seperate LOD files disable nanite set up collsion (uses individual LOD as referance)
# Creates/Overwrites new, consolidated Static Meshes, disables Nanite, and sets complex collision.
# This is a non-destructive workflow by default, with an option to enable overwriting.
# Run inside Unreal Editor's Python console.
import unreal
import os
import re
import traceback
# --------------------------------- USER CONFIG ---------------------------------
# The folder in your Content Browser containing ALL the individual Static Mesh LODs.
@Cariaga
Cariaga / 0) Better terrain LOD Generator And Slicer
Last active August 26, 2025 06:03
Blender Terrain slicer to grid with divisor and ratio and stat includes tri stats per lod
bl_info = {
"name": "LOD Slicer Workflow Tool",
"version": (10, 3, 5),
"blender": (4, 0, 0),
"location": "View3D > Sidebar > LOD Slicer",
"description": "Generate non-destructive LODs, slice meshes on baked duplicates, and control LOD visibility.",
"warning": "",
"doc_url": "",
"category": "Object",
@Cariaga
Cariaga / GAEA Built TO Blender batch import
Last active August 19, 2025 04:15
GAEA Built TO Blender batch import
# Save this script as a .py file and install it via Blender's Preferences > Add-ons
bl_info = {
"name": "FBX Map LOD Side Panel Importer",
"version": (1, 2), # Version updated
"blender": (3, 0, 0),
"location": "3D View > Sidebar (N Panel) > Map Importer",
"description": "Imports a structured map from FBX files via a side panel UI. Safe to re-run.",
"category": "Import-Export",
}
@Cariaga
Cariaga / GAEA Batch terrain build unique folder each build
Last active August 19, 2025 04:50
GAEA Batch terrain build unique folder each build
@echo off
:: ============================================================================
:: Gaea Batch Build & Rename Script (with Unique Timestamp) - v3 (Robust)
:: ============================================================================
:: 0. Cleans the output directory with error checking to ensure a fresh build.
:: 1. Runs six sequential Gaea builds into a static output folder.
:: 2. After all builds are complete, renames the output folder with a
:: unique YYYYMMDD-HHMMSS timestamp for versioning.
:: ============================================================================
@Cariaga
Cariaga / kitra inspect kitra api
Created August 17, 2025 00:01
kitra inspect kitra api
import sys
import os
from datetime import datetime
from krita import Krita
from PyQt5.QtWidgets import QMessageBox
def inspect_object(obj, object_name):
"""Inspects a Python object and returns a formatted string of its attributes."""
if obj is None:
return f"'{object_name}' is not available (None).\n"
@Cariaga
Cariaga / Kitra arrange layers into grid and corner based on selection of layers
Last active August 17, 2025 00:59
Kitra arrange layers into grid and corner based on selection of layers
from krita import Krita
from PyQt5.QtWidgets import (QDialog, QVBoxLayout, QHBoxLayout, QLabel,
QSpinBox, QPushButton, QFormLayout, QSpacerItem,
QSizePolicy, QMessageBox, QCheckBox, QComboBox,
QGroupBox)
class LayerArrangerDialog(QDialog):
"""
A dialog for arranging layers with a polished UI, multi-corner reset,
and intra-cell alignment.
@Cariaga
Cariaga / Kitra Text grid script with row column based on canvas size evenly spaced
Last active August 16, 2025 15:45
Kitra Text grid script with row column based on canvas size evenly spaced
# Krita Text Grid Generator (Definitive SVG Method - with UI and Formatting)
# This script prompts the user for grid dimensions, numbering style, and font size,
# then automatically generates an evenly spaced text grid that fits the canvas.
try:
from krita import Krita
from PyQt5.QtWidgets import (QDialog, QSpinBox, QLabel, QVBoxLayout,
QFormLayout, QDialogButtonBox, QComboBox)
from PyQt5.QtGui import QColor
except ImportError:
@Cariaga
Cariaga / 1) kitra split and place to corner
Last active August 17, 2025 03:07
kitra grid split image to layer place to corner
import math
from krita import Krita
# CHANGED: Imported QComboBox
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QHBoxLayout, QFormLayout, QComboBox, QPushButton, QMessageBox, QLabel
from PyQt5.QtCore import Qt
app = Krita.instance()
# --- Main dialog ---
def show_split_by_size_dialog():
@Cariaga
Cariaga / kitra script a layer into multiple parts as grid 512,1024,2048 etc.
Last active August 17, 2025 02:26
kitra script split a layer into multiple parts as grid 512,1024,2048 etc.
# Krita script to split the active layer into a grid of new layers
# based on a user-specified cell size.
import math
from krita import Krita, QMessageBox
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QFormLayout, QSpinBox, QPushButton
def show_split_by_size_dialog():
"""
Creates and displays a dialog for the user to specify cell size parameters.
@Cariaga
Cariaga / Kitra stitch script for conneting a grid of photos
Last active August 16, 2025 11:03
Kitra stitch script for conneting a grid of photos
# stitch_heightmap_kitra.py
# Stitches 16x8 tiles into a single paint layer with no popups (uses QImage, not openDocument).
import os
from krita import Krita
from PyQt5.QtGui import QImage
# --- CONFIG ---
image_folder = r"C:\Users\user\Documents\World Creator\Export\Heightmap"
filename_pattern = "Continent1_Height Map_1024x1024_{x}_{y}.png"