[X3D-Ecosystem] XML is dead for x3.py
John Carlson
yottzumm at gmail.com
Mon Aug 25 21:37:58 PDT 2025
I have used the ant target
ant create.X3DPSAIL to create x3d.py, then applied the awk script I just
sent.
I'm running a full regression test with the new x3d.py soon. I'm
currently doing Java compilation. Python is last.
I've run some tests with my PythonSerializer in the mean time,and caught
some bugs in it, but I should have plenty of Python waiting for me to test
now.
I'm off.
John
On Mon, Aug 25, 2025 at 11:34 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:
>
>
> On Mon, Aug 25, 2025, 8:12 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> Okay. I've applied the awk script to
>>
>> x3d / Code / [r37479]
>> /www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt
>> <https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt>
>>
>> And
>>
>> x3d / Code / [r37479] /www.web3d.org/x3d/stylesheets/python/x3d.py
>> <https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/python/x3d.py>
>>
>> Here are the diffs. If you need the modified x3d.py or stylesheet, let
>> me know.
>>
>> AFAICT, the awk scripts between the main branch and the kwargs branch
>> were identical.
>>
>
>
>
>> I'm going to pursue the containerField issue first, I don't know what's
>> necessary to produce a x3d.py with kwargs in it. I've got something to
>> sort the skeleton field first, that's my primary concern.
>>
>
> You would transform the x3duom xml with the modified x3duomToPython xslt
> to get x3d.py .
>
>>
>> Thanks!
>>
>> John
>>
>> On Mon, Aug 25, 2025 at 10:15 AM Andreas Plesch <andreasplesch at gmail.com>
>> wrote:
>>
>>> Here are my attempts to add containerField output:
>>>
>>> https://github.com/andreasplesch/x3d-python-mod/tree/main
>>>
>>> The awk script modifies x3d.py and is very brittle.
>>>
>>> It looks like I chose an MIT license which essentially means no
>>> restrictions of any kind but happy to do whatever may be necessary.
>>>
>>> This modifications will add a containerField attribute to all nodes
>>> (other than children?) which is probably considered too noisy. Perhaps
>>> there could be postprocessing to check for defaults.
>>>
>>> Here is a cool live environment to play with x3d.py which includes the
>>> files:
>>>
>>>
>>> https://mybinder.org/v2/gh/spyder-ide/binder-environments/spyder-stable?urlpath=git-pull%3Frepo%3Dhttps%3A%2F%2Fgithub.com%2Fandreasplesch%2Fx3d-python-mod%26urlpath%3Ddesktop%26branch%3Dmain
>>>
>>> Just copy x3dcf.py into the test directory.
>>>
>>> Separately, the kwargs branch also includes an effort to preserve node
>>> order from the python arguments in the xml output which is important for
>>> DEF/USE.
>>>
>>> Cheers, -Andreas
>>>
>>>
>>>
>>>
>>> On Mon, Aug 25, 2025 at 2:15 AM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> I’m having major problems with having to hand edit X3D XML HAnim files
>>>> output from x3d.py (X3DPSAIL) to that need to have containerField
>>>> attributes for them to render.
>>>>
>>>> Sure, I could probably do a patch of the stylesheet,
>>>>
>>>> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3duomToX3dPythonPackage.xslt following
>>>> Andreas’ lead.
>>>>
>>>> But really we want these changes upstreamed. Can someone arrange with
>>>> Andreas to license his code for inclusion in x3d.py?
>>>>
>>>> Meanwhile, I will probably choose to use VRML output, with my patch
>>>> which converts the children field to the appropriate field: skin, joints,
>>>> skeleton, etc.
>>>>
>>>> Bye, bye, XML. Hello, VRML.
>>>>
>>>> John
>>>>
>>>
>>>
>>> --
>>> Andreas Plesch
>>> Waltham, MA 02453
>>>
>> Andreas Plesch
> Waltham, MA 02453
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20250825/d2866183/attachment-0001.html>
More information about the X3D-Ecosystem
mailing list