Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    SetStatusBar not updating [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 546 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      On 17/05/2015 at 20:39, xxxxxxxx wrote:

      I have a loop that goes through all the lines of a file with:
      **
      for line in fileinput.input(my_file,mode="rb") :
      **
      I was trying to update the Status bar but it is not updating.
      Even setting it to spin, leaves it with the bars but with no movement.
      Is there a way to for the update of the status bar?
      Why is it not updating?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 18/05/2015 at 08:32, xxxxxxxx wrote:

        Now I just have it inside a while loop:

        while len(fbx_list1)>0:

        and I even included a c4d.EventAdd() right after the c4d.StatusSetBar(progress) and I still have no refresh in the status bar.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 18/05/2015 at 10:08, xxxxxxxx wrote:

          Hi Rui,

          in which context are you experiencing this (Python plugin (which function), Python script, Python node, Python generator,...)?

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 18/05/2015 at 10:45, xxxxxxxx wrote:

            I'm testing it as a script and it doesn't work.
            But after this, I will be creating a CommandPlugin.
            Will it work there, if it is not working in the script?

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 19/05/2015 at 07:35, xxxxxxxx wrote:

              Hi Rui,

              actually I would have to look up. But my assumption is, that the script is executed in the same thread, that handling the entire GUI. And if you are looping in this thread, there's obviously no one, who could update the status bar.
              In a plugin, you have (nearly) all freedom. You could either offload the work into a thread. Or you can break up your loop to give the GUI "time to breathe". This all highly depends on your actual implementation.

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                On 19/05/2015 at 07:59, xxxxxxxx wrote:

                Ok, I found out why it was not displaying. I had a misbehaved loop inside my main loop that was taking just too long and, inside that misbehaved loop there was NO updates to the status bar.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post