From: <ha...@us...> - 2012-06-01 13:22:27
|
Revision: 17243 http://jmol.svn.sourceforge.net/jmol/?rev=17243&view=rev Author: hansonr Date: 2012-06-01 13:22:17 +0000 (Fri, 01 Jun 2012) Log Message: ----------- version=12.3.29_dev # new feature: set pathForAllFiles "..." # -- all files, local or remote, will be taken from the indicated path # -- the indicated path may be a zip file entry (ending with "|") # -- automatically reset to '' in case of an unrecoverable error in execution # -- used for creating JMOL files containing user scripts instead of a state # -- disallows all writing and image creation # -- scripts including prompts to read wildcard files (for example, "load ?") # will still prompt for those and read them properly # new feature: write SCRIPT ["scriptFileName", "filename2","filename3",...] PNGJ|JMOL... # -- syntax is WRITE SCRIPT followed by an array of file names # then whatever else is necessary to create the PNGJ or JMOL file # -- for example: write script ["wind.spt"] test.jmol # -- Creates a single PNGJ or JMOL file that instead of containing the state # contains the script and additional files listed by the user. # The first script is run, and it is presumed that the other files are # needed for full execution of that script. # -- Allows for creating PNGJ and JMOL files that run as animations, not just final states. # -- Jmol will automatically add any files current to the state, # but other files not indicated by the state (script files especially) # required for the script to run need to be indicated by the user. # -- When the script is executed, pathForAllFiles is set to the zip file # itself. Thus, even scripts containing references such as "script2.spt" or "=xxxx" # can be run, provided the user supplies xxxx.pdb.gz as one of the required filenames. # -- Note that if a file is saved locally using LOAD =xxxx AS t.pdb, Jmol will automatically use # the local file reference to t.pdb, not the RCSB reference. # -- If the file is loaded using only LOAD =xxxx, then Jmol will reload the # remote file and store it in the PNGJ/JMOL file as xxxx.pdb.gz. Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/FileManager.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/viewer/FileManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/FileManager.java 2012-06-01 13:05:16 UTC (rev 17242) +++ trunk/Jmol/src/org/jmol/viewer/FileManager.java 2012-06-01 13:22:17 UTC (rev 17243) @@ -938,9 +938,11 @@ private String[] classifyName(String name, boolean isFullLoad) { if (name == null) return new String[] { null }; - if (name.startsWith("?") - && (name = viewer.dialogAsk("load", name.substring(1))) == null) { - return new String[] { isFullLoad ? "#CANCELED#" : null }; + boolean doSetPathForAllFiles = (pathForAllFiles.length() > 0); + if (name.startsWith("?")) { + if ((name = viewer.dialogAsk("load", name.substring(1))) == null) + return new String[] { isFullLoad ? "#CANCELED#" : null }; + doSetPathForAllFiles = false; } File file = null; URL url = null; @@ -978,7 +980,7 @@ names[0] = names[2] = url.toString(); names[1] = stripPath(names[0]); } - if (pathForAllFiles.length() > 0) { + if (doSetPathForAllFiles) { String name0 = names[0]; names[0] = pathForAllFiles + names[1]; Logger.info("FileManager substituting " + name0 + " --> " + names[0]); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2012-06-01 13:05:16 UTC (rev 17242) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2012-06-01 13:22:17 UTC (rev 17243) @@ -10,22 +10,29 @@ # -- the indicated path may be a zip file entry (ending with "|") # -- automatically reset to '' in case of an unrecoverable error in execution # -- used for creating JMOL files containing user scripts instead of a state +# -- disallows all writing and image creation +# -- scripts including prompts to read wildcard files (for example, "load ?") +# will still prompt for those and read them properly # new feature: write SCRIPT ["scriptFileName", "filename2","filename3",...] PNGJ|JMOL... -# -- creates a single PNGJ or JMOL file that instead of containing the state +# -- syntax is WRITE SCRIPT followed by an array of file names +# then whatever else is necessary to create the PNGJ or JMOL file +# -- for example: write script ["wind.spt"] test.jmol +# -- Creates a single PNGJ or JMOL file that instead of containing the state # contains the script and additional files listed by the user. # The first script is run, and it is presumed that the other files are # needed for full execution of that script. -# -- Jmol will automatically add any files current to the state -# but other files not indicated by the state (script files especially) but needed -# for the script to run will be included. -# -- when the script is executed, pathForAllFiles is set to the zip file -# itself. Thus, even scripts containing references such as "=xxxx" can be run -# provided the user supplies xxxx.pdb.gz as one of the required filenames. +# -- Allows for creating PNGJ and JMOL files that run as animations, not just final states. +# -- Jmol will automatically add any files current to the state, +# but other files not indicated by the state (script files especially) +# required for the script to run need to be indicated by the user. +# -- When the script is executed, pathForAllFiles is set to the zip file +# itself. Thus, even scripts containing references such as "script2.spt" or "=xxxx" +# can be run, provided the user supplies xxxx.pdb.gz as one of the required filenames. # -- Note that if a file is saved locally using LOAD =xxxx AS t.pdb, Jmol will automatically use -# the local file reference to t.pdb, not the RCSB reference +# the local file reference to t.pdb, not the RCSB reference. # -- If the file is loaded using only LOAD =xxxx, then Jmol will reload the -# remote file and store it in the PNGJ/JMOL file as xxxx.pdb.gz +# remote file and store it in the PNGJ/JMOL file as xxxx.pdb.gz. # bug fix: Exception for select within(molecule,...) when atoms have been deleted This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |