Changeset 4453
- Timestamp:
- Jul 1, 2014, 9:11:09 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vmd/vmdserver.tcl
r4452 r4453 73 73 74 74 foreach cmd { 75 vmdinfo 76 vmdbench 75 axes 77 76 color 78 axes77 gettimestep 79 78 imd 80 vmdcollab79 label 81 80 vmd_label 82 81 light 83 82 material 84 vmd_menu 85 stage 86 light 87 user 83 measure 84 mobile 88 85 mol 89 86 molinfo 90 87 molecule 91 88 mouse 92 mobile 93 spaceball 89 parallel 94 90 plugin 91 rawtimestep 95 92 render 96 tkrender97 93 rotate 98 94 rotmat 95 scale 99 96 vmd_scale 97 spaceball 98 stage 99 tkrender 100 tool 100 101 translate 101 sleep 102 tool 103 measure 104 rawtimestep 105 gettimestep 102 user 103 vmdcollab 106 104 vmdcon 105 vmdinfo 106 vmdbench 107 107 volmap 108 parallel109 108 } { 110 109 $parser alias $cmd $cmd … … 245 244 246 245 # ---------------------------------------------------------------------- 246 # USAGE: setquality normal|high 247 # 248 # Sets the rendering quality for the scene--either "high" (GLSL) or 249 # normal. 250 # ---------------------------------------------------------------------- 251 proc cmd_setquality {newval} { 252 global DisplayProps 253 254 switch -- $newval { 255 high { 256 display rendermode GLSL 257 set DisplayProps(rendermode) "GLSL" 258 } 259 normal { 260 display rendermode Normal 261 set DisplayProps(rendermode) "Normal" 262 } 263 default { 264 error "bad quality value \"$newval\": should be normal or high" 265 } 266 } 267 } 268 $parser alias setquality cmd_setquality 269 270 # ---------------------------------------------------------------------- 247 271 # USAGE: smoothreps <value> 248 272 # … … 284 308 285 309 # ---------------------------------------------------------------------- 310 # These commands just confuse things, so ignore them silently. 311 # ---------------------------------------------------------------------- 312 proc cmd_noop {args} { 313 # do nothing 314 } 315 316 $parser alias sleep cmd_noop 317 $parser alias menu cmd_noop 318 $parser alias vmd_menu cmd_noop 319 $parser alias play cmd_noop 320 $parser alias quit cmd_noop 321 322 # ---------------------------------------------------------------------- 286 323 # USAGE: load <file> <file>... 287 324 # … … 290 327 # ---------------------------------------------------------------------- 291 328 proc cmd_load {args} { 329 global MolInfo 330 292 331 # clear all existing molecules 293 332 foreach nmol [molinfo list] { 294 333 mol delete $nmol 295 334 } 335 catch {unset MolInfo} 296 336 297 337 # load new files 298 set op "new" 338 if {![regexp {^@name:} $args]} { 339 # make sure that there is at least one name in the list 340 set args [linsert $args 0 "@name:0"] 341 } 342 343 set slot 0 299 344 foreach file $args { 345 if {[regexp {^@name:(.+)} $file match name]} { 346 set op "new" 347 continue 348 } 300 349 mol $op $file waitfor all 301 set op "addfile" 350 351 if {$op eq "new"} { 352 set newnum [lindex [molinfo list] end] 353 set MolInfo($name) $newnum 354 set MolInfo($slot) $newnum 355 incr slot 356 set op "addfile" 357 } 302 358 } 303 359 … … 325 381 # ---------------------------------------------------------------------- 326 382 proc cmd_scene {option args} { 327 global Scenes Views DisplayProps parser383 global Scenes Views MolInfo DisplayProps parser 328 384 329 385 switch -- $option { … … 369 425 $parser eval [list catch [list unset $val]] 370 426 } 427 $parser eval [list array set mol [array get MolInfo]] 428 371 429 if {[catch {$parser eval $Scenes($name)} result]} { 372 430 error "$result\nwhile loading scene \"$name\"" … … 374 432 375 433 # capture display characteristics in case we ever need to reset 376 set DisplayProps(rendermode) [display get rendermode]434 set DisplayProps(rendermode) "Normal" 377 435 set DisplayProps(shadows) [display get shadows] 378 436
Note: See TracChangeset
for help on using the changeset viewer.