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.

Newcomers DBPro Corner / Media path search question?

Author
Message
Skywriter
16
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 10th Feb 2010 12:45
Are there any commands that will search directories for media associated with object. It usually loads media that is in the same directory as object, but what if i want to put models in one directory and textures into another. Please advice.

Sky
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Feb 2010 14:48
easy !!



cheers

learning every day
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 10th Feb 2010 15:57
Bear in mind that if you place the object and it's associated textures in separate directories, you will need to texture the object manually. I don't understand your reasoning, but it can be done.

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Feb 2010 16:14
Quote: "Bear in mind that if you place the object and it's associated textures in separate directories, you will need to texture the object manually. I don't understand your reasoning, but it can be done."



I it supposed that all media have to be in the same directoy, if not...you have to give the path to the folder...it was just an answer.Sometimes it is necessary to have all media controled and not spread all over the folder.

cheers.

learning every day
Skywriter
16
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 10th Feb 2010 17:27
Ok, thanks lads, i see that my idea is not gonna work the way i think. I thought that maybe there is simple command that engine will search for folders(specified) and find associated object textures and automatically assign them to object, so i can keep objects in one directory and textures in another. But if it has to be done manually, or kept in same directory, then that's the way it has to be...

Sky
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 10th Feb 2010 18:53
You could perhaps edit the model files with notepad and change the path it's expecting to find the texture at?

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Feb 2010 10:22
@=PRoF=
Exactly !! that´s it !! I have checked and it works..Thanks =PRoF=.



cheers.

learning every day
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 11th Feb 2010 11:03
Quote: "Bear in mind that if you place the object and it's associated textures in separate directories, you will need to texture the object manually."

I'm not entirely sure, but am rather convinced that the internal texture paths of a object file can indeed refer to a subfolder, or possibly even an absolute path. Why anyone would use that (the absolute path) though, but it seems likely that it should work.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Feb 2010 16:53
A little tip:

The method I use is to have at the start of my program, a line which says:

StartDir$ = Get Dir$()

Then, if my program has folders for different things - say a Projects folder or an Images folder, I just use:

ProjectsDir$ = StartDir$ + "\Projects\"
ImageDir$ = StartDir$ + "\Images\"


and so on.

If you then later in the program want to load a file caled "MyImage.bmp" from the Images folder you simply use:

Load Image ImageDir$+"MyImage.bmp",ImgNum

Just create a string for each of the required folders your program accesses.

TDK

Login to post a reply

Server time is: 2024-11-27 12:11:02
Your offset time is: 2024-11-27 12:11:02