<div dir="ltr"><div>Wow this is great Holger, thanks for sharing that excellent example.  I think this will really provide a big step up for our HAnim development work.</div><div><br></div><div>When you are ready, I am keen to test it out with Windows installer for sunrize, that has really accelerated and improved my ability to write & debug javascript inside a ProtoDeclare.</div><div><br></div><div>Meanwhile, the prototype implementation for HAnimPosePrototype.x3d that I've been working on is coming along, but I am running into problems "walking the tree" of an HAnimHumanoid because I am not able to access fields properly.  Many times when I try to dereference a node to get its name, am getting 'undefined' as a result.  Much online search and a few variations didn't help, so there are likely some basic mistakes occurring.</div><div><br></div><div>This is probably due to an incorrect understanding on my part.  Please don't feel like I am asking you to debug it, but you (or someone else on the list) might see poor JavaScript invocations that are preventing the source from working.  Link follow to latest version and trace statements on console log.  As might be expected, results are consistent between my local Sunrize and online Playground and online X_ITE.</div><div><ul><li>X3D Example Archives: Humanoid Animation, Pose, HAnim Pose Prototype</li><li>Define an experimental new node to simply capture a single pose for an HAnimHumanoid model. Expected usage is to allow HAnimHumanoid to contain multiple Pose nodes which can be activated and composed.</li><li>(scroll down bottom pane to see ecmascript: source contained in Script inside the model)</li><li><a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Pose/HAnimPosePrototypeIndex.html">https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Pose/HAnimPosePrototypeIndex.html</a> </li><li><a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Pose/HAnimPosePrototype.x3d">https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Pose/HAnimPosePrototype.x3d</a></li></ul><div><font color="#000000" face="arial, sans-serif"><span style="font-size:12.8px;white-space:pre">(This version is loading an Inline copy of JinLOA2 Humanoid so everything is right there, and there are no possible EXPORT/IMPORT complications for that Humanoid.)</span></font></div></div><div><font color="#000000" face="monospace"><span style="font-size:12.8px;white-space:pre"><br></span></font></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">---------------------</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">found Pose FaceLeft, enabled=true, traceEnabled=true</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : initializing Pose FaceLeft]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : loa=0 description=Only modify humanoid_root Joint node to face left]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : numberPoseJoints= 2]</span></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">// the following is an expected diagnostic that is working correctly</span></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : *** [error] node type mismatch, poseJoints[1]=HAnimSegment { } name=specialTestCase (should be HAnimJoint, ignored)]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : outputVrmlString=</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">DEF OI_humanoid_root OrientationInterpolator { key [0, 1] keyValue [0 1 0 0, 0 1 0 0] }</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre"># ROUTE HAnimPoseClock.fraction_changed TO OI_humanoid_root.set_fraction</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : jointOrientationInterpolators.length=1 # size is correct]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : jointOrientationInterpolators.toString()=</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">OrientationInterpolator { }<span style="background-color:rgb(255,242,204)"> ### TODO missing fields</span>]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : jointOrientationInterpolators JSON.stringify=</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">{"0":{"metadata":null,"key":{"0":0,"1":1},"keyValue":{"0":{},"1":{}},"value_changed":{}}} <span style="background-color:rgb(255,242,204)">### TODO partial fields</span>]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : countPoseJoints() complete]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : starting countHumanoidSkeletonJoints()]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : parentHAnimHumanoid.name=JinLOA2=JinLOA2]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre;background-color:rgb(255,242,204)">skeletonNode=HAnimJoint { }, name=undefined (console.log)</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : <span style="background-color:rgb(255,242,204)">skeletonNode=HAnimJoint { }, name=undefined</span>]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : <span style="background-color:rgb(255,242,204)">*** TODO why is skeletonNode.name not retrievable/referencable?</span>]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : p<span style="background-color:rgb(255,242,204)">arentHAnimHumanoid.skeleton=HAnimJoint { } name=undefined</span>]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : parentHAnimHumanoid.skeleton.length=1]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : invoking countChildJointsRecurse() to walk the tree...]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : *** recursion trace: nextNode=HAnimJoint { }, <span style="background-color:rgb(255,242,204)">nextNode.name=undefined</span>, nextNodeObject=HAnimJoint { }, <span style="background-color:rgb(255,242,204)">nextNodeObject.name=undefined</span>]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : *** TODO error, parameter nextNode appears to lose fields and perhaps context when passed into next method]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : <span style="background-color:rgb(255,242,204)">recursion found HAnimJoint { } name=undefined</span> with counter=1]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : <span style="background-color:rgb(255,242,204)">HAnimJoint name=undefined has no children</span>, backtracking...]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : found numberSkeletonJoints=1 total]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : Pose FaceLeft initialization() complete]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">---------------------</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">found Pose A, enabled=true, traceEnabled=true</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : initializing Pose A]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : loa=1 description=experimental pose]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : numberPoseJoints= 2]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : outputVrmlString=</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">DEF OI_l_shoulder OrientationInterpolator { key [0, 1] keyValue [0 1 0 0, 0 1 0 0] }</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre"># ROUTE HAnimPoseClock.fraction_changed TO OI_l_shoulder.set_fraction</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">DEF OI_r_shoulder OrientationInterpolator { key [0, 1] keyValue [0 1 0 0, 0 1 0 0] }</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre"># ROUTE HAnimPoseClock.fraction_changed TO OI_r_shoulder.set_fraction</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : jointOrientationInterpolators.length=2 # size is correct]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : jointOrientationInterpolators.toString()=</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">  OrientationInterpolator { }</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">  OrientationInterpolator { }</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">] ### TODO missing fields]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : jointOrientationInterpolators JSON.stringify=</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">{"0":{"metadata":null,"key":{"0":0,"1":1},"keyValue":{"0":{},"1":{}},"value_changed":{}},"1":{"metadata":null,"key":{"0":0,"1":1},"keyValue":{"0":{},"1":{}},"value_changed":{}}} ### TODO partial fields]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : countPoseJoints() complete]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : starting countHumanoidSkeletonJoints()]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : parentHAnimHumanoid.name=JinLOA2=JinLOA2]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">skeletonNode=HAnimJoint { }, name=undefined (console.log)</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : skeletonNode=HAnimJoint { }, name=undefined]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : *** TODO why is skeletonNode.name not retrievable/referencable?]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : parentHAnimHumanoid.skeleton=HAnimJoint { } name=undefined]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : parentHAnimHumanoid.skeleton.length=1]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : invoking countChildJointsRecurse() to walk the tree...]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : *** recursion trace: nextNode=HAnimJoint { }, nextNode.name=undefined, nextNodeObject=HAnimJoint { }, nextNodeObject.name=undefined]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : *** TODO error, parameter nextNode appears to lose fields and perhaps context when passed into next method]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : recursion found HAnimJoint { } name=undefined with counter=1]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : HAnimJoint name=undefined has no children, backtracking...]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : found numberSkeletonJoints=1 total]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">[HAnimPoseScript : Pose A initialization() complete]</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">---------------------</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">found Pose T, enabled=false, traceEnabled=false</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">---------------------</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">found Pose H, enabled=false, traceEnabled=false</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">---------------------</span></div></div><div><div><span class="gmail-log" style="box-sizing:border-box;color:rgb(52,52,60);font-family:monospace;font-size:12.8px;white-space:pre">found Pose I, enabled=false, traceEnabled=false</span></div></div></blockquote><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)">Perhaps there is an example somewhere that can help, but I didn't find it.  Goal for now is to fully traverse an HAnimHumanoid tree, noting all HAnimJoint nodes and their names.</div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)">Am running out of things to try... other eyes may do better than mine.  TIA for all scrutiny.</div><div style="color:rgb(34,34,34)"><font face="monospace"><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><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Oct 9, 2025 at 1:01 PM Holger Seelig <<a href="mailto:holger.seelig@yahoo.de">holger.seelig@yahoo.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>I have made an experimental implementation of this new feature. You can already use and play with it in the special preview playground:<div><br></div><div><a href="https://create3000.github.io/preview/playground/?url=https://create3000.github.io/Library/Tests/Components/Core/use-exported-node.x3dv" target="_blank">https://create3000.github.io/preview/playground/?url=https://create3000.github.io/Library/Tests/Components/Core/use-exported-node.x3dv</a></div><div><br></div><div>This scene loads an inline file which exports a single green cube. This cube is imported into the scene and used a second time.</div><div><br></div><div>There is also a experimental feature ‚USE before DEF‘ enabled in this preview playground. This feature seems important for me to get this all work in all cases.</div><div><br></div><div>Best regards,</div><div>Holger</div><div><br></div><div><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div>—<br>Holger Seelig<br>Leipzig, Germany<br><br><a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</a><br><a href="https://create3000.github.io/x_ite/" target="_blank">https://create3000.github.io/x_ite/</a><br><a href="https://patreon.com/X_ITE" target="_blank">https://patreon.com/X_ITE</a><br></div><div><br></div></div><br>
</div>

