Methods ¶
__init__()
Construct a new RedrawBlock.
The constructor should only be called from within a with
statement. For
example:
with hou.RedrawBlock() as redrawblock: # # Perform tasks #
All tasks within the code block will have their redraw requests collected and deferred until after the code in the block is complete. Once the code block is complete (or an exception causes a jump out of the block), a single redraw per window with redraw requests will be performed. This cuts down on “redraw flickering” for a long set of commands.
Warning
Use care with Redraw Blocks. If an operation requires user interaction it should not be within a Redraw Block, otherwise the user will not see any prompts or the results of their actions.