On 25/01/2018 at 03:12, xxxxxxxx wrote:
Hi everyone,
I'm trying to create a progression bar into my UI, but having difficulties in making it progress and stop when it finishes.
Base on this great example, I manage to make it work, but there is a difference that want to happen.
Instead of having a timer, would like the bar to progress when a function finishes.
For example:
|_______| 0%
Def 1:
Do Something
progressbar += 1
|==|____| 33%
Def 2:
Do Something
progressbar += 1
|====|__| 66%
Def 3:
Do Something
progressbar += 1
|======| 100%
Done!
If I create a function that adds the progress, unfortunately when it gets to end it does not display the message, has it seems is not running the Message Built-In Function.
def Message(self, msg, result) :
if msg.GetId() == c4d.BFM_TIMER_MESSAGE:
if self.progress==10:
self.StopProgress()
self.Close()
return True
return gui.GeDialog.Message(self, msg, result)
I'm trying to understand the logic for this and been struggling for a bit.
Apologies if this sounds confusion and will try my best to add any information needed.
Thank you in advance! :slightly_smiling_face:
Andre