Hiding Outliner Window
-
Nesting start/commits has always been a no-no. I don't think the transparent nor the prev_trans arguments are related to nesting.
-
@jim said:
Nesting start/commits has always been a no-no. I don't think the transparent nor the prev_trans arguments are related to nesting.
haven't tried to nest them. But making one commit transparent to the previous one - impossible...
-
The only way I know to pause a script is to use timers. I believe that is what Fredo does in plug-ins such as Round Corner which can be interrupted during long operations. You can call view.refresh (v 7.1+) to force a refresh of the view.
-
@jim said:
The only way I know to pause a script is to use timers. I believe that is what Fredo does in plug-ins such as Round Corner which can be interrupted during long operations. You can call view.refresh (v 7.1+) to force a refresh of the view.
You 'pause' a script so you can see the geometry so far by having start/commit operations that follow each other - unfortunately that means an undo for each operation... What we need is some way of group all of these into a 'nesting' operation that can be undone in one step ?
-
@tig said:
You 'pause' a script so you can see the geometry so far by having start/commit operations that follow each other - unfortunately that means an undo for each operation... What we need is some way of group all of these into a 'nesting' operation that can be undone in one step ?
That's what the third and fourth argument in
.start_operation
is meant for. If only they where working... -
@tig said:
You 'pause' a script so you can see the geometry so far by having start/commit operations that follow each other
This is not a requirement for updating the view. There are other ways to do it.
I have not tried it in awhile, but I seem to remember a messagebox will pause the program and the view will be updated. Or maybe calling view.refresh followed by sleep(2) might work. I mean, if your goal is to pause the program just to see it's progress.
-
@tig said:
@jim said:
The only way I know to pause a script is to use timers. I believe that is what Fredo does in plug-ins such as Round Corner which can be interrupted during long operations. You can call view.refresh (v 7.1+) to force a refresh of the view.
You 'pause' a script so you can see the geometry so far by having start/commit operations that follow each other - unfortunately that means an undo for each operation... What we need is some way of group all of these into a 'nesting' operation that can be undone in one step ?
You don't need the extra arguments and can do all geometry within a single Start - Commit operation.
Just give back control to the Tool by encapsulating the geometry construction in timers.Fredo
-
@jim said:
@tig said:
You 'pause' a script so you can see the geometry so far by having start/commit operations that follow each other
This is not a requirement for updating the view. There are other ways to do it.
I have not tried it in a while, but I seem to remember a messagebox will pause the program and the view will be updated. Or maybe calling view.refresh followed by sleep(2) might work. I mean, if your goal is to pause the program just to see it's progress.A messagebox will cause a window to redraw IF the
start_operation
argument isfalse
- but if it'strue
the window's contents are unchanged until thecommit
arrives.
view.refresh
should work with the operation BUT it IS limited to very recent SUp versions, so cannot be backwardly compatible. To such make a script v6 compatible would mean convoluted version checking...
view.invalidate
waits for the commit.
-
At the end of the operation, does SU update the UI automatically?
or, is it a good idea (just to be sure) to call:
UI.refresh_inspectors # force complete UI update
http://code.google.com/apis/sketchup/docs/releases.html -
In my experience SU seem to update the viewport after
commit_operation
.But if an error occurs before your [ruby]commit_operation[/ruby - then the viewport won't update until you pan/orbin/draw.
-
Hi Tig (and all others),
Thanks for the responses, fixed my problem wonderfully. Kudos.
I did try using start_operation() with the second parameter set to true, but the Outliner window is still redrawn when each dynamic component is redraw using $dc_observers.get_latest_class.redraw_with_undo(compInst).
Advertisement