Changeset 6548
- Timestamp:
- Sep 15, 2016 11:29:21 PM (7 years ago)
- Location:
- branches/blt4_trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4_trunk
- Property svn:mergeinfo changed
/branches/1.6 merged: 6501 /trunk merged: 6532-6533,6535-6537,6542,6545-6547
- Property svn:mergeinfo changed
-
branches/blt4_trunk/examples/mapviewer/colorramp/colorramp_geotiff_example.tcl
r6286 r6548 20 20 # Driver parameter array for XYZ provider 21 21 array set xyzParams { 22 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}22 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 23 23 } 24 24 # Image layer parameter array -
branches/blt4_trunk/examples/mapviewer/colorramp/colorramp_netcdf_example.tcl
r6286 r6548 20 20 # Driver parameter array for XYZ provider 21 21 array set xyzParams { 22 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}22 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 23 23 } 24 24 # Image layer parameter array -
branches/blt4_trunk/examples/mapviewer/feature/feature_selector_query.tcl
r6414 r6548 19 19 # Parameters for base layer 20 20 array set xyzParams { 21 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}21 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 22 22 } 23 23 array set osm { -
branches/blt4_trunk/examples/mapviewer/layers/add_remove_layers.tcl
r6351 r6548 19 19 # create xyz layer 20 20 array set xyzParams { 21 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}21 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 22 22 } 23 23 array set osm { -
branches/blt4_trunk/examples/mapviewer/layers/remove_single_layer.tcl
r6351 r6548 19 19 # create xyz layer 20 20 array set xyzParams { 21 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}21 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 22 22 } 23 23 array set osm { -
branches/blt4_trunk/examples/mapviewer/layers/repeated_layer_names.tcl
r6414 r6548 18 18 # create xyz layer 19 19 array set xyzParams { 20 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}20 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 21 21 } 22 22 array set osm { -
branches/blt4_trunk/examples/mapviewer/ogr/ogr_csv_icon_example.tcl
r6414 r6548 18 18 19 19 array set xyzParams { 20 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}20 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 21 21 } 22 22 array set osm { -
branches/blt4_trunk/examples/mapviewer/ogr/ogr_csv_to_shp_icon_example.tcl
r6286 r6548 20 20 # create an xyz layer for the OpenStreetMaps base layer 21 21 array set xyzParams { 22 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}22 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 23 23 } 24 24 array set osm { -
branches/blt4_trunk/examples/mapviewer/placard/placard_disable_example.tcl
r6351 r6548 19 19 # create an XYZ world layer 20 20 array set xyzParams { 21 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}21 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 22 22 } 23 23 array set osm { -
branches/blt4_trunk/examples/mapviewer/placard/placard_example.tcl
r6286 r6548 19 19 # create an XYZ world layer 20 20 array set xyzParams { 21 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}21 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 22 22 } 23 23 array set osm { -
branches/blt4_trunk/examples/mapviewer/select/select_feature_example.tcl
r6286 r6548 68 68 # Driver parameter array for XYZ provider 69 69 array set xyzParams { 70 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}70 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 71 71 } 72 72 # Image layer parameter array -
branches/blt4_trunk/examples/mapviewer/xyz/xyz_example.tcl
r6286 r6548 19 19 # create an XYZ world layer 20 20 array set dp1 { 21 url {http:// otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}21 url {http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png} 22 22 } 23 23 array set l1 { -
branches/blt4_trunk/gui/scripts/combochecks.tcl
r6414 r6548 130 130 $itk_component(ddlist) reset 131 131 foreach part $newval { 132 set oldpart $part 132 133 set part [translate $part] 134 if {[string compare $part ""] == 0} { 135 # part could not be translated to a component 136 error "bad value \"$oldpart\": should be one of \"[join [choices get -label] {, }]\"" 137 } 133 138 $itk_component(ddlist) state $part 1 134 139 } … … 261 266 set newval [$itk_component(ddlist) current -label] 262 267 set val [$itk_component(entry) get] 263 if {$newval ne "" && $newval ne $val} { 268 if {$newval eq ""} { 269 # all options are unchecked, use the old val 270 # wrap val (from entry) in a list to protect embedded whitespace 271 value [list $val] 272 } elseif {$newval ne $val} { 273 # new value selected, update the widget 264 274 value $newval 265 275 if {[string length $itk_option(-interactcommand)] > 0} { 266 276 uplevel #0 $itk_option(-interactcommand) 267 277 } 268 }269 if {$newval eq ""} {270 value $val271 278 } 272 279 } -
branches/blt4_trunk/gui/scripts/field.tcl
r6414 r6548 1172 1172 package require vtk 1173 1173 1174 set reader $this-datasetreader 1175 vtkDataSetReader $reader 1176 1177 # Write the contents to a file just in case it's binary. 1178 set tmpfile file[pid].vtk 1179 set f [open "$tmpfile" "w"] 1180 fconfigure $f -translation binary -encoding binary 1181 puts $f $contents 1182 close $f 1183 1184 $reader SetFileName $tmpfile 1185 $reader ReadAllNormalsOn 1186 $reader ReadAllTCoordsOn 1187 $reader ReadAllScalarsOn 1188 $reader ReadAllColorScalarsOn 1189 $reader ReadAllVectorsOn 1190 $reader ReadAllTensorsOn 1191 $reader ReadAllFieldsOn 1192 $reader Update 1193 file delete $tmpfile 1194 1195 set dataset [$reader GetOutput] 1174 if {[string index $contents 0] == "<"} { 1175 set reader $this-xmlreader 1176 vtkXMLGenericDataObjectReader $reader 1177 1178 # Write the contents to a file, since the XML reader 1179 # can't read from a memory buffer 1180 set tmpfile file[pid]-vtk.xml 1181 set f [open "$tmpfile" "w"] 1182 fconfigure $f -translation binary -encoding binary 1183 puts $f $contents 1184 close $f 1185 1186 $reader SetFileName $tmpfile 1187 $reader Update 1188 file delete $tmpfile 1189 1190 set dataset [$reader GetOutputAsDataSet] 1191 } else { 1192 set reader $this-datasetreader 1193 vtkDataSetReader $reader 1194 1195 # Write the contents to a file just in case it's binary. 1196 set tmpfile file[pid].vtk 1197 set f [open "$tmpfile" "w"] 1198 fconfigure $f -translation binary -encoding binary 1199 puts $f $contents 1200 close $f 1201 1202 $reader SetFileName $tmpfile 1203 $reader ReadAllNormalsOn 1204 $reader ReadAllTCoordsOn 1205 $reader ReadAllScalarsOn 1206 $reader ReadAllColorScalarsOn 1207 $reader ReadAllVectorsOn 1208 $reader ReadAllTensorsOn 1209 $reader ReadAllFieldsOn 1210 $reader Update 1211 file delete $tmpfile 1212 1213 set dataset [$reader GetOutput] 1214 } 1196 1215 if { $dataset == "" } { 1197 1216 puts stderr "Failed to parse VTK file" -
branches/blt4_trunk/gui/scripts/map.tcl
r6531 r6548 180 180 return 181 181 } 182 # If there is a <current>, use it 183 set current [$map element -as object "current"] 184 if {$current != ""} { 185 set map $current 186 } 182 187 183 188 # Set global map properties … … 235 240 set parent [$_tree findchild root "layers"] 236 241 set layers [$map element -as object "layers"] 237 foreach layer [$layers children -type layer] { 242 set layerList [list] 243 if {$layers != ""} { 244 set layerList [$layers children -type layer] 245 } 246 foreach layer $layerList { 238 247 # Unique identifier for layer. 239 248 set name [$layers element -as id "$layer"] -
branches/blt4_trunk/gui/scripts/mapviewer.tcl
r6531 r6548 2143 2143 2,0 $inner.wireframe -cspan 2 -anchor w -pady 2 \ 2144 2144 3,0 $inner.lighting -cspan 2 -anchor w -pady 2 \ 2145 4,0 $inner.time_l -cspan 2-anchor w -pady 2 \2146 4,1 $inner.time -cspan 2-fill x -pady 2 \2147 5,0 $inner.ambient_l -cspan 2-anchor w -pady 2 \2148 5,1 $inner.ambient -cspan 2-fill x -pady 22145 4,0 $inner.time_l -anchor w -pady 2 \ 2146 4,1 $inner.time -fill x -pady 2 \ 2147 5,0 $inner.ambient_l -anchor w -pady 2 \ 2148 5,1 $inner.ambient -fill x -pady 2 2149 2149 # 4,0 $inner.edges -cspan 2 -anchor w -pady 2 2150 2150 … … 3315 3315 -text $info(label) \ 3316 3316 -font "Arial 9" -anchor w 3317 blt::table $f $row,1 $f.${ctlname}_lbl -anchor w -pady 2 -cspan 23317 blt::table $f $row,1 $f.${ctlname}_lbl -anchor w -pady 2 3318 3318 Rappture::Tooltip::for $f.${ctlname}_lbl [join $tooltip \n] 3319 3319 } else { … … 3324 3324 -command [itcl::code $this \ 3325 3325 SetLayerVisibility $dataobj $layer] 3326 blt::table $f $row,1 $f.${ctlname}_visible -anchor w -pady 2 -cspan 23326 blt::table $f $row,1 $f.${ctlname}_visible -anchor w -pady 2 3327 3327 Rappture::Tooltip::for $f.${ctlname}_visible [join $tooltip \n] 3328 3328 } … … 3332 3332 if { $info(driver) == "colorramp" } { 3333 3333 set colormap $ctlname 3334 set f2 $f.cmap_$ctlname 3335 frame $f2 3334 3336 if { ![info exists _image(legend-$colormap)] } { 3335 3337 set _image(legend-$colormap) [image create photo] 3336 3338 } 3337 3339 itk_component add legend-$colormap-min { 3338 label $f .legend-$colormap-min -text 03340 label $f2.legend-$colormap-min -text 0 3339 3341 } 3340 3342 itk_component add legend-$colormap-max { 3341 label $f .legend-$colormap-max -text 13343 label $f2.legend-$colormap-max -text 1 3342 3344 } 3343 3345 itk_component add legend-$colormap { 3344 label $f.legend-$colormap -image $_image(legend-$colormap) 3345 } 3346 blt::table $f $row,0 $f.legend-$colormap-min -anchor w -pady 0 -cspan 2 3347 blt::table $f $row,2 $f.legend-$colormap-max -anchor e -pady 0 3348 incr row 3349 blt::table $f $row,0 $f.legend-$colormap -anchor w -pady 2 -cspan 3 3346 label $f2.legend-$colormap -image $_image(legend-$colormap) 3347 } 3348 blt::table $f2 0,0 $f2.legend-$colormap-min -anchor w -pady 0 3349 blt::table $f2 0,1 $f2.legend-$colormap-max -anchor e -pady 0 3350 blt::table $f2 1,0 $f2.legend-$colormap -anchor w -pady 2 -cspan 2 3351 3352 blt::table $f $row,0 $f2 -anchor w -pady 0 -cspan 2 3350 3353 incr row 3351 3354 RequestLegend $colormap 256 16 … … 3355 3358 $info(type) != "mask" && 3356 3359 ($info(type) != "image" || $imgIdx > 1) } { 3357 label $f.${ctlname}_opacity_l -text "Opacity" -font "Arial 9" 3358 ::scale $f.${ctlname}_opacity -from 0 -to 100 \ 3360 set f2 $f.op_$ctlname 3361 frame $f2 3362 label $f2.${ctlname}_opacity_l -text "Opacity" -font "Arial 9" 3363 ::scale $f2.${ctlname}_opacity -from 0 -to 100 \ 3359 3364 -orient horizontal -showvalue off \ 3360 3365 -variable [itcl::scope _opacity($tag)] \ … … 3362 3367 -command [itcl::code $this \ 3363 3368 SetLayerOpacity $dataobj $layer] 3364 Rappture::Tooltip::for $f.${ctlname}_opacity "Set opacity of $info(label) layer" 3365 blt::table $f $row,0 $f.${ctlname}_opacity_l -anchor w -pady 2 -cspan 2 3366 blt::table $f $row,2 $f.${ctlname}_opacity -anchor w -pady 2 3369 Rappture::Tooltip::for $f2.${ctlname}_opacity "Set opacity of $info(label) layer" 3370 blt::table $f2 0,0 $f2.${ctlname}_opacity_l -anchor w -pady 2 3371 blt::table $f2 0,1 $f2.${ctlname}_opacity -anchor w -pady 2 3372 3373 blt::table $f $row,0 $f2 -anchor w -pady 0 -cspan 2 3367 3374 incr row 3368 3375 } … … 3375 3382 SendCmd "[list map attrib [encoding convertto utf-8 [join $attrib ,]]]" 3376 3383 label $f.map_attrib -text [join $attrib \n] -font "Arial 9" 3377 blt::table $f $row,0 $f.map_attrib -anchor sw -pady 2 -cspan 33384 blt::table $f $row,0 $f.map_attrib -anchor sw -pady 2 -cspan 2 3378 3385 #incr row 3379 3386 if { $row > 0 } { 3380 3387 blt::table configure $f r* c* -resize none 3381 blt::table configure $f r$row c 2-resize expand3388 blt::table configure $f r$row c1 -resize expand 3382 3389 } 3383 3390 } -
branches/blt4_trunk/lang/tcl/scripts/task.tcl
r6497 r6548 464 464 if { ![info exists _resources(-cachehosts)] || 465 465 $_resources(-cachehosts) == "" } { 466 puts stderr cachehosts=[info exists _resources(-cachehosts)]466 puts stderr cachehosts=[info exists _resources(-cachehosts)] 467 467 return 0 468 468 } 469 if 0 { 470 set state [$_xmlobj get "tool.cache"] 471 puts stderr "cache tag is \"$state\"" 472 if { $state == "" } { 473 return 0 474 } 475 } else { 476 set state 1 477 } 478 if { ![string is boolean $state] } { 479 return 0 469 global env 470 if { [info exists env(RAPPTURE_CACHE_OVERRIDE)] } { 471 set state $env(RAPPTURE_CACHE_OVERRIDE) 472 } else { 473 set state [$_xmlobj get "tool.cache"] 474 } 475 puts stderr "cache tag is \"$state\"" 476 if { $state == "" || ![string is boolean $state] } { 477 return 1; # Default is to allow caching. 480 478 } 481 479 return $state
Note: See TracChangeset
for help on using the changeset viewer.