Skip to content

Instantly share code, notes, and snippets.

@Andrej730
Andrej730 / rawHide.py
Last active May 14, 2025 05:52
rawHide - numpy 1.20+ fix
bl_info = {
"name": "rawHide",
"description": "toggle hide solution",
"author": "luiSSeyfer",
"version": (0, 0, 1),
"category": "View 3D",
"location": "View 3D",
"blender": (2, 80, 0)
}
@Andrej730
Andrej730 / blend.bt
Last active October 13, 2024 13:07
Blender DNA structure example
char BLENDER[7];
char pointer_size;
char endianness;
char version[3];
struct Block {
char block_id[4];
int size;
int64 address;
int sdna_index;
System Up Vector Handedness
Blender Z Right
Embergen Z Right
Houdini Y Right
Unreal Engine Z Left
@Andrej730
Andrej730 / encoder.py
Last active April 9, 2024 23:02
Custom Python json.JSONEncoder that doesn't create add new lines for list items
"""Implementation of JSONEncoder
"""
import re
import collections.abc
try:
from _json import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
@Andrej730
Andrej730 / text_editor_reload_if_modified.py
Last active March 3, 2025 20:31
Blender - Automatically reload texts which has changed externally
# ***** BEGIN GPL LICENSE BLOCK *****
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@Andrej730
Andrej730 / reroute_to_python_console.py
Created October 5, 2023 11:36 — forked from tin2tin/log.py
Route system output (stdout/stderr) of Blender to the app console (install as an addon)
bl_info = {
"name": "Reroute System Console Ouput to Python Console",
"author": "@tamask, @tin2tin, @Andrej730",
"version": (1, 0),
"blender": (3, 0, 0),
"location": "Python Console header",
"description": "",
"warning": "",
"category": "Development"
}
@Andrej730
Andrej730 / transfer_vertex_order.py
Created September 16, 2023 17:13
transfer_vertex_order.py
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@Andrej730
Andrej730 / notes_solvespace_example_py.md
Last active July 24, 2024 12:20
Solvespace Python example and notes
@Andrej730
Andrej730 / generate_bolts_yml.py
Created July 17, 2023 11:52
generate_bolts_yml.py
from pathlib import Path
from pprint import pprint
def find_nth_overlapping(haystack, needle, n=1):
start = haystack.find(needle)
while start >= 0 and n > 1:
start = haystack.find(needle, start+1)
n -= 1
return start
@Andrej730
Andrej730 / python_console_scripts.py
Last active July 14, 2023 08:50
Run scripts in Python Console Blender addon
# got it from
# https://blender.stackexchange.com/questions/5394/is-there-anyway-to-make-blender-print-errors-in-the-ui
import bpy
bl_info = {
"name": "Run scripts in Python Console",
"author": "CoDEmanX",
"version": (1, 0),
"blender": (2, 80, 0),