From 1860441ee7cd4ec75c99cc372fccec839c525f46 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 28 Nov 2018 17:51:13 +0100 Subject: Use collection and instance terminology in Python API This follows naming convention agreed on in T56648. --- object_edit_linked.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'object_edit_linked.py') diff --git a/object_edit_linked.py b/object_edit_linked.py index 85359a51..28a50096 100644 --- a/object_edit_linked.py +++ b/object_edit_linked.py @@ -76,8 +76,8 @@ class EditLinked(bpy.types.Operator): @classmethod def poll(cls, context): return settings["original_file"] == "" and context.active_object is not None and ( - (context.active_object.dupli_group and - context.active_object.dupli_group.library is not None) or + (context.active_object.instance_collection and + context.active_object.instance_collection.library is not None) or (context.active_object.proxy and context.active_object.proxy.library is not None) or context.active_object.library is not None) @@ -87,9 +87,9 @@ class EditLinked(bpy.types.Operator): #print(bpy.context.active_object.library) target = context.active_object - if target.dupli_group and target.dupli_group.library: - targetpath = target.dupli_group.library.filepath - settings["linked_objects"].extend({ob.name for ob in target.dupli_group.objects}) + if target.instance_collection and target.instance_collection.library: + targetpath = target.instance_collection.library.filepath + settings["linked_objects"].extend({ob.name for ob in target.instance_collection.objects}) elif target.library: targetpath = target.library.filepath settings["linked_objects"].append(target.name) @@ -180,7 +180,7 @@ class PanelLinkedEdit(bpy.types.Panel): if context.active_object.proxy: target = context.active_object.proxy else: - target = context.active_object.dupli_group + target = context.active_object.instance_collection if settings["original_file"] == "" and ( (target and @@ -219,7 +219,7 @@ class PanelLinkedEdit(bpy.types.Panel): # when launching a new Blender instance. Nested links don't # currently work when using a single instance of Blender. props = layout.operator("object.edit_linked", - text="Edit Library: %s" % context.active_object.dupli_group.name, + text="Edit Library: %s" % context.active_object.instance_collection.name, icon="LINK_BLEND") props.use_autosave = scene.use_autosave props.use_instance = scene.use_instance @@ -227,7 +227,7 @@ class PanelLinkedEdit(bpy.types.Panel): layout.prop(scene, "use_instance") layout.label(text="Path: %s" % - context.active_object.dupli_group.library.filepath) + context.active_object.instance_collection.library.filepath) else: props = layout.operator("wm.return_to_original", icon="LOOP_BACK") -- cgit v1.2.3