3 Replies Latest reply on Oct 7, 2008 2:36 PM by escouten

    LrProgressScope nested?

      Im trying to use nested LrProgressScope's in my plugin, yet it doesn't appear to work? My code is basically as follows:

      _parent = LrProgressScope( { title="Parent" } )
      -- loop's here
      _child = LrProgressScope( { caption="Child", parent=_parent, parentEndRange=1 } )
      -- Do stuff

      Has anyone managed to get progress working nested?

        • 1. Re: LrProgressScope nested?
          Hi, <br /><br />Yes. In my code it looks like this:<br /><br />_parent = LrProgressScope( { title="Parent" } )<br /><br />   _child1 = LrProgressScope({ parent=_parent, parentEndRange=0.5 })<br />   _parent:setCaption("Child1") --This is important!<br /><br />   <Loop> _child1:setPortionComplete(i, 100)<br /><br />   _child1:done()<br /><br />   <same for child2><br /><br />_parent:done() <br /><br />There will be only one progressbar from the parent. Also the percentage of completion is the total percentage of the parent.<br />This I also didn't expected. I expected two progressbars. But that's <br />the way it is.<br /><br />Manfred
          • 2. Re: LrProgressScope nested?
            Level 1
            Some addition:

            After _child1:setPortionComplete(..)

            Call TrTasks.yield()

            Otherwise the main user interface cannot refresh the progressbar.

            • 3. Re: LrProgressScope nested?
              escouten Adobe Employee
              This is as intended. Only parent scopes are visible. Child progress scopes are basically a tool you can use to set the parent's portion complete without shoehorning the percentage into the overall parent's percentage scale.