0

オブジェクト階層を X3D ファイルから Blender 2.63 ワークスペースにインポートする方法を探しています。\Blender\2.63\scripts\addons\io_scene_x3d\import_x3d.py に Python インポーター モジュールがあることは知っています。

PREF_FLATパラメータを変更するとTrue、変換ノードの階層が作成されることがわかりました。しかし、それだけでは何も表示されません。

def load(operator, context, filepath="", global_matrix=None):

    load_web3d(filepath,
               PREF_FLAT=False,
               PREF_CIRCLE_DIV=16,
               global_matrix=global_matrix,
               )

    return {'FINISHED'}

誰かがすべてのノードを適切に表示する方法を知っていますか?

X3D シーンの例

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' >
<head> 
</head>
<Scene>
<Transform DEF='dad_Arm'
 translation='0 5 0'>
 <Transform DEF='dad_IndexedFaceSet2'
  containerField='children'
  translation='0 -5 0'>
  <Shape DEF='IndexedFaceSet2'
   containerField='children'>
   <Appearance
    containerField='appearance'>
    <Material DEF='Shiny_Blue'
     containerField='material'
     ambientIntensity='0.200'
     shininess='0.100'
     diffuseColor='0 0 1'
     specularColor='0 0 1'/>
   </Appearance>
   <IndexedFaceSet DEF='GeoIndexedFaceSet2'
    containerField='geometry'
    creaseAngle='0.524'
    coordIndex='
      0 16 1 -1
      1 16 2 -1
      2 16 3 -1
      3 16 4 -1
      4 16 5 -1
      5 16 6 -1
      6 16 7 -1
      7 16 8 -1
      8 16 9 -1
      9 16 10 -1
      10 16 11 -1
      11 16 12 -1
      12 16 13 -1
      13 16 14 -1
      14 16 15 -1
      15 16 0 -1
      18 33 17 -1
      19 33 18 -1
      20 33 19 -1
      21 33 20 -1
      22 33 21 -1
      23 33 22 -1
      24 33 23 -1
      25 33 24 -1
      26 33 25 -1
      27 33 26 -1
      28 33 27 -1
      29 33 28 -1
      30 33 29 -1
      31 33 30 -1
      32 33 31 -1
      17 33 32 -1
      0 18 17 -1
      18 0 1 -1
      1 19 18 -1
      19 1 2 -1
      2 20 19 -1
      20 2 3 -1
      3 21 20 -1
      21 3 4 -1
      4 22 21 -1
      22 4 5 -1
      5 23 22 -1
      23 5 6 -1
      6 24 23 -1
      24 6 7 -1
      7 25 24 -1
      25 7 8 -1
      8 26 25 -1
      26 8 9 -1
      9 27 26 -1
      27 9 10 -1
      10 28 27 -1
      28 10 11 -1
      11 29 28 -1
      29 11 12 -1
      12 30 29 -1
      30 12 13 -1
      13 31 30 -1
      31 13 14 -1
      14 32 31 -1
      32 14 15 -1
      15 17 32 -1
      17 15 0 -1'>
    <Coordinate DEF='IndexedFaceSet2_Coord'
     containerField='coord'
     point='
      0 5.1 10
      .03827 5.09239 10
      .07071 5.07071 10
      .09239 5.03827 10
      .1 5 10
      .09239 4.96173 10
      .07071 4.92929 10
      .03827 4.90761 10
      -0 4.9 10
      -.03827 4.90761 10
      -.07071 4.92929 10
      -.09239 4.96173 10
      -.1 5 10
      -.09239 5.03827 10
      -.07071 5.07071 10
      -.03827 5.09239 10
      0 5 10
      0 5.1 0
      .03827 5.09239 0
      .07071 5.07071 0
      .09239 5.03827 0
      .1 5 0
      .09239 4.96173 0
      .07071 4.92929 0
      .03827 4.90761 0
      -0 4.9 0
      -.03827 4.90761 0
      -.07071 4.92929 0
      -.09239 4.96173 0
      -.1 5 0
      -.09239 5.03827 0
      -.07071 5.07071 0
      -.03827 5.09239 0
      0 5 0'/>
   </IndexedFaceSet>
  </Shape>
 </Transform>
</Transform>
<Transform DEF='dad_Base'
 rotation='0 -1 0 1.571'>
 <Transform DEF='dad_IndexedFaceSet3'
  containerField='children'
  rotation='0 1 0 1.571'>
  <Shape DEF='IndexedFaceSet3'
   containerField='children'>
   <Appearance
    containerField='appearance'>
    <Material DEF='Shiny_Green'
     containerField='material'
     ambientIntensity='0.200'
     shininess='0.100'
     diffuseColor='0 1 0'
     specularColor='0 1 0'/>
   </Appearance>
   <IndexedFaceSet DEF='GeoIndexedFaceSet3'
    containerField='geometry'
    creaseAngle='0.524'
    coordIndex='
      1 16 0 -1
      2 16 1 -1
      3 16 2 -1
      4 16 3 -1
      5 16 4 -1
      6 16 5 -1
      7 16 6 -1
      8 16 7 -1
      9 16 8 -1
      10 16 9 -1
      11 16 10 -1
      12 16 11 -1
      13 16 12 -1
      14 16 13 -1
      15 16 14 -1
      0 16 15 -1
      1 0 17 -1
      2 1 17 -1
      3 2 17 -1
      4 3 17 -1
      5 4 17 -1
      6 5 17 -1
      7 6 17 -1
      8 7 17 -1
      9 8 17 -1
      10 9 17 -1
      11 10 17 -1
      12 11 17 -1
      13 12 17 -1
      14 13 17 -1
      15 14 17 -1
      0 15 17 -1'>
    <Coordinate DEF='IndexedFaceSet3_Coord'
     containerField='coord'
     point='
      5 0 0
      4.6194 0 1.91342
      3.53553 0 3.53553
      1.91342 0 4.6194
      0 0 5
      -1.91342 0 4.6194
      -3.53553 0 3.53553
      -4.6194 0 1.91342
      -5 0 -0
      -4.6194 0 -1.91342
      -3.53553 0 -3.53553
      -1.91342 0 -4.6194
      0 0 -5
      1.91342 0 -4.6194
      3.53553 0 -3.53553
      4.6194 0 -1.91342
      0 0 0
      0 5 0'/>
       </IndexedFaceSet>
      </Shape>
     </Transform>
    </Transform>
    </Scene>
    </X3D>
4

1 に答える 1