Python - 3DS Import Problem

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

neil
Posts: 26
Joined: Fri Oct 18, 2002 1:54 pm
Location: Scotland
Contact:

Postby neil » Mon May 08, 2006 9:25 pm

On a Mac (which I use at work, although I have only occasionally used Blender on it), applications are actually special folders. So the item "Blender" in "Applications" is actually a folder, and the scripts are in a sub folder of that. There are 3 ways I can think of to get at them:

1) Using a program called "Tinker Tools" (I think it is a free download) you can get the finder to allow you to go into these folders.

2) You can use the Terminal and then "cd" into it - it will be something like

Code: Select all

cd /Applications/Blender
and then by using ls to see what is there and cd you can navigate into it.

3) Probably the simplest when using Blender: Open the text file in Blenders text window. Because Blender does all its own file browsing it sees these "application folders" as normal folders and lets you go in as usual.

I'm afraid I'm not infront of a Mac at present, but AFAIK that is how you do it.

Neil.

greg57
Posts: 4
Joined: Thu Mar 09, 2006 1:48 pm
Location: Istanbul

Postby greg57 » Mon May 15, 2006 11:25 pm

Hi folks, :)
when I saw your thread I thought my problems were over, so I changed the python script as described but I still got an error message:

Importing "/Volumes/Macintosh HD/Users/IO/Documents/Blender/GREGORY_3D2.3ds"
Non-Fatal Error: Version greater than 3, may not load correctly: 50331648
Traceback (most recent call last):
File "<string>", line 646, in my_callback
File "<string>", line 634, in load_3ds
File "<string>", line 603, in process_main_chunk
File "<string>", line 279, in process_object_block
struct.error: unpack str size does not match format

Any idea ? I'm desperately trying to get what our architects is drawing with AutoCAD... :?

dfelinto
Posts: 15
Joined: Wed May 17, 2006 8:44 pm
Location: Rio de Janeiro, Brasil

Postby dfelinto » Wed May 17, 2006 10:08 pm

greg57, could you share that file?

So I can check if the problem is your machine, our machine :) or the Blender it self.

greg57
Posts: 4
Joined: Thu Mar 09, 2006 1:48 pm
Location: Istanbul

Postby greg57 » Thu May 18, 2006 4:21 pm

dfelinto wrote:greg57, could you share that file?

So I can check if the problem is your machine, our machine :) or the Blender it self.


Sure but... are you part of the devlopment team ? Indead I 've solved my problem using Wings3d as a .3DS to .obj translator. Works just fine.
...
Well I guess you will have to give me your email address. Looks like Personal Messages are deacivated and I maybe dumb but I see no way to upload the file in the forum...

Although I've found a workaround, I appreciate your help very much.

dfelinto
Posts: 15
Joined: Wed May 17, 2006 8:44 pm
Location: Rio de Janeiro, Brasil

Postby dfelinto » Fri May 19, 2006 4:57 am

Hi greg57!
like am I an archictecture student, I don't have enough time to do every thing I like, and coding Blender isn't my priority.

But, frequently I need to import some 3DS objects, and I hope the Blender 3DS import script became better, much better.

Well, then as I can help? If we can discover specifics errors on the script plugin, some developer could help and solve the specific problem.

As Windows, Linux and Macintosh are very different, are possible that the problem is specific of its system, and not a Blender bug.

Regards!
mail email: dfelinto (at) google (dot) com

Dalai Felinto
Rio de Janeiro - Brasil

cniemira
Posts: 1
Joined: Sun May 21, 2006 4:26 pm

Postby cniemira » Sun May 21, 2006 4:34 pm

Hello!
I noticed the same problem (exact same error message) that greg57 describes... and since I was experimenting with a free model, I don't mind sharing. ;-)

http://www.geo-metricks.com/geo-shop/fr ... eb/zeb.zip

Code: Select all

Non-Fatal Error:  Version greater than 3, may not load correctly:  50331648
Traceback (most recent call last):
  File "<string>", line 646, in my_callback
  File "<string>", line 634, in load_3ds
  File "<string>", line 603, in process_main_chunk
  File "<string>", line 279, in process_object_block
struct.error: unpack str size does not match format


Note this is blender 2.41 under MacOS 10.4 using python 2.3.5
That same model imports correctly under blender 2.41 on Linux using python 2.4.3 (after the ValueError correction is made).

Perhaps it's a Python version incompatibility?

greg57
Posts: 4
Joined: Thu Mar 09, 2006 1:48 pm
Location: Istanbul

Postby greg57 » Sun May 21, 2006 7:00 pm

cniemira wrote:Hello!
I noticed the same problem (exact same error message) that greg57 describes... and since I was experimenting with a free model, I don't mind sharing. ;-)

