Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Force display progress bar ?

Explorer ,
Apr 08, 2018 Apr 08, 2018

Hi,

I'm using PF_PROGRESS as much as I can to display the progressbar but it does't seem enough.

My effect has a long (few seconds) call in which I cannot use PF_PROGRESS so I added PF_PROGRESS before and after that call, but it's not inside an iteration like in the SDK examples.

That works most of the times, when I use the effect from scratch, but when interrupt is called (like when scrubbing through the timeline in the middle of the render process) or when I copy/paste or duplicate the effect, the progress bar doesn't show up.

Is there something else I can do ?

TOPICS
SDK
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 15, 2018 Apr 15, 2018

Hi,

I got a problem with progress bar too... Not the same, but a solution to one of the issues could may be fix the other.

I have a particule system plugin which needs to compute composition from frame 0, and I need to make most of my computation during FrameSetup, so I can resize my layer's output according to particles positions. And FrameSetup doesn't support PF_PROGRESS, and actually doesn't update the progress bar at all.

I'd like to find a way to warn users that the plugin is computing something, and that it's not just stuck.

I tried InfoDrawText, but it seems it doesn't work anymore...

I finally found an ugly solution:

I stop the computation after one second, then during render call return PF_Interrupt_CANCEL, frameSetup is called again and continues computation, and so on.

It results in having the progressbar 'flashing' until computation is done, and it's over all slower because of the back and forth between framesetup and render...

If someone has a better solution, I'd love to hear it! 🙂

Cheers,

François

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 15, 2018 Apr 15, 2018

Salut François,

that's interesting!

I also have pre-calculations in FrameSetup but it's less than 1 second so no big deal for now.

Your "dirty" approach is clearly a good idea, as far as I know, I can't think of something better

I'll let you know if i find something

gab

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2018 Apr 16, 2018

Salut!

After testing a bit more, it's true that my solution isn't that ugly 😉

I finally added an Idle Hook that can print a message in the info panel.

So everytime frameSetup is called, I send the number of frames computed so far, in Idle Hook I update the message and the user knows how many frames have been computed and how many are still to go.

It's not a progress bar, but at least it's something!

Cheers,

François

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2018 Apr 16, 2018

why do you absolutely need the calculation happening in FrameSetup?

maybe you can use frame setup to check if the calculation is needed, store this bool in a variable and then process it in the render call just once with an if statement? then you'd have your pf_progress. then do your cancel trick to go back to FrameSetup to resize the output?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2018 Apr 16, 2018

Cos I need to resize my layer's output according to this calculation...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2018 Apr 16, 2018

yes that what i intended, i edited my post while you were replying will it work if you calculate in render and jump back to frame setup to resize?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2018 Apr 16, 2018

Probably, but then I would need to cancel the render, resize and re-render... Just like I do now.

Finally, writing the infos is better for me than the progress bar, as it's more accurate.

Also, now, I can easily implement a 'stop' in the calculation if user presses 'esc'.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2018 Apr 16, 2018
LATEST

got it! makes sense

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines