[GRASS-dev] Re: [GRASS GIS] #902: nviz (tcl) fails on wingrass

GRASS GIS trac at osgeo.org
Tue Feb 9 18:48:07 EST 2010


#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
  Reporter:  hamish    |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect    |      Status:  new                      
  Priority:  critical  |   Milestone:  6.4.0                    
 Component:  NVIZ      |     Version:  svn-trunk                
Resolution:            |    Keywords:                           
  Platform:  All       |         Cpu:  All                      
-----------------------+----------------------------------------------------
Comment (by glynn):

 Replying to [comment:18 hamish]:

 > > This doesn't allow the nviz binary to be used to run arbitrary
 > > scripts, but I'm not so sure that works anyhow.
 >
 > do you mean nvwish running arbitrary Tcl scripts (no loss) or the
 ability to use the script= option (which is used by d.nviz to set up the
 'flight path' for animations).

 I meant "nviz -f <script>", but I think I got that working with r40879. I
 discovered that nviz2.2_script uses "exec nviz -f ..." in several places
 (it's relying upon the "#!nviz" to which I don't expect to work).

 If `argv[1]` is "-f", main() skips the G_parser() stuff and calls
 Tk_Main() with the unmodified argument list. IOW, nviz behaves like wish.

 If `argv[1]` isn't "-f", main() calls G_parser() on the original command
 line. If G_parser() returns successfully (--help etc all cause G_parser()
 to call exit()), it then calls Tk_Main() with a fabricated command line:
 "nviz -f .../nviz2.2_script" with no further arguments. IOW, nviz behaves
 like a GRASS module; all command-line processing is done by G_parser()
 before Tcl/Tk gets involved.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/902#comment:20>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list