Saving, opening, importing
Networks are saved as .wnet.json files in their folders; Vision's
*_net.py files are imported without being run.
Save and open
| File menu | what it does |
|---|---|
| Save / Save as… | writes <name>.wnet.json in the network's folder |
| Open network (.wnet.json)… | opens a network file from your computer as a new network (dropping the file on the page does the same) |
| Download the network file | the .wnet.json, to your computer |
| Download the network folder (zip) | the network with the files its nodes read and wrote |
| Rename network… | its name, shown in its tab and in the open networks menu |
Each network also writes autosave.wnet.json in its folder after every change. A
network file is JSON: the nodes (library, class, name, place), their widget values and options, the
code of the nodes you changed, the ports you added, the macros and their insides, the connections,
and the state of the viewers (camera, renderer, rendering, legends). Data is not saved: running the
network makes it again.
Files that nodes read are found relative to the network's folder. To bring a file from your own computer, use the ⇧ button of a file widget, or Upload from this computer… in the file browser: the file is copied into the network's folder.
Importing Vision networks
File > Import a Vision network (*_net.py)…, or drop the file on the page, or, without the page:
bin/wewos import old_net.py -o new.wnet.json
Vision saved a network as a Python program that rebuilt it. WEWoS does not run that program: it converts its Python 2 syntax to Python 3, reads it, and interprets only what Vision's generated files do: load libraries, create nodes, set widget values and options, change code, add ports, build macros, and connect.
cartoon2b_net.py: what was
imported, and what was not carried over.How nodes come across
- The nodes of Vision's Standard library, DejaVu (vizlib), MolKit, symserv, Volume, Imaging (PIL) and matplotlib libraries become the nodes of the WEWoS libraries, with their port names mapped where WEWoS's differ. Library macros that are one node here (Lines Macro, CPK Macro, MSMS Macro) become that node.
- A node changed in Vision keeps its code, converted to Python 3.
- Settings made inside a library macro (Icosahedral1's axes, UTiso's isovalue) come along. Nodes or connections added inside a library macro do not: the macro is the library's, and the report says so.
- Vision kept the opacity and the color of each object in the viewer's saved state; they are given to the geometry nodes, which keep them with the network.
- A node with no counterpart here (PMV's, ADT's, web services…) becomes a placeholder: it keeps its name, ports, connections and code, is drawn in red, and does not run.
- Vision drew data flowing down the page. Imported networks, and the macros of the libraries, are laid out again from left to right (Edit > Arrange the nodes from left to right does the same for any network).
The data files a Vision network reads are not part of its _net.py: upload them into the
imported network's folder (the ⇧ button of a file widget), or give their full path on the
server.