Cannot convert OBJ to DAT in both Win and Linux
Moderators: winston, another_commander
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
Cannot convert OBJ to DAT in both Win and Linux
I have installed Python 26 and tried converting an obj file to a dat file using obj2dattex.py, but it just can´t be done! I go Start-->Run-->CMD-->cd\python 26--->obj2dattex.py brick.obj-->enter--->It tells me that it could be an external command etc. What do you all do?
Shooting polygons since 2001
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
And on Windows, you don't need to be in the Python directory to run things. Just put the obj2dat.py and your obj/mtl/png files in the same place, cd to that directory and from the command prompt do obj2dat.py <filename>.obj.
But as A_C says there are some issues with v2.6, but slightly earlier ones certainly work. Also I think I'm using (successfully) obj2dat.py, not obj2dattex.py . These of course may be the same file just with a re-name along the way somewhere...
But as A_C says there are some issues with v2.6, but slightly earlier ones certainly work. Also I think I'm using (successfully) obj2dat.py, not obj2dattex.py . These of course may be the same file just with a re-name along the way somewhere...
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Yep, they all need converting to run successfully in 2.6 ( they were developed and work fine in 2.4), they're indeed different scripts, some developed earlier than others. Obj2dattex.py is slightly more complex than obj2dat, which serves as a valuable reference if you need to twiddle the converstion files...
Btw, python is an interpreted language, so those .py files are just text. If you're interested, you can edit them ( upgrade them to 2.6, anyone? ) in notepad++ already!
Btw, python is an interpreted language, so those .py files are just text. If you're interested, you can edit them ( upgrade them to 2.6, anyone? ) in notepad++ already!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
On a related matter, I had to downgrade Python 2.6 to 2.4 due to 1.73.4 dev source tools python debug console requiring tcl8.4Thargoid wrote:But as A_C says there are some issues with v2.6, but slightly earlier ones certainly work. Also I think I'm using (successfully) obj2dat.py, not obj2dattex.py . These of course may be the same file just with a re-name along the way somewhere...
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
Yep, that's why we provide the js console as a precompiled executable in windows. It neatly sidesteps most of these issues; besides, the average windows user would be stumped by having to install python in the first place...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
Glee!
This being available not from the oolite.org site, but from berlios.de instead. from http://prdownload.berlios.de/oolite-lin ... le-1.0.zip
<stimpy>Squeal!</stimpy>
This being available not from the oolite.org site, but from berlios.de instead. from http://prdownload.berlios.de/oolite-lin ... le-1.0.zip
<stimpy>Squeal!</stimpy>
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
A plist file is just a text file with a different extension. So worst case scenario make a .txt file (using a suitable editor that will write a vanilla text file without adding all sorts of hidden/special characters in it, ie not Windows Notepad) and then rename it from <foo>.txt to <foo>.plist.Commander Learner wrote:Another Problem (Sheesh..) Can't save shipdata file as plist.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~
No, Wordpad is fine (it's what I 50:50 use in parallel with Notepad ++) again as long as you're saving to text files of course.
It's Notepad that screws things up (mainly in relation to carriage returns and line feeds iirc).
It's Notepad that screws things up (mainly in relation to carriage returns and line feeds iirc).
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Y’know, there must be someone in the commoonity who knows their way around Python and can upgrade our various scripts. Come on, someone! There’s a listing in the illustrious Official Contributors File up for grabs!
E-mail: [email protected]
Funny, I've had no problems with objtodattex.py & Python 2.6 on my machine (Win XP pro SP3).
As long as you have UV-mapped the model and have:
objtodattex.py
.obj
.mtl
.tga
in the same directory, and type objtodattex.py *yourmodel*.obj in command prompt (having navigated to correct directory there) + hit enter.
As long as you have UV-mapped the model and have:
objtodattex.py
.obj
.mtl
.tga
in the same directory, and type objtodattex.py *yourmodel*.obj in command prompt (having navigated to correct directory there) + hit enter.
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
- Commander Learner
- Dangerous
- Posts: 123
- Joined: Thu Aug 20, 2009 12:08 pm
- Location: Somewheeeeeere over the rainbooooooooooow~