mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix bim tool crash (#2446)
* Attempt to wait for assets (triggers infinite loop) * Using timer instead of sleep * remove sleep import * Reduce asset update interval Co-authored-by: Dion Moult <dion@thinkmoult.com>
This commit is contained in:
committed by
GitHub
parent
f63a33647b
commit
2e5ce6b862
@@ -144,9 +144,8 @@ class AuthoringData:
|
||||
obj.asset_mark()
|
||||
obj.asset_generate_preview()
|
||||
|
||||
def wait_for_asset_previews_generation(check_interval_seconds=0.03):
|
||||
def wait_for_asset_previews_generation(check_interval_seconds=0.001):
|
||||
if bpy.app.is_job_running("RENDER_PREVIEW"):
|
||||
print(f"{obj.name}: Generating preview...")
|
||||
return check_interval_seconds
|
||||
else:
|
||||
icon_id = obj.preview.icon_id
|
||||
@@ -162,7 +161,6 @@ class AuthoringData:
|
||||
# Instead, we only "hide" it by unlinking it from all collections.
|
||||
for collection in obj.users_collection:
|
||||
collection.objects.unlink(obj)
|
||||
print(f"{obj.name}: Preview generated!")
|
||||
return None
|
||||
|
||||
bpy.app.timers.register(wait_for_asset_previews_generation)
|
||||
|
||||
Reference in New Issue
Block a user