[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3290] trunk/py/scripts/addons/ space_view3d_copy_attributes.py: small fix for bmesh (face materials)

Brendon Murphy meta.androcto1 at gmail.com
Fri Apr 20 13:08:39 CEST 2012


Revision: 3290
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3290
Author:   meta-androcto
Date:     2012-04-20 11:08:38 +0000 (Fri, 20 Apr 2012)
Log Message:
-----------
small fix for bmesh (face materials)
added warning "some mesh functions broken"

Modified Paths:
--------------
    trunk/py/scripts/addons/space_view3d_copy_attributes.py

Modified: trunk/py/scripts/addons/space_view3d_copy_attributes.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_copy_attributes.py	2012-04-20 07:44:39 UTC (rev 3289)
+++ trunk/py/scripts/addons/space_view3d_copy_attributes.py	2012-04-20 11:08:38 UTC (rev 3290)
@@ -25,6 +25,7 @@
     "blender": (2, 6, 1),
     'location': 'View3D > Ctrl-C',
     'description': 'Copy Attributes Menu from Blender 2.4',
+    "warning": "some mesh functions broken",
     'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.5/Py/'
                 'Scripts/3D_interaction/Copy_Attributes_Menu',
     'tracker_url': 'https://projects.blender.org/tracker/index.php?'
@@ -691,7 +692,7 @@
         bpy.ops.object.editmode_toggle()
 
         if mode == 'MAT':
-            from_data = mesh.faces
+            from_data = mesh.polygons
             to_data = from_data
         else:
             if mode == 'VCOL':
@@ -704,9 +705,9 @@
                 return _end({'CANCELLED'})
             from_data = layers[layername or act_layer.name].data
             to_data = act_layer.data
-        from_face = from_data[mesh.faces.active]
+        from_face = from_data[mesh.polygons.active]
 
-        for f in mesh.faces:
+        for f in mesh.polygons:
             if f.select:
                 if to_data != from_data:
                     from_face = from_data[f.index]



More information about the Bf-extensions-cvs mailing list