creating ships

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

Post Reply
cactuar
Above Average
Above Average
Posts: 30
Joined: Tue Feb 21, 2006 5:43 pm

creating ships

Post by cactuar »

I created a very basic ship as a learning tool, so to speak. The problem I am having is that the python script fails to convert the .obj into .dat. It says something about the .dat not existing, which is correct as the script is suppose to create it.

I am using SUSE and wings3D.
User avatar
Selezen
---- E L I T E ----
---- E L I T E ----
Posts: 2530
Joined: Tue Mar 29, 2005 9:14 am
Location: Tionisla
Contact:

Post by Selezen »

You have to type in the following command, with the .obj and .mtl files in the same folder as the script:

Code: Select all

obj2dattex.py filename.obj[/obj]

obviously replace the word filename with your obj file's name.

It sounds like you are entering the dat file name too. You don't have to.
cactuar
Above Average
Above Average
Posts: 30
Joined: Tue Feb 21, 2006 5:43 pm

Post by cactuar »

ok, I tried what you said and I got:

Code: Select all

obj2dattex.py: command not found

I tried using upper case letters in the right places.

I am doing nothing with .dat files as none have been created!
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

Most UNIX systems do not have (by default) '.' (i.e. your current directory) in the path. (There are good security reasons for this - for instance, to stop root from accidentally running ./foo instead of /usr/bin/foo and having something uninteded happen).

When trying to execute a script or program in the current directory:

./obj2dattex.py

Note the './'. This means execute 'obj2dattex.py' in the current directory (rather than search the path for it).

Alternately, place 'obj2dattex.py' somewhere in the path, or add the location where it is to the path - but really, just typing ./ in front of the command is probably faster!
User avatar
Selezen
---- E L I T E ----
---- E L I T E ----
Posts: 2530
Joined: Tue Mar 29, 2005 9:14 am
Location: Tionisla
Contact:

Post by Selezen »

:oops:

D'oh. Sorry - another Linux quirk to learn...
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

Selezen wrote:
:oops:

D'oh. Sorry - another Linux quirk to learn...
Well, it's not Linux specific and it isn't a quirk either - Unix has worked that way ever since there was such thing as a shell, way back in 1969 :-)

Since Linux is a 'non-genetic Unix' (i.e. is to what Unix what Oolite is to Elite) it follows this convention. As does *BSD and Mac OS X.
cactuar
Above Average
Above Average
Posts: 30
Joined: Tue Feb 21, 2006 5:43 pm

Post by cactuar »

OK, so could you tell me the exact 'phrase' i.e:

./obj2dattex.py filename.obj

is that right? Obviously is the correct directory I assume.
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

If that's the correct syntax to obj2dattex.py then yes - I don't know about that specific utility as I've not used it.
milinks
Deadly
Deadly
Posts: 164
Joined: Sun Jun 27, 2004 9:19 pm

Post by milinks »

Hi cactuar,
if you bring up a cmd screen and change your directory to wherever your model is, have a copy of the Obj2DatTex.py in THAT folder alongside your model, direct your comand screen i.e cd C:\OOLITE\Models or whatever it is then type Obj2DatTex.py "model name".obj - making sure you are case sensitive and it should work fine (hopefully)
cactuar
Above Average
Above Average
Posts: 30
Joined: Tue Feb 21, 2006 5:43 pm

Post by cactuar »

Got it! Thanks guys. As that famous woman once said sometime "I always rely on the kindness of strangers" or something like that, anyway thanks again!

:D
Post Reply