- Timestamp:
- Jul 18, 2016, 2:58:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vmdshow/trunk/vmdserver.tcl
r6373 r6429 442 442 # ---------------------------------------------------------------------- 443 443 proc cmd_load { fileList } { 444 puts stderr "cmd_load fileList=$fileList\n"445 444 global MolInfo MolNames tmpDir 446 445 … … 457 456 set fileList [linsert $fileList 0 "@name:0"] 458 457 } 459 puts stderr "2. cmd_load fileList=$fileList"460 458 461 459 set slot 0 462 460 foreach file $fileList { 463 puts stderr "file=$file\n"464 461 if {[regexp {^@name:(.+)} $file match name]} { 465 462 set op "new" … … 589 586 } 590 587 set Scenes(@CURRENT) "" 591 catch {unset Views} 588 array unset Views 589 array unset ViewCmds 592 590 593 591 # reset the server properties … … 614 612 } 615 613 $parser alias scene cmd_scene 614 615 proc FramesDefview { frameNum matrixNameList matrixValueList } { 616 global Views 617 if { ![string is int $frameNum] } { 618 error "bad frame value \"$frameNum\"" 619 } 620 set Views($frameNum) [list $matrixNameList $matrixValueList] 621 } 622 623 proc FramesSetViewCmds { frameNum cmds } { 624 global ViewCmds 625 if { ![string is int $frameNum] } { 626 error "bad frame value \"$frameNum\"" 627 } 628 set ViewCmds($frameNum) [join $cmds \;] 629 } 616 630 617 631 # ---------------------------------------------------------------------- … … 684 698 # new epoch? then clean out work queue 685 699 if {$epochValue > $Epoch} { 686 catch {unset Work}700 array unset Work 687 701 set Work(queue) "" 688 702 set Epoch $epochValue … … 780 794 } 781 795 defview { 782 if {[llength $args] != 3} { error "wrong # args: should be \"defview matrixNameList matrixValueList\"" }783 set n [lindex $args 0]784 if {![string is int $n]} { error "bad frame value \"$n\"" }785 set Views($n) [lrange $args 1 end]796 eval FramesDefview $args 797 } 798 setcmds { 799 eval FramesSetViewCmds $args 786 800 } 787 801 max { … … 804 818 } 805 819 default { 806 error "bad option \"$what\": should be defview, time, rotate, max"820 error "bad option \"$what\": should be defview, time, rotate, setcmds, or max" 807 821 } 808 822 } … … 963 977 964 978 proc server_send_image {{when -now}} { 965 global client Epoch Work Views Sendqueue DisplaySize979 global client Epoch Work Views ViewCmds Sendqueue DisplaySize 966 980 967 981 if {$when eq "-eventually"} { … … 1017 1031 } 1018 1032 } 1019 catch {unset Work($item(num))} 1033 if { [info exists item(frame)] && 1034 [info exists ViewCmds($item(frame))] } { 1035 if { [catch { 1036 eval $ViewCmds($item(frame)) 1037 } errs] != 0 } { 1038 puts stderr "viewcmd error: $errs" 1039 } 1040 } 1041 array unset Work $item(num) 1020 1042 break 1021 1043 }
Note: See TracChangeset
for help on using the changeset viewer.