-
Notifications
You must be signed in to change notification settings - Fork 19
Wrong part of the model shows up #36
Comments
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. |
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. |
Could you try running Blender from the command line (or terminal depending on what operating system you use), and posting the output here? |
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 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? |
Yes please! It would appear there's some part definitions that don't exist. |
How do i send it to you.? I cant attach it to ths message. |
Paste the .ldr file in https://gist.github.com/ and give me the link? |
I hope i did ths the rigth way |
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: 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. |
https://gist.github.com/Mrfuture/fe43635cf66058467dd0 |
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. 😉 |
Hi |
New information. The problem has been solved. Beside for the problem with Lsynth that make the same problem. 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. |
Congrats on getting it to work! We'll try to make the importer more predictable in the future. |
Hi Sorry to bother you again. I have fixed some other problem and now was playing with the export to Blender again. [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 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
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. Petter |
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. |
@Mrfuture The issue should be fixed in #37. I thoroughly tested it myself. 😉
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. |
The ONE With The .ldr not The mpd. But that file is The one i export to ldr files ----- Opprinnelig melding ----- 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: |
Lsynth is a part generator for bricks like hoses and wires for decoration,pneumatic or eletrick parts. You find it in MLCad. |
OK Now i have tested the updated importer but still has the error, |
@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? |
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
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
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 92: invalid start byte
[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. 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:notifications@github.com] What is the error you are getting now with the updated script? Can you upload the model to Dropbox so I can — |
Amen to that. :D |
Maybe you should us a different editor like Notepad++? |
The windows notepad have option to save as following format But i shall try the other. |
@Mrfuture It looks like you are still on the v1.1 release rather than using the newest revision from the
I tested it myself using a model encoded in |
lsynth does not come with mlcad afaik. it is a standalone addition to the ldraw library, comprising files for synthetisation of flexible parts example: my lsynth files are located in d:\lego\ldraw\lsynth, 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 |
I have now uninstalled v.1.1 (reported as v1.2 in blender 2.68 [LDR Importer] Configuration file found at [LDR Importer] The LDraw Parts Library installation path to be used is [LDR Importer] Attempting to import C:\temp\DS Exp 2013-x1_00001.ldr - 17:59:57 [LDR Importer] ERROR: UnicodeDecodeError
[LDR Importer] ERROR: Reason: UnicodeDecodeError. - 17:59:57 I have tried different files of the same model but it still fails. |
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. |
I have been doing some searching for why the files does not work.
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. |
Hi.
I have exported a big model from MLCad and when i import the file that shall contain the whole model, Blender just show a small part of it,
I have been successful doing this with another file.
The model was an big multi part model saved as MPD
The text was updated successfully, but these errors were encountered: