As promised here is the patch.  Additionally to my earlier description,
it sets the key "c" to show and hide the aircraft, like in the
Beechcraft 1900D.

If there is any better place to send such patches please tell me :)

-- 
Ludovic Brenta.

--- SenecaII/Instruments-3d/SwitchPanel.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Instruments-3d/SwitchPanel.xml	2014-06-19 21:21:57.223347712 +0200
@@ -47,10 +47,10 @@
         <object-name>Master</object-name>
         
         <emission>
-            <red-prop>/sim/model/instrument-lighting/emission/red</red-prop>
-            <green-prop>/sim/model/instrument-lighting/emission/green</green-prop>
-            <blue-prop>/sim/model/instrument-lighting/emission/blue</blue-prop>
-            <factor-prop>/controls/lighting/instruments-norm</factor-prop>
+            <red-prop>sim/model/overhead-lighting/red</red-prop>
+            <green-prop>sim/model/overhead-lighting/green</green-prop>
+            <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+            <factor-prop>controls/lighting/overhead-norm</factor-prop>
         </emission>
     </animation>
     
--- SenecaII/Models/AI/AI.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Models/AI/AI.xml	2014-06-19 21:08:29.667221949 +0200
@@ -15,7 +15,7 @@
    <red>1.0</red>
    <green>0.2</green>
    <blue>0.0</blue>
-   <factor-prop>sim/model/material/instruments/factor</factor-prop>
+   <factor-prop>controls/lighting/instruments-norm</factor-prop>
   </emission>
  </animation>
 
--- SenecaII/Models/AI/AttitudeGyro.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Models/AI/AttitudeGyro.xml	2014-06-19 04:06:28.998400000 +0200
@@ -32,7 +32,7 @@
       <red>1.0</red>
       <green>0.2</green>
       <blue>0.0</blue>
-      <factor-prop>sim/model/material/instruments/factor</factor-prop>
+      <factor-prop>controls/lighting/instruments-norm</factor-prop>
     </emission>
   </animation>
   <animation>
@@ -42,7 +42,7 @@
       <red>1.0</red>
       <green>0.2</green>
       <blue>0.0</blue>
-      <factor-prop>sim/model/material/instruments/factor</factor-prop>
+      <factor-prop>controls/lighting/instruments-norm</factor-prop>
     </emission>
   </animation>
   <animation>
--- SenecaII/Models/kcs55/ka51b.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Models/kcs55/ka51b.xml	2014-06-19 21:21:56.763358499 +0200
@@ -30,15 +30,14 @@
     
     <animation>
       <type>material</type>
-      <property-base>sim/model/material/cockpit</property-base>
       <object-name>face</object-name>
       <object-name>auto</object-name>
       <object-name>direction</object-name>
       <emission>
-        <red-prop>red</red-prop>
-        <green-prop>green</green-prop>
-        <blue-prop>blue</blue-prop>
-        <factor-prop>factor</factor-prop>
+        <red-prop>sim/model/overhead-lighting/red</red-prop>
+        <green-prop>sim/model/overhead-lighting/green</green-prop>
+        <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+        <factor-prop>controls/lighting/overhead-norm</factor-prop>
       </emission>
     </animation>
 
--- SenecaII/Models/kcs55/ki525a.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Models/kcs55/ki525a.xml	2014-06-19 21:21:56.267370130 +0200
@@ -46,14 +46,13 @@
 
   <animation>
     <type>material</type>
-    <property-base>sim/model/material/cockpit</property-base>
     <object-name>Chassis</object-name>
     <object-name>Screw</object-name>
     <emission>
-      <red-prop>red</red-prop>
-      <green-prop>green</green-prop>
-      <blue-prop>blue</blue-prop>
-      <factor-prop>factor</factor-prop>
+      <red-prop>sim/model/overhead-lighting/red</red-prop>
+      <green-prop>sim/model/overhead-lighting/green</green-prop>
+      <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+      <factor-prop>controls/lighting/overhead-norm</factor-prop>
     </emission>
   </animation>
 
--- SenecaII/Models/ki227_228.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Models/ki227_228.xml	2014-06-19 04:06:28.478403517 +0200
@@ -63,7 +63,7 @@
       <red>1.0</red>
       <green>0.2</green>
       <blue>0.0</blue>
-      <factor-prop>sim/model/material/instruments/factor</factor-prop>
+      <factor-prop>controls/lighting/instruments-norm</factor-prop>
     </emission>
   </animation>
 
