<div dir="ltr">Hi Dalai,<br><br>On Wed, Sep 17, 2008 at 3:14 PM, Dalai Felinto <span dir="ltr">&lt;<a href="mailto:dfelinto@gmail.com" target="_blank">dfelinto@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


It looks very usefull.</blockquote><div><br>Thanks!&nbsp; I hope it is - one of the stumbling blocks we&#39;ve been having in getting this into the source trunk is the concern that nobody but us will find utility in it.&nbsp; I&#39;m glad to see that there&#39;s at least one other person out there who could, because, well, 1 is infinitely times as many as 0 :-)<br>

</div><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m currently writing a Python script to be used as a ScriptLink that<br>
report by email the current status of an animation, particles baking,<br>
fluid baking, ...<br>
The goal is to let the computer thinking as you go work in other<br>
computers or go to the beach and let the iphone tells you when it is<br>
time to work again :)</blockquote><div><br>Getting an email with progress info would be very easy to do with this patch - simply have the callback function send an email (or not) to let you know how things are progressing.&nbsp; On the farm, we do something very similar - we store the progress info into a file that is later handed off to the end user.<br>

<br>What&#39;s more, you could have the progress email provide more fine-grained detail than simply &quot;Frame 5 has started.&quot;&nbsp; I.e., it could say something like &quot;As of 4:00 pm, Frame 5 has processed 5,432,124 of 6,000,000 particles.&nbsp; In the last 1 hr, 3 frames and 23,432,124 particles have been processed.&nbsp; Total frames left to complete process after frame 5: 64&quot;<br>

<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Therefore I have some thoughts related to this:<br>
<br>
1) I didn&#39;t look to the patch, but I saw the Patch Tracker comments<br>
[1]. Do you think it would be possible to enable a progression output<br>
to Particles Baking as well ?</blockquote><div><br>Absolutely. &nbsp; It would be a simple matter of adding a call to Blender_Trace( .... ) inside the particle baking code.&nbsp; I&#39;m not familiar with that area of the code, but I find it highly unlikely that it would be difficult to instrument with tracing functionality.<br>


</div><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2) In your code there is a Python API to access the output log from Blender?</blockquote><div><br>The way this patch works is that you write a function in Python, and then ask Blender to call your function.&nbsp; The python looks something like this:<br>


<br>&nbsp;&nbsp;&nbsp; import Blender<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; def rpBlenderCallbackSvn( sFile , nLine , sMessage , nFilterMode ):<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; print &quot;[RPBCB]&quot; , sFile , &quot;(&quot; , nLine , &quot;) - &quot; , sMessage;<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; Blender.Set( &quot;traceCallback&quot; , rpBlenderCallbackSvn );<br>
&nbsp;&nbsp;&nbsp; Blender.Set( &quot;traceFilterOn&quot; , Blender.btfm_RenderProgress );<br><br>One can easily imagine something like:<br><br>&nbsp;&nbsp;&nbsp; Blender.Set( &quot;traceFilterOn&quot; , Blender.btfm_ParticleBakeProgress );<br><br>You would then have your rpBlenderCallbackSvn( ... ) function parse sMessage for useful information, decide when to send emails, etc.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
3) I&#39;m having troubles in using ScriptLink to report a progression.<br>
Right now I&#39;m using FrameChanged since it works the same way with<br>
almost [2] all of the hard-stuff.<br> <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Is it possible/hard to enable a ScriptLink that is raised after the<br>


frame change+Redraw, or after the render is finished? Something like:<br>
FrameCalculationsFinished</blockquote><div><br>I&#39;m not familiar with ScriptLink at all, but if I understand your goal correctly, it should be very easy to accomplish with this patch - simply watch for the right sMessage in your rpBlenderCallbackSvn, and send an email to your iPhone when that message arrives.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Cheers,<br>
Dalai Felinto<br>
<a href="http://blenderecia.orgfree.com" target="_blank">http://blenderecia.orgfree.com</a><br>
<br>
1 - <a href="https://projects.blender.org/tracker/index.php?func=detail&amp;aid=6161&amp;group_id=9&amp;atid=127" target="_blank">https://projects.blender.org/tracker/index.php?func=detail&amp;aid=6161&amp;group_id=9&amp;atid=127</a><br>



2 - <a href="https://projects.blender.org/tracker/index.php?func=detail&amp;aid=17644&amp;group_id=9&amp;atid=125" target="_blank">https://projects.blender.org/tracker/index.php?func=detail&amp;aid=17644&amp;group_id=9&amp;atid=125</a><br>



<br>
2008/9/17 Early Ehlinger &lt;<a href="mailto:earlye@gmail.com" target="_blank">earlye@gmail.com</a>&gt;:<br>
<div><div></div><div>&gt; I finally had some time to re-synch the ResPower blender tracing patch with<br>
&gt; the latest SVN. &nbsp;This is the patch that ResPower uses to provide progress<br>
&gt; information in its render logs, since viewing render nodes&#39; desktops is<br>
&gt; expensive compared to sending a few lines of text to a customer&#39;s web<br>
&gt; browser.<br>
&gt;<br>
&gt; The way it works is that it exposes a new python API whereby a script can<br>
&gt; request that Blender send trace messages to a python function. &nbsp;On the<br>
&gt; ResPower farm, the python function simply prints the output to the console,<br>
&gt; and the farm management software reads the console and saves the output to<br>
&gt; the log.<br>
&gt;<br>
&gt; The instrumentation here is mainly rendering-centric, but the patch can be<br>
&gt; extended to support other portions of the code as well. &nbsp;This would be<br>
&gt; useful, for example, to have end-users generate a log file to track down<br>
&gt; difficult-to-reproduce bugs. &nbsp;(e.g., &quot;run this script, email me the log file<br>
&gt; when the bug occurs!&quot; )<br>
&gt;<br>
&gt; I would really like to get this patch into the trunk so that we can start to<br>
&gt; provide support for the official releases of Blender more quickly (download<br>
&gt; and deploy, as opposed to download, patch, build, and deploy), and also so<br>
&gt; we can add support for the svn version of Blender for our more advanced<br>
&gt; users. &nbsp;We can&#39;t do this now as patching the files every day would be a<br>
&gt; major hassle.<br>
&gt;<br>
&gt; The default behavior should be indisginquishable from not having the patch,<br>
&gt; i.e., you should only notice a difference if you turn on the functionality<br>
&gt; from python. &nbsp;See /source/tools/test-blender-trace.py for an example of<br>
&gt; using it.<br>
&gt;<br>
&gt; -- Early Ehlinger, President, ResPower, Inc.<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Bf-committers mailing list<br>
&gt; <a href="mailto:Bf-committers@blender.org" target="_blank">Bf-committers@blender.org</a><br>
&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Bf-committers mailing list<br>
<a href="mailto:Bf-committers@blender.org" target="_blank">Bf-committers@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
</blockquote></div><br></div>