[x3d-public] motionsEnabled both as element and attribute?

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Thu Nov 16 12:42:38 PST 2023


X3D nodes map to XML elements.

X3D fields each have one of the simple types.

XML elements are not XML attributes.

The X3D 4.0 Architecture specification is authoritative and complete, it is not being deleted or changed.

 

*	X3D 4.0 Architecture, clause 26 Humanoid Animation (HAnim) component, 26.3.2 HAnimHumanoid
*	https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/components/hanim.html#HAnimHumanoid

 

 

HAnimHumanoid : X3DChildNode, X3DBoundedObject {

 

  MFBool     [in,out] motionsEnabled        []

 

 

This states that motionsEnabled is an MFBool field in the HAnimHumanoid node, with a default value being the empy.

 

HAnim functionality is described by the HAnim specification.

 

*	6.4 Extended definition of Humanoid object
*	https://www.web3d.org/documents/specifications/19774/V2.0/MotionDataAnimation/MotionNodes.html#HumanoidObjectExtension

 

The motions field contains a list of references, one for each Motion object that is to be applied to the Humanoid object. The order in which the motions are listed does not affect animation behaviour since the names and corresponding channels of the target Joint objects are stored in the Motion objects themselves. Motion objects are enabled by default, unless otherwise indicated by the corresponding Boolean entry in the motionsEnabled field.

 

The motionsEnabled field contains a list of Boolean values which indicate whether the corresponding Motion object is active. The order of values in the motionsEnabled field shall correspond exactly to the the order of the Motion objects listed in the motions field. Excess motionsEnabled values shall be ignored. Note that the corresponding Motion object's enabled field shall also be true for object animation to occur.

 

The X3D Tooltips also provide specification links and simple descriptions, along with hints and warnings.

 

*	https://www.web3d.org/x3d/content/X3dTooltips.html#HAnimHumanoid.motionsEnabled

 

The blocks you have excerpted are from the X3D schema, written in the XSD schema language, which provides a special syntax for defining data-structure elements and attributes.  That is used for model validation, and no one needs to check those definitions unless you want to become an XML Schema expert.

 

Holger sent two sets of fixes to X3DUOM – thanks again!  I was able to finish the first set of X3DUOM errata, but not yet the second.  Please rest assured that I will fix it eventually, sorry but that is not yet possible for me to accomplish yet.  Maybe in another week or two.

 

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 https://faculty.nps.edu/brutzman

 

From: John Carlson <yottzumm at gmail.com> 
Sent: Thursday, November 16, 2023 8:24 AM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>; Joe D Williams <joedwil at earthlink.net>; Holger Seelig <holger.seelig at gmail.com>
Subject: motionsEnabled both as element and attribute?

 

Don, Joe, in XML Schema, motionsEnabled both an element and attribute?  An element of type MFBool????  motionsEnabled is an MFBool per the standard, not an MFNode. It *could* be an MFNode, if that's what's decided. I think Joe's tendency is to delete it from the standard.

 

Clarify, or fix, please. I didn't read all of Holger's list.

 

$ grep motionsEnabled specifications/x3d-4.0.xsd

            <xs:enumeration value="motionsEnabled"/>

                <xs:element name="motionsEnabled" type="MFBool" fixed="inputOutputField" default=""/>

                    <xs:attribute name="motionsEnabled" type="MFBool"/>

 

It's the only MF element that isn't type MFNode???

 

$ grep element specifications/x3d-4.0.xsd |grep MF|grep -v MFNode

                <xs:element name="motionsEnabled" type="MFBool" fixed="inputOutputField" default=""/>

 

Clearly, it appears like something needs to be fixed?

 

https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/components/hanim.html#HAnimHumanoid

 

MFBool here and there:

 

HAnimHumanoid : X3DChildNode, X3DBoundedObject {
  SFVec3f    [in,out] center                0 0 0    (-∞,∞)
  SFString   [in,out] description           ""
  SFBool     [in,out] bboxDisplay           FALSE
  MFString   [in,out] info                  []
  MFVec3f    [in,out] jointBindingPositions []       (-∞,∞)
  MFRotation [in,out] jointBindingRotations []       [-1,1] or (-∞,∞)
  MFVec3f    [in,out] jointBindingScales    []       (0,∞)
  MFNode     [in,out] joints                []       [HAnimJoint]
  SFInt32    [in,out] loa                   -1       [-1,4]
  SFNode     [in,out] metadata              NULL     [X3DMetadataObject]
  MFNode     [in,out] motions               []       [HAnimMotion]
  MFBool     [in,out] motionsEnabled        []
  SFString   [in,out] name                  ""
  SFRotation [in,out] rotation              0 0 1 0  [-1,1] or (-∞,∞)
  SFVec3f    [in,out] scale                 1 1 1    (0,∞)
  SFRotation [in,out] scaleOrientation      0 0 1 0  [-1,1] or (-∞,∞)
  MFNode     [in,out] segments              []       [HAnimSegment]
  MFNode     [in,out] sites                 []       [HAnimSite]
  SFString   [in,out] skeletalConfiguration "BASIC"
  MFNode     [in,out] skeleton              []       [HAnimJoint, HAnimSite]
  MFNode     [in,out] skin                  []       [Group, LOD, Shape, Switch, Transform, IndexedFaceSet, IndexedFanSet, IndexedLineSet, IndexedQuadSet, IndexedTriangleSet, IndexedTriangleStripSet]
  SFNode     [in,out] skinBindingCoords     NULL     [Coordinate|CoordinateDouble]
  SFNode     [in,out] skinBindingNormals    NULL     [X3DNormalNode]
  SFNode     [in,out] skinCoord             NULL     [Coordinate|CoordinateDouble]
  SFNode     [in,out] skinNormal            NULL     [X3DNormalNode]
  SFVec3f    [in,out] translation           0 0 0    (-∞,∞)
  SFString   [in,out] version               "2.0"    ["2.0"] 
  MFNode     [in,out] viewpoints            []       [HAnimSite]
  SFBool     [in,out] visible               TRUE
  SFVec3f    []       bboxCenter            0 0 0    (-∞,∞)
  SFVec3f    []       bboxSize              -1 -1 -1 [0,∞) or −1 −1 −1
}
 
Please fix asap, as this affects X3DUOM which affects x3d.py which affects the Blender exporter.  A patch to avoid duplicate fields.
 
Thanks!
 
Feel free to forward to x3d-public.  I'll download a published schema.
 
Also, X3DUOM has 2 motionEnabled fields, which is what I caught.
 
New changes XML schema, 2 of which, I'll have to reapply.
 
$ svn diff x3d-4.0.xsd
Index: x3d-4.0.xsd
===================================================================
--- x3d-4.0.xsd (revision 35721)
+++ x3d-4.0.xsd (working copy)
@@ -20025,7 +20025,6 @@
         <xs:annotation>
             <xs:appinfo>
                 <xs:element name="joints" type="MFNode" fixed="inputOutputField" default="HAnimJoint"/>
-                <xs:element name="motionsEnabled" type="MFBool" fixed="inputOutputField" default=""/>
                 <xs:element name="segments" type="MFNode" fixed="inputOutputField" default="HAnimSegment"/>
                 <xs:element name="sites" type="MFNode" fixed="inputOutputField" default="HAnimSite"/>
                 <xs:element name="skeleton" type="MFNode" fixed="inputOutputField" default="HAnimJoint|HAnimSite"/>
@@ -20292,7 +20291,7 @@
         <xs:complexType>
             <xs:complexContent>
                 <xs:extension base="X3DChildNode">
-                    <xs:attribute name="channels" type="MFString"/>
+                    <xs:attribute name="channels" type="SFString"/>
                     <xs:attribute name="channelsEnabled" type="MFBool"/>
                     <xs:attribute name="description" type="SFString"/>
                     <xs:attribute name="enabled" type="SFBool" default="false"/>
@@ -20318,7 +20317,7 @@
                             </xs:restriction>
                         </xs:simpleType>
                     </xs:attribute>
-                    <xs:attribute name="joints" type="MFString"/>
+                    <xs:attribute name="joints" type="SFString"/>
                     <xs:attribute name="loa" type="loaType" default="-1"/>
                     <xs:attribute name="loop" type="SFBool" default="false"/>
                     <xs:attribute name="name" type="xs:NMTOKEN">
@@ -26614,4 +26613,4 @@
         </xs:complexType>
     </xs:element>
     <!--======================================================================-->
-</xs:schema>
\ No newline at end of file
+</xs:schema>
 
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/components/hanim.html#HAnimMotion
 
See correct field types (not MFString) below:

26.3.4 HAnimMotion

HAnimMotion : X3DChildNode {
  SFBool   [in]     next
  SFBool   [in]     previous
  SFString [in,out] channels         ""
  MFBool   [in,out] channelsEnabled  []
  SFString [in,out] description      ""
  SFBool   [in,out] enabled          TRUE
  SFInt32  [in,out] endFrame         0      [0,∞)
  SFTime   [in,out] frameDuration    0.1    (0,∞)
  SFInt32  [in,out] frameIncrement   1      (-∞,∞)
  SFInt32  [in,out] frameIndex       0      [0,∞)
  SFString [in,out] joints           ""                  
  SFInt32  [in,out] loa              -1     [-1,4]
  SFBool   [in,out] loop             FALSE
  SFNode   [in,out] metadata         NULL   [X3DMetadataObject]
  SFString [in,out] name             ""
  SFInt32  [in,out] startFrame       0      [0,∞)
  MFFloat  [in,out] values           []     (-∞,∞)
  SFTime   [out]    cycleTime               [0,∞)
  SFTime   [out]    elapsedTime             (0,∞)
  SFInt32  [out]    frameCount              [0,∞)
}
Please call +1-712-369-1032 to discuss other changes to XML Schema or schedule a meeting.
These are MFString/SFString issues in HAnimMotion which I realize may have some backwards compatibility.
This affects VRML output from x3d.py and parsing with view3dscene.
John

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231116/0fbf3b96/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231116/0fbf3b96/attachment-0001.p7s>


More information about the x3d-public mailing list