-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Generating from Opened Blend File #730
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,7 @@ class model_lookup: | |
|
||
@classmethod | ||
def get(cls, item): | ||
return cls._models.get(item, item) | ||
return cls._models.get(item, None) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't want to default to returning the model id string in case if the id is invalid or the models haven't loaded yet. |
||
|
||
def fetch_installed_models(blocking=True): | ||
def on_done(future): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,6 +365,4 @@ def draw(self, context): | |
for i, line in enumerate(e.args[0].split('\n')): | ||
error_box.label(text=line, icon="ERROR" if i == 0 else "NONE") | ||
e._draw(prompt, context, error_box) | ||
except Exception as e: | ||
print(e) | ||
Comment on lines
-368
to
-369
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These exceptions can be safely propagated since its at the end of the draw function, now it can properly show traceback info on errors it encounters. |
||
return ActionsPanel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sure that model fetching completes when loading a file. Often when loading a file first it would fetch the models, then it gets queued in this timer, then the file actually loads and discards the timer. On rare occasions model fetching would complete along with the timer before the .blend file loads.