Page 2 of 2

Re: We need a new blender exporter

Posted: Mon Jan 06, 2014 1:46 am
by roeland
We have changed the OCS file format in version 1.21. If you look at the OCS files saved by 1.20 and 1.21 you will see they look very different. Lionel's exporter reads the OCS file back in to keep the materials, but this will not work if the OCS file has been overwritten with these new versions.

For comparison, this is a diffuse material in 1.20 and 1.21:

Code: Select all

<?xml version='1.0' encoding='utf-8'?>
<OCS_1_0_30_Macro>
 <Node>
  <name>Diffuse Material</name>
  <typename>diffuse</typename>
  <id>1</id>
  <position>0.637 0.57</position>
  <inputnodepins>
   <NodePin>
    <typename>diffuse</typename>
    <id>0</id>
    <pintype>20000</pintype>
    <hasinternalnode>true</hasinternalnode>
    <Node>
     <name>diffuse</name>
     <typename>RGBspectrum</typename>
     <id>1</id>
     <position>0 0</position>
     <parameters>
      <rgbvalue>0.7 0.7 0.7</rgbvalue>
     </parameters>
     <inputnodepins>
     </inputnodepins>
    </Node>
   </NodePin>
   <NodePin>
    <typename>transmission</typename>
    <id>1</id>
    <pintype>20000</pintype>
    <hasinternalnodegraph>false</hasinternalnodegraph>
   </NodePin>
   <NodePin>
    <typename>bump</typename>
    <id>2</id>
    <pintype>20000</pintype>
    <hasinternalnodegraph>false</hasinternalnodegraph>
   </NodePin>
   <NodePin>
    <typename>normal</typename>
    <id>3</id>
    <pintype>20000</pintype>
    <hasinternalnodegraph>false</hasinternalnodegraph>
   </NodePin>
   <NodePin>
    <typename>opacity</typename>
    <id>4</id>
    <pintype>20000</pintype>
    <hasinternalnode>true</hasinternalnode>
    <Node>
     <name>opacity</name>
     <typename>floattexture</typename>
     <id>1</id>
     <position>0 0</position>
     <parameters>
      <value>1</value>
      <modified>true</modified>
     </parameters>
     <inputnodepins>
     </inputnodepins>
    </Node>
   </NodePin>
   <NodePin>
    <typename>smooth</typename>
    <id>5</id>
    <pintype>20003</pintype>
    <hasinternalnode>true</hasinternalnode>
    <Node>
     <name>smooth</name>
     <typename>bool</typename>
     <id>1</id>
     <position>0 0</position>
     <parameters>
      <value>true</value>
      <modified>true</modified>
     </parameters>
     <inputnodepins>
     </inputnodepins>
    </Node>
   </NodePin>
   <NodePin>
    <typename>emission</typename>
    <id>6</id>
    <pintype>20006</pintype>
    <hasinternalnodegraph>false</hasinternalnodegraph>
   </NodePin>
   <NodePin>
    <typename>medium</typename>
    <id>7</id>
    <pintype>20012</pintype>
    <hasinternalnodegraph>false</hasinternalnodegraph>
   </NodePin>
   <NodePin>
    <typename>matte</typename>
    <id>8</id>
    <pintype>20003</pintype>
    <hasinternalnode>true</hasinternalnode>
    <Node>
     <name>matte</name>
     <typename>bool</typename>
     <id>1</id>
     <position>0 0</position>
     <parameters>
      <value>false</value>
      <modified>true</modified>
     </parameters>
     <inputnodepins>
     </inputnodepins>
    </Node>
   </NodePin>
  </inputnodepins>
 </Node>
</OCS_1_0_30_Macro>

Code: Select all

<?xml version='1.0' encoding='utf-8'?>
<OCS2 version='1210000'>
 <graph id='0' type='1' name='clipboard' position='0 0'>
  <node id='1' type='17' name='Diffuse Material' position='1071 55'>
   <pin name='diffuse'>
    <node id='2' type='33'>
     <attr name='value' type='8'>0.7 0.7 0.7</attr>
    </node>
   </pin>
   <pin name='opacity'>
    <node id='3' type='31'>
     <attr name='value' type='6'>1</attr>
    </node>
   </pin>
   <pin name='smooth'>
    <node id='4' type='11'>
     <attr name='value' type='1'>1</attr>
    </node>
   </pin>
   <pin name='matte'>
    <node id='5' type='11'>
     <attr name='value' type='1'>0</attr>
    </node>
   </pin>
  </node>
 </graph>
</OCS2>
--
Roeland

Re: We need a new blender exporter

Posted: Mon Jan 06, 2014 9:16 pm
by steveps3
So can someone update the script so that it does work?

Re: We need a new blender exporter

Posted: Mon Jan 06, 2014 10:00 pm
by pixelrush
To me it looks like a fair bit of rework is involved to fix the xml format. I am not sure I have the time or expertise to do it although I have added to and fixed python scripts before.
It might be asked as well who is going to add Alembic stuff if/when it finally arrives in Blender...and how many people would benefit from the effort.
Realistically the standalone script might be nearing the end of its useful life.
I suppose the alternative is to buy the plugin which you know will be kept up to date. ;)

Re: We need a new blender exporter

Posted: Mon Jan 06, 2014 10:16 pm
by steveps3
Unfortunately, as I've said before, the plugin is clunky and the workflow is not good. I have the plugin and it takes me about 5 times longer to setup a scene using it than it does using the standalone.