Created
March 28, 2021 21:26
-
-
Save jocafa/2d5c4def804afb7faba078fa7c9fd210 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bl_info = { | |
"name": "Blender Toast", | |
"description": "Toast Notifications", | |
"author": "Josh Faul", | |
"blender": (2, 90, 1), | |
"category": "Render" | |
} | |
import subprocess | |
import os | |
import bpy | |
from bpy.app.handlers import persistent | |
@persistent | |
def notify(dummy): | |
scr = r'& "{}\{}"'.format(os.path.dirname(__file__), "rendertoast.ps1") | |
subprocess.run(['powershell.exe', scr]) | |
def register(): | |
bpy.app.handlers.render_complete.append(notify) | |
def unregister(): | |
bpy.app.handlers.render_complete.remove(notify) | |
if __name__ == "__main__": | |
register() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon | |
$objNotifyIcon.Icon = [System.Drawing.SystemIcons]::Information | |
$objNotifyIcon.BalloonTipIcon = "Info" | |
$objNotifyIcon.BalloonTipTitle = "Render Done" | |
$objNotifyIcon.BalloonTipText = "The render. It is finished." | |
$objNotifyIcon.Visible = $True | |
$objNotifyIcon.ShowBalloonTip(10000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment