Go Back   AC3D Forums > Technical > AC3D Bugs and Problems
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 9th January 2004, 12:45 PM   #1
APEXnow
Junior Member
Junior member
 
Join Date: Jul 2003
Location: United Kingdom
Posts: 3
Default A problem with writing an export plugin

At the moment, I'm currently writing an export plugin for AC3D v4.0.7. From what I can see, the v3 SDK is not that much different from the v4 AC3D.lib file, so I've put upon myself to write an exporter for a given fileformat. So far, my plugin is initialized correctly and the plugin function is executed.

Now. one of the exported AC3D functions is ac_object_get_type which determines whether an object is.. an object, a group, a light or the world object. If I create a new workspace, create two cubes and then group them, the function above behaves correctly:-

WORLD -> GROUP -> CUBE, CUBE

Where GROUP is of type 1 (Group).

Now if I load the "AC3D4\Models\Samples\Mydesk4.ac" and then perform the same export, although the group right below the World object is called "workstationandfurniture", the above function returns 0 (Object). It returns 0 on all objects in the file irrespective of whether the item is a group or an object. Is this a bug or is it something else?

This doesn't cause a problem for me if I create new files but if I load the examples for testing export, the problem prevents me from working out a group hierachy without having to traverse the world object list etc etc.

Thanks.

Paul
apex@apexnow.co.uk
http://www.apexnow.co.uk
__________________
There are 10 types of people. Those who understand binary, and those who don\'t
APEXnow is offline   Reply With Quote
Old 9th January 2004, 02:37 PM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 3,727
Default Re: A problem with writing an export plugin

Hi Paul, do you have the 4.0 headers? If not, send me an email and I'll get them to you.


It's best to use:

int ac_object_get_num_children(ACObject *ob);

(or get the childrenlist) to check if an object has children. Earlier AC3D's didn't distinguish between normal objects and objects with children (and future versions may not either).

Andy
Andy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 07:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
(C) Inivis Limited 2012