* fix for error in shape transfer (wrong var name).
authorCampbell Barton <ideasman42@gmail.com>
Thu, 2 Feb 2012 05:11:42 +0000 (05:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 2 Feb 2012 05:11:42 +0000 (05:11 +0000)
* fix for error alligning object to the view when no space was set.

also added blenderplayer start to CTest operator blacklist.

release/scripts/modules/bpy_extras/object_utils.py
release/scripts/startup/bl_operators/object.py
source/tests/bl_run_operators.py

index c9c1dc05476461eef078397ad417e505c54d4831..66b774e63016423b63e66f7be33e8d70db0c88cc 100644 (file)
@@ -44,7 +44,7 @@ def add_object_align_init(context, operator):
     properties = operator.properties if operator is not None else None
 
     space_data = context.space_data
-    if space_data.type != 'VIEW_3D':
+    if space_data and space_data.type != 'VIEW_3D':
         space_data = None
 
     # location
index 2c329de36440fd4145a9d4962726e02104ea5952..923a259c69c65e798b8746728fd1f8ea682aee94 100644 (file)
 
 import bpy
 from bpy.types import Operator
-from bpy.props import StringProperty, BoolProperty, EnumProperty, IntProperty
+from bpy.props import (StringProperty,
+                       BoolProperty,
+                       EnumProperty,
+                       IntProperty)
 
 
 class SelectPattern(Operator):
@@ -54,7 +57,7 @@ class SelectPattern(Operator):
             pattern_match = fnmatch.fnmatchcase
         else:
             pattern_match = (lambda a, b:
-                                 fnmatch.fnmatchcase(a.upper(), b.upper()))
+                             fnmatch.fnmatchcase(a.upper(), b.upper()))
         is_ebone = False
         obj = context.object
         if obj and obj.mode == 'POSE':
@@ -490,7 +493,7 @@ class ShapeTransfer(Operator):
 
     def execute(self, context):
         ob_act = context.active_object
-        objects = [ob for ob in C.selected_editable_objects if ob != ob_act]
+        objects = [ob for ob in context.selected_editable_objects if ob != ob_act]
 
         if 1:  # swap from/to, means we cant copy to many at once.
             if len(objects) != 1:
index 476ccc30b54dcb44eb473716a6db0363b12ee253..b3781e9469644487015af4aa2c1511de79e68572 100644 (file)
@@ -37,6 +37,7 @@ op_blacklist = (
     "render.render",
     "*.*_export",
     "*.*_import",
+    "wm.blenderplayer_start",
     "wm.url_open",
     "wm.doc_view",
     "wm.path_open",