<div dir="ltr"><div>[BLUF summary: proposed specification change to allow regular re-USE of imported node references.]</div><div><br></div><div>Am trying to write a prototype for HAnim, and hoped that I might EXPORT a large model so that a smaller scene might IMPORT the HAnimHumanoid for further reuse (as a USE node in a prototype). Example EXPORT:</div><div><ul><li>3D Example Archives: Humanoid Animation, Characters, Jin LOA 2</li><li>Articulated 3D game character designed with a general graphics tool, then converted into an X3D HAnim model and available for IMPORT as JinLOA2.</li><li><a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2Index.html">https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2Index.html</a></li><li><span title="HAnimHumanoid is a Humanoid Animation (HAnim) node" style="color:rgb(0,0,0);font-family:"Times New Roman""><span title="ROUTE connects output fields of event-producing nodes to input fields of event-consuming nodes." style="background-color:rgb(238,238,238)"><!-- This node has an <a title="go to this node" href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2.html#JinLOA2" style="">EXPORT</a> connection that can exchange events with a parent X3D model. --><br></span> <span title="HAnimHumanoid is a Humanoid Animation (HAnim) node" style=""><<span class="element" style="color:navy">HAnimHumanoid</span> <span class="gmail-attribute" style="color:green">DEF</span>='<a title="bookmark link to hanim_JinLOA2" href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2.html#hanim_JinLOA2" class="gmail-idName" style="color:maroon">hanim_JinLOA2</a>' <span class="gmail-attribute" style="color:green">loa</span>='<span class="gmail-value" style="color:teal">2</span>' <span class="gmail-attribute" style="color:green">name</span>='<span class="gmail-value" style="color:teal">JinLOA2</span>' <span class="gmail-attribute" style="color:green">scale</span>='<span class="gmail-value" style="color:teal">0.0225 0.0225 0.0225</span>'></span> on line</span> <a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2.html#30" style="font-family:monospace;font-size:medium">30</a><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium"> </span></li><li><span style="color:rgb(0,0,0);font-family:"Times New Roman";background-color:rgb(255,238,255)"><</span><span class="element" style="color:navy;font-family:"Times New Roman"">EXPORT</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";background-color:rgb(255,238,255)"> </span><span class="gmail-attribute" style="color:green;font-family:"Times New Roman"">localDEF</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";background-color:rgb(255,238,255)">='</span><a title="go to the original DEF node definition" href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2.html#hanim_JinLOA2" class="gmail-idName" style="color:maroon;font-family:"Times New Roman"">hanim_JinLOA2</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";background-color:rgb(255,238,255)">' </span><span class="gmail-attribute" style="color:green;font-family:"Times New Roman"">AS</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";background-color:rgb(255,238,255)">='</span><span class="gmail-idName" style="color:maroon;font-family:"Times New Roman"">JinLOA2</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";background-color:rgb(255,238,255)">'/></span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;background-color:rgb(255,255,255)"> </span><span style="color:rgb(0,0,0);font-family:"Times New Roman";background-color:rgb(255,255,255)">on line </span>
<a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2.html#1319" style="font-family:monospace">1319</a><span style="color:rgb(0,0,0);font-family:monospace"> </span></li></ul><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif">Hmmm, please notice </span>that medium-size<span style="color:rgb(0,0,0);font-family:arial,sans-serif"> HAnim model is (1319 - 30 = 1289) </span>lines long<span style="color:rgb(0,0,0);font-family:arial,sans-serif">... gee, wouldn't it be nice to Inline and IMPORT that model in ~3 lines instead, with added benefit of being able to reuse pose and motion animations with it also.</span></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">However the current X3D Architecture appears to restrict the usage of imported nodes solely to receiving/sending events. That restriction permits writing ROUTE connections, but a blocker if trying to write a prototype or trying other node re-USE.</font></div></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">EXPORT and IMPORT statements</font><span style="color:rgb(0,0,0);font-family:arial,sans-serif"> </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif">are rarely used, but</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"> have been around a long time... since X3D 3.0, about 25 years maybe. They have potential for great expressive power and extensibility (the X in X3D). However, am guessing that the reuse limitation of IMPORT nodes has likely inhibited our adoption. If I recall correctly, the primary objection (way back then) to allowing full access to an imported node reference was uncertainty about how it might all work, perhaps complicated by run-time synchronization concerns.</span></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">We have come a long way since then. It seems pretty clear that an Inline node loads an external scene graph into the current scene graph. Further, the EXPORT statement identifies a specific node (sub graph) within that inlined scene graph.</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">The straightforward way to think about this: </font>Inline EXPORT/IMPORT provides a reference to a node in the currently loaded scene graph. <span style="color:rgb(0,0,0);font-family:arial,sans-serif">Given that the author has a reference to an active node, they ought to be able to utilize that node reference just like any other DEF/USE node reference.</span></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">I propose we relax the legacy (25-year) restriction and allow IMPORT node references to be treated the same as USE node references.</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">Towards that end, have written out suggested changes in the draft v4.1 architecture, adding to a number of editorial improvements already accomplished as part of</font></div><div><ul><li><font color="#000000" face="arial, sans-serif">Mantis </font>1470: add EXPORT/IMPORT field DESCRIPTION for X3D Architecture 4.1; also allow reuse</li><li><font color="#000000" face="arial, sans-serif"><a href="https://mantis.web3d.org/view.php?id=1470">https://mantis.web3d.org/view.php?id=1470</a></font>1470: add EXPORT/IMPORT field DESCRIPTION for X3D Architecture 4.1</li></ul></div><div><font color="#000000" face="arial, sans-serif">Request review, considerations and reactions. The markup changes at first look complex but are essentially all geared towards the single objective of allowing re-use of IMPORT nodes. Lots of markup shows that there are few actual changes to existing prose, most of it is simply editorial re-organization for clarity.</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">This is a good topic for this week's specification editors call on Friday (9 pacific).</font></div><div><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><font color="#000000" face="arial, sans-serif"></font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">For easy review, current markup follows. <b>First is Concepts.</b></font></div><div><ul><li>X3D Architecture v4.1, clause 4 Concepts, 4.4.6 EXPORT/IMPORT semantics</li><li><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#ExportImportSemantics">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#ExportImportSemantics</a></li></ul></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><h2 style="margin-top:18px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><font size="2">4.4.6 <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">EXPORT/IMPORT semantics</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">Import/Export semantics</span></font></h2></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><span class="editorsNote" title="editorial" style="background-color:lightcyan">Editors note: there are few actual changes here, most are simply switching the order of EXPORT and IMPORT. Added functionality: imported node reuse.</span></p></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">The EXPORT feature allows authors to identify specific parts of an X3D model which might be safely shared and reused by other X3D models.</span> 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 <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">and reusing scene subgraphs on a per-node basis.</span> <span class="gmail-proposedDeletion" title="moved to end of section" style="background-color:orange;text-decoration-line:line-through">In contrast with external prototyping (see <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#Externalprototypesemantics">4.4.5 External prototype semantics</a>), 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 (see <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#IMPORTStatement">9.2.6 IMPORT statement</a>).</span></p></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">Importing nodes from an Inlined file is accomplished with two statements: <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">EXPORT and IMPORT. </span><span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">IMPORT and EXPORT.</span> <span class="gmail-proposedDeletion" title="moved to end of paragraph" style="background-color:orange;text-decoration-line:line-through">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.</span> The EXPORT statement is used in the file being Inlined, to control access over which nodes within a file are visible to other files (see <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#EXPORTStatement">9.2.5 EXPORT statement</a>). EXPORT statements are not allowed in prototype declarations. <span class="gmail-proposed" title="moved from top of paragraph" style="background-color:yellow">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.</span></p></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><span class="gmail-proposed" title="moved from top of section" style="background-color:yellow">In contrast with external prototyping (see <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#Externalprototypesemantics" style="">4.4.5 External prototype semantics</a>), 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 (see <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#IMPORTStatement" style="">9.2.6 IMPORT statement</a>).</span></p></blockquote><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><span style="font-family:monospace">_____</span><div><font face="monospace"><br></font><div><b>Next is the EXPORT statement.</b></div><div><ul><li><font color="#000000" face="arial, sans-serif"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif">X3D Architecture v4.1, clause 9 Networking component, </span></font>9.2.5 EXPORT statement</li><li><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#EXPORTStatement">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#EXPORTStatement</a></li></ul><div><span style="background-color:yellow;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">9.2.5 EXPORT statement</span></div><div><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The EXPORT statement is used within an X3D file to specify nodes that may be imported into other scenes when Inlining that file. Only named nodes exported with an EXPORT statement are eligible to be imported into another <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">scene.</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">file.</span> <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">DEF names are used to identify exported nodes.</span> <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">See <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#ExportImportSemantics">4.4.6 EXPORT/IMPORT semantics</a> for further details.</span></p><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">EXPORT statements may appear anywhere in the file and have the following form:</p><blockquote style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><p class="gmail-proposed" title="Mantis 1470" style="background-color:yellow"><span class="gmail-code" style="font-family:monospace">EXPORT <NodeDEFName> [ AS <ExportedNodeDEFName> ]<br> [DESCRIPTION "a simple description of intended EXPORT purpose"]</span></p><p class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through"><span class="gmail-code" style="font-family:monospace">EXPORT <NodeName> [ AS <ExportedNodeName> ]</span></p></blockquote><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The EXPORT statement has the following components:</p><ol type="a" style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px">The <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">local</span> DEF name of the node to be exported <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">if the current scene is retrieved externally via Inline,</span></li><li style="margin-top:4px">An optional <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">alternative DEF</span> name that is used <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">AS a default</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">as an</span> alias for the exported node when importing it into other <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">scenes,</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">files,</span></li><li style="margin-top:4px"><span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">An optional simple DESCRIPTION of intended purpose for the node provided via EXPORT.</span></li></ol><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The EXPORT statement has the following semantics:</p><ol type="a" start="4" style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px">Once imported into a containing scene, events may be routed to or from <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">the fields of</span> an exported node in exactly the same manner as any node defined with DEF.</li><li style="margin-top:4px">Exported nodes imported into a containing scene <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">may be referenced via a USE statement in the importing scene.</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">may not be instanced via the USE statement.</span></li><li style="margin-top:4px">Exportation may not be propagated across multiple files; that is, a node imported into one scene using the IMPORT statement may not then be further exported into another scene using the EXPORT statement.</li><li style="margin-top:4px">Nodes shall not be exported from <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">within</span> the body of a PROTO declaration.</li><li style="margin-top:4px"><span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">Any scene with an EXPORT statement shall apply UNIT statement adjustments as needed to the fields of any exported nodes and child nodes.</span></li><li style="margin-top:4px">The EXPORT statement can appear wherever a ROUTE statement is allowed, and shall be contained within the Inline node to which it refers.</li></ol><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The following example illustrates the use of the EXPORT statement (Classic VRML encoding):</p><p class="gmail-Example" style="margin-top:18px;margin-bottom:18px;font-family:univers,arial,sans-serif;color:rgb(0,0,0)"><span class="gmail-proposed" title="editorial" style="background-color:yellow">EXAMPLE</span></p><pre class="gmail-listing" style="color:rgb(0,0,0);margin-left:15px">DEF T1 Transform {
<span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow"># additional nodes and fields</span>...
}
<span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow"># additional nodes and fields</span>...
EXPORT T1 AS rootTransform
</pre><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">In the above example, node <span class="gmail-code" style="font-family:monospace">T1</span> is exported for use by other X3D scenes. The optional AS keyword defines the exported name of <span class="gmail-code" style="font-family:monospace"><b>T1</b></span> as <span class="gmail-code" style="font-family:monospace"><b>rootTransform</b></span> (<i>i.e.</i>, other scenes may import the node only using the name <span class="gmail-code" style="font-family:monospace">rootTransform</span>). All defined alias AS names shall also meet appropriate uniqueness requirements in the local DEF namespace of the parent scene.</p><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><span style="color:rgb(34,34,34);font-family:monospace">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span></p><div><b>Next is the IMPORT statement.</b></div><div><ul><li><font color="#000000" face="arial, sans-serif"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif">X3D Architecture v4.1, clause 9 Networking component, </span></font>9.2.6 IMPORT statement</li><li><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#IMPORTStatement">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#IMPORTStatement</a></li></ul></div><h2 style="margin-top:18px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><font size="2"><a id="gmail-IMPORTStatement"></a><span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">9.2.6 IMPORT statement</span></font></h2><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The IMPORT statement is used within an X3D file to specify nodes, which are defined within Inline files or programmatically created content, that are to be brought into the namespace of the containing file for the purposes of event routing. Once a node is imported, events may be sent to its fields via ROUTEs, or routed from any fields of the node which have output events. <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">DEF names are used to identify nodes.</span> <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">See <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#ExportImportSemantics">4.4.6 EXPORT/IMPORT semantics</a> for further details.</span></p><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">IMPORT statements may appear anywhere in the file and have the following form:</p><blockquote style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><p class="gmail-proposed" title="Mantis 1470" style="background-color:yellow"><span class="gmail-code" style="font-family:monospace">IMPORT <InlineNodeDEFName><b>.</b><ExportedNameFromInlinedFile> [ AS <NewLocalNodeDEFName> ]<br> [DESCRIPTION "a simple description of intended IMPORT purpose"]</span></p><p class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through"><span class="gmail-code" style="font-family:monospace">IMPORT <InlineNodeName><b>.</b><ExportedNameFromInlinedFile> [ AS <NewLocalNodeName> ]</span></p></blockquote><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The IMPORT statement has the following components:</p><ol type="a" style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px">The <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">DEF</span> name of the Inline node that contains the node to be imported,</li><li style="margin-top:4px">The <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">DEF</span> name of the node to import,</li><li style="margin-top:4px">An optional <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">alternative DEF</span> name that is used <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">AS</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">as</span> an alias for the imported node within the run-time name scope, to <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">help prevent</span> <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">avoid potential DEF</span> name clashes within the parent scene containing the IMPORT statement,</li><li style="margin-top:4px"><span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">An optional simple DESCRIPTION of intended purpose for the node provided via IMPORT.</span></li></ol><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The IMPORT statement has the following semantics:</p><ol type="a" start="5" style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px">Once imported, events may be routed to or from the <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">fields of an</span> imported node <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">in the Inline scene,</span> in exactly the same manner as any node defined <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">locally</span> with DEF.</li><li style="margin-top:4px"><span class="editorsNote" title="Mantis 1470" style="background-color:lightcyan">Editors note: the following is an important change, otherwise an imported node cannot be utilized other than by receiving ROUTEd events (as shown by the <a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportIndex.html" target="_blank">InlineImport.x3d</a> example).<br></span>Nodes imported into an X3D scene using the IMPORT statement may <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">be referenced</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">not be instanced</span> via the USE statement.</li><li style="margin-top:4px">Only nodes that are exported from within the Inline <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">scene</span> via an EXPORT statement may be imported using a corresponding IMPORT statement.</li><li style="margin-top:4px">The IMPORT statement can appear wherever a ROUTE statement is allowed, and shall follow the Inline node to which it refers.</li></ol><div class="gmail-proposed" title="Mantis 1470" style="background-color:yellow;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><p>Any node reference that is obtained via IMPORT from an exporting scene is also available as a USE node in the importing scene. This requirement is necessary for the node reference retrieved by IMPORT to have full capabilities in the importing scene. Nevertheless, important synchronization considerations arise when one or more Inline models are loaded as part of the current scene graph.</p><ol type="a" start="9"><li style="margin-top:4px">A single Inline node is allowed to have multiple IMPORT statements. The state of nodes within that currently loaded Inline model are consistently maintained as part of the current scene.</li><li style="margin-top:4px">Multiple Inline nodes with separate IMPORT statements are completely independent, even if each independent Inline is retrieving a copy of the same original model.</li></ol></div><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">The following example illustrates the use of the IMPORT statement (Classic VRML encoding syntax):</p><p class="gmail-Example" style="margin-top:18px;margin-bottom:18px;font-family:univers,arial,sans-serif;color:rgb(0,0,0)"><span class="gmail-proposed" title="editorial" style="background-color:yellow">EXAMPLE</span></p><pre class="gmail-listing" style="color:rgb(0,0,0);margin-left:15px">DEF <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">MyInline</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">I1</span> Inline {
url "someurl.x3d"
}
IMPORT <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">MyInline.rootTransform AS ImportedTransform</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">I1.rootTransform AS I1Root</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">...</span>
<span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">
# ROUTE events into the imported node, which is now a part of an Inline scene subgraph</span>
DEF PI PositionInterpolator <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">{ }</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">{ ... }</span>
ROUTE PI.value_changed TO <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">ImportedTransform.set_translation</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">I1Root.set_translation</span>
</pre><div class="gmail-proposed" title="Mantis 1470" style="background-color:yellow;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><pre class="gmail-listing" style="margin-left:15px"># also USE the imported node (and associated scene subgraph) elsewhere in the parent scene
Group {
USE ImportedTransform
}
# also USE the imported node when defining an instance of a MyNewTransform prototype
MyNewTransform {
children USE ImportedTransform
}
</pre></div><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">In the above example,</p><ul style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px"><span class="gmail-code" style="font-family:monospace">rootTransform</span> is <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">externally</span> defined as a Transform node in the file <code>someurl.x3d</code> and exported via an EXPORT statement. <span class="gmail-proposedDeletion" title="editorial: moved to first paragraph in this section" style="background-color:orange;text-decoration-line:line-through">(see <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#ExportImportSemantics">4.4.6 Import/Export semantics</a>).</span></li><li style="margin-top:4px">The optional AS keyword <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">in the IMPORT statement</span> defines an alias for <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">the <span class="gmail-code" style="font-family:monospace">MyInline.rootTransform</span></span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through"><span class="gmail-code" style="font-family:monospace">rootTransform</span></span> <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">DEF.</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">, so that</span></li><li style="margin-top:4px">Within the containing scene, the node is referenced using the <span class="gmail-proposed" title="Mantis 1470" style="background-color:yellow">AS alias name <span class="gmail-code" style="font-family:monospace">ImportedTransform</span>.</span> <span class="gmail-proposedDeletion" title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">DEF name <span class="gmail-code" style="font-family:monospace">I1Root</span>.</span></li></ul><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">All defined alias AS names shall also meet appropriate uniqueness requirements in the local DEF namespace of the parent scene.</p><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><span style="color:rgb(34,34,34);font-family:monospace">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span><span style="font-family:monospace;color:rgb(34,34,34)">_____</span></p></div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><font face="arial, sans-serif">Additional thanks to Joe Williams, Holger Seelig, and Nicholas Polys for contributing to this analysis and potential improvement.</font></div><div style="color:rgb(34,34,34)"><font face="arial, sans-serif"><br></font></div><div style="color:rgb(34,34,34)"><font face="arial, sans-serif">All feedback welcome! This simple functional refinement has potential for much X3D scalability and extensibility.</font></div><div style="color:rgb(34,34,34)"><font face="arial, sans-serif"><br></font></div><div style="color:rgb(34,34,34)"><span style="font-family:arial,sans-serif">Thanks in advance for considering the possibilities.</span><font face="arial, sans-serif"></font></div><div style="color:rgb(34,34,34)"><font face="arial, sans-serif"><br></font></div><div style="color:rgb(34,34,34)"><font face="monospace">all the best, Don</font></div><div style="color:rgb(34,34,34)"><font face="monospace">-- </font></div><div style="color:rgb(34,34,34)"><font face="monospace">X3D Graphics, Maritime Robotics, Distributed Simulation</font></div><div style="color:rgb(34,34,34)"><font face="monospace">Relative Motion Consulting <a href="https://RelativeMotion.info" target="_blank">https://RelativeMotion.info</a></font></div></div></div></div></div></div>