<div><br><blockquote type="cite"><div>Am 09.10.2025 um 18:51 schrieb Don Brutzman via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>:</div><br><div><div dir="ltr"><div>Hi Doug.  Thanks for looking this over.</div><div><br></div><div>I meant to also note earlier that this proposed change in semantics has no effect on any existing EXPORT/IMPORT statements in any existing X3D models, versions 3.0 through 4.0.</div><div><br></div><div>Am glad to see you describing how FreeWrl supports EXPORT/IMPORT to date.</div><div><br></div><div>Certainly refactoring half a gazillion lines of code is likely not worthwhile for such an extensibility feature... don't want to risk provoking side-effect problems.  Unless you want to, of course...  :)</div><div><br></div><div>I'm following your points.  Seems sensible, but maybe any changes to the existing functionality you describe is pretty similar to other handling that is already in place.  Please consider the following short reactions, and correct me if wrong:</div><div><ul><li>Inline nodes exist and receive few ROUTE connections, there are not many fields there (url load etc.)</li><li>IMPORT creates a node reference that points somewhere in the scene subgraph loaded by Inline</li><li>That IMPORT reference can already send/receive events via ROUTE, as long defined in the spec.</li><li>In essence, the proposal says such a node reference might be treated in the same manner as other USE nodes, which are also node references.</li></ul></div><div>Again appreciate all consideration.  Even if this is impractical for FreeWrl, your opinion on feasibility in general remains welcome.  Am not trying to check boxes on a feature list, and am not trying to push a nontrivial architectural change.  Rather am trying to enable significantly more scalable extensibility by removing a small existing constraint on usage.</div><div><br></div><div>p.s. curiously, since the specification intentionally never mandates error responses, it seems like a browser implementation might satisfactorily permit IMPORT  node references to behave similarly as USE node references, if it wants.  hmmm...</div><div><br></div><div>Have fun with X3D!  😀</div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><font face="monospace"><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><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 9, 2025 at 9:14 AM GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Don,</div><div dir="ltr">"synchronization" I suspect the change would break (25 year old, currently unmaintained) freewrl. I like the use-case you mention for the change, seems well worth a big change. Final nail in freewrl coffin? Not necessarily but would require insight and ambition to refactor 500,000 lines of code to allow a layer of abstraction / uncertainty around every node and route in the scenegraph. <div>-Doug</div><div>more..</div><div><div> tests for new conformance would be </div><div>- if routes can dangle before an Inline is loaded, and after an Inline is unloaded</div><div>- by dangle I mean point harmlessly TO nothing / unloaded node, without being garbage collected</div><div>- no error or warning is issued when a route dangles</div><div>- if Inlined nodes are to be treated like regular scenegraph nodes, would that mean all routes to regular scenegraph nodes should be able to dangle?</div><div>- current specs: a test for deleting a regular scenegraph node: have an active route to it, and see if something breaks when the node is deleted</div></div><div>-- would that need to change so instead of garbage collecting routes to deleted nodes, they dangle, and (somehow) are allowed to hook back up to new added nodes?</div><div>freewrl current Inline mechanism:</div><div>- Inlines are loaded, parsed in a separate thread, and can be loaded and unloaded with true/false field on Inline</div><div>- on each rendering frame, when Inline node is rendered/drawn/visited, it does a little work to check the load progress/status, and makes any changes to IMPORT routes and AS nodes as needed</div><div>- freewrl uses special routes to Inlined IMPORTed nodes, which can 'dangle' (called weak routes in freewrl) while waiting for the inline to load (rest of scene can be rendering).</div><div>- the special routes get an extra complex lookup to see if the TO node is loaded</div><div>- versus deleting a regular scenegraph node would trigger a search for routes to the deleted node, and the routes would be deleted/garbage collected too</div><div>- and normal routes, freewrl uses memory addresses for start and end node fields, and does a memory copy of field value during routing loop, (versus weak/dangling route complex lookup in separate loop)</div><div>- when an Inline EXPORTed node is loaded it is allocated to a memory address via malloc. when unloaded and free(),  and reloaded and reallocated, it would be loaded in a different memory address, so can't do a simple memcpy with old address during routing, needs to check if node loaded and what's the new memory address</div><div>SUMMARY: freewrl seems to be missing a layer of abstraction around or flag for each node and route that would allow a USE of an Inlined AS node and IMPORT route to enjoy equal status in the scenegraph.  Not immediately obvious how to fix / refactor.</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 8, 2025 at 1:27 PM Don Brutzman via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA2Index.html</a></li><li><span title="HAnimHumanoid is a Humanoid Animation (HAnim) node" style="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" target="_blank">EXPORT</a> connection that can exchange events with a parent X3D model. --><br></span>          <span title="HAnimHumanoid is a Humanoid Animation (HAnim) node"><<span style="color:navy">HAnimHumanoid</span> <span 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" style="color:maroon" target="_blank">hanim_JinLOA2</a>' <span style="color:green">loa</span>='<span style="color:teal">2</span>' <span style="color:green">name</span>='<span style="color:teal">JinLOA2</span>' <span style="color:green">scale</span>='<span 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" target="_blank">30</a><span style="font-family:monospace;font-size:medium"> </span></li><li><span style="font-family:"Times New Roman";background-color:rgb(255,238,255)"><</span><span style="color:navy;font-family:"Times New Roman"">EXPORT</span><span style="font-family:"Times New Roman";background-color:rgb(255,238,255)"> </span><span style="color:green;font-family:"Times New Roman"">localDEF</span><span style="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" style="color:maroon;font-family:"Times New Roman"" target="_blank">hanim_JinLOA2</a><span style="font-family:"Times New Roman";background-color:rgb(255,238,255)">' </span><span style="color:green;font-family:"Times New Roman"">AS</span><span style="font-family:"Times New Roman";background-color:rgb(255,238,255)">='</span><span style="color:maroon;font-family:"Times New Roman"">JinLOA2</span><span style="font-family:"Times New Roman";background-color:rgb(255,238,255)">'/></span><span style="font-family:"Times New Roman";font-size:medium;background-color:rgb(255,255,255)"> </span><span style="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" target="_blank">1319</a><span style="font-family:monospace"> </span></li></ul><div><span style="font-family:arial,sans-serif">Hmmm, please notice </span>that medium-size<span style="font-family:arial,sans-serif"> HAnim model is (1319 - 30 = 1289) </span>lines long<span style="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 face="arial, sans-serif"><br></font></div><div><font 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 face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">EXPORT and IMPORT statements</font><span style="font-family:arial,sans-serif"> </span><span style="font-family:arial,sans-serif">are rarely used, but</span><span style="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 face="arial, sans-serif"><br></font></div><div><font 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 face="arial, sans-serif"><br></font></div><div><font 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="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 face="arial, sans-serif"><br></font></div><div><font 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 face="arial, sans-serif"><br></font></div><div><font 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 face="arial, sans-serif">Mantis </font>1470: add EXPORT/IMPORT field DESCRIPTION for X3D Architecture 4.1; also allow reuse</li><li><font face="arial, sans-serif"><a href="https://mantis.web3d.org/view.php?id=1470" target="_blank">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 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 face="arial, sans-serif"><br></font></div><div><font 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 face="arial, sans-serif"></font></div><div><font face="arial, sans-serif"><br></font></div><div><font 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" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/concepts.html#ExportImportSemantics</a></li></ul></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><h2 style="margin-top:18px;font-family:Verdana,Arial,Helvetica,sans-serif"><font size="2">4.4.6 <span title="Mantis 1470" style="background-color:yellow">EXPORT/IMPORT semantics</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">Import/Export semantics</span></font></h2></div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><p style="font-family:Verdana,Arial,Helvetica,sans-serif"><span 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:0px 0px 0px 40px;border:none;padding:0px"><div><p style="font-family:Verdana,Arial,Helvetica,sans-serif"><span 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 title="Mantis 1470" style="background-color:yellow">and reusing scene subgraphs on a per-node basis.</span> <span 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" target="_blank">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" target="_blank">9.2.6 IMPORT statement</a>).</span></p></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><p style="font-family:Verdana,Arial,Helvetica,sans-serif">Importing nodes from an Inlined file is accomplished with two statements: <span title="Mantis 1470" style="background-color:yellow">EXPORT and IMPORT. </span><span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">IMPORT and EXPORT.</span> <span 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" target="_blank">9.2.5 EXPORT statement</a>). EXPORT statements are not allowed in prototype declarations. <span 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:0px 0px 0px 40px;border:none;padding:0px"><p style="font-family:Verdana,Arial,Helvetica,sans-serif"><span 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" target="_blank">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" target="_blank">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 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" target="_blank">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;font-family:Verdana,Arial,Helvetica,sans-serif">9.2.5 EXPORT statement</span></div><div><p style="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 title="Mantis 1470" style="background-color:yellow">scene.</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">file.</span> <span title="Mantis 1470" style="background-color:yellow">DEF names are used to identify exported nodes.</span> <span 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" target="_blank">4.4.6 EXPORT/IMPORT semantics</a> for further details.</span></p><p style="font-family:Verdana,Arial,Helvetica,sans-serif">EXPORT statements may appear anywhere in the file and have the following form:</p><blockquote style="font-family:Verdana,Arial,Helvetica,sans-serif"><p title="Mantis 1470" style="background-color:yellow"><span style="font-family:monospace">EXPORT <NodeDEFName> [ AS <ExportedNodeDEFName> ]<br>       [DESCRIPTION "a simple description of intended EXPORT purpose"]</span></p><p title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through"><span style="font-family:monospace">EXPORT <NodeName> [ AS <ExportedNodeName> ]</span></p></blockquote><p style="font-family:Verdana,Arial,Helvetica,sans-serif">The EXPORT statement has the following components:</p><ol type="a" style="font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px">The <span title="Mantis 1470" style="background-color:yellow">local</span> DEF name of the node to be exported <span 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 title="Mantis 1470" style="background-color:yellow">alternative DEF</span> name that is used <span title="Mantis 1470" style="background-color:yellow">AS a default</span> <span 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 title="Mantis 1470" style="background-color:yellow">scenes,</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">files,</span></li><li style="margin-top:4px"><span 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="font-family:Verdana,Arial,Helvetica,sans-serif">The EXPORT statement has the following semantics:</p><ol type="a" start="4" style="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 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 title="Mantis 1470" style="background-color:yellow">may be referenced via a USE statement in the importing scene.</span> <span 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 title="Mantis 1470" style="background-color:yellow">within</span> the body of a PROTO declaration.</li><li style="margin-top:4px"><span 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="font-family:Verdana,Arial,Helvetica,sans-serif">The following example illustrates the use of the EXPORT statement (Classic VRML encoding):</p><p style="margin-top:18px;margin-bottom:18px;font-family:univers,arial,sans-serif"><span title="editorial" style="background-color:yellow">EXAMPLE</span></p><pre style="margin-left:15px">DEF T1 Transform {
   <span title="Mantis 1470" style="background-color:yellow"># additional nodes and fields</span>...
}
<span title="Mantis 1470" style="background-color:yellow"># additional nodes and fields</span>...

