Revision: 3212
          http://smartbody.svn.sourceforge.net/smartbody/?rev=3212&view=rev
Author:   arishapiro
Date:     2012-04-25 22:30:44 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
Can now add arbitrary events to states using:
state.addEvent()
state.removeAllEvents()
state.getNumEvents()
state.getEvent(num)

like this footstep sound example:

stateManager = scene.getStateManager()
state1 = stateManager.getState("allLocomotion")
state1.addEvent("ChrUtah_Walk001", .1, "leftfootstep", "utah", False)
state1.addEvent("ChrUtah_Walk001", .57, "rightfootstep", "utah", False)
state1.addEvent("ChrUtah_Walk001", 1.08, "leftfootstep", "utah", False)
state1.addEvent("ChrUtah_Walk001", 1.60, "rightfootstep", "utah", False)

The event time will be automatically scaled according to the parameterization 
values (so the footsteps will occur at the proper times during the runs and 
turns as well). The event can then be handled using the standard event handling 
mechanism:

class SoundHandler(EventHandler):
        def executeAction(self, ev):
                params = ev.getParameters()
                scene.command("PlaySound footstepsound.wav " + params)

f = SoundHandler()
em = scene.getEventManager()
em.addEventHandler("leftfootstep", f)
em.addEventHandler("rightfootstep", f)

Changed Python interface for transitions. Old methods:
addCorrespondencePoint()
getToState()

New methods:
addEaseOutInterval()
addEaseInInterval()
getDestinationState()

So all transitions will need to use the new API with this checkin.

Some fixes to State Editor GUI. Still need to include ability to mark events on 
the same timeline.

Modified Paths:
--------------
    trunk/core/smartbody/sbm/CMakeLists.txt
    trunk/core/smartbody/sbm/src/nle/NonLinearEditor.cpp
    trunk/core/smartbody/sbm/src/nle/NonLinearEditor.h
    trunk/core/smartbody/sbm/src/nle/NonLinearEditorWidget.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/PanimationWindow.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/PanimationWindow.h
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimBlock.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimBlock.h
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimEditorWidget.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimRunTimeEditor.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimScriptEditor.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimStateEditor.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimStateEditor.h
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimTransitionEditor.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimTransitionEditor.h
    trunk/core/smartbody/sbm/src/panimationviewer/Parameter3DVisualization.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/Parameter3DVisualization.h
    trunk/core/smartbody/sbm/visualc9/sbm-fltk.vcproj
    trunk/core/smartbody/smartbody-lib/src/sbm/Event.h
    trunk/core/smartbody/smartbody-lib/src/sbm/SBAnimationState.cpp
    trunk/core/smartbody/smartbody-lib/src/sbm/SBAnimationState.h
    trunk/core/smartbody/smartbody-lib/src/sbm/SBAnimationTransition.cpp
    trunk/core/smartbody/smartbody-lib/src/sbm/SBAnimationTransition.h
    trunk/core/smartbody/smartbody-lib/src/sbm/SBPython.cpp
    trunk/core/smartbody/smartbody-lib/src/sbm/mcontrol_callbacks.cpp
    trunk/core/smartbody/smartbody-lib/src/sbm/me_ct_param_animation_data.cpp
    trunk/core/smartbody/smartbody-lib/src/sbm/me_ct_param_animation_data.h
    
trunk/core/smartbody/smartbody-lib/src/sbm/me_ct_param_animation_utilities.cpp
    trunk/core/smartbody/smartbody-lib/src/sbm/me_ct_param_animation_utilities.h
    trunk/core/smartbody/smartbody-lib/visualc9/smartbody-lib.vcproj
    trunk/data/sbm-common/scripts/transitions.py

Added Paths:
-----------
    
trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimTransitionCreatorWidget.cpp
    
trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimTransitionCreatorWidget.h
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimTransitionEditor2.cpp
    trunk/core/smartbody/sbm/src/panimationviewer/ParamAnimTransitionEditor2.h

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Smartbody-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartbody-svn

Reply via email to