Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Buerbaum <martin.buerbaum@gmx.at>2010-08-03 15:37:07 +0400
committerMartin Buerbaum <martin.buerbaum@gmx.at>2010-08-03 15:37:07 +0400
commita235cd40576c4658c6fc4073178fe04f985682a6 (patch)
treebb20a7d33315a6a9225bfc17d2d7a41c72c204d6 /space_view3d_panel_measure.py
parent4802d6516ba5ba60076085c51683e9b4d6a92066 (diff)
* Version 0.7.7 - One more change to the callback registration code.
* Now it should _finally_ work as intended.
Diffstat (limited to 'space_view3d_panel_measure.py')
-rw-r--r--space_view3d_panel_measure.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py
index 5a7c2cec..436fc30f 100644
--- a/space_view3d_panel_measure.py
+++ b/space_view3d_panel_measure.py
@@ -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 @@ It's very helpful to use one or two "Empty" objects with
"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 @@ def draw_measurements_callback(self, context):
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 @@ class VIEW3D_OT_display_measurements(bpy.types.Operator):
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':