[Bf-extensions-cvs] [57eb270] master: Remove compatibility for older Blender versions
Campbell Barton
noreply at git.blender.org
Sun Mar 6 07:25:36 CET 2016
Commit: 57eb270b53a17290ead1fb0cdb67ba8df32772c5
Author: Campbell Barton
Date: Sun Mar 6 17:16:53 2016 +1100
Branches: master
https://developer.blender.org/rBAC57eb270b53a17290ead1fb0cdb67ba8df32772c5
Remove compatibility for older Blender versions
This repository is intended to be used with current master.
===================================================================
M space_view3d_enhanced_3d_cursor.py
===================================================================
diff --git a/space_view3d_enhanced_3d_cursor.py b/space_view3d_enhanced_3d_cursor.py
index 8887c71..3372b87 100644
--- a/space_view3d_enhanced_3d_cursor.py
+++ b/space_view3d_enhanced_3d_cursor.py
@@ -2662,18 +2662,9 @@ class Snap3DUtility(SnapUtilityBase):
# returns points in flipped order
lb, la = sec
- # Note: in 2.77 the ray_cast API has changed.
- # was: location, normal, index
- # now: result, location, normal, index
- def ray_cast(obj, la, lb):
- res = obj.ray_cast(la, lb)
- if bpy.app.version < (2, 77, 0):
- return ((res[-1] >= 0), res[0], res[1], res[2])
- return res
-
# Does ray actually intersect something?
try:
- success, lp, ln, face_id = ray_cast(obj, la, lb)
+ success, lp, ln, face_id = obj.ray_cast(obj, la, lb)
except Exception as e:
# Somewhy this seems to happen when snapping cursor
# in Local View mode at least since r55223:
@@ -2684,7 +2675,7 @@ class Snap3DUtility(SnapUtilityBase):
# Work-around: in Local View at least the object
# in focus permits raycasting (modifiers are
# applied in 'PREVIEW' mode)
- success, lp, ln, face_id = ray_cast(orig_obj, la, lb)
+ success, lp, ln, face_id = orig_obj.ray_cast(la, lb)
except Exception as e:
# However, in Edit mode in Local View we have
# no luck -- during the edit mode, mesh is
More information about the Bf-extensions-cvs
mailing list