Hey all, I have a script that cleans up the DAG to remove extra notes, 
backdrops, etc.  But it sometimes crashes Nuke, and I can't find a pattern. If 
anyone might know why... Here's the script:

def cleanupDAG():
    if nuke.ask("This tool sometimes crashes, please save first. If you can 
find the crash pattern, please let Dennis know"):
        if not nuke.selectedNodes():
            with nuke.root():
                nodes = nuke.allNodes()
        else:
            nodes = nuke.selectedNodes()
        for node in nodes:
            print node.name()
            if node.Class() in ['BackdropNode','StickyNote']:
                nuke.delete(node)
            else:
                node['tile_color'].setValue(0)
                node['note_font_size'].setValue(11)
                label = node['label'].getValue()
                if "ing_" in label or "plates_" in label:
                    print "-leave this node label"
                else:
                    node['label'].setValue("")

                try:
                    node['note_font'].setValue("Verdana")
                except:
                    pass



den serras
   @
     senior technical artist  | stereo D | deluxe 3D
     3355 empire ave burbank, ca 91504 | o 818.861.3100 | m 323.356.0345
     eon free zone, pune, india | o +91.020.46.60.09.99



This e-mail and any attachments are intended only for use by the addressee(s) 
named herein and may contain confidential information. If you are not the 
intended recipient of this e-mail, you are hereby notified any dissemination, 
distribution or copying of this email and any attachments is strictly 
prohibited. If you receive this email in error, please immediately notify the 
sender by return email and permanently delete the original, any copy and any 
printout thereof. The integrity and security of e-mail cannot be guaranteed.

_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to