Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - X export code

Author
Message
griffirr
18
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 29th Aug 2011 13:29
Okay, this is a double post, but I wanted it to be here to so it doesnt get lost in the Dark Basic Professional code forum.

I noticed a lot of people are looking for code to export an object to a .X file. Here is some code to do the trick. Ezrotate and Styx is required. Styx is only needed to strip the filename from the path. I'm sure there is other ways to do this. Please notice that it only does only one texture stage (you choose) and does not include animations. Please post any updates you make to this code so that we can all make it better. The global variable g_OutputFolder$ must be set to an existing folder that you want the file created in. All textures in the object will be copyied to this folder as well. Sorry if the comments are lacking but this code has worked well for me for some time. Fuctions getFreeObject and getFreeMesh are included but matrix plugins will work fine with some changes. Please post to let me know if I have forgotten something or if you have any questions.


Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 3rd Sep 2011 18:26
@griffir,

This is great. Any chance of export to .x with animation data intact?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Qqite
12
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 4th Oct 2011 17:56
Could someone compile this with input for file name, please? I dont have ezrotate and i really need this program.superthanks to someone who can do it

Ventures of the worlds around us are limited only by our imagination.
Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 12th Oct 2011 07:56
@griffir,

Any luck with export of animation stuff within .x? (as well as true limb structure?)

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Chris Tate
DBPro Master
14
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 12th Oct 2011 15:00
Looks like a cool snippet. I see that it nicely saves associated textures.

What are its over advantages over the Save Mesh command?



Login to post a reply

Server time is: 2022-12-01 14:26:29
Your offset time is: 2022-12-01 14:26:29