Skip to content

Commit

Permalink
fix for multiple duplicates from last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Spyduck committed Mar 29, 2017
1 parent e5427cc commit bf900ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vr_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def instantiate(self, tag):
newobj = []
for obj in self.objects:

bpy.ops.object.select_all(action='DESELECT')
bpy.ops.object.select_pattern(pattern=self.id)
bpy.ops.object.duplicate(linked=True)
newobj.append(bpy.context.selected_objects[0])
Expand Down Expand Up @@ -260,7 +261,7 @@ def instantiate(self, tag):
else:
newobj = []
for obj in self.objects:
#bpy.ops.object.select_pattern(pattern=obj.name)
bpy.ops.object.select_all(action='DESELECT')
bpy.ops.object.select_pattern(pattern=obj.name)
bpy.ops.object.duplicate(linked=True)
newobj.append(bpy.context.selected_objects[0])
Expand Down

0 comments on commit bf900ab

Please sign in to comment.