[X3D-Ecosystem] Fixing DEF/USE in Python(Serializer)
John Carlson
yottzumm at gmail.com
Mon Aug 25 12:34:16 PDT 2025
Let me know of any updates, my brain is back 2+ years ago. I’m working on
a Python based renderer (no X3D encodings), and sometimes, I want to output
XML and VRML from Python to check the scene, and potentially others will
too. I have 2 struggles, containerFields (another message) and DEF/USE
ordering on output.
Most likely, the best approach is to remove USE, and use variables instead
in my python. But yes, we also need logic in x3d.py output to add USE and
possibly different containerFields appropriately. Maybe using Andreas’s
kwargs branch is best???
https://github.com/andreasplesch/x3d-python-mod/tree/kwargs
Using variables is not common in X3dToPython.xslt output (yes, it uses
parameters), but it’s extremely common in my PythonSerializer.js output, so
I’m guessing that X3dToPython.xslt restructures the scenegraph output to
conform to x3d.py output. That seems extremely messy, but perhaps that’s
the power of XSLT.
How do we propagate solutions in x3d-tidy and Castle to other systems? I’m
hearing that Castle is working on a Python solution? Will it work with the
x3d.py API?
Who else wants to write python that generates good VRML and XML? Do we
have to design our Python (or possibly source JSON and XML) according to
how x3d.py outputs fields? That would be okay, perhaps?
How dow we attach different containerFields to the same scenegraph node?
John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20250825/909e4d90/attachment.html>
More information about the X3D-Ecosystem
mailing list