--- SenecaII/Models/SenecaII.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Models/SenecaII.xml	2014-06-19 21:21:55.751382231 +0200
@@ -771,6 +771,16 @@
       </action>
     </animation>
     <animation>
+      <type>material</type>
+      <object-name>CowlFlapsControl.L</object-name>
+      <emission>
+        <red-prop>sim/model/overhead-lighting/red</red-prop>
+        <green-prop>sim/model/overhead-lighting/green</green-prop>
+        <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+        <factor-prop>controls/lighting/overhead-norm</factor-prop>
+      </emission>
+    </animation>
+    <animation>
         <type>rotate</type>
         <object-name>CowlFlapsControl.L</object-name>
         <property>controls/engines/engine[0]/cowl-flaps-norm</property>
@@ -786,6 +796,16 @@
         </axis>
     </animation>
     <animation>
+      <type>material</type>
+      <object-name>CowlFlapsControl.R</object-name>
+      <emission>
+        <red-prop>sim/model/overhead-lighting/red</red-prop>
+        <green-prop>sim/model/overhead-lighting/green</green-prop>
+        <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+        <factor-prop>controls/lighting/overhead-norm</factor-prop>
+      </emission>
+    </animation>
+    <animation>
         <type>rotate</type>
         <object-name>CowlFlapsControl.R</object-name>
         <property>controls/engines/engine[1]/cowl-flaps-norm</property>
@@ -813,41 +833,34 @@
         <object-name>PanelLightsDimmer</object-name>
         <object-name>RadioLightsDimmer</object-name>
         <object-name>Overhead.CockpitLightSwitch</object-name>
-
+        <object-name>InstrumentCover</object-name>
+        <object-name>Chart1</object-name>
+        <object-name>Chart2</object-name>
+        <object-name>ThrottleControl.L</object-name>
+        <object-name>ThrottleControl.R</object-name>
+        <object-name>PropellerControl.L</object-name>
+        <object-name>PropellerControl.R</object-name>
+        <object-name>MixtureControl.L</object-name>
+        <object-name>MixtureControl.R</object-name>
         <emission>
-            <red-prop>/sim/model/instrument-lighting/emission/red</red-prop>
-            <green-prop>/sim/model/instrument-lighting/emission/green</green-prop>
-            <blue-prop>/sim/model/instrument-lighting/emission/blue</blue-prop>
-            <factor-prop>/controls/lighting/instruments-norm</factor-prop>
+            <red-prop>sim/model/overhead-lighting/red</red-prop>
+            <green-prop>sim/model/overhead-lighting/green</green-prop>
+            <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+            <factor-prop>controls/lighting/overhead-norm</factor-prop>
         </emission>
     </animation>
 
     <animation>
         <type>material</type>
         <object-name>Overhead.CockpitLight</object-name>
-
         <emission>
             <red>0.3</red>
             <green>0</green>
             <blue>0</blue>
-            <factor-prop>/controls/lighting/panel-norm</factor-prop>
-        </emission>
-    </animation>
-    <!--    
-    <animation>
-        <type>material</type>
-        <object-name>InstrumentCover</object-name>
-        <object-name>Chart1</object-name>
-        <object-name>Chart2</object-name>
-        
-        <emission>
-            <red>0.1</red>
-            <green>0</green>
-            <blue>0</blue>
-            <factor-prop>/controls/lighting/panel-norm</factor-prop>
+            <factor-prop>/controls/lighting/overhead-norm</factor-prop>
         </emission>
     </animation>
-    -->    
+
     <animation>
         <type>rotate</type>
         <object-name>PanelLightsDimmer</object-name>
@@ -966,6 +979,16 @@
         <object-name>FlapControl</object-name>
     </animation>
     <animation>
+      <type>material</type>
+      <object-name>FlapControl</object-name>
+      <emission>
+          <red-prop>sim/model/overhead-lighting/red</red-prop>
+          <green-prop>sim/model/overhead-lighting/green</green-prop>
+          <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+          <factor-prop>controls/lighting/overhead-norm</factor-prop>
+      </emission>
+    </animation>
+    <animation>
         <type>rotate</type>
         <object-name>FlapControl</object-name>
         <property>controls/flight/flaps</property>
@@ -2239,7 +2262,7 @@
     <animation>
         <type>rotate</type>
         <object-name>Overhead.CockpitLightSwitch</object-name>
