Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
a4e3ed6e
Commit
a4e3ed6e
authored
14 years ago
by
Martin Buerbaum
Browse files
Options
Downloads
Patches
Plain Diff
* Version 0.7.4 - Fixed the add_modal_handler and callback_add code.
* Thanks to jesterKing for pointing that out :-)
parent
bcd75f3b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
space_view3d_panel_measure.py
+11
-10
11 additions, 10 deletions
space_view3d_panel_measure.py
with
11 additions
and
10 deletions
space_view3d_panel_measure.py
+
11
−
10
View file @
a4e3ed6e
...
@@ -44,6 +44,8 @@ It's very helpful to use one or two "Empty" objects with
...
@@ -44,6 +44,8 @@ It's very helpful to use one or two "Empty" objects with
"
Snap during transform
"
enabled for fast measurement.
"
Snap during transform
"
enabled for fast measurement.
Version history:
Version history:
v0.7.4 - Fixed the add_modal_handler and callback_add code.
Thanks to jesterKing for pointing that out :-)
v0.7.3.1 - Fixed bug that made all lines in Blender stippled :-)
v0.7.3.1 - Fixed bug that made all lines in Blender stippled :-)
v0.7.3 - Added display of delta x/y/z value in 3d view.
v0.7.3 - Added display of delta x/y/z value in 3d view.
* Inspired by warpi
'
s patch here:
* Inspired by warpi
'
s patch here:
...
@@ -155,8 +157,7 @@ bl_addon_info = {
...
@@ -155,8 +157,7 @@ bl_addon_info = {
'
blender
'
:
(
2
,
5
,
3
),
'
blender
'
:
(
2
,
5
,
3
),
'
location
'
:
'
View3D > Properties > Measure
'
,
'
location
'
:
'
View3D > Properties > Measure
'
,
'
description
'
:
'
Measure distances between objects
'
,
'
description
'
:
'
Measure distances between objects
'
,
'
warning
'
:
'
Need maintenance, it can make weird stuff in the UI!
'
,
\
'
warning
'
:
''
,
# Used for warning icon and text in addons panel.
# Used for warning icon and text in addons panel.
'
wiki_url
'
:
'
http://wiki.blender.org/index.php/Extensions:2.5/Py/
'
\
'
wiki_url
'
:
'
http://wiki.blender.org/index.php/Extensions:2.5/Py/
'
\
'
Scripts/3D_interaction/Panel_Measure
'
,
'
Scripts/3D_interaction/Panel_Measure
'
,
'
tracker_url
'
:
'
https://projects.blender.org/tracker/index.php?
'
\
'
tracker_url
'
:
'
https://projects.blender.org/tracker/index.php?
'
\
...
@@ -600,17 +601,17 @@ class VIEW3D_OT_display_measurements(bpy.types.Operator):
...
@@ -600,17 +601,17 @@ class VIEW3D_OT_display_measurements(bpy.types.Operator):
# Add the region OpenGL drawing callback
# Add the region OpenGL drawing callback
for
WINregion
in
context
.
area
.
regions
:
for
WINregion
in
context
.
area
.
regions
:
if
WINregion
.
type
==
'
WINDOW
'
:
if
WINregion
.
type
==
'
WINDOW
'
:
break
context
.
manager
.
add_modal_handler
(
self
)
self
.
_handle
=
WINregion
.
callback_add
(
draw_measurements_callback
,
(
self
,
context
),
'
POST_PIXEL
'
)
context
.
manager
.
add_modal_handler
(
self
)
print
(
"
Measure panel display callback added
"
)
self
.
_handle
=
WINregion
.
callback_add
(
draw_measurements_callback
,
(
self
,
context
),
'
POST_PIXEL
'
)
print
(
"
Measure panel display callback added
"
)
return
{
'
RUNNING_MODAL
'
}
return
{
'
RUNNING_MODAL
'
}
return
{
'
CANCELLED
'
}
else
:
else
:
self
.
report
({
'
WARNING
'
},
"
View3D not found, cannot run operator
"
)
self
.
report
({
'
WARNING
'
},
"
View3D not found, cannot run operator
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment