instance_node question

I am curious why an instance_node element isn’t allowed to appear directly insode a visual_scene element. I’d expect to be able to use an instance_node wherever a node is usable; this seems to be an unnecessary exception.

It appears the only way for a visual_scene to use nodes from a library that is to create a node specifically to nest them into. Which isn’t that serious a limitation, but still.

Good question! Only the <node> element can contain <instance_node> elements. The schema is designed that way for a few of reasons.

[ol]
[li] A <node> is a place that defines a local coordinate system.[/:m:36tb6ajm][/li][li] <instance_node> is an instantiation of a place within a place.[/:m:36tb6ajm][/li][li] <visual_scene> is not a <node> and therefore not a place.[/:m:36tb6ajm][/li][li] The visual scene contains one or more distinct places (<node> hierarchies) to visualize.[/:m:36tb6ajm][/ol][/li]
The <instance_node> and <library_node> elements encourage modular content representing hierarchical coordinate systems without adding other semantics that you find in traditional run-time scene graphs.