Comments (30)
This is usually caused by a missing part. If the importer cannot find a part, it simply fails silently, leaving however much of the model had been imported previously. I am currently working (without success) on finding a way around this.
from ldr-importer.
Thanks, I was thinking what could have done this and removed the Lsynth hose. This time it nearly loaded the whole model.. But there is still something wrong.
A bit strange since all have been recently rebuildt with the current LDraw library.
I can understand the Lsynth parts since it is not a real part, but everything else should be normal lego parts from Ldraw library. I removed the only one currently in the model.
from ldr-importer.
Could you try running Blender from the command line (or terminal depending on what operating system you use), and posting the output here?
from ldr-importer.
I cant get the whole list but i think it it gves some file not found in the beginning before it start prosessing the file
Im running on windows 7
It starts with this
[LDR Importer] Attempting to import C:\Temp\DS Exp 2013_00001-1.ldr - 12:32:18
[LDR Importer] Could not find file Unknown - 12:32:18
[LDR Importer] File not found: Unknown - 12:32:18
and then a lot of
Info: Removed 909 vertices
until it ends with
[LDR Importer] C:\Temp\DS Exp 2013_00001-1.ldr successfully imported! - 12:30:13
If you want, I can send you the file?
from ldr-importer.
Yes please!
It would appear there's some part definitions that don't exist.
from ldr-importer.
How do i send it to you.? I cant attach it to ths message.
What i have seen is that there is the bottom (called back) and the front part of the model that is missing.in the main file. But the data is in the file but some how not processed.
from ldr-importer.
Paste the .ldr file in https://gist.github.com/ and give me the link?
from ldr-importer.
I hope i did ths the rigth way
https://gist.github.com/Mrfuture/c911c5aad896f9be8f2c
from ldr-importer.
Looking at that file, it would appear that there are multiple models in it (similar to a .mpd). I don't believe that that is well supported, although I may be wrong.
EDIT: The model looks pretty neat in LDView!
EDIT2:
@Mrfuture: The file appears to import correctly in the latest version of LDR-Importer and Blender 2.69 (running on Ubuntu 13.04)
There are some missing vertices (mainly on the engine dishes, but this is currently not fixable, and is related to the vertice definitions of some ldraw parts). As a rule of thumb (at least for me) refrain from trying to import parts that are round and concave.
Increasing the scale, turning on "Use High-Res Bricks" or switching Model Cleanup may help alleviate the problem a bit, but will also increase lag and require more memory.
from ldr-importer.
https://gist.github.com/Mrfuture/fe43635cf66058467dd0
Here is another example. This worked perfect.
Bouth models was something me and my friend created back in the 1990 something.
This one was his ship. and the first was mine. The MOCs still standing.
Now im soon 45 and still build with Lego from tme to time.
from ldr-importer.
Hello!
I have not yet tested your models, but from reading the code it seems they are indeed multi-part dat models as Tribex thought. LDR Importer does not currently support this format (see #7), but we do plan on eventually fixing this, most likely after we complete a much needed rewrite.
I have never tested how the script reacts to a multi-part dat, but your descriptions makes sense (if that makes any sense :P) to how it might treat one.
In the mean time, we will try to help you import your model. If it is possible you may want to start with splitting the multiple parts into separate files and referencing them in one large model. π
from ldr-importer.
Hi
I can try over the weekend to split up the model in seperat files. If not i get caught up in christmas prep.
But why did the second model work and not the first one. The files looks the same but the second is more clean than the first one.
And it could always be an old problem coming back and haunt me. I had a problem with the file complaining about a non exixtent missing file when loading the file.. But since the main model missing the bottom and the front part it is a bit strange.
from ldr-importer.
New information. The problem has been solved. Beside for the problem with Lsynth that make the same problem.
I found one part in the file after loading it in LDview. It reported an unkown file at line 372. I checked the file in Notepad with line number turned on and found it. it was in the back11.ldr section of the file i removed that line and saved.
I did an new export to LDR files and then lmported it into Blender. This time the whole ship appeard.
Thanks for all help and good luck with the importer. I will keep a tab on this one. Have been looking for something like it for some time.
from ldr-importer.
Congrats on getting it to work! We'll try to make the importer more predictable in the future.
from ldr-importer.
Hi
Sorry to bother you again.
I have fixed some other problem and now was playing with the export to Blender again.
But suddenly I get these errors in the consol window in Blender
[LDR Importer] ERROR: Reason: UnicodeDecodeError. - 17:43:28
[LDR Importer] Attempting to import C:\temp\DS Exp 2013_00001.ldr - 17:43:42
[LDR Importer] ERROR: UnicodeDecodeError
Traceback (most recent call last):
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\addons\import_ldraw.py", line 766, in create_model
LDrawFile(context, file_name, mat)
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\ addons\import_ldraw.py", line 126, in init
self.parse(filename)
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\addons\import_ldraw.py", line 244, in parse
lines = f_in.readlines()
File "C:\Program Files\Blender Foundation\Blender\2.68\python\lib\codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 92: invalid start byte
- 17:43:42
[LDR Importer] ERROR: Reason: UnicodeDecodeError. - 17:43:42
I have restarted blender, reexported the file but stil I get this problem right a way after select the file and start.
I also have got the Lsynth to work with the export. I needed to copy the Lsynth parts files to Ldraw\parts dir.
May be something for later that it check the unofficial\Lsynth catalog if it cant find the file in main Ldraw dirs ?
Petter
from ldr-importer.
Wow, GitHub broke that email formatting.
I've seen this error before in some of my personal projects. I occurs when a file with an Big or Little Endian encoding is read but the file is opened using UTF-8 encoding. LDR models are supposed to use UTF-8 (I believe NO-BOM), so that is how the script attempts to read them. Are one of the models you posted above the model you are importing? I'll look into fixing the issue this afternoon.
from ldr-importer.
@Mrfuture The issue should be fixed in #37. I thoroughly tested it myself. π
And it could always be an old problem coming back and haunt me. I had a problem with the file complaining about a non exixtent missing file when loading the file.. But since the main model missing the bottom and the front part it is a bit strange.
New information. The problem has been solved. Beside for the problem with Lsynth that make the same problem. I found one part in the file after loading it in LDview. It reported an unkown file at line 372. I checked the file in Notepad with line number turned on and found it. it was in the back11.ldr section of the file i removed that line and saved.
I did an new export to LDR files and then lmported it into Blender. This time the whole ship appeard.
Yea, that is #11, Non-existent bricks crash script. This happens because of the way the script is written, and attempts to skip those bricks and move on have failed, same for trying to throw an error box rather than silently failing. I added a section in the Readme warning about this. Rest assured, we know about the error, and we ourselves (well, I know I do) get annoyed by it. π
Hm, I'll have to look up these Lsynth bricks so I know what you are referring to and check compatibility.
from ldr-importer.
The ONE With The .ldr not The mpd. But that file is The one i export to ldr files
Petter
----- Opprinnelig melding -----
Fra: "Triangle717" [email protected]
Sendt: β21.β12.β2013 18:05
Til: "le717/LDR-Importer" [email protected]
Kopi: "Mrfuture" [email protected]
Emne: Re: [LDR-Importer] Wrong part of the model shows up (#36)
Wow, GitHub broke that email formatting.
I've seen this error before in some of my personal projects. I occurs when a file with an Big or Little Endian encoding is read but the file is opened using UTF-8 encoding. LDR models are supposed to use UTF-8 (I believe NO-BOM), so that is how the script attempts to read them. Are one of the models you posted above the model you are importing? I'll look into fixing the issue this afternoon.
Reply to this email directly or view it on GitHub:
#36 (comment)
from ldr-importer.
Lsynth is a part generator for bricks like hoses and wires for decoration,pneumatic or eletrick parts. You find it in MLCad.
Those have a set of basic "bricks" it use to emulate the hose or wire look.
from ldr-importer.
OK Now i have tested the updated importer but still has the error,
I have removed the importer and installed it again into blender.
I have tried the other way to try to save the file again in MLCad and edit it thete but it looks like if it has been edited
But what i strange is that if i delete the export and do a new export. It still gives the error even when i never have edit that file. But i can import other files.
from ldr-importer.
@Mrfuture What is the error you are getting now with the updated script? Can you upload the model to Dropbox or some place like that so I can examine the file directly and try to come up with a proper fix?
from ldr-importer.
Hi again
To me it looks like it is the same message.
Read new prefs: C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\
config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender\2.68\python
[LDR Importer] Configuration file found at
C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\presets\
io_import_ldraw\config.py - 12:15:51
[LDR Importer] The LDraw Parts Library installation path to be used is
C:\Program Files (x86)\LDraw - 12:15:51
reloading addon: import_ldraw 1387665876.4707716 1387883962.689631 C:\Users\Pett
er\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\addons\import_ldraw.p
y
Modules Installed from 'C:\Users\Petter\Desktop\LDR-Importer-v1.1\import_ld
raw.py' into 'C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\
2.68\scripts\addons' ()
trying to save userpref at C:\Users\Petter\AppData\Roaming\Blender Foundation\Bl
ender\2.68\config\userpref.blend ok
<!> event has invalid window
[LDR Importer] Attempting to import C:\temp\DS Exp 2013_00001.ldr - 12:20:04
[LDR Importer] ERROR: UnicodeDecodeError
Traceback (most recent call last):
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\
addons\import_ldraw.py", line 766, in create_model
else:
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\
addons\import_ldraw.py", line 126, in init
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\
addons\import_ldraw.py", line 244, in parse
File "C:\Program Files\Blender Foundation\Blender\2.68\python\lib\codecs.py",
line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 92: invalid
start byte
- 12:20:04
[LDR Importer] ERROR: Reason: UnicodeDecodeError. - 12:20:04
I think it must be something with this file. Since if I use another model it works fine.
If I take this to LDView it does not report any error.
But what is strange is that it looks like it happened something to the main file since if I export it into Ldr files from MLCad it does not work anymore with the importer. Even if I do this or saving under a new name and do a new export it stil fail.
The file attached is an exported file. The mpd from earlier is the main model file,
But take your time. May be I going to complete the model before I try to import it into Blender again. But not today. Itβs Christmas and family first :-)
Merry Christmas
From
Petter Lerdahl
Fra: Triangle717 [mailto:[email protected]]
Sendt: 24. desember 2013 00:21
Til: le717/LDR-Importer
Kopi: Mrfuture
Emne: Re: [LDR-Importer] Wrong part of the model shows up (#36)
What is the error you are getting now with the updated script? Can you upload the model to Dropbox so I can
β
Reply to this email directly or view it on GitHub #36 (comment) . https://github.com/notifications/beacon/6229698__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwMzM3MzYzMywiZGF0YSI6eyJpZCI6MjI0MjU3NjR9fQ==--63d2bd29e4cce5cdff02caa2bb6a80909a02ea1a.gif
from ldr-importer.
But not today. Itβs Christmas and family first :-)
Amen to that. :D
from ldr-importer.
Maybe you should us a different editor like Notepad++?
from ldr-importer.
The windows notepad have option to save as following format
Ansi (default), Unicode, Unicode big endian and UT-8
I have tried all exept the endian one. All fails.
But i shall try the other.
from ldr-importer.
@Mrfuture It looks like you are still on the v1.1 release rather than using the newest revision from the master
. Do this:
- Uninstall the current version of the plug-in from Blender.
- Download the newest revision from the master branch and save it somewhere (like your Desktop).
- Restart Blender, and install the revision you just downloaded. When you go to activate it, it should report as version 1.2 (though that is incorrect, it's actually a pre-release).
- Try your model again and report back to me what happens. :)
I tested it myself using a model encoded in ANSI
, UTF-8 NOBOM
, UTF-8 BOM
, UCS-2 BE
and UCS-2 LE
encoding, and every single time it imported.
from ldr-importer.
lsynth does not come with mlcad afaik.
it is a standalone addition to the ldraw library, comprising files for synthetisation of flexible parts
like hoses or cables.
its files need to be found by the importer.
usually, those files lie in a folder separate from the ldraw library,
so the importer will not find them.
example: my lsynth files are located in d:\lego\ldraw\lsynth,
i.e., in a sibling folder next to d:\lego\ldraw\p
my suggestion is to let the user specify additional pathes to look for files in.
this option should be a list, editable in the blender GUI options of the importer script.
in your case, you would add the path to your lsynth files to that list, so they will be found.
as a workaround, until that option is available, you could put the lsynth files
in the same folder where your model is
and use a version of LDR importer which contains a fix for #40
from ldr-importer.
I have now uninstalled v.1.1 (reported as v1.2 in blender 2.68
then exited and then downloaded the new file from the link ie717 provided. in the same folder as the old files and yes to overwrite.
Then started blender and selected the map from the app add on menu in settings.
Checked to activate it. The version was 1.2 save the new setup.
Exited blender and started again.
Then selected the file to import in the import ldraw.
then it happend again.
Read new prefs: C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68
config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender\2.68\python
[LDR Importer] Configuration file found at
C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\presets
io_import_ldraw\config.py - 17:59:34
[LDR Importer] The LDraw Parts Library installation path to be used is
C:\Program Files (x86)\LDraw - 17:59:34
[LDR Importer] Attempting to import C:\temp\DS Exp 2013-x1_00001.ldr - 17:59:57
[LDR Importer] ERROR: UnicodeDecodeError
Traceback (most recent call last):
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts
addons\import_ldraw.py", line 809, in create_model
LDrawFile(context, file_name, mat)
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts
addons\import_ldraw.py", line 162, in init
self.parse(filename)
File "C:\Users\Petter\AppData\Roaming\Blender Foundation\Blender\2.68\scripts
addons\import_ldraw.py", line 287, in parse
lines = f_in.readlines()
File "C:\Program Files\Blender Foundation\Blender\2.68\python\lib\codecs.py",
line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 92: invalid
start byte
- 17:59:57
[LDR Importer] ERROR: Reason: UnicodeDecodeError. - 17:59:57
I have tried different files of the same model but it still fails.
Could it be the Blender version ?
from ldr-importer.
MinnieTheMoocher If you install the all in one installer for Ldraw you can choose if you want it or not. but i think the menu is in MLcad but it does not work if you not install it. (aka ithe add on not installed.) but i could be wrong :-)
I cheated a bit to copy the Lsynth files into ldraw parts catalog. but the best is if you can add aditional or it check in the lsynth map.
from ldr-importer.
I have been doing some searching for why the files does not work.
I splitted up the set to its sub models (export under multipart menu) and then tried to load ech part into blender.
- multisub part files (sub model with other sub models Created to make a bigger sub model.. This only load some parts. Maybe only those in the main file.
- The LSynth parts looks like not always working. If i'm correct, this made the strange file unicode error. But i have to check it a bit more.
But then again all this is not new to the things neede to be fixed. So im ether be waiting or make i way around.
I wil give an update if i get it to work,
This tests have been done with the v1.1 of the importer I have only that one on my work computer .
I wil try the same test at home also with v1.2
from ldr-importer.
Related Issues (20)
- Install errors on OS X with version 1, 3, 0 HOT 5
- Missing LDraw Search Path on Linux HOT 2
- problem: 'cannot find c:/Ldraw' HOT 3
- ldr-importer does not import all lego blocks HOT 19
- Can't install 1.3.1 HOT 3
- Incorrect Normals / Broken Normals with some random parts/bricks HOT 2
- Unexpected normals when cleanup disabled HOT 1
- Model file contents too short to extract header HOT 7
- 1.3.2 doesn't work - back to 1.2.0 HOT 4
- Using LDR-Importer from python API HOT 2
- "Basic Cleanup" function corrupts LEGO logo in open studs HOT 3
- FBX export is not supporting Cycles nodes HOT 1
- Problem: cannot find Ldraw installation at c:\ HOT 1
- Path's reset of LDraw Parts Library
- Cannot Find LDraw Installation at C:/Ldraw HOT 4
- Doesn't load model
- LDD to LDR, missing pieces, moved pieces HOT 1
- LDD-Importer-Exporter for the future HOT 1
- I can't use this addon
- Traceback call issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldr-importer.