[GRASS-SVN] r54058 - grass/trunk/gui/icons/grass grass/trunk/gui/wxpython grass/trunk/gui/wxpython/animation grass/trunk/gui/wxpython/lmgr grass/trunk/gui/wxpython/xml grass-addons/grass7/gui/wxpython/wx.animation grass-addons/grass7/gui/wxpython/wx.animation/icons/grass
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 26 12:21:26 PST 2012
Author: annakrat
Date: 2012-11-26 12:21:24 -0800 (Mon, 26 Nov 2012)
New Revision: 54058
Added:
grass/trunk/gui/icons/grass/player-back.png
grass/trunk/gui/icons/grass/player-pause.png
grass/trunk/gui/icons/grass/player-repeat-back-forward.png
grass/trunk/gui/icons/grass/player-stop.png
grass/trunk/gui/wxpython/animation/
grass/trunk/gui/wxpython/animation/Makefile
grass/trunk/gui/wxpython/animation/anim.py
grass/trunk/gui/wxpython/animation/g.gui.animation.html
grass/trunk/gui/wxpython/animation/g.gui.animation.py
grass/trunk/gui/wxpython/animation/wxGUI_animation_tool.jpg
Removed:
grass-addons/grass7/gui/wxpython/wx.animation/animation/
grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-back.png
grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-pause.png
grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-repeat-back-forward.png
grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-stop.png
grass-addons/grass7/gui/wxpython/wx.animation/wxGUI.Animation.html
grass-addons/grass7/gui/wxpython/wx.animation/wxGUI_animation_tool.jpg
grass/trunk/gui/wxpython/animation/__init__.py
grass/trunk/gui/wxpython/animation/animation.py
Modified:
grass/trunk/gui/wxpython/Makefile
grass/trunk/gui/wxpython/animation/frame.py
grass/trunk/gui/wxpython/animation/toolbars.py
grass/trunk/gui/wxpython/lmgr/frame.py
grass/trunk/gui/wxpython/xml/menudata.xml
Log:
wxGUI: Animation tool moved from addons to trunk; g.gui.animation module created
Copied: grass/trunk/gui/icons/grass/player-back.png (from rev 54040, grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-back.png)
===================================================================
(Binary files differ)
Copied: grass/trunk/gui/icons/grass/player-pause.png (from rev 54040, grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-pause.png)
===================================================================
(Binary files differ)
Copied: grass/trunk/gui/icons/grass/player-repeat-back-forward.png (from rev 54040, grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-repeat-back-forward.png)
===================================================================
(Binary files differ)
Copied: grass/trunk/gui/icons/grass/player-stop.png (from rev 54040, grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-stop.png)
===================================================================
(Binary files differ)
Modified: grass/trunk/gui/wxpython/Makefile
===================================================================
--- grass/trunk/gui/wxpython/Makefile 2012-11-26 20:15:58 UTC (rev 54057)
+++ grass/trunk/gui/wxpython/Makefile 2012-11-26 20:21:24 UTC (rev 54058)
@@ -1,6 +1,6 @@
MODULE_TOPDIR = ../..
-SUBDIRS = docs mapswipe gmodeler rlisetup
+SUBDIRS = docs animation mapswipe gmodeler rlisetup
EXTRA_CLEAN_FILES = menustrings.py build_ext.pyc
include $(MODULE_TOPDIR)/include/Make/Dir.make
@@ -10,12 +10,12 @@
ETCDIR = $(ETC)/gui/wxpython
SRCFILES := $(wildcard icons/*.* scripts/* xml/*) \
- $(wildcard core/* dbmgr/* gcp/* gmodeler/* gui_core/* iclass/* lmgr/* location_wizard/* \
+ $(wildcard animation/* core/* dbmgr/* gcp/* gmodeler/* gui_core/* iclass/* lmgr/* location_wizard/* \
mapdisp/* modules/* nviz/* psmap/* mapswipe/* vdigit/* wxplot/* ogc_services/* rlisetup/*) \
gis_set.py gis_set_error.py wxgui.py README
DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES)) $(patsubst %.py,$(ETCDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
-PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,core dbmgr gcp gmodeler gui_core iclass lmgr location_wizard \
+PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,animation core dbmgr gcp gmodeler gui_core iclass lmgr location_wizard \
mapdisp modules nviz psmap mapswipe vdigit wxplot ogc_services rlisetup)
DSTDIRS := $(patsubst %,$(ETCDIR)/%,icons scripts xml)
Added: grass/trunk/gui/wxpython/animation/Makefile
===================================================================
--- grass/trunk/gui/wxpython/animation/Makefile (rev 0)
+++ grass/trunk/gui/wxpython/animation/Makefile 2012-11-26 20:21:24 UTC (rev 54058)
@@ -0,0 +1,13 @@
+MODULE_TOPDIR = ../../..
+
+PGM = g.gui.animation
+WXPGM = Animation
+
+include $(MODULE_TOPDIR)/include/Make/Script.make
+
+default: script
+ -rm -f $(PGM).tmp.html
+ $(MAKE) $(HTMLDIR)/wxGUI.$(WXPGM).html
+
+$(HTMLDIR)/wxGUI.$(WXPGM).html: $(PGM).html | $(HTMLDIR)
+ $(PYTHON) $(GISBASE)/tools/mkhtml.py $(PGM) $(GRASS_VERSION_DATE) > $@
Deleted: grass/trunk/gui/wxpython/animation/__init__.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.animation/animation/__init__.py 2012-11-26 08:02:36 UTC (rev 54040)
+++ grass/trunk/gui/wxpython/animation/__init__.py 2012-11-26 20:21:24 UTC (rev 54058)
@@ -1,11 +0,0 @@
-all = [
- 'animation',
- 'controller',
- 'dialogs',
- 'frame',
- 'mapwindow',
- 'nviztask',
- 'temporal_manager',
- 'toolbars',
- 'utils',
- ]
Copied: grass/trunk/gui/wxpython/animation/anim.py (from rev 54040, grass-addons/grass7/gui/wxpython/wx.animation/animation/animation.py)
===================================================================
--- grass/trunk/gui/wxpython/animation/anim.py (rev 0)
+++ grass/trunk/gui/wxpython/animation/anim.py 2012-11-26 20:21:24 UTC (rev 54058)
@@ -0,0 +1,189 @@
+"""!
+ at package animation.anim
+
+ at brief Animation class controls frame order
+
+Classes:
+ - anim::Animation
+
+(C) 2012 by the GRASS Development Team
+
+This program is free software under the GNU General Public License
+(>=v2). Read the file COPYING that comes with GRASS for details.
+
+ at author Anna Kratochvilova <kratochanna gmail.com>
+"""
+
+import wx
+from utils import Orientation, ReplayMode
+
+class Animation(wx.EvtHandler):
+ """!Animation class specifies which frame to show at which instance."""
+ def __init__(self):
+ wx.EvtHandler.__init__(self)
+
+ self.currentIndex = 0
+ self.frames = []
+ # states
+ self.orientation = Orientation.FORWARD
+ self.replayMode = ReplayMode.ONESHOT
+
+ self.callbackUpdateFrame = None
+ self.callbackEndAnimation = None
+ self.callbackOrientationChanged = None
+
+ self.isActive = False
+
+ def IsActive(self):
+ """!Returns if the animation is active or not"""
+ return self.isActive
+
+ def SetActive(self, active):
+ self.isActive = active
+
+ def SetFrames(self, frames):
+ """!Sets animation frames.
+
+ @param frames list of strings
+ """
+ self.frames = frames
+
+ def GetFrame(self, index):
+ """!Returns animation frame"""
+ return self.frames[index]
+
+ def GetCount(self):
+ """!Get frame count."""
+ return len(self.frames)
+
+ count = property(fget = GetCount)
+
+ def GetReplayMode(self):
+ """!Returns replay mode (loop)."""
+ return self._replayMode
+
+ def SetReplayMode(self, mode):
+ self._replayMode = mode
+
+ replayMode = property(fset = SetReplayMode, fget = GetReplayMode)
+
+ def GetOrientation(self):
+ return self._orientation
+
+ def SetOrientation(self, mode):
+ self._orientation = mode
+
+ orientation = property(fset = SetOrientation, fget = GetOrientation)
+
+ def SetCallbackUpdateFrame(self, callback):
+ """!Sets function to be called when updating frame."""
+ self.callbackUpdateFrame = callback
+
+ def SetCallbackEndAnimation(self, callback):
+ """!Sets function to be called when animation ends."""
+ self.callbackEndAnimation = callback
+
+ def SetCallbackOrientationChanged(self, callback):
+ """!Sets function to be called when orientation changes."""
+ self.callbackOrientationChanged = callback
+
+ def Start(self):
+ if not self.IsActive():
+ return
+
+ def Pause(self, paused):
+ if not self.IsActive():
+ return
+
+ def Stop(self):
+ if not self.IsActive():
+ return
+ self.currentIndex = 0
+ self.callbackEndAnimation(self.currentIndex, self.frames[self.currentIndex])
+
+ def _arrivedToEnd(self):
+ """!Decides which action to do after animation end (stop, repeat)."""
+ if not self.IsActive():
+ return
+ if self.replayMode == ReplayMode.ONESHOT:
+ self.Stop()
+
+ if self.orientation == Orientation.FORWARD:
+ if self.replayMode == ReplayMode.REPEAT:
+ self.currentIndex = 0
+ elif self.replayMode == ReplayMode.REVERSE:
+ self.orientation = Orientation.BACKWARD
+ self.currentIndex = self.count - 2 # -1
+ self.callbackOrientationChanged(Orientation.BACKWARD)
+ else:
+ if self.replayMode == ReplayMode.REPEAT:
+ self.currentIndex = self.count - 1
+ elif self.replayMode == ReplayMode.REVERSE:
+ self.orientation = Orientation.FORWARD
+ self.currentIndex = 1 # 0
+ self.callbackOrientationChanged(Orientation.FORWARD)
+
+ def Update(self):
+ """!Updates frame."""
+ if not self.IsActive():
+ return
+
+ self.callbackUpdateFrame(self.currentIndex, self.frames[self.currentIndex])
+ if self.orientation == Orientation.FORWARD:
+ self.currentIndex += 1
+ if self.currentIndex == self.count:
+ self._arrivedToEnd()
+ else:
+ self.currentIndex -= 1
+ if self.currentIndex == -1:
+ self._arrivedToEnd()
+
+ def FrameChangedFromOutside(self, index):
+ """!Let the animation know that frame was changed from outside."""
+ if not self.IsActive():
+ return
+ self.currentIndex = index
+ self.callbackUpdateFrame(self.currentIndex, self.frames[self.currentIndex])
+
+ def PreviousFrameIndex(self):
+ if not self.IsActive():
+ return
+ if self.orientation == Orientation.FORWARD:
+ self.currentIndex -= 1
+ if self.currentIndex == -1:
+ self.currentIndex = 0
+ else:
+ self.currentIndex += 1
+ if self.currentIndex == self.count:
+ self.currentIndex = self.count - 1
+
+ def NextFrameIndex(self):
+ if not self.IsActive():
+ return
+ if self.orientation == Orientation.FORWARD:
+ self.currentIndex += 1
+ if self.currentIndex == self.count:
+ self.currentIndex = self.count - 1
+ else:
+ self.currentIndex -= 1
+ if self.currentIndex == -1:
+ self.currentIndex = 0
+
+#def test():
+# import wx
+# app = wx.PySimpleApp()
+# a = Animation()
+#
+#
+# frame = wx.Frame(None)
+# frame.Show()
+#
+# a.SetReplayMode(ReplayMode.REVERSE)
+# a.Start()
+# app.MainLoop()
+#
+#
+#if __name__ == '__main__':
+# test()
+
+
Deleted: grass/trunk/gui/wxpython/animation/animation.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.animation/animation/animation.py 2012-11-26 08:02:36 UTC (rev 54040)
+++ grass/trunk/gui/wxpython/animation/animation.py 2012-11-26 20:21:24 UTC (rev 54058)
@@ -1,189 +0,0 @@
-"""!
- at package animation.animation
-
- at brief Animation class controls frame order
-
-Classes:
- - animation::Animation
-
-(C) 2012 by the GRASS Development Team
-
-This program is free software under the GNU General Public License
-(>=v2). Read the file COPYING that comes with GRASS for details.
-
- at author Anna Kratochvilova <kratochanna gmail.com>
-"""
-
-import wx
-from utils import Orientation, ReplayMode
-
-class Animation(wx.EvtHandler):
- """!Animation class specifies which frame to show at which instance."""
- def __init__(self):
- wx.EvtHandler.__init__(self)
-
- self.currentIndex = 0
- self.frames = []
- # states
- self.orientation = Orientation.FORWARD
- self.replayMode = ReplayMode.ONESHOT
-
- self.callbackUpdateFrame = None
- self.callbackEndAnimation = None
- self.callbackOrientationChanged = None
-
- self.isActive = False
-
- def IsActive(self):
- """!Returns if the animation is active or not"""
- return self.isActive
-
- def SetActive(self, active):
- self.isActive = active
-
- def SetFrames(self, frames):
- """!Sets animation frames.
-
- @param frames list of strings
- """
- self.frames = frames
-
- def GetFrame(self, index):
- """!Returns animation frame"""
- return self.frames[index]
-
- def GetCount(self):
- """!Get frame count."""
- return len(self.frames)
-
- count = property(fget = GetCount)
-
- def GetReplayMode(self):
- """!Returns replay mode (loop)."""
- return self._replayMode
-
- def SetReplayMode(self, mode):
- self._replayMode = mode
-
- replayMode = property(fset = SetReplayMode, fget = GetReplayMode)
-
- def GetOrientation(self):
- return self._orientation
-
- def SetOrientation(self, mode):
- self._orientation = mode
-
- orientation = property(fset = SetOrientation, fget = GetOrientation)
-
- def SetCallbackUpdateFrame(self, callback):
- """!Sets function to be called when updating frame."""
- self.callbackUpdateFrame = callback
-
- def SetCallbackEndAnimation(self, callback):
- """!Sets function to be called when animation ends."""
- self.callbackEndAnimation = callback
-
- def SetCallbackOrientationChanged(self, callback):
- """!Sets function to be called when orientation changes."""
- self.callbackOrientationChanged = callback
-
- def Start(self):
- if not self.IsActive():
- return
-
- def Pause(self, paused):
- if not self.IsActive():
- return
-
- def Stop(self):
- if not self.IsActive():
- return
- self.currentIndex = 0
- self.callbackEndAnimation(self.currentIndex, self.frames[self.currentIndex])
-
- def _arrivedToEnd(self):
- """!Decides which action to do after animation end (stop, repeat)."""
- if not self.IsActive():
- return
- if self.replayMode == ReplayMode.ONESHOT:
- self.Stop()
-
- if self.orientation == Orientation.FORWARD:
- if self.replayMode == ReplayMode.REPEAT:
- self.currentIndex = 0
- elif self.replayMode == ReplayMode.REVERSE:
- self.orientation = Orientation.BACKWARD
- self.currentIndex = self.count - 2 # -1
- self.callbackOrientationChanged(Orientation.BACKWARD)
- else:
- if self.replayMode == ReplayMode.REPEAT:
- self.currentIndex = self.count - 1
- elif self.replayMode == ReplayMode.REVERSE:
- self.orientation = Orientation.FORWARD
- self.currentIndex = 1 # 0
- self.callbackOrientationChanged(Orientation.FORWARD)
-
- def Update(self):
- """!Updates frame."""
- if not self.IsActive():
- return
-
- self.callbackUpdateFrame(self.currentIndex, self.frames[self.currentIndex])
- if self.orientation == Orientation.FORWARD:
- self.currentIndex += 1
- if self.currentIndex == self.count:
- self._arrivedToEnd()
- else:
- self.currentIndex -= 1
- if self.currentIndex == -1:
- self._arrivedToEnd()
-
- def FrameChangedFromOutside(self, index):
- """!Let the animation know that frame was changed from outside."""
- if not self.IsActive():
- return
- self.currentIndex = index
- self.callbackUpdateFrame(self.currentIndex, self.frames[self.currentIndex])
-
- def PreviousFrameIndex(self):
- if not self.IsActive():
- return
- if self.orientation == Orientation.FORWARD:
- self.currentIndex -= 1
- if self.currentIndex == -1:
- self.currentIndex = 0
- else:
- self.currentIndex += 1
- if self.currentIndex == self.count:
- self.currentIndex = self.count - 1
-
- def NextFrameIndex(self):
- if not self.IsActive():
- return
- if self.orientation == Orientation.FORWARD:
- self.currentIndex += 1
- if self.currentIndex == self.count:
- self.currentIndex = self.count - 1
- else:
- self.currentIndex -= 1
- if self.currentIndex == -1:
- self.currentIndex = 0
-
-#def test():
-# import wx
-# app = wx.PySimpleApp()
-# a = Animation()
-#
-#
-# frame = wx.Frame(None)
-# frame.Show()
-#
-# a.SetReplayMode(ReplayMode.REVERSE)
-# a.Start()
-# app.MainLoop()
-#
-#
-#if __name__ == '__main__':
-# test()
-
-
Modified: grass/trunk/gui/wxpython/animation/frame.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.animation/animation/frame.py 2012-11-26 08:02:36 UTC (rev 54040)
+++ grass/trunk/gui/wxpython/animation/frame.py 2012-11-26 20:21:24 UTC (rev 54058)
@@ -32,7 +32,7 @@
from mapwindow import AnimationWindow, BitmapProvider, BitmapPool
from controller import AnimationController
-from animation import Animation
+from anim import Animation
from toolbars import MainToolbar, AnimationToolbar, MiscToolbar
from dialogs import SpeedDialog, EVT_SPEED_CHANGED
from utils import Orientation, ReplayMode, TemporalType
Copied: grass/trunk/gui/wxpython/animation/g.gui.animation.html (from rev 54040, grass-addons/grass7/gui/wxpython/wx.animation/wxGUI.Animation.html)
===================================================================
--- grass/trunk/gui/wxpython/animation/g.gui.animation.html (rev 0)
+++ grass/trunk/gui/wxpython/animation/g.gui.animation.html 2012-11-26 20:21:24 UTC (rev 54058)
@@ -0,0 +1,60 @@
+<!-- meta page description: wxGUI Animation tool -->
+<!-- meta page index: wxGUI -->
+<h2>DESCRIPTION</h2>
+
+The <b>Animation Tool</b> is a <em><a href="wxGUI.html">wxGUI</a></em> component
+for animating a series of GRASS raster maps or a space time raster dataset (created by t.* modules).
+
+<p>
+Animation Tool allows to:
+
+<ul>
+ <li>display up to 4 synchronized animations</li>
+ <li>control the animation speed</li>
+ <li>interactively change active frame using a slider</li>
+ <li>visualize space time datasets with unequally spaced intervals</li>
+ <li>animate 3d view (partially implemented)</li>
+</ul>
+
+<p>
+3D view animation enables to animate raster (as an elevation map or a color map)
+or vector map (points, lines). Internally, module m.nviz.image is used.
+To display 3D view animation follow these steps:
+<ul>
+ <li>open GRASS GUI, load maps and start 3D view</li>
+ <li>set view, light and other parameters as you like</li>
+ <li>save workspace file</li>
+ <li>add new animation in Animation Tool, choose 3D view mode</li>
+ <li>choose data (series of maps or space time dataset) used for animation</li>
+ <li>set workspace file</li>
+ <li>choose parameter (parameter of m.nviz.image) to animate (e.g. color_map)</li>
+
+</ul>
+
+<center>
+<br>
+<img src="wxGUI_animation_tool.jpg" border="1" alt="Animation Tool screenshot">
+<br>
+<br>
+</center>
+
+<h2>TODO</h2>
+<ul>
+ <li>export animation</li>
+ <li>...</li>
+</ul>
+
+<h2>SEE ALSO</h2>
+
+<em>
+ <a href="wxGUI.html">wxGUI</a><br>
+ <a href="wxGUI.Components.html">wxGUI components</a>
+</em>
+
+<h2>AUTHOR</h2>
+
+Anna Kratochvilova,
+<a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
+
+<p>
+<i>$Date$</i>
Added: grass/trunk/gui/wxpython/animation/g.gui.animation.py
===================================================================
--- grass/trunk/gui/wxpython/animation/g.gui.animation.py (rev 0)
+++ grass/trunk/gui/wxpython/animation/g.gui.animation.py 2012-11-26 20:21:24 UTC (rev 54058)
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+############################################################################
+#
+# MODULE: Animation
+# AUTHOR(S): Anna Kratochvilova
+# PURPOSE: Tool for animating a series of GRASS raster maps
+# or a space time raster dataset
+# COPYRIGHT: (C) 2012 by Anna Kratochvilova, and the GRASS Development Team
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+############################################################################
+
+#%module
+#% description: Tool for animating a series of GRASS raster maps or a space time raster dataset
+#%end
+#%option G_OPT_R_INPUTS
+#% key: rast
+#% description: Raster maps to animate
+#% required: no
+#% guisection: Input
+#%end
+#%option G_OPT_STRDS_INPUT
+#% key: strds
+#% description: Space time raster dataset to animate
+#% required: no
+#% guisection: Input
+#%end
+
+
+import os
+import sys
+
+import wx
+import gettext
+
+import grass.script as grass
+
+if __name__ == '__main__':
+ sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
+
+from core.settings import UserSettings
+from core.giface import StandaloneGrassInterface
+from animation.frame import AnimationFrame, MAX_COUNT
+
+def main():
+ gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
+
+ options, flags = grass.parser()
+
+ rast = options['rast']
+ strds = options['strds']
+
+ if rast and strds:
+ grass.fatal(_("Options 'rast' and 'strds' are mutually exclusive."))
+
+ if rast:
+ rast = [rast.split(',')] + [None] * (MAX_COUNT - 1)
+ else:
+ rast = None
+
+ if strds:
+ strds = [strds] + [None] * (MAX_COUNT - 1)
+ else:
+ strds = None
+
+ app = wx.PySimpleApp()
+ wx.InitAllImageHandlers()
+
+ frame = AnimationFrame(parent = None)
+ frame.CentreOnScreen()
+ frame.Show()
+ frame.SetAnimations(raster = rast, strds = strds)
+ app.MainLoop()
+
+
+if __name__ == '__main__':
+ main()
+
Modified: grass/trunk/gui/wxpython/animation/toolbars.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.animation/animation/toolbars.py 2012-11-26 08:02:36 UTC (rev 54040)
+++ grass/trunk/gui/wxpython/animation/toolbars.py 2012-11-26 20:21:24 UTC (rev 54058)
@@ -20,7 +20,7 @@
from gui_core.toolbars import BaseToolbar, BaseIcons
from icons.icon import MetaIcon
-from animation import ReplayMode
+from anim import ReplayMode
ganimIcons = {
'speed': MetaIcon(img = 'settings', label = _("Change animation speed")),
Copied: grass/trunk/gui/wxpython/animation/wxGUI_animation_tool.jpg (from rev 54040, grass-addons/grass7/gui/wxpython/wx.animation/wxGUI_animation_tool.jpg)
===================================================================
(Binary files differ)
Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py 2012-11-26 20:15:58 UTC (rev 54057)
+++ grass/trunk/gui/wxpython/lmgr/frame.py 2012-11-26 20:21:24 UTC (rev 54058)
@@ -1395,18 +1395,22 @@
def OnAnimationTool(self, event):
"""!Launch Animation tool
"""
- try:
- from animation.frame import AnimationFrame
- except ImportError:
- GError(_("Extension <%s> not available, run '%s' to install it.") % \
- ('wx.animation', 'g.extension -s extension=wx.animation'),
- parent = self, showTraceback = False)
- return
-
+ from animation.frame import AnimationFrame
+
frame = AnimationFrame(parent = self)
frame.CentreOnScreen()
frame.Show()
-
+
+ rasters = []
+ tree = self.GetLayerTree()
+ if tree:
+ for layer in tree.GetSelectedLayers(checkedOnly = False):
+ if tree.GetLayerInfo(layer, key = 'type') == 'raster':
+ rasters.append(tree.GetLayerInfo(layer, key = 'maplayer').GetName())
+ if rasters:
+ frame.SetAnimations(raster = [rasters, None, None, None])
+
+
def OnHistogram(self, event):
"""!Init histogram display canvas and tools
"""
Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml 2012-11-26 20:15:58 UTC (rev 54057)
+++ grass/trunk/gui/wxpython/xml/menudata.xml 2012-11-26 20:21:24 UTC (rev 54058)
@@ -734,7 +734,7 @@
<command>m.nviz.image</command>
</menuitem>
<menuitem>
- <label>Animation tool (experimental - addons)</label>
+ <label>Animation tool</label>
<help>Launch animation tool.</help>
<keywords>visualization,raster,animation</keywords>
<handler>OnAnimationTool</handler>
Deleted: grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-back.png
===================================================================
(Binary files differ)
Deleted: grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-pause.png
===================================================================
(Binary files differ)
Deleted: grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-repeat-back-forward.png
===================================================================
(Binary files differ)
Deleted: grass-addons/grass7/gui/wxpython/wx.animation/icons/grass/player-stop.png
===================================================================
(Binary files differ)
Deleted: grass-addons/grass7/gui/wxpython/wx.animation/wxGUI.Animation.html
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.animation/wxGUI.Animation.html 2012-11-26 20:15:58 UTC (rev 54057)
+++ grass-addons/grass7/gui/wxpython/wx.animation/wxGUI.Animation.html 2012-11-26 20:21:24 UTC (rev 54058)
@@ -1,60 +0,0 @@
-<!-- meta page description: wxGUI Animation tool -->
-<!-- meta page index: wxGUI -->
-<h2>DESCRIPTION</h2>
-
-The <b>Animation Tool</b> is a <em><a href="wxGUI.html">wxGUI</a></em> component
-for animating a series of GRASS raster maps or a space time raster dataset (created by t.* modules).
-
-<p>
-Animation Tool allows to:
-
-<ul>
- <li>display up to 4 synchronized animations</li>
- <li>control the animation speed</li>
- <li>interactively change active frame using a slider</li>
- <li>visualize space time datasets with unequally spaced intervals</li>
- <li>animate 3d view (partially implemented)</li>
-</ul>
-
-<p>
-3D view animation enables to animate raster (as an elevation map or a color map)
-or vector map (points, lines). Internally, module m.nviz.image is used.
-To display 3D view animation follow these steps:
-<ul>
- <li>open GRASS GUI, load maps and start 3D view</li>
- <li>set view, light and other parameters as you like</li>
- <li>save workspace file</li>
- <li>add new animation in Animation Tool, choose 3D view mode</li>
- <li>choose data (series of maps or space time dataset) used for animation</li>
- <li>set workspace file</li>
- <li>choose parameter (parameter of m.nviz.image) to animate (e.g. color_map)</li>
-
-</ul>
-
-<center>
-<br>
-<img src="wxGUI_animation_tool.jpg" border="1" alt="Animation Tool screenshot">
-<br>
-<br>
-</center>
-
-<h2>TODO</h2>
-<ul>
- <li>export animation</li>
- <li>...</li>
-</ul>
-
-<h2>SEE ALSO</h2>
-
-<em>
- <a href="wxGUI.html">wxGUI</a><br>
- <a href="wxGUI.Components.html">wxGUI components</a>
-</em>
-
-<h2>AUTHOR</h2>
-
-Anna Kratochvilova,
-<a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
-
-<p>
-<i>$Date$</i>
Deleted: grass-addons/grass7/gui/wxpython/wx.animation/wxGUI_animation_tool.jpg
===================================================================
(Binary files differ)
More information about the grass-commit
mailing list