missing check for shape key
authorCampbell Barton <ideasman42@gmail.com>
Wed, 6 Jan 2010 11:21:57 +0000 (11:21 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 6 Jan 2010 11:21:57 +0000 (11:21 +0000)
release/scripts/op/object.py

index 5e261c18c237a242b93637b4a1e68c32934537b6..f17627877405b7728d0f5cf27a53b2eda4ba004a 100644 (file)
@@ -310,6 +310,9 @@ class ShapeTransfer(bpy.types.Operator):
     def execute(self, context):
         C = bpy.context
         ob_act = C.active_object
     def execute(self, context):
         C = bpy.context
         ob_act = C.active_object
+        if ob_act.active_shape_key is None:
+            self.report({'ERROR'}, "Active object has no shape key")
+            return {'CANCELLED'}
         objects = [ob for ob in C.selected_editable_objects if ob != ob_act]
         return self._main(ob_act, objects, self.properties.mode, self.properties.use_clamp)
 
         objects = [ob for ob in C.selected_editable_objects if ob != ob_act]
         return self._main(ob_act, objects, self.properties.mode, self.properties.use_clamp)