scriptSave() versus scriptSaveAs() error ?!

Hi guys,

I’m pretty new to Nuke and I hit a roadblock with a script that I am writing. Basically what the script does is pop up a panel with a multiline text input and 2 buttons, one to save and one to save as.

In the example below, if you click on Save it will print the text entered in the text box but when pressing Save As it won’t…

Code:

multilineTextInput = ''

p = nuke.Panel("test")
p.addMultilineTextInput("add text:", multilineTextInput)
p.addButton("          Save As          ")
p.addButton("          Save          ")

result = p.show()

if result == 0:
    multilineTextVal= p.value("add text:")
    print multilineTextVal
    nuke.scriptSaveAs(filename=None, overwrite=1)

elif result == 1:
    multilineTextVal= p.value("add text:")
    print multilineTextVal
    nuke.scriptSave()


Any help is really appreciated as this drove me nuts for few good hours!!!

Thanks,
Anton

No Responses to “scriptSave() versus scriptSaveAs() error ?!”

Post a Comment