dbr / tabtabtab-nuke

A replacement for Nuke's "tab" node creator
http://www.nukepedia.com/python/ui/tabtabtab
The Unlicense
36 stars 14 forks source link

Don't write weights file if existing file failed to load #13

Closed dbr closed 8 years ago

dbr commented 8 years ago

If there is an error while loading tabtabtab_weights.json, currently the file will be reset to default {} when next used.

This means a temporary file-access glitch or hand-editing typo results in all weights being lost, which is annoying

Instead the weights should only be written if a) loading the file was successful, or b) the file did not exist previously