fix for python error when running in local view, the layer wasnt being set from the right object.

This commit is contained in:
Campbell Barton 2009-07-04 00:33:50 +00:00
parent 8a35439e23
commit 3c85b2abc5

@ -38,13 +38,13 @@ def my_object_util(sce):
Draw.PupMenu('Error%t|No active object selected')
return
mats = [ob.matrixWorld for ob in sce.objects.context if ob != ob_act]
mats = [(ob, ob.matrixWorld) for ob in sce.objects.context if ob != ob_act]
for m in mats:
for ob, m in mats:
ob_copy = ob_act.copy()
sce.objects.link(ob_copy)
ob_copy.setMatrix(m)
ob_copy.Layers = ob.Layers
ob_copy.Layers = ob.Layers & (1<<20)-1
def main():