BlenderKit: change group naming to collections

This commit is contained in:
Vilém Duha 2019-09-29 00:04:48 +02:00
parent 6ec965484c
commit a674c1dd86
3 changed files with 6 additions and 6 deletions

View File

@ -1167,11 +1167,11 @@ class BlenderKitModelSearchProps(PropertyGroup, BlenderKitCommonSearchProps):
append_method: EnumProperty(
name="Import Method",
items=(
('LINK_GROUP', 'Link Group', ''),
('LINK_COLLECTION', 'Link Collection', ''),
('APPEND_OBJECTS', 'Append Objects', ''),
),
description="choose if the assets will be linked or appended",
default="LINK_GROUP"
default="LINK_COLLECTION"
)
append_link: EnumProperty(
name="How to Attach",

View File

@ -85,7 +85,7 @@ def append_scene(file_name, scenename=None, link=False, fake_user=False):
return scene
def link_group(file_name, obnames=[], location=(0, 0, 0), link=False, parent = None, **kwargs):
def link_collection(file_name, obnames=[], location=(0, 0, 0), link=False, parent = None, **kwargs):
'''link an instanced group - model type asset'''
sel = utils.selection_get()

View File

@ -299,7 +299,7 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None,
s = bpy.context.scene
sprops = s.blenderkit_models
# TODO this is here because combinations of linking objects or appending groups are rather not-userfull
if sprops.append_method == 'LINK_GROUP':
if sprops.append_method == 'LINK_COLLECTION':
sprops.append_link = 'LINK'
sprops.import_as = 'GROUP'
else:
@ -337,7 +337,7 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None,
return
if sprops.import_as == 'GROUP':
parent, newobs = append_link.link_group(file_names[-1],
parent, newobs = append_link.link_collection(file_names[-1],
location=downloader['location'],
rotation=downloader['rotation'],
link=link,
@ -359,7 +359,7 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None,
elif kwargs.get('model_location') is not None:
if sprops.import_as == 'GROUP':
parent, newobs = append_link.link_group(file_names[-1],
parent, newobs = append_link.link_collection(file_names[-1],
location=kwargs['model_location'],
rotation=kwargs['model_rotation'],
link=link,