-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
/cc @rioforce |
Could you attach the LDraw file? |
Hey! Thanks for the PR! While I am a novice Python programmer, the Blender API is confusing to me, and the documentation is not very well written either. The quads fix work well! I never would have been able to write that! The only issues I see would be
The model in the screenshot: it's Again, thanks for the PR! 👍 😃 |
Hi, Another pull request is coming up shortly. That one fixes materials for sub-parts and multicolored bricks. |
I have tested importing the car model and everything works. Please retry with the patch in the new pull request. |
It works correctly, but this error comes up when I import a model not using HQ bricks with cleanup, then import the same using HQ bricks. Importing using HQ bricks and cleanup on the first import after loading Blender works. That's fine on all three points. If you know by experience those settings work best, than that better than standards. No comments are good too. I might be able to add them after thoughtfully reading the code. Again, thanks for the PRs! I've had this on here for a while, but never had anyone really take an interest in it aside from a few users. I'll close this one and merge the other one when it's ready. 😉 |
This seems to be a different problem entirely, Right now it's not possible to load the same model twice in a row. I'm restarting Blender every time. Again sorry for the lack of comments. As a programmer I really should know better :). But I like to spend my scarce time coding rather than writing comments. |
I reopened the PR for the sake of discussing this bug, although this works best in an Issue (which I still may make). Ah, so I assumed. Usually users won't restart Blender for every import, so this will need to be fixed. In the mean time, I can go ahead and merge the changes and make any small cleanup I've been seeing. That way, you can focus on this bug and the new changes can already be prepared for a future release. Yea, I know how that feels. For me, I usually try to comment it right after I get it working. Like I said, it's fine. |
I guess the crash has to do with all those nasty global variables. But without debugging Blender itself, that's hard to tell. Global variables are evil and should be avoided at all cost. Also the recursive constructor is probably not a good idea. |
Eek. That's not good in both areas. :( Well, if/when it is rewritten, hopefully whoever does it and write it to also support BrickSmith models (the format for those .ldr models is way different). I did figure out David wrote this in the Blender 2.5 days, and it is almost a clean port of a 2.4 script (I'll link it if needed), and this script was way from finished, if that explains anything. Alright, I'm gonna merge #2, even though it has that error (since it still imports and cleans up correctly despite the error), and later I'll port this bug to a proper issue. ;) |
The cause were global variables which weren't properly initialized.
Er, I just noticed the last commit for global variables (Mobile GitHub site didn't show it). Can you make a new PR with those changes? |
Nice new features in the script! :D One question, why did you use 0.502 for transparency? Don't you think 0.5 would be better, because it's a rounder number? ;) |
I have created a fix for quads with vertices in the wrong order. Without this some meshes will have unsightly holes.
Additionally I have made some small changes, to smooth the meshes.