[GRASS-SVN] r30045 - grass/trunk/visualization/nviz/scripts
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 9 20:14:11 EST 2008
Author: cmbarton
Date: 2008-02-09 20:14:11 -0500 (Sat, 09 Feb 2008)
New Revision: 30045
Modified:
grass/trunk/visualization/nviz/scripts/nviz2.2_script
grass/trunk/visualization/nviz/scripts/panel_main.tcl
Log:
Committing patches from Maris Nartiss. Improve 3dview loading and optimizing code for setting view mode.
Modified: grass/trunk/visualization/nviz/scripts/nviz2.2_script
===================================================================
--- grass/trunk/visualization/nviz/scripts/nviz2.2_script 2008-02-10 01:12:26 UTC (rev 30044)
+++ grass/trunk/visualization/nviz/scripts/nviz2.2_script 2008-02-10 01:14:11 UTC (rev 30045)
@@ -730,21 +730,31 @@
# Do not redraw automaticly display while loading state...
set oNauto_draw $Nauto_draw
set Nauto_draw 0
- #do a quick draw to make sure display initialized
- Nquick_draw
- Nload_3dview $file_name
#do a quick draw to make sure display initialized
Nquick_draw
Nload_3dview $file_name
#Reset position GUI
- set ht [lindex [Nget_real_position 1] 2]
+ #set ht [lindex [Nget_real_position 1] 2]
+ # for some strange reason height gets read/loaded from file correctly
+ # only if view is loaded for second time
+ # Also currently light related stuff is not updated
+ set ht [lindex [Nget_height] 0]
+ set ex [Nget_exag]
+ set tw [Nget_twist]
+ set pe [Nget_fov]
#reset height
- Nv_setEntry $Nv_(main_BASE).midf.height.f.entry $ht
+ Nv_setEntry $Nv_(main_BASE).midf.height.f.entry $ht
Nv_floatscaleCallback $Nv_(main_BASE).midf.height e 2 null $ht
- #change_display 2
- #change_display 1
+ # reset exag
+ Nv_setEntry $Nv_(main_BASE).midf.zexag.f.entry $ex
+ Nv_floatscaleCallback $Nv_(main_BASE).midf.zexag b 2 Nchange_exag $ex
+ # reset twist/perspective
+ Nv_setEntry $Nv_(main_BASE).bframe.cframe.tw.f.entry $tw
+ Nv_scaleCallback $Nv_(main_BASE).bframe.cframe.tw b 2 Nchange_twist $tw
+ Nv_setEntry $Nv_(main_BASE).bframe.cframe.pers.f.entry $pe
+ Nv_scaleCallback $Nv_(main_BASE).bframe.cframe.pers b 2 Nchange_persp $pe
if { $draw_option == 1 } { change_display 0 } \
elseif { $draw_option == 0 } { change_display 1 }
Modified: grass/trunk/visualization/nviz/scripts/panel_main.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/panel_main.tcl 2008-02-10 01:12:26 UTC (rev 30044)
+++ grass/trunk/visualization/nviz/scripts/panel_main.tcl 2008-02-10 01:14:11 UTC (rev 30045)
@@ -508,7 +508,6 @@
set h [lindex [Nget_real_position 1] 2]
set min [lindex [Nget_height] 1]
set max [lindex [Nget_height] 2]
- set Nv_(FlyThrough) 0
if {$flag == 1} {
#draw eye position
@@ -521,12 +520,13 @@
set XY [Nv_mkXYScale $NAME cross XY_POS 125 125 109 109 update_center_position]
}
- if {$Nv_(FlyThrough) == 0} {
+ if {$Nv_(FlyThrough)} {
pack_XY
} else {
pack $XY -side left -before $Nv_(HEIGHT_SLIDER)
}
+ set Nv_(FlyThrough) 0
update_height $h
reset_res
move_position
More information about the grass-commit
mailing list