Blender Notifier 1.0 - email, IRC and twitter using Blender

Today I finished the first version of a notifier script.

It basically send an email, or an IRC message or update your Twitter every frame you want to keep tracking.

For example you can make Blender send you an email every 100 frames of an animation, a twitter every 3 frames and an IRC message once and a while.

Why that? well sometimes you wanna let the computer processing (rendering, baking, …) while you can take a break, go home, …).

To keep it updated and cross-forums, I will keep the file in my blog.
But I would not mind to receive some feedback and comments in this thread.

http://blenderecia.orgfree.com/index.php/blender/blender-notifier/

ps.:
Some stuff I would like to see in Blender that would make this script better:

  • a scriptLink: endFrameCalculation
  • a Blender.Get(“lastframe”)
  • an option to read the console from python
    ps2.:
    Please Blender developers, don’t discontinue Script Links !!! They need your love and attention . . . :smiley: :smiley: :smiley:

ps.:
Some stuff I would like to see in Blender that would make this script better:

  • a scriptLink: endFrameCalculation
  • a Blender.Get(“lastframe”)
  • an option to read the console from python

For Blender.Get(“lastframe”), try Blender.Get(“endframe”) instead. How would endFrameCalculation work? Also what do you mean by “option to read the console”? In which case this would be useful?

or Blender.Get(“lastframe”), try Blender.Get(“endframe”) instead. How would endFrameCalculation work?

BeBraw, right now the FrameChanged calls the script before any further change in the frame. If you wanna be “alerted” after that, you need to wait Blender change to the next frame and then you are sure the last frame is done/ready.

The problem is, when we finish the EndFrame of the animation/baking, Blender goes to the first frame. That way I can’t just subtract 1 from the current frame. Or think about rendering skipping frames.

Therefore I would like to access the “last frame” instead of the “current”.
The other option would be the “endFrameCalculation”, a script called before the frame change.

Also what do you mean by “option to read the console”? In which case this would be useful?

I was thinking about sending by email/IRC/… a small log as well. And this would include any message in the console. It’s a small feature though. It would only make more sense with this kind of patch.

Thanks for the reply,
Dalai

I have a question here.

In the IRC script I’m delaying the closing process, in order to give enough time to the connexion be done:

trash = IRCsocket.recv (4096)

IRCsocket.send ( 'NICK %s
'%fromNick )
IRCsocket.send ( 'USER %s 0 * :Blender Notifier
'%fromNick )
IRCsocket.send ( 'PRIVMSG %s : %s.
'%(toNick, ircMsg) )
IRCsocket.send ( 'QUIT %s
' )
trash = IRCsocket.recv (4096)
<b>sleep(10)</b> #to give enough time to complete the conexion

IRCsocket.close()

There is anyway to get away of this?

I don’t like this script at all.
Whilst I do see some legitimate use for this script…

defelinto,
you may have good intentions with this script.
Used correctly it could be handy.
Used incorrectly it is a dangerous.
Please if you are going to write such a script, keep it to yourself.
do not publish it.

What do you mean by MAY have? It means that I MAY not have as well?
Even though this critique is well come, this kind of insinuation is very offensive. I hope my English is the problem here for not understanding this well.

And sorry, but I don’t wanna keep what I learn to myself. (And I’ve already received some positive critiques from artists that can have a good use for that).

[And please let’s try to focus on the script itself]

Meta-Androcto,
I don’t like knifes in the house because some one can use to kill another person.
I don’t like cars because some people use it to do bad things.
I don’t like beer because drunkers bla bla bla …
Wake up! If you don’t know how to get this better or like you imagine, don’t say anything, mainly if you are rude!

Dfelinto, keep going man! Great script!

“With the rocks they throw me, I will build my castle”

dfelinto,
It was not my intention to insult you.

Whilst I do see some legitimate use for this script…

Used correctly it could be handy.

If I had of said “May or May Not” certainly this would have been a direct insult.

I am entitled to my opinion.

mangojambo,
Whilst my Paranoia may be excessive in this case, it is not without some merit.

You do raise a good point, that much wrong can be done by wrong people.
Do you leave your knives point up around the floor or do you put them in a safe place?
Do you leave you gun on your door mat or do you keep it safe?

The last thing I need is to open a .blend & have it start sending emails.

Sorry if anyone thinks I am being excessive here,
I do not mean any insult to dfelinto personally.

Perhaps a workaround would be to use “Render” scriptlink instead. Check http://blenderartists.org/forum/showthread.php?t=133761 to see how to use it to detect render in an animation.

About the print issue… I am not sure if there is some simple way to do this. You could look into the way Python handles datastreams (stdout) and try to reroute them. Some guy did something like this at http://www.velocityreviews.com/forums/t356295-how-to-catch-pythons-stdout.html . Alternatively you could execute Blender using terminal and then catch the output by piping it. You can pipe the output of Blender to a text file using “blender > myfile”. I noticed that the file is updated only ~after~ you close Blender however. I hope this gives you some clues how to proceed with it.

The ircsocket.close() issue is probably best solved by looking how other people have handled it. I am sure there are some scripts doing this around somewhere.

“With the rocks they throw me, I will build my castle”

My castle so far: https://projects.blender.org/tracker/index.php?func=detail&aid=17701&group_id=9&atid=127 :stuck_out_tongue:

Thanks MetaAndroid for the concerns :slight_smile:
Could you help me testing this patch in a current SVN of Blender?

It is an option to open Blender files with Python disabled.

What is a “twitter”?

Shaba1, twitter is an online system that allow you to send short messages about what you are doing. This is intended to let your friends’ network follow your news.
http://twitter.com/

Off course you can use it for whatever you want. In the case of these scripts I really suggest to use the twitter, it is the faster way to send messages from Blender.

I still want to take some time to solve the issues I talked above, but only after the mid-terms.