-
Notifications
You must be signed in to change notification settings - Fork 19
Non-existent bricks crash script #11
Comments
...for now. The recursive parser, again, makes it hard. TODO: explore use of 2.69\scripts\addons\io_scene_fbx\import_fbx.py. Also, in the way future, skip the bricks that do not exist, rather than halt.
I got this partly fixed. It no longer crashes , but it kills the import process rather than skipping it (which is best). Even This may be something that can only be fixed by redoing the script to kill it's recursiveness, but I'm leaving the issue open because if it has to stop, it needs to say why. See around lines 180-184 for references to what I'm thinking. |
I'll take a look at this, it seems like it would be simple to fix. |
Go right ahead. I have already fixed the crash (as I said), but if you can get it to skip them, that's the best fix of them all. |
I've tried several things, and it ultimately looks as if the locate function won't return False or all conditionals are passing it through O_o How exactly does that loop even know when to move to the next brick? UPDATE: UPDATE2: UPDATE3: In practice, more of the file gets loaded, but it's still pretty bad. UPDATE 4: Currently the structure appears to be:
It really needs to use functions, not while recursions, lists, and objects. |
Wow, how did I miss all this?! Will comment tomorrow, time for sleep now + on GitHub android app, so commenting is not the best. |
@Banbury, do you see anything in Tribex's summaries that might enable skipping of nonexistent bricks, or is he right on the button that it may not be possible without the rewrite you said it badly needs (which I agree with). |
Banbury and I have already noted that. It needs to be rewritten to kill the (bad) recursion. It might still need a class, but there is a much better way to do all this, and the recursion is clearly hampering progress. I know we already have a few targets for v1.2, but I am going to suggest holding off on those for a rewrite in v1.2 (but I'll speak more on that later. No need to comment on this idea right now 😉). |
Since this can't seem to be fully fixed right now, at least we could have some sort of error message thrown if this happens. I tried adding |
Thats because |
Hm. I should be able to fix that. Will try either this afternoon or tonight, whenever I get the chance. |
I tried this, and was unable to do it. In the mean time, the import will simply stop with a message in the readme starting this bug. |
Still have this in my sights, been on vacation that past week. |
Very well, Tribex. If you think you can pull off skipping bricks with all these loops, make a branch off the master and attempt it. However, I still think a script rewrite is in order to pull this off and to allow us to add new features (like MPD and Bricksmith models, the latter of I get asked about a lot). Hope you had a good vacation! |
I'm working on a script rewrite (and failing horribly), but thank you! |
We will all work on the rewrite, Tribex. I'll try to get a proposition for doing now rather then later posted within a few days. 😉 |
If a
.dat
does not exist, the script crashes with aFileNotFoundError
rather than skipping it and moving on. Currently, the line it stems from is wrapped in atry… except Exception
block. I anticipated this type of error but did not know what exactly would be raised, henceException
. I can fix this by either changing the exception or (if possible) doing aos.path.exists()
check on the variables before opening them for reading.Image
The text was updated successfully, but these errors were encountered: