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 

1.6 SDK - retrieving all DeleD data

 
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
LIONCode
DeleD PRO user


Joined: 27 Feb 2007
Posts: 16
Location: Netherlands

PostPosted: Wed Mar 07, 2007 9:02 am    Post subject: 1.6 SDK - retrieving all DeleD data Reply with quote

I just started this morning to try and write my own DeleD plugin. I want to write an exporter to the CrystalSpace format. I got a nice project setup available for VC++ 2005 Smile

I have basically 2 question at this time:

1) what is exactly the result that the CallBack procedure returns ? What numbers can i expect and what do they mean ?

2) I want to get every information from DeleD that i can get from it using the PM_GETDATA request. I now use:

Code:
<request>
                             <installdirectory />
                             <settings />
                             <materials  subset=\"all\" />
                             <primitives subset=\"all\" retrieveID=\"false\" />
                             <lights     subset=\"all\" retrieveID=\"false\" />
                          </request>"


Is there more that can be retrieved ? I would for instance like to get all directories (materials, etcetera). My resource directories, like material and map files, are shared between version 1.5 and 1.6. So they are not in the installation directory but in a shared location to be used by both versions.

Thanks and keep up the good work.
_________________
Dennis Taapken

http://www.lioncode.com
Back to top
View user's profile Send private message Visit poster's website
LIONCode
DeleD PRO user


Joined: 27 Feb 2007
Posts: 16
Location: Netherlands

PostPosted: Fri Mar 09, 2007 6:42 pm    Post subject: Reply with quote

Any answer guys ?
_________________
Dennis Taapken

http://www.lioncode.com
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 09, 2007 7:36 pm    Post subject: Reply with quote

Ah, cool, the crystal space format! Mesh-based with instancing, right? We'd be very pleased if you managed to get that plugin up and running, having a smooth export pipeline to crystal space would be great! Very Happy Oh, and sorry to have kept you waiting for a while...

Here is the answer to your question: (offhand, we'll have to add this to the sdk/help of course):

1. Possible return values (error values) from the callback function are:
Quote:

PE_NOERROR = 0;
PE_INVALIDMEM = 3;
PE_INVALIDGET = 4;
PE_INVALIDSET = 5;
PE_INSUFFICIENT_DATASIZE = 14;
PE_UNKNOWNREQUEST = 98;


The actual list is longer, but I only included the values that DeleD 1.6 actually does return (the other values are no longer used).

PE_NOERROR: You'll be happy whenever you see this
PE_INVALIDMEM: Something (unspecified) went wrong during a PR_GETMEM request from the plugin
PR_INVALIDGET: Something (unspecified) went wrong during a PR_GETDATA request from the plugin
PR_INVALIDSET: Something (unspecified) went wrong during a PR_SETDATA request from the plugin
PE_INSUFFICIENT_DATASIZE: The plugin requested a PR_GETDATA, but did not allocate enough memory (as specified in the responseSize member of the callback structure)
PE_UNKNOWNREQUEST: The requestID as passed by the plugin in the callback structure was unknown.

Hope that helps. Frankly, our own plugins mostly just check if the result = PE_NOERROR. Anything else means something is terribly wrong. No matter what happened, better call tech support. And have them call us. Or post at our forums. Very Happy

2. The information you retrieve is about all the current version of DeleD has to offer. Most plugins, like our own, directly access the DeleD.ini file (which is guaranteed to be in the install directory you retrieved) and read the location of the texture folders (and other settings) from there.

The specific location of this folder in the .ini file:
Quote:
[Dirs]
texturefiles=


If you think this is a bit sloppy, and such information should be available directly through the plugin API, you might actually have a good point Wink The reason we never changed it, is that it
(a) retrieving settings is quite flexible this way and
(b) we have abstracted this question away in our plugins, so we allowed ourselves to conveniently forget how this information is retrieved. Very Happy

If you have any comments, please let us know. There is a lot of room for improvement as far as the plugin system goes, and direct requests/comments by author plugins decide what improvements come first.
Back to top
View user's profile Send private message Visit poster's website
LIONCode
DeleD PRO user


Joined: 27 Feb 2007
Posts: 16
Location: Netherlands

PostPosted: Fri Mar 09, 2007 7:48 pm    Post subject: Reply with quote

Thanks for the information !

Reading the .ini is fine i guess Smile When you have written the code once, you can easily reuse - as you already mention.

The export is coming along nicely, i can already load an exported scene into CrystalSpace. I still need to create a nice dialog and use some 'entity' prefab to indicate camera positions.

I'll post the plugin when i feel it is ready for the public Smile Probably somewhere next week. CrystalSpace levels can then be made by just 3 tools: blender, 3DS Max and DeleD !
_________________
Dennis Taapken

http://www.lioncode.com
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 09, 2007 9:39 pm    Post subject: Reply with quote

Gheh, that does have a nice ring to it! Very Happy
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