Surface caps not drawn in script

Hi Tom/Elaine, I have a series of models with SES surfaces and per-model clipping, and I am trying to create figures for each in a script with several blocks like the following: hide target m show #1 target ms save fig1.png If I run the commands myself, the figures are as expected, but when I run the script / copy and paste several of these blocks, the surface caps aren't drawn. Am I missing something? Or can I trigger the caps somehow? Thanks! Best, -da

Hi Daniel, The clip planes are only updated when the graphics is rendered. Unfortunately saving an image doesn't do it. Normally during a script it doesn't draw any graphics unless you explicitly tell it to using the wait command. So you should try hide target m show #1 target ms wait 1 save fig1.png The wait command just means draw the graphics panel of ChimeraX and the arguments says how many frames to draw (often > 1 when recording a movie). I'll see if I can fix ChimeraX so if you save an image in a script it first draws a frame so this trick "wait" won't be needed. Tom
On May 24, 2024, at 1:57 PM, Daniel Asarnow via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Tom/Elaine, I have a series of models with SES surfaces and per-model clipping, and I am trying to create figures for each in a script with several blocks like the following: hide target m show #1 target ms save fig1.png
If I run the commands myself, the figures are as expected, but when I run the script / copy and paste several of these blocks, the surface caps aren't drawn. Am I missing something? Or can I trigger the caps somehow?
Thanks!
Best, -da _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

I fixed this in the ChimeraX daily build so saving an image in a script will automatically render a graphics frame so updates like clip planes or computing a new volume surface get done before the image is saved. This will not be in 1.8 because we are too close (a few weeks away) to a release. Tom
On May 24, 2024, at 4:26 PM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Daniel,
The clip planes are only updated when the graphics is rendered. Unfortunately saving an image doesn't do it. Normally during a script it doesn't draw any graphics unless you explicitly tell it to using the wait command. So you should try
hide target m show #1 target ms wait 1 save fig1.png
The wait command just means draw the graphics panel of ChimeraX and the arguments says how many frames to draw (often > 1 when recording a movie). I'll see if I can fix ChimeraX so if you save an image in a script it first draws a frame so this trick "wait" won't be needed.
Tom
On May 24, 2024, at 1:57 PM, Daniel Asarnow via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Tom/Elaine, I have a series of models with SES surfaces and per-model clipping, and I am trying to create figures for each in a script with several blocks like the following: hide target m show #1 target ms save fig1.png
If I run the commands myself, the figures are as expected, but when I run the script / copy and paste several of these blocks, the surface caps aren't drawn. Am I missing something? Or can I trigger the caps somehow?
Thanks!
Best, -da _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Awesome, thanks Tom! I actually tried using wait, but I forgot the explicit number of frames was mandatory even for 1. Best, -da On Fri, May 24, 2024 at 4:48 PM Tom Goddard <goddard@sonic.net> wrote:
!-------------------------------------------------------------------| This Message Is From an External Sender This message came from outside your organization. |-------------------------------------------------------------------!
I fixed this in the ChimeraX daily build so saving an image in a script will automatically render a graphics frame so updates like clip planes or computing a new volume surface get done before the image is saved. This will not be in 1.8 because we are too close (a few weeks away) to a release.
Tom
On May 24, 2024, at 4:26 PM, Tom Goddard via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi Daniel,
The clip planes are only updated when the graphics is rendered. Unfortunately saving an image doesn't do it. Normally during a script it doesn't draw any graphics unless you explicitly tell it to using the wait command. So you should try
hide target m show #1 target ms wait 1 save fig1.png
The wait command just means draw the graphics panel of ChimeraX and the arguments says how many frames to draw (often > 1 when recording a movie). I'll see if I can fix ChimeraX so if you save an image in a script it first draws a frame so this trick "wait" won't be needed.
Tom
On May 24, 2024, at 1:57 PM, Daniel Asarnow via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi Tom/Elaine, I have a series of models with SES surfaces and per-model clipping, and I am trying to create figures for each in a script with several blocks like the following: hide target m show #1 target ms save fig1.png
If I run the commands myself, the figures are as expected, but when I run the script / copy and paste several of these blocks, the surface caps aren't drawn. Am I missing something? Or can I trigger the caps somehow?
Thanks!
Best, -da _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (2)
-
Daniel Asarnow
-
Tom Goddard