Hi Tom,

Thanks for the quick reply! The Microsoft OneDrive issue you described is exactly the issue I was having.

I was able to modify the 'shortcuts.py' file and am now able to save movies, etc.

Thanks!
Daniel

On Wed, Jun 21, 2023 at 5:44 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Daniel,

  The ChimeraX toolbar snapshot and spin movie icons write files to ~/Desktop.  There is no option to change where they write those files.  I guess you are hitting this problem because Microsoft OneDrive changes the ~/Desktop to be the "public desktop" that is not writable.  ChimeraX does not have special code to handle this Microsoft OneDrive badness.  There is a ChimeraX bug report about it here

https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/4567

If you want to hack the ChimeraX Python code you can change it.  The file on Windows is

ChimeraX/bin/Lib/site-packages/chimerax/shortcuts/shortcuts.py

and you would change the code

def default_save_directory():
    from os import path, getcwd
    d = path.join(path.expanduser('~'), 'Desktop')
    if not path.isdir(d):
        d = getcwd()
    return d

to something like

def default_save_directory():
    from os import path, getcwd
    d = 'C:/Users/smith/images'
    if not path.isdir(d):
        d = getcwd()
    return d

Here is the ChimeraX Github source code for this routine

    https://github.com/RBVI/ChimeraX/blob/509391dca3640e11a5fd2921688220235fd8c4ee/src/bundles/shortcuts/src/shortcuts.py#L1295

  Tom


On Jun 21, 2023, at 2:26 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Daniel,
The non-coding answer is that you can see the command it tried to run in the Log... just enter that command except change the pathname as desired.  There are all kinds of other options for saving images and movies, if you just use commands "save" and "movie," respectively. Another way to save an image is with menu: File... Save.

save command:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#image>
... making images:
<https://rbvi.ucsf.edu/chimerax/docs/user/images.html>

movie command
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/movie.html>
...making movies:
<https://rbvi.ucsf.edu/chimerax/docs/user/movies.html>

However, if you mean you want to change what location is used specifically when you click the icons to save an image or spin movie, somebody else would have to advise on where to change the code.

Best,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Jun 21, 2023, at 2:10 PM, Daniel Gilliam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi,

How can I change the default filepath that 'Spin movie' saves to? The default for me saves to location without save permissions, so I have been unable to save images or movies.

Apologies if I missed an easy answer to this in the documentation.

Thanks,
Daniel Gilliam


_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Manage subscription: