Page 1 of 1
Obj2DatTex.py Use With Ubuntu
Posted: Mon Sep 26, 2011 10:47 pm
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.
Re: Obj2DatTex.py Use With Ubuntu
Posted: Mon Sep 26, 2011 11:23 pm
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...
Re: Obj2DatTex.py Use With Ubuntu
Posted: Tue Sep 27, 2011 2:04 am
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.
I can't thank you enough.
Re: Obj2DatTex.py Use With Ubuntu
Posted: Tue Sep 27, 2011 8:11 am
by Smivs
mandoman wrote: Hmmm, are you a god, or mutant, or something.
I think he's a.......Squirrel!
Re: Obj2DatTex.py Use With Ubuntu
Posted: Tue Sep 27, 2011 8:51 am
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
Re: Obj2DatTex.py Use With Ubuntu
Posted: Tue Sep 27, 2011 12:52 pm
by mandoman
Smivs wrote:mandoman wrote: Hmmm, are you a god, or mutant, or something.
I think he's a.......Squirrel!
LOL!!! He must be one heck of a Squirrel.
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"?
Re: Obj2DatTex.py Use With Ubuntu
Posted: Tue Sep 27, 2011 1:03 pm
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
Re: Obj2DatTex.py Use With Ubuntu
Posted: Tue Sep 27, 2011 6:12 pm
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!
Re: Obj2DatTex.py Use With Ubuntu
Posted: Wed Sep 28, 2011 12:01 am
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.
Re: Obj2DatTex.py Use With Ubuntu
Posted: Wed Sep 28, 2011 12:09 am
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.
Re: Obj2DatTex.py Use With Ubuntu
Posted: Wed Sep 28, 2011 4:14 am
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.
Re: Obj2DatTex.py Use With Ubuntu
Posted: Wed Sep 28, 2011 5:26 am
by Thargoid
It certainly is for Wings3D, so I would be surprised if Blender was significantly different.
Re: Obj2DatTex.py Use With Ubuntu
Posted: Wed Sep 28, 2011 11:10 am
by Staer9
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
Posted: Wed Sep 28, 2011 12:41 pm
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.