mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Use scriptReadFile for all Nuke versions
This commit is contained in:
parent
6644f4c5f8
commit
f0537f0d57
1 changed files with 1 additions and 4 deletions
|
|
@ -25,10 +25,7 @@ def open_file(filepath):
|
|||
|
||||
def read_script(nuke_script):
|
||||
nuke.scriptClear()
|
||||
if int(nuke.NUKE_VERSION_MAJOR) > 12:
|
||||
nuke.scriptReadFile(nuke_script)
|
||||
else:
|
||||
nuke.scriptOpen(nuke_script)
|
||||
nuke.scriptReadFile(nuke_script)
|
||||
nuke.Root()["name"].setValue(nuke_script)
|
||||
nuke.Root()["project_directory"].setValue(os.path.dirname(nuke_script))
|
||||
nuke.Root().setModified(False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue