On Wed, Feb 16, 2011 at 12:46 PM, Curtis Olson <curtol...@gmail.com> wrote:
> I was browsing the flightgear wiki pages on doing model animations.
>  Everything is written from the perspective of a single model with named
> parts and the animations refer to the part names.
> What I have here is two version of the same model as separate 3ds files.  I
> realize it's a crude hack, but I'm short on time.  What I would like to do
> is create an animation that selects one entire model or the other depending
> on the state of a property.  I assumed it would be easy to do so I left it
> to the last minute ... I've probably done it in the past, but now I can't
> find any documentation or examples ... is this possible to do?
> Thanks,
>
> Curt.



Curt,

One way to do this, set up the primary model XML file:

<?xml version="1.0"?>
<PropertyList>

<path>mymodel.ac</path>

<model>
  <name>Model1</name>
  <path>Aircraft/myplane/Models/model_1.xml</path>
</model>

<model>
  <name>Model2</name>
  <path>Aircraft/myplane/Models/model_2.xml</path>
</model>

<animation>
  <type>select</type>
  <object-name>Model1</object-name>
  <condition>
    ...
  </condition>
</animation>

<animation>
  <type>select</type>
  <object-name>Model2</object-name>
  <condition>
    ...
  </condition>
</animation>

</PropertyList>


So you import the primary model 'mymodel.ac (or whatever) in the path
(this could be a null model), and specify two submodel imports and two
selects that determine when the submodels appear.

Then each submodel XML file will reference its model:

<?xml version="1.0"?>
<PropertyList>
<path>model_1.ac</path>
</PropertyList>


Hope this helps,

-Gary aka Buckaroo

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to