Titania X3D Editor

It starts with you!

Titania 3.0.4

It starts with you!

X3D Reference at Web3D.org

Imported and Exported Nodes

Imported and Exported Nodes

Find it: Click the Node Properties Editor icon . The IMPORT feature allows authors to incorporate content defined within Inline nodes or created programmatically into the namespace of the containing file for the purposes of event routing. In contrast with external prototyping, which allows access to individual fields of nodes defined as prototypes in external files, IMPORT provides access to all the fields of an externally defined node with a single statement.

Importing nodes from an Inlined file is accomplished with two statements: IMPORT and EXPORT. The IMPORT statement is used in the containing file to define which nodes of an Inline are to be incorporated into the containing file“s namespace. The EXPORT statement is used in the file being Inlined, to control access over which nodes within a file are visible to other files. EXPORT statements are not allowed in prototype declarations.

Example

Here is a simple example of including a EXPORT statement in a X3D file (Export.x3dv):

And now the appropriate file with the IMPORT statement (Import.x3dv):

Quick Reference

Here is a quick reference to the Export and Import sections within the Node Properties Editor.

Exported Nodes:

Export

  • Add/Remove:when you export a node you can specify a new name that will be used as identifer.
  • Edit: double click a exported node in the list view to changed its exported name.

Imported Nodes:

Imported Nodes:

  • Check button: activate the check button left from the node type name to import an exported node.
  • Imported Name: click into the imported name field to give your imported node a new name to identify this node within your scene.

Imported & Exported Nodes within the Outline Editor

To enable the display of imported & exported nodes choose View > Imported Nodes and View > Exported Nodes within the context menu of the Outline Editor.

Imported nodes have an icon left beside the node type name with two spheres and a small arrow at the top left corner indicating that this node comes from another scene.

Exported nodes have an icon with a small arrow at the bottom right corner of the image left beside the node type name indicating that this node is an exported node and probably incorporated into another scene.