From 3c85b2abc549b853637afaa08db29ac1ecb7ff73 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 4 Jul 2009 00:33:50 +0000 Subject: [PATCH] fix for python error when running in local view, the layer wasnt being set from the right object. --- release/scripts/object_active_to_other.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release/scripts/object_active_to_other.py b/release/scripts/object_active_to_other.py index 131d1f63d74..68aa6a3a039 100644 --- a/release/scripts/object_active_to_other.py +++ b/release/scripts/object_active_to_other.py @@ -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():