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 / Determining 3d mesh's filename? Help appreciated.

Author
Message
Miscreant Software
16
Years of Service
User Offline
Joined: 5th Mar 2010
Location: Australia (where the kangaroos are)
Posted: 24th Dec 2011 05:15
Hi Dbpro-ers,
Does anyone know a command or other means of determining the filename of a 3d object after it has been loaded (load object "blah.x",file#)
from just the object number? Something along the lines of
filename$=get object filename(file#)
where the return is the filename.

Is this possible?
Thankyou in advance,

Miscreant
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Dec 2011 13:21
As far as I'm aware, DBPro only uses the filename when opening the file to load the media - after that point the filename is not needed or stored.

If you need to retrieve the filename after loading, then use an array of strings to hold it yourself.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 25th Dec 2011 01:38
Alternatively you could give names to objects... can not remember if you can do this without some plugins... but I assume everyone bought at least half the plugins like I did cost me a good part of £1000 but worth it

Miscreant Software
16
Years of Service
User Offline
Joined: 5th Mar 2010
Location: Australia (where the kangaroos are)
Posted: 25th Dec 2011 11:38
Thanks for your replies and advice!
The plugins are rather good, I'll look into getting a few more =)
Its a bit of a pity a command like that doesn't exist; I reckon it could be rather useful. Maybe something for the next update!
Cheers and Merry Christmas,

Daniel
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 25th Dec 2011 12:12 Edited at: 25th Dec 2011 12:13
It should be easy enough to just make your own LoadObject function that stores the file name that is passed to it and associates it with the given object id.

Assuming you have a plugin that handles maps (there probably are a few, M1U have string-to-string maps at least), something like this should be enough (note: pseudo code for the maps):



Edit: oh yeah, merry Christmas


"Why do programmers get Halloween and Christmas mixed up?"
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Dec 2011 23:27
Quote: "Alternatively you could give names to objects"

You can name limbs, but you can't name objects - it's one of my plug-ins that provides the limb naming commands.

It doesn't need any plug-in to provide this functionality though:


@Miscreant Software
Before purchasing plug-ins that you may not need, try out some of the free ones. My own come to mind. There is also a list of other free ones at the top of the Program Announcements forum.

In addition, I sometimes do requests

Miscreant Software
16
Years of Service
User Offline
Joined: 5th Mar 2010
Location: Australia (where the kangaroos are)
Posted: 26th Dec 2011 01:32
Thanks again for your help! I know what to do now! =)
IanM, your plugin is amazing; it has all sorts of really useful commands, and I can already see solutions to problems that had me stumped. Downloading now!

Thanks again,

Miscreant
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Dec 2011 14:11

Login to post a reply

Server time is: 2026-07-09 20:55:40
Your offset time is: 2026-07-09 20:55:40