Revision: 21360
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21360
Author:   campbellbarton
Date:     2009-07-04 02:33:50 +0200 (Sat, 04 Jul 2009)

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

Modified Paths:
--------------
    trunk/blender/release/scripts/object_active_to_other.py

Modified: trunk/blender/release/scripts/object_active_to_other.py
===================================================================
--- trunk/blender/release/scripts/object_active_to_other.py     2009-07-03 
20:03:24 UTC (rev 21359)
+++ trunk/blender/release/scripts/object_active_to_other.py     2009-07-04 
00:33:50 UTC (rev 21360)
@@ -38,13 +38,13 @@
                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():


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to