Forum: Poser - OFFICIAL


Subject: VSS Skin Test - Opinions

bagginsbill opened this issue on Apr 23, 2008 ยท 2832 posts


bagginsbill posted Tue, 08 July 2008 at 9:43 PM

ADP:

What you've said is very interesting to me. I've already developed a number of web-based scripts for Poser, using a server I wrote (similar to yours) and using Ajax on the client side. It works very nicely and is extremely easy to program.

My question (and problem) is the "blocking" aspect. In particular, while my server script is running, Poser won't run any other scripts. How did you get it to be 100% in the background?

I did have some success setting it up as another thread. However, the server-side could not do any Poser scene calls then, because they are not thread safe. When I tried it, Poser crashed.

I also tried setting the server side up so that it uses the background scene callback. I registered a callback and Poser calls it like 10 times a second, which is good enough to respond to Ajax requests, and does not cause threading issues. However, when the Poser application does not have the focus, it no longer calls the background scene callback. Thus, the server becomes dead if another application has the focus. In particular, if the browser has the focus, then Poser won't answer the browser Ajax requests.

I've also tried putting up a Tk dialog and using Tk's background callback, but that seems really ugly. I want the server to run forever, not just while some bogus dialog is up.

How the heck did you set up the background service that let's Poser think there's no longer a script running, and still calls your code frequently enough to service the Ajax requests?


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)