[Bf-extensions-cvs] [9bfd19da] master: 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.
Vilém Duha
noreply at git.blender.org
Wed Oct 2 16:11:35 CEST 2019
Commit: 9bfd19da51000b918a861cc31d5f49cfb76685a0
Author: Vilém Duha
Date: Thu Sep 12 20:54:09 2019 +0200
Branches: master
https://developer.blender.org/rBA9bfd19da51000b918a861cc31d5f49cfb76685a0
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.
===================================================================
M blenderkit/download.py
===================================================================
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:
More information about the Bf-extensions-cvs
mailing list