-        <property>controls/lighting/panel-norm</property>
+        <property>controls/lighting/overhead-norm</property>
         <factor>-40.0</factor>
         <axis>
             <x1-m>-1.20476</x1-m>
@@ -2250,6 +2273,19 @@
             <z2-m>1.94148</z2-m>
         </axis>
     </animation>
+    <animation>
+      <type>pick</type>
+      <object-name>Overhead.CockpitLightSwitch</object-name>
+      <visible>true</visible>
+      <action>
+        <button>0</button>
+        <repeatable>false</repeatable>
+        <binding>
+          <command>property-toggle</command>
+          <property>controls/lighting/overhead-norm</property>
+        </binding>
+      </action>
+    </animation>
 
     <animation>
         <type>noshadow</type>
--- SenecaII/Nasal/SenecaII.nas	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Nasal/SenecaII.nas	2014-06-19 04:04:08.143352222 +0200
@@ -124,18 +124,6 @@
 setlistener( "/controls/engines/engine[1]/magneto[0]", magnetoswitchlistener, 1, 0 );
 setlistener( "/controls/engines/engine[1]/magneto[1]", magnetoswitchlistener, 1, 0 );
 
-########################################
-# Sync the dimmer controls with the according properties
-########################################
-
-var instrumentsFactorNode = props.globals.initNode( "/sim/model/material/instruments/factor", 1.0 );
-var dimmerlistener = func(n) {
-  if( n != nil )
-    instrumentsFactorNode.setValue( n.getValue() );
-}
-
-setlistener( "/controls/lighting/instruments-norm", dimmerlistener, 1, 0 );
-
 ####################################################################
 
 var SetFuelSelector = func( side ) {
--- SenecaII/SenecaII-base.xml	2014-01-18 10:15:11.000000000 +0100
+++ SenecaII/SenecaII-base.xml	2014-06-19 21:27:53.870585046 +0200
@@ -41,14 +41,11 @@
           <blue type="double">0.0</blue>
         </emission>
       </instrument-lighting>
-      <material>
-        <cockpit>
-          <red type="double">0.5</red>
-          <green type="double">0.1</green>
-          <blue type="double">0.1</blue>
-          <factor type="double">0</factor>
-        </cockpit>
-      </material>
+      <overhead-lighting>
+        <red type="double">0.06</red>
+        <green type="double">0.003</green>
+        <blue type="double">0</blue>
+      </overhead-lighting>
       <icing>
         <iceable>
           <name>Wing</name>
@@ -255,6 +252,13 @@
               <time>1.0</time>
             </binding>
           </item>
+          <item>
+            <label>Overhead light on/off</label>
+            <binding>
+              <command>property-toggle</command>
+              <property>controls/lighting/overhead-norm</property>
+            </binding>
+          </item>
           <!--item>
                         <label>Yaw Damper (on/off) default off</label>
                         <binding>
@@ -468,7 +472,7 @@
       <taxi-light type="bool">false</taxi-light>
       <nav-lights type="bool">false</nav-lights>
       <radio-norm type="double">0.0</radio-norm>
-      <panel-norm type="double">0.0</panel-norm>
+      <overhead-norm type="double">0.0</overhead-norm>
       <instruments-norm type="double">0.0</instruments-norm>
     </lighting>
     <deice>
@@ -532,6 +536,22 @@
   </limits>
   <input>
         <keyboard>
+            <key n="12">
+              <name>Ctrl+L</name>
+              <desc>Toggle overhead cockpit lights</desc>
+              <binding>
+                <command>property-toggle</command>
+                <property>controls/lighting/overhead-norm</property>
+              </binding>
+            </key>
+            <key n="99">
+              <name>c</name>
+              <desc>Show/hide Aircraft</desc>
+              <binding>
+                <command>property-toggle</command>
+                <property>sim/model/hide-model</property>
+              </binding>
+            </key>
             <key n="267">
                 <name>F11</name>
                 <desc>Pop up autopilot dialog</desc>
--- SenecaII/Systems/AltimaticIIIc.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Systems/AltimaticIIIc.xml	2014-06-19 21:21:54.231417877 +0200
@@ -18,7 +18,6 @@
 -->
 <PropertyList>
     <params>
-      <light-factor>sim/model/material/instruments/factor</light-factor>
       <controls>
         <roll>
           <on>autopilot/CENTURYIII/controls/roll/button-on</on>
@@ -67,12 +66,11 @@
     <animation>
         <type>material</type>
         <object-name>Altimatic.Face</object-name>
-        <object-name>Altimatic.DeltaPitchNeedle</object-name>
         <emission>
-          <red>0.45</red>
-          <green>0.09</green>
-          <blue>0.00001</blue>
-          <factor-prop alias="../../../params/light-factor"/>
+          <red-prop>sim/model/overhead-lighting/red</red-prop>
+          <green-prop>sim/model/overhead-lighting/green</green-prop>
+          <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+          <factor-prop>controls/lighting/overhead-norm</factor-prop>
         </emission>
     </animation>
 
@@ -83,11 +81,12 @@
         <object-name>Altimatic.PitchButton</object-name>
         <object-name>Altimatic.RollButton</object-name>
         <object-name>Altimatic.PitchWheel</object-name>
+        <object-name>Altimatic.DeltaPitchNeedle</object-name>
         <emission>
-          <red>0.2</red>
-          <green>0.04</green>
-          <blue>0.00002</blue>
-          <factor-prop alias="../../../params/light-factor"/>
+            <red-prop>sim/model/instrument-lighting/emission/red</red-prop>
+            <green-prop>sim/model/instrument-lighting/emission/green</green-prop>
+            <blue-prop>sim/model/instrument-lighting/emission/blue</blue-prop>
+            <factor-prop>controls/lighting/instruments-norm</factor-prop>
         </emission>
     </animation>
 
--- SenecaII/Systems/AutopilotMode.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Systems/AutopilotMode.xml	2014-06-19 21:21:54.583409622 +0200
@@ -28,10 +28,10 @@
         <type>material</type>
         <object-name>AutopilotMode.Face</object-name>
         <emission>
-          <red>0.45</red>
-          <green>0.09</green>
-          <blue>0.00001</blue>
-          <factor-prop>/sim/model/material/instruments/factor</factor-prop>
+            <red-prop>sim/model/overhead-lighting/red</red-prop>
+            <green-prop>sim/model/overhead-lighting/green</green-prop>
+            <blue-prop>sim/model/overhead-lighting/blue</blue-prop>
+            <factor-prop>controls/lighting/overhead-norm</factor-prop>
         </emission>
     </animation>
     
@@ -39,10 +39,10 @@
         <type>material</type>
         <object-name>AutopilotMode.Knob</object-name>
         <emission>
-          <red>0.2</red>
-          <green>0.04</green>
-          <blue>0.00002</blue>
-          <factor-prop>/sim/model/material/instruments/factor</factor-prop>
+            <red-prop>sim/model/instrument-lighting/emission/red</red-prop>
+            <green-prop>sim/model/instrument-lighting/emission/green</green-prop>
+            <blue-prop>sim/model/instrument-lighting/emission/blue</blue-prop>
+            <factor-prop>controls/lighting/instruments-norm</factor-prop>
         </emission>
     </animation>
 
--- SenecaII/Systems/flight-recorder.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Systems/flight-recorder.xml	2014-06-19 21:21:55.211394895 +0200
@@ -119,7 +119,7 @@
             <signal><type>bool</type><property type="string">/controls/gear/gear-emergency-extend-unlock</property></signal>
 
             <signal><type>float</type><property type="string">/controls/lighting/instruments-norm</property></signal>
-            <signal><type>float</type><property type="string">/controls/lighting/panel-norm</property></signal>
+            <signal><type>float</type><property type="string">/controls/lighting/overhead-norm</property></signal>
             <signal><type>float</type><property type="string">/controls/lighting/radio-norm</property></signal>
 
         </signals>
--- SenecaII/Tutorials/___ColdStart.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Tutorials/___ColdStart.xml	2014-06-19 21:21:53.459435980 +0200
@@ -95,7 +95,7 @@
       <value>0</value>
     </set>
     <set>
-      <property>controls/lighting/panel-norm</property>
+      <property>controls/lighting/overhead-norm</property>
       <value>0</value>
     </set>
     <set>
--- SenecaII/Tutorials/___HotStart.xml	2012-08-02 10:43:27.000000000 +0200
+++ SenecaII/Tutorials/___HotStart.xml	2014-06-19 21:21:53.871426318 +0200
@@ -95,7 +95,7 @@
       <value>0</value>
     </set>
     <set>
-      <property>controls/lighting/panel-norm</property>
+      <property>controls/lighting/overhead-norm</property>
       <value>0</value>
     </set>
     <set>

Reply via email to