sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
dfelinto's Avatar
dfelinto dfelinto is offline
Member
 
Join Date: Jun 2005
Location: Rio de Janeiro, Brasil
Posts: 396
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...nder-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 . . .
#1   Old 27-Sep-08, 09:51   
Reply With Quote


BeBraw's Avatar
BeBraw BeBraw is offline
Member
 
Join Date: Jul 2005
Location: Nifland
Posts: 2,064
Quote:
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?
............................................
Nothing to see here ... move along.
#2   Old 27-Sep-08, 10:59   
Reply With Quote
dfelinto's Avatar
dfelinto dfelinto is offline
Member
 
Join Date: Jun 2005
Location: Rio de Janeiro, Brasil
Posts: 396
Quote:
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.

Quote:
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
#3   Old 27-Sep-08, 19:52   
Reply With Quote
dfelinto's Avatar
dfelinto dfelinto is offline
Member
 
Join Date: Jun 2005
Location: Rio de Janeiro, Brasil
Posts: 396
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:

Code:
trash = IRCsocket.recv (4096) IRCsocket.send ( 'NICK %s\r\n'%fromNick ) IRCsocket.send ( 'USER %s 0 * :Blender Notifier\r\n'%fromNick ) IRCsocket.send ( 'PRIVMSG %s : %s.\r\n'%(toNick, ircMsg) ) IRCsocket.send ( 'QUIT %s\r\n' ) trash = IRCsocket.recv (4096) sleep(10) #to give enough time to complete the conexion IRCsocket.close()

There is anyway to get away of this?
#4   Old 27-Sep-08, 19:55   
Reply With Quote
Meta-Androcto's Avatar
Meta-Androcto Meta-Androcto is offline
Member
 
Join Date: Aug 2006
Location: australia
Posts: 2,579
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.

Last edited by Meta-Androcto; 28-Sep-08 at 22:52.
#5   Old 28-Sep-08, 01:31   
Reply With Quote
dfelinto's Avatar
dfelinto dfelinto is offline
Member
 
Join Date: Jun 2005
Location: Rio de Janeiro, Brasil
Posts: 396
Quote:
Originally Posted by Meta-Androcto View Post
you may have good intentions with this script.
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]
#6   Old 28-Sep-08, 02:31   
Reply With Quote
mangojambo's Avatar
mangojambo mangojambo is offline
Member
 
Join Date: Jul 2002
Location: BRASIL - Londrina / PR
Posts: 49
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"
............................................
3D Artist and Animator
#7   Old 28-Sep-08, 02:44   
Reply With Quote
Meta-Androcto's Avatar
Meta-Androcto Meta-Androcto is offline
Member
 
Join Date: Aug 2006
Location: australia
Posts: 2,579
dfelinto,
It was not my intention to insult you.
Quote:
Whilst I do see some legitimate use for this script.......
Quote:
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.
#8   Old 28-Sep-08, 04:04   
Reply With Quote
BeBraw's Avatar
BeBraw BeBraw is offline
Member
 
Join Date: Jul 2005
Location: Nifland
Posts: 2,064
Quote:
Originally Posted by dfelinto View Post
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.
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/forum...ns-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.
............................................
Nothing to see here ... move along.
#9   Old 28-Sep-08, 05:22   
Reply With Quote
dfelinto's Avatar
dfelinto dfelinto is offline
Member
 
Join Date: Jun 2005
Location: Rio de Janeiro, Brasil
Posts: 396
Quote:
"With the rocks they throw me, I will build my castle"
My castle so far: https://projects.blender.org/tracker..._id=9&atid=127

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

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

Last edited by dfelinto; 15-Oct-08 at 01:02.
#10   Old 28-Sep-08, 17:41   
Reply With Quote
SHABA1 SHABA1 is offline
Member
 
Join Date: Mar 2002
Location: California
Posts: 1,458
What is a "twitter"?
............................................
At some point in life you stop being the man you are and start being the man you always wanted to be. ------ Bruce Springsteen.
#11   Old 14-Oct-08, 20:45   
Reply With Quote
dfelinto's Avatar
dfelinto dfelinto is offline
Member
 
Join Date: Jun 2005
Location: Rio de Janeiro, Brasil
Posts: 396
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.
#12   Old 15-Oct-08, 00:58   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 17:13.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Blender Headlines
Featured Artwork
Crocodile by Julia Korbut
Classic vintage look renders by HANGAR
Blending life - Old George by bigbad
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Social BlenderArtists