Skip to content

Instantly share code, notes, and snippets.

View hannesdelbeke's full-sized avatar

hannes delbeke hannesdelbeke

View GitHub Profile
@hannesdelbeke
hannesdelbeke / 2011-DupAlongPathToolbox.mel
Created January 21, 2024 13:17
autodesk maya, duplicate meshes along a path, 2011, by John Germann video https://www.youtube.com/watch?v=rS4aVN_8LQI
// Duplicate Along Path v1.5.0
// author: John Germann
// fixed a bug where deforming failed if the object was too short
// added a button for finalizing deform along path
// added a feature to reset options to default
// added a feature that adds a shelf button for DAP
// added tooltips for buttons
// added a feature that saves duplication settings on the curve, can load settings from the curve
// added auto switch for different scene up prefs
@hannesdelbeke
hannesdelbeke / read_email.py
Created January 21, 2024 11:11
read gmail with python
#https://codehandbook.org/how-to-read-email-from-gmail-using-python/
#https://gist.github.com/robulouski/7441883
import smtplib
import time
import imaplib
import email
import getpass
#https://stackoverflow.com/questions/753052/strip-html-from-strings-in-python
@hannesdelbeke
hannesdelbeke / realtime-output.py
Created October 22, 2023 22:37
get console output in a qt widget, tested in Blender.
import sys
import subprocess
from PySide2.QtWidgets import QLineEdit, QApplication, QMainWindow, QTextEdit, QVBoxLayout, QPushButton, QWidget
from PySide2.QtCore import QTimer
from PySide2.QtGui import QColor, QTextCursor
class RealTimeOutputApp(QMainWindow):
def __init__(self):
super().__init__()
@hannesdelbeke
hannesdelbeke / maya_icon_browser.py
Last active October 19, 2023 15:39
maya icon browser rehost, source https://charactersetup.com/?p=335
"""
# paste this .py file into your scripts directory and run this in a python tab to show the UI
import maya_icon_browser
browser = maya_icon_browser.Window()
browser.show()
"""
__author__ = 'Tyler Thornock'
__doc__ = 'UI to show the possible built-in maya icons that can be used.'
import logging
@hannesdelbeke
hannesdelbeke / tkinter_in_unreal.py
Created September 27, 2022 21:40
non blocking example tkinter python UI in unreal engine 5
from tkinter import *
import unreal
# non blocking example of tkinter, which ships with unreal
def show():
window = Tk()
window.title("TKinter test")
window.geometry('350x200')
@hannesdelbeke
hannesdelbeke / data_from_blendfile.py
Last active August 11, 2022 19:41
blender asset tracer snippets
# get data block from in a blend file.
import blender_asset_tracer.blendfile
blend_file = blender_asset_tracer.blendfile.BlendFile(file_path)
# print(blend_file.blocks)
objs = blend_file.find_blocks_from_code(b'OB')
print(objs)
# since there is no docs of accepted keys, printing some keys here