Trees | Indices | Help |
|
---|
|
1 # Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved. 2 3 import os.path 4 import nuke 5 1113 14 # Use thisRoot to ensure we're using the root node of the current 15 # context (which may or may not be the node graph's global root). 16 # 17 # This sometimes gets called before the Root node is attached. Fixing this is 18 # quite difficult, so handle the exception that results if we try and access 19 # the node in this state 20 try: 21 scriptFilePath = nuke.thisRoot().knob("name").value() 22 except ValueError: 23 scriptFilePath = None 24 25 if not scriptFilePath: 26 return "" 27 28 return os.path.dirname(scriptFilePath)29
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Sep 25 20:04:13 2019 | http://epydoc.sourceforge.net |