Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-11-28 19:51:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-28 20:23:31 +0300
commit1860441ee7cd4ec75c99cc372fccec839c525f46 (patch)
treefe8ef38166fce2ff001b2b92dcc77458526e4ebc /object_edit_linked.py
parentfef2540b25775c3e1e4012bec35ddb8695daa209 (diff)
Use collection and instance terminology in Python API
This follows naming convention agreed on in T56648.
Diffstat (limited to 'object_edit_linked.py')
-rw-r--r--object_edit_linked.py16
1 files changed, 8 insertions, 8 deletions
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")