[X3D-Ecosystem] import X3D Python binding into Blender, Export X3D Python binding out of Blender

John Carlson yottzumm at gmail.com
Tue Jan 27 03:35:10 PST 2026


I know this is controversial, but hear me out.

Why not just do a dynamic import of X3D Python binding (X3DPSAIL) models
into Blender, and have the importer map the X3D scene graph to Blender?  No
XML, JSON, VRML, etc.

Also, just export X3D Python binding code (X3DPSAIL) from Blender models.
Then we can run the python to create VRML, XML, etc.

Similarly, we can convert XML to Python, and different encodings to XML.

The missing link appears to the X3DPSAIL to Blender mapping, which is
currently encoded in the importers/exporters that we have.  Aaron is
studying the Blender API.  I can't really do that successfully.  I think
it's critical to create a mapping specification for posterity.  I think
that Aaron, Doug, NIST or Don or others may be best able to do that.  I can
help a little with armature and vertex groups.

I do not know if this is possible, but look at this code I did in Java:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/java/net/coderextreme/visitor/X3DElement.java


The whole folder is generated code. I can probably easily generate a
visitor pattern for Python, possibly separate from X3DPSAIL.  We just have
to know what to do for each node in the scenegraph.

and:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/java/net/coderextreme/Remove.java

This allows you to remove nodes from the scene graph.

The way the Python models are exported from X3DJSAIL and stylesheets,  It's
comparable to XML and VRML.  Maybe we could make a Python X3D encoding for
safety?

I think at this point, we start with a small python example, say just a
sphere with different colors, lighting and materials, and try to create a
mapping to Blender.  Perhaps HelloWorld.py will do:

web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.py
<https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.py>

I think what we may want to do is just change the x3d import at the top to
something like what does the Blender Python API loading.  We may have 2
hierarchies, one for import and one for export.

IDK.  I'm a dummy.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20260127/bc04269b/attachment.html>


More information about the X3D-Ecosystem mailing list