I don't know how it actually all works (I doubt anyone really does...) - some observations:
* <include> helps you only if you want to populate a specific subdirectory of the property tree
- Code: Select all
<failures include="component_condition.xml"/>
populates the failures/ subdir of the Shuttle tree for instance, but it never works to add anything to the root directory. Declaring animations in a subdirectory of the model xml doesn't work.
* there's probably a reason model within model xmls are not using <include> but <model>, and I
suspect that one of the differences is that xml as such creates property tree structure, but models in addition create OSG nodes on the scenegraph.
Which is to say
- Code: Select all
<model>
<path>cockpit.xml</path>
<offsets>
<x-m> 0 </x-m>
<y-m> 0 </y-m>
<z-m> 0 </z-m>
</offsets>
</model>
creates a scenegraph node 'cockpit' (or whatever the assigned name is, we should have the ability to name somehow) and effects can be assigned to that node and
should automatically apply to all children (at least for animation, that really works - unfortunately the effect framework is really coded with its own conventions).
* Now trying to include xml misses the scenegraph node references a <model> tag creates, which is why I think this doesn't really work.
* The idea to have the effects, animations and other definitions for one ac model in one xml file isn't so bad - the problem in out specific case is that the whole cockpit mesh is one chunk, so it all grows very large.
I suspect if we had panel by panel *.ac files and just include them in the cockpit files via <model> tags (as airplanes usually do instruments...), it'd all be somewhat more manageable.
But a shortcut to 'just' include additional xml into the root level directory to simplify files doesn't exist in FG to my knowledge.