On Sat, 2007-10-20 at 17:28 -0600, Ron Jensen wrote:
> On Sat, 2007-10-20 at 18:24 +0100, Jon Stockill wrote:
> > Syd&Sandy wrote:
> >
> > > I havent tested this one but Ive found that I have to put the material
> > > animation first before any
> > > others for it to work ....
> >
> > It appears to be a bug in the osg version - changing bool to int and
> > true/false to 1/0 makes everything work. Is plib doing a type conversion
> > that osg isnt?
> >
> > Jon
>
> It sounds like that is the case, and its not unreasonable, IMHO, that
> you can't multiply a number by "false" and get a valid answer.
>
> Have you tried something like this:
>
> <animation>
> <type>material</type>
> <object-name>LED</object-name>
> <condition>/instrumentation/elt/enabled</condition>
> <emission>
> <red>1</red>
> <green>0</green>
> <blue>0</blue>
> </emission>
> </animation>
>
>
> Ron
Nevermind, that didn't work at all for me. However, I put your code
(more or less) into an instrument I have here and it did work under OSG.
The AvionicsToggle is a toggle switch model taken from
Aircraft/Instruments-3d/controls/switch-large-flat.ac. It rotates with
the boolean property value as well. I last built Simgear/Flightgear on
31 Aug and am using OSG 2.0:
<?xml version="1.0"?>
<PropertyList>
<path>switch-panel.ac</path>
<animation>
<type>material</type>
<object-name>LED</object-name>
<emission>
<red>0.9</red>
<green>0.0</green>
<blue>0.0</blue>
<factor-prop>controls/FIXME</factor-prop>
</emission>
</animation>
<animation>
<type>rotate</type>
<object-name>AvionicsToggle</object-name>
<property>controls/FIXME</property>
<factor>40</factor>
<axis>
<x>0.0</x>
<y>-1.0</y>
<z>0.0</z>
</axis>
<center>
<x-m> 0.0</x-m>
<y-m> 0.0</y-m>
<z-m>-0.009</z-m>
</center>
</animation>
<animation>
<type>pick</type>
<action>
<name>Avionics Power Toggle</name>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>controls/FIXME</property>
</binding>
</action>
<object-name>AvionicsToggle</object-name>
</animation>
</PropertyList>
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel