Changeset 3263


Ignore:
Timestamp:
Jan 25, 2013, 1:57:09 PM (12 years ago)
Author:
ldelgass
Message:

Implement clientinfo command. For now, just output name/value pairs from Tcl
list into trace log.

Location:
branches/Rappture 1.2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/Rappture 1.2/gui/scripts/vtkcontourviewer.tcl

    r3177 r3263  
    924924        }
    925925
     926        if 1 {
     927            # Tell the server the name of the tool, the version, and dataset
     928            # that we are rendering.  Have to do it here because we don't know
     929            # what data objects are using the renderer until be get here.
     930            set args ""
     931            lappend args tool [$_first hints toolId]
     932            lappend args version [$_first hints toolRevision]
     933            lappend args dataset [$_first hints label]
     934            SendCmd "clientinfo [list $args]"
     935        }
     936
    926937        foreach axis { x y z } {
    927938            set label [$_first hints ${axis}label]
  • branches/Rappture 1.2/gui/scripts/vtkheightmapviewer.tcl

    r3261 r3263  
    989989        }
    990990
    991         if 0 {
     991        if 1 {
    992992            # Tell the server the name of the tool, the version, and dataset
    993993            # that we are rendering.  Have to do it here because we don't know
     
    997997            lappend args version [$_first hints toolRevision]
    998998            lappend args dataset [$_first hints label]
    999             SendCmd "clientinfo $args"
     999            SendCmd "clientinfo [list $args]"
    10001000        }
    10011001
  • branches/Rappture 1.2/gui/scripts/vtkstreamlinesviewer.tcl

    r3177 r3263  
    10621062        }
    10631063
    1064         if 0 {
     1064        if 1 {
    10651065            # Tell the server the name of the tool, the version, and dataset
    10661066            # that we are rendering.  Have to do it here because we don't know
     
    10701070            lappend args version [$_first hints toolRevision]
    10711071            lappend args dataset [$_first hints label]
    1072             SendCmd "clientinfo $args"
     1072            SendCmd "clientinfo [list $args]"
    10731073        }
    10741074
  • branches/Rappture 1.2/gui/scripts/vtkviewer.tcl

    r3177 r3263  
    940940        if { $location != "" } {
    941941            array set view $location
     942        }
     943
     944        if 1 {
     945            # Tell the server the name of the tool, the version, and dataset
     946            # that we are rendering.  Have to do it here because we don't know
     947            # what data objects are using the renderer until be get here.
     948            set args ""
     949            lappend args tool [$_first hints toolId]
     950            lappend args version [$_first hints toolRevision]
     951            lappend args dataset [$_first hints label]
     952            SendCmd "clientinfo [list $args]"
    942953        }
    943954
  • branches/Rappture 1.2/gui/scripts/vtkvolumeviewer.tcl

    r3177 r3263  
    10341034        }
    10351035
    1036         if 0 {
     1036        if 1 {
    10371037            # Tell the server the name of the tool, the version, and dataset
    10381038            # that we are rendering.  Have to do it here because we don't know
     
    10421042            lappend args version [$_first hints toolRevision]
    10431043            lappend args dataset [$_first hints label]
    1044             SendCmd "clientinfo $args"
     1044            SendCmd "clientinfo [list $args]"
    10451045        }
    10461046
  • branches/Rappture 1.2/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp

    r3262 r3263  
    20862086
    20872087static int
     2088ClientInfoCmd(ClientData clientData, Tcl_Interp *interp, int objc,
     2089              Tcl_Obj *const *objv)
     2090{
     2091    int cinfoc;
     2092    Tcl_Obj **cinfov = NULL;
     2093    if (Tcl_ListObjGetElements(interp, objv[1], &cinfoc, &cinfov) != TCL_OK) {
     2094        return TCL_ERROR;
     2095    }
     2096    if ((cinfoc % 2) != 0) {
     2097        TRACE("cinfoc: %d", cinfoc);
     2098        Tcl_AppendResult(interp, "wrong # elements in clientinfo: should be ",
     2099                         "{name value name value...}", (char*)NULL);
     2100        return TCL_ERROR;
     2101    }
     2102    TRACE("Client Info: %d items", cinfoc/2);
     2103    for (int i = 0; i < cinfoc; i += 2) {
     2104        TRACE("%s = %s", Tcl_GetString(cinfov[i]), Tcl_GetString(cinfov[i+1]));
     2105    }
     2106    return TCL_OK;
     2107}
     2108
     2109static int
    20882110ColorMapAddOp(ClientData clientData, Tcl_Interp *interp, int objc,
    20892111              Tcl_Obj *const *objv)
     
    96759697    Tcl_CreateObjCommand(interp, "box",         BoxCmd,         clientData, NULL);
    96769698    Tcl_CreateObjCommand(interp, "camera",      CameraCmd,      clientData, NULL);
     9699    Tcl_CreateObjCommand(interp, "clientinfo",  ClientInfoCmd,  clientData, NULL);
    96779700    Tcl_CreateObjCommand(interp, "colormap",    ColorMapCmd,    clientData, NULL);
    96789701    Tcl_CreateObjCommand(interp, "cone",        ConeCmd,        clientData, NULL);
     
    97119734    Tcl_DeleteCommand(interp, "box");
    97129735    Tcl_DeleteCommand(interp, "camera");
     9736    Tcl_DeleteCommand(interp, "clientinfo");
    97139737    Tcl_DeleteCommand(interp, "colormap");
    97149738    Tcl_DeleteCommand(interp, "cone");
Note: See TracChangeset for help on using the changeset viewer.