<div dir="ltr"><div dir="ltr">First "bug" report:<div><br></div><div><div>$ py JoeKick.py</div><div>x3d.py package 4.0.64.4 loaded, have fun with X3D Graphics!</div><div>Self-test diagnostics for JoeKick.py:</div><div>meta information, TODO: Record information about skin coordinates (found in comment at end of scene) as a structured MetadataSet containing MetadataString nodes</div><div>Traceback (most recent call last):</div><div> File "C:\Users\john\X3DJSONLD\blend\JoeKick.py", line 715, in <module></div><div> newModelXML= newModel.XML() # test export method XML() for exceptions during export</div><div> ^^^^^^^^^^^^^^</div><div> File "C:\Users\john\x3d-python-mod\x3dcf.py", line 14985, in XML</div><div> result += str(self.Scene.XML(indentLevel=indentLevel+1, syntax=syntax))</div><div> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div> File "C:\Users\john\x3d-python-mod\x3dcf.py", line 14494, in XML</div><div> result += each.XML(indentLevel=indentLevel+1, syntax=syntax)</div><div> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div> File "C:\Users\john\x3d-python-mod\x3dcf.py", line 45024, in XML</div><div> result += each.XML(indentLevel=indentLevel+1, syntax=syntax, field="children")</div><div> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>TypeError: ROUTE.XML() got an unexpected keyword argument 'field'</div></div><div><br></div><div>I have to take a half hour off volunteering, I hope to be back soon.</div><div><br></div><div>John</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 1, 2023 at 12:22 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@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">Thanks for giving this a try ! Glad to hear it could be useful,<br>
<br>
Andreas<br>
<br>
> Message: 2<br>
> Date: Wed, 1 Nov 2023 11:16:24 -0400<br>
> From: Vincent Marchetti <<a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.com</a>><br>
> To: X3D-Public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
> Subject: Re: [x3d-public] x3d.py roundtrip for Metadata nodes in v.3.3<br>
> and v.4.0<br>
> Message-ID: <<a href="mailto:38B8549E-944D-460F-B5D7-31BC73721015@kshell.com" target="_blank">38B8549E-944D-460F-B5D7-31BC73721015@kshell.com</a>><br>
> Content-Type: text/plain; charset="us-ascii"<br>
><br>
> Thank you Andreas, The x3dcf.py module is a useful tool for generating X3D XML encoding for those scenes which require the containerField xml attribute to unambiguously assign XML elements to the different X3D fields of the parent XML element.<br>
><br>
> I ran an example Python script for generating a MetadataSet node that required containerField for accurat XML encoding and the correct result is in the GeneratedCalendarMetadataWithCF.x3d file attached.<br>
><br>
> The pertinent accurate encoding is:<br>
> ------<br>
> <WorldInfo><br>
> <MetadataSet containerField='metadata' name='birthday' reference='<a href="https://www.archives.gov/legislative/features/washington" rel="noreferrer" target="_blank">https://www.archives.gov/legislative/features/washington</a>'><br>
> <MetadataString containerField='metadata' name='calendar' value='"Julian"'/><br>
> <MetadataInteger containerField='value' name='day' value='11'/><br>
> <MetadataInteger containerField='value' name='month' value='2'/><br>
> <MetadataInteger containerField='value' name='year' value='1731'/><br>
> </MetadataSet><br>
> </WorldInfo><br>
><br>
> -----<br>
><br>
> Vince Marchetti<br>
><br>
> -------------- next part --------------<br>
> A non-text attachment was scrubbed...<br>
> Name: GenerateCalendarMetadataWithCF.py<br>
> Type: text/x-python-script<br>
> Size: 791 bytes<br>
> Desc: not available<br>
> URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231101/1383c745/attachment-0001.bin" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231101/1383c745/attachment-0001.bin</a>><br>
> -------------- next part --------------<br>
> A non-text attachment was scrubbed...<br>
> Name: GeneratedCalendarMetadataWithCF.x3d<br>
> Type: model/x3d+xml<br>
> Size: 920 bytes<br>
> Desc: not available<br>
> URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231101/1383c745/attachment-0001.x3d" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231101/1383c745/attachment-0001.x3d</a>><br>
> -------------- next part --------------<br>
><br>
><br>
> > On Nov 1, 2023, at 10:23 AM, Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:<br>
> ><br>
> > A quick update:<br>
> ><br>
> > On Tue, Oct 31, 2023 at 3:49?PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:<br>
> >><br>
> >> Notes:<br>
> >><br>
> >> x3d.py is autogenerated from X3DUOM:<br>
> >><br>
> >> <a href="https://www.web3d.org/x3d/stylesheets/python/python.html#autogeneration" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/stylesheets/python/python.html#autogeneration</a><br>
> >> <a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt" rel="noreferrer" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt</a><br>
> >><br>
> >> X3DUOM has all necessary containerField default value information.<br>
> >><br>
> >> But the first step may be to modify the stylesheet to generate<br>
> >> containerField attributes for all nodes, for simplicity. It looks like<br>
> >> the .XML() function would have to have an additional parameter 'field'<br>
> >> X3D(indentLevel, syntax, field) for each node.<br>
> >><br>
> >> Postprocessing the generated XML is not possible since information was<br>
> >> irretrievably lost. But postprocessing the autogenerated x3d.py python<br>
> >> code may be possible since xslt is not for everyone.<br>
> ><br>
> > As a proof of concept I hacked a short awk (since I know it) script to<br>
> > process the latest x3d.py to include containerField support:<br>
> ><br>
> > <a href="https://github.com/andreasplesch/x3d-python-mod/blob/main/src/cfXML.awk" rel="noreferrer" target="_blank">https://github.com/andreasplesch/x3d-python-mod/blob/main/src/cfXML.awk</a><br>
> ><br>
> > It looks for the Concrete Nodes section, adds a field parameter to the<br>
> > .XML() output function, adds the containerField attribute to the<br>
> > output, and adds the field parameter to the .XML() calls for metadata,<br>
> > SFNode and MFNode field processing.<br>
> > The awk script is very brittle since it relies on comments in x3d.py<br>
> > to find the appropriate lines to modify. The hardest part was to get<br>
> > the quoting and escaping correct.<br>
> > It generates containerField attributes for all SF/MFNode fields except<br>
> > 'children'. Of course, most are unnecessary but filtering<br>
> > systematically for defaults would probably require involving X3DUOM<br>
> > and the generation stylesheet, similar to other XML related 'fields'<br>
> > such as style or class.<br>
> ><br>
> > The result is <a href="https://raw.githubusercontent.com/andreasplesch/x3d-python-mod/main/x3dcf.py" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/andreasplesch/x3d-python-mod/main/x3dcf.py</a><br>
> ><br>
> > The modified python script appears to work as expected by adding the<br>
> > appropriate containerField attributes in XML output for all the<br>
> > examples I tried.<br>
> > Realistically, this is as far as I can go with this but I think it may<br>
> > show how containerField support in XML output could be provided with<br>
> > x3d.py.<br>
> ><br>
> > -Andreas<br>
> ><br>
> > _______________________________________________<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>
><br>
><br>
> ------------------------------<br>
><br>
> Message: 3<br>
> Date: Wed, 1 Nov 2023 11:05:29 -0500<br>
> From: John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>><br>
> To: Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br>
> Cc: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
> Subject: Re: [x3d-public] x3d.py roundtrip for Metadata nodes in v.3.3<br>
> and v.4.0<br>
> Message-ID:<br>
> <CAGC3UEkYxP0tk5rQ23VVhsd0gXW7W+AH5QaS=<a href="mailto:AWxkv0f8kgo1Q@mail.gmail.com" target="_blank">AWxkv0f8kgo1Q@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> You are awesome, Andreas! Awk would not have been my choice, but<br>
> apparently, you made it work! Perhaps I will make a Perl script based on<br>
> your awk. A python script could be written to process X3DUOM and probably<br>
> do the matching as well.<br>
><br>
> Dang cool!<br>
><br>
> On Wed, Nov 1, 2023 at 9:24 AM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br>
> wrote:<br>
><br>
> > A quick update:<br>
> ><br>
> > On Tue, Oct 31, 2023 at 3:49?PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br>
> > wrote:<br>
> > ><br>
> > > Notes:<br>
> > ><br>
> > > x3d.py is autogenerated from X3DUOM:<br>
> > ><br>
> > > <a href="https://www.web3d.org/x3d/stylesheets/python/python.html#autogeneration" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/stylesheets/python/python.html#autogeneration</a><br>
> > ><br>
> > <a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt" rel="noreferrer" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt</a><br>
> > ><br>
> > > X3DUOM has all necessary containerField default value information.<br>
> > ><br>
> > > But the first step may be to modify the stylesheet to generate<br>
> > > containerField attributes for all nodes, for simplicity. It looks like<br>
> > > the .XML() function would have to have an additional parameter 'field'<br>
> > > X3D(indentLevel, syntax, field) for each node.<br>
> > ><br>
> > > Postprocessing the generated XML is not possible since information was<br>
> > > irretrievably lost. But postprocessing the autogenerated x3d.py python<br>
> > > code may be possible since xslt is not for everyone.<br>
> ><br>
> > As a proof of concept I hacked a short awk (since I know it) script to<br>
> > process the latest x3d.py to include containerField support:<br>
> ><br>
> > <a href="https://github.com/andreasplesch/x3d-python-mod/blob/main/src/cfXML.awk" rel="noreferrer" target="_blank">https://github.com/andreasplesch/x3d-python-mod/blob/main/src/cfXML.awk</a><br>
> ><br>
> > It looks for the Concrete Nodes section, adds a field parameter to the<br>
> > .XML() output function, adds the containerField attribute to the<br>
> > output, and adds the field parameter to the .XML() calls for metadata,<br>
> > SFNode and MFNode field processing.<br>
> > The awk script is very brittle since it relies on comments in x3d.py<br>
> > to find the appropriate lines to modify. The hardest part was to get<br>
> > the quoting and escaping correct.<br>
> > It generates containerField attributes for all SF/MFNode fields except<br>
> > 'children'. Of course, most are unnecessary but filtering<br>
> > systematically for defaults would probably require involving X3DUOM<br>
> > and the generation stylesheet, similar to other XML related 'fields'<br>
> > such as style or class.<br>
> ><br>
> > The result is<br>
> > <a href="https://raw.githubusercontent.com/andreasplesch/x3d-python-mod/main/x3dcf.py" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/andreasplesch/x3d-python-mod/main/x3dcf.py</a><br>
> ><br>
> > The modified python script appears to work as expected by adding the<br>
> > appropriate containerField attributes in XML output for all the<br>
> > examples I tried.<br>
> > Realistically, this is as far as I can go with this but I think it may<br>
> > show how containerField support in XML output could be provided with<br>
> > x3d.py.<br>
> ><br>
> > -Andreas<br>
> ><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231101/59b1f34d/attachment.html" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231101/59b1f34d/attachment.html</a>><br>
><br>
> ------------------------------<br>
><br>
> Subject: Digest Footer<br>
><br>
> _______________________________________________<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>
><br>
><br>
> ------------------------------<br>
><br>
> End of x3d-public Digest, Vol 176, Issue 4<br>
> ******************************************<br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
</blockquote></div>