Re: [Flightgear-devel] livery - generic overlay
It's probably not well known that livery files (or other overlay files) have no defined structure. They are just XML files that are copied (laid) over the property tree on request. What you put in there, and where, is entirely your business. It doesn't have to do with liveries and textures at all. Take this example: Overlay file (in $FG_ROOT/Airports/Places/): ?xml version=1.0? PropertyList sim presets nameVienna City/name latitude-deg48.2402400/latitude-deg longitude-deg16.4106300/longitude-deg /presets /sim /PropertyList Nasal: gui.teleport_dialog = gui.OverlaySelector.new( Teleport to, # dialog title Airports/Places, # directory with overlay XML files sim/presets/name, # where the name is in those files nil, # no sorting property (- sort by name) nil, # no MP property (- no MP transmission) func fgcommand(presets-commit)); # what to do if new entry was chosen Binding: gui.teleport_dialog.open(); And if you now click entry Vienna City, you'll immediately get telported there. BTW: menu bindings should always use the open() method, keys always the toggle() method. m. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] livery - generic overlay
aircraft.livery and aircraft.livery_update are now only wrappers for more generic classes, which one can also use directly instead. They allow to manage more than just livery XML files. One could allow users to choose a livery, seat covers, flight attendant uniforms, ... :-) each of them separately and like liveries are handled now. Instead of aircraft.livery.init, one writes something like this: var foo_dialog = gui.OverlaySelector.new( Select Foo, # title of selection dialog Aircraft/xy/Models/Foo, # directory with XML files sim/model/foo/name); # property for name entries In bindings one can then use xy.foo_dialog.open(); # for the menu xy.foo_dialog.toggle(); # for key bindings xy.foo_dialog.close(); # for ... no idea :-) If one wants to send the choice over MP, then one has to assign an MP property (which needs to get created in the *-set.xml file -- otherwise MP won't send it): var foo_dialog = gui.OverlaySelector.new( Select Foo, # title of selection dialog Aircraft/xy/Models/Foo, # directory with XML files sim/model/foo/name, # property for name entries nil,# (sort dialog entries by name) sim/multiplay/generic/string);# use this property for MP In the model XML file one uses instead of aircraft.livery_update: load var update = aircraft.overlay_update.new(); update.add(Aircraft/xy/Models/Liveries, sim/model/livery/file); update.add(Aircraft/xy/Models/Foo, sim/multiplay/generic/string); /load unload update.stop(); /unload Each of the update.add() does also take an optional callback function as third argument. This is then called whenever that property got changed. Maybe we should throw out aircraft.livery(_update) and convert everything to the generic method now. Don't know yet ... m. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] livery - generic overlay
Melchior FRANZ wrote: aircraft.livery and aircraft.livery_update are now only wrappers for more generic classes, which one can also use directly instead. They allow to manage more than just livery XML files. One could allow users to choose a livery, seat covers, flight attendant uniforms, ... :-) After two days of frustration trying to get this stuff to work I've abandoned the idea of liveries. It just doesn't work or is not documented well enough to get it to work. Sorry, no liveries for my planes. Erik - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] livery - generic overlay
Am Sonntag, den 19.10.2008, 18:46 +0200 schrieb Erik Hofman: Melchior FRANZ wrote: aircraft.livery and aircraft.livery_update are now only wrappers for more generic classes, which one can also use directly instead. They allow to manage more than just livery XML files. One could allow users to choose a livery, seat covers, flight attendant uniforms, ... :-) After two days of frustration trying to get this stuff to work I've abandoned the idea of liveries. It just doesn't work or is not documented well enough to get it to work. Sorry, no liveries for my planes. It works extremly well, take a look at the F4U, it has livery selection plus Logo selection. Greetings Erik - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] livery - generic overlay
Detlef Faber wrote: It works extremly well, take a look at the F4U, it has livery selection plus Logo selection. It doesn't, I looked at a number of aircraft that use it and somehow it doesn't apply to they way I have set op the PC-7. Not matter what I try. After two days I lost interest. Erik - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] livery - generic overlay
* Erik Hofman -- Sunday 19 October 2008: I looked at a number of aircraft that use it and somehow it doesn't apply to they way I have set op the PC-7. Your Nasal parts were correct and functional. (They are just some trivial helpers, anyway.) What was probably broken were your material animations -- the central part of the livery stuff. m. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] livery - generic overlay
* Melchior FRANZ -- Sunday 19 October 2008: What was probably broken were your material animations Patch attached ... s/object/object-name/ m. Index: Models/pc7.xml === RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/pc7/Models/pc7.xml,v retrieving revision 1.12 diff -u -p -r1.12 pc7.xml --- Models/pc7.xml 19 Oct 2008 14:29:44 - 1.12 +++ Models/pc7.xml 19 Oct 2008 18:45:34 - @@ -370,18 +370,17 @@ /axis /animation -!-- animation typematerial/type - objectright_flap/object - objectright_aileron/object - objectleft_flap/object - objectleft_aileron/object - objectwing/object - objecthull/object - objecthstab/object - objectrudder/object - objectelevator/object + object-nameright_flap/object-name + object-nameright_aileron/object-name + object-nameleft_flap/object-name + object-nameleft_aileron/object-name + object-namewing/object-name + object-namehull/object-name + object-namehstab/object-name + object-namerudder/object-name + object-nameelevator/object-name property-basesim/model/livery/property-base texture-proptexture/texture-prop texturepc7_scheme.rgb/texture @@ -389,20 +388,19 @@ animation typematerial/type - objectlha_marker/object - objectrwl_marker/object - objectlwu_marker/object - objectrha_marker/object - objectlhf_marker/object - objectrhf_marker/object - objectlht_marker/object - objectrht_marker/object - objectlwu_marker/object - objectrwl_marker/object + object-namelha_marker/object-name + object-namerwl_marker/object-name + object-namelwu_marker/object-name + object-namerha_marker/object-name + object-namelhf_marker/object-name + object-namerhf_marker/object-name + object-namelht_marker/object-name + object-namerht_marker/object-name + object-namelwu_marker/object-name + object-namerwl_marker/object-name property-basesim/model/livery-logo/property-base texture-proptexture/texture-prop texturepc7_trans.rgb/texture /animation --- /PropertyList Index: Models/Liveries/swiss.xml === RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/pc7/Models/Liveries/swiss.xml,v retrieving revision 1.1 diff -u -p -r1.1 swiss.xml --- Models/Liveries/swiss.xml 19 Oct 2008 14:29:45 - 1.1 +++ Models/Liveries/swiss.xml 19 Oct 2008 18:45:34 - @@ -1,4 +1,4 @@ -?xml version=1.0? +?xml version=1.0? PropertyList sim - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] livery - generic overlay
* Melchior FRANZ -- Sunday 19 October 2008: Patch attached ... Oh, and uncomment the nasalload/unload part, so that the livery is correctly transmitted via MP. And the file property only needs to be there, but it's not actually read, so it doesn't have to get initialized. But that's just cosmetics. New patch. Tested in MP. m. Index: pc7-set.xml === RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/pc7/pc7-set.xml,v retrieving revision 1.11 diff -u -p -r1.11 pc7-set.xml --- pc7-set.xml 19 Oct 2008 11:20:00 - 1.11 +++ pc7-set.xml 19 Oct 2008 18:58:23 - @@ -56,7 +56,7 @@ David Culp, [EMAIL PROTECTED] model pathAircraft/pc7/Models/pc7.xml/path livery -file type=stringdefault/file +file type=string/ /livery /model Index: Models/pc7.xml === RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/pc7/Models/pc7.xml,v retrieving revision 1.12 diff -u -p -r1.12 pc7.xml --- Models/pc7.xml 19 Oct 2008 14:29:44 - 1.12 +++ Models/pc7.xml 19 Oct 2008 18:58:23 - @@ -7,7 +7,6 @@ pitch-deg-4/pitch-deg /offsets -!-- nasal load var livery_update = aircraft.livery_update.new(Aircraft/pc7/Models/Liveries); @@ -16,7 +15,6 @@ livery_update.stop(); /unload /nasal --- !-- animation @@ -370,18 +368,17 @@ /axis /animation -!-- animation typematerial/type - objectright_flap/object - objectright_aileron/object - objectleft_flap/object - objectleft_aileron/object - objectwing/object - objecthull/object - objecthstab/object - objectrudder/object - objectelevator/object + object-nameright_flap/object-name + object-nameright_aileron/object-name + object-nameleft_flap/object-name + object-nameleft_aileron/object-name + object-namewing/object-name + object-namehull/object-name + object-namehstab/object-name + object-namerudder/object-name + object-nameelevator/object-name property-basesim/model/livery/property-base texture-proptexture/texture-prop texturepc7_scheme.rgb/texture @@ -389,20 +386,19 @@ animation typematerial/type - objectlha_marker/object - objectrwl_marker/object - objectlwu_marker/object - objectrha_marker/object - objectlhf_marker/object - objectrhf_marker/object - objectlht_marker/object - objectrht_marker/object - objectlwu_marker/object - objectrwl_marker/object + object-namelha_marker/object-name + object-namerwl_marker/object-name + object-namelwu_marker/object-name + object-namerha_marker/object-name + object-namelhf_marker/object-name + object-namerhf_marker/object-name + object-namelht_marker/object-name + object-namerht_marker/object-name + object-namelwu_marker/object-name + object-namerwl_marker/object-name property-basesim/model/livery-logo/property-base texture-proptexture/texture-prop texturepc7_trans.rgb/texture /animation --- /PropertyList Index: Models/Liveries/swiss.xml === RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/pc7/Models/Liveries/swiss.xml,v retrieving revision 1.1 diff -u -p -r1.1 swiss.xml --- Models/Liveries/swiss.xml 19 Oct 2008 14:29:45 - 1.1 +++ Models/Liveries/swiss.xml 19 Oct 2008 18:58:23 - @@ -1,4 +1,4 @@ -?xml version=1.0? +?xml version=1.0? PropertyList sim - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] livery - generic overlay
Melchior FRANZ wrote: * Melchior FRANZ -- Sunday 19 October 2008: What was probably broken were your material animations Patch attached ... s/object/object-name/ duh :( anyway, thanks for the patch. Erik - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel