[x3d-public] x3d.py, X3dToPython.xslt issues

John Carlson yottzumm at gmail.com
Fri Jul 23 21:44:21 PDT 2021


Comments look like this in generated python code from X3dToPython.xslt:

          #
                     <ProgramShader DEF='ProgramShader' 
containerField='shaders' language='GLSL'>
                         <ShaderProgram url='"../shaders/freewrl.vs" 
"https://coderextreme.net/X3DJSONLD/src/main/shaders/freewrl.vs"' 
containerField='programs' typ
e='VERTEX'>
                         <field name='chromaticDispertion' 
accessType='initializeOnly' type='SFVec3f' value='0.98 1 1.033'/>
                         <field name='bias' accessType='initializeOnly' 
type='SFFloat' value='0.5'/>
                         <field name='scale' accessType='initializeOnly' 
type='SFFloat' value='0.5'/>
                         <field name='power' accessType='initializeOnly' 
type='SFFloat' value='2'/>
                         </ShaderProgram>
                         <ShaderProgram url='"../shaders/freewrl.fs" 
"https://coderextreme.net/X3DJSONLD/src/main/shaders/freewrl.fs"' 
containerField='programs' typ
e='FRAGMENT'/>
                     </ProgramShader>

           #


The whole block should be commented out.

===========================================

This appears to be a common issue.  I don't know a patch at this time.


$ python x3domflowers.py
Traceback (most recent call last):
   File "x3domflowers.py", line 21, in <module>
     from x3d import *
AttributeError: module 'x3d' has no attribute 'SFBool'

=========================================

I suggest you add instructions for setting up a virtual environment in 
README.md.  I already had one, I just had to enable it to install new 
x3d.py.


I'm using x3dpsail version 4.0.40.

=============================

I am upgrading X3DJSAIL-Python as well, patching for Linux, etc.

I wiped out my system trying to upgrade my python.   Do NOT uninstall 
python from your system. Use a virtual environment.

Thanks!

John




More information about the x3d-public mailing list