Syd&Sandy a écrit : > On Wed, 31 Oct 2007 20:51:40 +0000 Jon Stockill <[EMAIL PROTECTED]> > wrote: > > > I'm having problems with the following seemingly simple bit of > > animation (running the cvs osg version): > > > > <animation> <object-name>WarnLoVolt</object-name> > > <object-name>WarnGen</object-name> > > <object-name>WarnLoOil</object-name> > > <object-name>WarnFuel</object-name> > > <object-name>WarnStarter</object-name> <condition> <not> > > <property>instrumentation/warning-panel/test</property> </not> > > </condition> <type>material</type> <emission> <red>0.0</red> > > <green>0.0</green> <blue>0.0</blue> > > <factor-prop>instrumentation/warning-panel/brightness</factor-prop> > > </emission> </animation> > > > > <animation> <object-name>WarnLoVolt</object-name> > > <object-name>WarnGen</object-name> > > <object-name>WarnLoOil</object-name> > > <object-name>WarnFuel</object-name> > > <object-name>WarnStarter</object-name> <condition> > > <property>instrumentation/warning-panel/test</property> > > </condition> <type>material</type> <emission> <red>1.0</red> > > <green>0.0</green> <blue>0.0</blue> > > <factor-prop>instrumentation/warning-panel/brightness</factor-prop> > > </emission> </animation> > > > > It's supposed to light all the lamps on a warning panel when the > > test button is pressed. If used as shown, the lamps never light. > > Switching the order of the 2 <animation> blocks results in the > > lamps lighting when the test switch is pressed - but they remain on > > when it is released (the controlling property value in the browser > > does change). With the lamps lit if the brightness is changed and > > the test button pressed again the brightness of the lamps changes - > > so the first animation can still be triggered - it appears that the > > second is always ignored though. > > > > Have I done something silly, or have I discovered a bug? > > > > Jon > > Hi Jon , I THINK <type> has to come right after <animation> ... > Cheers
Another tip: you better use a group in the .ac (3D) model and use the group name when you want an animation on all objects together, doing so create a different branch in the tree. If you specify all the objects namely in the same block, you may have difficulties to animate them separately later. You can also use another method which is a bit more verbose: a select animation with the condition, and later in the xml the material animation without condition. You will have in your .ac (3D) file of the panel the lamp off and the lamp on. then in the xml you can select the 'lamp on' object upon a property. Again use separate block for single objects called by their name or a group of them if needed. Alexis ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel