Package nukescripts :: Module renderpanel
[hide private]
[frames] | no frames]

Source Code for Module nukescripts.renderpanel

 1  # Copyright (c) 2009 The Foundry Visionmongers Ltd.  All Rights Reserved. 
 2   
 3  import re 
 4  import nuke 
 5  import nukescripts 
 6   
7 -def render_panel(_list, exceptOnError = True, allowFrameServer = True):
8 return nukescripts.showRenderDialog(_list, exceptOnError, allowFrameServer)
9 10
11 -def cache_particles_panel(particleCacheNode):
12 particleCacheNode.knobs()["particle_cache_render_in_progress"].setValue(True) 13 try: 14 nuke.Undo().disable() 15 rootNode = nuke.root() 16 firstFrame = rootNode['first_frame'].getValue() 17 lastFrame = rootNode['last_frame'].getValue() 18 # Extra frames added for motion blur 19 padding = int(particleCacheNode['particle_cache_padding'].getValue()) 20 nuke.executeMultiple((particleCacheNode,), ([firstFrame - padding, lastFrame + padding, 1],)) 21 except RuntimeError, e: 22 nuke.tprint(e) 23 if e.args[0][0:9] != "Cancelled": # TO DO: change this to an exception type 24 raise 25 finally: 26 nuke.Undo().enable()
27