Obj2DatTex.py Use With Ubuntu

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Obj2DatTex.py Use With Ubuntu

Post by mandoman »

HEEEEEEELP!!!!!!!!!!!!!!1

Can anyone help me with this #$@#%^$%& source code, within the Ubuntu platform? I'm ObjDatTex,py close to starting an oxp, and I can't get the system to even recognize it. Heck, even when I try to run it in Python, it tells me it is "undefined", and if I paste the whole source code, starting at "def", into Python, instead of running it, it starts warning me about unexpected "indents", and "Syntax Errors". I even tried running it in IDLE, using 2.6.6, and IT gave me Syntax Error warnings all the way through. Isn't this code suppose to be a Python source code? I copied it to a Text Editor file, and named it Obj2DatTex.py, but neither the Terminal, or Python (in Terminal, or IDLE) will recognize it's function, or that it even exists as a file. I have been wrestling with this, trying to solve it without bothering the forum (though I did bug aegidian a bit, not good) for the last several days, with no luck. I have studied tutorials, followed "command" instructions about this very issue, and I'm still spinning my wheels. I'm stuck. :cry:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by Mauiby de Fug »

Okay, it's been a while since I last did this, and I haven't got it set up on my computer yet, but I believe that you first of all need to have the Obj2DatTex.py file in the same folder as the file you want to convert. Then, open a normal terminal, and cd into the folder. Then, try running something like python Obj2DatTex.py ModelToConvert.obj and see if that does something...
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by mandoman »

Mauiby de Fug wrote:
Okay, it's been a while since I last did this, and I haven't got it set up on my computer yet, but I believe that you first of all need to have the Obj2DatTex.py file in the same folder as the file you want to convert. Then, open a normal terminal, and cd into the folder. Then, try running something like python Obj2DatTex.py ModelToConvert.obj and see if that does something...
Uh, how did you do that? I could swear that I already tried that very command stream, and got Syntax Error, or something of the sort. I'm thinking it might have been that I didn't input the .obj file correctly. It must have been that, because when I opened Terminal and did what you just said, it worked like a charm, as if I hadn't been banging away at the computer keys for the last few days. Hmmm, are you a god, or mutant, or something. :D

I can't thank you enough.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Obj2DatTex.py Use With Ubuntu

Post by Smivs »

mandoman wrote:
Hmmm, are you a god, or mutant, or something. :D
I think he's a.......Squirrel! :D
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: Obj2DatTex.py Use With Ubuntu

Post by Ironfist »

mandoman,

I think it might be the version of Python you are using. I have had problems running these scripts under version 2.7. I needed to install 2,6 and use that to run them. I admit this was under XP but it would not surprise me if the same applies under Ubuntu.

Ironfist
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by mandoman »

Smivs wrote:
mandoman wrote:
Hmmm, are you a god, or mutant, or something. :D
I think he's a.......Squirrel! :D
LOL!!! He must be one heck of a Squirrel. :lol:
mandoman,

I think it might be the version of Python you are using. I have had problems running these scripts under version 2.7. I needed to install 2,6 and use that to run them. I admit this was under XP but it would not surprise me if the same applies under Ubuntu.

Ironfist
That may be, all right. I don't know. All I know is I tried everything I knew, and learned a huge amount more about Terminal, and some about IDLE, and still couldn't make it work until I did what Maulby de Fug told me. I could swear I tried that, and I think I did, but I must have typed something incorrectly, because it didn't work until last night. What ever, it is fantastic to have made it over that hurdle, and I still thank Maulby de Fug (what does that mean?) for the help. Now I have to figure out all that math for the different view angles, weapons placements, and exhaust. Do you know how long it's been since I even HEARD the word "Cosine"? :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: Obj2DatTex.py Use With Ubuntu

Post by Ironfist »

Check out https://bb.oolite.space/viewtopic.php?f=4&t=2886 it is "Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp" further up in this forum. There is a really useful table of common values for Quarterions.

Ironfist
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by Mauiby de Fug »

It's one of these things which gets obvious once you know it, but can be incredibly difficult until then. I remember having real trouble trying to run the javascript console, until someone mentioned that that's how to do it. To be honest, I've a feeling that I probably made the Obj2DatTex.py file an executable file, and run it with the command ./Obj2DatTex.py ModelToConvert.obj from the terminal, again having cd'd into the folder beforehand. But the way I gave you seemed simpler!
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by mandoman »

Mauiby de Fug wrote:
It's one of these things which gets obvious once you know it, but can be incredibly difficult until then. I remember having real trouble trying to run the javascript console, until someone mentioned that that's how to do it. To be honest, I've a feeling that I probably made the Obj2DatTex.py file an executable file, and run it with the command ./Obj2DatTex.py ModelToConvert.obj from the terminal, again having cd'd into the folder beforehand. But the way I gave you seemed simpler!
Well it worked perfectly, and I was about ready to forget oxp making, and just be content with playing (which is awesome all in itself). Maybe you, or some other kind expert can answer another question, now that the obj to dat conversion has been answered. The X, Y, and Z numbers, used for exterior views, missile placement, and anything else that uses those coordinate letters. Do I get that from the same coordinates shown in the Blender file I have of the ship, or is it something completely different? Either way, thanks a bunch. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by Mauiby de Fug »

That one I'm not too sure about, but I believe that it should be the same coords that you get from the modelling software - in your case, Blender.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by mandoman »

Mauiby de Fug wrote:
That one I'm not too sure about, but I believe that it should be the same coords that you get from the modelling software - in your case, Blender.
Thanks. That's what I was hoping. I've got some math to do. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by Thargoid »

It certainly is for Wings3D, so I would be surprised if Blender was significantly different.
User avatar
Staer9
---- E L I T E ----
---- E L I T E ----
Posts: 570
Joined: Fri Feb 18, 2011 4:53 pm
Location: Hatfield, Hertfordshire (poor industrial)

Re: Obj2DatTex.py Use With Ubuntu

Post by Staer9 »

Mandoman, see my second tutorial in the Blender thread, it tells you exactly how to see the vertex locations.
Image
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Obj2DatTex.py Use With Ubuntu

Post by mandoman »

Staer9 wrote:
Mandoman, see my second tutorial in the Blender thread, it tells you exactly how to see the vertex locations.
Oh, that's great. Thanks. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
Post Reply