<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dalai, Bart, and Daniel,<br>
<br>
Thanks for the help. I'm planning on rewriting my add-on after its
next release (of course recycling old work) because it has a lot of
areas which I'd like to improve before I ask for any type of code
review.<br>
<br>
Anyway, I should now be able to implement a much better download
system for my rewritten add-on, which will be a lot nicer for users
than the current one, so thanks again for your advice and
suggestions.<br>
<br>
-Peter Cassetta<br>
<br>
<div class="moz-cite-prefix">On 01/24/2013 07:43 PM, Daniel Monteiro
Basso wrote:<br>
</div>
<blockquote
cite="mid:CAHn_q9_bYYhSz-KkuMtYycmDLUD273ZLkFsTdq8XKUtnRaG1=w@mail.gmail.com"
type="cite">Hello,<br>
<br>
I think a modal operator is the way to go, yes. Take a look at my
"Carnegie Mellon University Mocap Library Browser", and see how I
solved the same problem.<br>
It is marked as broken, and I can't fix it in the next weeks. But
if it doesn't work for you, use an older Blender version. Or just
look at the code.<br>
<br>
Cheers,<br>
<br>
Daniel<br>
<br>
<div class="gmail_quote">On Thu, Jan 24, 2013 at 9:53 AM, Bart
Crouch <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:bartius.crouch@gmail.com" target="_blank">bartius.crouch@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Peter,<br>
<br>
</div>
I had a similar problem when writing an exporter for
Sketchfab. The uploading part to their website can
take a long time (depending on the filesize) and
during that time Blender froze. I solved that by using
threading.<br>
</div>
The basic idea is to do the up/downloading in a separate
thread. Then I added a timer and a modal operator which
is set to PASS_THROUGH. Every time the modal operator is
called from the timer, it checks if the up/downloading
thread is still alive. If not (because it's finished or
experienced an error), it sets in motion the further
actions that need to be taken.<br>
<br>
</div>
For an example, you can take a look at the Sketchfab
add-on code*, specifically the ExportSketchfab operator
class (approximately line 250).<br>
<br>
</div>
<div>Best,<br>
</div>
<div>Bart<br>
<br>
* <a moz-do-not-send="true"
href="https://sites.google.com/site/bartiuscrouch/scripts/sketchfab"
target="_blank">https://sites.google.com/site/bartiuscrouch/scripts/sketchfab</a><br>
</div>
</div>
<br>
_______________________________________________<br>
Bf-python mailing list<br>
<a moz-do-not-send="true" href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a moz-do-not-send="true"
href="http://lists.blender.org/mailman/listinfo/bf-python"
target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
<br>
</blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Bf-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Bf-python@blender.org">Bf-python@blender.org</a>
<a class="moz-txt-link-freetext" href="http://lists.blender.org/mailman/listinfo/bf-python">http://lists.blender.org/mailman/listinfo/bf-python</a>
</pre>
</blockquote>
<br>
</body>
</html>