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

    LrProgressScope nested?

    mountainstorm
      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" } )
      _parent:setIndeterminate()
      -- loop's here
      _child = LrProgressScope( { caption="Child", parent=_parent, parentEndRange=1 } )
      _child:setIndeterminate()
      -- Do stuff
      _child:done()
      _parent:done()

      Has anyone managed to get progress working nested?

      Rich
        • 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.

            Manfred
            • 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.