Ignore:
Timestamp:
Dec 9, 2010, 8:49:06 PM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/pymolproxy/pymolproxy.c

    r1970 r1998  
    9696
    9797static FILE *flog;
    98 static int debug = TRUE;
     98static int debug = FALSE;
    9999static FILE *scriptFile;
    100100static int savescript = FALSE;
     
    732732}
    733733
     734static void
     735UpdateSettings(PymolProxy *proxyPtr)
     736{
     737    /* Handle all the pending setting changes now. */
     738    if (proxyPtr->flags & VIEWPORT_PENDING) {
     739        SetViewport(proxyPtr);
     740    }
     741    if (proxyPtr->flags & ROTATE_PENDING) {
     742        SetRotation(proxyPtr);
     743    }
     744    if (proxyPtr->flags & PAN_PENDING) {
     745        SetPan(proxyPtr);
     746    }
     747    if (proxyPtr->flags & ZOOM_PENDING) {
     748        SetZoom(proxyPtr);
     749    }
     750    if (proxyPtr->flags & ATOM_SCALE_PENDING) {
     751        SetSphereScale(proxyPtr);
     752    }
     753    if (proxyPtr->flags & STICK_RADIUS_PENDING) {
     754        SetStickRadius(proxyPtr);
     755    }
     756}
     757
     758
    734759static int
    735760BmpCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[])
     
    748773
    749774    /* Force pymol to update the current scene. */
     775    UpdateSettings(proxyPtr);
     776
    750777    Pymol(proxyPtr, "refresh\n");
    751778    Pymol(proxyPtr, "bmp -\n");
     
    11021129        FILE *f;
    11031130        ssize_t nWritten;
     1131        static unsigned long count = 0;
    11041132
    11051133        proxyPtr->status = TCL_ERROR;
    1106         sprintf(fileName, "/tmp/pymol%d.pdb", getpid());
     1134        sprintf(fileName, "/tmp/pymol%d%ld.pdb", getpid(), count);
     1135        count++;
    11071136        f = fopen(fileName, "w");
    11081137        if (f == NULL) {
     
    21382167
    21392168        /* Handle all the pending setting changes now. */
    2140         if (proxyPtr->flags & VIEWPORT_PENDING) {
    2141             SetViewport(proxyPtr);
    2142         }
    2143         if (proxyPtr->flags & ROTATE_PENDING) {
    2144             SetRotation(proxyPtr);
    2145         }
    2146         if (proxyPtr->flags & PAN_PENDING) {
    2147             SetPan(proxyPtr);
    2148         }
    2149         if (proxyPtr->flags & ZOOM_PENDING) {
    2150             SetZoom(proxyPtr);
    2151         }
    2152         if (proxyPtr->flags & ATOM_SCALE_PENDING) {
    2153             SetSphereScale(proxyPtr);
    2154         }
    2155         if (proxyPtr->flags & STICK_RADIUS_PENDING) {
    2156             SetStickRadius(proxyPtr);
    2157         }
     2169        UpdateSettings(proxyPtr);
    21582170
    21592171        /* Write the current image buffer. */
Note: See TracChangeset for help on using the changeset viewer.