Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some differences between new plugin system and old one....

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Plugins
View previous topic :: View next topic  
Author Message
Il Buzzo
DeleD PRO user


Joined: 12 Aug 2004
Posts: 271
Location: Italy

PostPosted: Sun Feb 24, 2008 10:16 am    Post subject: Some differences between new plugin system and old one.... Reply with quote

Hi all,
while finishing my new C++ (VS8 and VS9 wizards and CodeBlocks) plugin interface I've noticed some differences between the old plugin architecture and the new one. In fact in the old plugin system you could pass just materials or objeccts or lights. In this one you need to pass a complete file structure everytime (including materials etc...), am I right? After some testes, in which I tried to pass (or update an object), I'm now convinced of this because if I pass the followin string (a simple cube to a clear scene):
Code:

<scene version="1.6">
<primitives highestID="1">
    <primitive id="1" name="cube1" type="cube" visible="true" snap="vertex" autoUV="true" groupID="-1">
      <vertices>
        <vertex id="0" x="64" y="-64" z="0" />
        <vertex id="1" x="-64" y="-64" z="0" />
        <vertex id="2" x="-64" y="-64" z="-128" />
        <vertex id="3" x="64" y="-64" z="-128" />
        <vertex id="4" x="64" y="64" z="0" />
        <vertex id="5" x="-64" y="64" z="0" />
        <vertex id="6" x="-64" y="64" z="-128" />
        <vertex id="7" x="64" y="64" z="-128" />
      </vertices>
      <polygons>
        <poly mid="0">
          <vertex vid="0" u0="0.5" v0="0.5" />
          <vertex vid="1" u0="-0.5" v0="0.5" />
          <vertex vid="5" u0="-0.5" v0="-0.5" />
          <vertex vid="4" u0="0.5" v0="-0.5" />
        </poly>
        <poly mid="0">
          <vertex vid="1" u0="0" v0="0.5" />
          <vertex vid="2" u0="-1" v0="0.5" />
          <vertex vid="6" u0="-1" v0="-0.5" />
          <vertex vid="5" u0="0" v0="-0.5" />
        </poly>
        <poly mid="0">
          <vertex vid="2" u0="0.5" v0="0.5" />
          <vertex vid="3" u0="-0.5" v0="0.5" />
          <vertex vid="7" u0="-0.5" v0="-0.5" />
          <vertex vid="6" u0="0.5" v0="-0.5" />
        </poly>
        <poly mid="0">
          <vertex vid="3" u0="1" v0="0.5" />
          <vertex vid="0" u0="0" v0="0.5" />
          <vertex vid="4" u0="0" v0="-0.5" />
          <vertex vid="7" u0="1" v0="-0.5" />
        </poly>
        <poly mid="0">
          <vertex vid="6" u0="-0.5" v0="-1" />
          <vertex vid="7" u0="0.5" v0="-1" />
          <vertex vid="4" u0="0.5" v0="0" />
          <vertex vid="5" u0="-0.5" v0="0" />
        </poly>
        <poly mid="0">
          <vertex vid="1" u0="-0.5" v0="0" />
          <vertex vid="0" u0="0.5" v0="0" />
          <vertex vid="3" u0="0.5" v0="1" />
          <vertex vid="2" u0="-0.5" v0="1" />
        </poly>
      </polygons>
    </primitive>
  </primitives>
</scene>

When I pass this simple object I always obtain unexpected end of input. So for the moment exporter code works without problem but importer doesn't. I'm checking my plugin interface to find eventual bugs but nothing a t the moment found. If someone knows a little more about this, please let me know so I can release my new wizards for VS8 and VS9.
Bye all Wink
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Fri Mar 07, 2008 9:54 am    Post subject: Reply with quote

I'll investigate, this should just work. Thanks for reporting this reproduction case!
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sun Mar 09, 2008 9:49 am    Post subject: Reply with quote

The message "unexpected end of input" is just a technical (syntactical) error message from the xml scanner, most likely caused because there is whitespace at the end of your model (beyond the closing rootnode). It doesn't say anything about the (semantical) structure of the file.

When I copy pasted your example case I also got whitespace (a single space) at the end of my file, and had the exact same problem. After I removed the space, the cube imported just fine.

DeleD now trims incoming xml, so trailing and leading whitespace doesn't cause this problem anymore. However any text beyond the final rootnode will still cause this problem.

Hope that helps! Smile

[edit]Oh, before I forget, it's very good to hear you are working on your C++ plugin interface again... exciting stuff![/edit]
Back to top
View user's profile Send private message Visit poster's website
Il Buzzo
DeleD PRO user


Joined: 12 Aug 2004
Posts: 271
Location: Italy

PostPosted: Mon Mar 10, 2008 11:02 am    Post subject: Reply with quote

Thanks Paul-Jan,
I've just solved removing "\n" after the closing scene tag.
So expect a release soon.
I'll try with Visual Studio Express 2008 too.
Bye all Wink
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Thu Mar 13, 2008 7:31 am    Post subject: Reply with quote

Can hardly wait! I am actually starting work on a Visual Studio C++ plugin too (because the libraries for this particular file format are readily available in C++), so any work I can pinch of you (and Jon Watte) helps me out!
Back to top
View user's profile Send private message Visit poster's website
Il Buzzo
DeleD PRO user


Joined: 12 Aug 2004
Posts: 271
Location: Italy

PostPosted: Thu Mar 13, 2008 8:55 pm    Post subject: Reply with quote

Hi Paul-Jan,
I can send you the work in progress code (it works ok, I need just a little time to create wizard for Visual C++ ).
Anyway, if you can wait I'll deliver wizard to the community in 10 days more or less (I hope less, but I'm very busy at the moment cause I'll leave Italy 31st of March).

Bye Wink

P.S.: I'm also trying to figure out if license for xmlParser (BSD) agrees with my license (GNU) or I need to change it. Suggestions welcome.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum