[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [889] trunk/py/scripts/addons/ space_view3d_panel_measure.py: * Version 0.7. 7 - One more change to the callback registration code.
Martin Buerbaum
martin.buerbaum at gmx.at
Tue Aug 3 13:37:08 CEST 2010
Revision: 889
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=889
Author: pontiac
Date: 2010-08-03 13:37:07 +0200 (Tue, 03 Aug 2010)
Log Message:
-----------
* Version 0.7.7 - One more change to the callback registration code.
* Now it should _finally_ work as intended.
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-08-02 15:51:14 UTC (rev 888)
+++ trunk/py/scripts/addons/space_view3d_panel_measure.py 2010-08-03 11:37:07 UTC (rev 889)
@@ -19,13 +19,15 @@
bl_addon_info = {
"name": "3D View: Measure Panel",
"author": "Buerbaum Martin (Pontiac)",
- "version": "0.7",
+ "version": "0.7.7",
"blender": (2, 5, 3),
"location": "View3D > Properties > Measure",
"description": "Measure distances between objects",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/3D_interaction/Panel_Measure",
- "tracker_url": "https://projects.blender.org/tracker/index.php?func=detail&aid=21445&group_id=153&atid=469",
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/" \
+ "Scripts/3D_interaction/Panel_Measure",
+ "tracker_url": "https://projects.blender.org/tracker/index.php?" \
+ "func=detail&aid=21445&group_id=153&atid=469",
"category": "3D View"}
"""
@@ -55,6 +57,9 @@
"Snap during transform" enabled for fast measurement.
Version history:
+v0.7.7 - One more change to the callback registration code.
+ Now it should finally work as intended.
+v0.7.6 - API changes (r885, r886) - register & unregister function
v0.7.5.3 - Small fix for bug in v0.7.5.1
(location was off when object was moved)
v0.7.5.2 - Changed callback registration back to original code &
@@ -588,7 +593,9 @@
class VIEW3D_OT_display_measurements(bpy.types.Operator):
'''Display the measurements made in the 'Measure' panel'''
- bl_idname = "view3d.display_measurements"
+ # Do not use bl_idname here (class name is used instead),
+ # so the callback can be added easily.
+ #bl_idname = "view3d.display_measurements"
bl_label = "Display the measurements made in the" \
" 'Measure' panel in the 3D View."
bl_options = {'REGISTER'}
@@ -600,7 +607,8 @@
def execute(self, context):
if context.area.type == 'VIEW_3D':
- if not self.bl_idname in context.manager.operators.keys():
+ mgr_ops = context.manager.operators.values();
+ if not self.bl_idname in [op.bl_idname for op in mgr_ops]:
# Add the region OpenGL drawing callback
for WINregion in context.area.regions:
if WINregion.type == 'WINDOW':
More information about the Bf-extensions-cvs
mailing list