BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Loading textures

+4
LabRatAndy
graymac
mrknowitall
Dexter
8 posters

Go down

Loading textures Empty Loading textures

Post by Dexter Sat Apr 14, 2012 12:53 pm

Well, I never thought I would come up with such a basic question, but what is the exact formulation when I want to assign a texture from the parent directory?

And is there any possibility to assign a texture from another directoy? Thanks. Cool
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Loading textures Empty Re: Loading textures

Post by mrknowitall Sat Apr 14, 2012 12:55 pm

LoadTexture,Destination/Front Destination_Maybank.png

this will then open the texture from a folder called "destination" inside the ext_view folder where my .csv item is.

i hope that helped?
mrknowitall
mrknowitall

Posts : 824
Join date : 2011-07-09
Age : 32
Location : W. Yorkshire

Back to top Go down

Loading textures Empty Re: Loading textures

Post by graymac Sat Apr 14, 2012 2:09 pm

I think you can insert ..\ in front of the path which will move you back throuh the folder structure by one step every time used. I only use it within my specific route folder though. I've never linked to files in other peoples routes or external pic folders, it's too easy to lose links otherwise.
graymac
graymac

Posts : 2134
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Loading textures Empty Re: Loading textures

Post by LabRatAndy Sat Apr 14, 2012 2:15 pm

you need to use the "../" notation for parent directory for example

loadtexture, ../texture/object_texture.png
will look in the parent directory of the current one, for the directory called texture containing the file object_texture.png. You can also go up more than one directory level by using "../../"

graymac beat me to it. Sad

LabRatAndy

Posts : 101
Join date : 2011-08-29

Back to top Go down

Loading textures Empty Re: Loading textures

Post by mrknowitall Sat Apr 14, 2012 2:33 pm

I beat you both :O
mrknowitall
mrknowitall

Posts : 824
Join date : 2011-07-09
Age : 32
Location : W. Yorkshire

Back to top Go down

Loading textures Empty Re: Loading textures

Post by Dexter Sat Apr 14, 2012 5:18 pm

mrknowitall wrote:LoadTexture,Destination/Front Destination_Maybank.png
this will then open the texture from a folder called "destination" inside the ext_view folder where my .csv item is.
i hope that helped?

Yep, that one I know, I was talking rather about looking into a different folder within the same parent directory. But thanks anyway. Smile

graymac wrote:I think you can insert ..\ in front of the path which will move you back throuh the folder structure by one step every time used. I only use it within my specific route folder though. I've never linked to files in other peoples routes or external pic folders, it's too easy to lose links otherwise.

LabRatAndy wrote:you need to use the "../" notation for parent directory for example

loadtexture, ../texture/object_texture.png
will look in the parent directory of the current one, for the directory called texture containing the file object_texture.png. You can also go up more than one directory level by using "../../"
graymac beat me to it. Sad

Thank you both. So if I get it correctly, having folders "...whatever\object\FirstBrnoTrack\Station" and "...whatever\object\FirstBrnoTrack\Scenery", I can create a *.csv within Scenery folder and use "LoadTexture, .../Station/picture.png"?

And one more question - one of you uses reverted slash, one normal. So which one? Very Happy
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Loading textures Empty Re: Loading textures

Post by busheyheath Sat Apr 14, 2012 6:36 pm

I always use backslash \, and it works, don't know if slash / works. Further, I think you are right. Just try!
busheyheath
busheyheath

Posts : 297
Join date : 2012-01-05
Location : Netherlands

Back to top Go down

Loading textures Empty Re: Loading textures

Post by LabRatAndy Sat Apr 14, 2012 9:48 pm


Thank you both. So if I get it correctly, having folders "...whatever\object\FirstBrnoTrack\Station" and "...whatever\object\FirstBrnoTrack\Scenery", I can create a *.csv within Scenery folder and use "LoadTexture, .../Station/picture.png"?

And one more question - one of you uses reverted slash, one normal. So which one? Very Happy

Firstly, yes that would work.

Secondly, technically were both correct depends on the operating system. Windows can use both actually and unix flavour oses tend to use slash see here for more detail. I guess openBVE or .net/mono worry about sorting it out for the correct os.

LabRatAndy

Posts : 101
Join date : 2011-08-29

Back to top Go down

Loading textures Empty Re: Loading textures

Post by graymac Sat Apr 14, 2012 10:50 pm

And one more question - one of you uses reverted slash, one normal. So which one?

I seem to remember reading somewhere that you have to use the \ with windows but Linux can take it either way \ or / If you try it you will probably find out soon enough Very Happy
graymac
graymac

Posts : 2134
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Loading textures Empty Re: Loading textures

Post by Egg Sun Apr 15, 2012 2:42 pm

Also, be aware that while Windows can't tell the difference between "Directory" and "directory", Unix can... and will!

Egg

Posts : 81
Join date : 2011-07-25
Location : Tasmania

Back to top Go down

Loading textures Empty Re: Loading textures

Post by Dexter Sun Apr 15, 2012 8:15 pm

Egg wrote:Also, be aware that while Windows can't tell the difference between "Directory" and "directory", Unix can... and will!

OK, that is an important note, thanks!
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Loading textures Empty Re: Loading textures

Post by leezer3 Fri May 11, 2012 12:56 am

Egg wrote:Also, be aware that while Windows can't tell the difference between "Directory" and "directory", Unix can... and will!

OpenBVE isn't actually case sensitive.
I forget why, but this came up in the official forums, and Michelle confirmed that it isn't- I *think* this decision was made for backwards compatibility with Windows built routes. Of course, it's a bad habit to do this anyways, but still (Can be very confusing) Laughing

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 1972
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Loading textures Empty Re: Loading textures

Post by alvinhochun Fri May 11, 2012 6:34 am

Well, some simple notation on paths:

*nix:
../ : Parent directory
/ : Root [s]directory[/s]
./ : Current directory (usually omitted)

Windows:
..\ : Parent directory
\ : Root directory of the current drive
.\ : Current directory (usually omitted)
X:\ : Reference another drive

Note that openBVE actually converts any '\' and '/' into
Code:
System.IO.Path.DirectorySeparatorChar
, so that you don't need to care about using which slash.

Although openBVE doesn't actually sense case, I think it's the best to be case-sensitive when building. You know in *nix you can have case-sensitive directories and files and if you split into different archives they can get mixed up.

P.S. there aren't any path notations using three dots...
alvinhochun
alvinhochun

Posts : 88
Join date : 2012-05-08
Location : Hong Kong

Back to top Go down

Loading textures Empty Re: Loading textures

Post by Dexter Fri May 11, 2012 9:20 am

Thanks Alvin. Smile
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Loading textures Empty Re: Loading textures

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum