diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2019-09-12 21:54:09 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2019-10-02 14:44:05 +0300 |
commit | 9bfd19da51000b918a861cc31d5f49cfb76685a0 (patch) | |
tree | a2ca78d3acfb67b58c56aa279b9c86ae0898aab6 /blenderkit | |
parent | bb1d6edaa65191f79ddd0fc425540758eb93cab0 (diff) |
BlenderKit: automatic append/link detection doesn't switch user's setting now.
Before it switched the setting, now the switch happens only internally.
todo - this should also do reporting to the user as to why appending/linking was switched.
Diffstat (limited to 'blenderkit')
-rw-r--r-- | blenderkit/download.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/blenderkit/download.py b/blenderkit/download.py index b3ecbeab..6d65d919 100644 --- a/blenderkit/download.py +++ b/blenderkit/download.py @@ -306,18 +306,23 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None, sprops.append_link = 'APPEND' sprops.import_as = 'INDIVIDUAL' + #copy for override + al = sprops.append_link + import_as = sprops.import_as # set consistency for objects already in scene, otherwise this literally breaks blender :) ain = asset_in_scene(asset_data) + #override based on history if ain is not False: if ain == 'LINKED': - sprops.append_link = 'LINK' - sprops.import_as = 'GROUP' + al = 'LINK' + import_as = 'GROUP' else: - sprops.append_link = 'APPEND' - sprops.import_as = 'INDIVIDUAL' + al = 'APPEND' + import_as = 'INDIVIDUAL' + # first get conditions for append link - link = sprops.append_link == 'LINK' + link = al == 'LINK' # then append link if downloaders: for downloader in downloaders: |