[x3d-public] Insights? PyJNIus and SceneObject in X3DJSAIL. Addition of Metadata to scene causes addChild to fail

Don Brutzman brutzman at nps.edu
Fri Mar 16 12:48:33 PDT 2018


Great recommendation John, thanks.  It works.

These overloaded methods have been renamed to SceneObject.addMetadata and SceneObject.addLayerSet respectively.

http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/SceneObject.html#addMetadata-org.web3d.x3d.sai.Core.X3DMetadataObject-
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/SceneObject.html#addLayerSet-org.web3d.x3d.jsail.Layering.LayerSetObject-

HelloWorldJava modified accordingly, smoke testing successful.  Build deployed and changes checked in.  Online at

	X3D Java Scene Access Interface Library (X3DJSAIL)
	supports programmers with standards-based X3D Java interfaces and objects, all as open source.
	http://www.web3d.org/specifications/java/X3DJSAIL.html


On 3/14/2018 10:25 AM, John Carlson wrote:
> There are 3 addChild methods in SceneObject.java in X3DJSAIL:
> 
>          public SceneObject addChild(X3DChildNode newValue)
> 
>          public SceneObject addChild(X3DMetadataObject newValue)
> 
>          public SceneObject addChild(LayerSetObject newValue)
> 
> python x3domflowers.py
> 
> Traceback (most recent call last):
> 
>    File "x3domflowers.py", line 40, in <module>
> 
>      Scene7.addChild(NavigationInfo8)
> 
>    File "jnius\jnius_export_class.pxi", line 906, in jnius.JavaMultipleMethod.__call__ (jnius\jnius.c:29116)
> 
>    File "jnius\jnius_export_class.pxi", line 632, in jnius.JavaMethod.__call__ (jnius\jnius.c:25465)
> 
>    File "jnius\jnius_conversion.pxi", line 68, in jnius.populate_args (jnius\jnius.c:8422)
> 
>    File "jnius\jnius_utils.pxi", line 207, in jnius.check_assignable_from (jnius\jnius.c:5712)
> 
> jnius.JavaException: Invalid instance of 'org/web3d/x3d/jsail/Navigation/NavigationInfoObject' passed for a 'org/web3d/x3d/sai/Core/X3DMetadataObject'
> 
> I am wondering if we can make the second and third methods above addMetadata() and addLayerSet()?
> 
> Thanks!
> 
> John


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman




More information about the x3d-public mailing list