[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1203] trunk/py/scripts/addons/ space_view3d_panel_measure.py: * Measure Panel - Version 0.7.10

Martin Buerbaum martin.buerbaum at gmx.at
Fri Nov 26 15:02:30 CET 2010


Revision: 1203
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1203
Author:   pontiac
Date:     2010-11-26 15:02:29 +0100 (Fri, 26 Nov 2010)

Log Message:
-----------
* Measure Panel - Version 0.7.10
* Applied patch by Filiciss Muhgue that (mostly) fixes the quad view. Thanks for that!
* Patch link: https://projects.blender.org/tracker/?func=detail&atid=127&aid=24932&group_id=9
* TODO: Make Quad view more useful (fix text position, display 2D value of the hypotenuse rather than the 3D one)

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

Modified: trunk/py/scripts/addons/space_view3d_panel_measure.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_panel_measure.py	2010-11-26 13:26:46 UTC (rev 1202)
+++ trunk/py/scripts/addons/space_view3d_panel_measure.py	2010-11-26 14:02:29 UTC (rev 1203)
@@ -19,9 +19,9 @@
 bl_addon_info = {
     "name": "Measure Panel",
     "author": "Buerbaum Martin (Pontiac)",
-    "version": (0, 7, 9),
+    "version": (0, 7, 10),
     "blender": (2, 5, 3),
-    "api": 32411,
+    "api": 33331,
     "location": "View3D > Properties > Measure",
     "description": "Measure distances between objects",
     "warning": "",
@@ -58,10 +58,15 @@
 "Snap during transform" enabled for fast measurement.
 
 Version history:
+v0.7.10 - Applied patch by Filiciss Muhgue that (mostly) fixes the quad view.
+    Patch link: https://projects.blender.org/tracker/?func=
+    detail&atid=127&aid=24932&group_id=9
+    Thanks for that!
+    Removed (now) unneeded "attr" setting for properties.
 v0.7.9 - Updated scene properties for changes in property API.
     See http://lists.blender.org/pipermail/bf-committers/
         2010-September/028654.html
-    Synced API changes in7from local copy.
+    Synced API changes in/from local copy.
 v0.7.8 - Various Py API changes by Campbell ...
     bl_default_closed -> bl_options = {'DEFAULT_CLOSED'}
     x.verts -> x.vertices
@@ -436,7 +441,7 @@
     total_mat = view_mat
 
     # order is important
-    vec = total_mat * Vector((loc_3d[0], loc_3d[1], loc_3d[2], 1.0))
+    vec = Vector((loc_3d[0], loc_3d[1], loc_3d[2], 1.0)) * total_mat
 
     # dehomogenise
     vec = Vector((
@@ -469,8 +474,8 @@
         p1, p2, color = line
 
         # Get and convert the Perspective Matrix of the current view/region.
-        view3d = bpy.context.space_data
-        region = view3d.region_3d
+        view3d = bpy.context
+        region = view3d.region_data
         perspMatrix = region.perspective_matrix
         tempMat = [perspMatrix[i][j] for i in range(4) for j in range(4)]
         perspBuff = bgl.Buffer(bgl.GL_FLOAT, 16, tempMat)




More information about the Bf-extensions-cvs mailing list