On 08/20/2015 05:08 AM, Robert Hanson wrote: > It is not possible to save user-defined functions in the state. This is > because they are (in my opinion) not aspects of the state. So you will need > to add those later as a separate spt file. > But why should one provide the power to customize/enhance Jmol but don't enable to save/restore these adjustments together with a view?
I understand that it would not be a good idea to save just every user-defined variable and function together with the state. Then there could accumulate a lot of garbage with each round of save/restore and the state file could get bigger and bigger. Q: What about a system similar to the custom startup script file of the application in the users '.jmol' folder? (By the way, I tried to find documentation on it but couldn't find any.) There might be a variable, for example called 'customStateScript'. If it would not be empty then the content would be written into a file 'customState.spt' and added to the files stored within a PNGJ file. And the script file would be loaded as the last step of restoring the state when a PNGJ file is loaded. Having a single image file that can either be used to display a static view in any graphics program or to recreate the interactive view within Jmol is the beauty of the PNGJ concept. This would be broken by the need for an external second script file. And in a browser context it is already inconvenient to save a single file in JSmol with two dialog windows popping up. I wouldn't want to have a user do this twice for each save action. When I developed the Jena3D viewer (http://jena3d.fli-leibniz.de) about ten years ago, Jmol's scripting language was much less capable than today. Most of the stuff that is done there on the server with Perl and in the browser with JavaScript could now be done within Jmol with Jmol scripting. And if the system doing this could be stored within a PNGJ file along with the view it could make (almost) the whole functionality available within any compatible version of the Jmol applet or application running anywhere. I think it would be a huge improvement if site developers could implement something like that. Regards, Rolf -- Rolf Huehne Postdoc Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) Beutenbergstrasse 11 07745 Jena, Germany Phone: +49 3641 65 6205 Fax: +49 3641 65 6210 E-Mail: rhue...@fli-leibniz.de Website: http://www.fli-leibniz.de Scientific Director: Prof. Dr. K. Lenhard Rudolph Head of Administration: Dr. Daniele Barthel Chairman of Board of Trustees: Dennys Klein VAT No: DE 153 925 464 Register of Associations: No. 230296, Amtsgericht Jena Tax Number: 162/141/08228 ------------------------------------------------------------------------------ _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users