tv_WriteTextFile "Create" remembering choices?

A forum dedicated to George scripting questions
Post Reply
javiere
Posts: 2
Joined: 23 Jan 2017, 17:20

tv_WriteTextFile "Create" remembering choices?

Post by javiere »

Hi all,

I've written a little script that saves the project to a folder along with an extra text file with some metadata to get around the issue of not being able to run shell commands/subprocesses from tvpaint itself. Please know that I learned just enough George scripting to write this script so I might be missing something obvious.

This extra test file is written like so:

Code: Select all

tv_WriteTextFile "Create" fullPath result
with fullPath being a path to a file in a network drive and result being th result of the previous call that contains a json string to write to the file.

One of the artists just pointed me out that when they run this tool, it only seems to ask once per session if they want to "Write to file" or not and that's the choice that they seem to be left with until they close and restart tvpaint, it's like it's remembering their choice for the remainder of the session. This is particularly bad for our use case as if they choose "No" the first time they will be exporting garbage until they restart tvpaint.

Is there any way to either:
a) forcefully ask every time (ie not remembering the choice)
b) not giving the choice to write or not, and forcefully write every single time tv_WriteTextFile is called with "Create"?

Cheers
User avatar
Thierry
Site Admin
Posts: 2780
Joined: 07 Jan 2013, 08:28

Re: tv_WriteTextFile "Create" remembering choices?

Post by Thierry »

Hello Javiere,

You can disable this popup by going in the Preferences panel (Shift +D, or Edit > Preferences menu), then on the Interface tab.
Then, uncheck the "George Alert: tv_WriteTextFile" option.
javiere
Posts: 2
Joined: 23 Jan 2017, 17:20

Re: tv_WriteTextFile "Create" remembering choices?

Post by javiere »

Thanks for your reply Thierry,

Is there any way of disabling that through code? getting someone to go to all machines one by one to disable this isn't practical.

Any way of forcing it to write or ask every time would be a possible workaround too.
User avatar
Thierry
Site Admin
Posts: 2780
Joined: 07 Jan 2013, 08:28

Re: tv_WriteTextFile "Create" remembering choices?

Post by Thierry »

Is there any way of disabling that through code?
I don't think there is (the pop-up was added for security reasons, if a script could force the pop-up to not happen then it wouldn't make sense)
Post Reply