EXPORT T1 AS rootTransform 
</pre><p style="font-family:Verdana,Arial,Helvetica,sans-serif">In the above example, node <span style="font-family:monospace">T1</span> is exported for use by other X3D scenes. The optional AS keyword defines the exported name of <span style="font-family:monospace"><b>T1</b></span> as <span style="font-family:monospace"><b>rootTransform</b></span> (<i>i.e.</i>, other scenes may import the node only using the name <span 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="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 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" target="_blank">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;font-family:Verdana,Arial,Helvetica,sans-serif"><font size="2"><a id="m_-1074627823151799354m_-6687480518320961116m_3417518567097090024m_-5879662488903793353gmail-IMPORTStatement"></a><span title="Mantis 1470" style="background-color:yellow">9.2.6 IMPORT statement</span></font></h2><p style="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 title="Mantis 1470" style="background-color:yellow">DEF names are used to identify nodes.</span> <span 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" target="_blank">4.4.6 EXPORT/IMPORT semantics</a> for further details.</span></p><p style="font-family:Verdana,Arial,Helvetica,sans-serif">IMPORT statements may appear anywhere in the file and have the following form:</p><blockquote style="font-family:Verdana,Arial,Helvetica,sans-serif"><p title="Mantis 1470" style="background-color:yellow"><span style="font-family:monospace">IMPORT <InlineNodeDEFName><b>.</b><ExportedNameFromInlinedFile> [ AS <NewLocalNodeDEFName> ]<br>       [DESCRIPTION "a simple description of intended IMPORT purpose"]</span></p><p title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through"><span style="font-family:monospace">IMPORT <InlineNodeName><b>.</b><ExportedNameFromInlinedFile> [ AS <NewLocalNodeName> ]</span></p></blockquote><p style="font-family:Verdana,Arial,Helvetica,sans-serif">The IMPORT statement has the following components:</p><ol type="a" style="font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px">The <span 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 title="Mantis 1470" style="background-color:yellow">DEF</span> name of the node to import,</li><li style="margin-top:4px">An optional <span title="Mantis 1470" style="background-color:yellow">alternative DEF</span> name that is used <span title="Mantis 1470" style="background-color:yellow">AS</span> <span 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 title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">help prevent</span> <span 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 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="font-family:Verdana,Arial,Helvetica,sans-serif">The IMPORT statement has the following semantics:</p><ol type="a" start="5" style="font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px">Once imported, events may be routed to or from the <span title="Mantis 1470" style="background-color:yellow">fields of an</span> imported node <span title="Mantis 1470" style="background-color:yellow">in the Inline scene,</span> in exactly the same manner as any node defined <span title="Mantis 1470" style="background-color:yellow">locally</span> with DEF.</li><li style="margin-top:4px"><span 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 title="Mantis 1470" style="background-color:yellow">be referenced</span> <span 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 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 title="Mantis 1470" style="background-color:yellow;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="font-family:Verdana,Arial,Helvetica,sans-serif">The following example illustrates the use of the IMPORT statement (Classic VRML encoding syntax):</p><p style="margin-top:18px;margin-bottom:18px;font-family:univers,arial,sans-serif"><span title="editorial" style="background-color:yellow">EXAMPLE</span></p><pre style="margin-left:15px">DEF <span title="Mantis 1470" style="background-color:yellow">MyInline</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">I1</span> Inline {
  url "someurl.x3d"
}
IMPORT <span title="Mantis 1470" style="background-color:yellow">MyInline.rootTransform AS ImportedTransform</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">I1.rootTransform AS I1Root</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">...</span>
<span 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 title="Mantis 1470" style="background-color:yellow">{ }</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">{ ... }</span>
ROUTE PI.value_changed TO <span title="Mantis 1470" style="background-color:yellow">ImportedTransform.set_translation</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">I1Root.set_translation</span>
</pre><div title="Mantis 1470" style="background-color:yellow;font-family:Verdana,Arial,Helvetica,sans-serif"><pre 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="font-family:Verdana,Arial,Helvetica,sans-serif">In the above example,</p><ul style="font-family:Verdana,Arial,Helvetica,sans-serif"><li style="margin-top:4px"><span style="font-family:monospace">rootTransform</span> is <span 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 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" target="_blank">4.4.6 Import/Export semantics</a>).</span></li><li style="margin-top:4px">The optional AS keyword <span title="Mantis 1470" style="background-color:yellow">in the IMPORT statement</span> defines an alias for <span title="Mantis 1470" style="background-color:yellow">the <span style="font-family:monospace">MyInline.rootTransform</span></span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through"><span style="font-family:monospace">rootTransform</span></span> <span title="Mantis 1470" style="background-color:yellow">DEF.</span> <span 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 title="Mantis 1470" style="background-color:yellow">AS alias name <span style="font-family:monospace">ImportedTransform</span>.</span> <span title="Mantis 1470" style="background-color:orange;text-decoration-line:line-through">DEF name <span style="font-family:monospace">I1Root</span>.</span></li></ul><p style="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="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"><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>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br></div></blockquote></div><br></div></div></blockquote></div>