Skip to content

Instantly share code, notes, and snippets.

View stephensmitchell's full-sized avatar
💭
NNODESS

Stephen S. Mitchell stephensmitchell

💭
NNODESS
  • NNODESS
  • Earth
View GitHub Profile
@stephensmitchell
stephensmitchell / App.svelte
Created October 6, 2021 02:16 — forked from jasonsturges/App.svelte
3D with Svelte and Three.js
<script>
import { onMount } from 'svelte';
import { createScene } from "./scene";
let el;
onMount(() => {
createScene(el)
});
</script>
@stephensmitchell
stephensmitchell / basic_ui_documented.py
Created September 19, 2021 08:42 — forked from tin2tin/basic_ui_documented.py
A commented template for making simple UI in blender using the bpy python API
#import the bpy module to access blender API
import bpy
#WARNING: this is written and tested for blender 2.79
#blender 2.8 and newer will likely have a different python API
#create a property group, this is REALLY needed so that operators
#AND the UI can access, display and expose it to the user to change
#in here we will have all properties(variables) that is neccessary
class CustomPropertyGroup(bpy.types.PropertyGroup):
@stephensmitchell
stephensmitchell / basic_ui_documented.py
Created September 19, 2021 08:42 — forked from AzureDVBB/basic_ui_documented.py
A commented template for making simple UI in blender using the bpy python API
#import the bpy module to access blender API
import bpy
#WARNING: this is written and tested for blender 2.79
#blender 2.8 and newer will likely have a different python API
#create a property group, this is REALLY needed so that operators
#AND the UI can access, display and expose it to the user to change
#in here we will have all properties(variables) that is neccessary
class CustomPropertyGroup(bpy.types.PropertyGroup):
@stephensmitchell
stephensmitchell / create-png.sh
Last active January 10, 2023 16:46 — forked from osuka/create-png.sh
Create hi-res versions of images with Inkscape and Crop them with Gimp
#!/bin/bash
howmany=`ls *.svg|wc -l`
if [ $howmany -eq 0 ] ; then
echo "Please launch this from inside a folder with svg files."
exit
fi
# In Mac OS X scripting only works when invoked with FULL PATH
@stephensmitchell
stephensmitchell / NodeGraph.cpp
Created February 5, 2021 05:08 — forked from spacechase0/NodeGraph.cpp
ImGui node graph
#include <any>
#include <cmath>
#include <imgui.h>
#include <imgui_internal.h>
#include "NodeGraph.hpp"
namespace
{
@stephensmitchell
stephensmitchell / AutoHotKey script - Always-on-top.ahk
Created January 29, 2021 08:22 — forked from gustavomdsantos/AutoHotKey script - Always-on-top.ahk
AutoHotKey script that make any window Always-on-Top on Windows.
; Press Ctrl+Shift+Space to set any currently active window to be always on top.
; Press Ctrl+Shift+Space again set the window to no longer be always on top.
; Source: https://www.howtogeek.com/196958/the-3-best-ways-to-make-a-window-always-on-top-on-windows
^+SPACE::
WinGetTitle, activeWindow, A
if IsWindowAlwaysOnTop(activeWindow) {
notificationMessage := "The window """ . activeWindow . """ is now always on top."
notificationIcon := 16 + 1 ; No notification sound (16) + Info icon (1)
}
import inspect
""" var_dump('vars') module to dump variables (python 3.6+: uses f strings)"""
def var_dump(var_list_str):
""" print variables in callers scope indicated in space delimited string param"""
# retrieve information needed on callers frame
prev_frame = inspect.currentframe().f_back
frame_info = inspect.getframeinfo(prev_frame)
import inspect
""" var_dump('vars') module to dump variables (python 3.6+: uses f strings)"""
def var_dump(var_list_str):
""" print variables in callers scope indicated in space delimited string param"""
# retrieve information needed on callers frame
prev_frame = inspect.currentframe().f_back
frame_info = inspect.getframeinfo(prev_frame)
@stephensmitchell
stephensmitchell / blender28_run_qt_ui.py
Created December 11, 2020 13:01 — forked from BigRoy/blender28_run_qt_ui.py
Simple example of running a Qt interface in Blender 2.8 without blocking Blender.
import bpy
from PyQt5 import QtWidgets
class QtModalOperator(bpy.types.Operator):
"""A base class for Operators that run a Qt interface."""
def modal(self, context, event):
if self._app:
@stephensmitchell
stephensmitchell / Spell_Check.ahk
Created November 1, 2020 23:34
A spell check to run in background
#Notrayicon
#NoEnv ; For security
#SingleInstance, Force
#Persistent
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
;------------------------------------------------------------------------------
; Fix for -ign instead of -ing.
; Words to exclude: (could probably do this by return without rewrite)
; From: http://www.morewords.com/e nds-with/gn/