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.

DarkBASIC Professional Discussion / Importing Models like in FPS Creator

Author
Message
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 28th Dec 2013 02:05
Hello community!

Does anyone know how can i program my application to let the user choose the file to import in the application and place it in the desired place(by user) ?


Thank You!

Alex Matei CEO
www.alexmatei.com
SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 28th Dec 2013 02:34
Just to clarify, it sounds like you're asking how to set up an FPS Creator style interface for loading a model? There's no simple way to do it really... You'd need to code your own user interface. I can try and put together a quick example if you like!
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 28th Dec 2013 11:37
If you are kind enough to do this please do it and we will stay in touch for some projects

Alex Matei CEO
www.alexmatei.com
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Dec 2013 15:53
Gimmee teh coadez!!

MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 2nd Jan 2014 13:22
Anyone?

Alex Matei CEO
www.alexmatei.com
MonoCoder
20
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 2nd Jan 2014 15:16 Edited at: 2nd Jan 2014 15:25
Here is an example. Instructions are shown on-screen.



[edit: fixed bug that disallowed dragging, works again now]

Note that this code is just for demonstration, and won't scale into a bigger project without modification.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Jan 2014 15:17 Edited at: 2nd Jan 2014 15:37
Hi there

As SamKM commented, you will need to make your own interface, somthing like in this piece of code. Save this code into a folder where you have some images with different file type. It will show you just image in folder. You can do the same if you need 3ds, .x , Dbo etc...
You can click to open image ...




Quote: "Gimmee teh coadez!! "


Do what's right, come what may
HAPPY NEW YEAR YOU ALL..!!


Quote: "[edit: fixed bug that disallowed dragging, works again now]"


Great code !!!

I'm not a grumpy grandpa
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 2nd Jan 2014 23:14
Thank you all for the replies!


I know that i must do an interface i already made some time ago one...but i don't seem to know how can i manage to communicate the button from the interface with dark basic application instantly like in fps creator...i managed to create a third party app that launches a command to dbpro application but thats not the way that fps creator is...

Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 15th Jan 2014 14:11
Sorry for the delay!

I had changed the extension but it didn't detect the models...also i just need something to import in a 3d environment and place with the mouse...simple thing!

Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 18th Jan 2014 22:24
Hey MonoCoder! Your code is absolutely amazing but why is it working only when fullscreen?

Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 19th Jan 2014 20:04
Hey Monocoder! Thank you very much again for the code i spoked to early...it works very fine! Please if you will, tell me how can i adapt this code for applying the objects on a terrain?

Thank You very very much!

Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 10th Feb 2014 15:50
Monocoder, how can i import them with the textures?

Alex Matei CEO
www.alexmatei.com
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Feb 2014 18:58
Quote: "Monocoder, how can i import them with the textures?"


When we inport an object into Dbpro, if it has textured asigned, you just load the object with command LOAD OBJECT "my_obj.X",1
The texture must be into the same folder. If the object has not texture, you have to add a texture to it and save object again as .dbo

I'm not a grumpy grandpa
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 10th Feb 2014 21:01
It worked! Thanks Chafari! Your the best

Alex Matei CEO
www.alexmatei.com

Login to post a reply

Server time is: 2026-07-08 02:16:34
Your offset time is: 2026-07-08 02:16:34