Skip to content

Instantly share code, notes, and snippets.

View don1138's full-sized avatar
🐝

Don Schnitzius don1138

🐝
View GitHub Profile
@don1138
don1138 / enable_addons.py
Created January 22, 2023 06:02
Blender - Enable/disable all add-ons
import bpy
# GET LIST OF ALL ENABLED ADD-ONS
# print(bpy.context.preferences.addons.keys())
modules = [
'add_mesh_extra_objects',
'amaranth',
'cycles',
@don1138
don1138 / print_enabled_addons.py
Created January 22, 2023 05:57
Blender - Print all enabled add-ons
#PRINT LIST OF NAMES
#import bpy
#for addon in bpy.context.preferences.addons:
# print(addon.module)
#PRINT LIST OF NAMES AS ARRAY
@don1138
don1138 / python_comments.py
Created January 22, 2023 05:54
Python comment formats
# Comment
""" Comment """
"""
Block comment
"""
@don1138
don1138 / bsdf_shader_node_inputs.py
Last active July 18, 2024 23:09
Blender - List Inputs and outputs of nodes in Blender
# LIST NODE INPUTS/OUTPUTS
import bpy
selNode = bpy.data.materials["Material"].node_tree.nodes["Principled BSDF"]
for i, o in enumerate(selNode.inputs):
print(i, o.name)
for i, o in enumerate(selNode.outputs):
@don1138
don1138 / phi_cascade.py
Last active November 7, 2023 01:46
Phi, Ascending, Descending, and Exponent; and the Chessboard Rice values
import bpy
from math import sqrt
phi = (1 + sqrt(5)) / 2
# phi = 5 ** .5 * .5 + .5
# ASCENDING
e1 = [round((x * phi),3) for x in range(1,17)]
print(f"\nAscending = {e1}")
@don1138
don1138 / blender-render.ipynb
Created August 9, 2022 08:04 — forked from AnnikenYT/blender-render.ipynb
Blender Render.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@don1138
don1138 / blender_python_modifier_chars.py
Last active September 23, 2020 06:15
Modifier Key Symbols for Text Labels
# If you want to use modifier keys symbols in your text labels, use these:
# Control βŒƒ
# Option/Alt βŒ₯
# Shift ⇧
# Command ⌘
@don1138
don1138 / text-format-settings.swift
Last active April 1, 2023 16:02
Style settings for SwiftUI Text object
// Xcode - Text Formatting
// https://daddycoding.com/2019/12/26/swiftui-text/
Text("Sample Text")
.font(.system(
size: 15,
weight: .semibold,
design: .default // .default, .serif, .rounded, .monospaced
))
@don1138
don1138 / easings.css
Created September 13, 2020 03:03 — forked from ControlledChaos/easings.css
Handy CSS properties for easing functions
:root {
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
--ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
--ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
--ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335);
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
@don1138
don1138 / set-percentage-width.swift
Last active July 18, 2024 21:29
Use percentage widths on SwiftUI layout objects
// Get screen width and subtract Safe Area margins
var containerWidth:CGFloat = UIScreen.main.bounds.width - 32.0
// Set frame width of each column using (containerWidth * percentage)
HStack (spacing:0) {
HStack {
Text("Column 25% Width")
}
.frame(width: containerWidth * 0.25)
HStack {