Also don't forget the progressbar has 2 text fields.

There's .Caption for the left-aligned text, and there's .StatusText for the
right-aligned text.

If you define .StatusText it will take over the percentage display so if
you wanna see % still, you need to put it in the string yourself.

Usually I use .Caption to describe the general process and .StatusText to
say which item I'm currently processing, plus a percentage and sometimes
even an estimate of time left.

To estimate time left you just need to measure the time between each loop
iteration. I usually add it to a list and average the value, and then I can
compute roughly how many seconds the ??? remaining iterations will take,
and format it as "XmXs".



On Wed, Dec 4, 2013 at 9:33 AM, Sergio Mucino <sergio.muc...@modusfx.com>wrote:

> If you divide the process into smaller sub-processes and update
> accordingly as Alok suggests, you could add a small descriptive text line
> that would let the user know what the script is currently doing...
>
> Sergio M.
>
>
> On 04/12/2013 8:40 AM, Alok Gandhi wrote:
>
>> It depends on how the progress bar is implemented. If there is a long
>> process with just one update to progress bar then it will not have any
>> effect. You need to increment or update the progress caption or something
>> similar at some frequency.
>>
>> Sent from my iPhone
>>
>>  On Dec 4, 2013, at 2:56 AM, Szabolcs Matefy <szabol...@crytek.com>
>>> wrote:
>>>
>>> Thanks folks, however the progress bar is driven by the script, yet it
>>> is in not responding state, and I cannot do anything, however it should be
>>> quite important to have the feedback of what's happening. I turned off the
>>> logging, because I gain at least double speed. Now the user who should run
>>> the script will have no clue if XSI is running or hung.
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: softimage-boun...@listproc.autodesk.com [mailto:softimage-bounces@
>>> listproc.autodesk.com] On Behalf Of Luc-Eric Rousseau
>>> Sent: Wednesday, December 04, 2013 1:56 AM
>>> To: softimage@listproc.autodesk.com
>>> Subject: Re: Progressbar in scripting
>>>
>>> no, the problem is not that the ui is not redrawing. it's Windows'
>>> desktop compositor that's graying out the window by drawing on top of it.
>>>
>>>  On Tue, Dec 3, 2013 at 6:59 PM, Jack Kao <jack....@grapecity.com>
>>>> wrote:
>>>> You may also try sprinkle some Desktop.RedrawUI() in your script to
>>>> force UI update. Use it with caution though as it will slow you down.
>>>> :/
>>>>
>>>>
>>>> From: softimage-boun...@listproc.autodesk.com
>>>> [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Alok
>>>> Gandhi
>>>> Sent: Wednesday, December 04, 2013 2:02 AM
>>>>
>>>>
>>>> To: softimage@listproc.autodesk.com
>>>> Subject: Re: Progressbar in scripting
>>>>
>>>>
>>>>
>>>> Yes I agree with Luc-Eric, if you implement an increment in progress
>>>> bar, even with the cancel button disabled, this should keep the
>>>> freezing away.
>>>>
>>>>
>>>>
>>>> On Tue, Dec 3, 2013 at 11:50 AM, Luc-Eric Rousseau
>>>> <luceri...@gmail.com>
>>>> wrote:
>>>>
>>>> This is not something that XSI does and calling Refresh will have no
>>>> effect.  Windows starts to fade out applications that stop responding
>>>> to messages after a few seconds, and then eventually will show a
>>>> message saying the application has stopped responding (which is true,
>>>> although it doesn't mean it's hung).    If you're driving a progress
>>>> bar yourself, you need to do poll for the cancel button more often to
>>>> let softimage "breathe" and pump messages.  I think incrementing the
>>>> value also does it but I cannot recall.
>>>>
>>>>
>>>> On Tue, Dec 3, 2013 at 10:20 AM, Szabolcs Matefy
>>>> <szabol...@crytek.com>
>>>> wrote:
>>>>
>>>>> OK, I'm doing a script, that reads plenty of data from different
>>>>> files, etc.
>>>>> After a few seconds, the screen fades into white, the progressbar is
>>>>> white, and it looks like XSI is hang (however it works). I tried the
>>>>> Refresh command to make sure that the views and everything is
>>>>> refreshed, in vain.
>>>>> Any idea on this issue?
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Error! Filename not specified.
>>>>
>>>
>>>
>>
> --
>
>
>

Reply via email to