Obj2DatTex.py Use With Ubuntu
Moderators: winston, another_commander
Obj2DatTex.py Use With Ubuntu
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.
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.
- Mauiby de Fug
- ---- E L I T E ----
- Posts: 847
- Joined: Tue Sep 07, 2010 2:23 pm
Re: Obj2DatTex.py Use With Ubuntu
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...Re: Obj2DatTex.py Use With Ubuntu
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.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, andcd
into the folder. Then, try running something likepython Obj2DatTex.py ModelToConvert.obj
and see if that does something...
I can't thank you enough.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Obj2DatTex.py Use With Ubuntu
I think he's a.......Squirrel!mandoman wrote:Hmmm, are you a god, or mutant, or something.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Re: Obj2DatTex.py Use With Ubuntu
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
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.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
Re: Obj2DatTex.py Use With Ubuntu
LOL!!! He must be one heck of a Squirrel.Smivs wrote:I think he's a.......Squirrel!mandoman wrote:Hmmm, are you a god, or mutant, or something.
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"?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
Re: Obj2DatTex.py Use With Ubuntu
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
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.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
- Mauiby de Fug
- ---- E L I T E ----
- Posts: 847
- Joined: Tue Sep 07, 2010 2:23 pm
Re: Obj2DatTex.py Use With Ubuntu
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!Re: Obj2DatTex.py Use With Ubuntu
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.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 havingcd
'd into the folder beforehand. But the way I gave you seemed simpler!
- Mauiby de Fug
- ---- E L I T E ----
- Posts: 847
- Joined: Tue Sep 07, 2010 2:23 pm
Re: Obj2DatTex.py Use With Ubuntu
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.
Re: Obj2DatTex.py Use With Ubuntu
Thanks. That's what I was hoping. I've got some math to do.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.
Re: Obj2DatTex.py Use With Ubuntu
It certainly is for Wings3D, so I would be surprised if Blender was significantly different.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Staer9
- ---- 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
Mandoman, see my second tutorial in the Blender thread, it tells you exactly how to see the vertex locations.
Re: Obj2DatTex.py Use With Ubuntu
Oh, that's great. Thanks.Staer9 wrote:Mandoman, see my second tutorial in the Blender thread, it tells you exactly how to see the vertex locations.