Livery over MP: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Image:Livery_selection_dialog.jpg|thumb|270px|The livery selection dialog of the [[Sikorsky S76C]].]]
[[Image:Livery_selection_dialog.jpg|thumb|270px|The livery selection dialog of the [[Sikorsky S76C]].]]


On this page we describe how you make use of a script to get a livery selection dialog in [[FlightGear]]. To get new liveries into [[FlightGear CVS]], you need to have them availabe with this script.
On this page we describe how you make use of a script to get a '''livery selection dialog''' for a [[Aircraft|plane]] in [[FlightGear]]. To get new liveries into [[FlightGear CVS]], you need to have them availabe with this script.


The examples are based on the [[Sikorsky S76C]].
The examples are based on the [[Sikorsky S76C]].
Line 14: Line 14:
===Files===
===Files===
====Models/Liveries====
====Models/Liveries====
For every livery we need to make a file. Let's say we got a Rescue livery, we than need to make a file called Rescue.xml into our Models/Liveries directory.
For every livery we need to make a file. Let's say we got a Rescue livery, we than need to make a file called Rescue.xml into our <tt>Models/Liveries directory</tt>.


  <?xml version="1.0"?><nowiki>
  <?xml version="1.0"?><nowiki>
Line 31: Line 31:


====s76c.xml====
====s76c.xml====
The first part is related to the nasal script. </tt>("Aircraft/Sikorsky-76C/Models/Liveries", 10)<tt> points FlightGear to the directory where we store our liveries. This is a different directory for every plane, but there should be only one folder for one plane, containing all the liveries for that plane.
The first part is related to the nasal script. <tt>("Aircraft/Sikorsky-76C/Models/Liveries", 10)</tt> points FlightGear to the directory where we store our liveries. This is a different directory for every plane, but there should be only one folder for one plane, containing all the liveries for that plane.


  <nasal>
  <nasal>
Line 73: Line 73:
   <variant type="int">1</variant>
   <variant type="int">1</variant>
  </model>
  </model>
To make a nice button in the [[menubar]] we need to add the following code, just above the <tt></sim></tt> tag.
<menubar>
  <default>
  <menu n="10">
    <label>S76C++</label>
    <enabled type="bool">true</enabled>
    <item>
    <label>Select Livery</label>
    <binding>
      <command>nasal</command>
      <script>aircraft.livery.dialog.toggle()</script>
    </binding>
    </item>
  </menu>
  </default>
</menubar>


[[Category:Aircraft enhancement]]
[[Category:Aircraft enhancement]]
[[Category:Modeling]]
[[Category:Modeling]]

Navigation menu