http://www.geo-metricks.com/geo-shop/fr ... eb/zeb.zip

Code: Select all

Non-Fatal Error:  Version greater than 3, may not load correctly:  50331648
Traceback (most recent call last):
  File "<string>", line 646, in my_callback
  File "<string>", line 634, in load_3ds
  File "<string>", line 603, in process_main_chunk
  File "<string>", line 279, in process_object_block
struct.error: unpack str size does not match format


Note this is blender 2.41 under MacOS 10.4 using python 2.3.5
That same model imports correctly under blender 2.41 on Linux using python 2.4.3 (after the ValueError correction is made).

Perhaps it's a Python version incompatibility?


Okay, so that's a Mac specific problem probably linked to Python version then, right ? Did you use try the Wings3d workaround? I advise you to. It works perfectly (you can even get the materials). btw, I've alo sent my model to dfelinto...

dfelinto
Posts: 15
Joined: Wed May 17, 2006 8:44 pm
Location: Rio de Janeiro, Brasil

Postby dfelinto » Mon May 22, 2006 2:34 am

Both 3ds models are importing correctly in Blender 2.41 and Blender CVS Windwos XP, with Python 2.4.

Regards!

MachSpeeds
Posts: 3
Joined: Tue Oct 07, 2008 11:55 pm
Location: MI

Postby MachSpeeds » Mon Oct 13, 2008 2:30 am

I'm getting the same problem with Blender 2.40

the code says:

File "<string>", line 646, in my_callback
File "<string>", line 621, in load_3ds
IO Error: (Errno 2) no such file or directory: '\\Documents and Settings\Desktop\9d\blender-2.40-windows\*.3ds'

please reply.

dfelinto
Posts: 15
Joined: Wed May 17, 2006 8:44 pm
Location: Rio de Janeiro, Brasil

Postby dfelinto » Mon Oct 13, 2008 3:20 am

MachSpeeds wrote:I'm getting the same problem with Blender 2.40

the code says:

File "<string>", line 646, in my_callback
File "<string>", line 621, in load_3ds
IO Error: (Errno 2) no such file or directory: '\\Documents and Settings\Desktop\9d\blender-2.40-windows\*.3ds'

please reply.


Hi MachSpeeds,

can you test it with a more recent version of Blender (2.48RC1)?
http://download.blender.org/release/Blender2.48rc/

Cheers,
Dalai
Rio de Janeiro - Brasil
http://blenderecia.orgfree.com

MachSpeeds
Posts: 3
Joined: Tue Oct 07, 2008 11:55 pm
Location: MI

Postby MachSpeeds » Tue Oct 14, 2008 10:29 pm

Okay, I tested it, and, it took a long time. So I checked on it using the Control>alt>delete thing, and the Task Manager says Not Responding.

I'm sorry for being such a n00b.

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Tue Oct 14, 2008 10:47 pm

IO Error: (Errno 2) no such file or directory: '\\Documents and Settings\Desktop\9d\blender-2.40-windows\*.3ds'


That looks like a bad path. Is it supposed to be an (unsupported!) UNC pathname? Or maybe a Blender specific (note the \\ ) relative path?

Also the filename is a wild-card *.3ds

Do try this with a version of Blender and the script newer than 2.40. Current is 2.47. Lots of bug-fixing between then and now.

dfelinto
Posts: 15
Joined: Wed May 17, 2006 8:44 pm
Location: Rio de Janeiro, Brasil

Postby dfelinto » Wed Oct 15, 2008 3:17 am

MachSpeeds, is this a "public" file that other people can have access for it?

It would be easier to test it here.
Rio de Janeiro - Brasil

http://blenderecia.orgfree.com

MachSpeeds
Posts: 3
Joined: Tue Oct 07, 2008 11:55 pm
Location: MI

Postby MachSpeeds » Wed Oct 15, 2008 10:38 pm

dfelinto wrote:MachSpeeds, is this a "public" file that other people can have access for it?

It would be easier to test it here.


here you go. link: http://www.badongo.com/file/7097987

ice_rock
Posts: 1
Joined: Mon May 11, 2009 4:33 am

Same problem for me.. Hope to be helped.. needed badly..

Postby ice_rock » Mon May 11, 2009 4:39 am

[Object "Mesh"]
Traceback (most recent call last):
File "(string)", line 804, in button
File "(string)", line 661, in fExport
File "(string)", line 330, in doExport
File "(string)", line 1144, in __init__
AttributeError: 'Blender Mesh' object has no attribute 'getTangents'


guys, how do i make up for this.. :(
I'm Cute


Return to “Python”

Who is online

Users browsing this forum: No registered users and 2 guests